Skip to content

Linux Boot Process

This note summarizes the boot sequence of an embedded Linux system.


Overview

The boot process of an embedded Linux system typically follows this sequence:

Power On
Boot ROM
Bootloader
Linux Kernel
Device Tree
Root File System
init / systemd
User Space

Boot ROM

Boot ROM is code stored inside the SoC.

Responsibilities:

  • Detect boot device
  • Load the bootloader into RAM
  • Transfer execution to the bootloader

Supported boot sources may include:

  • SD card
  • eMMC
  • SPI flash
  • USB
  • network boot

Bootloader

The bootloader initializes essential hardware and loads the Linux kernel.

Common embedded Linux bootloader:

  • U-Boot

Responsibilities:

  • Initialize RAM
  • Initialize storage devices
  • Load kernel image
  • Load device tree
  • Pass boot arguments to the kernel

Linux Kernel

After the bootloader loads the kernel image, the kernel begins executing.

Kernel initialization includes:

  • Memory management
  • Scheduler initialization
  • Driver initialization
  • Parsing device tree

Device Tree

The device tree describes the hardware layout of the board.

It includes:

  • CPU configuration
  • UART devices
  • SPI buses
  • GPIO mapping
  • interrupt configuration

Device tree files:

.dts
.dtb

The kernel reads the device tree to determine which drivers to initialize.


Root Filesystem

After kernel initialization, the kernel mounts the root filesystem.

Example rootfs locations:

/dev/mmcblk0p2
/dev/nvme0n1p2

Common root filesystem contents:

/bin
/etc
/usr
/lib

Embedded systems often use minimal root filesystems such as BusyBox.


init Process

After mounting the root filesystem, the kernel starts the first user-space process.

/sbin/init

Common init systems:

  • systemd
  • SysV init
  • BusyBox init

Summary

Embedded Linux boot flow:

Boot ROM
Bootloader
Kernel
Device Tree
RootFS
init
User Space