[rtems-libbsd commit] Use SYSINIT reference defines

Sebastian Huber sebh at rtems.org
Thu May 10 15:01:56 UTC 2012


Module:    rtems-libbsd
Branch:    master
Commit:    4f6cf1e3bcea7eedd1ab8be65bf34832ab7d387e
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=4f6cf1e3bcea7eedd1ab8be65bf34832ab7d387e

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu May 10 17:03:32 2012 +0200

Use SYSINIT reference defines

---

 testsuite/link01/test.c |   45 ++++++++++++++++++---------------------------
 1 files changed, 18 insertions(+), 27 deletions(-)

diff --git a/testsuite/link01/test.c b/testsuite/link01/test.c
index c34e130..2d5082b 100644
--- a/testsuite/link01/test.c
+++ b/testsuite/link01/test.c
@@ -9,20 +9,6 @@
 #include <stdio.h>
 #include <freebsd/bsd.h>
 
-/* 
- * Methods used to make sure the nic drivers
- * are pulled into the executable.
- */
-extern int _bsd_re_pcimodule_sys_init();
-extern int _bsd_fxp_pcimodule_sys_init();
-extern int _bsd_dc_pcimodule_sys_init();
-extern int _bsd_em_pcimodule_sys_init();
-extern int _bsd_igb_pcimodule_sys_init();
-extern int _bsd_bce_pcimodule_sys_init();
-extern int _bsd_lem_pcimodule_sys_init();
-extern int _bsd_bfe_pcimodule_sys_init();
-extern int _bsd_bge_pcimodule_sys_init();
-
 rtems_task Init(
   rtems_task_argument ignored
 )
@@ -36,19 +22,6 @@ rtems_task Init(
 
   rtems_bsd_initialize_with_interrupt_server();
 
-  printf("Nic Driver Addresses\n");
-  printf("RealTek %p\n", &_bsd_re_pcimodule_sys_init );
-  printf("EtherExpress %p\n", &_bsd_fxp_pcimodule_sys_init );
-  printf("DEC tulip %p\n", &_bsd_dc_pcimodule_sys_init );
-  printf("Broadcom BCM570XX/BCM571XX %p\n", &_bsd_bce_pcimodule_sys_init );
-  printf("Broadcom BCM4401 %p\n", &_bsd_bfe_pcimodule_sys_init );
-
-#if 0
-  printf("Broadcom BCM570x %p\n", &_bsd_bge_pcimodule_sys_init );
-  printf("E1000 XXX %p\n", &_bsd_igb_pcimodule_sys_init );
-  printf("E1000 XXX %p\n", &_bsd_em_pcimodule_sys_init );
-#endif
-
   printf( "*** END OF LIBFREEBSD INITIALIZATION TEST ***\n" );
   exit( 0 );
 }
@@ -64,4 +37,22 @@ rtems_task Init(
 
 #define CONFIGURE_INIT
 #include <rtems/confdefs.h>
+
+#include <freebsd/machine/rtems-bsd-sysinit.h>
+
+SYSINIT_NEED_FREEBSD_CORE;
+SYSINIT_NEED_NET_IF_BFE;
+SYSINIT_NEED_NET_IF_RE;
+SYSINIT_NEED_NET_IF_EM;
+SYSINIT_NEED_NET_IF_IGB;
+SYSINIT_NEED_NET_IF_LEM;
+SYSINIT_NEED_NET_IF_BCE;
+SYSINIT_NEED_NET_IF_BGE;
+SYSINIT_NEED_NET_IF_FXP;
+SYSINIT_NEED_NET_IF_DC;
+
+const char *const _bsd_nexus_devices [] = {
+	NULL
+};
+
 /* end of file */




More information about the vc mailing list