summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc/dummy
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/libmisc/dummy')
-rw-r--r--cpukit/libmisc/dummy/README23
-rw-r--r--cpukit/libmisc/dummy/dummy-networking.c44
-rw-r--r--cpukit/libmisc/dummy/dummy.c38
3 files changed, 105 insertions, 0 deletions
diff --git a/cpukit/libmisc/dummy/README b/cpukit/libmisc/dummy/README
new file mode 100644
index 0000000000..03bb30834d
--- /dev/null
+++ b/cpukit/libmisc/dummy/README
@@ -0,0 +1,23 @@
+dummy.rel
+=========
+
+A relocatible objects which contains a dummy configuration for RTEMS.
+
+Helps linking standard c-program code with RTEMS, which shall *not* be run
+on a target, such as configure script code fragments generated by autoconf's
+AC_TRY_LINK.
+
+Example:
+
+tar xzvf somepkg.tar.gz
+cd somepkg
+
+LDFLAGS=/usr/local/rtems/<cpu>-rtems/<bsp>/lib/dummy.rel \
+CC="<cpu>-rtems-gcc \
+-B/usr/local/rtems/<cpu>-rtems/<bsp>/lib/ -specs bsp_specs -qrtems" \
+CC_FOR_BUILD="gcc" \
+configure --host=<cpu>-rtems --build=i686-pc-linux-gnu
+make
+
+History:
+Starting dummy.c with a copy of rtems-19990528/c/src/tests/samples/minimum/init.c
diff --git a/cpukit/libmisc/dummy/dummy-networking.c b/cpukit/libmisc/dummy/dummy-networking.c
new file mode 100644
index 0000000000..77d708d516
--- /dev/null
+++ b/cpukit/libmisc/dummy/dummy-networking.c
@@ -0,0 +1,44 @@
+/*
+ * Dummy configuration file
+ *
+ * COPYRIGHT (c) 1989-2008.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+/* Loopback Network Configuration */
+#if defined(RTEMS_NETWORKING)
+ #include <rtems/rtems_bsdnet.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+
+ struct rtems_bsdnet_config rtems_bsdnet_config = {
+ NULL, /* Network interface */
+ NULL, /* Use fixed network configuration */
+ 0, /* Default network task priority */
+ 0, /* Default mbuf capacity */
+ 0, /* Default mbuf cluster capacity */
+ "testSystem", /* Host name */
+ "nowhere.com", /* Domain name */
+ "127.0.0.1", /* Gateway */
+ "127.0.0.1", /* Log host */
+ {"127.0.0.1" }, /* Name server(s) */
+ {"127.0.0.1" }, /* NTP server(s) */
+ 1, /* sb_efficiency */
+ 0, /* udp_tx_buf_size */
+ 0, /* udp_rx_buf_size */
+ 0, /* tcp_tx_buf_size */
+ 0 /* tcp_rx_buf_size */
+ };
+#endif
diff --git a/cpukit/libmisc/dummy/dummy.c b/cpukit/libmisc/dummy/dummy.c
new file mode 100644
index 0000000000..b062c06091
--- /dev/null
+++ b/cpukit/libmisc/dummy/dummy.c
@@ -0,0 +1,38 @@
+/*
+ * Dummy configuration file
+ *
+ * COPYRIGHT (c) 1989-2008.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems.h>
+
+int main( int, char **, char **);
+
+/* configuration information */
+
+/* This is enough to get a basic main() up. */
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+#define CONFIGURE_MAXIMUM_TASKS 10
+#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
+#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20
+#define CONFIGURE_INIT_TASK_ENTRY_POINT (void *)main
+
+/* Include basic device drivers needed to call delays */
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
+