jaum20

Members
  • Content Count

    8
  • Joined

  • Last visited

Reputation Activity

  1. Like
    jaum20 reacted to jock in CSC Armbian for RK322X TV Boxes   
    You can use the multitool to dd image files directly on the device: it has a fully functional bash shell to do such kind of maintenance tasks. Nonetheless you need to do know what you are doing.
    Maybe you can burn the "bad" backup you made and then burn the rootfs from the image @fabiobassa provided. You need to do some juggling with the original image, but if you are able to do so you can try.
     
    Your board is a new revision of the r329q family. In alternative you may have more luck tryingr other images for boards which are older r329q revisions (v2.0, v3.0, v7.0, ...)
  2. Like
    jaum20 reacted to jock in CSC Armbian for RK322X TV Boxes   
    Good news, expecially for @nokirunner and @DaviMesquita
     
    Finally we managed to make the ssv6x5x driver work on the ssv6256p chipset and it turns out the it is also working pretty well. I removed most of the logging messages it was spamming on the dmesg log, now it is much more silent and it is ok this way. Teaming with @fabiobassa we optimized performances quite a bit, so expect ~60 Mbit/s at least on optimal setups. It works on both 2.4Ghz and 5Ghz bands.
     
    The driver will be included in the armbian images soon, but in the meantime anyone can test it.
    Download ssv6x5x.koand put it into /lib/modules/$(uname -r)/kernel/drivers/net/wireless Download ssv6x5x-wifi.cfgand put it into /lib/firmware Download ssv6x5x-sw.bin and put it into /lib/firmware Run depmod -a Add blacklist ssv6051 in /etc/modprobe.d/blacklist-rk322x-box.conf (ssv6051 and ssv6x5x kernel modules clashes, we need to blacklist ssv6051 for the other to work) Reboot!  
    Any testing report is appreciated!
     
  3. Like
    jaum20 reacted to jock in CSC Armbian for RK322X TV Boxes   
    Ok much better, but at the moment I have no idea this is happening.
    The libreelec boot is somehow engaged because the behaviour changes if you leave the sdcard into, but the reason why it hangs is not clear to me yet.
    I will try to replicate soon on a board of mine
     
    edit: @jaum20 problem solved! Long story short: substitute the file rk3228a-box-mxq4kpro.dtb in the root of the libreelec sdcard with the one attached here. Important: if you're going to update/upgrade LibreELEC, you will need to replace again this file. This is a "problem" I will likely ask to @knaerzche if it can be solved somehow.
     
    Detailed answer for experts: the device tree with the legacy kernel is missing the property arm,cpu-registers-not-fw-configured in the timer section. It is needed on armbian but it is not needed on Libreelec because armbian has OPTEE as trust os (which requires the property), instead Libreelec uses the proprietary u-boot and trust os (which does the timer initialization by itself).
    rk3228a-box-mxq4kpro.dtb
  4. Like
    jaum20 reacted to jock in CSC Armbian for RK322X TV Boxes   
    DISCLAIMER (PLEASE READ): everything you can find in this thread (binaries, texts, code snippets, etc...) are provided AS-IS and are not part of official Armbian project. For this reason not people from Armbian project nor myself are responsible for misuse or loss of functionality of hardware.
    Please don't ask about support or assistance in other non-community forums nor in the official Armbian github repository, instead post your questions in this thread, in the TV Boxes forum section (hardware related) or in the Peer-to-peer support section (general linux/software related).
    Thank you!
     
    Following the recent thread on LibreElec forum about an unofficial image for rk3229 devices, I would like to make public the work made by me and @fabiobassa about bringing rk322x support to armbian.
    The project is now in -> mainline Armbian <- and the development fork will be available on github -> here <-
    Most of the love has been poured into supporting and bringing up the legacy rockchip 4.4 kernel, but in the near future the goal is to fully support the mainline kernel.
     
    What works:
    Should boot and work flawlessy on all boards with RK3228a, RK3228b and RK3229, with either DDR2 and DDR3 memories. RK3228a boards may have some issues on mainline kernel although; stick to legacy kernel for RK3228a. Mainline u-boot OPTEE provided as Trusted Execution Environment All 4 cores are working Ethernet Serial UART (configured at 115200 bps, not 1.5Mbps!) Thermals and frequency scaling OTG USB 2.0 port (also as boot device!) EHCI/OHCI USB 2.0 ports MMC subsystem (including eMMC, SD and sdio devices) Hardware video acceleration (fully supported via RKMPP on legacy kernel, partial support via hantro kernel driver on mainline) NAND is available only on legacy (but not as boot device due to mailine u-boot missing the rockchip NAND driver) Various WIFI over SDIO are supported (SSV6051P, SSV6256P, ESP8089, Realtek chips, etc...), but ssv6x5x drivers are available only on legacy kernel Full GPU acceleration on legacy kernel, mainline kernel has lima driver compiled in but X11 is very slow - you are still free to compile and install mali kernel driver on mainline yourself. U-boot boot order priority: first the sdcard, then the USB OTG port and eventually the internal eMMC; you can install u-boot (and the whole system) in the internal eMMC and u-boot will always check for images on external sdcard/USB first.  
    Unbrick:
    Rockchip devices cannot be bricked. If the internal flash does not contain a bootable system, they will always boot from the sdcard. If, for a reason, the bootable system on the internal flash is corrupted or is unable to boot correctly, you can always force the maskrom mode shorting the eMMC clock pin on the PCB. Here there is the procedure, but you can also google around if you get stuck on a faulty bootloader, the technique is pretty simple and requires a simple screwdriver.
     
    Multimedia:
    If you need multimedia features, like OpenGL/OpenGL ES acceleration, hardware accelerated Kodi, ffmpeg and mpv you can take a look to this post
     
    Installation:
    Building:
    You can build your own image follow the common steps to build armbian for other tv boxes devices: when you are in the moment to choose the target board, switch to CSC/TVB/EOL boards and select "rk322x-box" from the list.
     
    Stable images:
    Stable images and installation instructions are provided in the Armbian RK322x-box download page: https://www.armbian.com/rk322x-tv-box/
     
    Development images:
    Development testing images can be downloaded from the following list (last update 13-09-2020):
     
    Armbian 20.08.0 - Ubuntu Focal Minimal - Legacy kernel 4.4.194 Armbian 20.08.0 - Debian Buster Minimal - Legacy kernel 4.4.194 Armbian 20.08.0 - Ubuntu Focal Desktop - Legacy kernel 4.4.194  
    Armbian 20.11.0 - Debian Buster Minimal - Mainline kernel 5.8.9 Armbian 20.11.0 - Ubuntu Focal Desktop - Mainline kernel 5.8.9  
    Multitool:
    Multitool - A minimal image for TV Box maintenance  

    Quick installation instructions on eMMC:
    Build or download your preferred Armbian image and a copy of the Multitool; Burn the Multitool on an SD card; once done, place the Armbian image in images folder of the SD card FAT partition; Plug the SD card in the TV box and plug in the power cord. After some seconds the blue led starts blinking and the Multitool appears; OPTIONAL: you can do a backup of the existing firmware with "Backup flash" menu option; Choose "Burn image to flash" from the menu, then select the destination device (usually mmcblk2) and the image to burn; Wait for the process to complete, then choose "Shutdown" from main menu; Unplug the power cord and the SD card, then replug the power cord; Wait for 10 seconds, then the led should start blinking and HDMI will turn on. The first time the boot process will take a couple of minutes or more because the filesystem is going to be resized, so be patient and wait for the login prompt. On first boot you will be asked for entering a password for root user of your choice and the name and password for a regular user Run sudo rk322x-config and select your board characteristics to enable leds, wifi chips, high-speed eMMC, etc... Run armbian-config to configure timezone, locales and other personal options Congratulations, Armbian is now installed!  
    Despite the procedure above is simple and reliable, I always recommend to first test that your device boots Armbian images from SD Card.
    Due to the really large hardware variety, there is the rare chance that the images proposed here may not boot. If a bad image is burned in eMMC, the box may not boot anymore forcing you to follow the unbrick section at the top of this post.
     
    Quick installation instructions on NAND:
    Build or download your preferred Armbian image and a copy of the Multitool; Burn the Multitool on an SD card; once done, place the Armbian legacy kernel image in images folder of the SD card FAT partition; Plug the SD card in the TV box and plug in the power cord. After some seconds the blue led starts blinking and the Multitool appears; OPTIONAL: you can do a backup of the existing firmware with "Backup flash" menu option; Choose "Burn Armbian image via steP-nand" from the menu, then select the destination device (usually rknand0) and the image to burn; Wait for the process to complete, then choose "Shutdown" from main menu; Unplug the power cord and the SD card, then replug the power cord; Wait for 10 seconds, then the led should start blinking and HDMI will turn on. The first time the boot process will take a couple of minutes or more because the filesystem is going to be resized, so be patient and wait for the login prompt. On first boot you will be asked for entering a password for root user of your choice and the name and password for a regular user Run sudo rk322x-config and select your board characteristics to enable leds, wifi chips, etc... Run armbian-config to configure timezone, locales and other personal options Congratulations, Armbian is now installed!  
    Alternative: you can install the bootloader in NAND and let it boot from SD Card or USB:
    Download a copy of the Multitool and burn it on an SD card; Plug the SD card in the TV box and plug in the power cord. After some seconds the blue led starts blinking and the Multitool appears; RECOMMENDED: make a backup of the existing firmware with "Backup flash" menu option; Choose "Install Jump Start for Armbian" menu option: the Jump Start uses the internal NAND to boot from external SD Card or external USB Stick; Follow the general instructions to boot from SD Card below, skip the first erase eMMC step.  
    Quick installation instructions to boot from SD Card:
    If you are already running Armbian from eMMC, skip to the next step. Instead if you are running the original firmware you need to first erase the internal eMMC; to do so download the Multitool, burn it on an SD Card, plug the SD Card and power the TV Box. Use "Backup flash" if you want to do a backup of the existing firmware, then choose "Erase flash" menu option. Build or download your preferred Armbian image; Uncompress and burn the Armbian image on the SD Card; Plug the SD Card in the TV Box and power it on; Wait for 10 seconds, then the led should start blinking and HDMI will turn on. The first time the boot process will take a couple of minutes or more because the filesystem is going to be resized, so be patient and wait for the login prompt; On first boot you will be asked for entering a password for root user of your choice and the name and password for a regular user Run sudo rk322x-config and select your board characteristics to enable leds, wifi chips, high-speed eMMC or NAND, etc... Run armbian-config to configure timezone, locales and other personal options, or also to transfer the SD Card installation to internal eMMC; Congratulations, Armbian is running from SD Card!  
    A note about boot device order:
    With Armbian also comes mainline U-boot. If you install Armbian or just the bootloader in the eMMC or the Jump Start on internal NAND, the bootloader will look for valid bootable images in this order:
    External SD Card External USB Stick in OTG Port Internal eMMC  
    Alternative backup, restore and erase flash for EXPERTS:
    These backup, restore and erase flash procedures are for experts only. They are kept here mostly for reference, since the Multitool is perfectly able to do same from a very comfy interface and is the suggested way to do maintenance.
     
    Backup:
    Obtain a copy of rkdeveloptool: a compiled binary is available in the official rockchip-linux rkbin github repository. If you prefer, you can compile it yourself from the sources available at official rockchip repository Unplug the power cord from the tv box Plug an end of an USB Male-to-male cable into the OTG port (normally it is the lone USB port on the same side of the Ethernet, HDMI, analog AV connectors) Plug the other end of the USB Male-to-male cable into an USB port of your computer If everyting went well, using lsusb you should see a device with ID 2207:320b change directory and move into rkbin/tools directory, run ./rkdeveloptool rfi then take note of the FLASH SIZE megabytes (my eMMC is 8Gb, rkdeveloptool reports 7393 megabytes) run ./rkdeveloptool rl 0x0 $((FLASH_SIZE * 2048)) backup.data (change FLASH_SIZE with the value you obtained the step before) once done, the internal eMMC is backed up to backup.data file  
    Restore: first we have to restore the original bootloader, then restore the original firmware.
    Running rkdeveloptool with these switches will accomplish both the jobs:
    ./rkdeveloptool db rk322x_loader.bin Downloading bootloader succeeded. ./rkdeveloptool ul rk322x_loader.bin Upgrading loader succeeded. ./rkdeveloptool wl 0x0 backup.data Write LBA from file (100%) Download here: rk322x_loader.bin
     
    Erase the eMMC: clearing the internal eMMC memory makes the SoC look for external SD Card as boot option. If there isn't any suitable SD Card, the SoC enters maskrom mode, which can then be used for full eMMC/NAND access using rkdeveloptool.
    Obtain a copy of rkdeveloptool: a compiled binary is available in the official rockchip-linux rkbin github repository. If you prefer, you can compile it yourself from the sources available at official rockchip repository Unplug the power cord from the board Plug an end of an USB Male-to-male cable into the OTG port (normally it is the lone USB port on the same side of the Ethernet, HDMI, analog AV connectors) Plug the other end of the USB Male-to-male cable into an USB port of your computer If everyting went well, using lsusb you should see a device with ID 2207:320b run ./rkdeveloptool ef and wait a few seconds once done, the internal eMMC is erased and the device will boot from the sdcard from now on  
    Critics, suggestions and contributions are welcome!
     
    Credits:
    @fabiobassa for his ideas, inspiration, great generosity in giving the boards for development and testing. The project of bringing rk322x into armbian would not have begun without his support! Justin Swartz, for his work and research to bring mainline linux on rk3229 (repository here) @knaerzche for his great contribution to libreelec support and mainline patches
  5. Like
    jaum20 reacted to Yeoj Henrie Sayadi in CSC Armbian for RK322X TV Boxes   
    yes it is perfectly normal. It will resize itself after you boot into it. Have fun