New issue
Advanced search Search tips

Issue 740294 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 763257
Owner:
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug


Show other hotlists

Hotlists containing this issue:
Hotlist-1


Sign in to add a comment

chromeos-firmwareupdate --dry_run complains cryptically

Project Member Reported by briannorris@chromium.org, Jul 8 2017

Issue description

On Kevin, for instance, I see this:

# chromeos-firmwareupdate --dry_run --mode recovery
Starting Google_Kevin firmware updater v4 (recovery)...
 - Updater package: [RO:Google_Kevin.8785.94.7 RW:Google_Kevin.8785.178.0 / EC:kevin_v1.10.184-459421c]
 - Current system:  [RO:Google_Kevin.8785.211.2017_06_26_1109 , ACT:Google_Kevin.8785.217.2017_07_06_1352 / EC:kevin_v1.10.217-2451496]
 - Write protection: Hardware: off, Software: Main=off EC=off
recovery: update RO+RW
ERROR: cros_get_file_size: invalid file: _vpd_temp.bin
ERROR: Invalid current main firmware. Abort.
ERROR: Execution failed: ./updater4.sh (error code = 1)


Whereas if I run without --dry_run, everything works fine, and no errors like the above are thrown. I've seen similar results on other boards.

That doesn't seem like a reasonable behavior for a "dry" run.
 

Comment 1 Deleted

The dry_run was designed to "do most of things and don't really read/write firmware (flashrom)". Unfortunately we've added too many customization in history (including per-board custom scripts) so I won't be surprised if it's broken. Also we didn't find dry_run really helpful...

Feel free to fix it, but it won't be in my priority list :)
The main thing I've found it helpful for is for examining the current and packaged firmware versions. I'd be happy if it just quit after that (what can we expect it do after that anyway?).

If you're fine with that, that'd be an easy patch...

Comment 4 by sjg@google.com, Jul 8 2017

If there is behaviour we care about, please add a test for it too :-)
>  for examining the current and packaged firmware versions

-V tells you packaged versions.

And if you want to know current version, I think Duncan had a way of

 chromeos-firmwareupdate --mode=autoupdate --noupdate_main

Although I don't know if this still works :)
just checked that I think in current version at least you can do

  chromeos-firmwareupdate --mode=startup

which will give you the normal reports and then stop silently on most modern systems.

Comment 7 by sjg@chromium.org, Jul 10 2017

Owner: sjg@chromium.org
> -V tells you packaged versions.

Somewhat useful, but not quite the whole picture.

> chromeos-firmwareupdate --mode=startup

OK, that one's pretty good for me. Should it be noted in the README?

https://chromium.googlesource.com/chromiumos/platform/firmware/+/master/README.md

If no one has another good use case, I'd be just as happy to resolve this bug by removing --dry_run.

Comment 9 by hungte@chromium.org, Jul 10 2017

I'm ok to have --dry_run removed.

Not sure if --mode=startup should be published in README since it's simply happen to be what you want "on most devices". For example, for devices with updater 3, that may trigger EC update.

And I don't think firmware updater should provide a way to "report current firmware" - since the updater may have too many steps you should not execute when just trying to find out current fw version - that may be done by other scripts, for example the machine-info.

Comment 10 by sjg@chromium.org, Sep 8 2017

Mergedinto: 763257
Status: Duplicate (was: Untriaged)
See

Sign in to add a comment