Flash Any Rockchip Board with rkdeveloptool (Linux & macOS)
Build rkdeveloptool from source, set up udev permissions, and flash raw images, partitions and SPI flash on Rockchip boards.
Applies to: All Rockchip SoCs
rkdeveloptool is Rockchip's open-source command-line flashing tool. It talks to boards in MaskROM or Loader mode over USB.
Build and install
# Debian / Ubuntu
sudo apt install -y libudev-dev libusb-1.0-0-dev dh-autoreconf pkg-config build-essential git
git clone https://github.com/rockchip-linux/rkdeveloptool
cd rkdeveloptool
autoreconf -i
./configure
make
sudo cp rkdeveloptool /usr/local/bin/
On macOS, install libusb, automake and autoconf with Homebrew and follow the same steps. Several board vendors (e.g. Radxa) maintain forks with extra commands such as storage selection for SPI NOR. Use the fork your board vendor recommends if you need those.
USB permissions (Linux)
echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="2207", MODE="0666"' | \
sudo tee /etc/udev/rules.d/99-rockchip.rules
sudo udevadm control --reload-rules && sudo udevadm trigger
Everyday commands
| Command | What it does |
|---|---|
rkdeveloptool ld | List connected devices and their mode (Maskrom / Loader) |
rkdeveloptool db loader.bin | Download the SPL loader to RAM (required in MaskROM) |
rkdeveloptool ul loader.bin | Upgrade (write) the loader into flash |
rkdeveloptool wl <sector> file | Write a file starting at an LBA sector |
rkdeveloptool gpt parameter.txt | Write a partition table from a Rockchip parameter file |
rkdeveloptool wlx boot boot.img | Write an image to a named partition |
rkdeveloptool rfi / rci | Read flash info / chip info |
rkdeveloptool ef | Erase the whole flash (careful!) |
rkdeveloptool rd | Reset (reboot) the device |
Flash a full disk image to eMMC
rkdeveloptool ld # confirm Maskrom
rkdeveloptool db rk3588_spl_loader_v1.xx.xxx.bin
rkdeveloptool wl 0 ubuntu-rk3588.img
rkdeveloptool rd
Common errors
- "not found any devices": board not in MaskROM/Loader mode, wrong port or charge-only cable.
- "Creating Comm Object failed": USB permission issue (udev rule) or another tool holds the device.
- "Download boot failed": wrong loader for the SoC, or the device already left MaskROM. Power-cycle into MaskROM again.
- Write stalls part-way: USB hub or cable problem. Use a direct port and a short cable.
For Windows and packed update.img firmware, use Rockchip's RKDevTool instead (see RKDevTool).
Spotted an error or have something to add? Suggest an improvement.