I've got retropie 3.8 installed with kodi running
I've installed kodi via:
sudo apt-get update
sudo apt-get install kodi (currently 15.2)
identified controller via cat /proc/bus/input/devices (8BitDo SNES30 GamePad)
defined new joystick.xml under /home/pi/.kodi/userdata/keymaps/ with the same name and basic mappings e.g.
<keymap>
<global>
<joystick name="8BitDo SNES30 GamePad">
<button id="1">Select</button>
<button id="0">Back</button>
<axis id="1" limit="-1">Up</axis>
<axis id="1" limit="+1">Down</axis>
<axis id="2" limit="-1">Left</axis>
<axis id="2" limit="+1">Right</axis>
</joystick>
</global>
</keymap>
start Kodi (sudo kodi)
Joystick isn't registered
If I look at the kodi.log under /home/pi/.kodi/temp/ I can see that SNES30 is attempting to be mapped via dev/input/event3 which is not right (it should be js0)