Problems writing to JFFS2 flash

ffileppo ffileppo at
Fri Nov 7 08:26:18 EST 2008

Hi guys,

I'm having some problems with JFFS2 on my arm embedded system.
The system has two Intel P30 Flash banks (2*32MB).

I'm running linux kernel 2.6.24, here is the definition of mtd partition that I'm using:

static struct mtd_partition mainstoneflash0_partitions[] = {
		.name =		"U-Boot",
		.size =		0x00080000,
		.offset =	0,
		.mask_flags =	MTD_WRITEABLE  /* force read-only */
		.name =		"Linux kernel",
		.size =		0x00200000,
		.offset =	0x00080000,
		.name =		"JFFS2 filesystem",
		.size =		MTDPART_SIZ_FULL,
		.offset =	0x00280000


The problem is that after writing some data to flash, I start getting lots of these errors:

Write of 200 bytes at 0x03d68084 failed. returned -30, retlen 0
Not marking the space at 0x03d68084 as dirty because the flash driver returned retlen zero

and the flash get screwed up.

I use the following commands to erase and write to flash:

flash_eraseall -j /dev/mtd2
flashcp fs-jffs2 /dev/mtd2

And the command used to create the jffs2 filesystem from a ramdisk:

mkfs.jffs2 -d /mnt/ -e 0x00020000 -o fs-jffs2

(I've checked and the erase block size seems to be correct).

Anyone knows what could be the problem here?
I'll post more details if needed.

Thank you very much,


More information about the linux-mtd mailing list