]> www.infradead.org Git - mtd-utils.git/commit
nandwrite: fix the bug of writing a yaffs2 image to NAND
authorStanley.Miao <stanley.miao@windriver.com>
Tue, 18 May 2010 12:23:09 +0000 (20:23 +0800)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Sat, 22 May 2010 05:36:48 +0000 (08:36 +0300)
commitf0d12d2079b8b2ea667073a6bcd603765466dc58
tree0e375f4a4dba2542ebba8719b310ba4a8f74af2f
parent9afc1cd5c0b1e56cdd8192aadb68104aae30ae89
nandwrite: fix the bug of writing a yaffs2 image to NAND

The tool mkyaffs2image doesn't know the oob layout of a NAND flash, so it
puts the yaffs2 tags at the offset 0 of oob area, as a result, the image
generated by mkyaffs2image is different with the image dumped by nanddump.
Now adding a parameter "-r" for nandwrite to differentiate these images.

Write a image generated by mkyaffs2image:
$> nandwrite -a -o /dev/mtd3 yaffs2.bin

Write a image dumped by nanddump:
$> nandwrite -a -r /dev/mtd3 image.bin

Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
nandwrite.c