Skip to contentSkip to conversation

how can I mkfs.jffs2 on AT45DB321

DISCUSSION Robert Parusel 1 participant 1 message Oct 12, 2009 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

Hi,

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

I've added
*Code:*

        {
                .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:
*Code:*

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

The next step was
*Code:*

flash_eraseall -j /dev/mtd3

than
*Code:*

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 *Code:*

flashcp /tmp/temp.jffs2 /dev/mtd3

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

.
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

lines.

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
robert