mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-17 10:24:49 +00:00

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>
21 lines
494 B
C
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
|