TV-box mania: I part. X88 PRO 10 (RK3318)

With the help of my Github sponsors (thank you!) I have the opportunity to test different hardware such as grabbers and other IoT devices like ESP8266 / ESP32 to check HyperHDR compatibility or design new software for them like HyperSerialESP8266/HyperSerialEsp32/HyperSPI etc.

With the latest review, I want to open a new chapter for new platforms that can be the hardware base for HyperHDR. The optimal solution like the Raspberry Pi 4 with USB3.0 is not available in the market or the price is about 4 times the initial price. Even the new Raspberry Pi Zero 2W that was recently tested is no longer available or costs over $ 30 in my country, so we have to look elsewhere. For example, testing popular and cheap tv-boxes by trying to install Linux OS on them. I only choose devices that support USB 3.0 as this is an important feature for most USB grabbers.

Disclaimer:

The current supply crisis has unfortunately also affected the tvbox market. The latest new models are almost always inferior to their predecessors or they are much pricier, so you'd better hurry up before the old models run out. H616 is inferior compare to old H6, rk3318 is inferior compare to rk3328, S905x4 is closed for opensource community contrary to the old S905x3.

The most common problem with tvboxes is that most of their Wi-Fi and Bluetooth devices are not supported by Linux Kernel. Even the same model may have a different Wi-Fi chip installed depending on the revision of the main-board (usually also combined with RAM and disk size version). So at worst, you may need to use an Ethernet connection only.

By installing Linux you risk voiding your device warranty and could brick it if something goes wrong. Most of these cheap devices are of low quality and can break without modification anyway.



1 Overview: X88 PRO 10

Today I'm reviewing the weakest and cheapest (under $30) device from my collection:
X88 PRO 10: rk3318 CPU, 2GB RAM and 16GB eMMC


x88-1x88-2
The unit is equipped with:
  • 4 cores rk3318 @ 1.1GHz
  • 2GB RAM
  • 16GB storage
  • 2.4 and 5G Wifi (in my case it's BCM43342 chip)
  • bluetooth
  • 1 x USB3.0 and 1 x USB2.0 ports
  • HDMI out, SPDIF, SD card slot

  • The most common opinion you can find about rk3318 tv-boxes is: don't buy them. They tend to overheat and do not work stably (in particular USB3.0 port which affects also rk3328). But we will use this model for other purposes than running Android TV and playing 4K movies. And despite the problems encountered, I am very positively surprised by the final effect.

    2 Installing Linux: creating Android firmware backup

    The Linux installation procedure is largely based on the great work of the @jock developer, which can be found here: csc-armbian-for-rk3318rk3328-tv-box-boards

    I chose the safer method of starting armbian from the SD card. You can also install it in the memory inside eMMC, but if you mess up the settings and the system stops booting, you will be in real trouble. During the experiments, my SD card stopped booting several times, but it was enough to re-upload the armbian image to it. If the system were installed on eMMC it probably wouldn't be possible.

    Neccesery tools:
  • at least 8GB SD card and SD card reader
  • Balena Etcher - SD card flashing utility
  • Jock rk3318 Multitool image, mirror: link (extract it with 7-zip)

  • Install and run Balena Etcher. Select downloaded multitool image and SD card. Flash it.
    step3
    Insert multitool SD into TV-box, attach keybord and monitor then start it. Choose backup firmware and after it is creted, shutdown system from the menu.
    backup1 backup2 backup3 backup4 backup5
    Eject SD from TV-box and put it in the card reader. You should find your backup created. Save it in safe place.
    backup6
    Now it's time to erase eMMC. Put multitool card back in the TVBox. After startup select "Erase flash". Without it prepared custom Armbian image won't boot. Next shutdown the system and power off the device.
    erase1 erase2

    2 Installing Linux: starting Armbian

    You need to download @jock special Armbial image for rk3318/rk3328. You can find it here csc-armbian-for-rk3318rk3328-tv-box-boards and also you can find mirror here: Debian Bullseye minimal - mainline kernel 5.15.16

    Extract downloaded image with 7-zip and burn it on SD card (if you use the same SD card then remember to copy the created earlier backup first!)
    step1b

    Safely eject the SD card, put it in the tvbox, attach keybord and monitor. Then start it. After few minutes your armbian should be ready for final configuration. Create new user 'pi' for everyday usage.
    start

    To check out assigned IP type:
    ip address

    You can SSH (using Putty) to the TV-box now if you like or continue with the console.
    Run rk3318-config. Select safe 1.1GHz speed, don't select any eMMC option and choose x88 PRO board at the end. Don't reboot yet.
    sudo rk3318-config

    rk1 rk2 rk3 rk4

    Next very important commands to install things we need:
    no longer needed sudo apt-mark hold linux-image-edge-rockchip64 linux-dtb-edge-rockchip64
    sudo apt update && sudo apt install armbian-config libxcb1

    Congratulation. You have (almost) installed Armbian. You may reboot now.
    sudo reboot

    3 Installing Linux: Houston, we have a BCM43342... a problem with WiFi

    Edit: After I contacted @jock he put my patch in his distribution. If you are using his latest release, BCM42242 Wifi driver should work from the start.

    Unfortunately if you verify dmesg logs you probably find out that your wifi and bluetooth doesn't work.
    dmesg
    wifi-not-found

    It's because BCM43342 is not supported by the Kernel and currently there are no plans for support it. Really bad situation. But we can do something about it.

    I've managed to extract BCM43342 drivers from my Android X88 Pro 10 backup. But to make them work the Linux Kernel's Broadcom Wifi driver must also be patched. If you're using @jock Debian Bullseye 5.15.16 then it can be easily applied by following my script. If you are using different Kernel version then you must patch its sources on your own and copy BCM43342 drivers as well (if wget could not find the file use your web browser to download it: patch, patch mirror)


    Connect to your box using for example putty, download and install the patch.
    sudo su
    cd /tmp
    wget -O patch_wifi_kernel_5_15_16.tar.gz "https://drive.google.com/uc?export=download&id=15QExck5QJSDmX9CZRrFrut_ln4kp_n0v"
    tar -xf patch_wifi_kernel_5_15_16.tar.gz
    cp -R -f usr/* /usr
    cp -R -f lib/* /lib
    Reboot now. Your Wifi driver should be enabled in the dmesg.

    wifi-enabled

    Now connect and configure your Wifi network using armbian-config:
    sudo armbian-config

    armbian-config-wifi-1 armbian-config-wifi-2 armbian-config-wifi-3

    4 Installing HyperHDR

    As pi user download latest HyperHDR aarch64 installer. For example:
    cd /tmp
    wget https://github.com/awawa-dev/HyperHDR/releases/download/v17.0.0.0/HyperHDR-17.0.0.0-Linux-aarch64.deb
    sudo apt install ./HyperHDR-17.0.0.0-Linux-aarch64.deb
    HyperHDR should be up and running on 8090 port. If you can't connect with your browser then execute one more command and check out the output:
    /usr/bin/hyperhdr

    5 HyperHDR tested hardware

    LED driver (HyperSerialEsp8266/HyperSerialESP32):
  • CH340g/c detected OK
  • CP2104 detected OK
  • CH9102x detected OK

  • With my LED setup I tested HyperSerialEsp8266 config.

    USB grabbers
  • Ezcap 269 - works fine on USB3.0 port offering YUV encoding
  • Ezcap 320 - works fine on USB3.0 port
  • Ezcap 321 - doesn't work fully stable connected to USB3.0 port, works fine on USB2.0
  • MS2109 USB2.0 grabber - works fine
  • AV Access - works fine on USB3.0 despite some errors in dmesg, but not with included USB cable, replace it with reliable USB3.1 gen 2 one meter cable. Because in Linux that grabber can not capture at 30FPS (it's using 60FPS everytime) use following grabber settings for very good result: software frame rate decimation = 2, enable quater frame mode, enable auto-resume. Without these settings CPU usage and latency will be quite high. Av Access doesn't work on USB2.0. Overall not the best choice for that tv-box

  • Maximum reached temperature is around 75C

    6 Summary

    rk3318 X88 PRO 10 offers quite good performance and support for USB3.0. It is not as stable as Raspberry Pi 4 (not perfect USB3.0 compatibility) and there is a lottery with WiFi chips. But if you are OK with that then it's very interesting option for a very low price. And it's widely available. I would put it somewhere between Raspberry Pi3/Raspberry Pi Zero 2 W and between Raspberry Pi 4. In next articles I'll provide more reviews of other tv-boxes. I have big hopes in AmLogic S905X3 solutions, but we'll see what tests show.

    Comments

    zahra said…
    thank you for this helpful article. just I didn't understand how did you patch the kernel to make BCM43342 work. and how did you extract Wifi drivers from android?
    I'm quite beginner :)
    awawa said…
    Hi
    After contacting @jock his latest build 5.15.23 already includes my patch. Details are available on the Armbian forum in my posts.
    GalaxyCurse said…
    Have you started to look at the AmLogic S905X3 platform yet? I have an old S905x box that in my opinion outperforms my RK3328 box even though it only got half the RAM (2GB instead of 4 GB), though it only had 8GB eMMC, so it felt a bit crowded after Armbian was installed, which is the reason for buying the RK3328 box. I was looking at the H6 boxes at the same time, but the 3GB RAM limitation (even though all boxes stated 4GB RAM) made me choose the RK3328. Also the new RK3566,3568,3588 boxes seems interesting with 8-16 GB RAM, but they are in another price bracket.... But the S905X3 seems to be pretty good.
    awawa said…
    I left S905X3 on the final review. I've got even that device in 2 configurations: A95x f3 AIR 2GB and 4GB. But next will be rk3328 4GB version. Since we focus mainly on how to replace Rpi4 with other chip tvbox device for usage with HyperHDR, the memory is not an issue for us. We can perfectly fit under 2G RAM. But USB3.0 stability has a high priority and currently H6 is better here than reviewed earlier rk3318. When I was adapting my Armbian to the TX6 H6, I liked that device more and more . It has even some special hardware acceleration patches for cedrus mainly thanks to LibreElec development (most not included in the mainline Kernel).
    GalaxyCurse said…
    For the S905X3 you might wanna look at the CoreElec project. They have a lot of S905X* boxes working. So it might be similar acceleration things there as the LibreElec had for the H6
    awawa said…
    Yes, I will also try CoreElec to test if HyperHDR can run in such a unique environment. But HyperHDR could only act as a guest here, and other activities (such as playing a 4K 10-bit movie in CoreElec) may limit its performance. Primarily I want to test this Armbian fork https://github.com/ophub/amlogic-s9xxx-armbian because it supports A95x f3 AIR and looks promising after what happened to balbes150 support for Amlogic (sad & disturbing story).
    GalaxyCurse said…
    I was mostly thinking of the .dtb and .dts on CoreElec
    Unknown said…
    Gracias por la guía me ah servido de mucha ayuda, solo un pequeño problema al actualizar con apt update && apt upgrade; Una vez terminada la actualización perdí la configuración del driver wifi y solo me puedo conectar por ethernet, el resto todo perfecto.
    awawa said…
    Did you disable updates of the kernel as it's in the manual? I guess that updated kernel modules have overwritten patched wifi drivers.
    Unknown said…
    Así es, seguí los pasos de esta guía. lo he verificado y están marcados como hold:

    lo@rk3318-box:~$ sudo apt-mark showhold
    linux-dtb-edge-rockchip64
    linux-image-edge-rockchip64

    No sé que ha pasado. ¿Cómo hago para instalar los drivers después de haber actualizado? ó ¿debo comenzar del inicio?
    awawa said…
    If running again 'sudo rk3318-config' won't help, then the re-installation probably is the only way. Also verify your current kernel version ('uname -r') and compare it to the version you have installed from @jock image.
    Jack said…
    This was a very helpful article but I am confused on how you made the BCM43342 work. How do you SSH into the box without it being connected to the internet? I'm quite new to this and confused.
    awawa said…
    You can always use the Ethernet connection. Currently, you don't need to manually fix BCM43342 because @jock has incorporated my patch into his latest firmware.
    anxocruz said…
    My X88 10 Pro doesn't work how i can boot from a sdcard? it may work, doesnt connect to my pc even using the button on the AV connector and doesn't boot
    awawa said…
    This model doesn't need to press AV connector but clearing of eMMC partition. Just follow manual. If it doesnt work with Armbian because your box has some kind of exotic revision, you can restore Android backup and search for help in the Armbian forum. If the eMMC is missing because the manufacturer cut the cost and used some cheap read-only flash instead, then probably nothing can be done.
    anxocruz said…
    Finally it works with a microSD and i've installed armbian, can any software power on the led numbers in the front of the tvbox?
    joz said…
    Why do we need put linux on hold?? I mean this line:
    sudo apt-mark hold linux-image-edge-rockchip64 linux-dtb-edge-rockchip64
    awawa said…
    When the article was published, @jock recommended to put the kernel on hold and it was marked as important step. But now his manual has been updated and it seems it's no longer needed.
    GalaxyCurse said…
    As awawa mentioned. It was recommended before. Now Jock's Armbian version is included in mainline Armbian, so any update should work, including the kernel and dtb. Before, if you had updated the kernel with apt, it would have updated from Jock's RK33x8 kernel to Armbians kernel without the RK33x8 things, and you'd probably end up with a non working system. Now all patches should be included and a normal apt upgrade "should" work.
    awawa said…
    The manual on the blog has been updated.
    joz said…
    thanx all. i was little confused. I did it because when used xfce desktop version, after update and upgrade i have noticed total of system lagging. Due this behave i install minimal setup and on top of that i have installed xfce. Hope that if i resume upgrading kernel system will work as now...because now i am satisfied at all.
    Darmur Hacking said…
    thanks for the nice guide! I have the very same model, everything works except the Optical SPDIF out (it does work with the original Android image). I tried to extract the .dtb from the Andoid backup, but I didn't succeed, to have a look to the SPDIF nodes. Did you try SPDIF on your device? Could you please explain how you extracted the WiFi Firmware from the image?
    awawa said…
    @Darmur Hacking
    Decompiled DTS: https://disk.yandex.ru/d/LcUB2ObVF1nqbw
    Darmur Hacking said…
    many thanks, very appreciated! how did you menage to extract it from the device? I'd like to learn
    awawa said…
    I have already extracted image of X88 Pro public firmware: don't remember the tool I used. Then for boot.img use it: https://github.com/PabloCastellano/extract-dtb