当前位置: 技术问答>linux和unix
请高手帮我分析一下
来源: 互联网 发布时间:2017-02-01
本文导语: 本帖最后由 wln2010 于 2012-01-17 14:33:04 编辑 Uncompressing Linux............................................................................... done, booting the kernel. Linux version 2.6.22 (root@HostWi) (gcc version 4.2.3 (Sourcery G++ Lite 2008q1-126)) #7...
Linux version 2.6.22 (root@HostWi) (gcc version 4.2.3 (Sourcery G++ Lite 2008q1-126)) #7 Mon Jan 16 00:04:36 PST 2012
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. Total pages: 8128
Kernel command line: init=/linuxrc root=/dev/mtdblock3 rootfstype=yaffs2 console=ttyS0,115200 mem=32M
AT91: 96 gpio irqs in 3 banks
PID hash table entries: 128 (order: 7, 512 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 32MB = 32MB total
Memory: 29908KB available (2204K code, 217K data, 104K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
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
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
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
macb macb: detected PHY at address 0 (ID 0181:b8b0)
eth0: Atmel MACB at 0xfffc4000 irq 21 (3e:36:65:ba:6f:be)
SSFDC read-only Flash Translation layer
No valid DiskOnChip devices found
NAND device: Manufacturer ID: 0x98, Chip ID: 0x39 (Toshiba NAND 8MiB 1,8V 8-bit)
flash size: 8 MiB
page size: 512 bytes
OOB area size: 16 bytes
sector size: 8 KiB
pages number: 16384
pages per sector: 16
bus width: 8
bits in sector size: 13
bits in page size: 9
bits in OOB size: 4
flash size with OOB: 8448 KiB
page address bytes: 3
sector address bytes: 2
options: 0x62
Scanning device for bad blocks
Creating 1 MTD partitions on "NAND 8MiB 1,8V 8-bit":
0x00000000-0x00800000 : "NAND simulator partition 0"
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit)
NAND_ECC_NONE selected by board driver. This is not recommended !!
Scanning device for bad blocks
Bad eraseblock 689 at 0x00ac4000
Bad eraseblock 690 at 0x00ac8000
Bad eraseblock 691 at 0x00acc000
……….N 个
Bad eraseblock 692 at 0x00ad0000
Bad eraseblock 853 at 0x00d54000
Bad eraseblock 854 at 0x00d58000
Creating 5 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x00000000-0x00001000 : "Bootstrap"
mtd: partition "Bootstrap" doesn't end on an erase block -- force read-only
0x00001000-0x000a0000 : "u-boot"
mtd: partition "u-boot" doesn't start on an erase block boundary -- force read-only
0x000a0000-0x00aa0000 : "kernel"
0x00aa0000-0x014a0000 : "fs"
0x014a0000-0x04000000 : "user space"
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
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
yaffs: dev is 32505859 name is "mtdblock3" rw
yaffs: passed flags ""
VFS: Mounted root (yaffs2 filesystem).
Freeing init memory: 104K
Warning: unable to open an initial console.
Failed to execute /linuxrc. Attempting defaults...
Kernel panic - not syncing: No init found. Try passing init= option to kernel.
请问这是什么原因呀?请高手们帮我分析分析,谢谢! 我每次都结帖,给分的哦…快过年了,先给大家拜早年了。
我是64M的nandflash,yaffs文件系统在NFS上挂载成功的,然后就用mkyaffsimage把那个挂载成功的系统文件夹制作一个文件系统bin文件,通过wrtie.yaffs烧录到flash中,内核也选择了 let yaffs do it’s own ECC啥的,ECC_NONE也改了,到底哪一步出差了?谢谢
NFS挂载成功是否表明系统文件没问题?
|
Warning: unable to open an initial console.
Failed to execute /linuxrc. Attempting defaults...
Kernel panic - not syncing: No init found. Try passing init= option to kernel.
说实话没玩过嵌入式...不过只看提示的话,我想是内核没有在/linuxrc这里面找到合适的shell
我猜......init这个参数后的路径给错了。。。
Failed to execute /linuxrc. Attempting defaults...
Kernel panic - not syncing: No init found. Try passing init= option to kernel.
说实话没玩过嵌入式...不过只看提示的话,我想是内核没有在/linuxrc这里面找到合适的shell
我猜......init这个参数后的路径给错了。。。
|
而LZ的是 init=/linuxrc
这个linuxrc是一个能正常启动的init进程?
|
你是不是把NFS那个文件系统打包生成的yaffs?建议自己做个文件系统
|
root=/dev/mtdblock2这个吧
|
bootloader是mtdblock0
kernel是mtdblock1
rootfs是mtdblock2
kernel是mtdblock1
rootfs是mtdblock2
|
有可能是文件系统的 /dev 目录有问题(没有/dev/console),造成 unable to open an initial console
生成文件系统的命令需要用超级用户。
生成文件系统的命令需要用超级用户。
|
Failed to execute /linuxrc. Attempting defaults...
这种错误信息见得多了 最可能的原因是内核访问的/mtdblock3跟本不是你烧写的yaffs镜像所在
所以内核找不到/linuxrc 更别提/dev/console
Creating 5 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x00000000-0x00001000 : "Bootstrap"
mtd: partition "Bootstrap" doesn't end on an erase block -- force read-only
0x00001000-0x000a0000 : "u-boot"
mtd: partition "u-boot" doesn't start on an erase block boundary -- force read-only
0x000a0000-0x00aa0000 : "kernel"
0x00aa0000-0x014a0000 : "fs"
0x014a0000-0x04000000 : "user space"
请仔细检查nand 分区代码和你的烧写代码,更可以在nfs里尝试mount /dev/mtdblock3 直到正确为止再换用flash做根文件系统
此外doesn't end on an erase block,貌似你的分区划分并不合适,不满足flash最小擦除块的边界,很可能最终影响到你的fs分区
需要你重新分配一下分区
这种错误信息见得多了 最可能的原因是内核访问的/mtdblock3跟本不是你烧写的yaffs镜像所在
所以内核找不到/linuxrc 更别提/dev/console
Creating 5 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x00000000-0x00001000 : "Bootstrap"
mtd: partition "Bootstrap" doesn't end on an erase block -- force read-only
0x00001000-0x000a0000 : "u-boot"
mtd: partition "u-boot" doesn't start on an erase block boundary -- force read-only
0x000a0000-0x00aa0000 : "kernel"
0x00aa0000-0x014a0000 : "fs"
0x014a0000-0x04000000 : "user space"
请仔细检查nand 分区代码和你的烧写代码,更可以在nfs里尝试mount /dev/mtdblock3 直到正确为止再换用flash做根文件系统
此外doesn't end on an erase block,貌似你的分区划分并不合适,不满足flash最小擦除块的边界,很可能最终影响到你的fs分区
需要你重新分配一下分区
|
除了这些,你还要看一下,yaffs制作工具是否符合你的nandflash,看看的现在的nandflash是大页还是小页,要和工具对应。那个error是没有访问正确的yaffs造成的。你可以参考一下 http://blog.csdn.net/liukun321/article/details/6645088
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。