1 | /* |
---|
2 | * Simple test program -- simplified version of sample test hello. |
---|
3 | * |
---|
4 | * $Id$ |
---|
5 | */ |
---|
6 | |
---|
7 | #include <bsp.h> |
---|
8 | #include <stdlib.h> |
---|
9 | #include <stdio.h> |
---|
10 | #include <freebsd/bsd.h> |
---|
11 | |
---|
12 | /* XXX temporary until in .h file */ |
---|
13 | void rtems_initialize_interfaces(void); |
---|
14 | |
---|
15 | rtems_task Init( |
---|
16 | rtems_task_argument ignored |
---|
17 | ) |
---|
18 | { |
---|
19 | printf( "\n\n*** LIBFREEBSD INITIALIZATION TEST ***\n" ); |
---|
20 | /* |
---|
21 | * BSD must support the new "shared IRQ PIC implementation" at this point. |
---|
22 | * BSPs must also provide rtems_interrupt_server_initialize() which |
---|
23 | * just requires including irq-server.[ch] in their build. |
---|
24 | */ |
---|
25 | |
---|
26 | rtems_bsd_initialize_with_interrupt_server(); |
---|
27 | |
---|
28 | puts( "Initializing interfaces" ); |
---|
29 | rtems_initialize_interfaces(); |
---|
30 | |
---|
31 | puts( "Sleeping to see what happens" ); |
---|
32 | sleep( 5 ); |
---|
33 | |
---|
34 | printf( "*** END OF LIBFREEBSD INITIALIZATION TEST ***\n" ); |
---|
35 | exit( 0 ); |
---|
36 | } |
---|
37 | |
---|
38 | /* configuration information */ |
---|
39 | |
---|
40 | /* NOTICE: the clock driver is explicitly disabled */ |
---|
41 | #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER |
---|
42 | #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER |
---|
43 | |
---|
44 | #define CONFIGURE_APPLICATION_NEEDS_LIBBLOCK |
---|
45 | #define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM |
---|
46 | |
---|
47 | #define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 32 |
---|
48 | |
---|
49 | #define CONFIGURE_UNLIMITED_OBJECTS |
---|
50 | #define CONFIGURE_UNIFIED_WORK_AREAS |
---|
51 | |
---|
52 | #define CONFIGURE_RTEMS_INIT_TASKS_TABLE |
---|
53 | |
---|
54 | #define CONFIGURE_INIT |
---|
55 | #include <rtems/confdefs.h> |
---|
56 | |
---|
57 | /* |
---|
58 | * FreeBSD TCP/IP Initialization |
---|
59 | */ |
---|
60 | |
---|
61 | #include <freebsd/machine/rtems-bsd-sysinit.h> |
---|
62 | |
---|
63 | #define CONFIGURE_NEED_NET |
---|
64 | /* only include FXP and PCI for i386/pc386 for debug on qemu (for now) */ |
---|
65 | #if defined(i386) |
---|
66 | #define CONFIGURE_NEED_PCIB |
---|
67 | #define CONFIGURE_NEED_NET_IF_FXP |
---|
68 | #endif |
---|
69 | |
---|
70 | /* |
---|
71 | * This is correct for the PC |
---|
72 | */ |
---|
73 | char static_hints[] = { |
---|
74 | "hint.fxp.0.prefer_iomap=1\0\n" |
---|
75 | }; |
---|
76 | |
---|
77 | #include "nic-sysinit.h" |
---|
78 | |
---|
79 | /* end of file */ |
---|