u-boot/cmd/net-lwip.c
Jerome Forissier 4d4d783812 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>
2024-10-16 11:11:56 -06:00

21 lines
494 B
C

// SPDX-License-Identifier: GPL-2.0+
/* Copyright (C) 2024 Linaro Ltd. */
#include <command.h>
#include <net.h>
#if defined(CONFIG_CMD_DHCP)
U_BOOT_CMD(
dhcp, 3, 1, do_dhcp,
"boot image via network using DHCP/TFTP protocol",
"[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