- Cold boot starts the execution from the primary boot loader (PBL) that sets up the initial system for the eXtensible Boot Loader (XBL).
- The XBL performs wider system initialization including DDR initialization and loads a UEFI image.
- UEFI provides a rich firmware interface that loads systemd-boot as a boot manager on Qualcomm® Linux to manage the OS images.
UEFI boot managers
Qualcomm Linux supports systemd-boot as the Universal extensible firmware interface (UEFI) boot manager to load and boot the Linux kernel. The Qualcomm Linux kernel, in this case, is built as an EFI stub.Systemd-boot
Systemd-boot is a UEFI boot manager that executes EFI images, provides boot entries, and supports unified kernel images (UKI). Systemd-boot supports the following components:- Boot entries: The type 1 boot loader specification entries are in the
loader/entries/directory on the ESP. These files describe the Qualcomm® Linux kernel images with the associated initrd images and other EFI binaries. - UKI: The type 2 boot loader specification EFI unified kernel images are executable EFI binaries located in the
/EFI/Linux/directory on the ESP. For more information about the boot entries and unified kernel images, see The Boot Loader Specification.
recipes-kernel/images/esp-qcom-image.bb recipe file to handle the ESP image generation.
For more information about systemd-boot, see UEFI and systemd-boot.
Qualcomm Linux kernel as the EFI stub
The EFI boot stub allows booting the Qualcomm Linux kernel directly without a conventional EFI boot loader. The boot firmware can load the EFI image as an executable file when the Qualcomm Linux kernel is compiled with theCONFIG_EFI_STUB kernel configuration option. In this case, the firmware loader navigates to the EFI boot stub location in the EFI image drivers/firmware/efi/libstub/ to boot the kernel.
For Arm® (Arm64), where compressed kernel support is not available, the kernel image functions as a portable executable (PE) file format or common object file format (COFF) image, and the EFI stub is linked into the kernel.
For more information about booting the Linux kernel as an EFI image, see The EFI Boot Stub.
Boot images and ESP or boot partition
The ESP or boot partition serves as a storage location for theefi.bin image that packages systemd-boot and UKI. The UKI includes kernel image, initramfs, and kernel command-line arguments.
The UEFI firmware launches the UEFI boot loader and loads the kernel boot images. The ESP is formatted with the file allocation table (FAT) file system supported in the UEFI specification. For more information about the UKI image format and the corresponding support in base Qualcomm® Linux® meta layers, see UEFI and systemd-boot.
Device tree blob selection
All the device tree blobs are packaged as part ofdtb.bin. The UEFI selects and loads the right DTB for the Qualcomm Linux kernel.
To understand the boot time DTB selection, see Boot-time DTB selection.
