diff options
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. */ } /* |