U-Boot

Also known as: Das U-Boot

On this page 7

U-Boot, formally Das U-Boot, is an open-source bootloader that initializes the hardware of embedded and single-board computers and then loads and starts an operating system kernel, most often Linux. In the Boot & firmware stage of operating systems, it plays the role that UEFI firmware and a bootloader play together on a typical PC, and it is the de facto standard bootloader for ARM, RISC-V and many other embedded platforms.

U-Boot is released under the GNU General Public License version 2 and supports hundreds of boards. It can boot from eMMC, SD cards, NAND and NOR flash, USB storage, SATA, NVMe and the network, and it offers an interactive command shell for development and recovery.

How U-Boot brings a board from reset to kernel

U-Boot starts a system in several stages, because at power-on the processor can usually execute only a small amount of code from internal memory before external RAM is working. The boot ROM inside the system on chip loads a small first stage, which initializes the DRAM controller and then loads the full U-Boot image into RAM.

The first stage is called the Secondary Program Loader, or SPL, and sometimes an even smaller Tertiary Program Loader precedes the main image. On 64-bit ARM systems, SPL often loads ARM Trusted Firmware as well, which provides secure-world services before U-Boot proper continues in the normal world.

The table below traces the typical boot chain on an ARM board and what each stage is responsible for.

StageRuns fromMain task
Boot ROMOn-chip mask ROMFinds and loads the first loader from the boot medium
SPLOn-chip static RAMSets up DRAM, clocks and the boot device
ARM Trusted FirmwareSecure DRAM regionProvides secure monitor and power services
U-Boot properDRAMDrives storage, network, display and the shell
Operating system kernelDRAMTakes over with the device tree and command line
Typical U-Boot boot chain on an ARM board

Before handing over control, U-Boot passes the kernel a device tree blob describing the hardware, an optional initial RAM disk and a kernel command line. On systems that boot through UEFI, U-Boot can instead present a UEFI-compatible interface and start an EFI application such as GRUB.

Key features and configuration of U-Boot

U-Boot is configured at build time with Kconfig, the same configuration system used by the Linux kernel, and each board has a defconfig file that selects drivers and features. At run time, behavior is controlled by environment variables stored in flash, on a disk partition or compiled into the image.

FeaturePurposeExample
Environment variablesStore boot commands and settingsbootcmd, bootargs, bootdelay
Command shellInteractive recovery and debuggingReading memory, loading files, testing storage
Standard bootDiscovers bootable media automaticallyBoot methods and boot devices
FIT imagesBundle kernel, device tree and RAM diskOne signed image per release
Network bootLoad images over TFTP or HTTPLab provisioning without flashing
Driver modelUnified device driver frameworkConfigured through the device tree
Important U-Boot features and what they provide

The bootcmd variable holds the command sequence run automatically after a boot delay of a few seconds, during which a key press on the serial console opens the shell. Modern releases favor standard boot, which replaces long hand-written boot scripts with automatic discovery of boot methods such as extlinux configuration files, EFI applications and scripts.

U-Boot compared with other boot firmware

U-Boot overlaps with several neighboring boot components, but its role differs from each. On a PC, firmware and bootloader are separate layers; on an embedded board, U-Boot often performs both jobs.

ComponentMain roleTypical platform
U-BootHardware setup plus kernel loadingEmbedded ARM, RISC-V, PowerPC boards
UEFI firmwarePlatform initialization and boot servicesPCs and ARM servers
GRUBOperating system bootloader with menusPCs, often chain loaded by firmware
corebootMinimal hardware initializationChromebooks and some x86 boards
BareboxEmbedded bootloader derived from U-BootIndustrial embedded devices
How U-Boot relates to other boot components

The boundaries are blurring. U-Boot can act as a UEFI payload provider, letting standard Linux distributions boot on ARM boards with the same EFI tools they use on PCs, and coreboot can load U-Boot as a payload on some x86 machines.

Security and verified boot in U-Boot

U-Boot supports verified boot through signed FIT images. The public key is embedded in the U-Boot device tree, and U-Boot refuses to start a kernel, device tree or RAM disk whose signature does not verify. For a complete chain of trust, the boot ROM must in turn verify SPL and U-Boot through the vendor’s secure boot mechanism.

Measured boot with a TPM, rollback protection and UEFI Secure Boot are also available in recent versions. Production devices should disable or password-protect the interactive shell, because an open serial console lets anyone with physical access change boot arguments or load arbitrary code.

Common problems and practical advice

Most U-Boot problems arise from mismatched images, wrong environment values or incomplete hardware initialization. A serial console at the correct baud rate, often 115200, is the single most valuable debugging tool.

  • Keep U-Boot and the device tree in step with the kernel version, since outdated bindings can leave peripherals unusable.
  • Back up the environment before editing it, and use saveenv only after testing changes interactively.
  • Prefer mainline U-Boot over old vendor forks when possible, because mainline receives security fixes and new features.
  • Plan a recovery path, such as USB or network boot, before updating the bootloader on remote devices.
  • Never ship devices with an unprotected shell when verified boot is part of the security design.

A plain-language summary

U-Boot is the small program that wakes up a gadget’s hardware and then starts its main operating system. Think of it as a stage manager who switches on the lights, checks the microphones and then calls the main performer onto the stage.

It is used in routers, smart TVs, industrial controllers and hobby boards. Most people never see it, but without it these devices would not start.

An example from practice

An engineering team builds an industrial gateway around an ARM system on chip with 1 GB of RAM and 8 GB of eMMC storage. During development, they use U-Boot network boot over TFTP to load new kernels in seconds, without reflashing the board after every build.

For production, they package the kernel, device tree and RAM disk into one signed FIT image and store two copies in A and B partitions. U-Boot verifies the signature, boots the active copy and switches to the other copy if three boot attempts fail. When a faulty field update later corrupts one partition on a few hundred units, the gateways fall back automatically and stay online until a corrected update arrives.