Flashing NAND from NAND

Matthias Huber matthias.huber at wollishausen.de
Tue Oct 20 07:48:31 CEST 2009


Werner Almesberger schrieb:
> Matthias Huber wrote:
>   
>> No, erasing seemed not to be necessary.
>> why should i erase it ?
>>     
>
> Because a write to NAND normally only clears bits but never sets them:
>
> # flash_eraseall /dev/mtd4
> # hexdump -C /dev/mtd4
> 00000000  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
> # echo -en '\x0f' | dd bs=1024 count=1 conv=sync >/dev/mtd4
> # hexdump -C /dev/mtd4
> 00000000  0f 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |?...............|
> # echo -en '\xff' | dd bs=1024 count=1 conv=sync >/dev/mtd4
> dd: writing `standard output': Input/output error
> # hexdump -C /dev/mtd4
> 00000000  0f 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |?...............|
>
> Here's a little brain-twister: repeat the example from the beginning,
> but instead of trying to write '\xff', do this:
>
> # echo -en '\x17' | dd bs=1024 count=1 conv=sync >/dev/mtd4
> dd: writing `standard output': Input/output error
> # hexdump -C /dev/mtd4
> 00000000  17 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
>
> Can you tell why it worked ?
>
> - Werner
>   
i can't. it is possible that i flashed my boot with dfu-util and the 
rootfs directly.
for the other partitions i cant tell. maybe because the contents didn't 
change i did'nt see any error.

just for clearness: is the boot - partition different from the rootfs ?
and how are the other partitions ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openmoko.org/pipermail/support/attachments/20091020/cee6ed18/attachment.htm 


More information about the support mailing list