NFS调试linux内核启动卡死在DHCP和RARP上

手头有两块板子。第一块有两个网卡phy,第二块一个网卡phy。为了驱动的统一使用,在内核中都配置如下

Device Drivers ---> 
[*] Network device support --->
 <*>Dummy net driver support
<*> Nuvoton NUC970 Ethernet MAC 0
<*> Nuvoton NUC970 Ethernet MAC 1

我发现在使用NFS的时候,在单一phy的板子上没有任何问题。反而在双网卡的就会出现如题目所示的现象。为此我想

baudrate=115200
bootargs=noinitrd console=ttyS0,115200 root=/dev/nfs nfsroot=129.1.5.109:/home/collector/nuc970bsp/rootfs_48 bootm 0x7FC0 ip=129.1.5.107:129.1.5.109:129.1.5.109:255.255.255.0::eth0 rdinit=/sbin/init mem=64M; bootcmd=tftp 0x7FC0 970uimage;
bootcmd=tftp 0x7FC0 970uimage ;bootm 0x7FC0
bootdelay=3
ethact=emac
ethaddr=00:00:00:33:66:98
gatewayip=129.1.88.1
ipaddr=129.1.5.107
netmask=255.255.255.0
serverip=129.1.5.109
stderr=serial
stdin=serial
stdout=serial

总结原因是如果我的bootargs中ip=129.1.5.107:129.1.5.109:129.1.5.109:255.255.255.0::eth0
不带有eth0。遇到双网卡的时候,内核就不知道i这个配置是给谁的了。所以就各种由于彷徨,卡死。如果咱们去指定为eth0,就可以解决这个问题。困惑了好久,通过实验验证了。

猜你喜欢

转载自blog.csdn.net/qq_21435127/article/details/78914539