关于LINUX内核移植的问题

发布于 2022-10-15 04:16:54 字数 178 浏览 16 评论 0

各位高手:
        小弟正在移植Linux-2.6.26至达芬奇平台。编译后运行内核,采用NFS网络文件系统模式。内核运行时出现“VFS:cannot open root device “nfs” or unknown-block(0,255)”。请教出现此问题的原因。谢谢!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(9

天涯离梦残月幽梦 2022-10-22 04:16:54

能多给点信息吗?
这个真不好分析

無處可尋 2022-10-22 04:16:54

看看内核编译吧,该是缺个选项,
#make menuconfig
    General setup  --->  
           [*] Configure standard kernel features (for small systems)  --->
                      --- Configure standard kernel features (for small systems)  
把这个选上。在进去看看这个里面的选项,其余都选上,下面两个别选。然后退出来
                     [ ]     Include all symbols in kallsyms                                                                                                                                                  
                     [ ]     Do an extra kallsyms pass                                       
选泽File  system ----->进去之后选择所有选项,如下所示
[*] /proc file system support                                                                               │ │  
                     [*]   Sysctl support (/proc/sys)                                                                           
                     [*]   Enable /proc page monitoring                                                                          
                     [*] sysfs file system support                                                                                
                     [*] Virtual memory file system support (former shm fs)                                                      
                     [*]   Tmpfs POSIX Access Control Lists                                                                     
                    <*> Userspace-driven configuration filesystem
试试吧,希望对你有帮助。

悲凉≈ 2022-10-22 04:16:54

感谢yaohong0225,不过,问题仍然未解决。

分分钟 2022-10-22 04:16:54

补充内核启动信息如下:

U-Boot 1.1.3 (Jul 16 2009 - 15:15:33)

U-Boot code: 81080000 -> 810976AC  BSS: -> 810A009C
RAM Configuration:
Bank #0: 80000000 256 MB
MY S29 FLASH  Flash: 32 MB
In:    serial
Out:   serial
Err:   serial
ARM Clock :- 297MHz
DDR Clock :- 189MHz
I2C read: I/O error
Hit key %to stop autoboot:  0
TFTP from server 192.168.8.102; our IP address is 192.168.8.146
Filename 'uImage'.
Load address: 0x80700000
Loading: WARN: emac_send_packet: No link
T #################################################################
         #################################################################
         #################################################################
         #################################################################
         #############################################
done
Bytes transferred = 1557628 (17c47c hex)
## Booting image at 80700000 ...
   Image Name:   Linux-2.6.26.5
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1557564 Bytes =  1.5 MB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux.................................................................................................... done, booting the kernel.
Linux version 2.6.26.5 (root@axyf.localdomain) (gcc version 4.2.0 (MontaVista 4.2.0-16.0.32.0801914 2008-08-30)) #8 Thu Jun 23 15:13:54 CST 2011
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
Machine: DaVinci EVM
Memory policy: ECC disabled, Data cache writeback
DaVinci DM6446 variant 0x1
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
CPU0: D cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024
Kernel command line: console=ttyS0,115200n8 noinitrd rw ip=192.168.8.146:192.168.8.102:192.168.8.102:255.255.0.0::ff root=/dev/nfs nfsroot=192.168.8.102:/home/davinciuser/workdir/filesys, nolock
PID hash table entries: 1024 (order: 10, 4096 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 256MB = 256MB total
Memory: 256512KB available (2916K code, 206K data, 88K init)
SLUB: Genslabs=12, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 192 bytes
NET: Registered protocol family 16
DaVinci: 71 gpio irqs
NET: Registered protocol family 2
IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP reno registered
NET: Registered protocol family 1
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
fuse init (API version 7.9)
JFS: nTxBlock = 2005, nTxLock = 16040
SGI XFS with security attributes, no debug enabled
msgmni has been set to 501
io scheduler noop registered
io scheduler anticipatory registered (default)
Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x1c20000 (irq = 40) is a 16550A
console [ttyS0] enabled
brd: module loaded
TI DaVinci EMAC: MAC address is 08:00:28:32:06:08
TI DaVinci EMAC Linux version updated 4.0
TI DaVinci EMAC: Installed 1 instances.
DaVinci flash: probing 16-bit flash bus
DaVinci flash: Probing for AMD compatible flash...
ADDR_MANUFACTURER = 0x1
ADDR_DEVICE_ID = 0x227e
ADDR_DEVICE_ID2 = 0x2222
ADDR_DEVICE_ID3 = 0x2201
dev_id = 0x2201
DaVinci flash: Found 1 x 16MiB AMD AM29LV256M at 0x0
ADDR_MANUFACTURER = 0x1
ADDR_DEVICE_ID = 0x227e
ADDR_DEVICE_ID2 = 0x2222
ADDR_DEVICE_ID3 = 0x2201
dev_id = 0x2201
DaVinci flash: Found 1 x 16MiB AMD AM29LV256M at 0x1000000
ADDR_MANUFACTURER = 0x90
ADDR_DEVICE_ID = 0x55
ADDR_DEVICE_ID2 = 0x3939
ADDR_DEVICE_ID3 = 0x3535
dev_id = 0x3535
ADDR_MANUFACTURER = 0x90
ADDR_DEVICE_ID = 0x55
ADDR_DEVICE_ID2 = 0x3939
ADDR_DEVICE_ID3 = 0x3535
dev_id = 0x3535
ADDR_MANUFACTURER = 0x90
ADDR_DEVICE_ID = 0x55
ADDR_DEVICE_ID2 = 0x3939
ADDR_DEVICE_ID3 = 0x3535
dev_id = 0x3535
ADDR_MANUFACTURER = 0x90
ADDR_DEVICE_ID = 0x55
ADDR_DEVICE_ID2 = 0x3939
ADDR_DEVICE_ID3 = 0x3535
dev_id = 0x3535
ADDR_MANUFACTURER = 0x90
ADDR_DEVICE_ID = 0x55
ADDR_DEVICE_ID2 = 0xffff
ADDR_DEVICE_ID3 = 0x3535
dev_id = 0x3535
ADDR_MANUFACTURER = 0x90
ADDR_DEVICE_ID = 0x55
ADDR_DEVICE_ID2 = 0xffff
ADDR_DEVICE_ID3 = 0x3535
dev_id = 0x3535
ADDR_MANUFACTURER = 0x0
ADDR_DEVICE_ID = 0x0
ADDR_DEVICE_ID2 = 0x0
ADDR_DEVICE_ID3 = 0x0
dev_id = 0x0
ADDR_MANUFACTURER = 0x0
ADDR_DEVICE_ID = 0x0
ADDR_DEVICE_ID2 = 0x0
ADDR_DEVICE_ID3 = 0x0
dev_id = 0x0
ADDR_MANUFACTURER = 0x0
ADDR_DEVICE_ID = 0x0
ADDR_DEVICE_ID2 = 0x0
ADDR_DEVICE_ID3 = 0x0
dev_id = 0x0
ADDR_MANUFACTURER = 0x0
ADDR_DEVICE_ID = 0x0
ADDR_DEVICE_ID2 = 0x0
ADDR_DEVICE_ID3 = 0x0
dev_id = 0x0
ADDR_MANUFACTURER = 0x0
ADDR_DEVICE_ID = 0x0
ADDR_DEVICE_ID2 = 0x0
ADDR_DEVICE_ID3 = 0x0
dev_id = 0x0
ADDR_MANUFACTURER = 0x0
ADDR_DEVICE_ID = 0x0
ADDR_DEVICE_ID2 = 0x0
ADDR_DEVICE_ID3 = 0x0
dev_id = 0x0
ADDR_MANUFACTURER = 0x0
ADDR_DEVICE_ID = 0x0
ADDR_DEVICE_ID2 = 0x0
ADDR_DEVICE_ID3 = 0x0
dev_id = 0x0
ADDR_MANUFACTURER = 0x0
ADDR_DEVICE_ID = 0x0
ADDR_DEVICE_ID2 = 0x0
ADDR_DEVICE_ID3 = 0x0
dev_id = 0x0
Unlocking the entire NOR flash.
mice: PS/2 mouse device common for all mice
TCP cubic registered
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
VFS: Cannot open root device "nfs" or unknown-block(0,255)
Please append a correct "root=" boot option; here are the available partitions:
1f00      32768 mtdblock0 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,255)

走走停停 2022-10-22 04:16:54

回复 5# wangxd5429

    你这个问题,主要是因为文件系统没有挂载上,这个问题,有可能是和你环境变量的设置有关系,先进入uboot模式下,通过print看一下环境变量的设置

温折酒 2022-10-22 04:16:54

感谢chenrvmldd,我按照你说的进行了修改。但是,问题仍然存在。

灯角 2022-10-22 04:16:54

NFS当根文件系统时必须配置
[*] Root file system on NFS

朕就是辣么酷 2022-10-22 04:16:54

感谢c04n05,我按照您说的做了。但是问题仍然存在。

银河中√捞星星 2022-10-22 04:16:54

确认ip netmask  gateway  serverip 都正确么?
nfs server能挂载上吗?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文