flash_erase vs flash_eraseall

Jon Povey Jon.Povey at racelogic.co.uk
Wed Sep 22 21:57:31 EDT 2010


linux-mtd-bounces at lists.infradead.org wrote:
> while looking to extend the erase ioctl abi to take a flags argument,
> i needed updated utils to test my work.  reviewing the flash_erase and
> flash_eraseall code bases makes me wonder why there are even two tools
> in the first place.

I was there too recently, I assume it's historical crufty reasons.

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.

More power to you if you want to spruce up some of those utilities, they
seem like they could use some love.

--
Jon Povey
jon.povey at racelogic.co.uk

Racelogic is a limited company registered in England. Registered number 2743719 .
Registered Office Unit 10, Swan Business Centre, Osier Way, Buckingham, Bucks, MK18 1TB .

The information contained in this electronic mail transmission is intended by Racelogic Ltd for the use of the named individual or entity to which it is directed and may contain information that is confidential or privileged. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email so that the sender's address records can be corrected. The views expressed by the sender of this communication do not necessarily represent those of Racelogic Ltd. Please note that Racelogic reserves the right to monitor e-mail communications passing through its network





More information about the linux-mtd mailing list