flash_erase vs flash_eraseall
Mike Frysinger
vapier.adi at gmail.com
Wed Sep 22 22:41:44 EDT 2010
On Wed, Sep 22, 2010 at 22:12, Jon Povey wrote:
> 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.
good point ... i dont think it does. i typically focus more on NOR
(parallel & SPI), so bad blocks arent usually a problem for me.
-mike
More information about the linux-mtd
mailing list