From 195f4bcdf0873d40d7d2c179e96f6ef5d946809b Mon Sep 17 00:00:00 2001 From: Hung-Te Lin Date: Fri, 30 Nov 2018 23:29:27 +0800 Subject: futility: updater: Skip applying white label for local build For developers running a local build on white label models, currently the chromeos-firmwareupdate will always fail if VPD `whitelabel_tag` is set because the `keyset/` folder does not exist (which was created by signer bot). Developers in this case usually don't really care about which key to use and will be happy with the default (DEV signed) keys, also the key compatibility will be still checked later, so we can skip the white label patching if no keyset folder, which would allow developers getting same experience on WL and non-WL devices. BUG=b:120268135 TEST=TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: I3992301ff4c406096e11e1ae8129f2f68b2319b5 Signed-off-by: Hung-Te Lin Reviewed-on: https://chromium-review.googlesource.com/1356688 Reviewed-by: C Shapiro (cherry picked from commit 73d3c0e3d2d170e9bd34dacdbbdaa5d52860dea2) Reviewed-on: https://chromium-review.googlesource.com/c/1358531 Commit-Queue: YH Lin Tested-by: YH Lin --- futility/updater.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/futility/updater.c b/futility/updater.c index 2908d994..dcd37bf6 100644 --- a/futility/updater.c +++ b/futility/updater.c @@ -1850,7 +1850,14 @@ static int updater_setup_archive( cfg, arg, model->image, model->ec_image, model->pd_image); - if (model->is_white_label) { + if (model->is_white_label && !manifest->has_keyset) { + /* + * Developers running unsigned updaters (usually local build) + * won't be able match any white label tags. + */ + WARN("No keysets found - this is probably a local build of " + "unsigned firmware updater. Skip applying white label."); + } else if (model->is_white_label) { /* * It is fine to fail in updater_apply_white_label for factory * mode so we are not checking the return value; instead we -- cgit v1.2.1