Posts by ilmich

    hi bluetako

    on legacy rockchip kernel there is a module called rfkill that is responsible for the wifi wakeup and probe.

    So in your dtb leave the 'wlan-platdata' in the WiFi node (this autoload rfkill) and change the wifi chip type according to your chip (for example rtl8723as).

    If works let me known, because I'm not working anymore on this build, but I know that for some users LE 9.2 is better. So maybe I'll try to add also this device

    cheers

    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 11

    FEATURES
    - Kodi Nexus 20.4
    - mainline kernel 6.1.74
    - 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-11/
    - source: https://github.com/ilmich/LibreELEC.tv/tree/libreelec-11.0

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

    MANUAL UPDATE
    Copy (via ssh,samba, etc etc) the desired build into a 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 656 Mhz1,2 Ghz400 Mhz
    Onetv Literk322x-box-onetv-lite 656 Mhz1,2 Ghz400 Mhz
    MXQ 4k Prork322x-box-mxq4kprossv6051p and others 656 Mhz1,2 Ghz400 Mhz
    MXQ 4k Pro (r329q varian)rk322x-box-mxq4kpro_r329qssv6051p and others 656 Mhz1,2 Ghz400 Mhz
    MXQ 4krk322x-box-mxq4kssv6051 and others 656 Mhz1,2 ghz400 Mhz
    MXQ 4k (R29 variant)rk322x-box-mxq4k_r29ssv6051 and others 656 Mhz1,2 Ghz400 Mhz
    T95drk322x-box-t95dAP6255 528 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
    2023/03/15: Initial release (announcement)
    2023/03/22: updated to latest Libreelec commit, reverted https://github.com/xbmc/xbmc/pull/22919, estuary skin optimization (read here)
    2023/12/02: updated mesa 23.3.0, added bcm43342 wireless firmware, raise ddr3 clock, added simple irqbalancer, added 2 new mxq4k and mxq4kpro variant, various fixes and improvements
    2023/12/30: mesa 23.3.2 and kernel 6.1.68, preemptive kernel for better performance, various fixes and improvements, updated to latest libreelec source
    2024/02/18: mesa 23.3.6 and kernel 6.1.74, added RTL8812CU usb wifi driver (untested), various fixes and improvements, updated to latest libreelec source (11.0.6)

    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

    Looks like it's bcm4329.

    Code
    h96miniv8:/ # cat /sys/firmware/devicetree/base/dwmmc@30010000/wifi@1/compatible
    brcm,bcm4329-fmac

    EDIT: this seems to be wrong - it's coming straight from the dts. Is it possible to get the wifi card model from the sysfs, or do I have to open up the box?

    unfortunately yes, you have to open the box and read the label of the wifi chip, or if you have another working SO (like Android), retrieve the information in another way.

    ilovefly if you have a spare sd card why not :) but keep in mind that often info about ram can be faked on Android (on libreelec instead it's the real one)

    Hi everyone,

    I'm working on an unofficial libreelec 10 build for soc rockchip 322x (not released yet).

    It's a mix of the work done by knaerzche and some patches taken by armbian ( fabiobassa and jock2)

    It works pretty well but I only have one issue that I don't know if I have solved it well.

    Starting streams decoded via software (netflix addons and similar) after about 6 minutes there is a kodi crash due to an EGL_BAD_ALLOC error (log attached).

    I tried with different cma memory sizes (from 64MB to 512MB) and also lower resolutions, but the only solution was to disable the dmabuf management in the kernel.

    I suspect a memory leak but I'm not sure. Can anyone help me!?

    Cheers

    Michele

    hi chewitt

    to obtain this result we studied the flow a lot and understood that, for example, the driver used a custom implementation for the encryption protocols, when in reality the chip can do it at the hardware level/using the kernel routines.

    Therefore a lot of code incompatible with the mainline kernel has been removed and porting has become easier.

    But we worked on what we had (rockchip) so the custom code for amlogic was removed because we couldn't test it.

    The original driver has different behaviors for amlogic, and the error you receive is related to how the mac address is retrieved (rockchip read efuse .. amlogic seems to use static uboot parameter)

    Clearly having an amlogic box would be more useful, and I thank you for the proposal.

    But I do it in my little free time and I would not like to promise something that I cannot keep.

    Hi all,

    with fabiobassa and jock2 we are experimenting with the 6051p driver.

    The idea is to rewrite it, but in the meantime we have managed (by cleaning up the code a bit) to have a working version for the mainline kernels.

    It needs firmware (ssv6051-sw.bin) and a configuration file (ssv6051-wifi.cfg) under /lib/firmware in order to work properly.

    Don't tested yet with libreelec (my working on mainlining libreelec for rk322x is not yet usable), but with armbian seems to works well.

    My images contains some optimizations, and works better, but rk322x is an old soc.

    So what i meant is that to try to improve even more, i should try to overclock gpu and cpu.

    and I don't know if it makes sense to risk system stability for a gui.

    for the usb problem you could try to copy the dtb file of the image that works, and use it with my images.

    share kernel logs anyway. I'll try to take a look.

    thanks

    Hi shMatrix, to optimize even further, in the next build I've disabled some kernel options used by developers (aka debugfs).

    This can improve something, but I don't expect miracles.

    My suggestion is to try with another image considering that the one for mxq4kpro is for rk3228a. This soc in teory should have a lower clock for cpu and gpu (see first post for details).

    Often these boxes are sold as a model, but internally they may be different.

    For example mine is an mxq4k, but the board is identical to the one present in v88 mars

    So check in the first post if there is an image that is similar to the one you use(ddr3, same wifi chip, same internal memory etc etc), but suitable for rk3229 / rk3228b and download it from my gdrive.

    Hi ushilives, you can install on NAND in many ways:

    - use rkdevelop tool (hard)

    - dd from a working libreelec (medium)

    - use the great multitool from armbian port (easy)

    Installing on NAND should make the boot a bit faster, but the major issue is that in order to update the image you need to upload it manually via ssh (or burn again).

    This is because I didn't setup yet an update site for my builds.

    p.s.obviusly, if you install libreelec on NAND, you will lost the stock firmware of your box.