Last edited 9 months ago

How to configure UEFI boot with the Distribution Package

Applicable for STM32MP13x lines, STM32MP15x lines


1 Article purpose[edit source]

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 source]

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 source]

ST use the UEFI configuration based on Arm SystemReady IR version 1.1 configuration[1].

3.1 U-Boot Impact[edit source]

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 source]

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 source]

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.

4 References[edit source]