flashcp failed (bad block)?

Vimal Singh vimal.newwork at gmail.com
Tue Mar 9 00:07:00 EST 2010


On Mon, Mar 8, 2010 at 9:05 PM, Arno Steffen
<arno.steffen at googlemail.com> wrote:
> I used the mtd-utils to flash a partition on my system on a running
> linux. This time I get an error:
>
> flashcp -v /tmp/mtd5 /dev/mtd5
> Erasing blocks: 24/320 (7%)
> While erasing blocks 0x002e0000-0x00300000 on /dev/mtd5: Input/output error
>
> So I tried to erase the partition:
>
> flash_eraseall -j /dev/mtd5
> Erasing 128 Kibyte @ 2c0000 --  6 % complete.
> Skipping bad block at 0x002e0000
> Erasing 128 Kibyte @ 27e0000 -- 99 % complete.
>
> Until now I have been sure that flashcp can handle bad blocks? Am I wrong?
> What can I do?

Yes, you are wrong. 'flashcp' does not handle bad blocks. Ideally you
should use:
'flash_eraseall' and 'nandwrite' mtd-utils to flash a image to NAND.

> flashcp works with same image file on other partition /dev/mtd6 which
> have the same size.

Perhaps partition '/dev/mtd6' did not have any bad block.

-- 
Regards,
Vimal Singh



More information about the linux-mtd mailing list