[PATCH v2 0/4] boot: fix EFI boot methods

Heinrich Schuchardt heinrich.schuchardt at canonical.com
Thu Apr 4 13:47:38 CEST 2024


The default sequence of boot methods is determined by alphabetical sorting
during linkage.

* efi_mgr must run before efi to be UEFI compliant
* pxe should run as last resort

If UEFI is enabled in U-Boot, we want it to conform to the UEFI
specification. This requires enabling the boot manager boot method.

The sandbox must not use an arbitrary file name bootsbox.efi but the
file name matching the host architecture to properly boot the respective
file. We already have an include which provides a macro with the name of
the EFI binary. Use it.

The path to the EFI binary should be absolute.

The path and the file name must be capitalized to conform to the UEFI
specification. This is important when reading from case sensitive
file systems.

v2:
	fix building with EFI_BOOT_MGR but w/o BOOTSTD
	correct finding the default EFI binary

Heinrich Schuchardt (4):
  boot: correct the default sequence of boot methods
  boot: enable booting via EFI boot manager by default
  efi_loader: move HOST_ARCH to version_autogenerated.h
  boot: correct finding the default EFI binary

 Makefile                |  1 +
 arch/sandbox/config.mk  |  2 --
 boot/Kconfig            | 10 +++++++++
 boot/Makefile           |  2 +-
 boot/bootmeth_efi.c     | 46 ++++-------------------------------------
 boot/bootmeth_efi_mgr.c |  2 +-
 boot/bootmeth_pxe.c     |  2 +-
 include/host_arch.h     |  2 ++
 lib/efi_loader/Kconfig  |  1 -
 lib/efi_loader/Makefile |  3 +--
 test/boot/bootflow.c    |  6 ++++--
 11 files changed, 25 insertions(+), 52 deletions(-)

-- 
2.43.0



More information about the U-Boot mailing list