linux内核移植,挂接nfs出错,跪求高手指点,如果解决感激不尽

nanjingnan 2013-09-14 12:26:01
本人在新买的S3C2440开发板上移植了linux2.6.22.6内核,发现可以挂接yaffas文件系统,但是挂接nfs文件系统时,一直挂接不上,用开发板提供的内核可以挂上,纠结了好几天了不晓得哪的问题,寻高手帮助啊!

下面贴出启动内核时候的提示:
......(表示前面有一部分省略了)
TCP cubic registered
NET: Registered protocol family 1
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
eth0: link down
IP-Config: Complete:
device=eth0, addr=192.168.1.18, mask=255.255.255.0, gw=192.168.1.1,
host=192.168.1.18, domain=, nis-domain=(none),
bootserver=192.168.1.56, rootserver=192.168.1.56, rootpath=
Looking up port of RPC 100003/2 on 192.168.1.56
eth0: link up, 100Mbps, full-duplex, lpa 0xC5E1
rpcbind: server 192.168.1.56 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.1.56
rpcbind: server 192.168.1.56 not responding, timed out
Root-NFS: Unable to get mountd port number from server, using default
mount: server 192.168.1.56 not responding, timed out
Root-NFS: Server returned error -5 while mounting /work/nfs_root/zhan_fs
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:
1f00 256 mtdblock0 (driver?)
1f01 128 mtdblock1 (driver?)
1f02 2048 mtdblock2 (driver?)
1f03 259712 mtdblock3 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)


补充:开始以为是自己移植的网卡有问题,后来直接将开发板提供的内核中与网卡相关的文件/driver/net/dm9000.c以及arch/arm/plat-s3c24xx/common-smdk.c(定义了网卡的平台设备硬件资源)直接复制到自己的内核中,并且在make meunconfig中配置了对nfs的相关支持,编译后的uImage还是不能挂机nfs。
...全文
476 16 打赏 收藏 转发到动态 举报
写回复
用AI写文章
16 条回复
切换为时间正序
请发表友善的回复…
发表回复
tanshi_li 2013-10-16
  • 打赏
  • 举报
回复
可否把自带的内核挂nfs成功的log贴出来看看. networkoption中的
  • IP: kernel level autoconfiguration 对nfs挂载也有影响
龙川魂 2013-10-15
  • 打赏
  • 举报
回复
Root-NFS: Unable to get nfsd port number from server, using default 你还是网络没配置好,与你的电脑无法通讯
zerozr 2013-09-20
  • 打赏
  • 举报
回复
uboot太糟糕了,推荐使用g-bios,非常优秀的国人写的分开源boot loader!
newnewman80 2013-09-18
  • 打赏
  • 举报
回复
删除所有分区,重新格式化flash , 烧uboot ,设置好启动参数试试。
buzaiyouyu001 2013-09-16
  • 打赏
  • 举报
回复
关防火墙,是否可以ping通,将nfs的目录权限设置成777
nanjingnan 2013-09-15
  • 打赏
  • 举报
回复
引用 8 楼 jiangbei_lengyu 的回复:
你的板子通过网线使用nfs挂载根文件系统,文件系统在你的nfs server上面。你的板子跟你的nfs server都ping不通,你觉得能够正常挂载你的nfs文件系统吗? 先把你的板子跟你的nfs server能够ping通了再去挂文件系统。
不好意思,可以ping通的 ERROR: resetting DM9000 -> not responding dm9000 i/o: 0x20000000, id: 0x90000a46 DM9000: running in 16 bit mode MAC: 0a:1b:2c:3d:4e:5f could not establish link checksum bad host 192.168.1.56 is alive 但是把我移植的内核稍微改了下,换到TQ2440上面,轻松挂接了nfs。。。。。。 应该是我对这个板子的硬件还不熟,先用自带的内核挂nfs吧,但也奇怪挂接nfs除了和硬件网卡相关,还要注意什么呢?。。。无语了,看来这个问题必须得着开发板的技术支持了。。。 谢谢你
thenshesaid 2013-09-15
  • 打赏
  • 举报
回复
rpcbind: server 192.168.1.56 not responding, timed out nfs server在跑吗?用netstat -a | grep nfs看一下。防火墙也关掉。
jiangbei_lengyu 2013-09-14
  • 打赏
  • 举报
回复
你的板子通过网线使用nfs挂载根文件系统,文件系统在你的nfs server上面。你的板子跟你的nfs server都ping不通,你觉得能够正常挂载你的nfs文件系统吗? 先把你的板子跟你的nfs server能够ping通了再去挂文件系统。
nanjingnan 2013-09-14
  • 打赏
  • 举报
回复
补充: drivers/rtc/hctosys.c: unable to open rtc device (rtc0) eth0: link down IP-Config: Complete: device=eth0, addr=192.168.1.18, mask=255.255.255.0, gw=192.168.1.1, host=192.168.1.18, domain=, nis-domain=(none), bootserver=192.168.1.56, rootserver=192.168.1.56, rootpath= Looking up port of RPC 100003/2 on 192.168.1.56 eth0: link up, 100Mbps, full-duplex, lpa 0xC5E1 (每次到这句话是会停留蛮久的才出现后面的启动信息) rpcbind: server 192.168.1.56 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.1.56 rpcbind: server 192.168.1.56 not responding, timed out Root-NFS: Unable to get mountd port number from server, using default 。。。。。。
nanjingnan 2013-09-14
  • 打赏
  • 举报
回复
引用 4 楼 jiangbei_lengyu 的回复:
你在uboot下面ping一下你的nfs server看看能不能ping通。
是ping关机的虚拟机的IP吗?ping不通: ping failed; host 192.168.1.56 is not alive
nanjingnan 2013-09-14
  • 打赏
  • 举报
回复
引用 3 楼 lutao614 的回复:
看下你内核中Root file system on NFS有没有选中?
选中了
jiangbei_lengyu 2013-09-14
  • 打赏
  • 举报
回复
你在uboot下面ping一下你的nfs server看看能不能ping通。
嵌入式乌托邦 2013-09-14
  • 打赏
  • 举报
回复
看下你内核中Root file system on NFS有没有选中?
nanjingnan 2013-09-14
  • 打赏
  • 举报
回复
引用 1 楼 jiangbei_lengyu 的回复:
启动参数,要把文件系统的位置定义为你的nfs server
我用开发板自带的内核可以挂接,应该不是启动参数的问题吧?这是我的启动参数: bootargs=noinitrd root=/dev/nfs nfsroot=192.168.1.56:/work/nfs_root/zhan_fs,nolock ip=192.168.1.18:192.168.1.56:192.168.1.1:255.255.255.0::eth0:off init=/linuxrc console=ttySAC0 在贴全一点的启动时的提示: Starting kernel ... Uncompressing Linux.................................................................................................................... done, booting the kernel. Linux version 2.6.22.6 (root@book-desktop) (gcc version 3.4.5) #1 Thu Sep 12 17:21:26 CST 2013 CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177 Machine: SMDK2440 Memory policy: ECC disabled, Data cache writeback CPU S3C2440A (id 0x32440001) S3C244X: core 400.000 MHz, memory 100.000 MHz, peripheral 50.000 MHz S3C24XX Clocks, (c) 2004 Simtec Electronics CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on CPU0: D VIVT write-back cache CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets Built 1 zonelists. Total pages: 16256 Kernel command line: noinitrd root=/dev/nfs nfsroot=192.168.1.56:/work/nfs_root/zhan_fs,nolock ip=192.168.1.18:192.168.1.56:192.168.1.1:255.255.255.0::eth0:off init=/linuxrc console=ttySAC0 irq: clearing subpending status 00000002 PID hash table entries: 256 (order: 8, 1024 bytes) timer tcon=00500000, tcnt a2c1, tcfg 00000200,00000000, usec 00001eb8 Console: colour dummy device 80x30 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: 61056KB available (3220K code, 438K data, 136K init) Mount-cache hash table entries: 512 CPU: Testing write buffer coherency: ok NET: Registered protocol family 16 S3C2410 Power Management, (c) 2004 Simtec Electronics S3C2440: Initialising architecture S3C2440: IRQ Support S3C2440: Clock Support, DVS off S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics DMA channel 0 at c4800000, irq 33 DMA channel 1 at c4800040, irq 34 DMA channel 2 at c4800080, irq 35 DMA channel 3 at c48000c0, irq 36 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 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) JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc. yaffs Sep 12 2013 17:18:57 Installing. io scheduler noop registered io scheduler anticipatory registered (default) io scheduler deadline registered io scheduler cfq registered lp: driver loaded but no devices found ppdev: user-space parallel port driver S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled s3c2440-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440 s3c2440-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440 s3c2440-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440 RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize loop: module loaded dm9000 Ethernet Driver eth%d: Invalid ethernet MAC address. Please set using ifconfig Now use the default MAC address: 08:90:90:90:90:90 eth0: dm9000 at c486a000,c486c004 IRQ 51 MAC: 08:90:90:90:90:90 S3C24XX NAND Driver, (c) 2004 Simtec Electronics s3c2440-nand s3c2440-nand: Tacls=3, 30ns Twrph0=7 70ns, Twrph1=3 30ns NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-bit) Scanning device for bad blocks Bad eraseblock 271 at 0x021e0000 Creating 4 MTD partitions on "NAND 256MiB 3,3V 8-bit": 0x00000000-0x00040000 : "bootloader" 0x00040000-0x00060000 : "params" 0x00060000-0x00260000 : "kernel" 0x00260000-0x10000000 : "root" s3c2410-ohci s3c2410-ohci: S3C24XX OHCI s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1 s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000 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. mice: PS/2 mouse device common for all mice S3C24XX RTC, (c) 2004,2006 Simtec Electronics s3c2440-i2c s3c2440-i2c: slave address 0x10 s3c2440-i2c s3c2440-i2c: bus frequency set to 390 KHz s3c2440-i2c s3c2440-i2c: i2c-0: S3C I2C adapter usbcore: registered new interface driver hiddev usbcore: registered new interface driver usbhid drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver Advanced Linux Sound Architecture Driver Version 1.0.14 (Thu May 31 09:03:25 2007 UTC). ASoC version 0.13.1 ALSA device list: No soundcards found. TCP cubic registered NET: Registered protocol family 1 drivers/rtc/hctosys.c: unable to open rtc device (rtc0) eth0: link down IP-Config: Complete: device=eth0, addr=192.168.1.18, mask=255.255.255.0, gw=192.168.1.1, host=192.168.1.18, domain=, nis-domain=(none), bootserver=192.168.1.56, rootserver=192.168.1.56, rootpath= Looking up port of RPC 100003/2 on 192.168.1.56 eth0: link up, 100Mbps, full-duplex, lpa 0xC5E1 rpcbind: server 192.168.1.56 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.1.56 rpcbind: server 192.168.1.56 not responding, timed out Root-NFS: Unable to get mountd port number from server, using default mount: server 192.168.1.56 not responding, timed out Root-NFS: Server returned error -5 while mounting /work/nfs_root/zhan_fs 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: 1f00 256 mtdblock0 (driver?) 1f01 128 mtdblock1 (driver?) 1f02 2048 mtdblock2 (driver?) 1f03 259712 mtdblock3 (driver?) Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
jiangbei_lengyu 2013-09-14
  • 打赏
  • 举报
回复
启动参数,要把文件系统的位置定义为你的nfs server

21,599

社区成员

发帖
与我相关
我的任务
社区描述
硬件/嵌入开发 驱动开发/核心开发
社区管理员
  • 驱动开发/核心开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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