[BUG] dhcp fails to download file with CONFIG_NET_LWIP=y
E Shattow
lucent at gmail.com
Sat Nov 9 16:12:41 CET 2024
On Sat, Nov 9, 2024 at 6:20 AM Heinrich Schuchardt
<heinrich.schuchardt at canonical.com> wrote:
>
> Hello Jerome,
>
> Using the old network stack U-Boot's dhcp command can be used to
> download via TFTP. This fails with the lwIP stack:
>
> StarFive # dhcp $kernel_addr_r 192.168.1.103:/vf2/grubriscv64.efi
> ethernet at 16030000 Waiting for PHY auto negotiation to complete.... done
> DHCP client bound to address 192.168.1.47 (233 ms)
> StarFive # tftpboot $kernel_addr_r 192.168.1.103:/vf2/grubriscv64.efi
> Using ethernet at 16030000 device
> TFTP from server 192.168.1.103; our IP address is 192.168.1.47
> Filename '/vf2/grubriscv64.efi'.
> Load address: 0x40200000
> Loading: #################################################################
> #################################################################
> #################################################################
> #################################################################
> #########
> 4.1 MiB/s
>
> We should try to provide the old functionality to make the move to lwIP
> seamless.
>
> In the CI QEMU instances we already have
>
> test/py/tests/test_net.py
>
> to test tftpboot. We should add an equivalent dhcp test.
>
> Best regards
>
> Heinrich
It is useful to have dhcp assignment without the side-effect of trying
to load files. Your script can be updated to:
dhcp ; tftpboot $kernel_addr_r 192.168.1.103:/vf2/grubriscv64.efi
I agree this is a change in the user interface, but this change makes
sense to me. There needs to be a way to boot tftp using the DHCP
optioned tftp server, but a command 'dhcp' does not have boot in the
name it is not clear what this command does. All other commands that
do a boot action have 'boot' in the name? Perhaps dhcpboot or to make
tftpboot with an option to use DHCP options for the tftp server
location.
I don't think 'dhcp' should do anything except DHCP.
-E
More information about the U-Boot
mailing list