这些小活动你都参加了吗?快来围观一下吧!>>
电子产品世界 » 论坛首页 » 嵌入式开发 » MCU » Vxworks启动求助

共5条 1/1 1 跳转至

Vxworks启动求助

菜鸟
2005-05-09 03:00:33     打赏

tornado2.2下,奔3目标机,做硬盘启动并加载vxworks,config中配置如下:

#define include_ata

#define include_show_routines

#define #define SYS_WARM_TYPE SYS_WARM_ATA

#define include_pc_console

#define DEFAULT_BOOT_LINE "ata=0,0(0,0)wu:/ata0/vxWorks h=90.0.0.3 e=90.0.0.50 u=eric"

可是加载vxworks时老是出现错误:"WARNING: Failed to create 0 bytes of disk cache" " ATA disk 0configured without cache\n",

atausrconfig failed

除了上面的还要改什么地方么?

另外,有谁可以给我tornado2.0版本的,我可以用2.2换,非常感谢了

wuhuawu@163.com,qq52863836




关键词: Vxworks     启动     求助    

菜鸟
2005-05-09 16:36:00     打赏
2楼

那只是一个警告!只是在config.h文件中将NV_RAM_SIZE宏定义为NONE!

#undef NV_RAM_SIZE

#define NV_RAM_SIZE (NONE)


菜鸟
2005-05-09 17:31:00     打赏
3楼

我改了这个,不过错误是出在usrataconfig函数中

是不是2.2下做硬盘启动还要改什么别的东西?我只改了config.h中的


菜鸟
2005-05-10 02:48:00     打赏
4楼
usrataconfig函数是什么样的,铁一下吧

菜鸟
2005-05-10 04:38:00     打赏
5楼

在target\config\comps\src\dosfs2的usrata.c中,是由ataload()调用的

STATUS usrAtaConfig ( int ctrl, /* 0: primary address, 1: secondary address */ int drive, /* drive number of hard disk (0 or 1) */ char *devNames /* mount points for each partition */ ) { BLK_DEV *pBlkDev; CBIO_DEV_ID cbio, masterCbio; STATUS stat = OK; char *tmp; char *devNamesCopy; char *freePtr; char *sysType; char *devName[PART_MAX_ENTRIES]; int pn; int numPart = 0;

/* check argument sanity */

if( NULL == devNames || EOS == *devNames ) { printErr ("usrAtaConfig: Invalid device name.\n");

return (ERROR); }

if (ATA_MAX_DRIVES <= (UINT) drive) { printErr ("usrAtaConfig: drive is out of range (0-%d).\n", ATA_MAX_DRIVES - 1);

return (ERROR); }

if (ATA_MAX_CTRLS <= (UINT) ctrl) { printErr ("usrAtaConfig: controller is out of range (0-%d).\n", ATA_MAX_CTRLS - 1);

return (ERROR); }

/* * make private copy of the devNames, SPR#70337 * strlen does not count EOS, so we add 1 to malloc. */

devNamesCopy = malloc (1 + (int) (strlen (devNames)));

/* ensure malloc suceeded */

if (NULL == devNamesCopy) { printErr ("usrAtaConfig: malloc returned NULL\n");

return (ERROR); }

/* store the pointer for free, since devNamesCopy is modified */ freePtr = devNamesCopy;

/* copy string, include EOS */

strcpy (devNamesCopy, devNames); /* Check for file system spec */

sysType = index (devNamesCopy, '(');

if (sysType != NULL) { *sysType = '\0'; sysType++; tmp = index( sysType, ')' );

if (tmp != NULL) { *tmp = '\0'; } } else { sysType = "dos"; }

/* Parse the partition device name string */

for (numPart = 0; numPart < PART_MAX_ENTRIES; numPart++) {

if (EOS == *devNamesCopy) break;

tmp = devNamesCopy ; devName[numPart] = devNamesCopy ; tmp = index (tmp, ',');

if (NULL == tmp) { numPart++;

break; }

*tmp = EOS ; devNamesCopy = tmp+1; }

/* create block device for the entire disk, */

if ((pBlkDev = ataDevCreate (ctrl, drive, 0, 0)) == (BLK_DEV *) NULL) { printErr ("Error during ataDevCreate: %x\n", errno); free (freePtr);

return (ERROR); }

if (strcmp (sysType, "dos") == 0) {

/* create disk cache for the entire drive */

cbio = dcacheDevCreate ((CBIO_DEV_ID) pBlkDev, NULL, ATA_CACHE_SIZE, freePtr);

if (NULL == cbio) { /* insufficient memory, will avoid the cache */

printErr ("WARNING: Failed to create %d bytes of disk cache" " ATA disk %s configured without cache\n", ATA_CACHE_SIZE, devNames); cbio = cbioWrapBlkDev (pBlkDev); }

/* create partition manager */

masterCbio = dpartDevCreate (cbio, numPart, usrFdiskPartRead);

if (NULL == masterCbio) { printErr ("Error creating partition manager: %x\n", errno); free (freePtr);

return (ERROR); }

/* Create a DosFs device for each partition required */

for (pn = 0; pn < numPart; pn ++) { stat = dosFsDevCreate (devName[pn], dpartPartGet (masterCbio, pn), NUM_DOSFS_FILES, NONE);

if (stat == ERROR) { printErr ("Error creating dosFs device %s, errno=%x\n", devName[pn], errno); free (freePtr);

return (ERROR); } } } #ifdef INCLUDE_CDROMFS

else if (strcmp (sysType, "cdrom") == 0) {

if (cdromFsDevCreate (devName[0], pBlkDev) == NULL) { printErr ("Error creating cdromFs device %s, errno=%x\n", devName[0], errno);

free (freePtr);

return (ERROR); } } #endif

else { printErr ("Unknown or un-included filesystem type: \"%s\"\n", sysType); free (freePtr);

return (ERROR); }

free (freePtr);

return (OK); }

/****************************************************************************** * * usrAtaInit - intialize the hard disk driver * * This routine is called from usrConfig.c to initialize the hard drive. */

void usrAtaInit (void) { int ix; ATA_RESOURCE *pAtaResource;

for (ix = 0; ix < ATA_MAX_CTRLS; ix++) { pAtaResource = &ataResources[ix];

if (pAtaResource->ctrlType == IDE_LOCAL)

if ((ataDrv (ix, pAtaResource->drives, pAtaResource->intVector, pAtaResource->intLevel, pAtaResource->configType, pAtaResource->semTimeout, pAtaResource->wdgTimeout)) == ERROR) { printf ("ataDrv returned ERROR from usrRoot.\n"); } } }


共5条 1/1 1 跳转至

回复

匿名不能发帖!请先 [ 登陆 注册 ]