mtd-utils/flash_erase modifications

Ricard Wanderlof ricard.wanderlof at axis.com
Fri Oct 27 08:56:15 EDT 2006


On Fri, 27 Oct 2006, Artem Bityutskiy wrote:

>> 2.
>> Furthermore, it would be nice to be able to disable the output of the
>> program. As it stands, it outputs a line for each block/sector it erases.
>> I would suggest a --verbose or -v option in order to enable this output.
>
> Err, are you talking about flash_erase?

Yes ... ?

>> 3.
>> And finally, by default, the program only erases the first block, unless
>> some options are given. If one wants to erase a whole mtd device or
>> ...
> There is flash_eraseall utility for this, isn't it? Although it may be
> reasonable to have all this functionality in one utility/

I'll have to admit, I totally forgot about flash_eraseall, because in my 
initial application, I needed to erase only parts of the flash, and when 
the need for badblock managament turned up, I'd forgotten about 
flash_eraseall, so I have been using various patched variants of 
flash_erase.

You are right of course, flash_eraseall erases a whole flash, and looking 
more closely, also has badblock management. Nice.

It doesn't seem to be able to handle erasure of only part of a partition 
though (naturally, given its name).

I think it would be nice to have all the functionality in the same 
utility. After all, the functionality is really the same.

What would be best here:
1. flash_eraseall has the option to erase only parts of a partition ?
    - illogical, given its name
2. modify flash_eraseall to handle partial erases, change name to
    flash_erase (and throw out the old flash_erase).
3. retain both utilities, but basically with same functionality, except
    for the ability for partial erases.

I could understand that some folks would like to keep the old flash_erase 
simply because they are used to the syntax ... ? Or perhaps hardly anyone 
uses it?

/Ricard
--
Ricard Wolf Wanderlöf                           ricardw(at)axis.com
Axis Communications AB, Lund, Sweden            www.axis.com
Phone +46 46 272 2016                           Fax +46 46 13 61 30




More information about the linux-mtd mailing list