diff options
| author | Jerome Forissier <[email protected]> | 2024-10-16 12:04:05 +0200 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-10-16 11:11:56 -0600 |
| commit | 4d4d7838127ec8a95d256285759e8cc781041408 (patch) | |
| tree | 55618cc1557ed1072d311ae5f7b8c1bb2ce0e4bb /cmd | |
| parent | 5634ecc88e9fc9bd1bd422861ee4d9dbac851b32 (diff) | |
net: lwip: add TFTP support and tftpboot command
Implement do_tftpb(). This implementation of the tftp command
supports an optional port number. For example:
tftp 192.168.0.30:9069:file.bin
It also supports taking the server IP from ${tftpserverip} if
defined, before falling back to ${serverip}.
Signed-off-by: Jerome Forissier <[email protected]>
Acked-by: Ilias Apalodimas <[email protected]>
Tested-by: Ilias Apalodimas <[email protected]>
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/Kconfig | 3 | ||||
| -rw-r--r-- | cmd/net-lwip.c | 8 |
2 files changed, 9 insertions, 2 deletions
diff --git a/cmd/Kconfig b/cmd/Kconfig index 211be398937..7173f3da0b0 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -2110,10 +2110,9 @@ config CMD_MDIO config CMD_TFTPBOOT bool "tftp" select PROT_UDP_LWIP if NET_LWIP - default n + default y help tftpboot - load file via network using TFTP protocol - Currently a placeholder (not implemented) when NET_LWIP=y. endif # if CMD_NET diff --git a/cmd/net-lwip.c b/cmd/net-lwip.c index 82edb5fd2e6..80f0872bb8f 100644 --- a/cmd/net-lwip.c +++ b/cmd/net-lwip.c @@ -11,3 +11,11 @@ U_BOOT_CMD( "[loadAddress] [[hostIPaddr:]bootfilename]" ); #endif + +#if defined(CONFIG_CMD_TFTPBOOT) +U_BOOT_CMD( + tftpboot, 3, 0, do_tftpb, + "boot image via network using TFTP protocol\n", + "[loadAddress] [[hostIPaddr:]bootfilename]" +); +#endif |
