V853有线网络无法连接
-
- 板子型号是全志官方的V853开发板;
- 自己编译的固件,网卡相关的配置如下:
a) 内核中menuconfig -> Device Drivers -> Network device support -> Ethernet driver support -> Use extern phy 已设置编入内核(默认就有的)
b) device/config/chips/v853/configs/vision/board.dts 中的 gmac节点已打开,配置如下:
&gmac0{ phy-mode = "rmii"; use_ephy25m = <1>; pinctrl-0 = <&gmac0_pins_a>; pinctrl-1 = <&gmac0_pins_b>; pinctrl-names = "default", "sleep"; tx-delay = <7>; rx-delay = <31>; status = "okay"; }; 。。。 gmac0_pins_a: gmac0@0 { allwinner,pins = "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15"; allwinner,function = "rgmii"; allwinner,drive = <1>; allwinner,muxsel = <3>; allwinner,pull = <0>; }; gmac0_pins_b: gmac0@1 { allwinner,pins = "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15"; allwinner,function = "gpio_in"; allwinner,drive = <0>; allwinner,muxsel = <0>; allwinner,pull = <0>; };
- ./build.sh 编译后打包成固件,刷到板子上后。进行如下操作:
root@TinaLinux:/# ifconfig -a eth0 Link encap:Ethernet HWaddr 3E:35:B2:47:65:1E BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Interrupt:59 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:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) p2p0 Link encap:Ethernet HWaddr 3C:21:4A:66:69:26 BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) wlan0 Link encap:Ethernet HWaddr 3C:21:4A:66:69:25 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) root@TinaLinux:/# ifconfig eth0 up [ 46.729092] libphy: gmac0: probed [ 46.733505] sunxi-gmac gmac0 eth0: eth0: Type(6) PHY ID 02430c54 at 1 IRQ poll (gmac0-0:01) [ 46.753881] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready root@TinaLinux:/# root@TinaLinux:/# [ 48.850744] sunxi-gmac gmac0 eth0: Link is Up - 100Mbps/Full - flow control off [ 48.859036] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready root@TinaLinux:/# udhcpc -i eth0 udhcpc: started, v1.33.2 udhcpc: sending discover udhcpc: sending discover udhcpc: sending discover
无法获取到IP地址,上不了网。是不是有哪些地方没有配置好呢?希望大神可以帮我看下,谢谢。
-
配置dhcp获取ip,ifconfig eth0 up
-
@yteraa 感谢回复。这个DHCP的配置有说明吗?
-
@negro 不用配置,ifconfig eth0 up就行
-
@yuzukitsuru 非常感谢。确实可以了。不过非常奇怪,我昨天就是直接接网线,然后执行ifconfig eth0 up 是没有IP地址的。现在就有了。
难道是网线要在执行up的命令后接入才可以?我刚试一下,执行up命令后需要重新插拔网线才可以。非常感谢 -
@negro
应该是当时网络有问题,多执行几次 udhcpc -i eth0 直到获取IP成功。
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号