For those who may be interested in running regular 32 bit arm binaries on your S905 64 bit arm (AARCH64 architecture), you will be happy to hear the linux kernel compiled by kszaq already has all kernel config parameters to allow for that. The only thing missing were the actual 32 bit libraries so I created this simple modification to add those to your LibreELEC setup.
F.A.Q.
[Q] why would I want to run 32 bit binaries on my awesome 64 bit arm device?
[A] Unfortunately not all source packages out there have already been ported to AARCH64. And from the packages not available yet, you will find many gaming related ones which make use of some assembly coding for faster responses (I believe those will take a little longer to be ported). One example is RetroArch, which although I have been able to compile it for S905 AARCH64, it does not make use of assembly code and therefore is quite slow on some cores. But if you use the RetroArch compiled for S805 devices for instance, which is an armhf 32bit binary, you can enjoy faster emulation.
[Q] what is the trade-off of running both 64 and 32 bit programs on my box.
[A] Slight RAM usage increase. When you start a 32bit program it will need to load the required libraries (ld-linux-armhf at a very minimum plus others it needs) into memory for the first time. So by running 64 bits and 32 bits applications in parallel you will use a bit of more memory. However, in most situations this side effect will not be noticeable and not affect your box's performance. Also by just having the 32 bits libraries there you are not using more RAM, just when you start launching 32 bit apps.
[Q] for which boxes does this MOD work?
[A] All S905 boxes for which kszaq's LibreELEC package work. It is basically the same package as his with the additional 32 bit libraries.
[Q] how was this modification implemented
[A] It is a very simple mod. I unpacked LibreELEC-S905.aarch64-7.0.2.008-fix.zip, extracted the SYSTEM squashfs image file and mounted it so I could access the files. I then did the same for the S805 LibreELEC image from kszaq and then copied the 32 libraries from S805 version into equivalent /lib32 and /usr/lib32 new folders I created on the S905 SYSTEM partition file. Next I created a symbolic link of /lib/ld-linux-armhf.so.3 pointing to /lib32/ld-linux-armhf.so.3 and added a startup script into /etc/profile.d to add these two new library folders into LD_LIBRARY_PATH. In the end, I just repackaged the updated SYSTEM into a tar file for easy update on LibreELEC.
DOWNLOAD
I have only repackaged the latest LibreELEC for 905 version created by kszaq (v 7.0.2.008-fix). You can download the same package with added 32bit libraries from here:
LibreELEC-S905.aarch64-7.0.2.008-fix_lib32Added.tar
If new versions are released by kszaq, I will create correspondent packages with 32 bit libraries.
INSTALLATION
The installation is done as an update to a working LibreELEC installation. Steps to follow:
- If not done yet, you should first install the latest (as of now: LibreELEC-S905.aarch64-7.0.2.008-fix) version provided by kszaq as per instructions provided on his thread: LibreELEC
- download the tar file from the link provided and copy it into the /storage/.update folder of your box. You can do this via SSH or samba mapping as per official LibreELEC upgrade instructions from here. You should also download the appropriate device tree for your device (as per update instructions from kszaq`s thread), rename it to dtb.img and put it into .update folder as well. Then just reboot the box and it will start installing the mod.
THANKS
All credits for the S905 unofficial version of LibreELEC go to its maintainer: kszaq.
That's it. I hope you enjoy it and feel free to ask questions on this thread and I will try to answer as time permits.
Cheers!