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


  • What would you say if I told you I want to switch to 32-bit userspace for next builds? ;)

    Do you mean entirely switch to 32 bit userspace or a hybrid solution where you also have the 32 bit userspace in additon to the native 64 bit (pretty much like what this MOD is doing)? Would switch entirely mean to also have a 32 bit kernel and all kernel modules compiled in 32 bit? Like just building with:

    Code
    PROJECT=S905 ARCH=arm make image


    instead of

    Code
    PROJECT=S905 ARCH=aarch64 make image


    ?

    Sounds interesting. And would make this MOD not necessary anymore (which would be great!). Based on the bit I read, 32 bit would also use slightly less memory. But I wonder if there is any significant advantage with the 64 bit that would be lost.

    Edited once, last by JoKeRzBoX (November 24, 2016 at 7:42 PM).

  • I mean switch entirely to 32-bit userspace. Kernel has to be kept 64-bit because some of prebuilt Amlogic modules are 64-bit only.

    The main advantages of switching to 32-bit are improved memory consumption and improved compatibility with 3rd party libraries - that means Spotify in LE and libwidevine in LE Krypton. :D

    I don't think there are any significant advantages for media player to run 64-bit code - especially that all boxes have less than 4GB RAM. And you can optimize 32-bit build for Cortex-A53 which means no significant speed drop - or even speed gain due to lower memory consumption.

    Thanks to LE developer Raybuntu I am already testing 32-bit Jarvis build. Here's the commit that helped: Adding ability to build aarch64 kernel with 32bit libs · Raybuntu/LibreELEC.tv@aa18baf · GitHub

    I think in a few days I will post source and binaries for 32-bit userspace builds. :)


  • I mean switch entirely to 32-bit userspace. Kernel has to be kept 64-bit because some of prebuilt Amlogic modules are 64-bit only.

    The main advantages of switching to 32-bit are improved memory consumption and improved compatibility with 3rd party libraries - that means Spotify in LE and libwidevine in LE Krypton. :D

    I don't think there are any significant advantages for media player to run 64-bit code - especially that all boxes have less than 4GB RAM. And you can optimize 32-bit build for Cortex-A53 which means no significant speed drop - or even speed gain due to lower memory consumption.

    Thanks to LE developer Raybuntu I am already testing 32-bit Jarvis build. Here's the commit that helped: Adding ability to build aarch64 kernel with 32bit libs · Raybuntu/LibreELEC.tv@aa18baf · GitHub

    I think in a few days I will post source and binaries for 32-bit userspace builds. :)

    Ok, I get it. I read his commit and understand the use of TARGET_KERNEL_ARCH for the S905 builds keeping TARGET_KERNEL_ARCH=arm64 and TARGET_ARCH=arm, with some linux drivers forcefully compiling using gcc-linaro-aarch64-elf. Sounds like a great plan! Please keep us posted as it progresses.

  • kszaq  JoKeRzBoX Great news, thanks a lot!

    I have kszaq's build from 11-09 and also I was added mod to have 32bit userspace, thus I have logical question how it was going to be updated?

    I have a lot settings and configurations which I was made ((( I don't want to loose them...

    Edited once, last by EasySly (November 24, 2016 at 8:29 PM).

  • Ok, I get it. I read his commit and understand the use of TARGET_KERNEL_ARCH for the S905 builds keeping TARGET_KERNEL_ARCH=arm64 and TARGET_ARCH=arm, with some linux drivers forcefully compiling using gcc-linaro-aarch64-elf. Sounds like a great plan! Please keep us posted as it progresses.

    Thanks JoKeRzBoX for the motivation ;). The idea is very good to use 32bit libs userspace. I've wanned this for a long time but I hate repacking. Using a precompiled toolchain is currently the fastest and cleanest way to implement this without changing the whole build system. To be honest I'm not entirely happy with this solution because we need gcc 4.9 toolchain for uboot but gcc 4.9 is pretty old and there were issues with one RTL driver to compile.

    I've made my own build for Odroid C2 ODROID Forum • View topic - LibreELEC Krypton/Leia/Agile 64bit kernel 32bit libs
    My main motivation was libwidevine and Amazon VOD.

  • Please try this modified version of the Xware addon here using LE with the MOD described on this thread and report back if the binaries run for you.

    Forgot to mention: once you install the addon, you need to copy the intepreter library to /storage/ld-lin.so by running this:

    Code
    cp -p /lib32/ld-linux-armhf.so.3 /storage/ld-lin.so

    haha, it works, thank you very very very much!


  • haha, it works, thank you very very very much!

    I am glad!
    The more recent versions of the MOD (available in the first post) have a fix where I added a symbolic link to make binaries like these to work. The trick is making the interpreter library available by creating this symbolic link

    Code
    /lib/ld-linux.so.3 -> /lib32/ld-linux-armhf.so.3

    So bottom line is: if you install the updated MOD from first post you should be able to use the original Xware addon you had.

    Edited once, last by JoKeRzBoX (November 25, 2016 at 3:09 PM).

  • I am glad!
    The more recent versions of the MOD (available in the first post) have a fix where I added a symbolic link to make binaries like these to work. The trick is making the interpreter library available by creating this symbolic link

    Code
    /lib/ld-linux.so.3 -> /lib32/ld-linux-armhf.so.3

    So bottom line is: if you install the updated MOD from first post you should be able to use the original Xware addon you had.

    the original Xware addon works fine, thanks!

  • Hi,
    is it possible to install widevine? i'very tried the script from millhouse but it doesn't work (detect aarch64 OS and stops) and I was not able to install it manually.

    btw: Thanks for this great Builds.

    cheers from Germany
    Rat666

  • Alright, totally new to this. Just downloaded the
    32 bit tar and install it later.

    Which addons to install and try to play then?

    Thank you very much, by the way.