initrd - mtd - jffs2 - problem

Hi,

I build a minimal linux system which consists of a bzImage (kernel

2=2E6.16.5) and a rootfs (initrd). The rootfs is formatted with ext2. The kernel and initrd is stored on a bootp server and is loaded at system startup into the system RAM. Kernel gets extracted, mounts the rootfs and executes init. Everything works fine.

To save memory in my system RAM, I want to compress the rootfs. I don=B4t use any flash memory! I decided to use jffs2 as filesystem type for the rootfs, because its writable. I didn=B4t find any hints on using jffs2 and mtd in system RAM.

My kernel supports jffs2 filesystems and memory tech. devices (see appended kernel config). I use vanilla kernel version 2.6.16.5.

I created the rootfs with mkfs.jffs2: mkfs.jffs2 -l -o ../jffs_root.img

Then I tested it in qemu using the following parameters:

qemu jffs_root.img -kernel bzImage -initrd jffs_root.img -append "root=3D/dev/mtdblock0 rw blkmtd_device=3D/dev/ram0 rootfstype=3Djffs2 init=3D/sbin/init"

I appended the whole "-append thing", but I=B4m not absolutely sure what I did ;-) But I=B4m sure, it doesn=B4t work...

I get the following messages when i start qemu:

RAMDISK driver initialized: 1 RAM disks of 4096K size 1024 blocksize blkmtd: version $Revision: 1.27 $ blkmtd: mtd1: [/dev/ram0] erase_size =3D 128KiB block2mtd: version $Revision: 1.30 $ .=2E. RAMDISK: Couldn=B4t find valid RAM disk image starting at 0. VFS: Mounted root (jffs2 filesystem). Freeing unused kernel memory: 104k freed Warning: unable to open an initial console. Failed to execute /sbin/init. Attempting defaults... Kernel panic - not syncing: No init found. Try passing init=3D option to kernel.

Which parameters do I have to pass to the kernel? Is it possible to use JFFS2 with initrd in system RAM at all?

Any help is appreciated! Thanks in advance.

Sebastian

mtd part of the kernel config:

----------------------------------------------------------------------------

# Memory Technology Devices (MTD) # CONFIG_MTD=3Dy # CONFIG_MTD_DEBUG is not set # CONFIG_MTD_CONCAT is not set CONFIG_MTD_PARTITIONS=3Dy # CONFIG_MTD_REDBOOT_PARTS is not set # CONFIG_MTD_CMDLINE_PARTS is not set

# User Modules And Translation Layers

CONFIG_MTD_CHAR=3Dy CONFIG_MTD_BLOCK=3Dy # CONFIG_FTL is not set # CONFIG_NFTL is not set # CONFIG_INFTL is not set # CONFIG_RFD_FTL is not set

# RAM/ROM/Flash chip drivers # # CONFIG_MTD_CFI is not set # CONFIG_MTD_JEDECPROBE is not set CONFIG_MTD_MAP_BANK_WIDTH_1=3Dy CONFIG_MTD_MAP_BANK_WIDTH_2=3Dy CONFIG_MTD_MAP_BANK_WIDTH_4=3Dy # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set CONFIG_MTD_CFI_I1=3Dy CONFIG_MTD_CFI_I2=3Dy # CONFIG_MTD_CFI_I4 is not set # CONFIG_MTD_CFI_I8 is not set CONFIG_MTD_RAM=3Dy CONFIG_MTD_ROM=3Dy CONFIG_MTD_ABSENT=3Dy CONFIG_MTD_OBSOLETE_CHIPS=3Dy # CONFIG_MTD_SHARP is not set

# Mapping drivers for chip access # # CONFIG_MTD_COMPLEX_MAPPINGS is not set # CONFIG_MTD_TS5500 is not set CONFIG_MTD_PLATRAM=3Dy

# Self-contained MTD device drivers # # CONFIG_MTD_PMC551 is not set CONFIG_MTD_SLRAM=3Dy CONFIG_MTD_PHRAM=3Dy CONFIG_MTD_MTDRAM=3Dy CONFIG_MTDRAM_TOTAL_SIZE=3D4096 CONFIG_MTDRAM_ERASE_SIZE=3D128 CONFIG_MTDRAM_ABS_POS=3D0 CONFIG_MTD_BLKMTD=3Dy CONFIG_MTD_BLOCK2MTD=3Dy

# Disk-On-Chip Device Drivers # # CONFIG_MTD_DOC2000 is not set # CONFIG_MTD_DOC2001 is not set # CONFIG_MTD_DOC2001PLUS is not set

# NAND Flash Device Drivers # # CONFIG_MTD_NAND is not set

# OneNAND Flash Device Drivers # # CONFIG_MTD_ONENAND is not set

Reply to
seven
Loading thread data ...

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.