|
想请教Vxworks操作系统如何用U盘做启动盘??
[复制链接]
我最近想学习用U盘做启动盘!!
想请教Vxworks操作系统用U盘做启动盘的具体步骤??
不知能否给些建议???
我按照《VxWork驱动及分布式编程》做.
下面的代码不知道是不是该放在bootconfig里面.
具体应该放在什么地方呢??
#define FIND_CHCI 1
#define FIND_OHCI 2
STATUS usbInit(void)
{
UINT16 verStatus;
UNIT16 usbdVersion;
char usbMfg [USBD_NAME_LEN+1];
if (!usbdInitByKernel)
{
if (usbdInitialize() != OK)
{
printf ("Failed to initalize USBD\n");
return ERROR;
}
else
{
printf ("USBD Aleady Initialized\n");
}
if ((verStatus = usbdVersionGet (&usbdVersion,usbdMfg)) != OK)
{
printf ("usbdVersionGet() failed..returned %d\n",verStatus);
return ERROR;
}
return OK;
}
STATUS usbDevInit()
{
int hci;
hci=usbFindHCI();
if((hci>0)&&hci<3))
{
usbInit();
switch(hci)
{
case FIND_UHCI:
usrUsbHcdUhciAttach();
break;
case FIND_OHCI:
usrUsbHcdOhciAttach();
break;
default:
return ERROR;
}
usrUsbBulkDevInit();
return OK;
}
else
{ return ERROR;}
|
|