jock

Members
  • Content Count

    401
  • Joined

  • Last visited


Reputation Activity

  1. Like
    jock got a reaction from Alex83 in CSC Armbian for RK322X TV Boxes   
    Analog sound is not yet in mainline kernel, it works only on 4.4.
    Hardware acceleration also is still partial on mainline kernel and it is in heavy work in progress by LibreELEC and kernel teams.
    For multimedia features I suggest to stay on kernel 4.4 for now
  2. Like
    jock got a reaction from Alex83 in CSC Armbian for RK322X TV Boxes   
    Ok situation is clear now... turned out that while cleaning up things for mainline inclusion I made a separate branch (rk3229-squash) and by mistake removed the OPTEE binary blob from that Stupid u-boot, during compilation, did not say anything about the missing file... You instead most probably cloned the rk3229 branch which was perfectly fine.
     
    If you are testing the image from sdcard it works fine because the good bootloader that is getting engaged in the eMMC. But don't burn the new image in the eMMC, or the safe bootloader will vanish!
     
    I'm recompiling things right now, so the balance to the force will be restored soon
  3. Like
    jock got a reaction from nokirunner 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) SSV6051 wifi over SDIO (only on legacy, driver is so bad anyone tried to port to mainline and may cause instability) 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 19-06-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.08.0 - Debian Buster Minimal - Mainline kernel 5.6.19 Armbian 20.08.0 - Ubuntu Focal Desktop - Mainline kernel 5.6.19  
    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. As usual, armbian default credentials are user: root password: 1234 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. As usual, armbian default credentials are user: root password: 1234 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; As usual, armbian default credentials are user: root password: 1234 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
  4. Like
    jock got a reaction from Maker39 in CSC Armbian for RK322X TV Boxes   
    Hello guys, good news!
     
    RK322x now is mainlined into armbian! This is the download page: https://www.armbian.com/rk322x-tv-box/
    From now on your board will get all the benefits of being part of Armbian ecosystem, including kernel updates!
     
    Support and developing images will still be provided in this forum thread as usual, so for the thread followers nothing will change
     
    edit: I'm in the middle of testing the images and it seems there's something wrong with the bootloader, so don't download them yet!
  5. Like
    jock got a reaction from Reddwarf in CSC Armbian for RK322X TV Boxes   
    Ok, images on the first page are updated and working, they're safe to use and install in flash.
    Images from download page are still broken, server will decide when they will be refreshed
  6. Like
    jock got a reaction from Reddwarf in CSC Armbian for RK322X TV Boxes   
    Hello guys, good news!
     
    RK322x now is mainlined into armbian! This is the download page: https://www.armbian.com/rk322x-tv-box/
    From now on your board will get all the benefits of being part of Armbian ecosystem, including kernel updates!
     
    Support and developing images will still be provided in this forum thread as usual, so for the thread followers nothing will change
     
    edit: I'm in the middle of testing the images and it seems there's something wrong with the bootloader, so don't download them yet!
  7. Like
    jock got a reaction from Alex83 in CSC Armbian for RK322X TV Boxes   
    Currently you can keep up-to-date the distribution packages via regular apt-get update && apt-get upgrade but not the kernel, u-boot and loader.
    When I will merge the fork into mainline armbian (which will happen very soon), you will get also kernel and loaders updates!
     
  8. Like
    jock got a reaction from Reddwarf in CSC Armbian for RK322X TV Boxes   
    Currently you can keep up-to-date the distribution packages via regular apt-get update && apt-get upgrade but not the kernel, u-boot and loader.
    When I will merge the fork into mainline armbian (which will happen very soon), you will get also kernel and loaders updates!
     
  9. Like
    jock reacted to SteeMan in Good Box for Linux?   
    There is a reason that the android TV boxes are so cheap.  They generally lack support by the manufacturers for main line linux especially for the items on your must have list (wifi, hardware video decoding/encoding).  In my opinion cheap should not be your deciding factor in what you choose to purchase as you might find that a regular SBC (raspberry pi or other, that has known support of the features you are looking for) may be the best fit and best supported option for you needs.  But if you want to explore and try things out, the android TV boxes are fun to work with, and if you go in understanding that something you want won't work well on the box you end up with, you are approaching these boxes with the right expectations. 
    For example I have four different types of boxes and wifi doesn't work on any of them.  But since I primarily use them as servers it works for me to use wired ethernet.
    I am sure that boxes exist that meet all of your criteria, but they are not likely to be the cheap boxes and you will need to spend a bit more money to get what you want and spend a lot of time researching.
    One final comment about the cheapest boxes is that identically labeled boxes with the same external markings can contain very different internal hardware.  My example is that I have two different TX3 mini's one has emmc for internal storage (which is what it is supposed to have) and the other has nand, unfortunately mainline kernels don't support internal nand storage so I ended up not being able to use the second box in the way I had intended.  But the manufactuer of the second box was able to save a bit of money by using components that cost them less and for most people using these for their intended purpose of Android wouldn't know the difference.
  10. Like
    jock got a reaction from Werner in CSC Armbian for RK322X TV Boxes   
    Currently you can keep up-to-date the distribution packages via regular apt-get update && apt-get upgrade but not the kernel, u-boot and loader.
    When I will merge the fork into mainline armbian (which will happen very soon), you will get also kernel and loaders updates!
     
  11. Like
    jock got a reaction from nokirunner in CSC Armbian for RK322X TV Boxes   
    Hi @nokirunner, did you see the post about the media framework?
     
     
  12. Like
    jock got a reaction from jeanrhum in CSC Armbian for RK3288 TV Box boards (Q8)   
    Hello anyone!
    I'm proud to announce the Multitool RK3288 edition!
     
    It's a small but powerful tool to easy operate on internal eMMC flash of RK3288 devices.
     
    Features:
    Backup the content of internal eMMC Restore a previously backed-up image to eMMC Erase the eMMC (via fast blkdiscard or zero-fill as fallback) Burn an Armbian (or LibreELEC) image directly on the eMMC Provide a recovery shell for manual maintenance Windows-friendly: everything is placed in a FAT partition Image compression format autodetection: they are decompressed on-the-fly during burn process Instructions are simple:
    Download the image from here Burn it on an sdcard Open the FAT partition with your preferred file manager Place the images you want to burn on the device in images directory (backups will be stored in backups directory) Plug the sd card in the RK3288 device Power the device and wait few seconds, the Multitool menu will appear on screen and can be navigated with the keyboard At the moment it has been tested only on my xt-q8l-v10 device, but any test, feedback and suggestion is welcome!
     
  13. Like
    jock got a reaction from nokirunner in CSC Armbian for RK322X TV Boxes   
    Update!
     
    All images have been updated to latest Armbian 20.08 with latest updates.
    Mainline kernel bumped to 5.6.16, chrony package is now fixed.
    Multitool also has been updated.
     
    Enjoy!
  14. Like
    jock got a reaction from felix_fx2 in CSC Armbian for RK322X TV Boxes   
    Update!
     
    All images have been updated to latest Armbian 20.08 with latest updates.
    Mainline kernel bumped to 5.6.16, chrony package is now fixed.
    Multitool also has been updated.
     
    Enjoy!
  15. Like
    jock reacted to Hugh Cole-Baker in Mainline VPU   
    A couple of other reasons I can think of why it wouldn't work: Does the user you're running ffmpeg as have write permission on /dev/video*,  /dev/media* and /dev/dri/card* devices? And did the compile time checks for v4l2_request support in FFmpeg pass? (you need to see v4l2_request under "External libraries providing hardware acceleration:", and h264_v4l2request under "Enabled hwaccels:", in the output of FFmpeg's configure script when you're compiling it). For the FFmpeg configure checks to pass, AFAIK you need the kernel headers from a recent kernel with v4l2-request support installed, e.g. kernel v5.6.
  16. Like
    jock reacted to Igor in CSC Armbian for RK3288 TV Box boards (Q8)   
    FYI fixed yesterday https://github.com/armbian/build/commit/9130021688e048e698b8282fb1da32fe0763cb3f
  17. Like
    jock reacted to Kwiboo in Mainline VPU   
    That branch was just something I played with for stateful decoding on RPi and Amlogic and not something that was finished nor do I expect it to be working.
     
    https://github.com/Kwiboo/FFmpeg/commits/v4l2-request-hwaccel-4.2.2 is the branch we use in LibreELEC. I was able to hw decode h264 with that branch and vanilla linux 5.6.6 on my RK3288 Tinker Board S a few hours ago.
    Also you should not need the --enable-libv4l2 configure flag, --enable-libdrm --enable-v4l2-request --enable-libudev should be enough to enable the request api hwaccels.
     
    What device are you testing on? I have not done any testing with rkvdec driver and there is no rk3328/rk3399 hantro driver for h264 in upstream media tree. Mpeg-2 and VP8 should work across rk3288/rk3328/rk3399.
    I do not expect h264 rkvdec to be working without changes to ffmpeg since there was some flags that got changed and now do not match between upstream rkvdec driver and my ffmpeg branch.
     
    I am hoping to get some time this weekend to update ffmpeg to work with rkvdec and hopefully submit the initial hantro h264 decoder for rk3328/rk3399 vpu2 to upstream.
  18. Like
    jock got a reaction from Alex83 in CSC Armbian for RK322X TV Boxes   
    I did some tests yesterday using audacious and had no issues with lagging or stuttering, although pulseaudio is taking an insane amount of cpu processing power (around 20% of one cpu); using ALSA directly, decoding and playing a vorbis file just requires 4% of one core. Youtube instead is out of reach, no way to watch a video even in low quality (480p) without having audio and video issues.
    I'd like to try armsoc driver sooner or later to see if there is any difference from current modesetting driver, but the SoC is too limited to do video decoding without using the hardware acceleration to ease the work of the ARM cores.
  19. Like
    jock reacted to Maker39 in CSC Armbian for RK322X TV Boxes   
    @jock Thanks for update.
    Auto Detect work fine for me. And interface more understood.
    Great job !
  20. Like
    jock got a reaction from Maker39 in CSC Armbian for RK322X TV Boxes   
    Hello, images have been updated in first page, coming with a more detailed rk322x-config script that will prevent future NAND/eMMC mistakes and provides some more info about the board.
    Also mainline kernel has been pushed to 5.6 and now an Ubuntu Focal image is also proposed, albeit having a very slow desktop experience and requires the user to uninstall chrony package which is broken and prevents date and time synchronization from network.
  21. Like
    jock got a reaction from Maker39 in CSC Armbian for RK322X TV Boxes   
    @Alex83
    I try to explain what happened.
    The wifi device is attached to the SDIO bus, which is disabled in the generic device tree that is loaded at first boot, that's why the command does not work. In the next release of the images I will fix this.
     
    When you called rk322x-config, you choose boards which have no support for nand, so at next reboot it has been disabled and the system was not able to boot anymore. Objectively, at the current stage the user is unaware of this important information making the selection. I'm already addressing this issue providing more info to the rk322x-config script that prevents this kind of mistakes.
    You could restore the system boot using the Multitool, getting a shell, mounting the armbian partition on rknand0 and then removing the fdtfile= line from /boot/armbianEnv.txt
    Anyway you could try the mxq-pro-4k box which has NAND and SSV6051 support, you should have no more surprises.
     
    Unfortunately, on legacy kernel, wifi requires some kernel module juggling (ie: blacklisting and whitelisting). I would really like to fix this at root, but I only have boards with ssv6051/ssv6256 chips and the worst offenders are the realtek modules, so heading into kernel modules which I can't test is a jump in the dark.
     
    About hardware acceleration, all the kernel modules are there, just the software is not compiled to use it. Video players that come with debian/ubuntu are not aware about rockchip acceleration. At this stage you need to compile things by yourself unfortunately. I will take a look to the Mediascript for RK3288 that maybe can be used for a proof of concept, but I don't know how much can be used for RK322x
  22. Like
    jock reacted to Maker39 in CSC Armbian for RK322X TV Boxes   
    Wifi rtl8703bs
    root@rk322x-box:~# cat "/sys/bus/mmc/devices/mmc1:0001/mmc1:0001:1/modalias"
    sdio:c07v024CdB703
    ps Here's another, it may come in handy
    rtl8189etv
    sdio:c07v024Cd8179
    ssv6051
    sdio:c07v3030d3030
     
  23. Like
    jock got a reaction from jeanrhum in 25$ TV Box running Armbian "out of the box"   
    @Armin
    if you need just something such small, you may find nanopi or orange pi boards. Some small models are pretty cheap (<10$) and well supported by armbian. Tv boxes have no exposed GPIOs, which can instead be very useful for domotic applications.
    For example, I have an old Orange PI One (Allwinner H3) which has ethernet, 1 USB port, 512mb of ram and some exposed GPIO. I paid less than 10$ some year ago. I guess now you can get something similar with wifi too at the same price.
  24. Like
    jock reacted to Maker39 in CSC Armbian for RK322X TV Boxes   
    Fine !
    I tried the new Multitool and new images.
    1. Multitool problem with mmcblk2 on (Iconbit XDS16 and XDS8)  blue board marked T95N-RK3229_512X4-20170803_V1.5) solved!
    2. Trouble with
    Armbian_20.05.0-trunk_Rk322x-box_focal_legacy_4.4.194_desktop
    Armbian_20.05.0-trunk_Rk322x-box_buster_legacy_4.4.194_minimal
    stop at "random: nonblocking pool is initialized"
    Solved after edit device tree (for me is hk1mini ) As said @jock You can change status="disabled" into status="okay" in dwmmc@30020000
     
    So far, that's all I have.
    Later, I’ll probably try to heap all the information on these Tv-boxes, maybe they will need a separate dtb for them.
    These boxes are common in Russia and CIS countries.  In Europe is excusive apparently
  25. Like
    jock got a reaction from Maker39 in CSC Armbian for RK322X TV Boxes   
    Hello guys, finally, after a huge and time consuming effort, me and @fabiobassa have a working method for installing Armbian on NAND devices!
     
    The method is called steP-nand (Ste Puttane di NAND) and is available as an option in the multitool only for boxes equipped with NANDs.
     
    What you need:
    a fresh copy of the multitool a fresh copy of the armbian images installation instructions Everything can be found in the first page of the thread.
    Enjoy!