天嵌 ARM开发社区

 找回密码
 注册
查看: 3776|回复: 6

Warning: unable to open an initial console

[复制链接]
danshi126 发表于 2012-1-19 13:19:24 | 显示全部楼层 |阅读模式
本帖最后由 danshi126 于 2012-2-4 21:47 编辑

Freeing init memory: 116K
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.

内核启动时panic了   出现这个问题有哪些因素呢,
            根文件系统已烧进去,内核存放位置0x00060000~0x00260000,根文件系统我从0x00260000开始         放置,
           根文件系统中,console 和null两个设备文件已有,,
     
  制作文件系统工具:mkyaffs2image
   内核版本:   2.6.22
   UBOOT版本:1.2.0
   文件系统确定是用nand write.yaffs  命令烧写的


以下是启动打印出的信息:

U-Boot 1.2.0 (Jan  5 2012 - 00:05:15)

DRAM:  64 MB
Flash:  2 MB
NAND:  256 MiB
In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  0

NAND read: device 0 offset 0x60000, size 0x200000

Bad block at 0xc0000 in erase block from 0xc0000 will be skipped
Reading data from 0x27f800 -- 100% complete.
2097152 bytes read: OK
## Booting image at 30007fc0 ...
   Image Name:   Linux-2.6.22
   Created:      2012-01-19   4:12:13 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1528104 Bytes =  1.5 MB
   Load Address: 30008000
   Entry Point:  30008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux................................................................................................... done, booting the kernel.
Linux version 2.6.22 (wangping@wangping) (gcc version 3.4.5) #3 Thu Jan 19 12:12:07 CST 2012
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: 32512
Kernel command line: noinitrd root=/dev/mtdblock2 init=linuxrc console=ttySAC0 mem=128M rootfstype=yaffs
irq: clearing pending ext status 00080000
irq: clearing subpending status 00000002
PID hash table entries: 512 (order: 9, 2048 bytes)
timer tcon=00500000, tcnt a2c1, tcfg 00000200,00000000, usec 00001eb8
Console: colour dummy device 80x30
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 128MB = 128MB total
Memory: 126592KB available (2824K code, 295K data, 116K 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 c8800000, irq 33
DMA channel 1 at c8800040, irq 34
DMA channel 2 at c8800080, irq 35
DMA channel 3 at c88000c0, irq 36
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: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
yaffs Jan 19 2012 12:11:58 Installing.
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
s3c2410-lcd s3c2410-lcd: invalid bpp 16
Console: switching to colour frame buffer device 30x40
fb0: s3c2410fb frame buffer device
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: km2440_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440
s3c2440-uart.1: km2440_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: km2440_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
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2440-nand s3c2440-nand: Tacls=2, 20ns Twrph0=3 30ns, Twrph1=2 20ns
NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 6 at 0x000c0000
Bad eraseblock 21 at 0x002a0000
Bad eraseblock 22 at 0x002c0000
Bad eraseblock 23 at 0x002e0000
Bad eraseblock 24 at 0x00300000
Bad eraseblock 25 at 0x00320000
Bad eraseblock 26 at 0x00340000
Bad eraseblock 27 at 0x00360000
Bad eraseblock 28 at 0x00380000
Bad eraseblock 29 at 0x003a0000
Bad eraseblock 30 at 0x003c0000
Bad eraseblock 31 at 0x003e0000
Bad eraseblock 32 at 0x00400000
Bad eraseblock 33 at 0x00420000
Bad eraseblock 34 at 0x00440000
Bad eraseblock 35 at 0x00460000
Bad eraseblock 36 at 0x00480000
Bad eraseblock 37 at 0x004a0000
Bad eraseblock 38 at 0x004c0000
Bad eraseblock 39 at 0x004e0000
Bad eraseblock 40 at 0x00500000
Bad eraseblock 41 at 0x00520000
Bad eraseblock 42 at 0x00540000
Bad eraseblock 43 at 0x00560000
Bad eraseblock 44 at 0x00580000
Bad eraseblock 45 at 0x005a0000
Bad eraseblock 46 at 0x005c0000
Bad eraseblock 47 at 0x005e0000
Bad eraseblock 48 at 0x00600000
Bad eraseblock 49 at 0x00620000
Bad eraseblock 50 at 0x00640000
Bad eraseblock 51 at 0x00660000
Bad eraseblock 52 at 0x00680000
Bad eraseblock 53 at 0x006a0000
Bad eraseblock 312 at 0x02700000
Creating 3 MTD partitions on "NAND 256MiB 3,3V 8-bit":
0x00000000-0x00060000 : "Bootloader"
0x00060000-0x00260000 : "Kernel"
0x00260000-0x10000000 : "yaffs2"
usbmon: debugfs is not available
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
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
TCP cubic registered
NET: Registered protocol family 1
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
yaffs: dev is 32505858 name is "mtdblock2"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.2, "mtdblock2"
yaffs: auto selecting yaffs2
block 3 is bad
block 4 is bad
block 5 is bad
block 6 is bad
block 7 is bad
block 8 is bad
block 9 is bad
block 10 is bad
block 11 is bad
block 12 is bad
block 13 is bad
block 14 is bad
block 15 is bad
block 16 is bad
block 17 is bad
block 18 is bad
block 19 is bad
block 20 is bad
block 21 is bad
block 22 is bad
block 23 is bad
block 24 is bad
block 25 is bad
block 26 is bad
block 27 is bad
block 28 is bad
block 29 is bad
block 30 is bad
block 31 is bad
block 32 is bad
block 33 is bad
block 34 is bad
block 35 is bad
block 294 is bad
yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs filesystem).
Freeing init memory: 116K
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.
raominping 发表于 2012-1-19 18:25:40 | 显示全部楼层
内核问题可能较大...看下配置哦...http://www.armbbs.net/forum.php?mod=viewthread&tid=10202
raominping 发表于 2012-1-19 18:26:27 | 显示全部楼层
还有,文件的属性哦..chmod 777 文件名..多看下教程.肯定有遗漏的步骤哦
亚瑟王 发表于 2012-2-3 12:29:22 | 显示全部楼层
亲,你的Nand Flash需要格式化一下,因为启动信息里面显示有很大片的连续坏块,这个太异常了。你用的u-boot不是天嵌提供的,应该是你的u-boot的yaffs烧写功能有问题引起的。
 楼主| danshi126 发表于 2012-2-4 12:21:10 | 显示全部楼层
谢谢亚瑟王提醒,,,,uboot的是自己的,   这些坏块是要下载YAFFS文件系统后才有,,      
NAND的坏块只能用:
                               [1] Nand scrub - really clean NAND erasing bad blocks (UNSAFE)
  这个选项才能格式化,,


  改用天嵌提供的U-boot 后下载YAFFS 文件系统后,坏块少了一半

    但下载天嵌提供的YAFFS文件系统,坏块就没有了,可能我做的YAFFS文件有问题吧

   
 楼主| danshi126 发表于 2012-2-4 13:11:23 | 显示全部楼层
我下载了,天嵌提供的文件系统,提示:
  
\                  U-Boot 1.2.0 (Feb  4 2012 - 11:55:30)

DRAM:  64 MB
Flash:  2 MB
NAND:  256 MiB
*** Warning - bad CRC or NAND, using default environment

In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  0

NAND read: device 0 offset 0x100000, size 0x200000

Reading data from 0x2ff800 -- 100% complete.
2097152 bytes read: OK
## Booting image at 30007fc0 ...
   Image Name:   Linux-2.6.30.4wangping
   Created:      2012-02-04   5:03:28 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1947760 Bytes =  1.9 MB
   Load Address: 30008000
   Entry Point:  30008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux........................................................................................................................... done, booting the kernel.
Linux version 2.6.30.4wangping (wangping@wangping) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-176) ) #3 Sat Feb 4 13:03:22 CST 2012
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache
Machine: SMDK2440
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C24XX Clocks, (c) 2004 Simtec Electronics
S3C244X: core 400.000 MHz, memory 100.000 MHz, peripheral 50.000 MHz
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
Kernel command line: noinitrd root=/dev/mtdblock2 init=linuxrc console=ttySAC0 mem=128M rootfstype=yaffs
NR_IRQS:85
irq: clearing pending ext status 00080000
irq: clearing subpending status 00000002
PID hash table entries: 512 (order: 9, 2048 bytes)
Console: colour dummy device 80x30
console [ttySAC0] enabled
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 128MB = 128MB total
Memory: 125680KB available (3468K code, 375K data, 120K init, 0K highmem)
Calibrating delay loop... 199.47 BogoMIPS (lpj=498688)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 936 bytes
NET: Registered protocol family 16
S3C Power Management, Copyright 2004 Simtec Electronics
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics
DMA channel 0 at c8808000, irq 33
DMA channel 1 at c8808040, irq 34
DMA channel 2 at c8808080, irq 35
DMA channel 3 at c88080c0, irq 36
S3C244X: Clock Support, DVS off
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
s3c2440-i2c s3c2440-i2c: slave address 0x10
s3c2440-i2c s3c2440-i2c: bus frequency set to 97 KHz
s3c2440-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
NET: Registered protocol family 1
NetWinder Floating Point Emulator V0.97 (extended precision)
JFFS2 version 2.2. (NAND) (SUMMARY)  &#169; 2001-2006 Red Hat, Inc.
ROMFS MTD (C) 2007 Red Hat, Inc.
yaffs Feb  4 2012 13:03:12 Installing.
msgmni has been set to 245
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
Console: switching to colour frame buffer device 30x40
fb0: s3c2410fb frame buffer device
lp: driver loaded but no devices found
ppdev: user-space parallel port driver
Serial: 8250/16550 driver, 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
brd: module loaded
loop: module loaded
Uniform Multi-Platform E-IDE driver
ide-gd driver 1.18
ide-cd driver 5.00
Driver 'sd' needs updating - please use bus_type methods
dm9000 Ethernet Driver, V1.31
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2440-nand s3c2440-nand: Tacls=2, 20ns Twrph0=3 30ns, Twrph1=2 20ns
NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 6 at 0x0000000c0000
Bad eraseblock 312 at 0x000002700000
Creating 3 MTD partitions on "NAND 256MiB 3,3V 8-bit":
0x000000000000-0x000000100000 : "Bootloader"
0x000000100000-0x000000400000 : "Kernel"
0x000000400000-0x000010400000 : "Filesystem"
mtd: partition "Filesystem" extends beyond the end of device "NAND 256MiB 3,3V 8-bit" -- size truncated to 0xfc00000
usbmon: debugfs is not available
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
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
usbcore: registered new interface driver libusual
usbcore: registered new interface driver usbserial
USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial Driver core
USB Serial support registered for FTDI USB Serial Device
usbcore: registered new interface driver ftdi_sio
ftdi_sio: v1.4.3:USB FTDI Serial Converters Driver
USB Serial support registered for pl2303
usbcore: registered new interface driver pl2303
pl2303: Prolific PL2303 USB to serial adaptor driver
mice: PS/2 mouse device common for all mice
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
Advanced Linux Sound Architecture Driver Version 1.0.20.
ALSA device list:
  No soundcards found.
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
yaffs: dev is 32505858 name is "mtdblock2"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.2, "mtdblock2"
yaffs: auto selecting yaffs2
block 281 is bad
yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs filesystem) on device 31:2.
Freeing init memory: 120K
hwclock: can't open '/dev/misc/rtc': No such file or directory
input_polldev: version magic '2.6.30.4-EmbedSky mod_unload ARMv4 ' should be '2.6.30.4wangping mod_unload ARMv4 '
insmod: cannot insert '/lib/input-polldev.ko': invalid module format
mac80211: version magic '2.6.30.4-EmbedSky mod_unload ARMv4 ' should be '2.6.30.4wangping mod_unload ARMv4 '
insmod: cannot insert '/lib/mac80211.ko': invalid module format
rt2x00lib: version magic '2.6.30.4-EmbedSky mod_unload ARMv4 ' should be '2.6.30.4wangping mod_unload ARMv4 '
insmod: cannot insert '/lib/rt2x00lib.ko': invalid module format
rt2x00usb: version magic '2.6.30.4-EmbedSky mod_unload ARMv4 ' should be '2.6.30.4wangping mod_unload ARMv4 '
insmod: cannot insert '/lib/rt2x00usb.ko': invalid module format
rt73usb: version magic '2.6.30.4-EmbedSky mod_unload ARMv4 ' should be '2.6.30.4wangping mod_unload ARMv4 '
insmod: cannot insert '/lib/rt73usb.ko': invalid module format
zd1211rw: version magic '2.6.30.4-EmbedSky mod_unload ARMv4 ' should be '2.6.30.4wangping mod_unload ARMv4 '
insmod: cannot insert '/lib/zd1211rw.ko': invalid module format
ov9650: version magic '2.6.30.4-EmbedSky mod_unload ARMv4 ' should be '2.6.30.4wangping mod_unload ARMv4 '
insmod: cannot insert '/lib/ov9650.ko': invalid module format
ifconfig: SIOCGIFFLAGS: No such device
ifconfig: SIOCSIFHWADDR: No such device
ifconfig: SIOCSIFADDR: No such device
route: SIOCADDRT: Network is unreachable
open device leds: No such file or directory
[01/Jan/1970:00:00:10 +0000] boa: server version Boa/0.94.13
[01/Jan/1970:00:00:10 +0000] boa: server built Jul 29 2009 at 14:27:34.
[01/Jan/1970:00:00:10 +0000] boa: starting server pid=927, port 80
ts_open: No such file or directory
Could not read calibration: "/etc/pointercal"
QWSTslibMouseHandlerPrivate: ts_open() failed with error: 'No such file or directory'
Please check your tslib installation!

  看上面的信息出现Kernel panic - not syncing: No init found.  Try passing init= option to kernel.   
   的错误应该是文件系统没做好吧,,,  2.6.30.4 和1.7.0的Busybox 可以匹配吧?

 楼主| danshi126 发表于 2012-2-4 21:46:30 | 显示全部楼层
终于可以收题了,,这个问题解决了,,,,    原因:自己编译的UBOOT 的write.yaffs命令没有写完整
  
        这么一个小小的问题难倒我个把月!         细节呀!!!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号 )

GMT+8, 2024-5-19 22:08 , Processed in 1.031250 second(s), 17 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表