flash_erase vs flash_eraseall

Mike Frysinger vapier.adi at gmail.com
Wed Sep 22 22:06:31 EDT 2010


On Wed, Sep 22, 2010 at 21:57, Jon Povey wrote:
> I needed more control knobs than mtd-utils supported, I ended up writing
> my own "flashtool" combining flash_erase and flash_write features. I don't
> know if I can publish the source, but it does things like optionally erase
> blocks as it goes along writing, just as many as it needs, option to skip
> or fail on bad blocks, absolute maximum offset limit, UBI image writing
> mode (skip trailing all-FF pages in a block) and a couple of other things.
>
> It can also do software-generated ECC, rearrange the data/OOB and write
> raw (to write layouts not supported by MTD) but that's very device-specific.

usually for upgrade cycles, i let the kernel do the erase+write for me
(/dev/mtdblock#).  but i know some people would rather have a tool to
do it for them.

in the case of the OOB, i did come across a case there too where it
would be useful if could be transparently generated and overlaid on
the fly ...
-mike



More information about the linux-mtd mailing list