Skip to the content ForoHackers
Log inJoin

Bootloaders: start here

Bootloaders
#2953 · · Quote · Report

A bootloader is the first code you control when a machine starts: it sets up enough hardware to load the next stage and hands over. On a PC that is UEFI and GRUB; on a board, U-Boot or a small loader in flash; on a phone, a chain of signed stages.

Key concepts

  • Boot stages: boot ROM, first-stage loader, second stage, kernel or application.
  • Memory setup: early code runs from on-chip RAM until it brings up external DRAM.
  • Secure boot: each stage checks the signature of the next against a key it trusts.
  • Recovery: a way back when the next stage is broken, such as a fallback image or a USB download mode.
  • Hand-off: what the bootloader passes on, such as a device tree, a command line or memory maps.

Vocabulary

  • Boot ROM: code burned into the chip that runs first and cannot be changed.
  • UEFI: the firmware interface of most PCs, with its own drivers and boot manager.
  • Chain of trust: the sequence of signature checks from the ROM to the operating system.
  • DFU: device firmware upgrade, a standard USB mode to write new firmware.

What to study, in order

  1. How your own PC boots: UEFI settings, boot entries, the kernel command line.
  2. U-Boot on a single-board computer: its shell, environment and boot scripts.
  3. Write a tiny bootloader for a microcontroller that jumps to an application.
  4. Add signature verification and a fallback image.
  5. Read a vendor's secure-boot documentation and list what it trusts.

Related tags

#firmware #embedded-linux #hardware-security #microcontrollers

You are not logged in, so this goes up anonymously: no account, no name and no address is stored with it, and it may carry no link and no image. Log in or join to post under your name. Our web server's logs keep the address and time of every request for up to 14 days; to keep yours out of them, use Tor. To reach the staff in confidence, use the drop. Sign as a returning source (a key kept only in this browser)

Sending takes a few seconds here: your browser first works out a proof of work against spam.

Reply