diff options
author | Hung-Te Lin <hungte@chromium.org> | 2018-11-21 09:01:23 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-11-24 19:21:28 -0800 |
commit | ef9c01981abe91691bdc34f7efbad6bb58360f70 (patch) | |
tree | ef0f525b3342c4ff9a67f04f8e836fe31df4ba30 /futility | |
parent | d21a596fdb606917565512ef99f468be65a53512 (diff) | |
download | vboot-ef9c01981abe91691bdc34f7efbad6bb58360f70.tar.gz |
futility: updater: Add new quirk 'allow_empty_wltag'
There were devices shipped as "only device" (no key set) and then became
one of the "white label" family. This is now no longer valid on newer
devices but we have to support the legacy ones, for example Reks.
BUG=chromium:906962
TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility
BRANCH=None
Change-Id: I437be08726ab2c46229062689bf765ac6837ca5d
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1345610
Reviewed-by: Youcheng Syu <youcheng@chromium.org>
Diffstat (limited to 'futility')
-rw-r--r-- | futility/updater.c | 17 | ||||
-rw-r--r-- | futility/updater.h | 1 | ||||
-rw-r--r-- | futility/updater_quirks.c | 17 |
3 files changed, 29 insertions, 6 deletions
diff --git a/futility/updater.c b/futility/updater.c index 2f7a29cb..1c71c452 100644 --- a/futility/updater.c +++ b/futility/updater.c @@ -1847,6 +1847,11 @@ static int updater_setup_archive( if (!model) return ++errorcnt; + /* Load images now so we can get quirks in WL checks. */ + errorcnt += updater_load_images( + cfg, arg, model->image, model->ec_image, + model->pd_image); + if (model->is_white_label) { /* * It is fine to fail in updater_apply_white_label for factory @@ -1856,17 +1861,17 @@ static int updater_setup_archive( updater_apply_white_label(cfg, (struct model_config *)model, arg->signature_id); if (!model->patches.rootkey) { - if (!is_factory) { + if (is_factory || + is_write_protection_enabled(cfg) || + get_config_quirk(QUIRK_ALLOW_EMPTY_WLTAG, cfg)) { + fprintf(stderr, + "Warning: No VPD for white label.\n"); + } else { ERROR("Need VPD set for white label."); return ++errorcnt; } - fprintf(stderr, "Warning: No VPD for white label.\n"); } } - - errorcnt += updater_load_images( - cfg, arg, model->image, model->ec_image, - model->pd_image); errorcnt += patch_image_by_model(&cfg->image, model, ar); return errorcnt; } diff --git a/futility/updater.h b/futility/updater.h index 5698f9ed..341a9b17 100644 --- a/futility/updater.h +++ b/futility/updater.h @@ -87,6 +87,7 @@ enum quirk_types { QUIRK_UNLOCK_ME_FOR_UPDATE, QUIRK_DAISY_SNOW_DUAL_MODEL, QUIRK_EVE_SMM_STORE, + QUIRK_ALLOW_EMPTY_WLTAG, QUIRK_MAX, }; diff --git a/futility/updater_quirks.c b/futility/updater_quirks.c index 5480d3c6..76b040c8 100644 --- a/futility/updater_quirks.c +++ b/futility/updater_quirks.c @@ -41,6 +41,17 @@ static const struct quirks_record quirks_records[] = { { .match = "Google_Scarlet.", .quirks = "min_platform_version=1" }, { .match = "Google_Snow.", .quirks = "daisy_snow_dual_model" }, + + /* Legacy white label units. */ + { .match = "Google_Enguarde.", .quirks = "allow_empty_wltag" }, + { .match = "Google_Expresso.", .quirks = "allow_empty_wltag" }, + { .match = "Google_Hana.", .quirks = "allow_empty_wltag" }, + { .match = "Google_Jaq.", .quirks = "allow_empty_wltag" }, + { .match = "Google_Jerry.", .quirks = "allow_empty_wltag" }, + { .match = "Google_Mighty.", .quirks = "allow_empty_wltag" }, + { .match = "Google_Reks.", .quirks = "allow_empty_wltag" }, + { .match = "Google_Relm.", .quirks = "allow_empty_wltag" }, + { .match = "Google_Wizpig.", .quirks = "allow_empty_wltag" }, }; /* @@ -329,6 +340,12 @@ void updater_register_quirks(struct updater_config *cfg) quirks->help = "b/70682365; preserve UEFI SMM store without " "dedicated FMAP section."; quirks->apply = quirk_eve_smm_store; + + quirks = &cfg->quirks[QUIRK_ALLOW_EMPTY_WLTAG]; + quirks->name = "allow_empty_wltag"; + quirks->help = "chromium/906962; allow devices without white label " + "tags set to use default keys."; + quirks->apply = NULL; /* Simple config. */ } /* |