S805x build (lafrite)

  • This is a bit of a specific question, but figured I'd try asking.


    There has recently been support committed for the s805x chip, as used in the La Frite board. There have been people who had built out of master (with a slight tweak to `scripts/uboot_helper`) which successfully runs on the board.


    I've tried both their build, and my own, with various settings and I'm not getting any video out of the system at all, past the uboot loading - once libreelec takes over the screen goes blank. The install works otherwise ok - I can ssh in and use the web interface at 8080. The web interface offers the option of changing screen resolution, but only offers 1280x720, which isn't the only size offered by the connected display - as reported by edid-decode.


    So, my question: is there any additional things I can do to try and narrow down where it's going wrong for me? The only potential difference I've been able to isolate between my board and one known to work is that they have 1G RAM and I'm on 512M - but I wouldn't expect that to yield a lack of video.


    I've tried turning some debugging on, but it's not being recorded anywhere that's telling me anything - is it essential that I get access to the serial output to see some of that?



    J,

  • It might be an issue with the CMA value in device-tree being too high. I force it to 896MB to facilitate 4K playback but this fails gracefully to 256MB on devices with under 2GB RAM. However, unless it accidentally works with the 512MB version of LaFritte I have no plans to support it. We have the same position with numerous 512MB Allwinner boards. Our experience with them (and older Raspberry Pi devices) is that 512MB is no longer enough for reliable Kodi use and our resources are limited so "pick your battles" applies.

  • NB: I'm booting the 1GB LaFrite fine with Linux 5.6-rc6 so there's no issue with the dtb size. LibreComputer pay Baylibre to upstream everything so I doubt there's anything missing from the upstream kernel apart from audio card stuff (will be done for Linux 5.8 probably).

  • It might be an issue with the CMA value in device-tree being too high. I force it to 896MB to facilitate 4K playback but this fails gracefully to 256MB on devices with under 2GB RAM. However, unless it accidentally works with the 512MB version of LaFritte I have no plans to support it. We have the same position with numerous 512MB Allwinner boards. Our experience with them (and older Raspberry Pi devices) is that 512MB is no longer enough for reliable Kodi use and our resources are limited so "pick your battles" applies.

    Hi. I searched for this "CMA" value text string in your repo, file linux/meson-gxl-s805x-libretech-ac.dts at master · chewitt/linux · GitHub but nothing with exactly that name doesnt exist. Can you give me a bit more information where to put necessary changes to recompile Libreelec Master for this specific version 512 Mb/LaFrite. i want only play 1080p hevc/h.264 dvb channels on this board.

  • Ok , i will try delete this related patch and compile libreelec for myself and if ok i will post public link for people , but i don't know which repository and branch for lafrite 512 mb will be most stable: Libreelec official master or chewitt master or some other placed... ?



    Update... I will try this way. Correct me if something im missed:

    Code
    1. pacman -Syu gcc make git unzip wget xz
    2. git clone --depth=1 https://github.com/chewitt/LibreELEC.tv.git --branch amlogic-master
    3. cd ~/LibreELEC.tv
    4. rm packages/linux/patches/amlogic/amlogic-0081-HACK-set-meson-gx-cma-pool-to-896MB.patch
    5. PROJECT=Amlogic DEVICE=AMLGX ARCH=arm UBOOT_SYSTEM=lafrite BUILDER_NAME=stpf99 BUILDER_VERSION=1 make image
    6. PROJECT=Amlogic DEVICE=AMLGX ARCH=arm scripts/create_addon tvheadend42 pvr.hts oscam

    Edited 3 times, last by stpf99 ().

  • I have compile error with branch amlogic-master from chewitt , log included.


    sudo pacman -Syu pv pigz pastebinit gperf lzop lsdif patchutils perl-xml-parser perl-json autoconf aclocal automake autoconf-archive


    Edit:

    I found solution by downgrading texinfo package to 6.6.1 ver

    1

    wget texinfo-6.6-1-x86_64.pkg.tar.xz

    sudo pacman -U texinfo-6.6-1-x86_64.pkg.tar.xz

    2

    cd build.LibreELEC-AMLGX.arm-9.80-devel/build/sed-4.8/

    autoreconf

    3

    cd build.LibreELEC-AMLGX.arm-9.80-devel/build/gettext-0.20.1/gettext-tools/

    autoreconf

    aclocal
    autoconf
    autoheader
    automake --add-missing

    Files

    • 14.log

      (58.07 kB, downloaded 44 times, last: )

    Edited 5 times, last by stpf99 ().

  • I guess you're building on Arch? .. it might be easiest to build in a Docker container. Look in tools/docker in our build-system.

  • I flagged it to one of the kernel maintainers (Neil) who supports LibreComputer.

  • Question .. is the TV/monitor that you've connected the device to a 1080p or 4K screen?

  • Tv is SHARP AQUOS 32" 1080p,tested and works with LaFrite 512 on debian/ubuntu images 3.19 mali, 5.4 lima from github page LibreComputer GitHub - libre-computer-project/libretech-linux: Mainline Linux Fork for Libre Computer

    I also think KODI gui changes pushed some time ago to LibreElec code base for 4k may be also problem for better support on LaFrite /512MB...

    Maybe without this changes about CME value increased to better handle 4k format and KODI 4K gui changes LaFrite will be booting normal but i don't know where to clone most updated branch. On kickstarter campaign page device support have description to support 1080p output to tv and even 4k format proper decoding.

  • Neil is overdue on sending a patch that will disable 4K modes for S805X as they are not properly supported and fixing that on a device that is designed to be 1080p only is a super-low priority. That's unlikely to be the problem if you're using a 1080p panel.I don't think it has anything to do with CMA size as the 896MB allocation already fails gracefully to 256MB. Perhaps try building LE without any kernel patches (default kernel only), and if that works start to add back groups of patches (they are somewhat logically sorted and grouped) until something breaks to pin down the issue.

  • If I add "mem=512M" to kernel boot params on an S905 device Kodi faults with this error ^


    So unless there are improvements to RAM utilisation in the OS or specifically the video stack, Kodi cannot run on 512MB LaFrite devices. I've flagged it to a couple of the developers, but since we are refusing to support 512MB Allwinner devices as being "too small for sensible Kodi use" and the long-term message on RPi 512MB hardware is similar (we will drop support for RPi0/1 sometime soon) I wouldn't expect a surge of activity .. sorry.

  • The zram driver creates a compressed block device in ram. That block device can then be used for swap or general purpose ram disk. The two most popular uses for it are swap to extend the available amount of ram to processes and /tmp. The ram used for the block device is dynamically obtained and released up to it's predefined uncompressed maximum size. The way it extends the amount of available ram to a system is by using a portion of the ram as compressed swap. It can therefore hold more pages of memory in the compressed swap than the amount of actual memory used. Typically it compresses to a 3:1 ratio. So, 1G of swap uses only 333MB of ram on average. The compression ratio including memory used for disk overhead varies depending on the % maximum space used. I found it to vary from 1.5:1 for a 1.5G disk with only 5% space used, to over 3:1 when nearly full. It also is much faster at swapping pages than typical hard disk swap


    with proper zRAM configuration on this 512mb boards you can incrase amount available amount memory for consumption by system, for example if you declare 333mb as zRAM from 512MB overall you have (512-333) + (333x3) = 179 + 999 = 1178 mb to compsuption by system you can also enable zSWAP for SWAP


    for zRAM changes this README explains wat is needed libretech-linux/README at 6d100c1d7b6ffe40c4bfeab3c8b51bfd11c382d3 · libre-computer-project/libretech-linux · GitHub


    for zSWAP changes this commit explains wat is needed enable zswap, set compressor to lz4, set z3fold as allocator · libre-computer-project/[email protected] · GitHub

    Edited 2 times, last by stpf99 ().