diff options
author | Luca Ceresoli <luca.ceresoli@comelit.it> | 2011-05-17 00:03:40 +0000 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2011-05-19 21:38:32 +0200 |
commit | 7a83af07aef3c924cfb2d36e68eea8b86d22f2a1 (patch) | |
tree | 695b7755a149f98ace4097f4a48762f258614d35 /common | |
parent | e59e35620af0d57de75cddb9ec3f19449b998868 (diff) | |
download | u-boot-imx-7a83af07aef3c924cfb2d36e68eea8b86d22f2a1.zip u-boot-imx-7a83af07aef3c924cfb2d36e68eea8b86d22f2a1.tar.gz u-boot-imx-7a83af07aef3c924cfb2d36e68eea8b86d22f2a1.tar.bz2 |
TFTP: add tftpsrv command
Signed-off-by: Luca Ceresoli <luca.ceresoli@comelit.it>
Cc: Wolfgang Denk <wd@denx.de>
Acked-by: Detlev Zundel <dzu@denx.de>
Diffstat (limited to 'common')
-rw-r--r-- | common/cmd_net.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/common/cmd_net.c b/common/cmd_net.c index 8c6f5c8..b2c9355 100644 --- a/common/cmd_net.c +++ b/common/cmd_net.c @@ -52,6 +52,23 @@ U_BOOT_CMD( "[loadAddress] [[hostIPaddr:]bootfilename]" ); +#ifdef CONFIG_CMD_TFTPSRV +static int do_tftpsrv(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) +{ + return netboot_common(TFTPSRV, cmdtp, argc, argv); +} + +U_BOOT_CMD( + tftpsrv, 2, 1, do_tftpsrv, + "act as a TFTP server and boot the first received file", + "[loadAddress]\n" + "Listen for an incoming TFTP transfer, receive a file and boot it.\n" + "The transfer is aborted if a transfer has not been started after\n" + "about 50 seconds or if Ctrl-C is pressed." +); +#endif + + #ifdef CONFIG_CMD_RARP int do_rarpb (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { |