From 7e7dac757b2b733584f573e5c5e2323d85e59379 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 26 Jul 2012 07:22:23 -0500 Subject: Rename link01 to init01 --- testsuite/init01/.gitignore | 1 + testsuite/init01/Makefile | 30 +++++++++++++++ testsuite/init01/init.c | 79 +++++++++++++++++++++++++++++++++++++++ testsuite/init01/nic-sysinit.h | 85 ++++++++++++++++++++++++++++++++++++++++++ testsuite/init01/test_main.c | 23 ++++++++++++ testsuite/link01/.gitignore | 1 - testsuite/link01/Makefile | 36 ------------------ testsuite/link01/init.c | 79 --------------------------------------- testsuite/link01/nic-sysinit.h | 85 ------------------------------------------ testsuite/link01/test_main.c | 23 ------------ 10 files changed, 218 insertions(+), 224 deletions(-) create mode 100644 testsuite/init01/.gitignore create mode 100644 testsuite/init01/Makefile create mode 100644 testsuite/init01/init.c create mode 100644 testsuite/init01/nic-sysinit.h create mode 100644 testsuite/init01/test_main.c delete mode 100644 testsuite/link01/.gitignore delete mode 100644 testsuite/link01/Makefile delete mode 100644 testsuite/link01/init.c delete mode 100644 testsuite/link01/nic-sysinit.h delete mode 100644 testsuite/link01/test_main.c diff --git a/testsuite/init01/.gitignore b/testsuite/init01/.gitignore new file mode 100644 index 00000000..adaff0b8 --- /dev/null +++ b/testsuite/init01/.gitignore @@ -0,0 +1 @@ +undefined.txt diff --git a/testsuite/init01/Makefile b/testsuite/init01/Makefile new file mode 100644 index 00000000..1e7ac313 --- /dev/null +++ b/testsuite/init01/Makefile @@ -0,0 +1,30 @@ +# +# $Id$ +# + +include ../../config.inc + +PGM=${ARCH}/init01.exe + +# optional managers required +MANAGERS=all + +# C source names +C_FILES = init.c test_main.c +C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o) + +AM_CPPFLAGS += -I $(INSTALL_BASE)/include +LINK_LIBS += $(INSTALL_BASE)/libbsdc.a +LINK_LIBS += $(INSTALL_BASE)/libbsd.a ${REL_ARGS} + +include $(RTEMS_MAKEFILE_PATH)/Makefile.inc +include $(RTEMS_CUSTOM) +include $(PROJECT_ROOT)/make/leaf.cfg + +OBJS= $(C_O_FILES) +CLEAN_ADDITIONS += undefined.txt + +all: ${ARCH} $(PGM) + +$(PGM): $(OBJS) + -$(make-exe) diff --git a/testsuite/init01/init.c b/testsuite/init01/init.c new file mode 100644 index 00000000..422e7f53 --- /dev/null +++ b/testsuite/init01/init.c @@ -0,0 +1,79 @@ +/* + * Simple test program -- simplified version of sample test hello. + * + * $Id$ + */ + +#include +#include +#include +#include + +/* XXX temporary until in .h file */ +void rtems_initialize_interfaces(void); + +rtems_task Init( + rtems_task_argument ignored +) +{ + printf( "\n\n*** LIBFREEBSD INITIALIZATION TEST ***\n" ); + /* + * BSD must support the new "shared IRQ PIC implementation" at this point. + * BSPs must also provide rtems_interrupt_server_initialize() which + * just requires including irq-server.[ch] in their build. + */ + + rtems_bsd_initialize_with_interrupt_server(); + + puts( "Initializing interfaces" ); + rtems_initialize_interfaces(); + + puts( "Sleeping to see what happens" ); + sleep( 5 ); + + printf( "*** END OF LIBFREEBSD INITIALIZATION TEST ***\n" ); + exit( 0 ); +} + +/* configuration information */ + +/* NOTICE: the clock driver is explicitly disabled */ +#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER +#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER + +#define CONFIGURE_APPLICATION_NEEDS_LIBBLOCK +#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM + +#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 32 + +#define CONFIGURE_UNLIMITED_OBJECTS +#define CONFIGURE_UNIFIED_WORK_AREAS + +#define CONFIGURE_RTEMS_INIT_TASKS_TABLE + +#define CONFIGURE_INIT +#include + +/* + * FreeBSD TCP/IP Initialization + */ + +#include + +#define CONFIGURE_NEED_NET +/* only include FXP and PCI for i386/pc386 for debug on qemu (for now) */ +#if defined(i386) + #define CONFIGURE_NEED_PCIB + #define CONFIGURE_NEED_NET_IF_FXP +#endif + +/* + * This is correct for the PC + */ +char static_hints[] = { + "hint.fxp.0.prefer_iomap=1\0\n" +}; + +#include "nic-sysinit.h" + +/* end of file */ diff --git a/testsuite/init01/nic-sysinit.h b/testsuite/init01/nic-sysinit.h new file mode 100644 index 00000000..dbad732d --- /dev/null +++ b/testsuite/init01/nic-sysinit.h @@ -0,0 +1,85 @@ +/** + * @file + * + * @ingroup demo + * + * @brief TODO. + */ + +/* + * COPYRIGHT (c) 2012. On-Line Applications Research Corporation (OAR). + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + + +#include + +/* + * We "read" that and generate references and nexus devices + */ + +#if defined(CONFIGURE_NEED_NET) + SYSINIT_NEED_FREEBSD_CORE; +#endif +#if defined(CONFIGURE_NEED_USB) + SYSINIT_NEED_USB_CORE; +#endif +#if defined(CONFIGURE_NEED_PCIB) + SYSINIT_NEED_PCIB; +#endif +#if defined(CONFIGURE_NEED_NET_IF_FXP) + SYSINIT_NEED_NET_IF_FXP; +#endif +#if defined(CONFIGURE_NEED_NET_IF_DC) + SYSINIT_NEED_NET_IF_DC; +#endif +#if defined(CONFIGURE_NEED_NET_IF_BFE) + SYSINIT_NEED_NET_IF_BFE; +#endif +#if defined(CONFIGURE_NEED_NET_IF_RE) + SYSINIT_NEED_NET_IF_RE; +#endif +#if defined(CONFIGURE_NEED_NET_IF_EM) + SYSINIT_NEED_NET_IF_EM; +#endif +#if defined(CONFIGURE_NEED_NET_IF_IGB) + SYSINIT_NEED_NET_IF_IGB; +#endif +#if defined(CONFIGURE_NEED_NET_IF_BCE) + SYSINIT_NEED_NET_IF_BCE; +#endif +#if defined(CONFIGURE_NEED_NET_IF_LEM) + SYSINIT_NEED_NET_IF_LEM; +#endif +#if defined(CONFIGURE_NEED_NET_IF_BGE) + SYSINIT_NEED_NET_IF_BGE; // does not link 29 June 2012 +#endif + +const char *const _bsd_nexus_devices [] = { + #if defined(CONFIGURE_NEED_PCIB) + "legacy", + #endif + NULL +}; + diff --git a/testsuite/init01/test_main.c b/testsuite/init01/test_main.c new file mode 100644 index 00000000..3e7c43e8 --- /dev/null +++ b/testsuite/init01/test_main.c @@ -0,0 +1,23 @@ +/* + * This is the body of the test. It does not do much except ensure + * that the target is alive after initializing the TCP/IP stack. + */ + +#include +#include +#include +#include + +void print_test_name(void) +{ + printf( "\n\n*** LIBFREEBSD INITIALIZATION TEST ***\n" ); +} + +void test_main(void) +{ + puts( "Sleeping to see what happens" ); + sleep( 5 ); + + printf( "*** END OF LIBFREEBSD INITIALIZATION TEST ***\n" ); + exit( 0 ); +} diff --git a/testsuite/link01/.gitignore b/testsuite/link01/.gitignore deleted file mode 100644 index adaff0b8..00000000 --- a/testsuite/link01/.gitignore +++ /dev/null @@ -1 +0,0 @@ -undefined.txt diff --git a/testsuite/link01/Makefile b/testsuite/link01/Makefile deleted file mode 100644 index 0f4c069f..00000000 --- a/testsuite/link01/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -# -# $Id$ -# - -include ../../config.inc - -PGM=${ARCH}/link01.exe -PGM_R=${ARCH}/link01_r.exe - -# optional managers required -MANAGERS=all - -# C source names -C_FILES = test.c -C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o) - -AM_CPPFLAGS += -I $(INSTALL_BASE)/include -LINK_LIBS += $(INSTALL_BASE)/libbsdc.a -LINK_LIBS += $(INSTALL_BASE)/libbsd.a ${REL_ARGS} - -include $(RTEMS_MAKEFILE_PATH)/Makefile.inc -include $(RTEMS_CUSTOM) -include $(PROJECT_ROOT)/make/leaf.cfg - -OBJS= $(C_O_FILES) -CLEAN_ADDITIONS += undefined.txt - -all: ${ARCH} $(PGM_R) $(PGM) - $(NM) $(PGM_R) | grep "U " >undefined.txt - @echo `cat undefined.txt | wc -l` symbols to resolve - -$(PGM): $(OBJS) - -$(make-exe) - -$(PGM_R): $(OBJS) - $(MAKE) -f Makefile_ldr diff --git a/testsuite/link01/init.c b/testsuite/link01/init.c deleted file mode 100644 index 422e7f53..00000000 --- a/testsuite/link01/init.c +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Simple test program -- simplified version of sample test hello. - * - * $Id$ - */ - -#include -#include -#include -#include - -/* XXX temporary until in .h file */ -void rtems_initialize_interfaces(void); - -rtems_task Init( - rtems_task_argument ignored -) -{ - printf( "\n\n*** LIBFREEBSD INITIALIZATION TEST ***\n" ); - /* - * BSD must support the new "shared IRQ PIC implementation" at this point. - * BSPs must also provide rtems_interrupt_server_initialize() which - * just requires including irq-server.[ch] in their build. - */ - - rtems_bsd_initialize_with_interrupt_server(); - - puts( "Initializing interfaces" ); - rtems_initialize_interfaces(); - - puts( "Sleeping to see what happens" ); - sleep( 5 ); - - printf( "*** END OF LIBFREEBSD INITIALIZATION TEST ***\n" ); - exit( 0 ); -} - -/* configuration information */ - -/* NOTICE: the clock driver is explicitly disabled */ -#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER - -#define CONFIGURE_APPLICATION_NEEDS_LIBBLOCK -#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM - -#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 32 - -#define CONFIGURE_UNLIMITED_OBJECTS -#define CONFIGURE_UNIFIED_WORK_AREAS - -#define CONFIGURE_RTEMS_INIT_TASKS_TABLE - -#define CONFIGURE_INIT -#include - -/* - * FreeBSD TCP/IP Initialization - */ - -#include - -#define CONFIGURE_NEED_NET -/* only include FXP and PCI for i386/pc386 for debug on qemu (for now) */ -#if defined(i386) - #define CONFIGURE_NEED_PCIB - #define CONFIGURE_NEED_NET_IF_FXP -#endif - -/* - * This is correct for the PC - */ -char static_hints[] = { - "hint.fxp.0.prefer_iomap=1\0\n" -}; - -#include "nic-sysinit.h" - -/* end of file */ diff --git a/testsuite/link01/nic-sysinit.h b/testsuite/link01/nic-sysinit.h deleted file mode 100644 index dbad732d..00000000 --- a/testsuite/link01/nic-sysinit.h +++ /dev/null @@ -1,85 +0,0 @@ -/** - * @file - * - * @ingroup demo - * - * @brief TODO. - */ - -/* - * COPYRIGHT (c) 2012. On-Line Applications Research Corporation (OAR). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - - -#include - -/* - * We "read" that and generate references and nexus devices - */ - -#if defined(CONFIGURE_NEED_NET) - SYSINIT_NEED_FREEBSD_CORE; -#endif -#if defined(CONFIGURE_NEED_USB) - SYSINIT_NEED_USB_CORE; -#endif -#if defined(CONFIGURE_NEED_PCIB) - SYSINIT_NEED_PCIB; -#endif -#if defined(CONFIGURE_NEED_NET_IF_FXP) - SYSINIT_NEED_NET_IF_FXP; -#endif -#if defined(CONFIGURE_NEED_NET_IF_DC) - SYSINIT_NEED_NET_IF_DC; -#endif -#if defined(CONFIGURE_NEED_NET_IF_BFE) - SYSINIT_NEED_NET_IF_BFE; -#endif -#if defined(CONFIGURE_NEED_NET_IF_RE) - SYSINIT_NEED_NET_IF_RE; -#endif -#if defined(CONFIGURE_NEED_NET_IF_EM) - SYSINIT_NEED_NET_IF_EM; -#endif -#if defined(CONFIGURE_NEED_NET_IF_IGB) - SYSINIT_NEED_NET_IF_IGB; -#endif -#if defined(CONFIGURE_NEED_NET_IF_BCE) - SYSINIT_NEED_NET_IF_BCE; -#endif -#if defined(CONFIGURE_NEED_NET_IF_LEM) - SYSINIT_NEED_NET_IF_LEM; -#endif -#if defined(CONFIGURE_NEED_NET_IF_BGE) - SYSINIT_NEED_NET_IF_BGE; // does not link 29 June 2012 -#endif - -const char *const _bsd_nexus_devices [] = { - #if defined(CONFIGURE_NEED_PCIB) - "legacy", - #endif - NULL -}; - diff --git a/testsuite/link01/test_main.c b/testsuite/link01/test_main.c deleted file mode 100644 index 3e7c43e8..00000000 --- a/testsuite/link01/test_main.c +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This is the body of the test. It does not do much except ensure - * that the target is alive after initializing the TCP/IP stack. - */ - -#include -#include -#include -#include - -void print_test_name(void) -{ - printf( "\n\n*** LIBFREEBSD INITIALIZATION TEST ***\n" ); -} - -void test_main(void) -{ - puts( "Sleeping to see what happens" ); - sleep( 5 ); - - printf( "*** END OF LIBFREEBSD INITIALIZATION TEST ***\n" ); - exit( 0 ); -} -- cgit v1.2.3