futility: updater: correct the rootkey in manifest.json

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>
diff --git a/futility/updater_archive.c b/futility/updater_archive.c
index 70d8bb3..f2475b6 100644
--- a/futility/updater_archive.c
+++ b/futility/updater_archive.c
@@ -1061,16 +1061,16 @@
 		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,