flash_erase vs flash_eraseall

Jon Povey Jon.Povey at racelogic.co.uk
Wed Sep 22 22:12:40 EDT 2010


Mike Frysinger wrote:
> 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.

Oh, I'm not very familiar with mtdblock, didn't think of it. Maybe I
could have saved some effort.
How does it handle bad blocks, I wonder out loud to the list?
I have to fail if I hit a bad block in some situations, writing images
for a tiny bootloader that can't skip bad blocks.

> 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

The MTD side is pretty easy. Figuring out the inverse of the layout
transformation and implementing the ECC algorithm in software, bakes
your noodle.

--
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