MKFS.JFFS2 util

Nikhil nikhils at cdac.in
Tue Nov 22 02:25:05 EST 2005


hi all,

I am a bit confused whether i need to use mkfs.jffs2 when i need to save
data files on flash in jffs2 format, or is it fine to just mount flash
partition as jffs2 and simply copy the file from another storage(e.g. hard
disk)

i had a txt file on /home/mydir/test.txt which i need to have it on flash
in JFFS2 format. 

i followed the following steps.
1) mount the partition as JFFS2 (mount -t jffs2 /dev/mtdblock0 /mnt/cf)
and 
2) then copy the file (cp /home/mydir/test.txt /mnt/cf/) or 

1) i can MKFS.JFFS2 on the dir (mkfs.jffs2 -d /home/mydir/ -o myimage) 
2) then dd it to flash (dd if=myimage of=/dev/mtdblock0)
3) and then mount it (mount -t jffs2 /dev/mtdblock0 /mnt/cf/)

is the first method the correct way of implementation, as i am getting the
same results either way but i need not use mkfs.jffs2. if yes, then when
shud i use mkfs.jffs2 utility 




-- 
Thanks & Regards

Nikhil Shirodkar
Project Engineer
NISG, CDAC







More information about the linux-mtd mailing list