LibreELEC self compiled

edited November 2019 in AML-S805X-AC

Update:

Since there are test images available on https://test.libreelec.tv/ , I won't provide any images myself any longer.
If you want to try these test images, please see the guide in the third post.

The instructions on compiling will stay in the next post, alternatively you could follow the official guide on https://wiki.libreelec.tv/compile , but use
PROJECT=Amlogic DEVICE=AMLGX ARCH=arm UBOOT_SYSTEM=box make image
and flash following the instructions in the third post.

Original Post:

removed
Tagged:
«1

Comments

  • edited September 2019

    Instruction on how to compile LibreELEC for LaFrite

    I'll assume you are on a standard Ubuntu 18.04 x86/x86_64 system.


    Install needed software

    sudo apt install gcc make git unzip wget xz-utils openjdk-8-jdk


    Get the code

    This clones the LibreELEC repo to your home directory.
    cd ~
    git clone https://github.com/LibreELEC/LibreELEC.tv.git
    cd ~/LibreELEC.tv


    Necessary modifications

    In scripts/uboot_helper lafrite isn't yet present. Run the following to add it or add the lines starting with a "+" (without the "+" itself) before "lepotato"
    cat <<EOT | git apply -
    diff --git a/scripts/uboot_helper b/scripts/uboot_helper
    index c3f6398a3e..69e7c8a3d7 100755
    --- a/scripts/uboot_helper
    +++ b/scripts/uboot_helper
    @@ -103,6 +103,10 @@ devices = \\
             'dtb': 'meson-gxl-s905x-p212.dtb',
             'config': 'p212_defconfig'
           },
    +      'lafrite': {
    +        'dtb': 'meson-gxl-s805x-libretech-ac.dtb',
    +        'config': 'libretech-ac_defconfig'
    +      },
           'lepotato': {
             'dtb': 'meson-gxl-s905x-libretech-cc.dtb',
             'config': 'libretech-cc_defconfig'
    EOT


    Compile

    PROJECT=Amlogic DEVICE=AMLGX ARCH=arm UBOOT_SYSTEM=lafrite make image

    You might have to type "y" once, to allow it to download additional software needed.
    This will take long, depending on how powerful your system is.

    Flash

    The files can be found in ~/LibreELEC.tv/target
    Flash either to USB or eMMC connected via USB after running
    ums 0 mmc 0
    in u-boot. I used Etcher.

  • edited November 2019

    Install test image

  • thor said:
    The image can be downloaded here:

    I'm planning to compile it regularly (maybe weekly or when I have time) and upload the .img.gz and .tar, as long as it's not officially supported.
    Hopefully updating via the usual mechanism (placing the .tar in the update directory) will work.
    Hello, I downloaded the image but can't flash it via ballena
  • thor said:
    Did you check the sha256?
    I am quite noob so probably it's my fault. Doesn't I just click the zip file as Image to balena etcher?
  • no, you need to download the img.gz (in the 2019-09-14 folder) and flash that.
  • thor said:
    no, you need to download the img.gz (in the 2019-09-14 folder) and flash that.
    Thank you very much I am flashing it right now...
  • If you download the latest firmware (v5), you can just press escape and then select eMMC USB Drive Mode and then flash the image that way using your favorite application. Not sure about u-boot since the board doesn't need u-boot as it is already on the SPI. Maybe an u-boot script file for launching the kernel if it isn't in the right location.
  • loverpi said:
    If you download the latest firmware (v5), you can just press escape and then select eMMC USB Drive Mode and then flash the image that way using your favorite application. Not sure about u-boot since the board doesn't need u-boot as it is already on the SPI. Maybe an u-boot script file for launching the kernel if it isn't in the right location.
    Good to know, but the "ums 0 mmc 0" command on v1 works fine, too. I'll test with the latest firmware, soon.
  • Yay they've merged some of the 805x code!
    What happens on start up of your image? I'm getting the boot text from uboot, then a yellow/orange band at the bottom that flashes up briefly then the screen goes blank...
  • edited September 2019
    Congratz mate, your job is perfect!! I've been using this for some hours and it seems ok but quite slow. I guess its the board's capability or the build I am using is too heavy. I will try with another more light build and I will update my post. Also I will try some add-ons standalone. 
  • edited September 2019
    davisonja said:
    Yay they've merged some of the 805x code!
    What happens on start up of your image? I'm getting the boot text from uboot, then a yellow/orange band at the bottom that flashes up briefly then the screen goes blank...
    On first boot it should show a few lines at the top after the orange flash. Thats when it resizes the partition. after a while it automatically reboots and after the next orange flash and a few seconds wait it should show the kodi logo.

    btw I tried compiling chewitts amlogic-master branch a few weeks ago, but it didn't finish booting then.
  • ASTOU said:
    Congratz mate, your job is perfect!! I've been using this for some hours and it seems ok but quite slow. I guess its the board's capability or the build I am using is too heavy. I will try with another more light build and I will update my post. Also I will try some add-ons standalone. 
    Are you using it from USB? I think that could be the reason. I tried disabling more during compilation, but somehow it doesn't recognize that (I think even libdvdcss is still enabled).
  • thor said:
    davisonja said:
    Yay they've merged some of the 805x code!
    What happens on start up of your image? I'm getting the boot text from uboot, then a yellow/orange band at the bottom that flashes up briefly then the screen goes blank...
    On first boot it should show a few lines at the top after the orange flash. Thats when it resizes the partition. after a while it automatically reboots and after the next orange flash and a few seconds wait it should show the kodi logo.

    btw I tried compiling chewitts amlogic-master branch a few weeks ago, but it didn't finish booting then.
    Same here, I was going to have another go when his PR had been merged, which it seems to have! Just going to try the one you uploaded.
  • Just downloading your version to try it! I was on armbian but this one looks pretty good for an alternate use of the board. Thanks for sharing!!!
  • Haven't tried video playback but looking FLAWLESS on a 4k TV @ 1080p 60Hz!!!!!! OMG! Excited for the future!
  • Installed docker and docker-compose on it at this time. Will try to run some (RAM constraints of 1GB :smile: ) containers on it. As for reliability, it has 12+ hours at this moment, running a Plex container installed with LinuxServer.io's LibreELEC add-on.
    I'm really excited by this!
  • I get the second partition resizing, then a reboot, then something comes up as I can ping it, but after a short time it reboots and always a black screen (apart from uboot text) :(
  • edited September 2019
    Hmm. Actually, it's a running copy of kodi, but just no display. The reboot cycle seems to have stopped (on a new flash drive). I've got my lafrite connected to an aging Sony Full HD LCD tv - anyone else having success on an older TV?
    Also had a thought, I'm using a 512MB model, what are other people using successfully? 
  • thor said:
    ASTOU said:
    Congratz mate, your job is perfect!! I've been using this for some hours and it seems ok but quite slow. I guess its the board's capability or the build I am using is too heavy. I will try with another more light build and I will update my post. Also I will try some add-ons standalone. 
    Are you using it from USB? I think that could be the reason. I tried disabling more during compilation, but somehow it doesn't recognize that (I think even libdvdcss is still enabled).
    Yes I am using a USB 3.0 but its quite bad. It's low quality and aluminum body makes it overheating, so probably that's my problem. In the next days I will have a better one to try. Till now with a light build it runs OK considering all above. 
  • davisonja said:
    Hmm. Actually, it's a running copy of kodi, but just no display. The reboot cycle seems to have stopped (on a new flash drive). I've got my lafrite connected to an aging Sony Full HD LCD tv - anyone else having success on an older TV?
    Also had a thought, I'm using a 512MB model, what are other people using successfully? 
    I have the 1GB version. Which firmware version are you on?
  • ASTOU said:
    Yes I am using a USB 3.0 but its quite bad. It's low quality and aluminum body makes it overheating, so probably that's my problem. In the next days I will have a better one to try. Till now with a light build it runs OK considering all above. 
    Since the board only has USB 2.0, it probably won't help much to use a faster flash drive. What exactly did you change for your light build?
  • thor said:
    davisonja said:
    Hmm. Actually, it's a running copy of kodi, but just no display. The reboot cycle seems to have stopped (on a new flash drive). I've got my lafrite connected to an aging Sony Full HD LCD tv - anyone else having success on an older TV?
    Also had a thought, I'm using a 512MB model, what are other people using successfully? 
    I have the 1GB version. Which firmware version are you on?
    I haven't updated firmware, so whatever it shipped with. I need to acquire an A-A USB cable.
    The video out certainly works, I can use other images (like ubuntu) which get proper video display from within linux.
    From ssh'ing into libreelec I can see no  clear indication that RAM size is the issue, and kodi.log isn't giving me any failure messages to follow up - I expected 512 to be tight for modern libreelec and possibly require a custom build, but this issue where it works without output is weird.
    I've rolled back to the same commit as your image quotes to see if I can build the same working image, which will hopefully allow some debugging to be turned on for the build.

  • thor said:
    ASTOU said:
    Yes I am using a USB 3.0 but its quite bad. It's low quality and aluminum body makes it overheating, so probably that's my problem. In the next days I will have a better one to try. Till now with a light build it runs OK considering all above. 
    Since the board only has USB 2.0, it probably won't help much to use a faster flash drive. What exactly did you change for your light build?
    There are some pre made custom build from a Greek team that I use. It's called GRecoTM in Facebook, and they have a simple light build with only a few add-ons and a lite skin. The boards runs perfect with some modifications and after set it on 1366*768.
  • thor said:
    The image can be downloaded here:

    I'm planning to compile it regularly (maybe weekly or when I have time) and upload the .img.gz and .tar, as long as it's not officially supported.
    Hopefully updating via the usual mechanism (placing the .tar in the update directory) will work.
    Did you use ubuntu to compile? What release? I've built an image using your instructions, on the same commit as your file name quotes (which is a couple of commits behind Head now) and getting different results with my build 😢
  • edited September 2019
    davisonja said:
    Did you use ubuntu to compile? What release? I've built an image using your instructions, on the same commit as your file name quotes (which is a couple of commits behind Head now) and getting different results with my build 😢
    Actually, no. I built that image on Archlinux, where I had to install some more packages and downgrade one, because there was a bug in the newest release (can't remember which one atm). But I did compile it before on Ubuntu and assumed it would give pretty much the same result.

    btw: what do you mean by different result? A different sha256 would be completely normal, even if every package and the build system and everything would be identical. If I did compile it on the same system now I'd get a different checksum, too. This is not a so called "reproducible build".
  • Update.
    This image is 100% stable after full use these days. I have only kept 1 addon for movies, 1 addon for sports, YouTube and twitch add-ons, and Destiny addon as a back up in case something from the above does not work. It runs smooth as a charm, is perfect!! Nice job mate! 
  • thor said:
    davisonja said:
    Did you use ubuntu to compile? What release? I've built an image using your instructions, on the same commit as your file name quotes (which is a couple of commits behind Head now) and getting different results with my build 😢
    Actually, no. I built that image on Archlinux, where I had to install some more packages and downgrade one, because there was a bug in the newest release (can't remember which one atm). But I did compile it before on Ubuntu and assumed it would give pretty much the same result.

    btw: what do you mean by different result? A different sha256 would be completely normal, even if every package and the build system and everything would be identical. If I did compile it on the same system now I'd get a different checksum, too. This is not a so called "reproducible build".
    There's two parts to my 'different result', the primary one being that the image I build seems to do the first reboot which only sometimes resizes the second partition on the USB drive, but then crashes. After the first reboot it responds to ping for a short time, but then stops, and subsequent boots don't have any ping response.
    Using your image it reliabily seems to boot, resize, reboot, then bring kodi up (can ping, get to the web interface, and if I edit the `extlinux.conf` file I can enable and then use SSH to connect - all while still having a blank screen.

    Secondly, the image size is also different for my build, though I suspect, like the sha256 it's quite possible for them not to match and still behave the same when used, so I don't really consider that a fault.

    I was thinking a potential point of difference would be/is package versions, as obviously the libreelec code is identical when I'm using the same commit.

    I haven't dug out my serial cable to see if there's anything useful sent out the serial port, which is probably the next step.
Sign In or Register to comment.