Rockchip Command Cheatsheet
The one-liners Rockchip engineers reach for every day: flashing, serial console, device tree, GPIO, PCIe, Ethernet, NPU, camera and thermals. Click any block to copy.
Identify the board
SoC & board model
cat /proc/device-tree/compatible | tr '\0' '\n'
cat /proc/device-tree/modelKernel, CPU cores, memory
uname -a
lscpu
free -hAndroid platform
adb shell getprop ro.board.platform
Flashing (rkdeveloptool)
List devices / mode
rkdeveloptool ldMaskROM: load loader, write image, reboot
rkdeveloptool db rk3588_spl_loader_v1.xx.xxx.bin
rkdeveloptool wl 0 image.img
rkdeveloptool rdWrite mainline U-Boot to SD / eMMC
sudo dd if=u-boot-rockchip.bin of=/dev/sdX seek=64 conv=notrunc,fsyncReboot into Loader mode
sudo reboot loaderudev rule for flashing without sudo
echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="2207", MODE="0666"' | sudo tee /etc/udev/rules.d/99-rockchip.rules
Serial console
Open debug UART (1.5 Mbaud)
picocom -b 1500000 /dev/ttyUSB0
# or
screen /dev/ttyUSB0 1500000Kernel console arguments
console=ttyS2,1500000 earlycon
Device tree
Dump the live device tree
dtc -I fs /proc/device-tree 2>/dev/null > live.dtsCompile an overlay
dtc -@ -I dts -O dtb -o my.dtbo my.dtsCheck a node status
cat /proc/device-tree/pcie@fe150000/statusPinmux in use
sudo cat /sys/kernel/debug/pinctrl/*/pinmux-pins | less
GPIO (libgpiod)
List chips and lines
gpiodetect
gpioinfo gpiochip3Set / read a line (GPIO3_B5)
gpioset gpiochip3 13=1
gpioget gpiochip3 13
PCIe / NVMe / USB
PCIe devices and link speed
lspci -nn
sudo lspci -vv | grep -E 'LnkCap|LnkSta'PCIe / NVMe kernel messages
dmesg | grep -iE 'pcie|nvme|phy'USB tree and speeds
lsusb -t
sudo dmesg -w
Ethernet
Link, speed, errors
ethtool eth0
ethtool -S eth0 | grep -iE 'err|crc|drop'GMAC / PHY probe messages
dmesg | grep -iE 'stmmac|dwmac|phy'Throughput both directions
iperf3 -c <server> -t 30 && iperf3 -c <server> -R -t 30
NPU / RKNN
NPU driver version and load
sudo cat /sys/kernel/debug/rknpu/version
sudo cat /sys/kernel/debug/rknpu/loadNPU frequency
cat /sys/class/devfreq/*npu*/cur_freqRuntime library version
strings /usr/lib/librknnrt.so | grep -i 'librknnrt version'
Camera (V4L2)
Media pipeline
media-ctl -p -d /dev/media0List video devices and formats
v4l2-ctl --list-devices
v4l2-ctl -d /dev/video0 --list-formats-extGrab 10 frames
v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=NV12 --stream-mmap --stream-count=10 --stream-to=out.yuv
Thermals & clocks
Temperatures
cat /sys/class/thermal/thermal_zone*/tempCPU frequencies & governors
cat /sys/devices/system/cpu/cpufreq/policy*/scaling_cur_freq
cat /sys/devices/system/cpu/cpufreq/policy*/scaling_governorGPU load (Mali, vendor kernel)
cat /sys/class/devfreq/*gpu*/load
Missing your favourite command? Suggest it.
Rockchip 기반 제품을 개발 중이신가요?
하드웨어 설계부터 Linux, Android, AI 통합까지 Rockchip 프로젝트를 위한 엔지니어링 지원을 받으세요.