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.
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 11 for Libre Computer boards | A generic distribution on the kit boards |
| Fedora for Libre Computer boards | Another generic distribution |
| openSUSE for Libre Computer boards | Another generic distribution |
| Board firmware update images | Updating the bootloader in SPI flash |
| La Frite: how to update board UEFI firmware | The UEFI firmware update on Das Frite's predecessor |
| UEFI specifications | The standard itself |