u-boot-2014-04 网络不通解决一例
不久前我移植了u-boot-214-04到Tq2440的板子上,基本功能都有了,网卡也可以使用了。有一天打算把u-boot-2010-06也也一直到tq2440上,移植完后发现u-boot-214-04在tq2440上的网络死活不通了。
通过加打印发现,在u-boot-2014-04上使用ping命令是有如下信息:
Got ARP
packet received
Receive from protocol 0x86dd
packet received
Receive from protocol 0x86dd
packet received
Receive from protocol 0x800
Got IP
len bad 48 < 124
packet received
Receive from protocol 0x86dd
packet received
Receive from protocol 0x800
Got IP
len bad 62 < 125
packet received
Receive from protocol 0x806
Got ARP
packet received
Receive from protocol 0x86dd
packet received
Receive from protocol 0x800
Got IP
len bad 48 < 126
packet received
Receive from protocol 0x86dd
packet received
Receive from protocol 0x800
Got IP
len bad 62 < 127
packet received
Receive from protocol 0x800
Got IP
len=128, v=00
packet received
Receive from protocol 0x800
即收的的包格式不对,总是打印len bad,觉得不应该,用u-boot-2010-06,网络却是好的。最后发现,原来是我在移植u-boot-2014-04时使用的工具链的版本是:
gcc version 4.3.3 (Sourcery G++ Lite 2009q1-176)
但是在移植u-boot-2010-06的时候换成了
gcc version 3.4.5
用3.4.5版本了的工具链编译最新的u-boot,会发生问题。然后我重新换成4.3.3版本的工具链,网络就正常了。
所以,编译最新的u-boot应该用比较新的交叉编译工具链,否则会出现很诡异的问题。
本文来自博客园,作者:摩斯电码,未经同意,禁止转载