JFFS2 on NAND (S3C2410)

Selmeci, Tamas tamas.selmeci at siemens.com
Tue Mar 28 10:34:27 EST 2006


Igor is trying to make a JFFS2 based root filesystem on his developer board - so do I at this time.

My idea (the one and only data/root partition is JFFS2) seems not to work yet. If I make a jffs2 image with 

mkfs.jffs -U -l -e 16 KiB -o ../rootfs_jffs2

the kernel identifies as jffs, not jffs2. Attempts to mount, but can access nothing on that (obviously, this is a jffs2 and kernel mounts as jffs). As I saw, struct mtd_partition has a member called mask_flags. I suspect this value is a kind of "partition ID", in Vivi boot loader this indicates JFFS2. 

I've attempted an other method too. I created a 5th partition (the 4th is still cramfs). The board successfully
booted into the cramfs. I made a jffs2 image from the partition with mkfs.jffs2, and then copied:

dd if=/tmp/jffs2_image of=/dev/mtd4


mount -t jffs2 /dev/mtdblock4 /tmp/mnt

Displays a few error messages (CLEANMARKER node found at xxx has totlen 0xc != normal 0x0), but after mounting,
the directory tree seems to be OK and I can run programs from jffs2 partition. However, if the kernel parameter
is root=/dev/mtdblock4, still can't mount it.

If I try this procedure for jffs filesystem, I can't copy because cp and dd complain: attempt to write 
not page aligned data. mkfs.jffs has no option like mkfs.jffs2's -p to pad ...

ECC check is forced to be off in this kernel (

Any idea?

Tamas Selmeci
Siemens PSE HU
Tel.   : +36-1-471-3861
Email  : tamas.selmeci at siemens.com
Address: H-1143 Budapest, Gizella ut 51-59

More information about the linux-mtd mailing list