How to configure UEFI boot with the Distribution Package

Revision as of 14:54, 16 June 2023 by Registered User
Applicable for STM32MP13x lines, STM32MP15x lines


1. Article purpose[edit source]

The main purpose of this article is to give main steps on how to enable UEFI boot inside the Yocto build process (with the Distribution Package).

2. Enabling UEFI boot configuration[edit source]

To enable UEFI boot configuration, efi specific MACHINE_FEATURES must be set on the machine.

MACHINE_FEATURES += "efi"

The build generates a specific flashlayout which contains EFI tag on is name, like:

FlashLayout_sdcard-EFI_stm32mp157f-dk2-optee.tsv



3. UEFI configuration[edit source]

The UEFI configuration used by ST is based on Arm SystemReady IR version 1.1 configuration [1].

3.1. U-Boot Impact[edit source]

The U-Boot configuration is adapted from Arm SystemReady IR" configuration described on Arm web page [2].

The configuration activates the support of EFI and EFI variable on U-BOOT. The EFI configuration are 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 UEFI firmware support to be booted as a UEFI firmware.
A specific fragment for EFI configuration is applied on kernel configuration: optional-fragment-07-efi.config.

3.3. ST FlashLayout Impact[edit source]

For booting 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 loaded by U-Boot:

/boot/EFI/BOOT/bootarm.efi (for Armv7 architecture)



The partition loaded by U-Boot must be flagged as a ESP partitions to be sure to use read/store the EFI variables on this partitions.

4. References[edit source]