nandcombust
PATCH 1/1 nandcombust
This is a patch that adds a new mtd util program: nandcombust. This program is like flash_eraseall and nandwrite in one program.
Nandcombust erases as it writes and then continues to erase to the end of the partition after the image is written. This allows a filesystem image to be written to flash with a single command (instead of two).
Beside it being a single program, nandcombust has an important advantage over nandwrite: nandcombust can read an image from standard input. On an embedded device with more NAND flash than RAM, this allows filesystem images larger than RAM to be loaded into flash. For example, you can do this with nandcombust:
$ cat bigimage.jffs2 | ssh 10.0.0.2 "nandcombust /dev/mtd3 -"
Or if the image is already on the device with the NAND flash:
$ nandcombust /dev/mtd3 someimage.jffs2
Nandcombust can also be used to just erase an mtd partition (without writing a new image):
$ nandcombust -e /dev/mtd3
This program has been in use at my company for several months. So it is fairly mature and stable. The code is GPL and is fairly small (about the same as nandwrite).
Pete
[MTD] nandcombust
Adds nandcombust tool to mtd utils. This tool performs the functions of both flash_eraseall and nandwrite. It can be used in situations where nandwrite cannot.
[From: Peter Grayson <[email protected]>]
util/Makefile +1 -0
@@ -16,6 +16,7 @@ jffs2dump \ nftldump nftl_format docfdisk \ rfddump rfdformat \ + nandcombust \ sumtool #jffs2reader SYMLINKS =
util/nandcombust.c +444 -0
444 lines not on this page · raw message