打印
[嵌入式linux]

制作根文件系统遇到的问题

[复制链接]
2957|10
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
xubin4858|  楼主 | 2012-4-20 12:10 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
AD, ck, se, TE, ST
Kernel panic - not syncing: Attempted to kill init!

平台:micro2440
BUSYBOX:1.13.3
Kernel:2.6.32.2
gcc version:4.4.3

问题描述:内核是我按照手册移植的,下载到目标板后使用友善之臂提供的yaffs2根文件系统root,能够正常进入系统,应用程序什么的也运行起来了,但是我自己写的应用程序编译后通过FTP放到目标板,无**常运行,我就怀疑是因为友善制作根文件系统的编译器等版本跟我使用的编译器版本不同,所以决定自己从新做一个根文件系统再实验。
     新的根文件系统弄好后,下载到目标板,运行起来后就出现本文第一行的错误,无**是进入系统,用友善提供的现成的根文件系统没有问题。
通过在网上搜索解决方法基本我都尝试了,没有起到作用,所以在这里发帖问行家们,帮我指点指点,先谢谢了,这个问题已经郁闷我半个月了

超级终端接收的信息如下:

##### FriendlyARM BIOS 2.0 for 2440 #####
[x] format NAND FLASH for Linux
[v] Download vivi
[k] Download linux kernel
[y] Download root_yaffs image
[a] Absolute User Application
[n] Download Nboot for WinCE
[l] Download WinCE boot-**
[w] Download WinCE NK.bin
[d] Download & Run
[z] Download zImage into RAM
[g] Boot linux from RAM
[f] Format the nand flash
Boot the system
Set the boot parameters
Backup NAND Flash to HOST through USB(upload)
[r] Restore NAND Flash from HOST through USB
[q] Goto shell of vivi
Version: 0945-2K
Enter your selection: b
Copy linux kernel from 0x00060000 to 0x30008000, size = 0x00500000 ... done
zImage magic = 0x016f2818
Setup linux parameters at 0x30000100
linux command line is: "noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0"
MACH_TYPE = 1999
NOW, Booting Linux......
Uncompressing Linux.................................................................................................................................... done, booting the kernel.
Linux version 2.6.32.2 ([email=root@xubin-desktop]root@xubin-desktop[/email]) (gcc version 4.2.3 (Sourcery G++ Lite 2008q1-126)) #10 Sat Apr 7 12:19:28 CST 2012
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache
Machine: FriendlyARM Mini2440 development board
ATAG_INITRD is deprecated; please update your bootloader.
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C24XX Clocks, (c) 2004 Simtec Electronics
S3C244X: core 405.000 MHz, memory 101.250 MHz, peripheral 50.625 MHz
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0
PID hash table entries: 256 (order: -2, 1024 bytes)
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: 60492KB available (3676K code, 418K data, 132K init, 0K highmem)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:85
irq: clearing pending ext status 00000200
irq: clearing subpending status 00000003
irq: clearing subpending status 00000002
Console: colour dummy device 80x30
console [ttySAC0] enabled
Calibrating delay loop... 201.93 BogoMIPS (lpj=504832)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics
DMA channel 0 at c4808000, irq 33
DMA channel 1 at c4808040, irq 34
DMA channel 2 at c4808080, irq 35
DMA channel 3 at c48080c0, irq 36
S3C244X: Clock Support, DVS off
bio: create slab <bio-0> at 0
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
s3c-i2c s3c2440-i2c: slave address 0x10
s3c-i2c s3c2440-i2c: bus frequency set to 98 KHz
s3c-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: 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
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
ROMFS MTD (C) 2007 Red Hat, Inc.
yaffs Apr  5 2012 16:52:16 Installing.
msgmni has been set to 118
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
s3c2410-lcd s3c2410-lcd: no platform data for lcd, cannot attach
s3c2410-lcd: probe of s3c2410-lcd failed with error -22
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
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c24xx-nand s3c2440-nand: Tacls=3, 29ns Twrph0=7 69ns, Twrph1=3 29ns
s3c24xx-nand s3c2440-nand: NAND soft ECC
NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 45 at 0x0000005a0000
Bad eraseblock 46 at 0x0000005c0000
Bad eraseblock 47 at 0x0000005e0000
Bad eraseblock 48 at 0x000000600000
Bad eraseblock 49 at 0x000000620000
Bad eraseblock 50 at 0x000000640000
Bad eraseblock 51 at 0x000000660000
Bad eraseblock 52 at 0x000000680000
Bad eraseblock 53 at 0x0000006a0000
Bad eraseblock 54 at 0x0000006c0000
Bad eraseblock 55 at 0x0000006e0000
Bad eraseblock 56 at 0x000000700000
Bad eraseblock 57 at 0x000000720000
Bad eraseblock 58 at 0x000000740000
Bad eraseblock 59 at 0x000000760000
Bad eraseblock 60 at 0x000000780000
Bad eraseblock 61 at 0x0000007a0000
Bad eraseblock 62 at 0x0000007c0000
Bad eraseblock 63 at 0x0000007e0000
Bad eraseblock 64 at 0x000000800000
Bad eraseblock 65 at 0x000000820000
Bad eraseblock 66 at 0x000000840000
Bad eraseblock 67 at 0x000000860000
Bad eraseblock 68 at 0x000000880000
Bad eraseblock 69 at 0x0000008a0000
Bad eraseblock 70 at 0x0000008c0000
Bad eraseblock 71 at 0x0000008e0000
Bad eraseblock 72 at 0x000000900000
Bad eraseblock 73 at 0x000000920000
Bad eraseblock 74 at 0x000000940000
Bad eraseblock 75 at 0x000000960000
Bad eraseblock 76 at 0x000000980000
Bad eraseblock 77 at 0x0000009a0000
Bad eraseblock 78 at 0x0000009c0000
Bad eraseblock 79 at 0x0000009e0000
Bad eraseblock 80 at 0x000000a00000
Bad eraseblock 81 at 0x000000a20000
Bad eraseblock 82 at 0x000000a40000
Bad eraseblock 83 at 0x000000a60000
Bad eraseblock 84 at 0x000000a80000
Bad eraseblock 85 at 0x000000aa0000
Bad eraseblock 86 at 0x000000ac0000
Bad eraseblock 87 at 0x000000ae0000
Bad eraseblock 88 at 0x000000b00000
Bad eraseblock 89 at 0x000000b20000
Bad eraseblock 90 at 0x000000b40000
Bad eraseblock 91 at 0x000000b60000
Bad eraseblock 92 at 0x000000b80000
Bad eraseblock 93 at 0x000000ba0000
Bad eraseblock 94 at 0x000000bc0000
Bad eraseblock 95 at 0x000000be0000
Bad eraseblock 96 at 0x000000c00000
Bad eraseblock 97 at 0x000000c20000
Bad eraseblock 98 at 0x000000c40000
Bad eraseblock 99 at 0x000000c60000
Bad eraseblock 100 at 0x000000c80000
Bad eraseblock 101 at 0x000000ca0000
Bad eraseblock 102 at 0x000000cc0000
Bad eraseblock 103 at 0x000000ce0000
Bad eraseblock 104 at 0x000000d00000
Bad eraseblock 105 at 0x000000d20000
Bad eraseblock 106 at 0x000000d40000
Bad eraseblock 107 at 0x000000d60000
Bad eraseblock 108 at 0x000000d80000
Bad eraseblock 109 at 0x000000da0000
Bad eraseblock 110 at 0x000000dc0000
Bad eraseblock 111 at 0x000000de0000
Bad eraseblock 807 at 0x0000064e0000
Bad eraseblock 893 at 0x000006fa0000
Bad eraseblock 2020 at 0x00000fc80000
Creating 5 MTD partitions on "NAND 256MiB 3,3V 8-bit":
0x000000000000-0x000000040000 : "boot"
0x000000040000-0x000000060000 : "param"
ftl_cs: FTL header not found.
0x000000060000-0x000000560000 : "Kernel"
uncorrectable error :
0x000000560000-0x000040560000 : "root"
mtd: partition "root" extends beyond the end of device "NAND 256MiB 3,3V 8-bit" -- size truncated to 0xfaa0000
uncorrectable error :
0x000000000000-0x000040000000 : "nand"
mtd: partition "nand" extends beyond the end of device "NAND 256MiB 3,3V 8-bit" -- size truncated to 0x10000000
dm9000 Ethernet Driver, V1.31
eth0: dm9000e at c486e300,c4872304 IRQ 51 MAC: 08:90:90:90:90:90 (chip)
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
mice: PS/2 mouse device common for all mice
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
i2c /dev entries driver
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
cpuidle: using governor ladder
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
Advanced Linux Sound Architecture Driver Version 1.0.21.
No device for DAI UDA134X
No device for DAI s3c24xx-i2s
ALSA device list:
  No soundcards found.
TCP cubic registered
NET: Registered protocol family 17
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
yaffs: dev is 32505859 name is "mtdblock3"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.3, "mtdblock3"
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 36 is bad
block 37 is bad
block 38 is bad
block 39 is bad
block 40 is bad
block 41 is bad
block 42 is bad
block 43 is bad
block 44 is bad
block 45 is bad
block 46 is bad
block 47 is bad
block 48 is bad
block 49 is bad
block 50 is bad
block 51 is bad
block 52 is bad
block 53 is bad
block 54 is bad
block 55 is bad
block 56 is bad
block 57 is bad
block 58 is bad
block 59 is bad
block 60 is bad
block 61 is bad
block 62 is bad
block 63 is bad
block 64 is bad
block 65 is bad
block 66 is bad
block 67 is bad
block 68 is bad
block 69 is bad
block 765 is bad
block 851 is bad
block 1978 is bad
usb 1-1: new full speed USB device using s3c2410-ohci and address 2
yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs filesystem) on device 31:3.
Freeing init memory: 132K
usb 1-1: configuration #1 chosen from 1 choice
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 4 ports detected
Kernel panic - not syncing: Attempted to kill init!
[<c002fce4>] (unwind_backtrace+0x0/0xe0) from [<c003d198>] (panic+0x40/0x120)
[<c003d198>] (panic+0x40/0x120) from [<c003fc88>] (do_exit+0x58/0x574)
[<c003fc88>] (do_exit+0x58/0x574) from [<c004022c>] (do_group_exit+0x88/0xbc)
[<c004022c>] (do_group_exit+0x88/0xbc) from [<c00491c0>] (get_signal_to_deliver+0x2f4/0x32c)
[<c00491c0>] (get_signal_to_deliver+0x2f4/0x32c) from [<c002c5ac>] (do_notify_resume+0x68/0x614)
[<c002c5ac>] (do_notify_resume+0x68/0x614) from [<c0029ea8>] (work_pending+0x1c/0x20)

相关帖子

沙发
xubin4858|  楼主 | 2012-4-20 12:11 | 只看该作者
另补充使用的系统为ubuntu 10.04

使用特权

评论回复
板凳
yyplc| | 2012-4-23 14:55 | 只看该作者
Kernel panic - not syncing: Attempted to kill init!
应该是文件系统制作的不对, 慢慢对应手册,慢慢来吧

使用特权

评论回复
地板
fq1110| | 2012-4-29 01:15 | 只看该作者
看你的文件系统的位置在0x000000560000-0x000040560000 : "root"
而内核前面扫描nand时,就发现root分区有问题,请问你在烧写root时,有没有擦除flash,而且你打包的root是否是yaffs格式的,并且在打包的时候是有些地方要注意的,而且你的分区大小也有问题,超出了nand支持的范围.
祝楼主早日成功.

使用特权

评论回复
5
2012asdf| | 2013-1-23 22:22 | 只看该作者

使用特权

评论回复
6
哭泣的树| | 2013-3-20 10:03 | 只看该作者
文件系统不太熟 ,对着首测做应该没问题的

使用特权

评论回复
7
deng560| | 2013-6-18 14:12 | 只看该作者
bad block 是因为你flash 里面的标记坏块了,如果是yaffs的话,看看OOB那块的东西

使用特权

评论回复
8
sidafuzhihe| | 2013-7-31 20:19 | 只看该作者
文件系统编译错了,不知道你是用什么开发板

使用特权

评论回复
9
wangflw| | 2013-8-2 10:49 | 只看该作者
文件系统存放在flash的起始地址对不对?是不是和bootloader上设置的是一样的,否则bootloader也是找不到文件系统,报一堆错。

使用特权

评论回复
10
wangflw| | 2013-8-2 10:51 | 只看该作者
另外,要看看在使用命令mkfs.yaffs之前,根目录下 init文件是否有执行权限

使用特权

评论回复
11
wangflw| | 2013-8-2 10:53 | 只看该作者
再者就是你编译的内核是否支持该文件系统。在makemenuconfig之后,filesystem里面有设置。
其实开发板上面的例程大多数都是没有问题的。只要细心按照要求操作,应该没打问题。实在不行,就从头开始弄,一部一部操作

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

45

主题

141

帖子

3

粉丝