All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/6] efi_loader: run bootdev_hunt() to find ESP
@ 2024-11-27  7:06 Heinrich Schuchardt
  2024-11-27  7:06 ` [PATCH v2 1/6] test: fix test_extension.py Heinrich Schuchardt
                   ` (5 more replies)
  0 siblings, 6 replies; 26+ messages in thread
From: Heinrich Schuchardt @ 2024-11-27  7:06 UTC (permalink / raw)
  To: Tom Rini
  Cc: Simon Glass, Michal Simek, Ilias Apalodimas, Joe Hershberger,
	Ramon Fried, Jiaxun Yang, Patrick Rudolph, Jerome Forissier,
	Sumit Garg, Raymond Mao, Weijie Gao, Daniel Golle,
	Svyatoslav Ryhel, Mattijs Korpershoek, Caleb Connolly,
	Marek Vasut, Jonathan Humphreys, Dmitry Rokosov, u-boot,
	Heinrich Schuchardt

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


^ permalink raw reply	[flat|nested] 26+ messages in thread
* [PATCH v2 0/6] efi_loader: run bootdev_hunt() to find ESP
@ 2024-11-23 21:45 Heinrich Schuchardt
  2024-11-23 21:45 ` [PATCH v2 5/6] cmd: bootmenu: add parameter -e for UEFI boot options Heinrich Schuchardt
  0 siblings, 1 reply; 26+ messages in thread
From: Heinrich Schuchardt @ 2024-11-23 21:45 UTC (permalink / raw)
  To: Ilias Apalodimas
  Cc: Tom Rini, Simon Glass, Michal Simek, Joe Hershberger, Ramon Fried,
	Weijie Gao, Daniel Golle, Svyatoslav Ryhel, Mattijs Korpershoek,
	Raymond Mao, AKASHI Takahiro, Jonathan Humphreys,
	Venkatesh Yadav Abbarapu, Tejas Bhumkar, T Karthik Reddy,
	Marek Vasut, u-boot, Heinrich Schuchardt

Some hard devices need specific routines to scan for block devices,
e.g. NVMe (nvme scan), SCSI (scsi start).

Invoke bootdev_hunt() to find all block devices.

Reviewers complained that PXE boot was executed unexpectedly.
eth_bootdev_hunt() should not execute dhcp_run() as this itself would load
a file and boot it if autostart=yes. Instead just check that there is a
network device.

To fix Gitlab CI issues the following changes were 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 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:
	Do not run dhcp_run() in eth_bootdev_hunt().
	In test_extension.py do not assume initial state.
	Remove CONFIG_AMIGA_PARTITION from sandbox_deconfig.
	Remove CONFIG_USB_DWC3 from xilinx_versal_virt_defconfig.
	Add a parameter '-e' to bootmenu command.

Heinrich Schuchardt (6):
  test: fix test_extension.py
  configs: sandbox_deconfig: remove CONFIG_AMIGA_PARTITION
  configs: 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

 cmd/bootmenu.c                       | 39 +++++++++++++++++++++-------
 configs/sandbox_defconfig            |  1 -
 configs/xilinx_versal_virt_defconfig |  2 --
 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 ++-
 7 files changed, 69 insertions(+), 28 deletions(-)

-- 
2.45.2


^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2025-01-14  1:27 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-27  7:06 [PATCH v2 0/6] efi_loader: run bootdev_hunt() to find ESP Heinrich Schuchardt
2024-11-27  7:06 ` [PATCH v2 1/6] test: fix test_extension.py Heinrich Schuchardt
2024-11-27  7:06 ` [PATCH v2 2/6] configs: sandbox_deconfig: remove CONFIG_AMIGA_PARTITION Heinrich Schuchardt
2024-11-27  8:25   ` Ilias Apalodimas
2024-11-27  7:06 ` [PATCH v2 3/6] CI: xilinx_versal_virt: disable USB_DWC3 Heinrich Schuchardt
2024-11-27 12:07   ` Michal Simek
2024-11-27  7:06 ` [PATCH v2 4/6] net: eth_bootdev_hunt() should not run DHCP Heinrich Schuchardt
2024-11-27 13:07   ` Simon Glass
2024-11-27 14:00     ` Heinrich Schuchardt
2024-11-27 14:14       ` Simon Glass
2024-12-04  9:10         ` Heinrich Schuchardt
2024-12-04 15:13           ` Simon Glass
2024-11-27  7:06 ` [PATCH v2 5/6] cmd: bootmenu: add parameter -e for UEFI boot options Heinrich Schuchardt
2025-01-10 22:45   ` Tom Rini
2025-01-12 19:08     ` Heinrich Schuchardt
2025-01-13  1:51       ` Tom Rini
2025-01-13 19:01         ` Simon Glass
2025-01-13 19:04           ` Heinrich Schuchardt
2025-01-13 19:23           ` Tom Rini
2025-01-13 20:09             ` Simon Glass
2025-01-13 20:35               ` Tom Rini
2025-01-14  0:15                 ` Simon Glass
2025-01-14  1:27                   ` Tom Rini
2024-11-27  7:06 ` [PATCH v2 6/6] efi_loader: run bootdev_hunt() to find ESP Heinrich Schuchardt
  -- strict thread matches above, loose matches on Subject: below --
2024-11-23 21:45 [PATCH v2 0/6] " Heinrich Schuchardt
2024-11-23 21:45 ` [PATCH v2 5/6] cmd: bootmenu: add parameter -e for UEFI boot options Heinrich Schuchardt
2024-11-25 13:02   ` Ilias Apalodimas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.