主题 : cramfs与yaffs文件系统共存的问题,请版主看下 复制链接 | 浏览器收藏 | 打印
级别: 侠客
UID: 6147
精华: 0
发帖: 91
金钱: 640 两
威望: 241 点
综合积分: 182 分
注册时间: 2009-05-21
最后登录: 2011-06-23
楼主  发表于: 2009-09-01 17:23

 cramfs与yaffs文件系统共存的问题,请版主看下

大家好,
         我现在的内核文件系统需要支持cramfs和yaffs,在VFS时启动cramfs,在读写cramfs文件系统中的rcS文件时,再把yaffs mount至mtdblocck3上,(当然cramfs是mount 至mtdblock2),我的bootloader参数是root=/dev/mtdblock2 在内核配置时,file system下面把yaffs和cramfs都已经配置上去,但是内核启动时只提示 VFS:mounted ( yaffs filesystem )现在不知道在哪里设
成mount cramfs,请大家告知下
难道是将yaffs编译成模块,将cramfs编译成静态,即在file system内核选项上,将yaffs 改为M 吗
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2009-09-01 18:26
add "rootfstype=cramfs" to kernel command line
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 侠客
UID: 6147
精华: 0
发帖: 91
金钱: 640 两
威望: 241 点
综合积分: 182 分
注册时间: 2009-05-21
最后登录: 2011-06-23
2楼  发表于: 2009-09-02 10:02
版主,还是一样,加上去了,编译内核结果出来还是加载yaffs
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
3楼  发表于: 2009-09-02 10:03
你不舍得把内核的启动信息贴出来吗?
不要浪费大家的时间和带宽了。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 侠客
UID: 6147
精华: 0
发帖: 91
金钱: 640 两
威望: 241 点
综合积分: 182 分
注册时间: 2009-05-21
最后登录: 2011-06-23
4楼  发表于: 2009-09-02 11:00
+---------------------------------------------+
|         USB Download and Tools Menu         |
+---------------------------------------------+
FCLK=400.0MHz,DMA mode
USB: IN_ENDPOINT:1 OUT_ENDPOINT:3
FORMAT: <ADDR(DATA):4>+<SIZE(n+10):4>+<DATA:n>+<CS:2>
NOTE: 1. Power off/on or press the reset button for 1 sec
         in order to get a valid USB device address.
      2. For additional tools menu, Press any key.

USB host is not connected yet.
USB host is connected. Waiting a download.
Read chip id = ec76
Nand flash status = c0
Set boot params = root=/dev/mtdblock2 init=/linuxrc load_ramdisk=0 console=ttySAC1,115200 mem=65536K devfs=mount display=lcd8bit
Load Kernel...
goto_start......,a0=0,a1=193,a2=807403520
Linux version 2.6.30.1sunnico (root@localhost) (gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72) ) #11 Wed Sep 2 09:50:10 CST 2009
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache
Machine: sunnico SMDK2440
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 400.000 MHz, memory 100.000 MHz, peripheral 50.000 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: root=/dev/mtdblock2 init=/linuxrc load_ramdisk=0 console=ttySAC1,115200 mem=65536K devfs=mount display=lcd8bit
NR_IRQS:85
irq: clearing pending ext status 0004e000
irq: clearing pending status 00004000
irq: clearing subpending status 00000092
PID hash table entries: 256 (order: 8, 1024 bytes)
Console: colour dummy device 80x30
console [ttySAC1] enabled
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: 61188KB available (3220K code, 350K data, 108K init, 0K highmem)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Calibrating delay loop... 199.47 BogoMIPS (lpj=498688)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 296 bytes
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
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 97 KHz
s3c2440-i2c:is irq number: 43
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: 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
NetWinder Floating Point Emulator V0.97 (extended precision)
yaffs Sep  2 2009 09:44:37 Installing.
msgmni has been set to 119
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:is irq number: 32
Console: switching to colour frame buffer device 30x20
fb0: s3c2410fb frame buffer device
pwm    initialized
adc:is irq number: 80
adc    initialized
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
loop: module loaded
Driver 'sd' needs updating - please use bus_type methods
Register cs8900 Ethernet Driver for sunnico ECG2440 board.
cs8900: probbing for sunnico2440...
eth0: CS8900A rev E at 0xc4814300 irq=53, addr: 08: 0:3E:26:0A:5B
[cs89x0_probe] S3C2410_BWSCON = 2211d110

[cs89x0_probe] S3C2410_BANKCON3 = 1f7c

[cs89x0_probe] S3C2410_GPGCON = a6aaaa

[cs89x0_probe] S3C2410_EXTINT1 = 22222222

[cs89x0_probe] S3C2410_EINTMASK = fffff0

Generic platform RAM MTD, (c) 2004 Simtec Electronics
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2440-nand s3c2440-nand: Tacls=3, 30ns Twrph0=7 70ns, Twrph1=3 30ns
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 4 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x000000000000-0x000000030000 : "Bootloader"
0x000000030000-0x000000280000 : "sunnicokernel"
0x000000280000-0x000001170000 : "sunnico_rootfs"
0x000001170000-0x000003e5c000 : "ext1_fs_EcgFile"
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
ohci_hcd:usb1:is irq number: 42
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
usb usb1: New USB device found, idVendor=1d6b, idProduct=0001
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: S3C24XX OHCI
usb usb1: Manufacturer: Linux 2.6.30.1sunnico ohci_hcd
usb usb1: SerialNumber: s3c24xx
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver usbserial
usbserial: USB Serial Driver core
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
s3c2410_action:is irq number: 80
s3c2410_action:is irq number: 79
s3c2410 TouchScreen successfully loaded
input: s3c2410 TouchScreen as /devices/virtual/input/input0
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
i2c /dev entries driver
Linux video capture interface: v2.00
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt:is irq number: 83
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
s3c-mci:is irq number: 37
s3c-mci:is irq number: 60
mapped channel 0 to 0
s3c-mci:is irq number: 33
s3c2440-sdi s3c2440-sdi: powered down.
s3c2440-sdi s3c2440-sdi: initialisation done.
s3c2440-sdi s3c2440-sdi: running at 0kHz (requested: 0kHz).
s3c2440-sdi s3c2440-sdi: running at 196kHz (requested: 195kHz).
s3c2440-sdi s3c2440-sdi: running at 196kHz (requested: 195kHz).
s3c2440-sdi s3c2440-sdi: running at 196kHz (requested: 195kHz).
s3c2440-sdi s3c2440-sdi: powered down.
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
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)
FAT: utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
yaffs: dev is 32505858 name is "mtdblock2"
yaffs: passed flags ""
yaffs: Attempting MTD mount on 31.2, "mtdblock2"
yaffs_read_super: isCheckpointed 0
VFS: Mounted root (yaffs filesystem) on device 31:2.
Freeing init memory: 108K
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:
[<c0028048>] (dump_backtrace+0x0/0x10c) from [<c027b064>] (dump_stack+0x18/0x1c)
r7:00000000 r6:c036e720 r5:c036e0e0 r4:c034c210
[<c027b04c>] (dump_stack+0x0/0x1c) from [<c027b0b4>] (panic+0x4c/0x12c)
[<c027b068>] (panic+0x0/0x12c) from [<c00234f0>] (init_post+0xec/0x178)
r3:00000000 r2:c384b900 r1:c03a1000 r0:c02fd2bc
[<c0023404>] (init_post+0x0/0x178) from [<c000847c>] (kernel_init+0xcc/0xf4)
r5:c001c5ec r4:c001c944
[<c00083b0>] (kernel_init+0x0/0xf4) from [<c00458b0>] (do_exit+0x0/0x620)
r7:00000000 r6:00000000 r5:00000000 r4:00000000
级别: 侠客
UID: 6147
精华: 0
发帖: 91
金钱: 640 两
威望: 241 点
综合积分: 182 分
注册时间: 2009-05-21
最后登录: 2011-06-23
5楼  发表于: 2009-09-02 11:07
版主请看下,
             是不是bootloader parameter参数有错误呀
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
6楼  发表于: 2009-09-02 11:35
反正我是没看到"rootfstype=cramfs"加到内核命令行上了,你用的命令行是

Kernel command line: root=/dev/mtdblock2 init=/linuxrc load_ramdisk=0 console=ttySAC1,115200 mem=65536K devfs=mount display=lcd8bit

如果你用的是Supervivi, 看http://aiothome.com/bbs/read.php?tid-170.html找出如何通过Supervivi设定内核命令行
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 侠客
UID: 6147
精华: 0
发帖: 91
金钱: 640 两
威望: 241 点
综合积分: 182 分
注册时间: 2009-05-21
最后登录: 2011-06-23
7楼  发表于: 2009-09-02 14:42

 回 6楼(kasim) 的帖子

版主,已经解决,主要是内核配置文件没有更新,我改了我自己的配置文件,但是默认的是.config
级别: 新手上路
UID: 11349
精华: 0
发帖: 13
金钱: 65 两
威望: 13 点
综合积分: 26 分
注册时间: 2009-12-04
最后登录: 2011-05-23
8楼  发表于: 2010-03-05 13:21

 回 楼主(mikej) 的帖子

根文件系统cramfs+yaffs的制作
我用的是友善之臂QQ2440的板子,用的linuux2.6.13的内核,制作根文件系统cramfs已经可以运行,但是我想把应用程序放在yaffs文件系统里面,故需要在cramfs基础上挂载yaffs,这需要添加分区,目前我已经把分区成功的添加了,并且修改了分区的信息,就是不知道脚本文件怎么改?原来是linuxrc的内容是
#!/bin/sh
echo "mount /etc as ramfs"
/bin/mount -n -t ramfs ramfs /etc
/bin/cp -a /mnt/etc/* /etc
echo "re-create the /etc/mtab entries"
# re-create the /etc/mtab entries
/bin/mount -f -t cramfs -o remount,ro /dev/mtdblock2 /
#mount some file system
echo "------------mount /dev as tmpfs"
/bin/mount -n -t tmpfs tmpfs /dev
echo "------------mount /proc as proc"
/bin/mount -n -t proc proc /proc
echo "------------mount /sys as sysfs"
/bin/mount -n -t sysfs sysfs /sys
exec /sbin/init
我进入shell界面后,用命令mount  -t yaffs2 /dev/mtdblock3  /mnt  ,会出现:
yaffs: dev is 32505859 name is "mtdblock3"
yaffs: Attempting MTD mount on 31.3, "mtdblock3"
yaffs: auto selecting yaffs1的提示,当我在里面建立一个vi文件时,提示出现
yaffs chunk 1150 was not erased等的很多坏块。然后会出现Cannot allocate memory的提示,请问哪里有问题?不知道你是怎么做成功的,能不能大致给我讲述一下主要的地方