AT91SAM9260EK 开发板移植nfs出现的问题:内核无法打开eth0

zmslf 2011-01-27 10:46:13
准备在AT91SAM9260EK搭建nfs文件系统,设置开发平台。
但在开发板内核启动中报错如下:
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
rtc-at91sam9 at91_rtt.0: hctosys: unable to read the hardware clock
IP-Config: Failed to open eth0
IP-Config: Device `eth0' not found.

Looking up port of RPC 100003/2 on 192.168.0.211
rpcbind: server 192.168.0.211 not responding, timed out
Root-NFS: Unable to get nfsd port number from server, using default
Looking up port of RPC 100005/1 on 192.168.0.211
rpcbind: server 192.168.0.211 not responding, timed out
Root-NFS: Unable to get mountd port number from server, using default
mount: server 192.168.0.211 not responding, timed out

我判断是内核没有启动网络设备,但网络设备是正常的,又怀疑是内核配置原因,但不知是什么地方,请各位大虾帮忙!

具体配置如下:
Linux内核:linux2.6.24
补丁:2.6.24-at91.patch.gz
2.6.24-at91-exp.patch.gz
补丁来自atmel官方网站:http://www.at91.com/linux4sam/bin/view/Linux4SAM/LinuxKernel

一、使用cramfs文件系统,系统正常启动,网络正常,可以ping通host

内核配置: make at91sam9260ek_defconfig

二、使用nfs文件系统,无法从nfs服务器启动,经网络抓包工具查探,开发板无任何数据从网络口发出

内核配置:在at91sam9260ek_defconfig的基础上再加上以下配置
1. 选中 Networking --->
Networking options --->
  • IP: kernel level autoconfiguration
  • IP: DHCP support
  • IP: BOOTP support
  • IP: RARP support
    2. Device Drivers --->
    Block devices --->
    <*> Network block device support
    3. 选中 Device Drivers --->
    Ethernet
  • (10 or 100Mbit) --->
    <*> Atmel MACB support
    4. 选中 File systems --->
    Network File Systems --->
    <*> NFS file system support
  • Provide NFSv3 client support
  • Provide client support for the NFSv3 ACL protocol extension
  • Provide NFSv4 client support
  • (EXPERIMENTAL)
  • Root file system on NFS

...全文
999 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
yxl1030 2013-10-22
  • 打赏
  • 举报
回复
楼主,问题解决了吗?我用dm9000aep也有这个问题,可以的话加我QQ:1664917870
ZFZF294990051 2013-06-06
  • 打赏
  • 举报
回复
#define DM365_EVM_PHY_MASK (1 << 0x1F)//(0x2) //修改这个值试一下。
linhongjin88 2013-04-24
  • 打赏
  • 举报
回复
lz,问题解决了吗? 我手上有块9G25板, 也有类似问题。我怀疑是phy驱动有问题,求助!!!
zmslf 2011-01-28
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 zchongnari 的回复:]
eth0: Atmel MACB at 0xfffc4000 irq 21 (00:00:00:00:00:00)


mac地址全为0,
临时方案:
你可以先进u-boot命令行,ping一下,然后在不断电的情况下重启内核,试试
上策:
修改u-boot,通过mac的相关寄存器传递mac地址给内核
[/Quote]

现在的情况是u-boot不支持网络,MAC的地址是在内核中使用的。而且通过u-boot printenv查看,MAC是有地址的,不是全为0,而且通过u-boot无法修改MAC。
使用相同的内核,不设置从NFS启动,使用cramfs文件系统,启动后网络没有任何问题,而且也可以在开发板上加载nfs,此时加载的nfs目录为空的,不再是文件系统(我把文件系统移除了)
山河 2011-01-28
  • 打赏
  • 举报
回复
看下文件系统里rcS文件,是不是在那里对mac及ip地址进行了配置。从打印的信息看mac的驱动层应该没有对mac地址进行设置。
山河 2011-01-27
  • 打赏
  • 举报
回复
把内核启动信息都贴出来,可能是mac地址问题
山河 2011-01-27
  • 打赏
  • 举报
回复
eth0: Atmel MACB at 0xfffc4000 irq 21 (00:00:00:00:00:00)


mac地址全为0,
临时方案:
你可以先进u-boot命令行,ping一下,然后在不断电的情况下重启内核,试试
上策:
修改u-boot,通过mac的相关寄存器传递mac地址给内核
zmslf 2011-01-27
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 zchongnari 的回复:]
把内核启动信息都贴出来,可能是mac地址问题
[/Quote]

Uncompressing Linux.............................................................
........................ done, booting the kernel.
Linux version 2.6.24 (root@localhost.localdomain) (gcc version 4.2.0 20070413 (p
rerelease) (CodeSourcery Sourcery G++ Lite 2007q1-10)) #1 Wed Jan 26 16:31:30 CS
T 2011
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
Machine: Atmel AT91SAM9260-EK
Memory policy: ECC disabled, Data cache writeback
Clocks: CPU 198 MHz, master 99 MHz, main 18.432 MHz
CPU0: D VIVT write-back cache
CPU0: I cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets
CPU0: D cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
Kernel command line: mem=64M console=ttyS0 115200 root=/dev/nfs nfsroot=192.168.
0.211:/home/target ip=192.168.0.253:192.168.0.211:192.168.0.1:255.255.255.0::eth
0:off
AT91: 96 gpio irqs in 3 banks
PID hash table entries: 256 (order: 8, 1024 bytes)
Console: colour dummy device 80x30
console [ttyS0] enabled
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 62128KB available (2384K code, 235K data, 108K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 64 bytes
NET: Registered protocol family 16
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
Time: pit clocksource has been installed.
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NetWinder Floating Point Emulator V0.97 (double precision)
io scheduler noop registered
io scheduler anticipatory registered (default)
atmel_usart.0: ttyS0 at MMIO 0xfefff200 (irq = 1) is a ATMEL_SERIAL
atmel_usart.1: ttyS1 at MMIO 0xfffb0000 (irq = 6) is a ATMEL_SERIAL
atmel_usart.2: ttyS2 at MMIO 0xfffb4000 (irq = 7) is a ATMEL_SERIAL
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
nbd: registered device at major 43
ssc ssc.0: Atmel SSC device at 0xc4820000 (irq 14)
MACB_mii_bus: probed
eth0: Atmel MACB at 0xfffc4000 irq 21 (00:00:00:00:00:00)
eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=ffffffff:00, irq=-1)
Driver 'sd' needs updating - please use bus_type methods
usbmon: debugfs is not available
at91_ohci at91_ohci: AT91 OHCI
at91_ohci at91_ohci: new USB bus registered, assigned bus number 1
at91_ohci at91_ohci: irq 20, io mem 0x00500000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
udc: at91_udc version 3 May 2006
mice: PS/2 mouse device common for all mice
rtc-at91sam9 at91_rtt.0: rtc core: registered at91_rtt as rtc0
rtc-at91sam9 at91_rtt.0: rtc0: SET TIME!
i2c /dev entries driver
i2c-gpio i2c-gpio: using pins 55 (SDA) and 56 (SCL)
at91sam9_wdt: invalid timeout (must be between 1 and 16)
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
rtc-at91sam9 at91_rtt.0: hctosys: unable to read the hardware clock
IP-Config: Failed to open eth0
IP-Config: Device `eth0' not found.
Looking up port of RPC 100003/2 on 192.168.0.211
rpcbind: server 192.168.0.211 not responding, timed out
Root-NFS: Unable to get nfsd port number from server, using default
Looking up port of RPC 100005/1 on 192.168.0.211
rpcbind: server 192.168.0.211 not responding, timed out
Root-NFS: Unable to get mountd port number from server, using default
mount: server 192.168.0.211 not responding, timed out
Root-NFS: Server returned error -5 while mounting /home/target
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "nfs" or unknown-block(2,0)
Please append a correct "root=" boot option; here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)

4,441

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 内核源代码研究区
社区管理员
  • 内核源代码研究区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧