summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-09-07 22:33:32 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-09-07 22:33:32 +0000
commitea7c3bfaa28980d3afd3eb9f68f6aac30652c3e1 (patch)
treec3b1efe0d4ab7bc650cde730853186d54ea7b296
parent1212e377d6ad522577254fd439c61b3852753507 (diff)
2007-09-07 Joel Sherrill <joel.sherrill@oarcorp.com>
* networkconfig-qemu.h: Disable DHCP and use static IP. * networkconfig.h: Use only loopback so tests can run OK on any target even if they can't do anything. * networkconfig-icecube.h: New file.
-rw-r--r--ChangeLog7
-rw-r--r--networkconfig-icecube.h145
-rw-r--r--networkconfig-qemu.h4
-rw-r--r--networkconfig.h3
4 files changed, 157 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 42a178f..fb20fb4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-09-07 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * networkconfig-qemu.h: Disable DHCP and use static IP.
+ * networkconfig.h: Use only loopback so tests can run OK on any target
+ even if they can't do anything.
+ * networkconfig-icecube.h: New file.
+
2007-08-07 Joel Sherrill <joel.sherrill@OARcorp.com>
* VERSION: Updated to network-demos-4.7.99.2.
diff --git a/networkconfig-icecube.h b/networkconfig-icecube.h
new file mode 100644
index 0000000..6f9a05c
--- /dev/null
+++ b/networkconfig-icecube.h
@@ -0,0 +1,145 @@
+/*
+ * Network configuration for IceCub in RTEMS Lab
+ *
+ ************************************************************
+ * EDIT THIS FILE TO REFLECT YOUR NETWORK CONFIGURATION *
+ * BEFORE RUNNING ANY RTEMS PROGRAMS WHICH USE THE NETWORK! *
+ ************************************************************
+ *
+ * $Id$
+ */
+
+#ifndef _RTEMS_NETWORKCONFIG_H_
+#define _RTEMS_NETWORKCONFIG_H_
+
+/*
+ * The following will normally be set by the BSP if it supports
+ * a single network device driver. In the event, it supports
+ * multiple network device drivers, then the user's default
+ * network device driver will have to be selected by a BSP
+ * specific mechanism.
+ */
+
+#ifndef RTEMS_BSP_NETWORK_DRIVER_NAME
+#warning "RTEMS_BSP_NETWORK_DRIVER_NAME is not defined"
+#define RTEMS_BSP_NETWORK_DRIVER_NAME "no_network1"
+#endif
+
+#ifndef RTEMS_BSP_NETWORK_DRIVER_ATTACH
+#warning "RTEMS_BSP_NETWORK_DRIVER_ATTACH is not defined"
+#define RTEMS_BSP_NETWORK_DRIVER_ATTACH 0
+#endif
+
+/* #define RTEMS_USE_BOOTP */
+
+#include <bsp.h>
+
+/*
+ * Define RTEMS_SET_ETHERNET_ADDRESS if you want to specify the
+ * Ethernet address here. If RTEMS_SET_ETHERNET_ADDRESS is not
+ * defined the driver will choose an address.
+ */
+#define RTEMS_SET_ETHERNET_ADDRESS
+#if (defined (RTEMS_SET_ETHERNET_ADDRESS))
+ static char ethernet_address[6] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55 };
+#endif
+
+#ifdef RTEMS_USE_LOOPBACK
+/*
+ * Loopback interface
+ */
+extern void rtems_bsdnet_loopattach();
+static struct rtems_bsdnet_ifconfig loopback_config = {
+ "lo0", /* name */
+ rtems_bsdnet_loopattach, /* attach function */
+
+ NULL, /* link to next interface */
+
+ "127.0.0.1", /* IP address */
+ "255.0.0.0", /* IP net mask */
+};
+#endif
+
+/*
+ * Default network interface
+ */
+static struct rtems_bsdnet_ifconfig netdriver_config = {
+ RTEMS_BSP_NETWORK_DRIVER_NAME, /* name */
+ RTEMS_BSP_NETWORK_DRIVER_ATTACH, /* attach function */
+
+#ifdef RTEMS_USE_LOOPBACK
+ &loopback_config, /* link to next interface */
+#else
+ NULL, /* No more interfaces */
+#endif
+
+#if (defined (RTEMS_USE_BOOTP))
+ NULL, /* BOOTP supplies IP address */
+ NULL, /* BOOTP supplies IP net mask */
+#else
+ "192.168.1.244", /* IP address */
+ "255.255.255.0", /* IP net mask */
+#endif /* !RTEMS_USE_BOOTP */
+
+#if (defined (RTEMS_SET_ETHERNET_ADDRESS))
+ ethernet_address, /* Ethernet hardware address */
+#else
+ NULL, /* Driver supplies hardware address */
+#endif
+ 0, /* Use default driver parameters */
+ 0, /* mtu */
+ 0, /* rbuf_count */
+ 0, /* xbuf_count */
+ 0, /* port */
+ 0 /* irq */
+
+};
+
+/*
+ * Network configuration
+ */
+struct rtems_bsdnet_config rtems_bsdnet_config = {
+ &netdriver_config,
+
+#if (defined (RTEMS_USE_BOOTP))
+ rtems_bsdnet_do_bootp,
+#else
+ NULL,
+#endif
+
+ 0, /* Default network task priority */
+ 256 * 1024, /* Default mbuf capacity */
+ 256 * 1024, /* Default mbuf cluster capacity */
+
+#if (!defined (RTEMS_USE_BOOTP))
+ "rtems", /* Host name */
+ "nodomain.com", /* Domain name */
+ "192.168.1.14", /* Gateway */
+ "192.168.1.1", /* Log host */
+ {"192.168.1.1" }, /* Name server(s) */
+ {"192.168.1.1" }, /* NTP server(s) */
+#endif /* !RTEMS_USE_BOOTP */
+
+};
+
+/*
+ * For TFTP test application
+ */
+#if (defined (RTEMS_USE_BOOTP))
+#define RTEMS_TFTP_TEST_HOST_NAME "BOOTP_HOST"
+#define RTEMS_TFTP_TEST_FILE_NAME "BOOTP_FILE"
+#else
+#define RTEMS_TFTP_TEST_HOST_NAME "XXX.YYY.ZZZ.XYZ"
+#define RTEMS_TFTP_TEST_FILE_NAME "tftptest"
+#endif
+
+/*
+ * For NFS test application
+ *
+ * NFS server/path to mount and a directory to ls once mounted
+ */
+#define RTEMS_NFS_SERVER "192.168.1.210"
+#define RTEMS_NFS_SERVER_PATH "/home"
+#define RTEMS_NFS_LS_PATH "/mnt/nfstest"
+
+#endif /* _RTEMS_NETWORKCONFIG_H_ */
diff --git a/networkconfig-qemu.h b/networkconfig-qemu.h
index 21862c5..760bf6f 100644
--- a/networkconfig-qemu.h
+++ b/networkconfig-qemu.h
@@ -1,5 +1,5 @@
/*
- * Network configuration -- QEMU using DHCP
+ * Network configuration -- QEMU NOT using DHCP
*
************************************************************
* EDIT THIS FILE TO REFLECT YOUR NETWORK CONFIGURATION *
@@ -32,7 +32,7 @@
/*
* If you use DHCP on the QEMU instance, there is less configuration
*/
-#define RTEMS_USE_BOOTP
+// #define RTEMS_USE_BOOTP
#include <bsp.h>
diff --git a/networkconfig.h b/networkconfig.h
index 945f6a2..c92a3eb 100644
--- a/networkconfig.h
+++ b/networkconfig.h
@@ -46,6 +46,7 @@ static char ethernet_address[6] = { 0x00, 0x80, 0x7F, 0x22, 0x61, 0x77 };
#endif
+#define RTEMS_USE_LOOPBACK
#ifdef RTEMS_USE_LOOPBACK
/*
* Loopback interface
@@ -95,7 +96,9 @@ static struct rtems_bsdnet_ifconfig netdriver_config = {
* Network configuration
*/
struct rtems_bsdnet_config rtems_bsdnet_config = {
+#if 0
&netdriver_config,
+#endif
#if (defined (RTEMS_USE_BOOTP))
rtems_bsdnet_do_bootp,