ZYNQ uboot 网络调试

--- title: file_name EntryName: file_name date: 2020-07-23 06:50:53 categories: tags: ---

章节描述:
介绍一次uboot调试网络的经验。

背景

使用 Vivado配置好网络,并在PetaLinux中构建了完整的uboot、kernel、rootfs以后,发现网络有问题。

> ping 192.168.168.1
ethernet@e000b000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
ping failed; host 192.168.168.1 is not alive
Zynq> ping 192.168.168.1
Using ethernet@e000b000 device
ARP Retry count exceeded; starting again
ping failed; host 192.168.168.1 is not alive

一直ping不通,检查了一遍以后发现配置很正常。

pri打印了一下环境变量以后发现问题。

ipaddr=192.168.168.168
...
serverip=192.168.168.1

细心的读者肯定也发现哪里不对劲了。

是的,缺少了子网掩码。

Zynq> set gateway 255.255.255.0
Zynq> ping 192.168.168.1
Using ethernet@e000b000 device
host 192.168.168.1 is alive

猜你喜欢

转载自www.cnblogs.com/schips/p/13368087.html