如果全志R329中以太网模块初始化失败的话,应该怎么解决呢?
本文回答来源链接:志R329以太网模块初始化失败如何解决?
一般初始化失败有以下现象
执行ifconfig -a/ifconfig eth0/ifconfig eth0 up命令,找不到eth0设备,有如下类似打印:
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:6480 errors:0 dropped:0 overruns:0 frame:0
TX packets:6480 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:505440 (493.5 KiB) TX bytes:505440 (493.5 KiB)
root@TinaLinux:/#
root@TinaLinux:/# ifconfig eth0
ifconfig: eth0: error fetching interface information: Device not found
root@TinaLinux:/#
root@TinaLinux:/# ifconfig eth0 up
ifconfig: SIOCGIFFLAGS: No such device
以上现象出现的原因是以太网模块配置未生效或存在CPIO冲突
1. 以太网配置未生效
(1) 首先,确认内核menuconfig以太网模块配置是否打开,路径及截图如下:
menuconfig -> Device Drivers -> Network device support -> Ethernet driver support
(2) 然后,确认board.dts/sys_config.fex中GMAC模块是否打开,board.dts配置示例如下:
gmac0: eth@05020000{
phy-mode = "rgmii";
use_ephy25m = <1>;
tx-delay = <7>;
rx-delay = <0>;
status = "okay";
};
2. CPIO冲突
(1) 首先,结合内核启动log定位与哪个模块存在GPIO冲突,有如下类似打印:
sun50iw10p1-pinctrl pio: pin PH0 already requested by twi0; cannot claim for gmac0
(2) 然后,确认该模块GPIO配置是否有误或者是否可以关闭该模块。
注:
附件:FlameGraph.tar.xz (详情可查看原文链接)