jock

  • Content Count

    718
  • Joined

  • Last visited

Reputation Activity

  1. Like
    jock got a reaction from ArkhanLK in CSC Armbian for RK322X TV Boxes   
    Here it is!
    It's still weird you have building issues with Focal too, in a step (write uboot) that is mostly just bash scripting...
  2. Like
    jock got a reaction from ArkhanLK in CSC Armbian for RK322X TV Boxes   
    Hmmm... yes, it is indeed contradictory... The "native" building should be referred to building armbian on the board itself, but there is an "x64" there which adds more contradiction confusion.
    By the way, I'm using Focal to build Focal, Buster and Bullseye images and it works fine. Historically the supported distribution for x86-64 building was the latest Ubuntu LTS. There is only a bug in the build system that I don't know if it has been fixed yet, but you may need to install some packages manually (like libfdt), but then it should go on without any more issues
  3. Like
    jock got a reaction from ArkhanLK in CSC Armbian for RK322X TV Boxes   
    Hello @ArkhanLK, be aware of this:
     
    so everything else is a moving target. The tools may work differently on other distributions, with subtle bugs or even build failures, so it is preferable to support a single distro and support it well.
    Personally, I have my 100Gb Ubuntu Focal 20.04 Server virtual machine to do such jobs.
  4. Like
    jock got a reaction from gnusmag45 in CSC Armbian for RK322X TV Boxes   
    Hi @gnusmag45, I'm sorry you are having issues with your board. I hope the multitool still boots after you erased the flash
    Unfortunately your board has an eMCP, which is a chip that contains both the eMMC and the DDR memory. I never had the chance to test a board with such chip by myself, so it is totally guesswork.
     
    The multitool has a dtb which is usually very compatible because it does not use any "advanced" features of the board, and also uses lower operating frequencies to maximize compatibility at the expense of performance. Something does not work for your board although.
     
    I edited the device tree of the multitool to provide more current strength to the eMMC pins and also some other configuration that may be of some benefical effect for your board.
     
    This is the dtb: rk322x-box-emcp.dtb.
    Put it in the root directory of the multitool, then edit the the file extlinux/extlinux.conf and change the existing rk322x-box.dtb with this rk322x-box-emcp.dtb.
    Save the conf file and try again to boot the multitool. Check if after some reboots the flash memory is detected consistently, maybe make a backup to "stress" it and see if the backup is completed correctly, but don't install any armbian image yet.
     
    I suggest you to first try to burn an Armbian image directly on the sdcard and boot armbian from sdcard. This may let you upload a full set of logs (via armbianmonitor -u) to the internet and let us inspect them before proceeding to install the image on the eMMC.
    Also check if the eMMC is correctly detected within Armbian after some reboots: it is important that the kernel detects it otherwise even if you install Armbian on eMMC it won't boot anyway.
  5. Like
    jock got a reaction from ArkhanLK in CSC Armbian for RK322X TV Boxes   
    Yeah, you're right, the emmc-nand overlay also enables the DDR mode... I forgot I added that thing there too.
    Need to fix that in rk322x-config to be more clear about.
  6. Like
    jock got a reaction from ArkhanLK in CSC Armbian for RK322X TV Boxes   
    Thanks a lot, this makes the job worth it You're right, that's not just me behind this, so I share the greetings with all the people that helped in this thread!
     
    You can still use Focal Legacy and configure icewm desktop manager even if the image comes preinstalled with xfce, performance should be the same as debian.
    Unfortunately I didn't try on debian. Roughly it should be possible to make it run on, but the package names to resolve the library dependencies changes, so the media packages should be adapted. It was a bit hard to find and fix dependencies, I'm no .deb specialist at all.
    Also Debian Buster comes with some very old packages that should be recompiled and installed manually... it's a bit of headache
    You can extract the script and install each .deb packages manually using apt-get (apt-get install ./the-package.deb), but I don't really know if it brings you anywhere.
    The new developments on the mainline kernel brings new life to hardware decoding and acceleration, but things are still settling down, as you may notice with the release of the first beta versions of LibreELEC 19 and Kodi Matrix: actually I managed to get hardware acceleration work fine on mainline kernel, but the process still requires patching and manual compilation of ffmpeg and Kodi, so there still is some time to wait for.
    Ah, no there is not any tutorial I know about for that, but IMHO it does not really worth it.
    CPU and GPU can be overclocked easily editing the device tree, finding the opp tables (OPerating Points), and modifying frequency and voltages. I don't recommend it, the improvement is very modest at the expense of much greater heat production.
    Unfortunately the CPU is a Cortex-A7, a very old 32 bit only architecture made to do cheap tv boxes. The SoC has dedicated hardware decoding blocks, which are nice, but the hardware specs are minimal for the current standards. It is perfect for some home server things although (network router, NAS, VPN endpoint, dns cache/hole, etc...)
     
    edit: about the boot issue, follow the @RaptorSDSadvice to remove the emmc word from overlays= line in /boot/armbianEnv.txt, or just select emmc-nand in rk322x-config.
  7. Like
    jock got a reaction from masteripper in A really dumb question Amlogic Vs RockChip vs Allwinner   
    Amlogic has quite good performance/price ratio: their low-end S905X3/X4 are very good chips for the price, and quite updated too (Cortex A55). Rockchip and Allwinner have nothing comparable yet for the price. Allwinner is far behind. Rockchip recently introduced the long-awaited RK356x series which at least is on par with raw performance to S905X3 and has a nice set of features, but the price is clearly higher and support is still going on. RK3328 is not as good as S905X3, either from CPU and GPU sides, but the RK3399 is still quite good SoC. Amlogic has the best chip on paper with S922 (and similar ones), but in the past they did some double-cross with frequencies and temperatures so people is reasonably skeptic on the real performances.
    Despite lagging behind, Allwinner chips are at least very cheap with decent raw performance (H6 at least), but the company is a bit silly.
     
    About linux and community support, Amlogic is the worst one by far, being quite obscure about their hardware and generally not very supportive of opensource.
    Rockchip is the best one, a lot of their drivers are production ready in the mainline kernel. Recently although I saw quite a stop in their "proprietary" kernel and u-boot public forks. I don't know why they stopped, but I hope it's just a temporary reorganization: the effort they did in supporting opensource was very appreciated by the community and mainline kernel is very advanced on supporting their chips and peripherals.
    Allwinner in the past was a total wreck, a lot of work by community has been done to reverse engineering things with excellent results and I think they now opened a bit more publishing especially documentation.
     
    My two cents.
  8. Like
    jock reacted to Heisath in Armbian 21.05 Jerboa   
    https://docs.armbian.com/Release_Changelog/#v2105-2021-05-09
  9. Like
    jock reacted to Heisath in Armbian v21.05 (Jerboa) Release Thread   
    Nah, all good from here. I'll try to do the release this sunday. Might hop in the IRC if I need assistance. Release on sunday evening is good IMHO because if something critical goes wrong, we can fix on monday.
  10. Like
    jock reacted to SteeMan in CSC Armbian for RK322X TV Boxes   
    Sometimes disreputable manufacturers will modify the kernel in the android firmware to provide false information. (easy way to cut costs by not actually including the memory/storage advertized).
  11. Like
    jock got a reaction from SteeMan in CSC Armbian for RK3318 TV box boards   
    Armbian project does not officially support nor maintains tv boxes. Armbian project maintains only supported Single Board Computer (SBC) devices. SBCs have stable hardware (kind-of), and are usually well-documented.
     
    Tv boxes are another thing.
    In the ideal world of the naked puffy angels chanting melodious high-tone songs, the organization you proposed would be perfect.
    In our world full of crap, dirt and oil it does not work at all: every chinese tv box manufacturer buy chips at the lowest price point possible on the market and put all that crap and scrap on these boards. If you read carefully the first post (and I invite you to do it) the very same rk3318 is probably a scrap chip, and eMMC chips are often failing after a while, some because are faulty, some others fail because of crappy soldering (you can ask @fabiobassa how many faulty eMMC chips desoldered from these boards).
     
    That's why Armbian does not officially tv boxes: it's a community matter, because keeping the things working with a huge hardware variety is just too difficult and very time consuming.
    In a world were everything can fit onto these boards, having one image for each box is unthinkable; I preferred a more elegant solution that allows the user to download a single image with a basic configuration that (hopefully) boots on every board with the same SoC. Once installed, the system can be further configured by the user herself to enable all the features of the board, like higher cpu speed, wifi, bluetooth, eMMC higher speed modes, leds, buttons, etc... etc...
     
    You won't find images of mine spread here and there on the forum, usually I publish images just on the first page of this thread and sometimes I prepare some special testing images for someone who has willingness to help the development progress. When everything will be stable enough, I will ask for merging to the main Armbian project, so the images will not be built and published anymore by me, but the Armbian server will build (and certify) them and they will be available in the official download page, but still totally backed and maintained by community efforts.
     
    You will find everything you need to get the thing running on the first page of the thread, so read that carefully and, if you're not satisfied, steer away from tv boxes and search for a proper SBC.
  12. Like
    jock got a reaction from fabiobassa in CSC Armbian for RK3318 TV box boards   
    Armbian project does not officially support nor maintains tv boxes. Armbian project maintains only supported Single Board Computer (SBC) devices. SBCs have stable hardware (kind-of), and are usually well-documented.
     
    Tv boxes are another thing.
    In the ideal world of the naked puffy angels chanting melodious high-tone songs, the organization you proposed would be perfect.
    In our world full of crap, dirt and oil it does not work at all: every chinese tv box manufacturer buy chips at the lowest price point possible on the market and put all that crap and scrap on these boards. If you read carefully the first post (and I invite you to do it) the very same rk3318 is probably a scrap chip, and eMMC chips are often failing after a while, some because are faulty, some others fail because of crappy soldering (you can ask @fabiobassa how many faulty eMMC chips desoldered from these boards).
     
    That's why Armbian does not officially tv boxes: it's a community matter, because keeping the things working with a huge hardware variety is just too difficult and very time consuming.
    In a world were everything can fit onto these boards, having one image for each box is unthinkable; I preferred a more elegant solution that allows the user to download a single image with a basic configuration that (hopefully) boots on every board with the same SoC. Once installed, the system can be further configured by the user herself to enable all the features of the board, like higher cpu speed, wifi, bluetooth, eMMC higher speed modes, leds, buttons, etc... etc...
     
    You won't find images of mine spread here and there on the forum, usually I publish images just on the first page of this thread and sometimes I prepare some special testing images for someone who has willingness to help the development progress. When everything will be stable enough, I will ask for merging to the main Armbian project, so the images will not be built and published anymore by me, but the Armbian server will build (and certify) them and they will be available in the official download page, but still totally backed and maintained by community efforts.
     
    You will find everything you need to get the thing running on the first page of the thread, so read that carefully and, if you're not satisfied, steer away from tv boxes and search for a proper SBC.
  13. Like
    jock reacted to kruzer in CSC Armbian for RK3318 TV box boards   
    Thank you, great work!
    It worked on the first try. Using multitool I've installed Armbian_21.08.0-trunk_Rk3318-box_buster_current_5.10.32_minimal on my:
    Android TV H96 Max RK3318 4/64 GB
    I set the frequency to 1.3Ghz and the box is running stable from eMMC.
    output of 7z b:
    7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21 p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,4 CPUs LE) LE CPU Freq: 1287 1292 1292 1293 797 1047 1292 1292 1292 RAM size: 3975 MB, # CPU hardware threads: 4 RAM usage: 882 MB, # Benchmark threads: 4 Compressing | Decompressing Dict Speed Usage R/U Rating | Speed Usage R/U Rating KiB/s % MIPS MIPS | KiB/s % MIPS MIPS 22: 1671 358 454 1626 | 53582 398 1149 4571 23: 1652 371 454 1684 | 52157 398 1134 4513 24: 1590 378 452 1710 | 50663 399 1115 4447 25: 1522 382 456 1738 | 45897 391 1044 4085 ---------------------------------- | ------------------------------ Avr: 372 454 1689 | 396 1111 4404 Tot: 384 782 3047  
    now I am going to try Ubuntu Focal desktop
    dmesg.txt
  14. Like
    jock got a reaction from hexdump in CSC Armbian for RK3318 TV box boards   
    ­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!
     
    This thread is to give stable and mature long-term range support to rk3318/rk3328 found in many tv boxes in Armbian project as Community Supported Configuration (CSC).
    The current work is in early stages, it may or may not work for you; if and when it will be considered mature enough, it will be hopefully merged into Armbian master, but in the meantime it lives on my personal fork on github -> here <-
     
    Important notes: is just a personal opinion, but apparently widely supported, that rk3318 chip is not an official rockchip part. They probably are scrap rk3328 parts which have not passed conformance tests but are sold anyway to tv boxes manufacturers. They don’t reach the same operating frequency of the rk3328, have much higher leakage currents (and thus higher temperatures) and often the boards they are installed on are low quality with low quality components, in fact a very very common issue is the eMMC failure due to bad parts and bad soldering. So said, I personally suggest not to buy any rk3318 tv box, but instead find a properly supported SBC (Single Board Computer) if you need a reliable product. In the unfortunate case you already have such product, this thread may help you have some fun with them.
     
    What works:
        • Works on RK3318 and RK3328 TV boxes with DDR3 memories
        • Mainline u-boot
        • Mainline ATF provided as Trusted Execution Environment
        • All 4 cores are working
        • Ethernet
        • Serial UART (configured at stock 1.5Mbps)
        • Thermals and frequency scaling
        • OTG USB 2.0 port (also as boot device!)
        • EHCI/OHCI USB 2.0 ports
        • MMC subsystem (including , SD and sdio devices)
        • Hardware video acceleration (fully supported via RKMPP on legacy kernel, support via hantro and rkvdec kernel driver on mainline)
        • Various WIFI over SDIO are supported
        • Full acceleration on legacy kernel and mainline kernel. Mainline has lima driver compiled in but X11 is albeit 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 ; you can install u-boot (and the whole system) in the internal and u-boot will always check for images on external sdcard/USB first.
     
    Unbrick:
    Technically, 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 clock pin on the PCB. Here there is the procedure (for rk322x, but on rk3318 is the same), but you can also google around if you get stuck on a faulty bootloader, the technique is pretty simple and requires a simple screwdriver.

    There are however some unfortunate cases where shorting the clock pin is difficult or impossibile, like BGA chips with no exposed pins. In those cases pay double attention when burning something on the internal flash memory and always test first the image booting from the sdcard to be sure it works before burning anything in internal flash.
     
    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 (via SD card):
     
    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 /TVB/ boards and select "rk3318-box" from the list.
       
    Development images:
    Armbian 21.08 - Debian Buster minimal - mainline kernel 5.10.34 - Download from here - Build date: 2021-05-05 Armbian 21.08 - Ubuntu Focal desktop [xfce] - mainline kernel 5.10.34 - Download from here - Build date: 2021-05-05 Armbian 21.05 - Debian Buster minimal - legacy kernel 4.4.213 - Download from here - Build date: 2021-04-16  
    Multitool:
    Multitool - A small but powerful image for RK3318/RK3328 TV Box maintenance. Download it from here  
    Quick installation instructions on :
    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 rk3318-config to configure the board specific options 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 , the box may not boot anymore forcing you to follow the unbrick section at the top of this post.
     
    Quick installation instructions to boot from SD Card:
    If you are already running Armbian from , skip to the next step. Instead if you are running the original firmware you need to first erase the internal ; 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 rk3318-config to configure the board specific options Run armbian-config to configure timezone, locales and other personal options, or also to transfer the SD Card installation to internal ; Congratulations, Armbian is running from SD Card!  
    A note about boot device order:
    With Armbian also comes mainline U-boot. If you install Armbian, the bootloader will look for valid bootable images in this order:
    External SD Card External USB Stick in OTG Port Internal  
    How to partecipate:
    If you want to partecipate, do not hesitate to share your experience with the installation procedura of the boxes.
    In case of issues and missed support, providing these things is very useful to try and bring support for an unsupported board:
     
    upload the device tree binary (dtb) of your device. We can understand a lot of things of the hardware from that small piece of data; attach a serial converter to the device and provide the output of the serial port; a link to the original firmware (you can do a full backup with the Multitool); some photos of both sides of the board. Some details of the eMMC, DDR and Wifi chips are also useful  
    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 rk3318 into armbian would not have begun without his support!
        • @hexdump for his precious support in early testing, ideas and suggestions
        • All the rockhip64 maintainers at Armbian project who have done and do most of the work to support the platform
  15. Like
    jock got a reaction from fabiobassa in CSC Armbian for RK3318 TV box boards   
    ­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!
     
    This thread is to give stable and mature long-term range support to rk3318/rk3328 found in many tv boxes in Armbian project as Community Supported Configuration (CSC).
    The current work is in early stages, it may or may not work for you; if and when it will be considered mature enough, it will be hopefully merged into Armbian master, but in the meantime it lives on my personal fork on github -> here <-
     
    Important notes: is just a personal opinion, but apparently widely supported, that rk3318 chip is not an official rockchip part. They probably are scrap rk3328 parts which have not passed conformance tests but are sold anyway to tv boxes manufacturers. They don’t reach the same operating frequency of the rk3328, have much higher leakage currents (and thus higher temperatures) and often the boards they are installed on are low quality with low quality components, in fact a very very common issue is the eMMC failure due to bad parts and bad soldering. So said, I personally suggest not to buy any rk3318 tv box, but instead find a properly supported SBC (Single Board Computer) if you need a reliable product. In the unfortunate case you already have such product, this thread may help you have some fun with them.
     
    What works:
        • Works on RK3318 and RK3328 TV boxes with DDR3 memories
        • Mainline u-boot
        • Mainline ATF provided as Trusted Execution Environment
        • All 4 cores are working
        • Ethernet
        • Serial UART (configured at stock 1.5Mbps)
        • Thermals and frequency scaling
        • OTG USB 2.0 port (also as boot device!)
        • EHCI/OHCI USB 2.0 ports
        • MMC subsystem (including , SD and sdio devices)
        • Hardware video acceleration (fully supported via RKMPP on legacy kernel, support via hantro and rkvdec kernel driver on mainline)
        • Various WIFI over SDIO are supported
        • Full acceleration on legacy kernel and mainline kernel. Mainline has lima driver compiled in but X11 is albeit 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 ; you can install u-boot (and the whole system) in the internal and u-boot will always check for images on external sdcard/USB first.
     
    Unbrick:
    Technically, 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 clock pin on the PCB. Here there is the procedure (for rk322x, but on rk3318 is the same), but you can also google around if you get stuck on a faulty bootloader, the technique is pretty simple and requires a simple screwdriver.

    There are however some unfortunate cases where shorting the clock pin is difficult or impossibile, like BGA chips with no exposed pins. In those cases pay double attention when burning something on the internal flash memory and always test first the image booting from the sdcard to be sure it works before burning anything in internal flash.
     
    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 (via SD card):
     
    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 /TVB/ boards and select "rk3318-box" from the list.
       
    Development images:
    Armbian 21.08 - Debian Buster minimal - mainline kernel 5.10.34 - Download from here - Build date: 2021-05-05 Armbian 21.08 - Ubuntu Focal desktop [xfce] - mainline kernel 5.10.34 - Download from here - Build date: 2021-05-05 Armbian 21.05 - Debian Buster minimal - legacy kernel 4.4.213 - Download from here - Build date: 2021-04-16  
    Multitool:
    Multitool - A small but powerful image for RK3318/RK3328 TV Box maintenance. Download it from here  
    Quick installation instructions on :
    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 rk3318-config to configure the board specific options 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 , the box may not boot anymore forcing you to follow the unbrick section at the top of this post.
     
    Quick installation instructions to boot from SD Card:
    If you are already running Armbian from , skip to the next step. Instead if you are running the original firmware you need to first erase the internal ; 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 rk3318-config to configure the board specific options Run armbian-config to configure timezone, locales and other personal options, or also to transfer the SD Card installation to internal ; Congratulations, Armbian is running from SD Card!  
    A note about boot device order:
    With Armbian also comes mainline U-boot. If you install Armbian, the bootloader will look for valid bootable images in this order:
    External SD Card External USB Stick in OTG Port Internal  
    How to partecipate:
    If you want to partecipate, do not hesitate to share your experience with the installation procedura of the boxes.
    In case of issues and missed support, providing these things is very useful to try and bring support for an unsupported board:
     
    upload the device tree binary (dtb) of your device. We can understand a lot of things of the hardware from that small piece of data; attach a serial converter to the device and provide the output of the serial port; a link to the original firmware (you can do a full backup with the Multitool); some photos of both sides of the board. Some details of the eMMC, DDR and Wifi chips are also useful  
    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 rk3318 into armbian would not have begun without his support!
        • @hexdump for his precious support in early testing, ideas and suggestions
        • All the rockhip64 maintainers at Armbian project who have done and do most of the work to support the platform
  16. Like
    jock got a reaction from vice in CSC Armbian for RK322X TV Boxes   
    In fact instructions in no case tell to erase flash when you use multitool.
    In case of NAND chip (and multitool clearly tells you when the board is equipped with NAND), you must use steP-nand, as stated per instructions
     
  17. Like
    jock got a reaction from gurzixo in CSC Armbian for RK322X TV Boxes   
    Hello @gurzixo, most of your observations are true, I will add some precisations to make things more clear as long as I see you like having things tidied up
     
     
    The box is surely intended by rockchip to run under Android, but tools are definitely OS-agnostic. Also the tools given by rockchip are intended also for other SoCs that are publicized and sold and supported for use in Linux (like rk3288, rk3399 and rk3328).
    Not exactly. Armbian is a set of scripts and patches that allows building Debian-based (so Debian, but also Ubuntu) images capable to boot on several ARM-based Single Board Computers (SBCs). Since ARM device does not have a standard way to boot and does not have a BIOS like x86 system, there is the need to support each SoC/board in its own peculiar way. Once you install Armbian, you have a full Debian (or Ubuntu) on your system, with some extra packages that make life much easier.
    Loader mode: right!
    Maskrom mode: right also, but the chip enters maskrom mode also when it does not find a valid bootloader in both internal and external flash memory, or using rkdeveloptool rd 3
     
    True. This page is the official rockchip documentation with the official way to handle things.
    Clearly the most important thing is to put a valid loader at sector 0x40 of internal or external flash, otherwise the SoC does not boot at all.
    You can of course alter the flow at any point, for example the idbloader can be made of rockchip blobs (ddrbin + miniloader) or can be made of full opensource software (U-boot TPL + U-boot SPL).
    If you use the rockchip blobs, you must of course put the things in the locations proposed by them, but in reality there is still a large degree of freedom.
    The DTB exists because these boards don't have a Plug and Play bios, so devices and peripherals cannot be autodetected by the kernel, but must be described somewhere. The DTB describes the devices of the board: where they are mapped in memory, whose interrupts, dmas, gpios they use, and so on. This way the kernel drivers knows how to devices.
    The "compatibility" of the DTB is determined by the kernel version: since the kernel drivers are modified during time the way to describe the resources trivially changes too, and so the DTB needs to be adjusted.
    Kernel 3.10/3.14 are waaay too old and so many things changed, so it is totally a bad idea take a dtb of such version and
    bring it to kernel 5.10 or whatever.
     
    No, according to the rockchip boot page, the very first loader is ROM code in the SoC. It is going to do these steps:
    check sector 0x40 on internal flash memory for a valid second stage loader and run it if possible check sector 0x40 on external flash memory for a valid second stage loader and run it if possible resign itself and go in maskrom mode No, absolutely.
    Putting the multitool on the internal eMMC is pointless, since it is an utility to easily install Armbian on eMMC using an sdcard.
    Just substitute the armbian image you want in place of multitool.img at step #4 and you're done.
    Also step #3 should not be really needed, because the armbian image already contains all the proper things at the right places.
    The storage map is just the default way to arrange partition proposed by rockchip when all their blobs are used, but as I said there is wide degree of freedom. Partitions also are often intended as "location where to place things", and not always proper partitions in the partition table.
    Armbian, for example, has just a single ext4 partition because all those partitions are definitely not needed and I don't use the rockchip blobs at all except for the very first DDR memory initializer.
    Multitool image, by contrast, uses the rockchip blobs but has two real partitions, and u-boot image and trust image are just at the "right places".
     
    That never worked for me, also GPT partition table is also not really needed. You can use it to customize the various binaries locations, but actually I don't think you need to complicate things.
     
    Indeed, when you're in maskrom mode the SoC is waiting for some valid code to run; it is not providing any service and no devices are initialized yet. The only command that works is rkdeveloptool db: only when you provide a valid loader (it is called usbplug in this case) the dram and emmc/nand subsystems are initialized and ready to be used.
  18. Like
    jock got a reaction from gurzixo in CSC Armbian for RK322X TV Boxes   
    Keeping android on emmc is not supported because requires some additional steps and a different bootloader arrangement.
  19. Like
    jock got a reaction from Alex83 in Station P2 looking good   
    Very cool product, 3568 in action
  20. Like
    jock reacted to rlukas210 in CSC Armbian for RK322X TV Boxes   
    @jock @fabiobassa hi after a long time!
    I have spent many hours, tried several times, blá blá blá
    After all, i got my board to work both with USB, and tried with Debian Image and nand was booted Fine!
     
    I would like to give a huge thank you to you and everyone who could make this possible! 😁😁😁
     
    edit:
     
    I can't attach the images here, but in the link below has the proof and the df output
    https://drive.google.com/folderview?id=1VJeOQczDYVTannltNl4cq0wk6WtvWokI
    One more time, a big thank for u'all!! 
  21. Like
    jock got a reaction from fabiobassa in CSC Armbian for RK322X TV Boxes   
    Hello @gurzixo, most of your observations are true, I will add some precisations to make things more clear as long as I see you like having things tidied up
     
     
    The box is surely intended by rockchip to run under Android, but tools are definitely OS-agnostic. Also the tools given by rockchip are intended also for other SoCs that are publicized and sold and supported for use in Linux (like rk3288, rk3399 and rk3328).
    Not exactly. Armbian is a set of scripts and patches that allows building Debian-based (so Debian, but also Ubuntu) images capable to boot on several ARM-based Single Board Computers (SBCs). Since ARM device does not have a standard way to boot and does not have a BIOS like x86 system, there is the need to support each SoC/board in its own peculiar way. Once you install Armbian, you have a full Debian (or Ubuntu) on your system, with some extra packages that make life much easier.
    Loader mode: right!
    Maskrom mode: right also, but the chip enters maskrom mode also when it does not find a valid bootloader in both internal and external flash memory, or using rkdeveloptool rd 3
     
    True. This page is the official rockchip documentation with the official way to handle things.
    Clearly the most important thing is to put a valid loader at sector 0x40 of internal or external flash, otherwise the SoC does not boot at all.
    You can of course alter the flow at any point, for example the idbloader can be made of rockchip blobs (ddrbin + miniloader) or can be made of full opensource software (U-boot TPL + U-boot SPL).
    If you use the rockchip blobs, you must of course put the things in the locations proposed by them, but in reality there is still a large degree of freedom.
    The DTB exists because these boards don't have a Plug and Play bios, so devices and peripherals cannot be autodetected by the kernel, but must be described somewhere. The DTB describes the devices of the board: where they are mapped in memory, whose interrupts, dmas, gpios they use, and so on. This way the kernel drivers knows how to devices.
    The "compatibility" of the DTB is determined by the kernel version: since the kernel drivers are modified during time the way to describe the resources trivially changes too, and so the DTB needs to be adjusted.
    Kernel 3.10/3.14 are waaay too old and so many things changed, so it is totally a bad idea take a dtb of such version and
    bring it to kernel 5.10 or whatever.
     
    No, according to the rockchip boot page, the very first loader is ROM code in the SoC. It is going to do these steps:
    check sector 0x40 on internal flash memory for a valid second stage loader and run it if possible check sector 0x40 on external flash memory for a valid second stage loader and run it if possible resign itself and go in maskrom mode No, absolutely.
    Putting the multitool on the internal eMMC is pointless, since it is an utility to easily install Armbian on eMMC using an sdcard.
    Just substitute the armbian image you want in place of multitool.img at step #4 and you're done.
    Also step #3 should not be really needed, because the armbian image already contains all the proper things at the right places.
    The storage map is just the default way to arrange partition proposed by rockchip when all their blobs are used, but as I said there is wide degree of freedom. Partitions also are often intended as "location where to place things", and not always proper partitions in the partition table.
    Armbian, for example, has just a single ext4 partition because all those partitions are definitely not needed and I don't use the rockchip blobs at all except for the very first DDR memory initializer.
    Multitool image, by contrast, uses the rockchip blobs but has two real partitions, and u-boot image and trust image are just at the "right places".
     
    That never worked for me, also GPT partition table is also not really needed. You can use it to customize the various binaries locations, but actually I don't think you need to complicate things.
     
    Indeed, when you're in maskrom mode the SoC is waiting for some valid code to run; it is not providing any service and no devices are initialized yet. The only command that works is rkdeveloptool db: only when you provide a valid loader (it is called usbplug in this case) the dram and emmc/nand subsystems are initialized and ready to be used.
  22. Like
    jock got a reaction from gurzixo in CSC Armbian for RK322X TV Boxes   
    @gurzixo hello. Yes, your board is doing absolutely weird things.
    This is a rare situation I yet have to understand why it happens. I have a board with rk3228a that runs for days without any issue on legacy 4.4 kernel, but crashes immediately with messages similar to yours if I use the mainline kernel.
    I tried almost everything I could think about on that board to solve or at least mitigate the issue, but with no success.
     
    If you could extract the DTB, it would very helpful for clues that may explain what is happening.
    The multitool DTB is a very basic DTB that should work on all boards, it is designed to be very compatible and usually works on most boards without complaints; the only testing thing I can imagine is to disable the vdd_log and vdd_arm regulators and removing/disabling the cpu operating frequency table to avoid frequency scaling.
     
    I already did such experiments on my rk3228a board, but it did not improve stability at all, suggesting the issue is probably elsewhere.
  23. Like
    jock got a reaction from Alex83 in CSC Armbian for RK322X TV Boxes   
    @Alex83 I have no experience with tvheadend, I don't even know what it is. It looks to me that the error is somehow related to bad architecture.
    Try to post a question in the general chit chat forum on how to compile it for armhf if it is your necessity.
  24. Like
    jock got a reaction from Alex83 in CSC Armbian for RK322X TV Boxes   
    @Alex83
    Very good! I'm very pleased to read that finally we got the best out of the board
    The wifi benchmark is excellent for a 72Mbit/s link,I'm not totally sure the chip is able to establish 40 Mhz links, I think it is a single stream chip so that is the maximum you can get from it, but nonetheless it is quite above the benchmarks I did in the past that were around 37Mbit/s.
     
    Thanks again for the patience, now I go to put credits on first page and a link to the instructions for people who wants to upgrade the NAND bootloader
  25. Like
    jock got a reaction from Alex83 in CSC Armbian for RK322X TV Boxes   
    Ahah, no wait a second. I just spotted a mistake in the instructions!
    The rkdeveloptool ef is removing again the bootloader you just installed sorry for that... (I'm going to fix them)
     
    Let's try again:
    Unplug the USB cable Plug the USB cable run upgrade_tool Wait for a minute Unplug the USB cable Then finally it should work as expected
     
    edit: going to give you credits on first page if this madness works