Skip to contentSkip to conversation

Jffs2 on MTD

DISCUSSION invictus rm 2 participants 2 messages Jul 27, 2002 – Jul 30, 2002 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

hi ,
I have partitioned my flash( strata) as follows
mtd0 .....
mtd1 .....
mtd3: 01dc0000 00040000 "JFFS2"

After that i have mounted the jffs2 as (without doing cp jffs2.img > /dev/mtd3)

Quoted 2 lines

mount -t jffs2 /dev/mtdblock3 /mnt/jffs2
cd /mnt/jffs2

Filesystem 1k-blocks Used Available Use% Mounted on
/dev/mtdblock3 30464 1284 29180 4% /mnt/jffs2

I am not copying the jffs2 image on to the /dev/mtd3 before mouting but rather copying the files after mounting ( i mean putting the required files after i have mounted the /dev/mtdblock3)

The reason why i am doing this is becoz i do not need the directory structure of a regular filesystem.

Does this make any difference in terms of flash usage as compared to the case where i would have copied the jffs2.img to mtd3 and then mounted it .

rgds
rm

_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com

#1 lore raw
Quoted 6 lines · [email protected] said:

I am not copying the jffs2 image on to the /dev/mtd3 before mouting
but rather copying the files after mounting ( i mean putting the required files after i have mounted the /dev/mtdblock3)

The reason why i am doing this is becoz i do not need the directory structure of a regular filesystem.

Well, mkfs.jffs2 can happily make an image of a file system with no subdirectories too.

Quoted 3 lines

Does this make any difference in terms of flash usage as compared to the case where i would have copied the jffs2.img to mtd3 and then mounted it .

Basically, no. The image created by mkfs.jffs2 will be _slightly_ smaller to start with, because it's not created incrementally. The difference should be negligible though, and will go away when the flash gets garbage-collected anyway.

--
dwmw2