不久前我移植了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 48packet receivedReceive from protocol 0x86ddpacket receivedReceive from protocol 0x800Got IPlen bad 62packet receivedReceive from protocol 0x806Got ARPpacket receivedReceive from protocol 0x86ddpacket receivedReceive from protocol 0x800Got IPlen bad 48packet receivedReceive from protocol 0x86ddpacket receivedReceive from protocol 0x800Got IPlen bad 62packet receivedReceive from protocol 0x800Got IPlen=128, v=00packet receivedReceive 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应该用比较新的交叉编译工具链,否则会出现很诡异的问题。
文章来源于:电子工程世界 原文链接
本站所有转载文章系出于传递更多信息之目的,且明确注明来源,不希望被转载的媒体或个人可与我们联系,我们将立即进行删除处理。