Flashing Firmware to Rockchip Devices in Linux with rkdeveloptool Open Source Utility

It’s been possible to flash firmware to Rockchip devices in Linux with upgrade_tool command line tool for many years, but the utility is closed-source and only supports “RK Firmware” files that are also used for OTA firmware updates, but not “raw firmware” that you’d flash directly to micro SD cards for example.

This week-end as I played with ROC-RK3328-CC board, I encountered some instability issues with micro SD cards, so I instead relied on an eMMC flash module. The only problem was that Firefly Team only releases “raw firmware” files, so I was unable to use upgrade_tool, and instead found out rkdeveloptool  open source utility was used to flash raw firmware images in Firefly’s Wiki.

Rockchip maskrom mode for rkdeveloptool

The first step is to connect a male to male USB  Type A cable (like that one on eBay)  between the board and the host computer, and connect a USB power adapter to the board. At least that’s what I had to do here, because it may be a little mode complicated in some cases. The important part is that the board must in the “maskrom mode”, and it happens automatically if:

  1. The eMMC is empty.
  2. The bootloader on eMMC is damaged.

In my case, the eMMC flash module contained Amlogic firmware, which obviously is not recognized by the Rockchip processor, so it went to maskrom mode automatically, but if your board/device can still partially boot then you need to enter masrom mode manually by making sure eMMC read data fails by shorting eMMC data/clock pin to the ground. The exact location of those pins will depend on the hardware design, and you may have to read the hardware’s schematics to find out.

ROC-RK3328-CC Short eMMC clock

They’ve made it easy on ROC-RK3328-CC board with CLK and GND test points as shown above, but again I did not have to do this since the board was already in maskrom mode.

Now we need to get rkdeveloptool source code to build and install it in our computer. Those are the instructions in Ubuntu/Debian operating systems:


You should now see the option when typing the command in a terminal:


After downloading a raw firmware image, let’s call it raw-firmware.img, we can start flashing it to the board / device. Rockchip open source website has a slightly different set of commands since they flash each partition (bootloader/u-boot/kernel/rootfs) individually, but here’s what I had to do with ROC-RK3328-CC board to flash the firmware to the eMMC flash module.

  1. Download the bootloader binary @ https://github.com/rockchip-linux/rkbin/tree/master/rk33 which will depend on your board. In my case:
  2. Flash the bootloader and raw firmware image
  3. Reboot the board
  4. Have fun with your new firmware!
Support CNX Software - Donate via PayPal or cryptocurrencies, become a Patron on Patreon, or buy review samples
Subscribe
Notify of
guest
7 Comments
oldest
newest most voted
Advertisements