Let me sum it...
1. Change the emulationstation branch back to retropie.
2. add emulationstation-13-sx05re_mathfix.patch.zip patch to ES.
3. add freeimage-04-sx05re-png_fix_v8.patch.zip patch to freeimageCorrect?
yes, hopefully that will make everything compile.
unfortunately for my device, there is no sound yet
and also, edit, or remove the autostart.sh on the retroarch package folder, or you will get ES and kodi fighting on boot