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

  • First of all thank you very much!!! great work with this forgoten boxes

    I have just downloaded your last version and instaled it in a V88 Plus 4K TV

    I have tried different DTB and almost all seems to work very well, but i have decided to use the V88mars one with overclock because of the V88 label, and the led behaviour.

    My box has an RTL8723JCS WIFI chip, I´ve tried LibreElec 9.2 and wifi and bluetooth were working but the box was buggy and it tends to reboot so I think it must be a missing driver, so if you have a DTB I could test it would be great

    Now I´´ m going to install some addons and use it a bit at 1080 to see the stability but for now it looks like the best LibreElec I´´ ve ever tried

    I will let you know if the system is stable on heavy use.

    EDIT:

    After some test I have found

    - No audio output (at least not on HDMI)

    - I can only set the video resolution at 480p or 1024x768 (wich is 4:3), I think because of that my panasonic viera don't show any image

    - No wifi/bluetooth

    Edited 2 times, last by RuBeN16v (May 7, 2022 at 8:12 PM).

  • ilmich, jock2, fabiobassa

    I've been tweaking the CPU voltages, and I've a set which have transformed the r329q v3.0 board I have... from being so unstable that the setup wizard couldn't be completed, and crashing every few minutes. It's now up for several hours at a time ( I've not attempted to run for any longer, but I'll do a longer Kodi trial over the next few days, and another memtester run) ... It's amazing how 0.025V or 0.050V can make a massive difference!

    I've also been able to remove, one by one the, other regulator ramp / delay parameters, and I was able to maintain the stability. And kept DMC enabled too - It's disabled in the v88mars DTB and it wasn't being detected during boot and switched on, I'm not sure how the DDR2 / DDR3 sensing works... but I had to force it to be enabled.


    Over the next few days, I'll turn on the drivers I've blacklisted, and turn on the features which have been turned off (e.g samba, avahi etc.), I think this will be OK now.

    I've forked your LE project in Github, and I'll probably send a pull request in the next few days for you to consider.

    The changes are subtle, I've boosted the voltages at the slower CPU speeds, so there's a much more linear relationship now between frequency and voltage, and bumped the Kernel to Linux 5.10.113

    HzμV
    408000000975000 (+25000μV)
    6000000001025000 (+25000μV)
    8160000001075000 (+75000μV)
    10080000001125000 (+50000μV)
    12000000001175000 (unchanged)
    12960000001225000 (unchanged)
    13920000001275000 (unchanged)
    15000000001325000 (unchanged)

    I hope you decide to test / verify them on your board, and hopefully incorporate them into your build.

    Maybe jock2 and fabiobassa can try these settings on your similar boards.

    Thanks to everyone for all your help and ideas! I've learned a lot! :thumbup: :thumbup: :thumbup: :cool:

    Barry

  • Hi oneillb,

    in summary, I seem to have understood that by doing as suggested by jock2 (tweaking the voltages of the lower frequencies), your board has become much more stable.

    This is a great thing and I thank you for everything you have done. I will definitely do some tests, but since I don't have these problems I ask you to try the following settings

    HzμV
    408000000975000 (+25000μV)
    6000000001000000 (+25000μV)
    8160000001025000 (+25000μV)
    10080000001075000 (unchanged)

    Basically, since I changed the voltages to make the cpu less hot (the official ones make the cpu heat up excessively) I would like to try to maintain a linear increase.

    Let me known

    RuBeN16v as for the resolution, please explain better. Can't set gui or playback resolution ?!

    In any case, if the TV is old, I suggest to update the firmware to the latest version available. On an old TV of mine, for example, after updating the firmware, more refresh rates appeared.

    For other problems, try attaching some logs (kodi and dmesg) because the 8723cs driver is included and maybe there is some other problem. Or, in the worse case, your particular chip is not supported by any mainline driver

  • oneillb
    compliments Barry for such detailled work and for your goals

    Yours must be a very particular board that needs to be tweaked very much but as already ilmich answered, we shouldn't forgot about temperature and other factors of stability . I am still oriented in low response from vcc switches due poor design in ripple filtering

    BTW increasing voltage and thus conseguentially current , especially at low running speed where the cpu should " relax and take breath" could lead to an increasing soc TEMP and this is a factor to be carefully investigated .

    And also don't forget that we are asking so much from a box that now costs around or less than 20 dollars ;) 

    Great great job Barry !!

  • I now have a build and DTB that work really well on my r329q v3.0 board... which I've bult an .img.gz image from.

    I burned to SD and booting from SD everything is OK... I then burned my build to the NAND, and again everything is working fabulously.... left the box running overnight, no Kodi issues, nothing weird in dmesg and 12hours uptime, which is great.

    Only 1 small issue when booting from NAND..... Librelec 10.x does not seem to recognise the onboard MMC/SD card slot, or any SD card plugged into the onboard slot... It looks to be defined in the device tree, but there is no /dev/mmcblk0 device created when an sd card is inserted.

    The kernel detects it , and creates the necessary device and mounts the partitions when I boot from SD with the same image and DTB.

    Is this a u-boot thing rather than the linux kernel?



    I've taken on board your comments, and I'll try lowering the voltages from my baseline. I'll take 0.025V off every step, to see if things remain stable..

    Temperature is something I am aware of, the 1st thing I did when I was donated this box was to change the heatsink to one that's about 2x the size.. The temperature is generally in the 65-75 range... and occasionally will get up to 82.

    Thanks for all the advice! :thumbup: :thumbup: :thumbup:

    Barry

    Edited once, last by oneillb (May 8, 2022 at 1:42 PM).

  • temperature is an important thing ... in libreelec 9.2 my cpu reached absurd temperatures .. so I took a lot of patience to find the best settings.

    changing the heatsink shouldn't be necessary (and in fact I didn't do it, still getting the same results as you).

    let me know how it goes, creating an operating system that runs on multiple boards is my goal, but it's also a hard thing to do and i want to make sure i don't ruin the experience of others.

    thank you

  • Hi all,

    new build available with:

    - linux 5.10.115

    - mesa 21.0.2

    - fix for sdcard detection (thanks oneillb for report)

    - fix for uart baud rate(thanks oneillb)

    - improved voltages of cpu which should improve stability (thanks oneillb)

    - added v884k device

    cheers

    Michele

  • Just to highlight, that thanks to the new kernel and probably the changes made to the rcu algorithm

    kernel/git/stable/linux.git - Linux kernel stable tree

    the system has become much smoother even on boards with ddr2 :)

    Unfortunately the nand driver is slower than the sd reader, so the optimizations are less evident than on sd card installations.

    But I will try to improve it in the next few days.

    In any case, long life rk3229: D

  • Thank you very much ilmich

    I'm going to try your new build, and try to get some logs for your in case something isn't working properly

    And forgive me but with a 9 month baby it is difficult to have some free time "to play" jajajajaja

    EDIT:

    As spected I have the same problems

    - Max image resolution 1024x768 --> no image on my main viera TV and 4:3 image on my monitor as seen in pics

    - No audio

    - No wifi/bluetooth

    ix.io/3XQM

  • Hello. I'm new to the subject and I still have some doubts about installing firmware..
    What is the procedure for installing this firmware on NAND without PC?

    (I'm from Brazil and I'm using Google Translate.. sorry kk)

  • Thanks to ilmich for his hard work.

    This build of LibreElec 10.0 works amazingly well, but I have some issues:

    - HDMI resolutions are incorrect

    - No audio from HDMI

    I put two pics of the boxes: AFAIK they have eMMC (Samsung part, 8Gb), rk3228a & 533Mhz DDR3. On the board is written V3.1.

    They have South valley SSV6051 wifi (not really important).

    Actually, your build is the ONLY one that does not crash after one/two hours of video, too bad I do not have any audio, and I don't know where to look for a fix. HDMI driver loads fine, but it seems ALSA device is not detected. Here's what I read in dmesg:

    [ 2.108808] ALSA device list: 

    [ 2.108828] No soundcards found.

    I suspect that the previous RockChip 4.4 "legacy" Kernel was really buggy in the video hw accelerator part (rkmpp was hanging/spewing errors all the time) or maybe somethng else was wrong. Hard to say with these parts.

    Even the Armbian build was giving the same errors with rkmpp video hw stack, and kept switching to software decoding after 5/6 minutes of video play.

    This build works really well with an hardware SO low-spec. The original android 7.1 NEVER worked, hanged after half an hour. I bought 10 of those for €9, since they were marked "defective" (and for good reasons).


    The "overclock" m4kpro dtb file works pretty well, even after two/three hours of video play (lan/udp streaming of a full HD webcam via ffmpeg).

    Thanks again for giving some use to an hardware so limited.



  • Investigating further into the HDMI no-sound issued I've found that in an Armbian with 5.15.25-rk322x kernel from Jammy-current the following modules are loaded:

    dw_hdmi_i2s_audio

    dw_wdt

    snd

    snd_pcm

    snd_pcm_dmaengine

    snd_soc_core

    snd_soc_hdmi_codec

    snd_soc_rk3228

    snd_soc_rockchip_i2s

    snd_soc_rockchip_pcm

    snd_soc_rockchip_spdif

    snd_soc_simple_card

    snd_soc_simple_card_utils

    snd_soc_spdif_tx

    snd_timer

    soundcore

    And ALSA is handled by snd_soc_simple_card:

    !!Soundcards recognised by ALSA

    !!-----------------------------

    0 [analog ]: simple-card - analog

    analog

    1 [SPDIF ]: simple-card - SPDIF

    SPDIF

    2 [hdmisound ]: simple-card - hdmi-sound

    hdmi-sound


    HDMI and Analog audio both work in this Armbian.


    On this LibreELEC (kernel 5.10.115) the loaded modules (for sound) are:

    snd_soc_spdif_tx

    snd_soc_rockchip_i2s

    snd_soc_rockchip_pcm

    snd_soc_rockchip_spdif

    I don't know if it makes any difference, at first glance it seems there are some parts completely missing, but I have no experience in building LibreELEC.

    Edited once, last by Wyk72 (May 24, 2022 at 11:51 PM).

  • Further investigation proved that modules are not the problem, initialization of the HDMI port is.

    If I connect the box with an adapter HDMI -> VGA, resolutions are correct (taken from the monitor EDID ?) : At this point, if I detach the VGA cable and connect another HDMI monitor, leaving the box on, I have sound.

    I guess the vga/hdmi dongle sends some signals that initialize the hdmi interface of the box correctly.

    If I boot with a normal HDMI cable I get wrong resolutions and no sound.

    Quirks - they're coming outta the goddamn walls.

    Edited once, last by Wyk72 (May 25, 2022 at 8:48 AM).

  • Finally nailed it.

    TL;DR version:

    - Connect the box with the VGA->HDMI adapter to the monitor (to the VGA port) and turn on the little sh*t

    - login with SSH to the box and run the following commands:

    mkdir -p /storage/.config/firmware/edid

    cat /sys/class/drm/card1-HDMI-A-1/edid > /storage/.config/firmware/edid/edid.bin

    mount -o rw,remount /dev/mmcblk2p1 /flash


    - edit the linux kernel line:

    nano /flash/extlinux/extlinux.conf

    - add this parameter to the kernel line:

    video=HDMI-A-1:e drm.edid_firmware=HDMI-A-1:edid/edid.bin

    reboot & connect the HDMI cable: resolutions are OK & audio works.


    EXPLANATION:

    For some reason the hdmi driver can't get the correct EDID from hdmi directly. Tried with lots of monitors, but no banana.

    Since I'm fortunate enough to have a cheap-ass HDMI->VGA adapter, I've noticed that it passes the correct EDID to the box.

    So I'm extracting the EDID and putting it into the LibreELEC config/overlay, and finally tell the kernel to load/force this EDID to the HDMI port it at boot.

    It's a sub-optimal/shitty fix but at least points to the problem, maybe the low-level rockchip/hdmi drivers have a bug or GOD KNOWS.