write verify
Ricard Wanderlof
ricard.wanderlof at axis.com
Wed Dec 6 03:38:45 EST 2006
On Tue, 5 Dec 2006, Duke wrote:
> How do I verify flash have been written to? Do I read it back in a
> file and then compare it to the original? That's using double the
> memory so I assuming there is another way, perhaps to compare the
> original directly in flash. Is there?
For NAND flash at least, there is an automatic verify-after-write option
which can be enabled in the kernel. Not sure about NOR though. On the
other hand it's on a sector level and you probably want to verify the
whole file after the whole image has been written.
But it shouldn't be too hard to write a small application which opens the
file and the flash and reads a reasonable amount of data at a time,
comparing them with each other. Shouldn't require any large amounts of
memory, and not much time to implement it either.
If the original image file is the same size as the flash partition, you
should be able to use a standard command line tool like diff or cmp,
assuming you are not using NAND flash.
/Ricard
--
Ricard Wolf Wanderlöf ricardw(at)axis.com
Axis Communications AB, Lund, Sweden www.axis.com
Phone +46 46 272 2016 Fax +46 46 13 61 30
More information about the linux-mtd
mailing list