Saltar al contenido ForoHackers

Bootloaders: start here

Gestores de arranque
#447 · Ophuscado · · Denunciar

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

Inicia sesión o únete para responder.