efi_loader: Run dhcp if an http boot option is selected
authorIlias Apalodimas <ilias.apalodimas@linaro.org>
Fri, 23 May 2025 13:04:04 +0000 (16:04 +0300)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sun, 25 May 2025 09:40:15 +0000 (11:40 +0200)
commitf8949b1d1d0d4dc4d5abb458c59e831b9e2a0dca
tree245cf5035b0e115368d2eb0df6a2a38dc5100e66
parent29c449ccb5bd688bc7a347faca120c6f021e543c
efi_loader: Run dhcp if an http boot option is selected

The EFI boot manager relies on having an IP address before trying to
boot an EFI HTTP(s) boot entry. However, defining it as a boot or
pre-boot command is not always the right answer since it will
unconditionally add delay to the board boot, even if we don't boot
over the network.

So let's do a DHCP request from the boot manager, if 'ipaddr' is
empty and fail early if we don't have an address.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Michal Simek <michal.simek@amd.com>
lib/efi_loader/efi_bootmgr.c