Skip to main content

Introduction to Rockchip Boot

1. Introduction​

Between power-on and the desktop, a board initializes memory, loads its bootloader, starts the kernel, mounts the root filesystem and launches services. Understanding the execution sequence and dependencies helps locate boot failures, verify configuration and select an appropriate recovery method.

This guide focuses on ArmSoM's Rockchip platforms, using the RK3576 and RK3588 families and armsom-sdk Debian 12 and Ubuntu 22.04 images as examples. Both distributions can use boot firmware and a kernel from the same SDK; their main differences are the packages and services in the root filesystem. GNOME, XFCE and Server variants affect the environment after userspace starts.

Scope

The principles also help explain other Rockchip boards, but boot components, partition layouts and boot priority depend on the board, SDK configuration and image. The /boot/uEnv examples apply to relevant ArmSoM SDK images. Armbian, third-party images and Android may use different configuration mechanisms.

2. System boot flow​

2.1 Boot stages and component responsibilities​

Rockchip Arm64 Linux boot flow: BootROM, DDR and early loader, TF-A, U-Boot, kernel and userspace

Typical Arm64 boot flow; the board and SDK configuration determine the components
StageMain responsibilityDiagnostic checks
BootROMCode built into the SoC finds and loads the early boot program after power-onBoot media and valid boot data; this stage usually has no visible serial output
DDR initialization and early loaderInitialize memory; SPL, miniloader or equivalent code loads subsequent firmwareDDR parameters, memory capacity, storage reads and image verification
TF-A / secure firmwareOn Arm64 platforms, BL31 commonly provides the secure monitor and runtime services; OP-TEE is optionalInitialization messages such as BL31 and OP-TEE
U-BootInitialize peripherals needed for boot, read configuration, and load the kernel, device tree and optional initramfsBoot device, file paths, device tree and kernel arguments
Linux kernelInitialize drivers, access storage and reach the root filesystem, optionally assisted by initramfsLinux version, driver messages and root filesystem mount results
UserspaceOn Debian / Ubuntu, systemd normally starts networking, login, the desktop and application servicesLogin prompts, failed services and desktop startup

The device tree (DTB) describes the board's hardware connections so the kernel can configure devices and match drivers. An initramfs is optional early userspace that can load modules or prepare mounts before the real root filesystem is available. It differs from the rootfs that stores system software and user files.

2.2 SPL, miniloader and rkbin​

Two common early-loader arrangements are DDR initialization code with U-Boot SPL, and DDR initialization code with Rockchip miniloader. Some platforms use U-Boot TPL for memory initialization; others use a Rockchip DDR binary. Using SPL does not imply that every early component has an available open-source implementation. See the U-Boot Rockchip platform documentation for supported combinations.

rkbin is Rockchip's boot firmware and tools repository. It contains components such as DDR firmware, SPL, USB download code, BL31 and OP-TEE. It is an SDK component, rather than a Debian or Ubuntu system image.

Recognizing the transition to Linux

Starting kernel ... means U-Boot is about to hand control to the kernel. A subsequent Linux version message confirms that the kernel has started producing output. If serial or SSH login works, the system has reached userspace; a blank HDMI display then calls for checking display configuration and desktop services.

3. Boot files in the SDK​

3.1 Build outputs and partitions​

After an SDK build, packaged files are typically accessible through rockdev/; some versions link to output/firmware/. The following table describes common ArmSoM SDK outputs. Not every configuration produces every file.

FilePurposeRole in booting
MiniLoaderAll.bin or a chip-specific *_loader_*.binLoader package used by flashing toolsInitializes memory and establishes download capabilities; its contents depend on the SDK
uboot.imgFirmware for the U-Boot stageSome SDKs use FIT packaging, which can include U-Boot and secure firmware components
trust.imgSeparate secure firmware imageUsed by some arrangements; it may be absent when secure firmware is included in a FIT image
boot.img / extboot.imgBoot partition imageIn relevant ArmSoM SDK configurations, boot.img links to the kernel build's extboot.img, containing boot scripts, the kernel, device trees and related files
rootfs.imgRoot filesystem imageContains Debian / Ubuntu system programs, libraries and services
parameter.txtPartition layout configurationDescribes partition names, sizes and positions; it must match the board and packaging configuration
update.imgCombined upgrade packageSupplies the Loader, partition configuration and images to a flashing tool; the CPU does not execute the entire package

Other U-Boot build arrangements may produce idbloader.img, u-boot.itb or u-boot-rockchip.bin. These names reflect different packaging schemes and are not direct replacements for similarly purposed SDK files. For building and packaging, see the ArmSoM SDK guide.

Do not reuse fixed flashing offsets

Sector addresses in an online example may not apply to your image. Use the board's partition layout, packaging configuration and flashing instructions. The name uboot.img alone also does not tell you whether a separate trust.img is required.

3.2 The system's /boot directory​

Images using ArmSoM SDK boot scripts commonly contain the following under /boot:

Path or filePurpose
boot.scrScript executed by U-Boot to read configuration and load the kernel and related files
uEnv/uEnv.txtBoot configuration entry point, which may link to a board-specific configuration
rk-kernel.dtbMain device tree entry point; relevant images use a symbolic link to select the board's DTB
dtb/, dtb/overlay/Main device trees and device tree overlays
Kernel and initrd filesSelected by the boot script and configuration; names vary with the image and kernel version

U-Boot reads paths within the boot partition, while Linux may mount that partition at /boot. As a result, /uEnv/uEnv.txt in the serial log and /boot/uEnv/uEnv.txt after login can refer to the same file.

See Overlay configuration for enabling overlays. When replacing a kernel, keep the device tree, kernel modules and boot configuration compatible. Follow the “Updating the Kernel” section of the ArmSoM SDK guide.

4. Boot media and download modes​

4.1 Boot media and system loading paths​

Boot configuration must distinguish the medium used to load early boot firmware from the storage locations of the kernel and root filesystem. These components can reside on the same medium or on separate devices, depending on boot firmware support.

Medium or methodCommon usePrerequisites
eMMC / microSDStore boot firmware, the boot partition and root filesystemA board-compatible image, readable media and correct boot configuration
SPI FlashStore early boot firmware and U-Boot, then load the system from another deviceSuitable board hardware and a matching SPI firmware image
NVMe / USB storageStore the root filesystem, and the kernel in supported configurationsTypically requires boot firmware to run first from SPI, eMMC, SD or another supported medium before a later stage accesses the device
Network bootFor example, load a kernel over TFTP and provide the root filesystem over NFSA working bootloader, with networking, kernel and root filesystem configured
Media selection and priority by boot stage

BootROM selects the early boot medium, while SPL and U-Boot load subsequent images according to their respective configurations. Media selection and priority at each stage depend on the SoC, board configuration and boot firmware. When the root filesystem resides on NVMe, use early boot logs to identify the medium from which the boot firmware was loaded.

4.2 Normal boot, Loader and Maskrom​

ModeStateMain use
Normal bootLoad the kernel and system according to the boot configurationRun Debian, Ubuntu or another OS
Loader download modeDownload code is running and can communicate with the computer's flashing toolFirmware upgrades and partition writes
Maskrom modeUSB download entry point provided by the SoC's BootROMBlank media, damaged early boot firmware or deliberate entry into download mode; a matching Loader normally needs to be loaded first

Follow the product's button and USB OTG instructions, then use the system image flashing guide. A Recovery button, Loader download mode and the Android Recovery system are different concepts. Use the mode reported by the flashing tool and the board's instructions to identify the actual state.

5. Inspect boot status on the board​

Run the following commands in a logged-in Debian / Ubuntu terminal. They read status and logs without requiring additional development tools.

5.1 Identify the board, kernel and root partition​

tr '\0' '\n' < /proc/device-tree/model
uname -r
cat /etc/os-release
cat /proc/cmdline

These commands show the model from the running device tree, the running kernel, the distribution and the kernel command line. In /proc/cmdline, root= commonly identifies the root partition, while console= selects kernel log output terminals.

findmnt -o SOURCE,FSTYPE,TARGET /
findmnt -T /boot
lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINTS,PARTUUID

findmnt shows the devices actually mounted; lsblk helps map disks and partitions. /boot may be a separate partition or a directory in the root filesystem. Do not assume that a fixed mmcblk number identifies eMMC or SD across all images.

5.2 Inspect boot configuration and the device tree​

List /boot, then read configuration files that exist:

ls -l /boot
if [ -f /boot/uEnv/uEnv.txt ]; then
ls -l /boot/uEnv/uEnv.txt
cat /boot/uEnv/uEnv.txt
fi
if [ -e /boot/rk-kernel.dtb ]; then
ls -l /boot/rk-kernel.dtb
fi

Check the selected kernel, initrd, kernel arguments and overlays, and whether symbolic links point to the correct board's files. Configuration on disk affects subsequent boots; use /proc/cmdline, the running device tree and boot logs to understand the current system.

If there is no uEnv file

Some images use extlinux.conf or another mechanism. Identify the loading path from /boot and U-Boot output before making changes. Do not simply copy uEnv.txt from a different image.

5.3 Inspect services and startup time​

systemctl --failed --no-pager
sudo journalctl -b -p warning --no-pager
systemd-analyze time
systemd-analyze critical-chain

The first two commands show failed services and warning logs from the current boot. The last two report startup timing and the critical dependency chain recorded by systemd. If startup is reported as incomplete, continue checking service state and logs.

Limits of startup timing

systemd-analyze does not necessarily include BootROM, DDR initialization or U-Boot time. Its result is also not the complete time from pressing the power button to an interactive desktop. To measure the whole sequence, separately record power-on and the moment the intended interface becomes ready. See the systemd documentation for timing definitions.

6. Troubleshoot by boot stage​

6.1 Locate failures by boot stage​

Connect the debug serial port as described in the product guide and start recording before power-on. Use the wiring, voltage levels and baud rate specified for your board.

SymptomCheck first
No serial outputPower, debug serial wiring, baud rate and serial device; silence alone does not establish a BootROM failure
Stops during DDR initialization or SPLBoard/Loader compatibility, stable power and readability of subsequent images
U-Boot starts but cannot find the kernel or DTBBoot partition, script paths, missing files and symbolic link targets
No output after Starting kernel ...console= settings and kernel/DTB compatibility; output may have moved to another terminal
Unable to mount root fs or continuous waiting for a root deviceroot=, partition identifiers, storage drivers, filesystem support and any required initramfs
Login works but the desktop does not appearWhether this is a Server image, display connections, graphics drivers and desktop services
Slow startup or failed servicesCurrent-boot logs and service dependencies; long waits for networking, mounts or applications

The following excerpt comes from a CM5 (RK3576) serial boot log, with intermediate output omitted:

U-Boot SPL board init
Trying to boot from MMC2
MMC: no card present
...
Trying to boot from MMC1
...
Bootdev(atags): mmc 0
...
Found U-Boot script /boot.scr
...
Starting kernel ...
...
[ 2.957186] VFS: Mounted root (ext4 filesystem) on device 179:3.

Here, one media probe failed, but a later medium allowed startup to complete. Read subsequent output before treating no card present as a boot failure. Device numbers in SPL, U-Boot and Linux should not be assumed to refer to the same devices.

6.2 Save diagnostic information​

If you can log in, save logs from the current boot in ~/boot-logs:

mkdir -p ~/boot-logs
sudo journalctl -b -k --no-pager > ~/boot-logs/kernel.log
sudo journalctl -b --no-pager > ~/boot-logs/system.log

kernel.log contains kernel messages; system.log contains system logs. These files do not contain the complete BootROM, DDR and U-Boot serial output. Capture early-stage output separately with a serial terminal on your computer.

When reporting a problem, include the board model, image filename, power supply and boot media, last change made, and complete serial log. For basic power-on and login steps, see Boot and log in to the system.

Contact us