[MOD] LibreELEC for S905 with 32 bit libs to run regular arm binaries


  • Hi here are the errors.

    The pictures helped rule out a few things. It seems the update process is not able to recognize and/or copy the SYSTEM from the .update folder to the Flash partition. I will have to look into further this evening and see if anything has changed for the 7.9 version around how the squashfs is packaged (compression used, etc.).

    Meanwhile, if you can get your system back working on the alpha 7.9 version via USB or SD (not NAND), one thing you can try is just drop the SYSTEM file from link below directly into the first partition (fat32 partition which mounts as /flash in libreelec - best to be accessed from Windows) and then try to boot libreelec. That will help eliminate some possible causes with the update package. Please use this SYSTEM (and not the one from the tar file): ?4l3cj8c9czvnkuk

  • The pictures helped rule out a few things. It seems the update process is not able to recognize and/or copy the SYSTEM from the .update folder to the Flash partition. I will have to look into further this evening and see if anything has changed for the 7.9 version around how the squashfs is packaged (compression used, etc.).

    Meanwhile, if you can get your system back working on the alpha 7.9 version via USB or SD (not NAND), one thing you can try is just drop the SYSTEM file from link below directly into the first partition (fat32 partition which mounts as /flash in libreelec - best to be accessed from Windows) and then try to boot libreelec. That will help eliminate some possible causes with the update package. Please use this SYSTEM (and not the one from the tar file): ?4l3cj8c9czvnkuk

    Based on the positive feedback from saunderez running the update for the alpha-7.9.0 version, I am suspecting something specific to your setup is causing the error. Can you tell us what device do you have, RAM/ROM, as well as if you were able to successfully deploy alpha-7.9.0 original version from kszaq on it? Cheers!

  • The pictures helped rule out a few things. It seems the update process is not able to recognize and/or copy the SYSTEM from the .update folder to the Flash partition. I will have to look into further this evening and see if anything has changed for the 7.9 version around how the squashfs is packaged (compression used, etc.).

    Meanwhile, if you can get your system back working on the alpha 7.9 version via USB or SD (not NAND), one thing you can try is just drop the SYSTEM file from link below directly into the first partition (fat32 partition which mounts as /flash in libreelec - best to be accessed from Windows) and then try to boot libreelec. That will help eliminate some possible causes with the update package. Please use this SYSTEM (and not the one from the tar file): ?4l3cj8c9czvnkuk


    Hi its working with this method tested retroarch with ps4 controller and all is good :)


  • Hi its working with this method tested retroarch with ps4 controller and all is good :)

    I am glad to hear that. Since I am not touching the kernel in my MOD, the least intrusive (although riskier) way to apply this MOD is by directly replacing the SYSTEM file on the fat32 partition via windows (if using USB or SD card installation).

    But the update from tar file should have worked for you, as it did for saunderez. Maybe it is something tied to your setup. Do you mind sharing what device you have and how much RAM and ROM?

    Edited once, last by JoKeRzBoX (November 7, 2016 at 9:23 PM).

  • JoKeRzBoX, any chance you could generate an update for the new 7.9.0 build?

    LibreELEC-S905.aarch64-8.0-devel-20161107203518-r24431-g828b0b5.img.gz

    I just spent 2 hours trying to do it as per the instructions on your repository (including spinning up a Linux VM and figuring out the steps I wasn't familiar with) but to no avail. Everything looked good, generated my SYSTEM and SYSTEM.md5. Multiple times my repacked files were rejected by the updater. I even regenerated SYSTEM a couple of times to make sure the problem wasn't there. I'm probably just doing something dumb due to being tired and frustrated. I'll try again tomorrow evening when morale recovers because I'd really like to be self reliant rather than bugging you for new builds.

    Cheers
    Chris

  • I am glad to hear that. Since I am not touching the kernel in my MOD, the least intrusive (although riskier) way to apply this MOD is by directly replacing the SYSTEM file on the fat32 partition via windows (if using USB or SD card installation).

    But the update from tar file should have worked for you, as it did for saunderez. Maybe it is something tied to your setup. Do you mind sharing what device you have and how much RAM and ROM?

    Hi its a Netbox A95X 2GB ram CPU s905x 16gb storage. I used custom firmware on the nand 'TX5 Pro' and Libreelec runs from a 16gb SD card.


  • JoKeRzBoX, any chance you could generate an update for the new 7.9.0 build?

    LibreELEC-S905.aarch64-8.0-devel-20161107203518-r24431-g828b0b5.img.gz

    I just spent 2 hours trying to do it as per the instructions on your repository (including spinning up a Linux VM and figuring out the steps I wasn't familiar with) but to no avail. Everything looked good, generated my SYSTEM and SYSTEM.md5. Multiple times my repacked files were rejected by the updater. I even regenerated SYSTEM a couple of times to make sure the problem wasn't there. I'm probably just doing something dumb due to being tired and frustrated. I'll try again tomorrow evening when morale recovers because I'd really like to be self reliant rather than bugging you for new builds.

    Cheers
    Chris

    I am all up to enable people to perform the MOD on their own! Thanks for trying and please do not give up!

    Just to double check your steps, you should have used:
    SYSTEM from LibreELEC-S905.aarch64-8.0-devel-20161107203518-r24431-g828b0b5.img.gz as SYSTEM_64bit
    SYSTEM from LibreELEC-S805.arm-8.0-devel-20161029000130-r24352-g5a0b492.img.gz as SYSTEM_32bit (as there is no new alpha for S805 yet, use the latest available)
    SYSTEM from LibreELEC-S805.MXQ.arm-7.0.2.6.img.gz as SYSTEM_32bit_base (for some older versions of libs that could have been linked from binaries such as retroarch)

    If you used those and the script generated a target/SYSTEM file, just take a look at its contents to see if it looks ok (you can use command unsquashfs -l target/SYSTEM or mount it with mkdir ./test; mount -t squashfs -o loop ./target/SYSTEM ./test).

    As for creating the update package, there are a few ways you can do. My recommendation is get the one I created for the first alpha, untar it, and replace SYSTEM, SYSTEM.md5 with your generated ones and KERNEL and KERNEL.md5 with the ones from original latest alpha package from kszaq. Then re-tar it and it "should" work :D .

    If you are runnign libreelec from USB or SD card, even easier (but more dangerous) is to just plug the USB or SD into a windows computer and replace the SYSTEM from the fat32 partition with the one generated by the mod script.

    Let me know how it goes. If you are not successful by end of the week let me know and I can generate it on the weekend.

  • hey JoKeRzBoX any chance of making this version with the new 7.0.2.009 version from kszaq?

  • Hello
    Sorry for simple questions.
    I can copy 32 bit libraries and added sym links to folders.
    But Is there retroarch and game binary installation tarballs to add games to an existing libreelec system? does it have to be kodi addons?


    Any wiki installation procedures pointers appreciated.

  • This morning I managed to successfully build and install the image on my box. Thanks for your assistance, it all came together in the end and I learned how to do a few things in Linux that I had never attempted before (such as mounting a LibreElec .img). Unfortunately, unlike your previous build, RetroArch does not work (loops straight back into Kodi). I've dug into the file system and the 32 bit libraries are definitely there, so you script definitely worked there. However there there must be something different than your previous working build. It seems like the libraries aren't actually being loaded but I'm not sure where to start investigating that. If you can give me any pointers I'm happy to troubleshoot.

  • This morning I managed to successfully build and install the image on my box. Thanks for your assistance, it all came together in the end and I learned how to do a few things in Linux that I had never attempted before (such as mounting a LibreElec .img). Unfortunately, unlike your previous build, RetroArch does not work (loops straight back into Kodi). I've dug into the file system and the 32 bit libraries are definitely there, so you script definitely worked there. However there there must be something different than your previous working build. It seems like the libraries aren't actually being loaded but I'm not sure where to start investigating that. If you can give me any pointers I'm happy to troubleshoot.

    A few things to look:

    1) First log into the box via ssh, and check if the LD_LIBRARY_PATH is properly defined:

    Code
    echo $LD_LIBRARY_PATH


    If that returns a series of folders separated by ":" and /lib32 and /usr/lib32 are part of it, this step is complete

    2) Go to the folder where the 32 bit binary is and check if the libraries it needs are found using ldd command. Example for retroarch:

    Code
    cd <folder_where_retrorch_is>
    ldd ./retroarch

    You shold see something like:

    Code
    ...
    libass.so.5 => /usr/lib32/libass.so.5 (0xb6e8a000)
    libasound.so.2 => /usr/lib32/libasound.so.2 (0xb6e12000)
    libfreetype.so.6 => /usr/lib32/libfreetype.so.6 (0xb6da3000)
    ...

    If some library is not found, it will show as missing:

    Code
    libavcodec.so.56 => not found

    And that means either that lib is really missing from the /lib32 and /usr/lib32 or something else is wrong. I would start checking that.

  • I downloaded "emulator.tools.retroarch-7.0.2-j04.zip"
    i installed this package as kodi-addon, install from zip file, and addon enabled..
    but when i launch programs-> addons-> retroarch and it does not show, I tried to change kodi stop-start or kodi pause options, but does not help.
    can you comment on below outputs? what is missing?
    (the device is mini m8s ii, S905X, 2g ram)

    there are folders /lib32 & /usr/lib32 and lots of files


    Code
    LibreELEC:/etc/profile.d # echo $LD_LIBRARY_PATH
    /usr/lib:/lib:/usr/lib32:/lib32:/storage/.kodi/addons/emulator.tools.retroarch/lib:/usr/lib/pulseaudio:/usr/lib32/pulseaudio


    Code
    LibreELEC:/ # find . -name retroarch
    ./storage/emulators/retroarch
    ./storage/.kodi/addons/emulator.tools.retroarch/bin/retroarch

    these folders are empty:

    Code
    LibreELEC:~/emulators/retroarch # ls
    screenshots  system


    these are executables but does not launch:


    Code
    LibreELEC:~/.kodi/addons/emulator.tools.retroarch/lib/libretro # ls
    
    
    lots of info and so files.. did not copy all here..


    EDIT:
    now the shell gives me permission denied.
    needless to say i login as root in Libreelec system through ssh...

    Code
    LibreELEC:~/.kodi/addons/emulator.tools.retroarch/bin # retroarch
    -sh: retroarch: Permission denied

    Edited once, last by Albundy (November 12, 2016 at 9:23 AM).


  • Please test this version for OdroidC2 and report.

    Thanks, Installed fine, but xunlei xware(a 32bit app for download) still does not work, which works ok on raspberry pi 2 with libreelec 7.90.008
    here are some info:

    Code
    OC2-LE7:~ # echo $LD_LIBRARY_PATH
    /usr/lib:/lib:/usr/lib32:/lib32:/storage/.kodi/addons/script.module.beautifulsoup4/lib:/storage/.kodi/addons/script.module.chardet/lib:/storage/.kodi/addons/script.module.simplejson/lib:/usr/lib/pulseaudio:/usr/lib32/pulseaudio
    Code
    OC2-LE7:~ # cd xunlei
    OC2-LE7:~/xunlei # chmod 777 * -R
    OC2-LE7:~/xunlei # ls -lh
    total 4443
    -rwxrwxrwx    1 root     root       24.3K Nov 12 22:19 ETMDaemon
    -rwxrwxrwx    1 root     root        4.2M Nov 12 22:19 EmbedThunderManager
    -rwxrwxrwx    1 root     root      128.2K Nov 12 22:19 portal
    -rwxrwxrwx    1 root     root       23.5K Nov 12 22:19 vod_httpserver
    OC2-LE7:~/xunlei # ./portal
    -sh: ./portal: not found
    Code
    OC2-LE7:~/xunlei # ldd ./portal
    $       not a dynamic executable

  • these are executables but does not launch:

    I can confirm the same issue with retroarch apparently not being an executable. Running it normally (./retroarch) results in a file not found. Running retroarch.start results in the script bombing out because retroarch could not be found. It also has some problem with not being able to create a temp file, but after editing the script to hardcode that filename and creating the file and giving it the appropriate commissions the script did not get much further. retroarch.sh says it is running but theres no process for it and nothing happens.

    Just in case the specific version of retroarch had an issue I installed a previous version of your package that definitely worked for me earlier and no dice. Running ldd on retroarch resulted in the same "not a dynamic executable" error as above.

    Edited once, last by saunderez (November 12, 2016 at 3:17 PM).

  • Code
    OC2-LE7:~/xunlei # ./portal
    -sh: ./portal: not found

    First my 2 cents: since this package is meant for RPi, it is hard to tell if it will ever work on the S905. My first question would be: does it run on an S805? The 32 bit libraries we are adding to LibrELEC are from S805 builds and those are somewhat specific.

    Now some tips to further troubleshoot your problem:

    • When you receive a "not found" error - at least in my experience - it usually relates to the dynamic linker or interpreter library not being available. Such interpreter is a program that actually loads the executable along with all its dynamically linked libraries. (The kernel just loads the interpreter, not the executable.)
    • Since we are using the S805 builds, such interpreter library is /lib/ld-linux-armhf.so.3

    My suspicious is that your binaries from RPi use a different interpreter library. Since ldd is not working for you (and it makes sense since it is an ldd for AARCH64 and those are ARM 32 bit binaries), try to look for a "/lib/..." in the binary file itself by running:

    Code
    grep "/lib/" ./portal

    and check what it returns. One of the libs the grep returns will be your interpreter library (usually starts with /lib/ld-linux...). Report that back here.

    Edited once, last by JoKeRzBoX (November 13, 2016 at 10:04 AM).

  • Although it is great that we have a lot of people interested on this MOD to run RetroArch, I want to make sure this thread does not move into the wrong direction and become a RetroArch support thread. So I have news that many of you will hopefully enjoy:

    For the folks interested in running RetroArch on S905(X) devices:

    • I have created a new addon which contains all the 32 bit arm libraries required to run the 32bit arm retroarch binary on S905(X). Such addon, combined with the latest Retroarch addon from here should give you a working Retroarch solution for S905(X) without the need of the MOD discussed on this thread. It is a cleaner solution much less intrusive to LE and should (hopefully - could not fully test it yet) work across all builds and S905(X) devices. Such solution is being discussed on this thread.


    I recommend you try such solution for RetroArch and we keep this thread more focused on supporting other 32 bit binaries.

    Also, I will be updating the first post later today to mention the same as well as update the list of available builds with the MOD (including new ones for the 7.9 latest alpha builds I am creating now).