Restore the legacy stack's TFTP behavior on top of the merged lwIP BOOTP/DHCP/PXE work in u-boot-net/for-next.
Fix write requests, retransmissions and option validation; expose client transport settings and tftpput; and add RFC 7440 receive windows. Preserve download-only internal callers while supporting command autostart after successful nonempty downloads and transport cleanup. Make automatic updates, DFU-over-TFTP and bootvx downloads work with either stack. Keep runtime restart, interface addressing, TFTP retry policy, DHCP/BOOTP autoload ownership and ICMP recovery in separate patches. Preserve the original transfer arguments across retries, refresh DHCP boot configuration when reacquiring a lease, and keep other shared-runtime clients intact. Receive-server retries use the legacy compiled defaults; uploads and the receive server remain stop-and-wait transfers. Assisted-by: Codex:gpt-6-astra Signed-off-by: James Hilliard <[email protected]> --- James Hilliard (16): net: lwip: tftp: fix write-request transfers net: lwip: tftp: fix transfer retransmissions net: lwip: tftp: honor transport variables net: lwip: tftp: add tftpput support net: tftp: make automatic updates stack-independent dfu: enable TFTP transport with lwIP net: lwip: preserve the net_loop download return contract net: lwip: tftp: support RFC 7440 receive windows net: keep internal TFTP and DHCP downloads from automatically booting net: lwip: honor autostart after TFTP download commands cmd: bootvx: use stack-independent TFTP downloads net: lwip: preserve interface state across network retries net: lwip: use the selected interface for TFTP addressing net: lwip: retry TFTP transfers using the network failure policy net: lwip: keep DHCP and BOOTP autoload retries with their caller net: lwip: retry TFTP after matching ICMP port-unreachable errors arch/sandbox/include/asm/eth.h | 6 + boot/bootmeth_efi.c | 3 +- boot/bootmeth_pxe.c | 3 +- cmd/Kconfig | 40 +- cmd/elf.c | 29 +- cmd/lwip/Makefile | 1 + cmd/lwip/tftp.c | 2 +- cmd/lwip/tftpput.c | 8 + cmd/pxe.c | 2 +- common/Kconfig | 6 +- common/update.c | 55 +- doc/usage/cmd/tftpsrv.rst | 13 +- drivers/dfu/Kconfig | 5 +- drivers/net/sandbox.c | 6 + include/net-common.h | 41 +- include/net-lwip.h | 2 + include/net/tftp.h | 3 - lib/lwip/lwip/src/apps/tftp/tftp.c | 716 +++++++++--- lib/lwip/lwip/src/core/ipv4/icmp.c | 16 +- lib/lwip/lwip/src/include/lwip/apps/tftp_client.h | 4 + lib/lwip/lwip/src/include/lwip/apps/tftp_common.h | 20 +- lib/lwip/lwip/src/include/lwip/apps/tftp_opts.h | 7 - lib/lwip/u-boot/arch/cc.h | 2 +- net/Kconfig | 19 +- net/lwip/Makefile | 2 +- net/lwip/dhcp.c | 52 +- net/lwip/icmp_unreach.c | 44 +- net/lwip/net-lwip.c | 104 +- net/lwip/tftp.c | 658 ++++++++--- net/net-common.c | 66 +- net/tftp.c | 55 +- test/dm/Makefile | 7 + test/dm/lwip.c | 115 ++ test/dm/lwip_bootp.c | 24 + test/dm/lwip_dhcp.c | 98 +- test/dm/lwip_dhcp_policy.c | 19 + test/dm/lwip_net_loop.c | 144 +++ test/dm/lwip_tftp.c | 1021 ++++++++++++++++ test/dm/tftp.c | 1282 +++++++++++++++++++++ 39 files changed, 4175 insertions(+), 525 deletions(-) --- base-commit: 28ddd369e2f7199539cdefe22ce014c592b890bd change-id: 20261009-submit-lwip-tftp-combined-v1-df537139bb01 Best regards, -- James Hilliard <[email protected]>
