diff options
author | Hung-Te Lin <hungte@chromium.org> | 2020-12-04 16:15:00 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-12-09 17:37:53 +0000 |
commit | 21b7225caf55686fd27007c878758cacac7ff55f (patch) | |
tree | b8e72d70705466a6b1491b89a0d7e2d80a05d7e0 /futility/updater.c | |
parent | ebd1261eb5df292ecaf4995c4d80954b6ffb1161 (diff) | |
download | vboot-21b7225caf55686fd27007c878758cacac7ff55f.tar.gz |
futility: update: add new quirk 'no_check_platform'
Some devices may have flashed firmware with different platform name in
their early stage (especially in the first build of leading devices),
so we do want to provide an explicit way (not just --force) to skip
checking platform name.
The change CL:2059621 does not help because the loaded system
firmware looks good.
This is implemented as a quirk so we can enable it using a CBFS quirk
file, making it easier to be deployed by auto update.
BRANCH=None
BUG=None
TEST=make runtests
Change-Id: I888d5848921d31c9b7cba1b96c42d38fda71927e
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2573999
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Diffstat (limited to 'futility/updater.c')
-rw-r--r-- | futility/updater.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/futility/updater.c b/futility/updater.c index 71a498e3..fa008542 100644 --- a/futility/updater.c +++ b/futility/updater.c @@ -1209,8 +1209,13 @@ 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 (cfg->check_platform && check_compatible_platform(cfg)) + try_apply_quirk(QUIRK_NO_CHECK_PLATFORM, cfg); + if (cfg->check_platform && check_compatible_platform(cfg)) { + ERROR("The firmware image is not compatible with your system. " + "If you really want to proceed, please run again with: " + "--quirks=no_check_platform\n"); return UPDATE_ERR_PLATFORM; + } wp_enabled = is_write_protection_enabled(cfg); STATUS("Write protection: %d (%s; HW=%d, SW=%d).\n", wp_enabled, |