UEFI boot manager overview
A UEFI boot manager is a program that runs after firmware platform initialization and is responsible for selecting and launching an OS image. On Qualcomm Linux:- The XBL firmware initialises hardware (DDR, clocks, security) and hands off to
a UEFI image stored in the
abl_a/abl_bpartitions. - UEFI firmware performs UEFI platform initialization, discovers the EFI System Partition (ESP), and launches the default EFI application (systemd-boot).
- systemd-boot reads boot entries from the ESP, displays a menu if needed, and executes the selected kernel EFI binary.
systemd-boot behavior
systemd-boot is a minimal, spec-compliant UEFI boot manager from the systemd project. It implements the Boot Loader Specification (BLS) and supports both Type 1 and Type 2 boot entries.Boot entry discovery
On startup, systemd-boot scans the ESP for valid entries in the following locations:
On Qualcomm Linux, kernels are packaged exclusively as Type 2 UKI images
placed in
EFI/Linux/.
loader.conf
Global defaults for systemd-boot are stored inloader/loader.conf on the ESP.
The Qualcomm Linux Yocto build writes a minimal loader.conf:
View Boot entry formats
Type 1 drop-in .conf files
Type 1 entries are plain-text.conf files placed in loader/entries/ on the
ESP. Each file describes one boot entry:
Qualcomm Linux does not use Type 1 entries in production. The layout is shown
here for reference when adding custom entries.
Type 2 Unified Kernel Images (UKI)
A UKI is a single EFI binary that embeds the Linux kernel image, initramfs, kernel command line, and optionally a device tree. UEFI firmware (or systemd-boot) can execute a UKI directly without any supporting.conf file.
UKI files are placed in EFI/Linux/ on the ESP and named with an .efi
extension (for example linux.efi, linux-rt.efi). systemd-boot identifies
them automatically by scanning that directory.
For the UKI image format specification, see
Type 2 EFI Unified Kernel Images.
Generate Yocto ESP image
The Yoctometa-qcom layer provides the recipe
recipes-kernel/images/esp-qcom-image.bb that assembles the ESP image
(efi.bin). The recipe:
- Builds systemd-boot from the
systemdpackage and copies thesystemd-boot.efibinary toEFI/BOOT/BOOTAA64.EFIwhich is the default UEFI removable media boot path. - Packages the kernel, initramfs, and command line into a UKI using
ukifyand writes it toEFI/Linux/linux.efi(orEFI/Linux/linux-rt.efifor RT builds). - Writes
loader/loader.confwith the default timeout and entry policy. - Formats everything into a FAT32 image and stores it as
efi.binin the build deploy directory.
efi.bin is flashed to the efi partition on the device.
For flashing instructions, see Install & boot the kernel.
For more information about the secure boot integration, see
Configure and secure boot with systemd-boot and UKI.
