From 8bde7f776c77b343aca29b8c7b58464d915ac245 Mon Sep 17 00:00:00 2001 From: wdenk Date: Fri, 27 Jun 2003 21:31:46 +0000 Subject: * Code cleanup: - remove trailing white space, trailing empty lines, C++ comments, etc. - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c) * Patches by Kenneth Johansson, 25 Jun 2003: - major rework of command structure (work done mostly by Michal Cendrowski and Joakim Kristiansen) --- common/cmd_net.c | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) (limited to 'common/cmd_net.c') diff --git a/common/cmd_net.c b/common/cmd_net.c index e8bf0ae..44c86e2 100644 --- a/common/cmd_net.c +++ b/common/cmd_net.c @@ -26,14 +26,11 @@ */ #include #include -#include +#include #include #if (CONFIG_COMMANDS & CFG_CMD_NET) -# if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) -# include -# endif extern int do_bootm (cmd_tbl_t *, int, int, char *[]); @@ -44,21 +41,46 @@ int do_bootp (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return netboot_common (BOOTP, cmdtp, argc, argv); } +cmd_tbl_t U_BOOT_CMD(BOOTP) = MK_CMD_ENTRY( + "bootp", 3, 1, do_bootp, + "bootp - boot image via network using BootP/TFTP protocol\n", + "[loadAddress] [bootfilename]\n" +); + int do_tftpb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { return netboot_common (TFTP, cmdtp, argc, argv); } +cmd_tbl_t U_BOOT_CMD(TFTPB) = MK_CMD_ENTRY( + "tftpboot", 3, 1, do_tftpb, + "tftpboot- boot image via network using TFTP protocol\n" + " and env variables ipaddr and serverip\n", + "[loadAddress] [bootfilename]\n" +); + int do_rarpb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { return netboot_common (RARP, cmdtp, argc, argv); } +cmd_tbl_t U_BOOT_CMD(RARPB) = MK_CMD_ENTRY( + "rarpboot", 3, 1, do_rarpb, + "rarpboot- boot image via network using RARP/TFTP protocol\n", + "[loadAddress] [bootfilename]\n" +); + #if (CONFIG_COMMANDS & CFG_CMD_DHCP) int do_dhcp (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { return netboot_common(DHCP, cmdtp, argc, argv); } + +cmd_tbl_t U_BOOT_CMD(DHCP) = MK_CMD_ENTRY( + "dhcp", 3, 1, do_dhcp, + "dhcp - invoke DHCP client to obtain IP/boot params\n", + "\n" +); #endif /* CFG_CMD_DHCP */ static void netboot_update_env(void) -- cgit v1.1