Home / Learn Chip Programming / Embedded Linux Boot: ROM, SPL, U-Boot, Kernel, Init
Embedded Linux Boot: ROM, SPL, U-Boot, Kernel, Init
Every stage from power on to a shell prompt.
Theory in plain words
What it is
Boot ROM loads a first stage (SPL), which sets up DRAM, loads U-Boot, which loads the kernel, device tree and optional initramfs. The kernel mounts the root file system and starts init (systemd, BusyBox).
Why we use it
Boot problems are the most common first obstacle in Linux boards. Knowing each stage tells you where to look.
How it works
Serial console is the key tool: you see messages from each stage. Set boot arguments (bootargs) to choose root device and console.
Where it is used
- Custom boards
- Fast boot optimisation
- Recovering bricked boards
Boot step walkthrough
No serial output at all usually means the boot ROM cannot find a valid first stage (wrong SD card layout or boot pins).
setenv bootargs "console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait rw"
setenv bootcmd "fatload mmc 0:1 0x82000000 zImage; fatload mmc 0:1 0x88000000 board.dtb; bootz 0x82000000 - 0x88000000"
saveenv
bootQuick quiz
1. Who initialises DRAM?
DRAM must work before bigger code loads.
2. First user-space process?
The kernel starts init.
Common questions
Who initialises DRAM?
SPL or U-Boot. DRAM must work before bigger code loads.
First user-space process?
init (PID 1). The kernel starts init.