Is JFFS2 on Disk-on-Chip 2000 possible?

Is JFFS2 on Disk-on-Chip 2000 possible?

Post by <bcoh.. » Mon, 04 Mar 2002 06:08:22



Is is possible to use the jffs2 file system on a Disk-on-Chip 2000 flash
device with the linux 2.4.x MTD subsystem?  The mtd-jffs-HOWTO is a bit
unclear (probably just to me) on this.  My attempts have been unsuccessful
so far.

I've successfully gotten everything working using the NFTL layer.
Ie. Partitioning /dev/nftla and putting ext2 on the partitions.
However, I really need the async power-off safety that jffs2
appears to offer. Using initrd to run the system out of ramdisk is OK
but I still need to be able to mount and write to the device occasionally
and can not afford ever having file system corruption.

It seems to me that one should be able to put jffs2 on either
/dev/mtdblock0 where only jffs2 handles the wear leveling or on
/dev/nftla where both jffs2 and NFTL do.

I've tried:
  ( for a 16Meg Disk-on-Chip 2000 part, kernel 2.4.18, jffs2 support
    compiled into kernel )
erase /dev/mtd0 0 1024
mkfs.jffs2 -d ./mydir -o ./jffs2.img
cp ./jffs2.img /dev/mtd0
mount -t jffs2 /dev/mtdblock0 /mnt/mymount

A mount takes about 20 seconds but seems to succeed and appears
listed with a 'df' command but no files appear in the mounted
directory and trying to write anything simply hangs until I interrupt
it with a ctrl-C.  

The MTD debugging also likes to complain about the ECC needing
full sectors to work properly.

Also, is there any way to do away with those DOS Disk-on-Chip utilities
such as dformat, dupdate, etc.  The MTD utility 'erase' seems to erase
the device OK but I don't see how to tell the device to tell BIOS
that its the first disk for booting.  I'm using lilo-mtd currently.

Thanks in advance....

Ben

--
 Mechanical engineers build weapons systems.
 Electronic engineers build guidance systems.
 Civil engineers build...targets.
(random sig #9)