TI中文支持网
TI专业的中文技术问题搜集分享网站

AM3354移植RT-Linux SDK系统后,网口2能起来,但是ping不通

你们好!我使用我们自己做的AM3354的EVM板卡,之前移植了一套TI 的ti-processor-sdk-linux-am335x-evm-04.00.00.04SDK,双网口能正常使用,但是接着又移植了一套ti-processor-sdk-linux-rt-am335x-evm-04.03.00.05SDK后,系统起来后网口1能正常使用。将网口2插上网线,会提示网口2起来了,但是网口2 ping不通外网和网关,只能ping通自己。我尝试着uboot、devicetree、filesystem都使用RT-Linux的,然后把zImage换成之前普通Linux的后,网口2就能正常使用了。但是我的普通Linux和RT-Linux内核的menuconfig基网络的配置是一样的,都使用的Ti内部驱动。就是不明白为什么RT-Linux版本的就不行,不知道普通的Linux版本和RT-Linux的这块儿有什么差异。请大家帮忙看看。以下图是RT-Linux版本网口的打印信息:系统起来是网口1插着网线,然后ping了下,接着把网线换到了网口2上继续ping。(我的PC设置了两个网段的IP,分别为192.168.1.80和192.168.2.80)

root@am335x-evm:~# dmesg | grep cpsw
[ 1.346684] cpsw 4a100000.ethernet: Detected MACID = b0:d5:cc:b2:c1:d9
[ 1.353783] cpsw 4a100000.ethernet: device node lookup for pps timer failed
[ 1.361162] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)
[ 1.370116] cpsw 4a100000.ethernet: cpsw: Detected MACID = b0:d5:cc:b2:c1:db
[ 15.776452] net eth1: initializing cpsw version 1.12 (0)
[ 15.782086] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
[ 15.788766] cpsw 4a100000.ethernet: ALE Table size 1024
[ 16.592937] net eth0: initializing cpsw version 1.12 (0)
[ 19.929791] cpsw 4a100000.ethernet eth0: Link is Up – 100Mbps/Full – flow control rx/tx
root@am335x-evm:~# ifconfig
eth0 Link encap:Ethernet HWaddr B0:D5:CC:B2:C1:D9
inet addr:192.168.1.39 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::b2d5:ccff:feb2:c1d9%763860/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:51 errors:0 dropped:0 overruns:0 frame:0
TX packets:66 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5182 (5.0 KiB) TX bytes:11381 (11.1 KiB)
Interrupt:179

eth1 Link encap:Ethernet HWaddr B0:D5:CC:B2:C1:DB
inet addr:192.168.2.39 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1%763860/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:169 errors:0 dropped:0 overruns:0 frame:0
TX packets:169 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:12904 (12.6 KiB) TX bytes:12904 (12.6 KiB)

root@am335x-evm:~# ping 192.168.1.80
PING 192.168.1.80 (192.168.1.80): 56 data bytes
64 bytes from 192.168.1.80: seq=0 ttl=64 time=1.730 ms
64 bytes from 192.168.1.80: seq=1 ttl=64 time=0.929 ms
^C
— 192.168.1.80 ping statistics —
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 0.929/1.329/1.730 ms
root@am335x-evm:~# [ 59.449369] cpsw 4a100000.ethernet eth0: Link is Down
[ 61.929414] cpsw 4a100000.ethernet eth1: Link is Up – 100Mbps/Full – flow control rx/tx
[ 61.937988] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready

root@am335x-evm:~# ping 192.168.2.80
PING 192.168.2.80 (192.168.2.80): 56 data bytes

^C
— 192.168.2.80 ping statistics —
8 packets transmitted, 0 packets received, 100% packet loss
root@am335x-evm:~# ping 192.168.2.39
PING 192.168.2.39 (192.168.2.39): 56 data bytes
64 bytes from 192.168.2.39: seq=0 ttl=64 time=0.604 ms
64 bytes from 192.168.2.39: seq=1 ttl=64 time=0.375 ms
64 bytes from 192.168.2.39: seq=2 ttl=64 time=0.495 ms
^C
— 192.168.2.39 ping statistics —
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 0.375/0.491/0.604 ms
root@am335x-evm:~#

shun jin:

目前移植的好着的双网口打印如下:

root@am335x-evm:~# dmesg | grep cpsw

[    1.529036] cpsw 4a100000.ethernet: Detected MACID = b0:d5:cc:b2:c1:d9

[    1.536274] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)

[    1.545468] cpsw 4a100000.ethernet: cpsw: Detected MACID = b0:d5:cc:b2:c1:db

[   18.011152] net eth1: initializing cpsw version 1.12 (0)

[   18.075987] net eth0: initialized cpsw ale version 1.4

[   18.722395] net eth0: initializing cpsw version 1.12 (0)

[   21.121677] cpsw 4a100000.ethernet eth0: Link is Up – 100Mbps/Full – flow control rx/tx

我发现比上边RT-Linux的多了个错误:

[ 1.353783] cpsw 4a100000.ethernet: device node lookup for pps timer failed

赞(0)
未经允许不得转载:TI中文支持网 » AM3354移植RT-Linux SDK系统后,网口2能起来,但是ping不通
分享到: 更多 (0)