主题 : uboot加载Linux内核和yaffs2文件系统不成功 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 13190
精华: 0
发帖: 24
金钱: 125 两
威望: 25 点
综合积分: 48 分
注册时间: 2010-01-20
最后登录: 2012-05-29
楼主  发表于: 2011-04-17 11:12

 uboot加载Linux内核和yaffs2文件系统不成功

uboot用的2009.8
内核用2.6.30.4
下载到256MB的nand中运行

内核中的nand分区:
         offsize           size
uboot : 0x00000000    0x00030000 //192kb
param : 0x00030000    0x00040000 //(256kb)
kernel: 0x00080000    0x00500000 //5mb
root  : 0x00580000    0x0c800000  //200mb

这几个分区不一定要连续的吧???


打印环境变量如下:
[MY2440] # printenv
bootdelay=3
baudrate=115200
ethaddr=08:00:3e:26:0a:5b
ethact=dm9000
bootcmd=nand read 0x30008000 0x80000 0x00500000;bootm 0x30008000
bootargs=noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0,115200 mem=64M
stdin=serial
stdout=serial
stderr=serial
filesize=6108C0
fileaddr=31000000
netmask=255.255.255.0
ipaddr=169.254.209.113
serverip=169.254.209.223

Environment size: 361/131068 bytes
级别: 新手上路
UID: 13190
精华: 0
发帖: 24
金钱: 125 两
威望: 25 点
综合积分: 48 分
注册时间: 2010-01-20
最后登录: 2012-05-29
1楼  发表于: 2011-04-17 11:13
仅下载内核,启动如下:
Linux version 2.6.30.4 (root@localhost.localdomain) (gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72) ) #1 Sat Apr 16 22:43:07 CST 2011
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=00007177
CPU: VIVT data cache, VIVT instruction cache
Machine: SMDK2440
Warning: bad configuration page, trying to continue
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 off.  Total pages: 4064
Kernel command line: noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0
NR_IRQS:85
irq: clearing subpending status 00000002
PID hash table entries: 64 (order: 6, 256 bytes)
Console: colour dummy device 80x30
console [ttySAC0] enabled
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory: 16MB = 16MB total
Memory: 12300KB available (3428K code, 316K data, 132K init, 0K highmem)
Calibrating delay loop... 50.38 BogoMIPS (lpj=125952)
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 c1808000, irq 33
DMA channel 1 at c1808040, irq 34
DMA channel 2 at c1808080, irq 35
DMA channel 3 at c18080c0, 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 98 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: 512 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 512 bind 512)
TCP reno registered
NET: Registered protocol family 1
NetWinder Floating Point Emulator V0.97 (extended precision)
JFFS2 version 2.2. (NAND) (SUMMARY)  ?? 2001-2006 Red Hat, Inc.
ROMFS MTD (C) 2007 Red Hat, Inc.
yaffs Apr 16 2011 22:38:12 Installing.
msgmni has been set to 24
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=3, 29ns Twrph0=7 69ns, Twrph1=3 29ns
NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 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 256MiB 3,3V 8-bit":
0x000000000000-0x000000030000 : "uboot"
mtd: partition "uboot" doesn't end on an erase block -- force read-only
0x000000030000-0x000000070000 : "param"
mtd: partition "param" doesn't start on an erase block boundary -- force read-only
0x000000080000-0x000000580000 : "kernel"
0x000000580000-0x00000cd80000 : "root"

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 32505859 name is "mtdblock3"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.3, "mtdblock3"
yaffs: auto selecting yaffs2
usb 1-1: new full speed USB device using s3c2410-ohci and address 2
yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs filesystem) readonly on device 31:3.
Freeing init memory: 132K
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.

Backtrace:
[<c002da1c>] (dump_backtrace+0x0/0x114) from [<c02b8f74>] (dump_stack+0x18/0x1c)
r7:00000000 r6:00000000 r5:00000000 r4:c03a4e94
[<c02b8f5c>] (dump_stack+0x0/0x1c) from [<c02b8fc4>] (panic+0x4c/0x11c)
[<c02b8f78>] (panic+0x0/0x11c) from [<c0029500>] (init_post+0xd4/0xfc)
r3:0000000c r2:00000009 r1:00000008 r0:c032d063
[<c002942c>] (init_post+0x0/0xfc) from [<c0008610>] (kernel_init+0xc0/0xe8)
r4:c03a4760
[<c0008550>] (kernel_init+0x0/0xe8) from [<c004cce8>] (do_exit+0x0/0x58c)
r4:00000000
[ 此帖被纠结啊在2011-04-17 16:16重新编辑 ]
级别: 新手上路
UID: 13190
精华: 0
发帖: 24
金钱: 125 两
威望: 25 点
综合积分: 48 分
注册时间: 2010-01-20
最后登录: 2012-05-29
2楼  发表于: 2011-04-17 11:13
再将yaffs2文件系统下载到nand运行如下:
Uncompressing Linux....................................................................................................................... done, booting the kernel.
Linux version 2.6.30.4 (root@localhost.localdomain) (gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72) ) #1 Sat Apr 16 22:43:07 CST 2011
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=00007177
CPU: VIVT data cache, VIVT instruction cache
Machine: SMDK2440
Warning: bad configuration page, trying to continue
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 off.  Total pages: 4064
Kernel command line: noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0
NR_IRQS:85
irq: clearing pending ext status 00000200
irq: clearing subpending status 00000002
PID hash table entries: 64 (order: 6, 256 bytes)
Console: colour dummy device 80x30
console [ttySAC0] enabled
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory: 16MB = 16MB total
Memory: 12300KB available (3428K code, 316K data, 132K init, 0K highmem)
Calibrating delay loop... 50.38 BogoMIPS (lpj=125952)
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 c1808000, irq 33
DMA channel 1 at c1808040, irq 34
DMA channel 2 at c1808080, irq 35
DMA channel 3 at c18080c0, 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 98 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: 512 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 512 bind 512)
TCP reno registered
NET: Registered protocol family 1
NetWinder Floating Point Emulator V0.97 (extended precision)
JFFS2 version 2.2. (NAND) (SUMMARY)  ?? 2001-2006 Red Hat, Inc.
ROMFS MTD (C) 2007 Red Hat, Inc.
yaffs Apr 16 2011 22:38:12 Installing.
msgmni has been set to 24
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=3, 29ns Twrph0=7 69ns, Twrph1=3 29ns
NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-bit)
NAND_ECC_NONE selected by board driver. This is not recommended !!
Scanning device for bad blocks
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 56 at 0x000000700000
Bad eraseblock 57 at 0x000000720000
Bad eraseblock 58 at 0x000000740000
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
Creating 4 MTD partitions on "NAND 256MiB 3,3V 8-bit":
0x000000000000-0x000000030000 : "uboot"
mtd: partition "uboot" doesn't end on an erase block -- force read-only
0x000000030000-0x000000070000 : "param"
mtd: partition "param" doesn't start on an erase block boundary -- force read-only
0x000000080000-0x000000580000 : "kernel"
0x000000580000-0x00000cd80000 : "root"
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 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 13 is bad
block 14 is bad
block 15 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
usb 1-1: new full speed USB device using s3c2410-ohci and address 2
yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs filesystem) readonly on device 31:3.
Freeing init memory: 132K
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.
Backtrace:
[<c002da1c>] (dump_backtrace+0x0/0x114) from [<c02b8f74>] (dump_stack+0x18/0x1c)
r7:00000000 r6:00000000 r5:00000000 r4:c03a4e94
[<c02b8f5c>] (dump_stack+0x0/0x1c) from [<c02b8fc4>] (panic+0x4c/0x11c)
[<c02b8f78>] (panic+0x0/0x11c) from [<c0029500>] (init_post+0xd4/0xfc)
r3:0000000c r2:00000009 r1:00000008 r0:c032d063
[<c002942c>] (init_post+0x0/0xfc) from [<c0008610>] (kernel_init+0xc0/0xe8)
r4:c03a4760
[<c0008550>] (kernel_init+0x0/0xe8) from [<c004cce8>] (do_exit+0x0/0x58c)
r4:00000000








还是卡在这里,而且出现了坏块,前后对比,仅仅多了坏块扫描。未下载yaffs2之前,仅启动内核时,nand bad :没有坏块的,而且在内核代码中drivers/mtd/nand/s3c2410.c 已s3c2410_nand_init_chip函数的末尾加入了chip->ecc.mode = NAND_ECC_NONE;屏蔽内核的ECC校验,重新烧写uboot后nand bad:坏块又没有了,文件系统也始终挂在不起来?望指点一二
级别: 骑士
UID: 42149
精华: 2
发帖: 201
金钱: 1115 两
威望: 223 点
综合积分: 442 分
注册时间: 2011-04-05
最后登录: 2013-03-29
3楼  发表于: 2011-04-21 17:55
配置文件的问题吧。
级别: 新手上路
UID: 34935
精华: 0
发帖: 38
金钱: 195 两
威望: 39 点
综合积分: 76 分
注册时间: 2010-12-23
最后登录: 2012-04-07
4楼  发表于: 2011-09-02 09:11

 回 楼主(纠结啊) 的帖子

yaffs2-src-20100329.tar.gz话给我发一份吧,我的找不到!
359068322@qq.com
好好学习,天天向上!
级别: 新手上路
UID: 57131
精华: 0
发帖: 11
金钱: 55 两
威望: 11 点
综合积分: 22 分
注册时间: 2011-10-19
最后登录: 2011-11-07
5楼  发表于: 2011-10-20 16:11
出现的问题和我的一样:


Freeing init memory: 160K
Failed to execute /linuxrc.  Attempting defaults...
Kernel panic - not syncing: No init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
[<c013640c>] (unwind_backtrace+0x0/0xec) from [<c040542c>] (panic+0x4c/0xdc)
[<c040542c>] (panic+0x4c/0xdc) from [<c01305d0>] (init_post+0x108/0x138)
[<c01305d0>] (init_post+0x108/0x138) from [<c01085fc>] (kernel_init+0x110/0x150)
[<c01085fc>] (kernel_init+0x110/0x150) from [<c0131e9c>] (kernel_thread_exit+0x0/0x8)
我的也没有解决。。。。。。