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

Issue 699554 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

What does crossystem 'fw_vboot2?1' mean?

Project Member Reported by sjg@chromium.org, Mar 8 2017

Issue description

In updater4.sh [1] I see this line:

  crossystem 'fw_vboot2?1'

It seems to return 0 on reef, even though 'crossystem fw_vboot' returns 1. Is this intended? I thought I saw some handling for this case but might have imagined it as I cannot find it now.


[1] https://cs.corp.google.com/chromeos_public/src/platform/firmware/pack_dist/updater4.sh?rcl=c77296df3eb12f9835f05cd605e0d12312c75653&l=320

 
Cc: hungte@chromium.org rspangler@chromium.org
Owner: sjg@chromium.org
According to Randall (https://bugs.chromium.org/p/chromium/issues/detail?id=391827), vboot2 platforms should set fw_vboot2 to 1.

"It seems to return 0 on reef" => do you mean the command returns exit code zero (success), or "crossystem fw_vboot2" prints 1?


Comment 2 by sjg@chromium.org, Mar 8 2017

See below:

localhost tmp # crossystem fw_vboot2  
1localhost tmp # crossystem 'fw_vboot2?1'
localhost tmp # echo $?
0
localhost tmp # 


But really I'm wondering why we appear to pass 'fw_vboot2?1' to crossystem?
So it looks same as expected.

> why we appear to pass 'fw_vboot2?1' to crossystem?
Sorry I don't understand what do you mean?

Originally we plan to support vboot2 by updater5, but (1) turns out there was not so much difference (2) many projects using vboot1 transit to vboot2 silently at that time, so in the end we added vboot2 support to updater4, and that's why it needs to check fw_vboot2 value to decide what to do.
Or do you mean the syntax of crossystem?

  "value_name?expected_value"

is a way to tell crossystem "check if value_name is expected_value", an easier way to do shell if without substitution.
in fact you'll find such usage in many places, for example platform2/init/chromeos_startup

Comment 6 by sjg@chromium.org, Mar 8 2017

OK I see, thank you. The problem is just that I misunderstood what it is doing. Thank you for explaining it.

Comment 7 by sjg@chromium.org, Mar 8 2017

Status: Fixed (was: Untriaged)

Sign in to add a comment