* mtd-utils/flash_erase modifications
@ 2006-10-27 12:30 Ricard Wanderlof
2006-10-27 12:39 ` Artem Bityutskiy
0 siblings, 1 reply; 5+ messages in thread
From: Ricard Wanderlof @ 2006-10-27 12:30 UTC (permalink / raw)
To: Linux mtd
Hi,
I have a proposition for some changes to the flash_erase application from
mtd-utils:
1.
Looking at the mtd-utils/flash_erase application (mtd-utils 1.0.1), and
considering its use for nand flashes, there is no bad block management,
i.e. if flash_erase hits a bad block, it exits with an error message.
I would like to see (perhaps governed by an option) that it simply
skips bad blocks.
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.
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
partition, the number of blocks must be known and given to flash_erase. It
would be nice to have a default behavior, or perhaps using an option for
backwards compatibility's sake, to simply erase the whole device.
I don't mind getting to work on this myself, but I would like some
comments before I start implementing something that no one thinks is a
good idea.
/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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: mtd-utils/flash_erase modifications
2006-10-27 12:30 mtd-utils/flash_erase modifications Ricard Wanderlof
@ 2006-10-27 12:39 ` Artem Bityutskiy
2006-10-27 12:56 ` Ricard Wanderlof
0 siblings, 1 reply; 5+ messages in thread
From: Artem Bityutskiy @ 2006-10-27 12:39 UTC (permalink / raw)
To: Ricard Wanderlof; +Cc: Linux mtd
Hello Ricard,
On Fri, 2006-10-27 at 14:30 +0200, Ricard Wanderlof wrote:
> 1.
> Looking at the mtd-utils/flash_erase application (mtd-utils 1.0.1), and
> considering its use for nand flashes, there is no bad block management,
> i.e. if flash_erase hits a bad block, it exits with an error message.
> I would like to see (perhaps governed by an option) that it simply
> skips bad blocks.
Never used this utility, but granted you are saying the truth, you are
obviously right :-))
> 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?
> 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
> partition, the number of blocks must be known and given to flash_erase. It
> would be nice to have a default behavior, or perhaps using an option for
> backwards compatibility's sake, to simply erase the whole device.
There is flash_eraseall utility for this, isn't it? Although it may be
reasonable to have all this functionality in one utility/
--
Best regards,
Artem Bityutskiy (Битюцкий Артём)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: mtd-utils/flash_erase modifications
2006-10-27 12:39 ` Artem Bityutskiy
@ 2006-10-27 12:56 ` Ricard Wanderlof
2006-10-27 13:59 ` Artem Bityutskiy
0 siblings, 1 reply; 5+ messages in thread
From: Ricard Wanderlof @ 2006-10-27 12:56 UTC (permalink / raw)
To: Artem Bityutskiy; +Cc: Linux mtd
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
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: mtd-utils/flash_erase modifications
2006-10-27 12:56 ` Ricard Wanderlof
@ 2006-10-27 13:59 ` Artem Bityutskiy
2006-10-27 14:18 ` Ricard Wanderlof
0 siblings, 1 reply; 5+ messages in thread
From: Artem Bityutskiy @ 2006-10-27 13:59 UTC (permalink / raw)
To: Ricard Wanderlof; +Cc: Linux mtd
On Fri, 2006-10-27 at 14:56 +0200, Ricard Wanderlof wrote:
> > Err, are you talking about flash_erase?
>
> Yes ... ?
I just thought that it works only with one eraseblock.
> I think it would be nice to have all the functionality in the same
> utility. After all, the functionality is really the same.
I personally fully agree with you oat this point. Would be nice to have
Josh's comment as he mostly cares about the user-space utilities.
> 2. modify flash_eraseall to handle partial erases, change name to
> flash_erase (and throw out the old flash_erase).
I would be happier with this.
--
Best regards,
Artem Bityutskiy (Битюцкий Артём)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: mtd-utils/flash_erase modifications
2006-10-27 13:59 ` Artem Bityutskiy
@ 2006-10-27 14:18 ` Ricard Wanderlof
0 siblings, 0 replies; 5+ messages in thread
From: Ricard Wanderlof @ 2006-10-27 14:18 UTC (permalink / raw)
To: Artem Bityutskiy; +Cc: Linux mtd
On Fri, 27 Oct 2006, Artem Bityutskiy wrote:
>>> Err, are you talking about flash_erase?
> I just thought that it works only with one eraseblock.
By default it erases a single block, but you can specify more than one
block in which case it erases them all in sequence. E.g. flash_erase
/dev/mtd1 0 2048 erases a whole 32 MB flash (assuming there are no bad
blocks).
>> 2. modify flash_eraseall to handle partial erases, change name to
>> flash_erase (and throw out the old flash_erase).
> I would be happier with this.
Makes sense.
/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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-10-27 14:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-27 12:30 mtd-utils/flash_erase modifications Ricard Wanderlof
2006-10-27 12:39 ` Artem Bityutskiy
2006-10-27 12:56 ` Ricard Wanderlof
2006-10-27 13:59 ` Artem Bityutskiy
2006-10-27 14:18 ` Ricard Wanderlof
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox