]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/cmd_net.c
TFTP: add tftpsrv command
[karo-tx-uboot.git] / common / cmd_net.c
index 8c6f5c8c3dd29d57c65bb896581708c44746d415..b2c9355a21abe2db2622b03be5a0b9a8b87370fd 100644 (file)
@@ -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[])
 {