[PATCH] nandcombust

Peter Grayson pgrayson at realmsys.com
Fri Sep 23 20:52:45 EDT 2005


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mtd-nandcombust.patch
Type: text/x-patch
Size: 13609 bytes
Desc: not available
Url : http://lists.infradead.org/pipermail/linux-mtd/attachments/20050923/d9dfb245/attachment.bin 


More information about the linux-mtd mailing list