QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4853|回复: 4

不能mount文件系统,好像MTD的问题,请教怎样解决

[复制链接]
发表于 2007-1-24 22:58:04 | 显示全部楼层 |阅读模式
ARM9处理器,根文件系统采用cramfs,Linux内核启动时找不到MTDBLOCK1,如下:


## Booting image at 20400000 ...
   Image Name:   linux-2.6
   Image Type:   ARM Linux Kernel Image (gzip compressed)
   Data Size:    1035094 Bytes = 1010.8 kB
   Load Address: 20008000
   Entry Point:  20008000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK

Starting kernel ...

Linux version 2.6.15.4 ([email protected]) (gcc version 3.4.1 20040714 (TimeSys 3.4.1-7)) #25 Wed Jan 24 22:22:37 CST 2007
CPU: ARM926EJ-Sid(wb) [41069265] revision 5 (ARMv5TEJ)
Machine: ATMEL AT91SAM9261
Ignoring unrecognised tag 0x54410008
Memory policy: ECC disabled, Data cache writeback
BUG: mapping for 0xffffe000 at 0xfedff000 overlaps vmalloc space
BUG: mapping for 0xfffa4000 at 0xfeda5000 overlaps vmalloc space
BUG: mapping for 0xfffbc000 at 0xfedbd000 overlaps vmalloc space
BUG: mapping for 0xfffc0000 at 0xfedc1000 overlaps vmalloc space
BUG: mapping for 0xfffc4000 at 0xfedc5000 overlaps vmalloc space
BUG: mapping for 0xfffac000 at 0xfedad000 overlaps vmalloc space
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
CPU0: D cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
Built 1 zonelists
Kernel command line: noinitrd mem=64M root=/dev/mtdblock1 ro console=ttyS0,115200 rootfstype=cramfs
set_irq_chained_handler 2
set_irq_chained_handler 3
set_irq_chained_handler 4
AT91: 96 gpio irqs in 3 banks
PID hash table entries: 512 (order: 9, 8192 bytes)
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: 62616KB available (1706K code, 380K data, 96K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
at91_add_device_dm9000 SMC  & PIO initialisation fedffc00
SCSI subsystem initialized
usbcore: registered new driver usbfs
usbcore: registered new driver hub
NetWinder Floating Point Emulator V0.97 (double precision)
devfs: 2004-01-31 Richard Gooch ([email protected])
devfs: boot_options: 0x1
fuse init (API version 7.3)
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
sidsafb: 150KiB frame buffer at 00300000 (mapped at c4840000)
Console: switching to colour frame buffer device 30x40
sidsafb: Driver $Revision: 1.2 $
ttyS0 at MMIO 0xfffff200 (irq = 1) is a AT91_SERIAL
ttyS1 at MMIO 0xfffb0000 (irq = 6) is a AT91_SERIAL
ttyS2 at MMIO 0xfffb4000 (irq = 7) is a AT91_SERIAL
RAMDISK driver initialized: 1 RAM disks of 40960K size 1024 blocksize
dm9000 Ethernet Driver
eth0: dm9000 at c4816000,c481e044 IRQ 107 MAC: 00:02:34:56:78:19
NFTL driver: nftlcore.c $Revision: 1.98 $, nftlmount.c $Revision: 1.41 $
INFTL: inftlcore.c $Revision: 1.19 $, inftlmount.c $Revision: 1.18 $
block2mtd: version $Revision: 1.30 $
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit)
Scanning device for bad blocks
Creating 3 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x00000000-0x00200000 : "AT91 NAND partition 1, kernel"
0x00200000-0x00c00000 : "AT91 NAND partition 2, filesystem"
0x00c00000-0x04000000 : "AT91 NAND partition 3, storage"
ftl_cs: FTL header not found.
usb-ohci usb-ohci.0: AT91SAM9261 OHCI
usb-ohci usb-ohci.0: new USB bus registered, assigned bus number 1
usb-ohci usb-ohci.0: irq 20, io mem 0x00500000
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usb 1-2: new low speed USB device using usb-ohci and address 2
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
input: USB Optical Mouse as /class/input/input0
input: USB HID v1.11 Mouse [USB Optical Mouse] on usb-AT91SAM9261-2
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.6:USB HID core driver
gpio_irq_unmask 93 fee00600
at91_udc version 8 March 2005
udc: at91_udc version 8 March 2005
gs_bind: Gadget Serial v2.0 bound
gs_module_init: Gadget Serial v2.0 loaded
mice: PS/2 mouse device common for all mice
spi spi.0: AT91 SPI Interface at 0xfffc8000 irq : 12
<6>spi_adapter spi-0: Atmel AT45DB321 detected [spi0] (4325376 bytes)
ftl_cs: FTL header corrupt!
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
NET: Registered protocol family 17
VFS: Cannot open root device "mtdblock1" or unknown-block(31,1)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,1)

请指教,渴望中!
发表于 2007-1-25 11:58:14 | 显示全部楼层
我也出现了类似的问题,可就是不知道该怎么解决:

<4>CPU revision is: 00018009
<4>Primary instruction cache 16kB, physically tagged, 4-way, linesize 16 bytes.
<4>Primary data cache 16kB 4-way, linesize 16 bytes.
<4>Linux version 2.4.25-LSDK-5.2.0.111 (root@linuxhost) (gcc version 3.3.3) #1
1 24 13:45:38 CST 2007
<4>Determined physical RAM map:
<4> memory: 01000000 @ 00000000 (usable)
<4>On node 0 totalpages: 4096
<4>zone(0): 4096 pages.
<4>zone(1): 0 pages.
<4>zone(2): 0 pages.
<4>Kernel command line: console=ttyS0,9600  root=/dev/mtdblock1
<4>Using 110.000 MHz high precision timer.
<4>Calibrating delay loop... 219.54 BogoMIPS
<6>Memory: 14624k/16384k available (1237k kernel code, 1760k reserved, 80k data,
64k init, 0k highmem)
<6>Dentry cache hash table entries: 2048 (order: 2, 16384 bytes)
<6>Inode cache hash table entries: 1024 (order: 1, 8192 bytes)
<6>Mount cache hash table entries: 512 (order: 0, 4096 bytes)
<6>Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
<4>Page-cache hash table entries: 4096 (order: 2, 16384 bytes)
<4>Checking for 'wait' instruction...  available.
<4>POSIX conformance testing by UNIFIX
<6>Linux NET4.0 for Linux 2.4
<6>Based upon Swansea University Computer Society NET3.039
<4>Initializing RT netlink socket
<4>Starting kswapd
<5>JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis Communications AB
.
<4>pty: 256 Unix98 ptys configured
<6>Serial driver version 5.05c (2001-07-0 with no serial options enabled
<6>ttyS00 at 0xbc000003 (irq = 37) is a 16550A
<6>Generic MIPS RTC Driver v1.0
<5>physmap flash device: 800000 at be000000
<5> Amd/Fujitsu Extended Query Table v1.1 at 0x0040
<4>Physically mapped flash: Swapping erase regions for broken CFI table.
<5>number of CFI chips: 1
<5>cfi_cmdset_0002: Disabling fast programming due to code brokenness.
<5>Using physmap partition definition
<5>Creating 5 MTD partitions on "Physically mapped flash":
<5>0x00000000-0x00030000 : "RedBoot"
<5>0x00030000-0x00230000 : "rootfs"
<5>0x00230000-0x002a0000 : "linux"
<5>0x002a0000-0x002b0000 : "RedBoot config"
<5>0x002b0000-0x002c0000 : "FIS directory"
<6>Initializing Cryptographic API
<6>NET4: Linux TCP/IP 1.0 for NET4.0
<6>IP Protocols: ICMP, UDP, TCP, IGMP
<6>IP: routing cache hash table of 512 buckets, 4Kbytes
<6>TCP: Hash tables configured (established 1024 bind 204
<6>NET4: Ethernet Bridge 008 for NET4.0
<1>802.1Q VLAN Support v1.8 Ben Greear <[email protected]>
<1>All bugs added by David S. Miller <[email protected]>
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000000: 0x401a
instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000004: 0x3c1b
instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000008: 0x037a
instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000000c: 0x1760
instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000014: 0x3c08
instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000018: 0x3508
instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000001c: 0x8d00
instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000020: 0x3c08
instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000024: 0x3508
instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000028: 0x8d00
instead
<5>Further such events for this erase block will not be printed
<5>JFFS2: Erase block at 0x00000000 is not formatted. It will be erased
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010000: 0x14a0
instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010004: 0x0080
instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010008: 0x2508
instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0001000c: 0x2d02
instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010010: 0xad24
instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010014: 0x1440
instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010018: 0x2529
instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0001001c: 0x3c04
instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010020: 0x2631
instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00010024: 0x2402
instead
<5>Further such events for this erase block will not be printed
<5>JFFS2: Erase block at 0x00010000 is not formatted. It will be erased
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020000: 0x0202
instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020004: 0x2463
instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020008: 0xa623
instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0002000c: 0x8fbf
instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020010: 0xae11
instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020014: 0x8fb1
instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020018: 0x8fb0
instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0002001c: 0x03e0
instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020020: 0x27bd
instead
<5>jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020024: 0x27bd
instead
<5>Further such events for this erase block will not be printed
<5>JFFS2: Erase block at 0x00020000 is not formatted. It will be erased
<5>Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
<0>Kernel panic: VFS: Unable to mount root fs on 1f:01
<4>

按照理论上说,虽然出现错误的地方不一样,但是可以肯定是犯了同一个错误,只是不知道该怎么去改罢了,顶一下.
敬请有关经验的朋友说说您的看法!

另外,我想问一下."root=/dev/mtdblock1"这个命令中的mtdblock1的数字是怎么确定的?
回复

使用道具 举报

 楼主| 发表于 2007-1-25 20:55:34 | 显示全部楼层
mtdblock1 是根据你对FLASH的分区确定的,我的FLASH被分成3个区,根文件系统位于第 1 个(从0开始):
0x00000000-0x00200000 : "AT91 NAND partition 1, kernel"
0x00200000-0x00c00000 : "AT91 NAND partition 2, filesystem"
0x00c00000-0x04000000 : "AT91 NAND partition 3, storage"

所以根文件系统设成mtdblock1。
回复

使用道具 举报

发表于 2007-1-26 09:53:50 | 显示全部楼层
我还有一个问题,就是在进行mtd flash分区的时候,每个分区的大小一定要和flash当中真正的空间大小一样吗?
比如说,在flash中kernel占用0x168000大小.在mtd分区是,分给kernel的大小也一定要这么大吗?
另外分区的顺序也一定要和flash保持一致吗?
回复

使用道具 举报

发表于 2007-1-29 15:25:18 | 显示全部楼层
如果你的flash上没有使用分区表的话,那么其分区的定义可以在驱动里写死,你可以根据需要任意切割 flash 芯片。
回复

使用道具 举报

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

本版积分规则

GMT+8, 2024-11-22 05:41 , Processed in 0.080485 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

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