If anyone is interested, this is how I made my pi boot to Kodi, then drop to emulation station when you exit Kodi
from prompt
sudo RetroPie-Setup/retropie_setup.sh
click setup -> Auto-start EmulationStation and select “1 Original boot behavior”
exit back to prompt
Now edit pi profile like this
nano .profile
and add this to the end
if [ -z "$SSH_CLIENT" ] ; then
/home/pi/RetroPie/roms/ports/Kodi.sh
emulationstation
fi
Open a terminal session and edit inittab file.
sudo nano /etc/inittab
Disable the getty program.
Navigate to the following line in inittab
1:2345:respawn:/sbin/getty 115200 tty1
And add a # at the beginning of the line to comment it out
#1:2345:respawn:/sbin/getty 115200 tty1
Add login program to inittab.
Add the following line just below the commented line
1:2345:respawn:/bin/login -f pi tty1 </dev/tty1 >/dev/tty1 2>&1
This will run the login program with pi user and without any authentication
Step 4: Save and Exit.
Press Ctrl+X to exit nano editor followed by Y to save the file and then press Enter to confirm the filename.
I modified this information from what i found here
http://www.opentechguides.com/how-to/article/raspberry-pi/5/raspberry-pi-auto-start.html
of course this goes with
sudo apt-get install cec-utils
to get the CEC on my TV to work with it.
and some work here
https://www.petrockblock.com/forums/topic/a-guide-for-adding-xbmc-with-working-wireless-360-to-retropie/
to make Kodi work with my xbox 360 controller