int gesys_network_start() { char *buf; #ifdef MULTI_NETDRIVER printf("Going to probe for Ethernet chips when initializing networking:\n"); printf("(supported are 3c509 (ISA), 3c90x (PCI) and eepro100 (PCI) variants).\n"); printf("NOTES:\n"); printf(" - Initializing a 3c90x may take a LONG time (~1min); PLUS: it NEEDS media\n"); printf(" autonegotiation!\n"); printf(" - A BOOTP/DHCP server must supply my IF configuration\n"); printf(" (ip address, mask, [gateway, dns, ntp])\n"); #endif #ifdef BSP_NETWORK_SETUP { extern int BSP_NETWORK_SETUP(struct rtems_bsdnet_config *, struct rtems_bsdnet_ifconfig *); BSP_NETWORK_SETUP(&rtems_bsdnet_config, 0); } #endif rtems_bsdnet_initialize_network(); /* remote logging only works after a call to openlog()... */ openlog(0, LOG_PID | LOG_CONS, 0); /* use RTEMS defaults */ #ifdef TFTP_SUPPORT if (rtems_bsdnet_initialize_tftp_filesystem()) perror("TFTP FS initialization failed"); #endif #ifdef NFS_SUPPORT if ( rpcUdpInit() || nfsInit(0,0) ) /* nothing else to do */; #endif if ( rtems_bsdnet_ntpserver_count > 0 ) { printf("Trying to synchronize NTP..."); fflush(stdout); if (rtems_bsdnet_synchronize_ntp(0,0)<0) printf("FAILED\n"); else printf("OK\n"); rtems_time_of_day time; rtems_clock_get(RTEMS_CLOCK_GET_TOD, &time); printf("yr:%u m:%u d:%u hr:%u min:%u sec:%u\n",\ time.year,time.month,time.day,\ time.hour,time.minute,time.second); fflush(stdout); } /* stuff command line 'name=value' pairs into the environment */ if ( (buf = strdup(rtems_bsdnet_bootp_cmdline)) ) { cmdlinePairExtract(buf, putenv, 1); free(buf); } return 0; }
/* CEXP module support (magic init) */ void _cexpModuleInitialize(void *mod) { rpcUdpInit(); }