What does crossystem 'fw_vboot2?1' mean? |
||
Issue descriptionIn 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
,
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?
,
Mar 8 2017
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.
,
Mar 8 2017
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.
,
Mar 8 2017
in fact you'll find such usage in many places, for example platform2/init/chromeos_startup
,
Mar 8 2017
OK I see, thank you. The problem is just that I misunderstood what it is doing. Thank you for explaining it.
,
Mar 8 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by hungte@chromium.org
, Mar 8 2017Owner: sjg@chromium.org