[9.0.0] LibreELEC builds for MX2/G18

  • Thanks, yes I have tried multiple times, it just will not work with kodi 18 anymore :(

    EDIT: Finally fixed, it was the the same issue as Cannot Install/Update Addons afterall

    Ah I see, I got around not being able to use official repo. by downloading the add-ons and dependencies manually. I also found some of the official kodi repository had broken packages (dated around 2021), so I've been very cautious about letting updates happen anyway. (probably also related to certs.)

  • Excuse me for being a bit crazy even trying the stuff I have. An issue I have with this build of 9.0.2 and it seems other users have elsewhere in similar versions of amlogic libreelec. The amcodec hardware acceleration doesn't like certain streams and will generally lock-up the system on seek or stop (BBC iPlayer addon being an example), so I've been trying to figure out how to fix it.

    I took a probably unusual approach of post patching the system by modifying SYSTEM archive in the tar update with an (I assumed) newer version of libamcodec.so from the wetek play 9.2.8 builds (uses the same SoC), but turns out there hasn't been any fix or change in that module and any difference may be just down to the compilation.

    So I've hunted through the source to see what patching had been applied to fix this issue and it's really not clear, nearest I've gotten is a change to the modify display rate in tvout, but I have no idea if this is the fix or not.

    If any one knows what the exact fix is, I'd really like to know and will likely attempt to append a .patch file to the projects source here and re-roll an updated image.


    if anyone is interested, un/repacking the SYSTEM can be done with (tested with lubuntu 18.04);

    <unpack SYSTEM file from update tar to home/Downloads>

    sudo apt-get install squashfs-tools

    cd ~/Downloads

    unsquashfs -d ./SYSTEM_modified -f SYSTEM

    <modify contents of SYSTEM_modified folder with changes, .so files exist in /usr/lib>

    mksquashfs ./SYSTEM_modified SYSTEM -noappend -comp gzip

    md5sum ./SYSTEM > ./SYSTEM.md5

    <new SYSTEM files resides in home/Downloads, edit SYSTEM.md5 with correct path /target and repack into update tar>

  • Hello Everyone,

    At this time I need some help.

    Leia 18.1 on Matricom device.

    All Add-ons failed to install and/or update.

    Tried to delete the .db file, also tried a soft reset and hard reset as well, no luck. :-((

    LOG is here

    Any kind of help, advice to sort this out is much more than appreciated.

    Cheers,

    pepev82

  • pls help

    image of screen

    Try to write the image to another SD card, because either the file system or the card may have been damaged.

    Leia 18.1 on Matricom device.

    All Add-ons failed to install and/or update.

    I think this is what causes the error:

    HiassofT
    October 13, 2021 at 1:16 PM
  • Try to write the image to another SD card, because either the file system or the card may have been damaged.

    I think this is what causes the error:

    HiassofT
    October 13, 2021 at 1:16 PM

    Hi dtech,

    Thank you so much for your answer. Worked like a charm!
    Many thanks once again.

    Cheers

  • hi pls update for kodi 19 & 20 thanks

    Unfortunately this can't happen due to support for Meson 6 (G18) being dropped from LibreELEC after 9.2.8.

    Although I'm currently trying to build LibreELEC-AML 9.2.8 with the necessary tweaks to get it running and updating on the MX2 boxes. I've stumbled at the Mozilla stuff not building on 32-bit, so I've switched to 64-bit and may have a build to try in the new year (it's not a simple task, so fingers crossed). I'm really hoping it'll sort that hanging issue with Amlogic hardware decoding.

    Edited 2 times, last by qUE-ARM: Speeling and it gramma (December 29, 2022 at 6:24 PM).

  • Although I'm currently trying to build LibreELEC-AML 9.2.8 with the necessary tweaks to get it running and updating on the MX2 boxes. I've stumbled at the Mozilla stuff not building on 32-bit, so I've switched to 64-bit and may have a build to try in the new year (it's not a simple task, so fingers crossed). I'm really hoping it'll sort that hanging issue with Amlogic hardware decoding.

    If you think so, maybe I can help you with that.

  • If you think so, maybe I can help you with that.

    Hi dtech,

    I've got Libreelec-AML 9.2.8.7 to build and boot on the MX box, but I'm having an issue with the Realtek 8188ETV wireless.

    Libreelec doesn't allow me to enable the 'wireless active' option. I've SSH'd and lsusb, the device is present so I assume the drivers are working.

    Various places have mentioned Realtek wireless support is a bit of an issue of contention for the libreelec team, so I'm expecting some pain getting this working.

    Unfortunately, this is my first outing in compiling the linux kernel so I'm really a n00b when it comes to this. Is there any recommendations in tackling this issue?

    I can post dmesg dump if that would be any help.

    - qUE

  • I've got Libreelec-AML 9.2.8.7 to build and boot on the MX box, but I'm having an issue with the Realtek 8188ETV wireless.

    Libreelec doesn't allow me to enable the 'wireless active' option. I've SSH'd and lsusb, the device is present so I assume the drivers are working.

    Various places have mentioned Realtek wireless support is a bit of an issue of contention for the libreelec team, so I'm expecting some pain getting this working.

    Unfortunately, this is my first outing in compiling the linux kernel so I'm really a n00b when it comes to this. Is there any recommendations in tackling this issue?

    I can post dmesg dump if that would be any help.

    The Realtek 8188* is a general USB chip, I also have an external one (TP-Link TL-WN722 v2).

    I use an external module for this in my builds, instead of the integrated module of the kernel.

    First, you need to check if it is enabled in your kernel configuration, because if it is, it should be disabled:

    Code: linux.arm.conf
    # CONFIG_RTL8188EU is not set

    Next, add RTL8188EU-aml to the ADDITIONAL_DRIVERS variable in the options file in your project directory.

    If that doesn't help either, then please send me a log file: journalctl | paste

  • The Realtek 8188* is a general USB chip, I also have an external one (TP-Link TL-WN722 v2).

    I use an external module for this in my builds, instead of the integrated module of the kernel.

    First, you need to check if it is enabled in your kernel configuration, because if it is, it should be disabled:

    Code: linux.arm.conf
    # CONFIG_RTL8188EU is not set

    Next, add RTL8188EU-aml to the ADDITIONAL_DRIVERS variable in the options file in your project directory.

    If that doesn't help either, then please send me a log file: journalctl | paste

    'is not set' was already in place, added ADDITIONAL_DRIVERS and rebuilt, but no change. Here is the journal;

    http://ix.io/4lVq

    Not sure if the NULL dereference at 'kernel: wifi_setup_dt' is causing an issue?

  • As I see it, the problem here will be different. First, loading dhd is unnecessary if your device has Realtek wifi. The error also applies to this, the 8188eu module seems to be loaded, but cfg80211 is required for the wifi to work, but it crashes due to the incorrect dhd-config. The dhd is only required for Broadcom-based chips.

    Question #1: Did you use my Wetek Play project directory as a base? Because then you have to delete this file:

    LibreELEC-AML/projects/<YOURPROJECTNAME>/filesystem/usr/lib/modules-load.d/wireless.conf

    This will force load dhd even if it is not needed. And that might be the problem for you.

    Question #2: Which dtd file did you use in your project?

    Code: options
      # Kernel extra targets to build
        KERNEL_UBOOT_EXTRA_TARGET="<filename>.dtd"
  • As I see it, the problem here will be different. First, loading dhd is unnecessary if your device has Realtek wifi. The error also applies to this, the 8188eu module seems to be loaded, but cfg80211 is required for the wifi to work, but it crashes due to the incorrect dhd-config. The dhd is only required for Broadcom-based chips.

    Question #1: Did you use my Wetek Play project directory as a base? Because then you have to delete this file:

    LibreELEC-AML/projects/<YOURPROJECTNAME>/filesystem/usr/lib/modules-load.d/wireless.conf

    This will force load dhd even if it is not needed. And that might be the problem for you.

    Question #2: Which dtd file did you use in your project?

    Code: options
      # Kernel extra targets to build
        KERNEL_UBOOT_EXTRA_TARGET="<filename>.dtd"

    Deleting wireless.conf has worked afaics, thankyou dtech!

    Will try and collate everything in the next post :)

  • This is intended for the Matricom G-Box MX/MX2 (HD18 board) boxes, trying this on other AML8276-MX systems YMMV.

    Clean factory restore

    Go to http://web.archive.org/web/2016010122…/i/MX2_Firmware and follow instructions for installing firmware 1.2

    This should clean up the u-boot environment incase it's not up to date.

    Install LibreELEC 7.95

    Download LibreELEC 7.95 found here in the first post, again extract to your SD and 'toothpick' AV port boot to install. Enable SSH.

    Patch U-Boot environment

    Download attachment aml_autoscript, extract to your SD and 'toothpick' AV port boot. Once the boot process arrives at the recovery 'reboot system now' screen just either select that option or power cycle the box.

    This is required to fix a bug in the U-Boot NAND booting to cope with up to 8MB Kernel binaries.

    Correct data partition disk label and copy update

    Download the LibreELEC 9.2.8 image archive found <updated> and copy to your SD, then put the SD in the MX set top box.

    (see post #344 for updated archive link; RE: [9.0.0] LibreELEC builds for MX2/G18)

    SSH into your MX set top box and use the commands;

    tune2fs -L LIBREELEC_DISK /dev/data

    cd /media/mmcblk*

    cp *.tar /storage/.update

    reboot

    Build LibreELEC-AML instructions

    This image of LibreELEC was built on a Wyse z90 with lubuntu 18.04.5 (64-bit). It takes around half a day to build and I think is a little bit quicker if you build on a drive other than the lubuntu system drive.

    Download the LibreELEC-AML_9.2.8_projects-Amlogic_MX2-20230123.tar.gz archive <updated> to your preferred EXT formatted build location.

    (see post #344 for updated archive link; RE: [9.0.0] LibreELEC builds for MX2/G18)

    In the terminal -

    Setup the build environment with the following commands;

    sudo apt-get update

    sudo apt-get install build-essential git

    sudo apt-get install gcc-multilib

    cd /media/<your preferred EXT formatted build location>

    git clone https://github.com/dtechsrv/LibreELEC-AML libreelec-AML

    cd libreelec-AML

    tar -xvf ../LibreELEC-AML_9.2.8_projects-Amlogic_MX2-20230123.tar.gz

    PROJECT=Amlogic_MX2 ARCH=arm make amlpkg -j2

    Ignore errors about the amlpkg, the update archive is in the target folder as a tar archive.


    Thanks to the LibreELEC team, Codesnake, KOPRajs, dtech and of course anyone else connected with this project I've failed to mention.

    - qUE

  • LibreELEC 9.2.8 didn't seem to fix the issue with certain streams crashing the Matricom MX set top box, so I decided to have a go at least finding a workaround and here it is.

    Extract this patch into the related Amlogic AM8726MX projects sub folder, i.e. projects/Amlogic_MX2.

    Clean the kodi folder from the build, i.e. PROJECT=Amlogic_MX2 ARCH=arm scripts/clean kodi

    Rebuild, i.e. PROJECT=Amlogic_MX2 ARCH=arm make amlpkg -j2

    This patch basically blocks h264 codec streams being processed by the amlogic hardware acceleration and causes kodi to fallback to software decoding. So expect HD content to struggle, but should be what's needed (for now) for things like BBC iPlayer.

    qUE