New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 722304 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Feature



Sign in to add a comment

flashrom: Exclude regions

Project Member Reported by hungte@chromium.org, May 15 2017

Issue description

Currently flashrom support "partial write" using -i SECTION, but not "excluding partition regions" (or preserve).

This should be pretty helpful for developers to manually reflash their device without destroying all device data like VPD sections. For example:

  flashrom -p host -w image.bin -X RO_VPD -X RW_VPD

There may be some problem if FMAP layout has been changed that it's hard to define should we preserve the region for new or old layout, but we can fail on that and use additional scripting to define what to do, for example:

 if ! flashrom -p host -w image.bin -X RO_VPD -X RW_VPD; then
   try_harder_to_clone VPD image.bin
   flashrom -p host image.bin
 fi
 

Comment 1 by hungte@chromium.org, May 15 2017

Owner: martinroth@chromium.org
+martin - do you think this is a good feature to work on?
If we do this we should make sure that the FMAP behavior between -X and -i is consistent. I believe right now flashrom -w -i just always uses the FMAP on the flash chip, ignoring the FMAP in the file to be written if it is different. If we want to change that to check and abort in this case, we should do it for both -X and -i and make sure it doesn't break any existing use cases. 

(Also, a capital -X is kinda weird... maybe just use a capital -I as the negation of -i?)

Comment 3 by hungte@chromium.org, May 15 2017

-x is already used by extract, and I think -I looks too similar to -l on terminals (partner loves taking camera photos to deliver what to do).

Maybe just use long options like --exclude.

> right now flashrom -w -i just always uses the FMAP on the flash chip
 That sounds like a bug. If offsets in FMAP is changed, using FMAP on flash chip will overwrite other regions, isn't it?
 I think a flashrom partial write should
  - Read FMAP and check if it's changed
  - If changed, check if FMAP section will be written to flash chip as well
   - If not, abort
   - If yes, use the FMAP on file (which will be sent to flash chip) 



Cc: wnhuang@chromium.org
Owner: ----
Status: Available (was: Untriaged)
Project Member

Comment 5 by sheriffbot@chromium.org, Aug 20

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment