diff options
author | Isaac Lee <isaaclee@google.com> | 2021-06-01 15:47:34 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-06-06 06:06:30 +0000 |
commit | 0bffea9ab8c6acc30af0cb613ae4cdd48f865834 (patch) | |
tree | 862deb5b44c27df2502eaf1bf145c3416c7637ad /futility/updater_archive.c | |
parent | dadb53ee4c27c3a4423765e0998c7a175d2b0822 (diff) | |
download | vboot-0bffea9ab8c6acc30af0cb613ae4cdd48f865834.tar.gz |
futility: updater: correct the rootkey in manifest.jsonstabilize-14029.Bstabilize-14026.Bstabilize-14023.B
For customization projects, the bios image should be patched by
model first, then the gbb got from the image could be correct.
Reason:
In the function, patch_image_by_model, it will apply the rootkey,
vblock_a and vblock_b of the customization project to the gbb part
of the image.
This change moves the function "find_gbb" to the position after the
function "patch_image_by_model" is called.
BUG=b:188861251
BRANCH=none
TEST=build
Change-Id: I5d80405a2a3b0ecc45e86ca3322b328479b83702
Signed-off-by: Isaac Lee <isaaclee@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2929924
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Diffstat (limited to 'futility/updater_archive.c')
-rw-r--r-- | futility/updater_archive.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/futility/updater_archive.c b/futility/updater_archive.c index 70d8bb33..f2475b6a 100644 --- a/futility/updater_archive.c +++ b/futility/updater_archive.c @@ -1061,16 +1061,16 @@ static void print_json_image( return; if (load_firmware_image(&image, fpath, archive)) return; - if (is_host) - gbb = find_gbb(&image); - else + if (!is_host) printf(",\n"); printf("%*s\"%s\": { \"versions\": { \"ro\": \"%s\", \"rw\": \"%s\" },", indent, "", name, image.ro_version, image.rw_version_a); indent += 2; - if (is_host && patch_image_by_model(&image, m, archive) != 0) { + if (!is_host) { + /* No extra information to be printed */ + } else if (patch_image_by_model(&image, m, archive) != 0) { ERROR("Failed to patch images by model: %s\n", m->name); - } else if (gbb) { + } else if (NULL != (gbb = find_gbb(&image))) { printf("\n%*s\"keys\": { \"root\": \"%s\", ", indent, "", get_gbb_key_hash(gbb, gbb->rootkey_offset, |