diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-10-09 22:52:54 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-10-10 09:08:23 +0200 |
commit | e599318e912d8836c59d8b5202e3e31a6b8dcae9 (patch) | |
tree | 1172b8b830a1c3236e45c834c2b80e01325ea144 /testsuite/include/rtems/bsd/test/default-init.h | |
parent | Move files to match FreeBSD layout (diff) | |
download | rtems-libbsd-e599318e912d8836c59d8b5202e3e31a6b8dcae9.tar.bz2 |
Update files to match FreeBSD layout
Add compatibility with Newlib header files. Some FreeBSD header files
are mapped by the translation script:
o rtems/bsd/sys/_types.h
o rtems/bsd/sys/errno.h
o rtems/bsd/sys/lock.h
o rtems/bsd/sys/param.h
o rtems/bsd/sys/resource.h
o rtems/bsd/sys/time.h
o rtems/bsd/sys/timespec.h
o rtems/bsd/sys/types.h
o rtems/bsd/sys/unistd.h
It is now possible to include <sys/socket.h> directly for example.
Generate one Makefile which builds everything including tests.
Diffstat (limited to 'testsuite/include/rtems/bsd/test/default-init.h')
-rw-r--r-- | testsuite/include/rtems/bsd/test/default-init.h | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/testsuite/include/rtems/bsd/test/default-init.h b/testsuite/include/rtems/bsd/test/default-init.h new file mode 100644 index 00000000..c3150f5f --- /dev/null +++ b/testsuite/include/rtems/bsd/test/default-init.h @@ -0,0 +1,75 @@ +/* + * Shared Network Test Initialization File + */ + +#ifndef RTEMS_BSD_TEST_DEFAULT_INIT_H +#define RTEMS_BSD_TEST_DEFAULT_INIT_H + +#include <bsp.h> +#include <stdlib.h> +#include <stdio.h> +#include <rtems/bsd/bsd.h> + +rtems_task Init( + rtems_task_argument ignored +) +{ + puts( "*** " TEST_NAME " TEST ***" ); + + /* + * 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(); + + test_main(); + /* should not return */ + + printf( "*** Test main returned and should not have ***\n" ); + exit( 5 ); +} + +/* configuration information */ + +#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 <rtems/confdefs.h> + +/* + * FreeBSD TCP/IP Initialization + */ + +#include <machine/rtems-bsd-sysinit.h> + +#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 <rtems/bsd/test/nic-sysinit.h> + +/* end of file */ +#endif /* RTEMS_BSD_TEST_DEFAULT_INIT_H */ |