- Last edited 3 months ago ago
How to configure UEFI boot with the Distribution Package
Contents
1 Article purpose[edit]
The main purpose of this article is to give the main steps on how to enable the UEFI boot inside the Yocto build process with the distribution package.
2 Enabling UEFI boot configuration[edit]
To enable the UEFI boot configuration, make sure to set EFI specific MACHINE_FEATURES on the machine.
MACHINE_FEATURES += "efi"
The build generates a specific flashlayout which contains an EFI tag in its name, like:
FlashLayout_sdcard-EFI_stm32mp157f-dk2-optee.tsv
3 UEFI configuration[edit]
ST use the UEFI configuration based on Arm SystemReady IR version 1.1 configuration[1].
3.1 U-Boot Impact[edit]
The U-Boot configuration is adapted from the Arm® SystemReady IR" configuration
described on Arm® web page[2].
The configuration activates the support of UEFI and EFI variable on U-BOOT. The EFI configuration is applied via a specific fragment in U-Boot: fragment-03-efi.cfg.
3.2 Kernel Impact[edit]
The Linux® kernel is configured with the support of the UEFI firmware to
boot as a UEFI firmware.
A specific fragment for the configuration of EFI is applied on the kernel configuration: optional-fragment-07-efi.config.
3.3 ST FlashLayout Impact[edit]
In order to boot a Linux® kernel as a UEFI firmware, the kernel must be provided with a specific name, instead of zimage or uimage, on the bootfs partition that U-Boot:
/boot/EFI/BOOT/bootarm.efi (for Armv7 architecture)
To ensure that U-Boot can read and store EFI variables, make sure that the partition it loads is flagged as an ESP partition.