aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/net-lwip.c
diff options
context:
space:
mode:
authorJerome Forissier <jerome.forissier@linaro.org>2024-10-16 12:04:05 +0200
committerTom Rini <trini@konsulko.com>2024-10-16 11:11:56 -0600
commit4d4d7838127ec8a95d256285759e8cc781041408 (patch)
tree55618cc1557ed1072d311ae5f7b8c1bb2ce0e4bb /cmd/net-lwip.c
parent5634ecc88e9fc9bd1bd422861ee4d9dbac851b32 (diff)
downloadu-boot-4d4d7838127ec8a95d256285759e8cc781041408.tar.gz
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 <jerome.forissier@linaro.org> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Tested-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'cmd/net-lwip.c')
-rw-r--r--cmd/net-lwip.c8
1 files changed, 8 insertions, 0 deletions
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