这些小活动你都参加了吗?快来围观一下吧!>>
电子产品世界 » 论坛首页 » 嵌入式开发 » MCU » tor 2.2下的加入网卡的错误!!

共4条 1/1 1 跳转至

tor 2.2下的加入网卡的错误!!

菜鸟
2005-09-05 17:25:08     打赏

各位,大家好,有高人再用2.2吗,我可以问一个问题吗?十万火急!谢谢!!

我最近在使用2.2
我准备用pentium的开发机,但是主板上是eee的网卡,我在加入eee的网卡驱动时,出现了以下的结果:
05.9.3日的编译bootrom 的结果:
ccpentium -c -mcpu=pentium -march=pentium -ansi -O2 -fvolatile -nostdlib -fno-builtin -fn
o-defer-pop -Wall -I\h -I. -IC:\Tornado2.2\target\config\all -IC:\Tornado2.2\target\h -I
C:\Tornado2.2\target\src\config -IC:\Tornado2.2\target\src\drv -DCPU=PENTIUM -DTOOL_FAMILY
=gnu -DTOOL=gnu -o version.o C:\Tornado2.2\target\config\all\version.c
ldpentium -X -N -e romInit \
-Ttext 00108000 -o bootrom_uncmp romInit.o bootInit_uncmp.o version.o \
bootConfig.o sysALib.o sysLib.o --start-group -LC:\Tornado2.2\target\lib\pentium\PE
NTIUM\gnu -LC:\Tornado2.2\target\lib\pentium\PENTIUM\common \
-lcplus -lgnucplus -lvxcom -lvxdcom -larch -lcommoncc -ldrv -lgcc -lnet -
los -lrpc -ltffs -lusb -lvxfusion -lvxmp -lvxvmi -lwdb -lwind -lwindview C:\Torna
do2.2\target\lib\libPENTIUMgnuvx.a --end-group -T C:\Tornado2.2\target\h\tool\gnu\ldscrip
ts\link.RAM
bootConfig.o(.data+0x4): undefined reference to `eeVEndLoad'
sysLib. In function `syseeVPciInit':
sysLib.o(.text+0x583e): undefined reference to `eeE_board_pci_info'
sysLib.o(.text+0x5918): undefined reference to `eeE_board_pci_info'
sysLib.o(.text+0x591e): undefined reference to `eeEboards'
sysLib.o(.text+0x5934): undefined reference to `eeEboards'
sysLib.o(.text+0x594d): undefined reference to `eeE_bdvect'
make.exe: *** [bootrom_uncmp] Error 0x1
Done.

在这之前我曾经作过以下的工作1.1 修改config.h
1.1.1 修改引导行:(约190行附近)
#elif (CPU == PENTIUM)
#define DEFAULT_BOOT_LINE \
"eeE(0,0)wgr:C:/Tornado2.2/target/config/pcPentium/vxWorks h=192.9.200.87 e=192.9.200.121

u=wgr2.2

pw=wannguiru tn=wgrtarget"

1.1.2 添加(约290行附近)
#define INCLUDE_EEE_END
#define INCLUDE_EEV
#define INCLUDE_PCI
1.2 修改configNet.h
1.2.1 添加 网络驱动程序装载函数入口和硬件的物理设置数据串 (约56行附近)
#ifdef INCLUDE_EEE_END
#define EEE82559_LOAD_FUNC eeVEndLoad /* driver external interface*/
#define EEE82559_BUFF_LOAN 1 /* enable buffer loaning*/
/*
* The eeVEnd initialization string format is:
* <nCFDs>:<nRFDs>
*/
#define EEE82559_LOAD_STRING "0x30:0x30"
IMPORT END_OBJ* EEE82559_LOAD_FUNC (char*, void*);
#endif /* INCLUDE_EEE_END */

1.2.1 添加END设备配置表endDevTbl (约187行附近)
#ifdef INCLUDE_EEE_END
{ 0, EEE82559_LOAD_FUNC, EEE82559_LOAD_STRING, EEE82559_BUFF_LOAN, NULL, FALSE},
#endif
1.3 修改sysLib.c
1.3.1 在函数sysHwInit()中,(约1136行附近)添加
#ifdef INCLUDE_EEV
syseeVPciInit ();
#endif
1.4 修改sysNetif.c
1.4.1 加入函数 syseeVPciInit()

#include "vxWorks.h"
#include "taskLib.h"
#include "sysLib.h"
#include "config.h"
#ifdef INCLUDE_EEV
#define INIT_STATE_MASK (VM_STATE_MASK_VALID | VM_STATE_MASK_WRITABLE |

VM_STATE_MASK_CACHEABLE)
#define INIT_STATE (VM_STATE_VALID | VM_STATE_WRITABLE |

VM_STATE_CACHEABLE_NOT)
/* these are also defined in equates.h */
/* we re-define them here so that users do not need our header file to build */
#define MAX_UNITS 4
#define PCI_VENDOR_ID 0x8086
#define PCI_DEVICE_ID 0x1229 /* 82559 (D101M or D101S) */
#define PCI_ER_DEVICE_ID 0x1209 /* 82559ER (D101ER) */

extern int eeE_board_pci_info[MAX_UNITS][3];
extern void *eeE_bdvect[];
extern int eeEboards;

/*******************************************************************************
*
* syseeVPciInit - prepare LAN adapter for eeV initialization
*
* This routine find out the PCI device, and map its memory and IO address.
* It must be done prior to initializing the eeV. Also
* must be done prior to MMU initialization, usrMmuInit().
* Also sets number of boards in system (eeEboards)
*
* RETURNS: N/A
*/
void syseeVPciInit (void)
{
char irq;
UINT32 membaseCsr;
int done = 0;
int count = 0;
UINT16 data;
int bus, dev, func;

/* Find the device and get bus, dev, func and figure out which device is first */
func = 0;
for ( bus = 0; bus < PCI_MAX_BUS; bus ++ )
{
for ( dev = 0; dev < PCI_MAX_DEV; dev++ )
{
pciConfigInWord (bus, dev, func, PCI_CFG_VENDOR_ID, &data);
if (data == PCI_VENDOR_ID)
{
pciConfigInWord (bus, dev, func, PCI_CFG_DEVICE_ID, &data);
if ((data == PCI_DEVICE_ID)||(data == PCI_ER_DEVICE_ID))
{
/* get memory base address */
pciConfigInLong (bus, dev, func, PCI_CFG_BASE_ADDRESS_0, &membaseCsr);
membaseCsr &= 0xFFFFFFF0;

/* get the irq level */
pciConfigInByte (bus, dev, func, PCI_CFG_DEV_INT_LINE, &irq);
/* add the entry to sysPhysMemDesc[] */
/* CHECK: this function only works for 1:1 mapping */
if (sysMmuMapAdd((void *)membaseCsr, (1024*4),
INIT_STATE_MASK, INIT_STATE) == ERROR) {
/* This error condition will be checked in the attach */
eeE_board_pci_info[count][0] = -1;
}
else {
/* This is the normal path of execution */
sysIntEnablePIC (irq);
eeE_board_pci_info[count][0] = bus;
}
eeE_board_pci_info[count][1] = dev;
eeE_board_pci_info[count][2] = func;
eeE_bdvect[count] = NULL;
eeEboards++;
if ((count++) == MAX_UNITS)
{
done = 1;
break;
}
}
}
}
if (done)
break;
}

}
void * eeV_PhysToVirt (UINT32 physaddr)
{
/* This is where you add your translation function */
return (void *)physaddr;
}
ulong_t eeV_VirtToPhys (void * virtaddr)
{
/* This is where you add your translation function */
return (ulong_t)virtaddr;
}
#endif

1.5 修改pc.h
1.5.1 添加一些在romInit.s中用到的常量值
#define ROM_IDTR 0xaf /* offset to romIdtr */
#define ROM_GDTR 0xb5 /* offset to romGdtr */
#define ROM_GDT 0xc0 /* offset to romGdt */
#define ROM_INIT2 0xf0 /* offset to romInit2 */

1.6 /***修改romInit.s
原来的2.0的说明:“在romInit.s中添加了一个头文件,这是在实际操作下载demo时,系统提示的

。”
#include <ugl/driver/graphics/pcbios/romInit.h>**/ 我没有用UGL,所以我没有添加。
1.7 在 C:\Tornado2.2\target\lib 下加入别人给的eeV_44_DRV.o 。

1.8 在\Tornado\host\x86-win32\bin下执行:torVars(设置编译的环境变量)。
C:\Tornado2.2\target\lib 下执行:arpentium -r libPENTIUMgnuvx.a eeV_44_DRV.o
原来的 libPENTIUMgnuvx.a 由原来的 8字节变为了42.9字节

怀疑是eeV_44_DRV.o没有加进libPENTIUMgnuvx.a (或者没有完全加进去)。
这个命令:C:\Tornado2.2\target\lib 下执行:arpentium -r libPENTIUMgnuvx.a eeV_44_DRV.o
结果如下图:
....................
....................
C:\Tornado2.2\target\lib arpentium -r libPENTIUMgnuvx.a eeV_44_DRV.o
C:\Tornado2.2\target\lib
这种结果不是加进去了吗???
帮小妹吧 !!!!!!!!!!
对您的打扰,表示抱歉
我的地址;
myruru2005@yahoo.com.cn




关键词: 2.2下     加入     网卡     错误     Tornado2.2         

菜鸟
2005-09-05 17:34:00     打赏
2楼

在tornado2.2下,不需要使用这个驱动了,使用82559的驱动即可。

只需要在config.h中定义包含fei就可以了。

你的驱动程序是tornado2.0.x下82559er的驱动。不用它了!


菜鸟
2005-09-06 23:45:00     打赏
3楼

我用的是tor 2.2,不是2.0,怎么办???


菜鸟
2005-09-06 23:47:00     打赏
4楼

我用fei 做了一boorrom ,结果,在目标即上,出现了以下的结果:

vxl.6+++++++++++++++++++++++++++++++++++++++++

+++++++++++++++++++++++++++++++++++++++++++

然后,不动了!!

为什么????????


共4条 1/1 1 跳转至

回复

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