Last edited 4 weeks ago

How to configure UEFI boot with the Distribution Package

Applicable for STM32MP13x lines, STM32MP15x lines, STM32MP25x 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 present on U-Boot configuration and the fragment-03-efi.cfg show how to add support of initrd via EFI boot.

3.2. Kernel Impact[edit source]

The Linux® kernel must be configured with the support of the UEFI firmware to boot as a UEFI firmware.

A specific fragment for the configuration of EFI should be 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 image must be provided to U-Boot with a specific name that ends with .efi:

/boot/EFI/BOOT/bootarm.efi (for Armv7 architecture)
/boot/EFI/BOOT/bootaa64.efi (for Armv8 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]