十分奇怪的网络问题,百思不得其解.望各位高手指点

FutureStar   2009-12-3 20:27 楼主
我用的是MPC8280。上面跑vxworks5.5.
  采用bootRom + vxworks image的方式。
  一种方法是bootrom起来后从网络加载vxworks映像的方式进行调试。调试串口和已经打通。
但是,在boot的过程中,选择从FCC1下载vxworks映像运行到bootConfig.c的ipAttach()这个函数后,该函数的返回值始终错误,当然串口就打印出错信息(Failed to attach TCP/IP to device) 之后就退出加载VXWORKS映像了.
  于是采用串口的方式加载vxworks映像成功后在shell中用ifShow(如下)发现系统仍然没有加载FCC1这个网口.

-> ifShow
lo (unit number 0):
    Flags: (0x8069) UP LOOPBACK RUNNING ARP MULTICAST
    Type: SOFTWARE_LOOPBACK
    Internet address: 127.0.0.1
    Netmask 0xff000000 Subnetmask 0xff000000
    Metric is 0
    Maximum Transfer Unit size is 32768
    0 packets received; 0 packets sent
    0 multicast packets received
    0 multicast packets sent
    0 input errors; 0 output errors
    0 collisions; 0 dropped
value = 0 = 0x0
->
->
->
-> muxShow
Current mode: NORMAL
Device: motfcc Unit: 0  END_OBJ: 0x3bb9998
Description: Motorola FCC Ethernet Enhanced Network Driver 2.1
Device: motfcc Unit: 1  END_OBJ: 0x3b73da0
Description: Motorola FCC Ethernet Enhanced Network Driver 2.1
Device: motfcc Unit: 2  END_OBJ: 0x3b2e1a0
Description: Motorola FCC Ethernet Enhanced Network Driver 2.1
value = 0 = 0x0
->
->
接着在shell中用ipAttach()命令和usrNetIfConfig()命令加载好FCC1网口后与计算机通信发现该网口又可以正常稳定的工作.

问题是目前需要用该网口来加载vxworks映像,为何在bootROM.bin无法正常加载ipAttach()函数,请各位高手给点宝贵意见,不胜感激!!!



-> ipAttach(2,"motfcc")
value = 0 = 0x0
-> usrNetIfConfig("motfcc",2,"192.168.0.11","fcc1",0xffffff00);
value = 0 = 0x0
-> ifShow
lo (unit number 0):
    Flags: (0x8069) UP LOOPBACK RUNNING ARP MULTICAST
    Type: SOFTWARE_LOOPBACK
    Internet address: 127.0.0.1
    Netmask 0xff000000 Subnetmask 0xff000000
    Metric is 0
    Maximum Transfer Unit size is 32768
    0 packets received; 0 packets sent
    0 multicast packets received
    0 multicast packets sent
    0 input errors; 0 output errors
    0 collisions; 0 dropped
motfcc (unit number 2):
    Flags: (0x8063) UP BROADCAST RUNNING ARP MULTICAST
    Type: ETHERNET_CSMACD
    Internet address: 192.168.0.11
    Broadcast address:   192.168.0.255
    Netmask 0xffffff00 Subnetmask 0xffffff00
    Ethernet address is 00:00:00:00:00:00
    Metric is 0
    Maximum Transfer Unit size is 1500
    0 packets received; 1 packets sent
    0 multicast packets received
    0 multicast packets sent
    0 input errors; 0 output errors
    0 collisions; 0 dropped
value = 0 = 0x0
-> muxShow
Current mode: NORMAL
Device: motfcc Unit: 0  END_OBJ: 0x3bb9998
Description: Motorola FCC Ethernet Enhanced Network Driver 2.1
Device: motfcc Unit: 1  END_OBJ: 0x3b73da0
Description: Motorola FCC Ethernet Enhanced Network Driver 2.1
Device: motfcc Unit: 2  END_OBJ: 0x3b2e1a0
Description: Motorola FCC Ethernet Enhanced Network Driver 2.1
Protocol: IP 4.4 TCP/IP        Type: 0x0800        Recv 0x6f8fc        Shutdown 0x6fd08
Protocol: IP 4.4 ARP        Type: 0x0806        Recv 0x6f8fc        Shutdown 0x6fdec
value = 0 = 0x0
->

回复评论 (6)

检查一下你的启动参数,看是否是因为传入的参数不对而导致加载驱动错误
点赞  2009-12-4 23:25
两个建议:
1.看BSP中关于MOTFCC方面的配置有无问题
2.是否给板卡分配MAC地址了?
点赞  2009-12-5 14:37
楼主问题解决了吗?我也遇到了类似的情况,请高手解答
点赞  2009-12-10 23:15
还没有解决!
我检查了MAC等配置,基本没有发现异常;
我又用串口跟踪:发现启动参数到ipAttach()时也没有错,
不过vxworks5.5的ipAttach()函数没有开放源码,仅返回个error(-1)所以只能跟踪到这了.
请问还有没有办法得到ipAttach()里的出错细节呢??
各位高手还有没有什么见解呢?
点赞  2009-12-17 11:02
检查你编译bootrom和vxworks镜像是不是相同的bsp(可能你的bootrom中缺少一些include组件,)你这个问题一般都是这个问题造成的。
点赞  2009-12-17 14:22
两种可能:
1, 你的bootrom中没有定义可用的网络接口。在config.h和confignet.h中查找mccfcc,打开相应的宏定义。
2, 你的板卡在启动时需要插上网线,如果没有,则需要使用ipAttach进行添加。
另外,bootrom和VIP之间没有联系,也就是说不需要版本对应才能启动。
点赞  2009-12-21 11:36
电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 京公网安备 11010802033920号
    写回复