summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorwdenk <wdenk>2003-06-05 19:27:42 +0000
committerwdenk <wdenk>2003-06-05 19:27:42 +0000
commit73a8b27c574f5ec1c8fdd9d8d065bb845d8743d3 (patch)
treef409359364776e565b9484337a0620388041b456 /common
parent08eaea9c9fa4e8ea25325610c512cb90b6bea1dd (diff)
downloadtalos-obmc-uboot-73a8b27c574f5ec1c8fdd9d8d065bb845d8743d3.tar.gz
talos-obmc-uboot-73a8b27c574f5ec1c8fdd9d8d065bb845d8743d3.zip
* Add support for RMU board
* Add support for TQM862L at 100/50 MHz * Patch by Pantelis Antoniou, 02 Jun 2003: major reconstruction of networking code; add "ping" support (outgoing only!)
Diffstat (limited to 'common')
-rw-r--r--common/cmd_net.c27
-rw-r--r--common/command.c1
2 files changed, 28 insertions, 0 deletions
diff --git a/common/cmd_net.c b/common/cmd_net.c
index a1ff2ba9a6..e8bf0ae9f2 100644
--- a/common/cmd_net.c
+++ b/common/cmd_net.c
@@ -95,6 +95,10 @@ static void netboot_update_env(void)
ip_to_string (NetOurDNSIP, tmp);
setenv("dnsip", tmp);
}
+
+ if (NetOurNISDomain[0])
+ setenv("domain", NetOurNISDomain);
+
}
static int
netboot_common (int proto, cmd_tbl_t *cmdtp, int argc, char *argv[])
@@ -165,4 +169,27 @@ netboot_common (int proto, cmd_tbl_t *cmdtp, int argc, char *argv[])
return rcode;
}
+#if (CONFIG_COMMANDS & CFG_CMD_PING)
+int do_ping (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+ if (argc < 2)
+ return -1;
+
+ NetPingIP = string_to_ip(argv[1]);
+ if (NetPingIP == 0) {
+ printf ("Usage:\n%s\n", cmdtp->usage);
+ return -1;
+ }
+
+ if (NetLoop(PING) < 0) {
+ printf("ping failed; host %s is not alive\n", argv[1]);
+ return 1;
+ }
+
+ printf("host %s is alive\n", argv[1]);
+
+ return 0;
+}
+#endif /* CFG_CMD_PING */
+
#endif /* CFG_CMD_NET */
diff --git a/common/command.c b/common/command.c
index 9e631f1c5d..d52ddf1c8f 100644
--- a/common/command.c
+++ b/common/command.c
@@ -316,6 +316,7 @@ cmd_tbl_t cmd_tbl[] = {
CMD_TBL_NANDBOOT
CMD_TBL_NEXT
CMD_TBL_NM
+ CMD_TBL_PING
CMD_TBL_PORTIO_OUT
CMD_TBL_PCI
CMD_TBL_PRINTENV
OpenPOWER on IntegriCloud