巨龙3519v101模组,有串口,直接烧写Hi3519 V101R001C01SPC020编译的内核,文件系统。
配置ip后,显示link up , link becomes ready。 但是ping不通任何地址。
模组网络phy用的rtl8201
ifconfig eth0 192.168.0.104 netmask 255.255.255.0
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
~ # hi_gmac_v200 10050000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
~ #
~ #
~ # ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1): 56 data bytes
--- 192.168.0.1 ping statistics ---
1 packets transmitted, 0 packets received, 100% packet loss
~ #
原因分析:
Demo 板是rgmii 模式,二模组是rmii 模式。需要修改内核使用rmii 。如何修改内核使其支持呢?
方法、
经过查询,发现是在内核dts 文件中,修改RMII。
文件所在路径:
..\Hi3519V101_SDK_V1.0.1.0\osdrv\opensource\kernel\linux-3.18.y\arch\arm\boot\dts\
需要修改的文件:
hisi-hi3519v101-demb.dts hisi-hi3519v101-hmp-demb.dts
打开:hisi-hi3519v101-demb.dts +180
&higmac {
phy-handle = <ðphy>;
phy-mode = "rgmii"; // ==> 将rgmii 修改成rmii
};
修改后:
&higmac {
phy-handle = <ðphy>;
phy-mode = "rmii";
};
同样打开:hisi-hi3519v101-hmp-demb.dts +229
&higmac {
compatible = "hisilicon,higmac-v3", "hisilicon,higmac";
phy-handle = <ðphy>;
phy-mode = "rgmii"; // ==> 将rgmii 修改成rmii
};
修改后:
&higmac {
compatible = "hisilicon,higmac-v3", "hisilicon,higmac";
phy-handle = <ðphy>;
phy-mode = "rmii";
};
然后编译内核,烧录。
测试结果:能够正常ping 通