Ticket #104 (new defect)

Opened 3 months ago

Last modified 3 months ago

flashrom: Change flash drivers to never erase data before writing

Reported by: stuge Owned by: somebody
Priority: major Milestone: flashrom v1.0
Component: flashrom Version:
Keywords: erase write Cc:
Dependencies: #103 Patch Status: there is no patch

Description

The user should be responsible for ensuring that the flash chip has been erased where new data should be written.

At the moment, flashrom will erase at least one full page and then rewrite it, when the user asks to only write a few bytes using -l/-i/-s/-e.

Attachments

Change History

Changed 3 months ago by hailfinger

This needs a big fat warning issued to the user if he attempts to write to a non-erased area. Maybe even an abort.

Changed 3 months ago by anonymous

If at all, NOT erasing should be an option. Not the other way round.

a) this would break all scripts out there b) it's just bad design from a user perspective. c) it's technical infatuation rather than looking at the big picture.

I veto any patch that changes the "automatic" behavior per default in advance.

Changed 3 months ago by hailfinger

The problem is that SPI chips do not erase by default, so we have inconsistent behaviour. We need to agree on one behaviour and "fix" the non-conforming drivers.

Changed 3 months ago by stepan

If this should become agreed upon, which I don't hope, I suggest that we at least check the area before writing, if the writing can theoretically succeed at all. ie. if all bytes are 0xff. And print a warning if they are not all ff. Plus print an error if those bits that we try to set to 1 are 0.

Add/Change #104 (flashrom: Change flash drivers to never erase data before writing)

Author



Action
as new
 
Note: See TracTickets for help on using tickets.