how can I mkfs.jffs2 on AT45DB321

Robert Parusel rparusel at
Mon Oct 12 08:34:41 EDT 2009


can someone give me a hint how to use a AT45DB321 dataflash on avr32 linux.

I've added

                .modalias = "mtd_dataflash",
                .controller_data = ( void * ) GPIO_PIN_PB ( 2 ),
                .max_speed_hz = 1000000,
                .bus_num = 1,
                .chip_select = 0,

in the board setup code
and while booting the kernel i can see:

mtd_dataflash spi1.0: AT45DB321x (4224 KBytes) pagesize 528 bytes, OTP

The next step was

flash_eraseall -j /dev/mtd3


mkfs.jffs2 -r /tmp/emptyfs -o /tmp/temp.jffs2 -s528 -e528 -p4325376 -b
-v -n

I've copied the file /tmp/temp.jffs2 with flashcp to the device

flashcp /tmp/temp.jffs2 /dev/mtd3

An than, while, mounting the dataflash, i see a lot of

CLEANMARKER node found at 0x00254310 has totlen 0xc != normal 0x0
Empty flash at 0x0025431c ends at 0x00254520
Newly-erased block contained word 0x19852003 at offset 0x0038d900


So it seems that the hardware is ok, but my commands,
to make a jffs filesystem on it, must be wrong.

Can someone help me please?


Kind regards

More information about the linux-mtd mailing list