summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHung-Te Lin <hungte@chromium.org>2018-12-24 16:23:30 +0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2019-01-10 19:06:51 +0000
commit8cc7413dc80a675b40f54f74407d2ae4bce9a1a3 (patch)
tree7ab8ef45cd4978016155f745ffd59f6d07c665c0
parent195f4bcdf0873d40d7d2c179e96f6ef5d946809b (diff)
downloadvboot-stabilize-11316.76.B.tar.gz
futility: updater: quirks: Support special released SNOW ROstabilize-11316.82.Bstabilize-11316.76.B
A special Snow RO firmware had been released and would break existing platform check: 'Google_Snow_Rev4.2695.128.0'. As a result, we want to bypass platform check in quirk 'daisy_snow_dual_model'. BUG=chromium:917581 TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: I10b0e4c2b8a11faff979b4add368f342a72a6cec Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1390083 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Joel Kitching <kitching@chromium.org> (cherry picked from commit a32c930e8c46424a3bba3c296fd78b3e60f50aeb) Reviewed-on: https://chromium-review.googlesource.com/c/1405389 Reviewed-by: Bernie Thompson <bhthompson@chromium.org> Commit-Queue: Bernie Thompson <bhthompson@chromium.org> Tested-by: Bernie Thompson <bhthompson@chromium.org>
-rw-r--r--futility/updater.c4
-rw-r--r--futility/updater.h1
-rw-r--r--futility/updater_quirks.c2
3 files changed, 6 insertions, 1 deletions
diff --git a/futility/updater.c b/futility/updater.c
index dcd37bf6..0a2e915d 100644
--- a/futility/updater.c
+++ b/futility/updater.c
@@ -1619,7 +1619,7 @@ enum updater_error_codes update_firmware(struct updater_config *cfg)
image_from->file_name, image_from->ro_version,
image_from->rw_version_a, image_from->rw_version_b);
- if (check_compatible_platform(cfg))
+ if (cfg->check_platform && check_compatible_platform(cfg))
return UPDATE_ERR_PLATFORM;
wp_enabled = is_write_protection_enabled(cfg);
@@ -1671,6 +1671,8 @@ struct updater_config *updater_new_config()
cfg->ec_image.programmer = PROG_EC;
cfg->pd_image.programmer = PROG_PD;
+ cfg->check_platform = 1;
+
props = cfg->system_properties;
props[SYS_PROP_MAINFW_ACT].getter = host_get_mainfw_act;
props[SYS_PROP_TPM_FWVER].getter = host_get_tpm_fwver;
diff --git a/futility/updater.h b/futility/updater.h
index 05e8c15d..7db6ec40 100644
--- a/futility/updater.h
+++ b/futility/updater.h
@@ -112,6 +112,7 @@ struct updater_config {
int force_update;
int legacy_update;
int factory_update;
+ int check_platform;
int verbosity;
const char *emulation;
};
diff --git a/futility/updater_quirks.c b/futility/updater_quirks.c
index 6d510726..14409fba 100644
--- a/futility/updater_quirks.c
+++ b/futility/updater_quirks.c
@@ -216,6 +216,8 @@ static int quirk_daisy_snow_dual_model(struct updater_config *cfg)
memmove(b.data, a.data, a.size);
free(cfg->image.rw_version_b);
cfg->image.rw_version_b = strdup(cfg->image.rw_version_a);
+ /* chromium:917581 Some x16 come with weird RO. */
+ cfg->check_platform = 0;
} else if (is_x8) {
memmove(a.data, b.data, b.size);
free(cfg->image.rw_version_a);