我正在尝试编译 Linux 内核(3.0.8、buildroot-gcc-12.3.0、ARMv7)以在我的网络摄像机上运行。 以太网0起不来。起初,内核启动刚刚崩溃启动网络步:
Unable to handle kernel paging request at virtual address 00006e78...
我已经删除了一些与网络相关的行在里面才能走得更远一点。
现在任何手动尝试解决以太网0使用如果配置或者ip给出类似的内核分页错误,或者这个:
SIOCSIFFLAGS: No such device or address
下面是其中之一斯特雷斯我尝试过的运行:
root@openipc-fh8856v100:/tmp# strace -i ifconfig eth0 up
[4024ff14] execve("/sbin/ifconfig", ["ifconfig", "eth0", "up"], 0xbee90e3c /* 13 vars */) = 0
[40206f14] set_tls(0x4025b4cc) = 0
[401cfbd0] set_tid_address(0x4025a7cc) = 596
[401dbf24] brk(NULL) = 0x4015e000
[401dbf44] brk(0x40160000) = 0x40160000
[401e4c50] mmap2(0x4015e000, 4096, PROT_NONE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4015e000
[401e4cac] mprotect(0x4015b000, 8192, PROT_READ) = 0
[402106c8] getuid32() = 0
[401eceac] socket(AF_INET, SOCK_DGRAM, IPPROTO_IP) = 3
[401e2a58] ioctl(3, SIOCGIFFLAGS, {ifr_name="eth0", ifr_flags=IFF_BROADCAST|IFF_MULTICAST}) = 0
[401e2a58] ioctl(3, SIOCSIFFLAGS, {ifr_name="eth0", ifr_flags=IFF_UP|IFF_BROADCAST|IFF_RUNNING|IFF_MULTICAST}) = -1 ENXIO (No such device or address)
[40207148] write(2, "ifconfig: SIOCSIFFLAGS: No such "..., 50ifconfig: SIOCSIFFLAGS: No such device or address
) = 50
[401d04fc] exit_group(1) = ?
[????????] +++ exited with 1 +++enter code here
日志显示fh_gmac启动时驱动程序加载正常,但后来 eth0 无法启动:
root@openipc-fh8856v100:/tmp# dmesg | grep -i eth
[ 1.395036] fh_gmac fh_gmac.0: eth0: mixed HW and IP checksum settings.
[ 1.400892] fh_gmac fh_gmac.0: eth0: mixed no checksumming and other settings.
[ 1.408363] eth0 - (dev. name: fh_gmac - id: 0, IRQ #15
[ 130.106506] eth0: MII BUS or phydev is NULL
[ 308.876503] eth0: MII BUS or phydev is NULL
接口文件对我来说看起来不错:
root@openipc-fh8856v100:/etc/network# cat interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 169.254.38.1
netmask 255.255.255.0
gateway 169.254.38.163
dns-nameservers 169.254.38.163 8.8.8.8
以太网在原始固件中的该摄像机上运行良好,设置几乎相同。
任何建议表示赞赏。