sign_official_build: Output keyset patches for shared AP images
Multiple rows in signer_config.csv may share the same AP image, while
requiring different signatures. For example, variants that are 100%
software compatible but have different brand codes (GSC board IDs)
need different RO_GSCVD sections. Previously, the per-model signature
blocks were only output when loem.ini existed. Otherwise, all rows
sharing the AP image signed the same file in place, and the last
signed row silently overwrote the others.
When an AP image is shared by multiple rows, output the per-model
signature blocks (rootkey, vblock_A, vblock_B and gscvd) to the
shellball keyset directory for all those rows, even without loem.ini.
The firmware updater then patches the shared AP image at runtime based
on the model. This works for rows that differ in brand_code and/or
key_id (with loem.ini). VERSION.signer also lists the per-model root
keys in this case.
Rows with an unshared AP image are signed in place as before, so
unified builds without shared AP images produce the same output as
before.
BUG=b:570339228
TEST=Sign Nissa firmware updater (169 rows) without loem.ini; keyset/
contains patches for exactly the rows with shared AP images,
VERSION.signer lists their root keys, unshared AP images and EC
images are identical to before, and for anraggar, anraggar360
and all 8 gothrax variants, applying the patches to the shared
AP image produces the same image as signing that model alone,
and passes futility gscvd validation.
TEST=Sign Nissa with loem.ini; keyset/ and VERSION.signer identical
to before.
BRANCH=none
TAG=agy
CONV=705e5b3f-acf0-4ebd-91be-9a3d57b9198a
Change-Id: Ia3a1c8a1d0b1bef4a28d7b57c4c30aca6a6a6964
Signed-off-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/8521722
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: Yu-Ping Wu <yupingso@chromium.org>
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
1 file changed