vxworks中實(shí)現(xiàn)雙網(wǎng)卡驅(qū)動(dòng)的例子
掃描二維碼
隨時(shí)隨地手機(jī)看文章
以3Com3c905b與ne2000(i/o基址0xfcc0,i/o中斷10)兩塊網(wǎng)卡為例:
1.在config.h中,
#define INCLUDE_ENE
#define INCLUDE_EL_3C90X
#define IO_ADRS_ENE 0x0fcc0
#define INT_LVL_ENE 0x0a
2.make bootrom
3.host邊,開FTP服務(wù)
3.下載vxworks,假設(shè)啟動(dòng)網(wǎng)卡為ene.
4.在shell下,將另一塊網(wǎng)卡綁上去:
-> usrNetEndDevStart "elPci",0 (假設(shè)啟動(dòng)的網(wǎng)卡為ne2000)
-> usrNetIfConfig "elPci",0,"138.203.175.6","host name",0xffffff00
注意:在生成vxworks時(shí),IP_MAX_UNIT參數(shù)改成2. 兩個(gè)網(wǎng)卡的ip地址要在不同的子網(wǎng)下。