[UNOFFICIAL][Le12][RK3228/RK3229][box]Libreelec builds

  • Hi,

    thanks to the experience gained with my builds of libreelec 9.2.x and the work of the community (rockchip and more), I'm sharing my unofficial build of libreelec for boxes with soc rockchip 322x.

    ** BIG FAT WARNING **
    ** I won't waste too much time on the subject of pirate streaming. Know that it's not tolerated by me. **
    ** I will try to help with legal addons (which I don't develop directly anyway). But if you have problems **
    ** with other kinds of addons, nothing personal, I will ignore you. **

    Libreelec 12

    FEATURES
    - Kodi Omega 21.1
    - mainline kernel 6.6.46
    - mainline opensource GPU driver
    - legacy u-boot
    - boot from SD
    - ir receiver (it works, but if your remote is not recognized, follow this guide https://wiki.libreelec.tv/configuration/ir-remotes and share results)
    - support for wifi chip SSV6051p, ESP8089, AP6255, and others if supported by mainline kernel.
    - hardware accelerated video decoding (mpeg2/h264/hvec/vp9). only FullHD tested because I don't own a 4k tv.
    - analog audio
    - DDR3 frequency scaling

    DOWNLOADS
    - builds: https://ilmich.libreelec.tv/libreelec-12/
    - source: https://github.com/rockchip-with-…le12-rk322x-wip

    INSTALLATION
    - for boot from SD see https://wiki.libreelec.tv/installation/create-media

    MANUAL UPDATE

    WARNING: The upgrade from libreelec 11 is tested, but a backup is recommended and in case of problems a clean install is suggested.


    Copy (via ssh,samba, etc etc) the desired build into the folder
    Code

    Code
    /storage/.update

    and reboot the device.

    INITIAL SETUP
    To allow booting in most cases, the image uses a generic device tree. This device tree doesn't have support for ddr3 ram, doesn't turn on any LEDs, etc etc.
    However, it's possible to change the device tree by choosing from the supported devices list with rk322x-dtb-switch.sh command.

    Code
    rkelec:~ # rk322x-dtb-switch.sh
    usage: /usr/bin/rk322x-dtb-switch.sh [list|switch|help]
    
    
    show                      show current device tree
    list                      show available device trees
    switch [device tree]      switch to a device tree
    help                      show this help

    sample session

    Code
    rkelec:~ # rk322x-dtb-switch.sh switch rk3229-box-v88mars
    Device tree rk3229-box-v88mars founded
    Are you sure(y/n)?y
    Mounting flash rw
    Switching dtb
    Mounting flash ro
    Switching is ok, now you need to reboot!!

    SUPPORTED DEVICES

    DeviceDtbWifiBoardFreq DDR3Cpu ClockGpu Clock
    genericrk322x-boxssv6051p and others N/A1,0 Ghz400 Mhz
    V88marsrk322x-box-v88marsssv6051p and others N/A1,4 Ghz400 Mhz
    V884krk322x-box-v884kssv6051p and others 666 Mhz1,2 Ghz400 Mhz
    Onetv Literk322x-box-onetv-lite 666 Mhz1,2 Ghz400 Mhz
    MXQ 4k Prork322x-box-mxq4kprossv6051p and others 666 Mhz1,2 Ghz400 Mhz
    MXQ 4k Pro (r329q varian)rk322x-box-mxq4kpro_r329qssv6051p and others 666 Mhz1,2 Ghz400 Mhz
    MXQ 4krk322x-box-mxq4kssv6051 and others 666 Mhz1,2 ghz400 Mhz
    MXQ 4k (R29 variant)rk322x-box-mxq4k_r29ssv6051 and others 666 Mhz1,2 Ghz400 Mhz
    T95drk322x-box-t95dAP6255 400 Mhz1,0 Ghz400 Mhz

    KNOWN ISSUES
    - some strange wifi chip
    - some strange USB Wi-Fi chip (I can add it if you help me)
    - NAND (this is the hard part and the only legacy piece that remains)

    SUGGESTIONS
    - without your logs, I can't try to fix anything :)

    CHANGELOG
    2024/09/14: Initial release

    THANKS TO
    knaerzche , jock2, fabiobassa, oneillb, Habitual6824, ochentay4 and the libreelec community.

    DONATE
    If you like this project help:
    - by first donating to Libreelec main project https://opencollective.com/libreelec/donate
    - and secondly by helping me to buy/repair rk322x hardware https://www.paypal.com/paypalme/ilmich6502 or https://revolut.me/ilmich

  • Go to Best Answer
  • ilmich
    Thanks for continuing to update this box, great job! I've been testing and these are the things I saw:
    1) It plays some videos but it freezes every few seconds, I tried to make the cache bigger but it didn't work.
    2) Some videos don't play and I've attached a picture of the screen and logs
    3) I couldn't find the AC3 and EAC3 passthrough option that was previously in AUDIO. I saw it in the player but it didn't work, I couldn't get 5.1 sound like I had in LE11.

    I hope it helps to keep improving. Greetings and thank you very much!

    ]

    log-2024-09-16-20.52.15.zip

  • Hi, I'm having trouble installing the ROM and now i want to install it onto the box instead of using an sd card, i tried using sd card i mounted the .img.gz onto the sdcard using the recommended way it seemed the box's sd card slot doesnt work i tried using flash drive before booting the device i hold the toothpick on the reset button and then booted it but it only formatted the box and gave an error "unknow volume /frp" and booted back to stock rom. now i want to install it onto the rom but i cant find a proper guide for this.

  • hi spigui

    Thanks for continuing to update this box, great job!

    thank you very much.

    1) It plays some videos but it freezes every few seconds, I tried to make the cache bigger but it didn't work.
    2) Some videos don't play and I've attached a picture of the screen and logs

    from the log you sent, I saw there are errors with your multimedia UPNP server (ums?). I used minidlna for a while but never had any problems. I'll try to install it and do some testing even if it could be a kodi bug.

    3) I couldn't find the AC3 and EAC3 passthrough option that was previously in AUDIO. I saw it in the player but it didn't work, I couldn't get 5.1 sound like I had in LE11.

    I know.. the porting of libreelec 11 is not completed yet.

    Cheers
    Michele

  • hi hamafever,

    please I need to know

    - model of your box
    - version of the android operating system
    - possibly a photo of the motherboard
    - are you sure it's an rk3228 box? my builds support only booting from an SD card and maybe only some particular models have problems

    cheers
    Michele

  • Hi hamafever , sorry for the late reply.

    Your board is one that I know has startup problems. Please try with my previous libreelec 11 build https://ilmich.libreelec.tv/libreelec-11/ and let me know.

    In any case it would be useful

    - if you can produce a boot log via serial connection (I see from the photos that you have a cable connected so perhaps you already have a uart available)

    - the exact version of your android firmware (even better if you have a download link)

    Cheers
    Michele

  • Hey, good to know you're still maintaining this box. I'm on your LE11 build and I think it's the best one yet. I tried out the latest LE12 build and I do notice some issues:

    • Wifi still doesn't show any networks to connect to. It's never worked on LE11 either. Mine has the RK3228A + ESP8089.
    • My Apple type-c to headphone adapter doesn't show up as an audio device in settings. I did check lsusb and it does show up there so not sure what's up. This also happens in LE11. Currently my workaround is to use a cheap optical/coax to 3.5mm converter, which works with the SPDIF output.
    • Framerate on the UI seems pretty low. It was on 720 GUI scaling already but it's unable to hit even 30fps when moving around the menus. In contrast, with LE11, my device occassionally hits 60fps and usually 15 to 20 at worst. This is already with the dtb setup, it was much worse without it as expected. I just use the same one: rk322x-box-mxq4kpro.
      • I do want to note the difference in SD card used. For LE12 i just used an old 16GB Sandisk Ultra w/ nothing but Class 10 certification. On the other hand, LE11 is on a 64GB Sandisk Extreme, notably with C10-V3-U3-A2 certifications. I did use the older card before for LE11 and on the upgrade found that boot and load times to be better but I'm not sure if menu performance should also be influenced by type of sd card.
      • Is emmc install no longer a thing? I have LE10 on my emmc so far but do you think we should just do something like this instead: [HOWTO] Boot from SD card, use internal memory for data - where we move all data to emmc but still need the sd card for boot.

    I haven't tried any addons yet. But surprisingly the video playback seems fine? I only tested a couple Hi10p and H265 10bit 1080p videos. Same as LE11, it still struggles with rendering *.ass subtitles w/ complex animations, but maybe that's just how it is since the SoC isn't strong enough.

    Again, props for keeping this box alive! For now it's LE11 for me, but I'm curious how far you can push it with this version.

    Log file: link 

  • Hey, good to know you're still maintaining this box.

    thank you for using my builds to save old hardware from oblivion :)

    Wifi still doesn't show any networks to connect to. It's never worked on LE11 either. Mine has the RK3228A + ESP8089.

    I saw that the driver loaded correctly. try disabling and re-enabling networking from the libreelec configuration tool. I don't think this is the problem but also make sure you have wifi networks in 2.4ghz mode because the chip does not support 5g and higher

    Framerate on the UI seems pretty low.

    I saw that you use 4k resolution. Comparing Kodi Nexus with Kodi Omega is difficult, but the processor may not be able to handle the UI smoothly at such high resolutions. For now, I advise you to try with a lower resolution, leaving the switch to the player that increases the resolution only when needed.

    At this moment I don't have a 4k device for tests, perhaps in the future I will be able to further optimize the performance even if a lot depends on the work of Kodi developers who care about less powerful devices.

    Is emmc install no longer a thing?

    your device has an internal emmc so should works, but I only recommend it to those who know what they are doing.
    I prefer boot from an SD card because I can decide the capacity and in case of problems I simply replace it (which you can't do easily with internal memory)

  • the processor may not be able to handle the UI smoothly at such high resolutions

    ARM SoC devices need to use 1080p desktop/GUI resolution. You can use 4K for playback as this is hardware accelerated, but the CPUs are nearly all too weak for 4K resolutions.

  • My Apple type-c to headphone adapter doesn't show up as an audio device in settings. I did check lsusb and it does show up there so not sure what's up. This also happens in LE11. Currently my workaround is to use a cheap optical/coax to 3.5mm converter, which works with the SPDIF output.

    After some research, I read that the device actually activates when you connect a device via 3.5mm jack. Can you please try? In the meantime, I'm trying to understand if some drivers are missing.

  • After some research, I read that the device actually activates when you connect a device via 3.5mm jack. Can you please try? In the meantime, I'm trying to understand if some drivers are missing.

    can confirm this, as it happened to me using a ugreen usb to 3.5 dac. if nothing is connected, device is invisible.

  • Just got one of these cheapo boards (branded as x96mini), and you may have saved it from going straight to landfill.
    The stock Android is terrible, but LibreELEC seems to run pretty well on it, so thanks a lot!

    Ethernet and Wi-Fi doesn't work, although ethernet doesn't work on stock too (ip link reports no-carrier), so might be a hardware issue on mine.
    I've gotten around it with a USB ethernet adapter I had laying around.

    Some notes from my messing around:

    Sadly adb doesn't seem to work with either USB A-to-A (could be the cable idk) or over network, so to be able to poke around I installed TermOne Plus and used a reverse shell so I could test things from my laptop:

    On laptop:

    Code
    nc -l -p 2222 | tee -a shell.log

    On box:

    Code
    rm -f f;mknod f p; cat f | sh -i 2>&1 | busybox nc 192.168.1.8 2222 > f

    I also used nc to copy files of it, as TermOne didn't seem to be able to write do internal storage or the USB stick I had in it, even when it had the storage permission enabled. Nor was ftp/ssh etc available by default.

    Some files:
    dmesg_libreelec.log
    dmesg_stock.log
    dtb_from_image.txt
    dtb_from_proc.txt

    Ended up dumping DTB from both image and /proc as I wasn't sure if I did it correctly from the image, both attached should they be useful somehow.

    Plus a couple of pics of the board:

    IMG_8641.jpg

    IMG_8643.jpg

  • The stock Android is terrible, but LibreELEC seems to run pretty well on it, so thanks a lot!

    I'm happy, the work behind it was long and sometimes complicated.

    Ethernet and Wi-Fi doesn't work,

    I saw some errors related to missing firmware. Let's see what I can do.

    Ended up dumping DTB from both image and /proc as I wasn't sure if I did it correctly from the image, both attached should they be useful somehow.

    they are useful because I could add support to your box too.

  • I'm happy, the work behind it was long and sometimes complicated.

    I looked at the device trees in the code to see if it was something simple like the wrong GPIO pin to enable the wifi chip,
    and yeah saw there was a bunch of patches to get varies things to work, so yeah I can believe it took a lot of effort :)

    I saw some errors related to missing firmware. Let's see what I can do.

    This?

    Code
    [   16.194157] r8152-cfgselector 1-1: reset high-speed USB device number 2 using dwc2
    [   16.759131] r8152 1-1:1.0: Direct firmware load for rtl_nic/rtl8153b-2.fw failed with error -2
    [   16.759213] r8152 1-1:1.0: unable to load firmware patch rtl_nic/rtl8153b-2.fw (-2)

    That should be my USB ethernet adapter, which does work fine despite that message.
    Looking through the logs I can't find anything wifi related at all. From what I found here, this driver might be needed for this chip. Not familiar with how the libreelec builds work, but since it's out-of-tree should probably be added like this package for rtl8192fu?

    I'll give it a try tomorrow if I get the chance.

  • Hi Lochnair , try this test build where I compiled the driver you suggested (and added firmware for usb ethernet)

    https://ilmich.libreelec.tv/libreelec-12/test/

    Unfortunately we have to go by trial and error because I don't have your device.

    Thanks ilmich, the firmware you added looks like it made error go away.

    As for Wi-Fi, no such luck yet. I think the module didn't get included in the build somehow?

    Btw is the repository up-to-date? I wanted to poke around a bit myself, so I wouldn't have to take up more of your time than I have to, but ran into issues getting it to build:

    Code
    Exception: Invalid package reference: dependency optee-os in package u-boot::PKG_DEPENDS_TARGET is not valid
    Parallel build failure - see log for details. Time of failure: Sun Oct 27 16:20:43 UTC 2024
    make: *** [Makefile:10: image] Error 1

    If I remove the optee-os from the device options file, then it gets further, but fails with a patch seemingly being already applied:

    Code
    patching file arch/arm64/boot/dts/rockchip/rk3328.dtsi
    
    Reversed (or previously applied) patch detected!  Assume -R? [n] 
    
    Apply anyway? [n] 
    
    Skipping patch.
    
    1 out of 1 hunk ignored -- saving rejects to file arch/arm64/boot/dts/rockchip/rk3328.dtsi.rej