LinuxSir.cn,穿越时空的Linuxsir!

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

2.6.20内核移植s3c2410问题:挂载文件系统失败(vivi)

[复制链接]
发表于 2007-3-15 21:03:48 | 显示全部楼层 |阅读模式
最后挂载不上,不知道什么问题!!
但是中间发现一个错误,关于MTD partition 的,为什么内核显示的分区不对!!
和bootloader 显示的分区不一致?!困惑中……
启动信息
Copy linux kernel from 0x00200000 to 0x30008000, size = 0x00400000 ... done
zImage magic = 0x016f2818
Setup linux parameters at 0x30000100
linux command line is: "noinitrd root=/dev/mtdblock3 init=linuxrc console=ttySAC0"
MACH_TYPE = 193
NOW, Booting Linux......
Uncompressing Linux............................................................................................... done, booting the kernel.
Linux version 2.6.20 (root@debian) (gcc version 3.4.1) #10 Thu Mar 15 19:35:16 CST 2007
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
Machine: SMDK2410
ATAG_INITRD is deprecated; please update your bootloader.
Memory policy: ECC disabled, Data cache writeback
CPU S3C2410A (id 0x32410002)
S3C2410: core 202.800 MHz, memory 101.400 MHz, peripheral 50.700 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=/dev/mtdblock3 init=linuxrc console=ttySAC0
irq: clearing pending ext status 00000100
irq: clearing subpending status 00000003
irq: clearing subpending status 00000002
PID hash table entries: 256 (order: 8, 1024 bytes)
timer tcon=00000000, tcnt a509, tcfg 00000200,00000000, usec 00001e4c
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: 61824KB available (2664K code, 314K data, 120K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics
Registering sysclass
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
NET: Registered protocol family 16
S3C2410 Power Management, (c) 2004 Simtec Electronics
S3C2410: Initialising architecture
kobject_add failed for s3c2410-nand with -EEXIST, don't try to register things with the same name in the same directory.
s3c24xx: failed to add board device s3c2410-nand (-17) @c02c7370
0:               xdreq0, channels 0---
1:               xdreq1, channels -1--
2:                  sdi, channels 0-23
3:                 spi0, channels -1--
4:                 spi1, channels ---3
5:                uart0, channels 0---
6:                uart1, channels -1--
7:                uart2, channels ---3
8:                timer, channels 0-23
9:              i2s-sdi, channels -12-
10:              i2s-sdo, channels --2-
11:               <NULL>, channels ----
12:               <NULL>, channels ----
13:               <NULL>, channels ----
14:              usb-ep1, channels 0---
15:              usb-ep2, channels -1--
16:              usb-ep3, channels --2-
17:              usb-ep4, channels ---3
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: 2048 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 2048 bind 1024)
TCP reno registered
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) (C) 2001-2006 Red Hat, Inc.
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
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
s3c2410-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2410
s3c2410-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2410
s3c2410-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2410
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: loaded (max 8 devices)
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
BAST NOR-Flash Driver, (c) 2004 Simtec Electronics
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2410-nand s3c2410-nand: Tacls=3, 29ns Twrph0=7 69ns, Twrph1=3 29ns
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 8 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x00000000-0x00004000 : "Boot Agent"
0x00000000-0x00200000 : "S3C2410 flash partition 1"
0x00400000-0x00800000 : "S3C2410 flash partition 2"
0x00800000-0x00a00000 : "S3C2410 flash partition 3"
0x00a00000-0x00e00000 : "S3C2410 flash partition 4"
0x00e00000-0x01800000 : "S3C2410 flash partition 5"
0x01800000-0x03000000 : "S3C2410 flash partition 6"
0x03000000-0x04000000 : "S3C2410 flash partition 7"
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
s3c2410-i2c s3c2410-i2c: slave address 0x10
s3c2410-i2c s3c2410-i2c: bus frequency set to 99 KHz
s3c2410-i2c s3c2410-i2c: i2c-0: S3C I2C adapter
TCP cubic registered
NET: Registered protocol family 1
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
No filesystem could mount root, tried:  ext3 cramfs msdos vfat romfs
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,3)
我用的是vivi bootloader,分区信息:
vivi> part show
mtdpart info. (5 partitions)
name              offset            size        flag
------------------------------------------------
vivi            : 0x00000000        0x00100000     0    1M
param           : 0x00100000        0x00100000     0    1M
kernel          : 0x00200000        0x00400000     0    4M
root            : 0x00600000        0x00800000     8    8M
user            : 0x00e00000        0x031fc000     8   49M+1008k

上面的启动信息MTD partiton为什么和这里不一样!?!
我用的root.carmfs 是2.4内核下可以工作的,这里应该也可以吧!!
为什么不能启动呢?!!
发表于 2007-3-16 21:31:01 | 显示全部楼层
nand flash分区表没定义呢!
回复 支持 反对

使用道具 举报

发表于 2007-3-18 15:43:55 | 显示全部楼层
我也遇到这样的问题,能说一下在那定义吗?
回复 支持 反对

使用道具 举报

发表于 2007-3-19 19:51:55 | 显示全部楼层
如果不是自己写的驱动,那就应该在drivers/mtd/nand/下,在对应型号的 nand flash驱动文件里,用静态分区表
回复 支持 反对

使用道具 举报

发表于 2007-3-21 11:33:32 | 显示全部楼层
我在linux-2.6.20.3/arch/arm/mach-s3c2410中的devs.c中定义了分区表,也在smdk-2410.c中添加了nand启动,但是还是遇到了同样的问题,大家是怎么解决的呢?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-3-24 03:33:09 | 显示全部楼层
Post by RealAMD
我在linux-2.6.20.3/arch/arm/mach-s3c2410中的devs.c中定义了分区表,也在smdk-2410.c中添加了nand启动,但是还是遇到了同样的问题,大家是怎么解决的呢?

新的内核在common-smdk.c中已加入了nand-flash驱动,所以在devs.c中就不要加了!否则报kobject_add failed for s3c2410-nand with -EEXIST, don't try to register things with the same name in the same directory. 错误
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-3-24 03:38:02 | 显示全部楼层
Post by bass339
nand flash分区表没定义呢!

感谢大家的关注!
最新进展是将楼上的那个报错搞掉了,最新的内核里面有nand-flash驱动!
现在应该是根文件系统有问题,正在读《如何构建Linux嵌入式》
最近的启动信息:
vivi> boot
Copy linux kernel from 0x00200000 to 0x30008000, size = 0x00400000 ... done
zImage magic = 0x016f2818
Setup linux parameters at 0x30000100
linux command line is: "noinitrd root=/dev/mtdblock3 init=linuxrc console=ttySAC0"
MACH_TYPE = 193
NOW, Booting Linux......
Uncompressing Linux................................................................................................ done, booting the kernel.
Linux version 2.6.20 (root@debian) (gcc version 3.4.1) #2 Wed Mar 21 20:12:17 CST 2007
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
Machine: SMDK2410
ATAG_INITRD is deprecated; please update your bootloader.
Memory policy: ECC disabled, Data cache writeback
CPU S3C2410A (id 0x32410002)
S3C2410: core 202.800 MHz, memory 101.400 MHz, peripheral 50.700 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=/dev/mtdblock3 init=linuxrc console=ttySAC0
irq: clearing pending ext status 00000100
irq: clearing subpending status 00000003
irq: clearing subpending status 00000002
PID hash table entries: 256 (order: 8, 1024 bytes)
timer tcon=00000000, tcnt a509, tcfg 00000200,00000000, usec 00001e4c
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: 61824KB available (2692K code, 283K data, 120K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics
Registering sysclass
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
NET: Registered protocol family 16
S3C2410 Power Management, (c) 2004 Simtec Electronics
S3C2410: Initialising architecture
0:               xdreq0, channels 0---
1:               xdreq1, channels -1--
2:                  sdi, channels 0-23
3:                 spi0, channels -1--
4:                 spi1, channels ---3
5:                uart0, channels 0---
6:                uart1, channels -1--
7:                uart2, channels ---3
8:                timer, channels 0-23
9:              i2s-sdi, channels -12-
10:              i2s-sdo, channels --2-
11:               <NULL>, channels ----
12:               <NULL>, channels ----
13:               <NULL>, channels ----
14:              usb-ep1, channels 0---
15:              usb-ep2, channels -1--
16:              usb-ep3, channels --2-
17:              usb-ep4, channels ---3
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: 2048 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 2048 bind 1024)
TCP reno registered
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) (C) 2001-2006 Red Hat, Inc.
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
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
s3c2410-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2410
s3c2410-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2410
s3c2410-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2410
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: loaded (max 8 devices)
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
BAST NOR-Flash Driver, (c) 2004 Simtec Electronics
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2410-nand s3c2410-nand: Tacls=3, 29ns Twrph0=7 69ns, Twrph1=3 29ns
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 5 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x00000000-0x00100000 : "vivi"
0x00100000-0x00200000 : "param"
0x00200000-0x00600000 : "kernel"
0x00600000-0x00e00000 : "root"
0x00e00000-0x03ffc000 : "user"
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
s3c2410-i2c s3c2410-i2c: slave address 0x10
s3c2410-i2c s3c2410-i2c: bus frequency set to 99 KHz
s3c2410-i2c s3c2410-i2c: i2c-0: S3C I2C adapter
TCP cubic registered
NET: Registered protocol family 1
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
No filesystem could mount root, tried:  ext3 ext2 msdos vfat romfs
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,3)

觉得与MTD partition和根文件系统有关!
但是目前还没有思路,以前的是2.4.18下的根文件系统cramfs的!
打算自己重新做一个!不行再试试ext2,ext3什么的~
回复 支持 反对

使用道具 举报

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

本版积分规则

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