VxWork在S3C2410上的移植, VxWork在S3C2410上的移植
源代码在线查看: prjconfig.c
/* prjConfig.c - dynamicaly generated configuration file */ /* includes */ #include "vxWorks.h" #include "config.h" #include "bsdSockLib.h" #include "bufLib.h" #include "cacheLib.h" #include "cbioLib.h" #include "configNet.h" #include "cplusLib.h" #include "dcacheCbio.h" #include "dosFsLib.h" #include "drv/timer/timerDev.h" #include "drv/wdb/wdbEndPktDrv.h" #include "drv/wdb/wdbVioDrv.h" #include "end.h" #include "envLib.h" #include "eventLib.h" #include "excLib.h" #include "fioLib.h" #include "ftpLib.h" #include "hashLib.h" #include "hostLib.h" #include "intLib.h" #include "ioLib.h" #include "iosLib.h" #include "ipProto.h" #include "logLib.h" #include "lstLib.h" #include "math.h" #include "memLib.h" #include "msgQLib.h" #include "muxLib.h" #include "muxTkLib.h" #include "net/mbuf.h" #include "netBufLib.h" #include "netDrv.h" #include "netLib.h" #include "netinet/if_ether.h" #include "pipeDrv.h" #include "private/ftpLibP.h" #include "private/funcBindP.h" #include "private/kernelLibP.h" #include "private/taskLibP.h" #include "private/vmLibP.h" #include "private/workQLibP.h" #include "qPriBMapLib.h" #include "ramDrv.h" #include "rebootLib.h" #include "remLib.h" #include "selectLib.h" #include "semLib.h" #include "sigLib.h" #include "sioLib.h" #include "stdio.h" #include "string.h" #include "symLib.h" #include "sys/socket.h" #include "sysLib.h" #include "taskHookLib.h" #include "taskLib.h" #include "taskVarLib.h" #include "tffs/backgrnd.h" #include "tffs/dosformt.h" #include "tffs/fatlite.h" #include "tffs/flbase.h" #include "tffs/flbuffer.h" #include "tffs/flcustom.h" #include "tffs/flflash.h" #include "tffs/flsocket.h" #include "tffs/flsysfun.h" #include "tffs/flsystem.h" #include "tffs/fltl.h" #include "tffs/pcic.h" #include "tffs/reedsol.h" #include "tffs/stdcomp.h" #include "tffs/tffsDrv.h" #include "tickLib.h" #include "timexLib.h" #include "ttyLib.h" #include "usrConfig.h" #include "version.h" #include "vxLib.h" #include "wdLib.h" #include "wdb/wdb.h" #include "wdb/wdbBpLib.h" #include "wdb/wdbCommIfLib.h" #include "wdb/wdbLib.h" #include "wdb/wdbLibP.h" #include "wdb/wdbMbufLib.h" #include "wdb/wdbRpcLib.h" #include "wdb/wdbRtIfLib.h" #include "wdb/wdbSvcLib.h" #include "wdb/wdbUdpLib.h" #include "wdb/wdbVioLib.h" /* imports */ IMPORT char etext []; IMPORT char end []; IMPORT char edata []; /* BSP_STUBS */ #include "sysTffs.c" #include "sysComms.c" #include "intrinsics.c" #include "net/usrBootLine.c" #include "net/usrBsdSocket.c" #include "net/usrEndLib.c" #include "net/usrFtp.c" #include "net/usrNetBoot.c" #include "net/usrNetBootUtil.c" #include "net/usrNetConfigIf.c" #include "net/usrNetEndBoot.c" #include "net/usrNetIcmp.c" #include "net/usrNetIpLib.c" #include "net/usrNetLib.c" #include "net/usrNetLoopbackStart.c" #include "net/usrNetMuxCfg.c" #include "net/usrNetRemoteCfg.c" #include "net/usrTcp.c" #include "net/usrUdp.c" #include "sysClkInit.c" #include "usrBreakpoint.c" #include "usrCache.c" #include "usrKernel.c" #include "usrSerial.c" #include "usrStartup.c" #include "usrTffs.c" #include "usrWdbBanner.c" #include "usrWdbBp.c" #include "usrWdbCore.c" #include "usrWdbSys.c" #include "usrWdbTask.c" #include "wdbEnd.c" /****************************************************************************** * */ void usrInit (int startType) { sysStart (startType); cacheLibInit (USER_I_CACHE_MODE, USER_D_CACHE_MODE); excVecInit (); sysHwInit (); usrCacheEnable (); usrKernelInit (); } /****************************************************************************** * * usrNetProtoInit - Initialize the network protocol stacks */ void usrNetProtoInit (void) { usrBsdSockLibInit(); hostTblInit(); usrIpLibInit(); udpLibInit (&udpCfgParams); tcpLibInit (&tcpCfgParams); icmpLibInit (&icmpCfgParams); igmpLibInit(); netLibInit(); } /****************************************************************************** * * usrNetworkAddrInit - Initialize the network address for a device */ void usrNetworkAddrInit (void) { usrDhcpcLeaseClean (); } /****************************************************************************** * * usrNetworkDevStart - Attach a network device and start the loopback driver */ void usrNetworkDevStart (void) { usrNetEndDevStart (pDevName, uNum); usrNetLoopbackStart (); } /****************************************************************************** * * usrNetworkBoot - Setup a network device using the boot parameters */ void usrNetworkBoot (void) { usrNetBoot (); usrNetworkAddrInit (); usrNetmaskGet (); usrNetDevNameGet (); usrNetworkDevStart (); } /****************************************************************************** * * usrNetworkAddrCheck - Get an IP address if needed and setup the boot device */ void usrNetworkAddrCheck (void) { usrNetConfig (pDevName, uNum, pTgtName, pAddrString); } /****************************************************************************** * * usrNetRemoteInit - */ void usrNetRemoteInit (void) { usrNetHostSetup (); usrNetRemoteCreate (); } /****************************************************************************** * * usrNetAppInit - */ void usrNetAppInit (void) { ftpdInit ((FUNCPTR)NULL, 0); usrFtpInit(); } /****************************************************************************** * * usrNetworkInit - Initialize the network subsystem */ void usrNetworkInit (void) { usrNetLibInit (); usrNetProtoInit (); usrMuxLibInit (); usrEndLibInit(); usrNetworkBoot (); usrNetworkAddrCheck (); usrNetRemoteInit (); usrNetAppInit (); } /****************************************************************************** * * usrWdbInit - the WDB target agent */ void usrWdbInit (void) { wdbConfig (); wdbMemLibInit (); wdbSysModeInit (); wdbTaskModeInit (); wdbEventLibInit (); wdbEvtptLibInit (); wdbDirectCallLibInit (); wdbCtxLibInit (); wdbRegsLibInit (); wdbGopherLibInit (); wdbCtxExitLibInit (); wdbExcLibInit (); wdbFuncCallLibInit (); wdbVioLibInit (); wdbVioDrv ("/vio"); usrWdbBp (); wdbTaskBpLibInit (); wdbCtxStartLibInit (); wdbUserEvtLibInit (); usrWdbBanner (); } /****************************************************************************** * * usrShowInit - enable object show routines */ void usrShowInit (void) { msgQShowInit (); } /****************************************************************************** * * usrToolsInit - software development tools */ void usrToolsInit (void) { timexInit (); usrWdbInit (); usrShowInit (); } /****************************************************************************** * * usrKernelCoreInit - core kernel facilities */ void usrKernelCoreInit (void) { eventLibInit (); semBLibInit (); semMLibInit (); semCLibInit (); msgQLibInit (); wdLibInit (); taskHookInit (); } /****************************************************************************** * * usrKernelExtraInit - extended kernel facilities */ void usrKernelExtraInit (void) { hashLibInit (); symLibInit (); envLibInit (ENV_VAR_USE_HOOKS); sigInit (); } /****************************************************************************** * * usrIosCoreInit - core I/O system */ void usrIosCoreInit (void) { mathSoftInit (); usrBootLineParse (BOOT_LINE_ADRS); /* parse some boot device configuration info */ iosInit (NUM_DRIVERS, NUM_FILES, "/null"); /* IO system */ ttyDrv (); usrSerialInit (); } /****************************************************************************** * * usrDosFsInit - DOS File System components */ void usrDosFsInit (void) { cbioLibInit(); dosFsLibInit(0); dosFsFatInit(); dosVDirLibInit(); dosDirOldLibInit(); dosChkLibInit(); dosFsFmtLibInit(); } /****************************************************************************** * * usrIosExtraInit - extended I/O system */ void usrIosExtraInit (void) { excShowInit (); excInit (); logInit (consoleFd, MAX_LOG_MSGS); pipeDrv (); stdioInit (); fioLibInit (); floatInit (); dosFsInit (NUM_DOSFS_FILES); ramDrv (); usrDosFsInit (); tffsDrv (); } /****************************************************************************** * * usrRoot - entry point for post-kernel initialization */ void usrRoot (char *pMemPoolStart, unsigned memPoolSize) { usrKernelCoreInit (); memInit (pMemPoolStart, memPoolSize); memPartLibInit (pMemPoolStart, memPoolSize); sysClkInit (); selectInit (NUM_FILES); usrIosCoreInit (); usrKernelExtraInit (); usrIosExtraInit (); usrNetworkInit (); selTaskDeleteHookAdd (); usrToolsInit (); cplusCtorsLink (); usrAppInit (); }