I recently set this up on my pi. What I did was blacklist xpad, and install the xbox 360 driver from the retropie-setup script. Search for the blacklisting thing if you haven’t already run across that. There are several posts on it in the forums and elsewhere.
After that I ran the retroarch-joyconfig, I think also using the retropie-setup script.
Once that was done, I then setup the emulation station controller config. I think if you do that first, you will have problems later after installing the new xbox driver from retropie-setup.
My first attempts at editing the .cfg files directly were a big fail, so I reloaded the img onto my sd card and started from scratch. The second attempt was much smoother.
After trying some solutions I only managed to mess up my controller so much that I could no longer navigate the RetroPie menu itself.
After that I reloaded a fresh img.
BUT when I reloaded the image for whatever reason controlled 1-4 were not recognized. It was now reading controllers as 5 and 6. Somehow I solved this, but at this point I’m giving up because installing 3.0 was clean and simple except for whatever the heck happened with the controllers.