LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 8332|回复: 13

2.6.22挂载yaffs文件系统的问题

[复制链接]
发表于 2007-11-16 18:21:54 | 显示全部楼层 |阅读模式
最近在移植linux到三星的s3c2410上,不过死活不能加载根文件系统,网上的方法都试过了,好像都没有什么效果,希望大家给我一点建议,究竟是哪一部分出了问题?下面就是我的输出信息:
Bootloader Start 0x33E00000
Loading Linux kernel to 0x30008000... /
Uncompressing Linux....................................................... done, booting the kernel.
[    0.000000] Linux version 2.6.22.12 (ubuntu@ubuntu-desktop) (gcc version 3.4.1) #6 Fri Nov 16 16:57:05 CST 2007
[    0.000000] CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
[    0.000000] Machine: SMDK2410
[    0.000000] ATAG_INITRD is deprecated; please update your bootloader.
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] CPU S3C2410A (id 0x32410002)
[    0.000000] S3C2410: core 200.000 MHz, memory 100.000 MHz, peripheral 50.000 MHz
[    0.000000] S3C24XX Clocks, (c) 2004 Simtec Electronics
[    0.000000] CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
[    0.000000] CPU0: D VIVT write-back cache
[    0.000000] CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
[    0.000000] CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
[    0.000000] Built 1 zonelists.  Total pages: 16256
[    0.000000] Kernel command line: noinitrd root=/dev/mtdblock2 rootfstype=yaffs console=ttySAC0,115200 init=/linuxrc mem=64M mtdparts=s3c2410-nand:128K(Bootloader)ro,1920K(Kernel)ro,30M(Rootfs),-(user)
[    0.000000] irq: clearing pending ext status 00000100
[    0.000000] irq: clearing subpending status 00000002
[    0.000000] PID hash table entries: 256 (order: 8, 1024 bytes)
[    0.000000] timer tcon=00000000, tcnt a2c1, tcfg 00000200,00000000, usec 00001eb8
[    0.000000] Console: colour dummy device 80x30
[    0.005000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.010000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.030000] Memory: 64MB = 64MB total
[    0.035000] Memory: 63104KB available (1488K code, 217K data, 92K init)
[    0.135000] Mount-cache hash table entries: 512
[    0.140000] CPU: Testing write buffer coherency: ok
[    0.160000] S3C2410 Power Management, (c) 2004 Simtec Electronics
[    0.165000] S3C2410: Initialising architecture
[    0.170000] S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics
[    0.175000] DMA channel 0 at c4800000, irq 33
[    0.180000] DMA channel 1 at c4800040, irq 34
[    0.185000] DMA channel 2 at c4800080, irq 35
[    0.190000] DMA channel 3 at c48000c0, irq 36
[    0.225000] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.235000] yaffs Nov 16 2007 16:56:55 Installing.
[    0.240000] io scheduler noop registered
[    0.245000] io scheduler anticipatory registered (default)
[    0.250000] io scheduler deadline registered
[    0.255000] io scheduler cfq registered
[    0.280000] Console: switching to colour frame buffer device 30x40
[    0.290000] fb0: s3c2410fb frame buffer device
[    1.705000] S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
[    1.710000] Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
[    1.730000] s3c2410-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2410
[    1.735000] s3c2410-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2410
[    1.745000] s3c2410-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2410
[    1.780000] RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
[    1.795000] loop: module loaded
[    1.800000] S3C24XX NAND Driver, (c) 2004 Simtec Electronics
[    1.810000] s3c2410-nand s3c2410-nand: Tacls=1, 10ns Twrph0=4 40ns, Twrph1=1 10ns
[    1.815000] NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit)
[    1.820000] Scanning device for bad blocks
[    2.080000] Creating 4 MTD partitions on "NAND 64MiB 3,3V 8-bit":
[    2.085000] 0x00000000-0x00020000 : "boot"
[    2.090000] 0x00020000-0x00200000 : "kernel"
[    2.100000] 0x00200000-0x02000000 : "rootfs"
[    2.110000] 0x02000000-0x04000000 : "ext-fs3"
[    2.115000] S3C24XX RTC, (c) 2004,2006 Simtec Electronics
[    2.125000] s3c2410-i2c s3c2410-i2c: slave address 0x10
[    2.130000] s3c2410-i2c s3c2410-i2c: bus frequency set to 390 KHz
[    2.135000] s3c2410-i2c s3c2410-i2c: i2c-0: S3C I2C adapter
[    2.150000] yaffs: dev is 32505858 name is "mtdblock2"
[    2.155000] yaffs: passed flags ""
[    2.160000] yaffs: Attempting MTD mount on 31.2, "mtdblock2"
[    2.240000] VFS: Mounted root (yaffs filesystem) readonly.
[    2.240000] Freeing init memory: 92K
[    2.245000] Warning: unable to open an initial console.
[    2.250000] Failed to execute /linuxrc.  Attempting defaults...
[    2.255000] Kernel panic - not syncing: No init found.  Try passing init= option to kernel.

yaffs文件系统是用最新的yaffs2源代码编译出来的mkyaffsimage工具生成的,里面放的是最新版busybox。大家觉得是哪一部分出了问题?bootloader?kernel?还是根文件系统?
 楼主| 发表于 2007-11-19 16:25:49 | 显示全部楼层
换成cramfs后可以正常进入系统,把yaffs烧到另一个分区,用mount查看,发现里面只有一个lost+found,是不是烧写不对?我用过两个声称支持yaffs的bootloader烧写都是出现同样问题。
另外用jffs2的时候也有问题,出现一大堆,感觉应该是文件系统制作有问题,我用的命令是:
mkfs.jffs2 -l -n --eraseblock=0x4000 --pad -d rootfs -o rootfs.jffs2.new

flash是三星的64M大小的K9F1208 Nand。
回复 支持 反对

使用道具 举报

发表于 2007-11-22 12:36:57 | 显示全部楼层
同问一下,我这个问题困扰好久了。
回复 支持 反对

使用道具 举报

发表于 2007-11-22 13:58:21 | 显示全部楼层
而且我是mknod console c 5 1过了
null zero也有
回复 支持 反对

使用道具 举报

发表于 2007-11-22 16:17:32 | 显示全部楼层
我用2.6.13有devfs的可以加载yaffs作rootfs。
2.6.22.X都不行,郁闷了很久了。
回复 支持 反对

使用道具 举报

发表于 2007-11-22 21:30:48 | 显示全部楼层
?
VIVI version 0.1.4 (root@vmwarelinux) (gcc version 2.95.3 20010315 (release)) #0.1.4 Mon May 14 15:46:54 CST 2007
MMU table base address = 0x33DFC000
Succeed memory mapping.
DIVN_UPLL0
MPLLVal [M:7fh,P:2h,S:1h]
CLKDIVN:5h


+-----------------------------------------------------+
|  FriendlyARM SBC2440/QQ2440  USB Downloader ver1.2  |
+-----------------------------------------------------+
USB: IN_ENDPOINT:1 OUT_ENDPOINT:3
FORMAT: <ADDR(DATA):4>+<SIZE(n+10):4>+<DATA:n>+<CS:2>
NOTE: Power off/on or press the reset button for 1 sec
      in order to get a valid USB device address.

NAND device: Manufacture ID: 0xec, Chip ID: 0x76 (Samsung K9D1208V0M)
Found saved vivi parameters.
Press Return to start the LINUX/Wince now, any other key for vivi
Copy linux kernel from 0x00050000 to 0x30008000, size = 0x00200000 ... done
zImage magic = 0x016f2818
Setup linux parameters at 0x30000100
linux command line is: "noinitrd root=31:2 init=/linuxrc console=ttySAC0"
MACH_TYPE = 782
NOW, Booting Linux......
Uncompressing Linux.................................................................. done, booting the kernel.
Linux version 2.6.22.12 (elzo@elzo-laptop) (gcc version 4.2.1 (CodeSourcery Sourcery G++ Lite 2007q3-51)) #1 PREEMPT Thu Nov 22 21:14:25 CST 2007
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
Machine: SMDK2440
ATAG_INITRD is deprecated; please update your bootloader.
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C244X: core 405.000 MHz, memory 101.250 MHz, peripheral 50.625 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: 16256
Kernel command line: noinitrd root=31:2 init=/linuxrc console=ttySAC0
irq: clearing pending ext status 00000200
irq: clearing subpending status 00000002
PID hash table entries: 256 (order: 8, 1024 bytes)
timer tcon=00000000, tcnt a4ca, tcfg 00000200,00000000, usec 00001e57
Console: colour dummy device 80x30
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: 62744KB available (1812K code, 193K data, 88K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
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 c4800000, irq 33
DMA channel 1 at c4800040, irq 34
DMA channel 2 at c4800080, irq 35
DMA channel 3 at c48000c0, irq 36
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NetWinder Floating Point Emulator V0.97 (double precision)
fuse init (API version 7.8)
yaffs Nov 22 2007 21:09:59 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: 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
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: module loaded
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2440-nand s3c2440-nand: Tacls=1, 9ns Twrph0=4 39ns, Twrph1=1 9ns
lxr,2440
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 3 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x00000000-0x00030000 : "bootloader"
mtd: Giving out device 0 to bootloader
0x00050000-0x00250000 : "kernel"
mtd: Giving out device 1 to kernel
0x00250000-0x03ffc000 : "root"
mtd: Giving out device 2 to root
lxr,initialised ok
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 98 KHz
s3c2440-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
yaffs: dev is 32505858 name is "mtdblock2"
yaffs: passed flags ""
yaffs_read_super: Using yaffs1
yaffs_read_super: block size 4096
yaffs: Attempting MTD mount on 31.2, "mtdblock2"
erase c013cab0
read c013ce4c
write c013c8a0
readoob c013cd88
writeoob c013c950
block_isbad c013ccc4
block_markbad c013cd14
writesize 512
oobsize 16
erasesize 16384
size 64667648
yaffs: yaffs_GutsInitialise()
yaffs_Scan starts  intstartblk 1 intendblk 3947...
Block scanning block 1 state 3 seq 0
Block empty
Block scanning block 2 state 2 seq 0
Block scanning block 3 state 2 seq 0
Block scanning block 4 state 2 seq 0
Block scanning block 5 state 2 seq 0
一直到
Block scanning block 826 state 2 seq 0
Block scanning block 827 state 2 seq 0
Block scanning block 828 state 3 seq 0
Block empty
Block scanning block 829 state 3 seq 0
Block empty
一直到
Block scanning block 3947 state 3 seq 0
Block empty
yaffs_Scan ends
yaffs: yaffs_GutsInitialise() done.

yaffs_read_super: guts initialised OK
yaffs_read_super: got root inode
yaffs_read_super: d_alloc_root done
yaffs_read_super: done
VFS: Mounted root (yaffs filesystem).
Freeing init memory: 88K
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.
回复 支持 反对

使用道具 举报

发表于 2007-11-29 09:19:51 | 显示全部楼层
是不是由于/dev下没有console设备导致。创建设备节点console和null再试一下。
回复 支持 反对

使用道具 举报

发表于 2007-11-29 11:37:17 | 显示全部楼层
我都加过的。
回复 支持 反对

使用道具 举报

发表于 2007-11-29 19:29:45 | 显示全部楼层
不要怀疑yaffs啦
真得郁闷了我很久。

怎么一直没人看出来?
看到google的android也用yaffs啦,还是2.6.23的ker
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-11-29 19:51:03 | 显示全部楼层
2.6.3, 2.6.22.12, 2.6.23.1我都试过,全部一样的问题!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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