Skip to contentSkip to conversation

mkfs.jffs2

DISCUSSION Stefan Stürke 2 participants 4 messages Aug 13, 2004 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

Hi,

I want to create a jffs2 image which should be loaded to different mtd-flash devices via software download.

My problem is, that I cannot be sure which erasesize the target flash will have. Because two flash types with different sector sizes (64k and 128k) have to be supported.

Is it possible to create a jffs2 image that can run on both flashes, or do I have to create two diffenent images?

My current command for creating the filesystem is:

mkfs.jffs2 -b -e $erasesize -p -r $source -o fs.jffs2

Thanks in advance
Stefan

Signature · 1 line
Stefan Stürke
#1 lore raw
Quoted 6 lines · Stefan Stürke

My problem is, that I cannot be sure which erasesize the target flash will have. Because two flash types with different sector sizes (64k and 128k) have to be supported.

Is it possible to create a jffs2 image that can run on both flashes, or do I have to create two diffenent images?

You can use the smaller erasesize, as long as you don't include cleanmarkers.

Quoted 3 lines

My current command for creating the filesystem is:

mkfs.jffs2 -b -e $erasesize -p -r $source -o fs.jffs2

Use:
-b -e 64KiB -p -n -r $source -o fs.jffs2

Signature · 1 line
dwmw2
#2 lore raw
Quoted 12 lines · David Woodhouse <dwmw2 <at> infradead.org> writes:
Quoted 6 lines · Stefan Stürke

My problem is, that I cannot be sure which erasesize the target flash will have. Because two flash types with different sector sizes (64k and 128k) have to be supported.

Is it possible to create a jffs2 image that can run on both flashes, or do I have to create two diffenent images?

You can use the smaller erasesize, as long as you don't include cleanmarkers.

Quoted 7 lines
Quoted 3 lines

My current command for creating the filesystem is:

mkfs.jffs2 -b -e $erasesize -p -r $source -o fs.jffs2

Use:
-b -e 64KiB -p -n -r $source -o fs.jffs2

Ok, thank you, that looks much better.
When I load this filesystem to the flashdevice with the 128k sectors I get now only one type of error messages:

jffs2_scan_empty(): Empty block at 0x0000fffc ends at 0x00010000 (with 0x1985e002)! Marking dirty

Is it save to ignore these errors?

Thanks again
Stefan

#3 lore raw
Quoted 4 lines · Stefan Stürke

jffs2_scan_empty(): Empty block at 0x0000fffc ends at 0x00010000 (with 0x1985e002)! Marking dirty

Is it save to ignore these errors?

Yes. It's observing that there's padding between 0xfffc and 0x10000. This is done because nodes aren't allowed to cross and eraseblock boundary, and the image was created for 64KiB eraseblocks. It's harmless though.

Signature · 1 line
dwmw2