[BUG] dhcp fails to download file with CONFIG_NET_LWIP=y
Tom Rini
trini at konsulko.com
Thu Nov 14 00:59:18 CET 2024
On Sat, Nov 09, 2024 at 04:22:26PM +0100, Heinrich Schuchardt wrote:
> On 11/9/24 16:12, E Shattow wrote:
> > 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:
>
> The dhcp command was explicitly built to support booting by retrieving a
> filename from the DHCP server and then loading it from a TFTP server. The
> recovery of many routers and IoT devices depends on this feature.
>
> There is an environment variable autostart that controls if the file is only
> loaded or booted.
>
> If we want to change the behavior, it should be via a well reviewed patch
> and not as a side-effect.
Yes, lwIP needs to match the long standing behavior here.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20241113/9ce88e04/attachment.sig>
More information about the U-Boot
mailing list