BeginnerBeginner

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

CommandWhat it does
rkdeveloptool ldList connected devices and their mode (Maskrom / Loader)
rkdeveloptool db loader.binDownload the SPL loader to RAM (required in MaskROM)
rkdeveloptool ul loader.binUpgrade (write) the loader into flash
rkdeveloptool wl <sector> fileWrite a file starting at an LBA sector
rkdeveloptool gpt parameter.txtWrite a partition table from a Rockchip parameter file
rkdeveloptool wlx boot boot.imgWrite an image to a named partition
rkdeveloptool rfi / rciRead flash info / chip info
rkdeveloptool efErase the whole flash (careful!)
rkdeveloptool rdReset (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).

오류를 발견했거나 추가할 내용이 있나요? 개선 제안하기.

Related guides

Rockchip 기반 제품을 개발 중이신가요?

하드웨어 설계부터 Linux, Android, AI 통합까지 Rockchip 프로젝트를 위한 엔지니어링 지원을 받으세요.