net: eth_bootdev_hunt() should not run DHCP
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Wed, 27 Nov 2024 07:06:29 +0000 (08:06 +0100)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sun, 5 Jan 2025 01:30:48 +0000 (02:30 +0100)
commit1f68057e03206e6597ca8b2be8bb1c49d4bd47d0
tree889a4e6b305bf3144ed59e1cce7452f57d797506
parent37e0cf42cb619f61d47b504406842b0134bb02a9
net: eth_bootdev_hunt() should not run DHCP

Currently when booting dhcp_run() may be executed multiple times:
once in eth_bootdev_hunt() and once in the network booting bootmeth.

We need to call eth_bootdev_hunt() when setting up the EFI sub-system to
supply the simple network protocol. We don't need an IP address set up.

We can reduce the bootime by not executing dhcp_run() in
eth_bootdev_hunt().

Furthermore eth_bootdev_hunt() with autostart=yes leads on the legacy
network stack leads to downloading a file via TFTP and to booting the
downloaded file.

Instead of running dchp_run() just check that there is a network device
in eth_bootdev_hunt().

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
net/eth_bootdev.c