Skip to contentSkip to conversation

cat file > /dev/mtd0 works but after position 512

DISCUSSION Indrek Kruusa 2 participants 3 messages Jun 13, 2006 – Jun 14, 2006 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

Hi!

I have Samsung 64 MB NAND behind cs553x flash controller - therefore cs553x_nand driver. cat file > /dev/mtd0 works reportedly (with page aligned file). But after board reboots the flash is empty.

dd ... bs=512 seek=1 of=/dev/mtd0 works and content stays in flash after reboot too (it works I mean :) )

I am debugging my own changes in cs553x_nand driver so it is up to me of course. But can this behavior be explained in other way than nand driver bug? Broken BIOS/board?

best regards,
Indrek

#1 lore raw
Quoted 7 lines · Indrek Kruusa

Hi!

I have Samsung 64 MB NAND behind cs553x flash controller - therefore cs553x_nand driver.
cat file > /dev/mtd0 works reportedly (with page aligned file). But after board reboots the flash is empty.

Quoted 6 lines

dd ... bs=512 seek=1 of=/dev/mtd0 works and content stays in flash after reboot too (it works I mean :) )

I am debugging my own changes in cs553x_nand driver so it is up to me of course. But can this behavior be explained in other way than nand driver bug? Broken BIOS/board?

http://www.linux-mtd.infradead.org/faq/nand.html

tglx

#2 lore raw
Quoted 6 lines · Thomas Gleixner
Quoted 5 lines · Indrek Kruusa

Hi!

I have Samsung 64 MB NAND behind cs553x flash controller - therefore cs553x_nand driver. cat file > /dev/mtd0 works reportedly (with page aligned file). But after board reboots the flash is empty.

Quoted 7 lines
Quoted 3 lines

dd ... bs=512 seek=1 of=/dev/mtd0 works and content stays in flash after reboot too (it works I mean :) )

I am debugging my own changes in cs553x_nand driver so it is up to me of course. But can this behavior be explained in other way than nand driver bug? Broken BIOS/board?

http://www.linux-mtd.infradead.org/faq/nand.html

tglx

Thanks for the pointer - there are definitely still things I am not aware of. Currently it came out though that our BIOS contains support for NAND media with specific format. And if there isn't needed format in place - it creates one immediately at boot :) Without that "feature" it seems to be OK. Annoying thing is that initializing says 'ECC error while reading bad block table'. I am not sure at moment how to handle this fact. But it is possible to flash_eraseall, nandwrite my_jffs2.img, mount and read it.

thanks,
Indrek