Module 7 · Lab 5
UEFI
In lab 4 you booted a kernel by giving U-Boot exact files and addresses. UEFI replaces that board-specific knowledge with a standard interface, so a generic distribution image boots the same way on a single-board computer as on a PC.
Where this stage sits
Key ideas
- UEFI is a specification for the interface between firmware and an operating system: services to read storage, allocate memory and keep boot settings, plus a few services that stay available after the OS starts.
- U-Boot implements UEFI. Both course boards keep a UEFI bootloader in their SPI flash, so the boot media only has to carry the OS. On Das Frite, which has no card slot, this is how a stock distribution boots from a USB drive.
- The OS's loader lives on the EFI system partition, a FAT filesystem. Firmware finds it through boot entries, or through the fallback path
\EFI\BOOT\BOOTAA64.EFIon 64-bit Arm. - On Arm boards the firmware passes the device tree to the OS through UEFI as well, so the OS still learns the board's hardware.
- The payoff: distributions ship one arm64 image for many boards, and the firmware, not the image, carries what is specific to the board.
- UEFI also defines how firmware updates itself: the capsule. This is how a product updates its firmware. On the course boards, the boot menu's Firmware Update entry fetches the board's capsule from boot.libre.computer, checks it against a certificate built into U-Boot, and refuses one older than the running build. Solitude's capsule is published there; Das Frite's is not yet. No lab installs one.
On the bench
In short, what you do in lab 5, where the steps are given in full:
- Write a stock generic arm64 distribution image to a second USB drive or card and boot it through the bootloader in SPI flash.
- Inspect the EFI system partition and list the boot entries with
efibootmgr -v. - Compare the UEFI boot with the boot you did by hand in Lab 4: who chose each file and each address?
Resources
| Resource | Use in this module |
|---|---|
| Debian images for Libre Computer boards | A generic distribution on the kit boards, with each image's checksum |
| Fedora for Libre Computer boards | Another generic distribution |
| openSUSE for Libre Computer boards | Another generic distribution |
| U-Boot feature page | What each board's bootloader does, with a page per board; both course boards list UEFI capsule update |
| The Libre Computer app | Its Firmware page restores a board's boot firmware in SPI flash |
| UEFI specifications | The standard itself |