</>EmbeddedInterview

What is a bootloader and why does an embedded Linux system need one?

EasyEmbedded Linux & Boot

Short answer: A bootloader is the program that runs before the operating system. It initialises the minimum hardware the kernel needs (clocks, DRAM, storage, console), loads the kernel, device tree and optional initramfs into RAM, prepares the boot arguments and jumps to the kernel. The kernel cannot do this itself because, at power-on, nothing (not even DRAM) is ready to hold it.

What only the bootloader can do

  • DRAM bring-up: the memory controller needs board-specific timings and training before DRAM is usable.
  • Find and load the kernel from eMMC, SD, NAND, SPI NOR, USB or the network.
  • Hand over information: the device tree, bootargs, the initramfs address.
  • Choose what to boot: A/B slot selection, recovery mode, factory mode.
  • Verify signatures as part of secure boot.
  • Recovery and production: flash an image over USB/TFTP, read hardware IDs, run memory tests.

Multi-stage boot is normal. The on-chip boot ROM loads a small first stage (U-Boot SPL, a vendor FSBL, or TF-A BL2) into internal SRAM. That stage initialises DRAM and loads the full bootloader. On ARM64 the chain often includes TF-A (BL31, the EL3 secure monitor) and optionally OP-TEE.

Common bootloaders

Bootloader Where
U-Boot most ARM/RISC-V embedded boards
barebox an alternative with a cleaner driver model, used by some industrial vendors
GRUB / systemd-boot x86 and ARM servers with UEFI
UEFI (EDK II) ARM servers, some high-end SoCs
Vendor (e.g. Qualcomm XBL/ABL, Android bootloaders) phones and some SoCs

Follow-up: "Can you boot Linux without U-Boot?" Yes: Falcon mode (SPL loads the kernel directly), EFI stub (UEFI loads the kernel as an EFI application), or the Raspberry Pi firmware loading the kernel itself. You lose U-Boot's flexibility (interactive recovery, network loading), but boot is faster.