* MKFS.JFFS2 util
@ 2005-11-22 7:25 Nikhil
2005-11-22 13:35 ` Ferenc Havasi
0 siblings, 1 reply; 2+ messages in thread
From: Nikhil @ 2005-11-22 7:25 UTC (permalink / raw)
To: linux-mtd
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: MKFS.JFFS2 util
2005-11-22 7:25 MKFS.JFFS2 util Nikhil
@ 2005-11-22 13:35 ` Ferenc Havasi
0 siblings, 0 replies; 2+ messages in thread
From: Ferenc Havasi @ 2005-11-22 13:35 UTC (permalink / raw)
To: Nikhil; +Cc: linux-mtd
Hi Nikhil,
> 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
If before the first method the flash was empty (for example erased with
flash_eraseall -j /dev/mtd/0) then the result will be the same in
practice. Not exactly the same, but in practice it is the same.
When can be mkfs.jffs2 very usefull? For example:
- when the machine is very slow. With mkfs.jffs2 you can build the file
system on a host machine which can be much faster.
- when there is no other possibility: in some cases it is impossible to
simply copy files from somewhere, because there is no other storage
devices. For example at HP iPAQ there is only a bootloader communicating
via serial port. You can upload file system image (created by
mkfs.jffs2), and the bootloader will simply write to the flash.
Ferenc
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-11-22 13:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-22 7:25 MKFS.JFFS2 util Nikhil
2005-11-22 13:35 ` Ferenc Havasi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox