[PATCH v2 0/6] efi_loader: run bootdev_hunt() to find ESP

Heinrich Schuchardt heinrich.schuchardt at canonical.com
Wed Nov 27 08:06:25 CET 2024


When initializing the EFI sub-system we need all block devices and the
NIC to be probed. Extensions should have been applied to the device-tree.

Our current implementation only guarantees that bound block devices are
probed. But this misses out devices where binding requires specific
routines to be executed, e.g. NVMe (nvme scan), SCSI (scsi start).

Invoking bootdev_hunt() allows to find all block devices, probe the
network nic, and enable extensions.

Reviewers complained that PXE boot was executed unexpectedly with a patch
that only added the bootdev_hunt() call to the EFI sub-system
initialization.

The EFI sub-system does not require the IP address to be set up. We can
reduce the boottime by not executing dchp_run() in eth_bootdev_hunt().

Furthermore on the legacy network stack with autostart=yes dhcp_run()
tries to download the boot file via TFTP and execute it which seems
to be a problem with non-observance of autoload=no.

To fix Gitlab CI issues the following changes are necessary:

In test_extension.py do not assume that extensions have not been loaded
by bootdev hunter in a previous test.

Remove CONFIG_AMIGA_PARTITION from sandbox_deconfig to avoid a timeout.

Remove CONFIG_USB_DWC3 on the CI from xilinx_versal_virt_defconfig to
avoid a boot failure.

Add a parameter '-e' to select if UEFI boot options shall be shown by
the bootmenu command.

v2:
	disable USB_DWC3 only in CI
	update commit message for eth_bootdev_hunt() change

Heinrich Schuchardt (6):
  test: fix test_extension.py
  configs: sandbox_deconfig: remove CONFIG_AMIGA_PARTITION
  CI: xilinx_versal_virt: disable USB_DWC3
  net: eth_bootdev_hunt() must not try to boot
  cmd: bootmenu: add parameter -e for UEFI boot options
  efi_loader: run bootdev_hunt() to find ESP

 .azure-pipelines.yml            |  1 +
 .gitlab-ci.yml                  |  1 +
 cmd/bootmenu.c                  | 39 +++++++++++++++++++++++++--------
 configs/sandbox_defconfig       |  1 -
 doc/usage/cmd/bootmenu.rst      | 13 ++++++++---
 lib/efi_loader/efi_setup.c      |  8 +++++++
 net/eth_bootdev.c               | 30 +++++++++++++++----------
 test/py/tests/test_extension.py |  4 +++-
 8 files changed, 71 insertions(+), 26 deletions(-)

-- 
2.45.2



More information about the U-Boot mailing list