summaryrefslogtreecommitdiff
path: root/futility/updater.c
diff options
context:
space:
mode:
authorPaul Ma <magf@bitland.corp-partner.google.com>2020-01-07 16:30:47 +0800
committerCommit Bot <commit-bot@chromium.org>2020-01-08 23:49:02 +0000
commit236bd46bfb59f0262dcb1771a108ebb5e90df578 (patch)
tree8175131a1d04370314fc2c42569833049ef03a9e /futility/updater.c
parent695c56dc50a59e5c9098c94f41b3d86b8f99baf1 (diff)
downloadvboot-236bd46bfb59f0262dcb1771a108ebb5e90df578.tar.gz
Because of lacking CL:1501614 in octopus factory branch, dopefish root key is written to some phaser360 devices. That will lead to firmware updater not be able to verify RW vblock and AU will fail. This CL will fix that by using root key info and model name to make firmware updater get a proper sig_id so that in-field machines can be updated by AU. BUG=b:146876241, b:133901651, b:146482979 BRANCH=none TEST=using a DUT of phaser360 (without whitelabel_tag = dopefish) which is flashed dopefish rootkey and hwid, using command 'chromeos-firmwareupdate -m autoupdate --wp=1' to flash firmware, RW firmware can be updated and DUT can boot normally. Change-Id: I163c16189c28a996ed08bf2a7b162e6ee3b13be6 Signed-off-by: Paul Ma <magf@bitland.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1981650 Reviewed-by: Hung-Te Lin <hungte@chromium.org> Commit-Queue: Hung-Te Lin <hungte@chromium.org> (cherry picked from commit 5ea8fe68b1d9c498b6f58303afa3e36cf025d280) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1992725 Reviewed-by: Justin TerAvest <teravest@chromium.org> Commit-Queue: Justin TerAvest <teravest@chromium.org> Tested-by: Justin TerAvest <teravest@chromium.org>
Diffstat (limited to 'futility/updater.c')
-rw-r--r--futility/updater.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/futility/updater.c b/futility/updater.c
index 6a7d8ffa..f634c227 100644
--- a/futility/updater.c
+++ b/futility/updater.c
@@ -660,7 +660,7 @@ static int check_compatible_platform(struct updater_config *cfg)
/*
* Returns a valid root key from GBB header, or NULL on failure.
*/
-static const struct vb2_packed_key *get_rootkey(
+const struct vb2_packed_key *get_rootkey(
const struct vb2_gbb_header *gbb)
{
struct vb2_packed_key *key = NULL;
@@ -1352,6 +1352,10 @@ static int updater_apply_white_label(struct updater_config *cfg,
ERROR("Failed to get system current firmware\n");
return 1;
}
+ if (get_config_quirk(QUIRK_OVERRIDE_SIGNATURE_ID, cfg) &&
+ is_write_protection_enabled(cfg))
+ quirk_override_signature_id(
+ cfg, model, &signature_id);
}
return !!model_apply_white_label(
model, cfg->archive, signature_id, tmp_image);