内核启动过程中突然中止
U-Boot 1.1.6 (Aug 11 2009 - 17:45:58)DRAM:64 MB
Flash: 512 kB
NAND: 64 MB
In: serial
Out: serial
Err: serial
fs2410 # tftp 30008000 uImage
TFTP from server 192.168.1.108; our IP address is 192.168.1.130
Filename 'uImage'.
Load address: 0x30008000
Loading: #################################################################
#################################################################
#################################################################
##########
done
Bytes transferred = 1045532 (ff41c hex)
fs2410 # bootm 30008000
## Booting image at 30008000 ...
Image Name: linux-2.6.14.1
Created: 2009-08-12 5:59:27 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1045468 Bytes = 1021 kB
Load Address: 30008000
Entry Point:30008040
Verifying Checksum ... OK
XIP Kernel Image ... OK
Starting kernel ...
Uncompressing Linux.............................................................
Linux version 2.6.14.1 (root@localhost.localdomain) (gcc version 3.4.5) #2 Wed 9
CPU: ARM920Tid(wb) revision 0 (ARMv4T)
Machine: SMDK2410
Warning: bad configuration page, trying to continue
Memory policy: ECC disabled, Data cache writeback
CPU S3C2410A (id 0x32410002)
S3C2410: core 200.000 MHz, memory 100.000 MHz, peripheral 50.000 MHz
S3C2410 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
Kernel command line: noinitrd root=/dev/mtdblock2 init=/linuxrc console=ttySAC00
irq: clearing subpending status 00000002
PID hash table entries: 128 (order: 7, 2048 bytes)
timer tcon=00500000, tcnt a2c1, tcfg 00000200,00000000, usec 00001eb8
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: 16MB = 16MB total
Memory: 13952KB available (1735K code, 383K data, 92K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
softlockup thread 0 started up.
NET: Registered protocol family 16
S3C2410: Initialising architecture
usbcore: registered new driver usbfs
usbcore: registered new driver hub
S3C2410 DMA Driver, (c) 2003-2004 Simtec Electronics
DMA channel 0 at c1800000, irq 33
DMA channel 1 at c1800040, irq 34
DMA channel 2 at c1800080, irq 35
DMA channel 3 at c18000c0, irq 36
NetWinder Floating Point Emulator V0.97 (extended precision)
devfs: 2004-01-31 Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
Console: switching to colour frame buffer device 80x25
fb0: Virtual frame buffer device, using 1024K of video memory
S3C2410 RTC, (c) 2004 Simtec Electronics
s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2410
s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2410
s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2410
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2410-nand: mapped registers at c1980000
s3c2410-nand: timing: Tacls 10ns, Twrph0 40ns, Twrph1 10ns
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bi)
NAND_ECC_NONE selected by board driver. This is not recommended !!
Scanning device for bad blocks
Creating 4 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x00000000-0x00100000 : "bootloader"
0x00100000-0x00400000 : "kernel"
0x00400000-0x02c00000 : "root"
0x02d00000-0x03c00000 : "user"
usbmon: debugfs is not available
mice: PS/2 mouse device common for all mice
NET: Registered protocol family 2
IP route cache hash table entries: 256 (order: -2, 1024 bytes)
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
TCP bic registered
NET: Registered protocol family 1
Reading data from NAND FLASH without ECC is not recommended
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,2)
上面是我做的内核的启动过程记录,不知道为什么启动到Kernel panic后就不运行了,请大家帮忙解决下,先谢了!! 内核参数不对 请帮忙指出是哪个地方出了问题,这个内核启动过程中没有加载根文件系统的,是不 是因为这个引起的?? "内核启动过程中没有加载根文件系统"
--------------------------没有给内核rootfs参数,找不到根文件系统而失败。
在内核参数中指明根文件系统类似:root=/dev/sda to ls,内核参数已经指定rootfs所在分区,即root=/dev/mtdblock2。当然,这也可改为root=/dev/mtdblock/2 试下,毕竟不知道lz的系统具体是如何的。
不管怎么做,都有个大前提是分区/dev/mtdblock2,即0x00400000-0x02c00000 : "root" 有烧写根文件系统,若不然一切都是没有意义的。
另外,若还只是处于调试阶段(内核或根文件系统),建议采用nfs挂靠rootfs(找一最小的可用的roofs),那样相对来说会很容易确定问题的所在。 在指定的地方找不到基本的文件如:/sbin/init 也会报这个错,所以,
改改参数多试两次。。。。 多谢LS两位的支持,我在上面的根文件分区装了rootfs,可是在启动后又出现了新的问题,如下:
........................................................................
....................................................................
...........
Reading data from NAND FLASH without ECC is not recommended
VFS: Mounted root (cramfs filesystem) readonly.
Mounted devfs on /dev
Freeing init memory: 92K
Failed to execute /linuxrc.Attempting defaults...
Kernel panic - not syncing: No init found.Try passing init= option to kernel.
在网上查找是说那个linuxrc没有编译正确,我用的是busybox-1.1.3 和交叉编译工具GCC-3.4..5 ,内核为
2.6.14 ,并且制作根文件系统时按照网上的教程做的,不知道是不是busybox的版本问题?请大侠帮忙!! No init found.Try passing init= option to kernel. 看到那个里提示了,我是用LINUXRC初始化的,出现那个问题是不是选是LINUXRC不行,引起的,望高手指点下 贴出linuxrc 前几天一次误操作,让linux系统崩溃了,:L,只好重新来过,可是问题依然存在,
。。。。。。。。。。。。。。。。。。
。。。。。。。。。。。。。
VFS: Mounted root (cramfs filesystem) readonly.
Mounted devfs on /dev
Freeing init memory: 92K
Failed to execute linuxrc.Attempting defaults...
Kernel panic - not syncing: No init found.Try passing init= option to kernel
还 是提示这个错误!!
请大家帮忙看看是不是LINUXRC的问题,内容如下:
#!/bin/sh
echo "mount /etc as ramfs"
/bin/mount -n -t ramfs ramfs /etc
/bin/cp -a /mnt/etc/* /etc
echo "re-create the /etc/mtab entries"
# re-create the /etc/mtab entries
/bin/mount -f -t cramfs -o remount,ro /dev/mtdblock/2/
#mount some file system
echo "------mount /dev/shm as tmpfs"
/bin/mount -n -t tmpfs tmpfs /dev/shm
echo "-----mount /proc as proc "
/bin/mount -n -t proc none/proc
echo "----mount /sys sa sysfs"
/bin/mount -n -t sysfs none /sys
exec /sbin/init
上面就是我的LINUXRC文件内容。 怎么就没有人顶呢,:'( 可能是你指明的根目录不对造成~ 先谢谢成名了!!
试过了几次后 ,我用inittab ,rcS等进行初始化,那用CRAMFS制作的根文件系统挂载成功了,可 是这种每次都要写NAND FLASH,很是麻烦,在网上看了,说是可以用NFS挂载,按照一些参考教程添加了CS8900A的网卡驱动,并安装了NFS服务器,出现了下面的错误:
Starting kernel ...
Uncompressing Linux.............................................................
Linux version 2.6.14.1 (fangzi@localhost.localdomain) (gcc version 3.4.5) #5 We9
CPU: ARM920Tid(wb) revision 0 (ARMv4T)
Machine: SMDK2410
Memory policy: ECC disabled, Data cache writeback
CPU S3C2410A (id 0x32410002)
S3C2410: core 200.000 MHz, memory 100.000 MHz, peripheral 50.000 MHz
S3C2410 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
Kernel command line: root=/dev/nfs rw nfsroot=192.168.1.124:/home/fangzi/nfs co0
irq: clearing subpending status 00000002
PID hash table entries: 512 (order: 9, 8192 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: 64MB = 64MB total
Memory: 62208KB available (2024K code, 416K data, 96K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
softlockup thread 0 started up.
NET: Registered protocol family 16
S3C2410: Initialising architecture
usbcore: registered new driver usbfs
usbcore: registered new driver hub
S3C2410 DMA Driver, (c) 2003-2004 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
NetWinder Floating Point Emulator V0.97 (double precision)
devfs: 2004-01-31 Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
JFFS2 version 2.2. (NAND) (C) 2001-2003 Red Hat, Inc.
Initializing Cryptographic API
Console: switching to colour frame buffer device 80x25
fb0: Virtual frame buffer device, using 1024K of video memory
S3C2410 RTC, (c) 2004 Simtec Electronics
s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2410
s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2410
s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2410
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
Cirrus Logic CS8900A driver for Linux (Modified for SMDK2410)
eth0: CS8900A rev E at 0xe0000300 irq=53, no eeprom , addr: 08: 0:3E:26:0A:5B
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2410-nand: mapped registers at c4980000
s3c2410-nand: timing: Tacls 10ns, Twrph0 40ns, Twrph1 10ns
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bi)
NAND_ECC_NONE selected by board driver. This is not recommended !!
Scanning device for bad blocks
Creating 4 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x00000000-0x00100000 : "bootloader"
0x00100000-0x00400000 : "kernel"
0x00400000-0x02c00000 : "root"
0x02d00000-0x03c00000 : "user"
usbmon: debugfs is not available
mice: PS/2 mouse device common for all mice
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
TCP bic registered
NET: Registered protocol family 1
Looking up port of RPC 100003/2 on 192.168.1.124
RPC: sendmsg returned error 101
portmap: RPC call returned error 101
Root-NFS: Unable to get nfsd port number from server, using default
Looking up port of RPC 100005/1 on 192.168.1.124
RPC: sendmsg returned error 101
portmap: RPC call returned error 101
Root-NFS: Unable to get mountd port number from server, using default
RPC: sendmsg returned error 101
Root-NFS: Server returned error -101 while mounting /home/fangzi/nfs
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
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
请在家帮忙看看是什么问题 Please append a correct "root=" boot option 太长。。。。你自己先把每句话意思查查看。
把怀疑的贴上来 你说的对,的确是那个BOOT 的启动参数没有配置好,因为刚开始遇到了MINICOM不能换行的问题,以为是BOOTLOADER的问题,去网上一查,原来是那个linewrap on/off 没有打开,:$,完完整整的把启动参数写完,同里也要保证 NFS 服务器正常工作,这样就把根文件系统通过NFS挂载,再次感谢大家的支持!!
Uncompressing Linux.............................................................
............ done, booting the kernel.
Linux version 2.6.14.1 (fangzi@localhost.localdomain) (gcc version 3.4.5) #7 Thu
Aug 20 11:41:44 CST 2009
CPU: ARM920Tid(wb) revision 0 (ARMv4T)
Machine: SMDK2410
Memory policy: ECC disabled, Data cache writeback
CPU S3C2410A (id 0x32410002)
S3C2410: core 200.000 MHz, memory 100.000 MHz, peripheral 50.000 MHz
S3C2410 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
Kernel command line: root=/dev/nfs rw nfsroot=192.168.1.124:/home/fangzi/nfs ip=
192.168.1.108:192.168.1.124:192.168.1.1:255.255.255.0 console=ttySAC0,115200 mem
=64M
irq: clearing subpending status 00000002
PID hash table entries: 512 (order: 9, 8192 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: 64MB = 64MB total
Memory: 62464KB available (1855K code, 401K data, 96K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
softlockup thread 0 started up.
NET: Registered protocol family 16
S3C2410: Initialising architecture
usbcore: registered new driver usbfs
usbcore: registered new driver hub
S3C2410 DMA Driver, (c) 2003-2004 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
NetWinder Floating Point Emulator V0.97 (double precision)
devfs: 2004-01-31 Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
Initializing Cryptographic API
Console: switching to colour frame buffer device 80x25
fb0: Virtual frame buffer device, using 1024K of video memory
S3C2410 RTC, (c) 2004 Simtec Electronics
s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2410
s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2410
s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2410
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
Cirrus Logic CS8900A driver for Linux (Modified for SMDK2410)
eth0: CS8900A rev E at 0xe0000300 irq=53, no eeprom , addr: 08: 0:3E:26:0A:5B
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2410-nand: mapped registers at c4980000
s3c2410-nand: timing: Tacls 10ns, Twrph0 40ns, Twrph1 10ns
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
Creating 4 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x00000000-0x00100000 : "bootloader"
0x00100000-0x00400000 : "kernel"
0x00400000-0x02c00000 : "root"
0x02d00000-0x03c00000 : "user"
usbmon: debugfs is not available
mice: PS/2 mouse device common for all mice
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
TCP bic registered
NET: Registered protocol family 1
IP-Config: Complete:
device=eth0, addr=192.168.1.108, mask=255.255.255.0, gw=192.168.1.1,
host=192.168.1.108, domain=, nis-domain=(none),
bootserver=192.168.1.124, rootserver=192.168.1.124, rootpath=
Looking up port of RPC 100003/2 on 192.168.1.124
Looking up port of RPC 100005/1 on 192.168.1.124
VFS: Mounted root (nfs filesystem).
Mounted devfs on /dev
Freeing init memory: 96K
init started:BusyBox v1.1.3 (2009.08.18-13:38+0000) multi-call binary
Starting pid 19, console /dev/tts/0: '/etc/init.d/rcS'
Bummer, could not run '/etc/init.d/rcS': Permission denied
Starting pid 21, console /dev/tts/0: '/bin/ash'
BusyBox v1.1.3 (2009.08.18-13:38+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
set search library path init /etc/profile
set user path in /etc/profile
#
:lol 加裤奖励~ Ctrl+A一起按,松开,快速按w键~~~打开\关闭 换行功能~ TO ls;你说的很对。
开发环境基本上建好了,接下来准备做一个小的字符设备驱动,看看怎么样。
页:
[1]
2