RetroELEC Kodi+Wayland+Emulationstation+RetroArch (x86/XU4/RPi)

  • escalade I have been working to take your customized work and integrate it with a LibreELEC build from GDPR-1 that's meant for my platform, the ROCK64. I basically added your OEM settings, your escalade packages folder, and then worked through each compile error one at a time. I've also omitted all but a handful of emulators for this first version. I've got everything successfully compiling and it boots just fine but I'm stuck with EmulationStation throwing this error: "SDL not built with video support".

    I've reviewed the SDL2 package.mk that you use and compared it to raybuntu's and he has a lot of custom flags that you don't which I initially blamed for this error, so I recompiled using your exact SDL2 package.mk and patches. I had to add a dependency to libXext but it compiled fine, however I still get the exact same SDL error.

    So I'm at a point where I need some advice from escalade or from GDPR-1. Maybe this error is referring to SDL1 and not SDL2? Running EmulationStation --debug doesn't provide any additional information.

    When SDL2 compiles, here's the output Configure Summary:

    Enabled modules : atomic audio video render events joystick haptic power filesystem threads timers file loadso cpuinfo assembly

    Assembly Math :

    Audio drivers : disk dummy oss alsa(dynamic) pulse(dynamic)

    Video drivers : dummy x11(dynamic) opengl_es1 opengl_es2 vulkan

    X11 libraries : xdbe xshape

    Input drivers : linuxev linuxkd

    Using libsamplerate : NO

    Using libudev : YES

    Using dbus : YES

    Using ime : YES

    Using ibus : NO

    Using fcitx : NO

    As a workaround, I'm considering just trying to import over a compiled version of emulationstation and libraries that I already built for ROCK64 on a stretch release that I know runs and copy it into the OEM files instead of letting LibreELEC compile them. No idea at all if this will work haha I'd prefer to fix the SDL issue.


    Any and all feedback would be greatly appreciated!

  • Mrfixit2001

    If you have a look at this: LibreELEC.tv/SDL2-raspberry-gl-location.patch at le82 · escalade/LibreELEC.tv · GitHub

    I don't know about what kind of GL drivers the ROCK64 platform uses, but hardcoded paths needed to be changed for the RPi in order for the GL libraries paths to be picked up by SDL2. Actually looks like the configure script picks them up as ES1/ES2/Vulkan is detected, but perhaps the Mesa GL isn't enough? Not sure, but I guess that's something you will need to look into.

  • escalade

    Thank you for that! The ROCK64 uses the mali-rockchip drivers, and below is an except from the makeinstall_target function within that package.mk. From what I can tell, the paths are the same as they are on the RPI. I did have to manually add the links for libGLESv1 and libglesv1_cm, since it was complaining about those. So it appears to be finding them.

    mkdir -p $SYSROOT_PREFIX/usr/lib

    cp -PRv lib/$PKG_MALI_ARCH/$PKG_MALI_FILE $SYSROOT_PREFIX/usr/lib

    ln -sfv $PKG_MALI_FILE $SYSROOT_PREFIX/usr/lib/libmali.so

    ln -sfv libmali.so $SYSROOT_PREFIX/usr/lib/libMali.so

    ln -sfv libmali.so $SYSROOT_PREFIX/usr/lib/libEGL.so

    ln -sfv libmali.so $SYSROOT_PREFIX/usr/lib/libGLESv2.so

    ln -sfv libmali.so $SYSROOT_PREFIX/usr/lib/libGLESv1.so

    ln -sfv libmali.so $SYSROOT_PREFIX/usr/lib/libGLESv1_CM.so

    ln -sfv libmali.so $SYSROOT_PREFIX/usr/lib/libgbm.so

    mkdir -p $INSTALL/usr/lib

    cp -PRv lib/$PKG_MALI_ARCH/$PKG_MALI_FILE $INSTALL/usr/lib

    ln -sfv $PKG_MALI_FILE $INSTALL/usr/lib/libmali.so

    ln -sfv libmali.so $INSTALL/usr/lib/libMali.so

    ln -sfv libmali.so $INSTALL/usr/lib/libEGL.so

    ln -sfv libmali.so $INSTALL/usr/lib/libGLESv2.so

    ln -sfv libmali.so $INSTALL/usr/lib/libGLESv1.so

    ln -sfv libmali.so $INSTALL/usr/lib/libGLESv1_CM.so

    ln -sfv libmali.so $INSTALL/usr/lib/libgbm.so


    It looks like that patch you listed is referencing one link I didn't add, for libGLES_CM, so I'll add that and cross my fingers. Do you have any other thoughts or ideas? Do you agree the paths look the same?

  • Looks the same to me. You'll need to look at the SDL2 source to see if perhaps the paths for the ROCK64 chip is hardcoded elsewhere as the patch was to the RPi specifically.

  • escalade - thanks, that was helpful. Based on the below link to the implementation of the RPI specific setting that your patch utilizes, im thinking I need to create a patch to force override cmakelists setting VIDEO_RPI to ON so your patch is picked up. Do you think I need to override the paths in sdlchecks.cmake as well?

    SDL: changeset 9077:28e6de55eb07

    Also, do you have a shortcut to creating patches? The only sure way I know of is to upload the source to github, make the change, and use the commit to generate the patch. I understand the syntax in the patch file content but the first few lines I don't know how to set.

  • escalade
    i plan to build a new HTPC with your LE "remix" with an Intel G4560 CPU and 4-8GB RAM, which emulators would benefit from adding an Nvidia GTX 1060 6GB GPU? Except higher power consumption are there any cons/pros for having a discrete graphics card or should I satisfy my needs with the G4560 CPU only?

    Intention is to play games through emulators and also watch HD material.

  • escalade your guidance of editing that patch to ensure the paths were being used was gold. Thanks! On to the next error haha

    Now I get unable to initialize SDL and no avail video device. Lots of posts on this one all over the internet, so this may take awhile haha the good news is I've encountered this error before when I compiled emulationstation on stretch and resolved it by force overwriting some packages. The bad news is I can't do that on libreelec. I tried display=:0 but it had no effect. If you have any previous experience resolving this or have thoughts, I'd welcome them. Thanks!

  • It's "quite simple" really, SDL2 needs to be compiled to use the GL libraries required for your chip, so you need to make that happen if the configure script doesn't already take care of it. Get familiar with SDL2 and the OpenWrt toolchain regarding ROCK64. Like I said, I do not have the same hardware, what I did for the RPi has been linked. Create threads in the development section for further help so others can find your work.

  • Alternate Skin Shortcuts:

    Thank you Waspoeder. Excellent job. This would have saved me a ton of time. This is the simplest solution and will work for any skin. I had to ask Angelinas to modify Aeon MQ6 to add the ability to create Shortcut scripts to his skin. Which he did! but only that skin. I will re-post links for anyone else who is not a programmer like myself. I hope this helps.

    Chrome Zometeen

    Emulationstation Zometeen

    Spotify Zometeen

  • Hello Escalade,

    I have been using Apollo lake boards for a while and working great. I am thinking about upgrading to AMD Raven Ridge when it is released. I know your builds have extra Intel support but I am wondering how well AMD is supported.