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

Heinrich Schuchardt xypron.glpk at gmx.de
Tue Apr 1 18:13:35 CEST 2025


On 01.04.25 17:51, Simon Glass wrote:
> 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.

The removed call was dhcp_run(addr, NULL, true);

We have:

distro_efi_read_bootflow_net():
boot/bootmeth_efi.c:205:        ret = dhcp_run(addr, NULL, true);

script_read_bootflow_net():
boot/bootmeth_script.c:132:     ret = dhcp_run(addr, fname, true);

extlinux_pxe_read_bootflow() seems to be lacking the call.

So instead of reverting
1f68057e0320 ("net: eth_bootdev_hunt() should not run DHCP")
we should add the missing call in extlinux_pxe_read_bootflow().

Best regards

Heinrich

>>
>> 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