Can't Boot Custom LibreELEC 8.2 + SX05RE Build for Amlogic

  • Hi there,

    I am currently attempting to compile the latest version of LibreELEC featuring Niabi's SX05RE additions but I am having a few issues.

    The first build completed successfully and I was able to boot LibreELEC 8.2 on my S805 TV box, but I noticed that the build had compiled without the retro gaming elements, so I went back to the source code and added the SX05RE package as a PKG_DEPENDS in "/http://LibreELEC.tv/projects/S805/packages/oem/package.mk" and started the build again, everything compiled again without issues but now I cannot boot it on my box.


    When I attempt to boot I get the splash screen then this:

    Code
    cp: write error: No space left on device
    ***Error in prepare_sysroot: mount common: Could  not mount /dev/SYSTEM ***
    ### Starting debugging shell... type exit to quit ###
    sh: can't access tty: job control turned off

    After typing 'exit' I get this:

    Code
    mount: mounting /flash on /sysroot/flash failed: No such file or directory
    mount: mounting /storage on /sysroot/storage failed: No such file or directory
    *** Error in prepare_sysroot: final check: Could not find systemd! ***
    ### Starting debugging shell... type exit to quit ###
    sh: can't access tty: job control turned off

    I compiled again excluding the SX05RE packages just to double check and again everything compiled and booted... Looking like it might possibly be an issue with the partition sizes I'm guessing? When I run the 'df' command it outputs this:

    Code
    filesystem               1024-blocks      Used      Available      Use%    Mounted on
    devtmpfs                 407896         407896              0      100%       /dev
    /dev/mmcblk0o1           524008         457704          66304       87%       /flash
    /dev/mmcblk0p2           27633             395          26583        1%       /stor

    Really going nuts here trying to find out what the cause of this is, Google is coming up with no answers so any help would be very much appreciated!

    Thanks very much!

  • Just guessing but try adding parameter noram to boot parameters.

    thanks for the reply.

    Where would I find the boot parameters within the source code?

    Sorry, I’m a bit of a noob still, everything I know about Linux has been self taught over the past 16-18 months.

  • No idea where amlogic things has this. Maybe some boot.ini in folder projects/.../bootloader.

    I went to try this but unfortunately the S805 project folder is one of few which doesn't have a 'bootloader' directory, so I'm still stuck.

    Thank you for the suggestion though

  • I think the file is projects/S805/linux/linux.arm.conf.

    And btw: this noram parameter disables copying SYSTEM file to ram and mounting from there - LibreELEC.tv/init at master · LibreELEC/LibreELEC.tv · GitHub

    Thanks, found it, not sure where to add noram though, do I just add it onto the end or do i replace something?

    The CONFIG_CMD part currently looks like this:

    Code
    CONFIG_CMDLINE="console=tty0 consoleblank=0 systemd.show_status=auto"
    # CONFIG_CMDLINE_FROM_BOOTLOADER is not set
    # CONFIG_CMDLINE_EXTEND is not set
    # CONFIG_CMDLINE_FORCE is not set

    Edited once, last by mxqproject (January 13, 2018 at 4:53 PM).

  • Just add it at the end of the line like

    Code
    CONFIG_CMDLINE="console=tty0 consoleblank=0 systemd.show_status=auto noram"

    Not sure if kernel will be automatically rebuild after the change that's why just in case clean linux package before making image.

    Code
    PROJECT=S805 ARCH=arm ./scripts/clean linux
    PROJECT=S805 ARCH=arm make image
  • Just add it at the end of the line like

    Code
    CONFIG_CMDLINE="console=tty0 consoleblank=0 systemd.show_status=auto noram"

    Not sure if kernel will be automatically rebuild after the change that's why just in case clean linux package before making image.

    Code
    PROJECT=S805 ARCH=arm ./scripts/clean linux
    PROJECT=S805 ARCH=arm make image

    Thank you. It cleaned and rebuilt automatically, it's just finished compiling again so going to try and boot it now. Will let you know how it goes, fingers crossed...

  • Thank you guys so much, everything has booted!

    Although it's booting in 720p and the display all looks messed up as a result, will have to look around and see where I can default it to 1080.

  • vpeter I think the issue is with how big tmpfs can be. With ~120MB LibreELEC SYSTEM image this is not an issue but when you add emulation stuff it's over 500MB - it looks like it's not allowed to make tmpfs that big, especially that Amlogic devices reserve ca. 200MB for video decoders and that leaves you with 800MB free RAM for everything else.

  • Hi again,

    I have a couple of other minor issues if anybody could spare some time to help please? Thanks.

    The issues are concerning Retroarch.

    The first issue is that after compiling the build it creates directories in /storage/ and work directories in /.tmp/* for cores, assets etc. Retroarch looks for all the cores and assets in /.tmp/* by default but there's nothing in those folders so there are no cores or assets present when using Retroarch, I can set the directories in Retroarch settings but obviously I want it to point to the correct folders without having to set everything up manually. So can anybody explain to me how I can stop the build from creating multiple directories for all of these assets and just have Retroarch look for them in the correct directories from the get-go?

    For example for cores, there are two directories created upon compiling:

    Code
    /storage/cores
    /storage/.tmp/cores-workdir

    None of which actually contain any cores as the correct directory for them is in /usr/lib/libretro/ so I've no idea what's going on or why it's doing this so I'm just wondering how I could resolve it.

    My second small issue is that when quitting Retroarch it boots into EmulationStation by default, there is an 'exit' patch in the RetroArch package directory where it makes RetroArch look for a line in the Retroarch config file that looks like this:

    Code
    sx05re_exit_to_kodi = True

    But this line doesn't exist in the Retroarch config, is there a way I can compile with this line added, or if possible, is there a way I can set Retroarch to quit to either Kodi or EmulationStation depending on where it was launched from?

    Thanks for any advice that can be offered. I hope I've explained my issues well enough for you to understand.

    Edited once, last by mxqproject (January 18, 2018 at 6:26 PM).