[RFC 00/14] efi_loader: improve device-tree loading

Heinrich Schuchardt heinrich.schuchardt at canonical.com
Fri Apr 26 16:13:07 CEST 2024


In U-Boot EFI boot options can already specify both an EFI binary and
an initrd. With this series we can additionally define the matching
device-tree to be loaded in the boot option.

With the last patch the boot manager will fall back the device-tree
specified by $fdtfile in directories '/dtb/', '/', or '/dtb/current/'
on the boot device if no device-tree is specified in the boot
option or via a bootefi command parameter.

Heinrich Schuchardt (14):
  efi_loader: pass GUID by address to efi_dp_from_lo
  efi_loader: library function efi_dp_merge
  efi_loader: simplify efi_dp_concat()
  cmd: eficonfig: add support for setting fdt
  cmd: efidebug: add support for setting fdt
  efi_loader: superfluous efi_restore_gd after EFI_CALL
  cmd: terminate efidebug test bootmgr early on error
  efi_loader: improve error handling in try_load_entry()
  efi_loader: do not install dtb if bootmgr fails
  efi_loader: load device-tree specified in boot option
  efi_loader: move distro_efi_get_fdt_name()
  efi_loader: return binary from efi_dp_from_lo()
  efi_loader: export efi_load_image_from_path
  efi_loader: load distro dtb in bootmgr

 boot/bootmeth_efi.c                           |  60 +-----
 cmd/bootefi.c                                 |   1 -
 cmd/eficonfig.c                               |  90 +++++++--
 cmd/efidebug.c                                |  89 +++++++--
 include/efi_loader.h                          |  15 +-
 lib/efi_loader/Makefile                       |   1 +
 lib/efi_loader/efi_bootbin.c                  |   2 +-
 lib/efi_loader/efi_bootmgr.c                  | 186 +++++++++++++-----
 lib/efi_loader/efi_boottime.c                 |   3 +-
 lib/efi_loader/efi_device_path.c              |  77 +++++---
 lib/efi_loader/efi_device_path_utilities.c    |   2 +-
 lib/efi_loader/efi_fdt.c                      | 117 +++++++++++
 lib/efi_loader/efi_helper.c                   |   6 +-
 lib/efi_loader/efi_load_initrd.c              |   2 +-
 test/py/tests/test_efi_secboot/test_signed.py |  28 +--
 .../test_efi_secboot/test_signed_intca.py     |  10 +-
 .../tests/test_efi_secboot/test_unsigned.py   |   6 +-
 17 files changed, 489 insertions(+), 206 deletions(-)
 create mode 100644 lib/efi_loader/efi_fdt.c

-- 
2.43.0



More information about the U-Boot mailing list