[PATCH] Revert "net: eth_bootdev_hunt() should not run DHCP"

Simon Glass sjg at chromium.org
Tue Apr 1 17:51:48 CEST 2025


On Tue, 1 Apr 2025 at 21:38, Heiko Stuebner <heiko at sntech.de> wrote:
>
> This reverts commit 1f68057e03206e6597ca8b2be8bb1c49d4bd47d0.
>
> Commit 1f68057e0320 ("net: eth_bootdev_hunt() should not run DHCP")
> aims to reduce EFI boot times by disabling the dhcp_run when
> checking ethernet bootdevices, by preventing it from running double,
> with the reasoning
>
>     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.
>
> That might by true for EFI, but not for everything else, because when
> running distro-boot and for example the PXE method in it, nothing will
> set up an IP address now.
>
> So for example in my setup of Rockchip boards, no dhcp runs and pxe then
> fails with messages like:
>
>   Retrieving file: pxelinux.cfg/01-....
>   Speed: 100, full duplex
>   *** ERROR: `serverip' not set
>   Retrieving file: pxelinux.cfg/00000000
>   Speed: 100, full duplex
>   *** ERROR: `serverip' not set
>
> As the original commit message talks about speed efficiencies for the EFI
> side mostly, reverting this should just restore previous functionality
> (and in fact does so on my Rockchip boards).
>
> Signed-off-by: Heiko Stuebner <heiko at sntech.de>
> ---
>  net/eth_bootdev.c | 30 ++++++++++++------------------
>  1 file changed, 12 insertions(+), 18 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list