core: Add vbmeta to vendor_boot-debug.img when BOARD_AVB_ENABLE=true
When `BOARD_AVB_ENABLED` is `true`, `vendor_boot.img` will contain an
AVB hash descriptor. This change makes it so that
`vendor_boot-debug.img` will also get an AVB hash descriptor. The
command used to generate the hash descriptor is the same as
`vendor_boot.img` when `BOARD_AVB_VENDOR_BOOT_KEY_PATH` is unset. The
previous logic would only add the hash descriptor when
`BOARD_AVB_VENDOR_BOOT_KEY_PATH` was set.
One side effect of adding the hash footer is that `vendor_boot.img` and
`vendor_boot-debug.img` now both have the same file size. This is
because the VBMeta footer is placed at the end of
`BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE`.
Before this change:
$ ls -alh out/dist/vendor_boot-debug.img
-rw-r--r-- 1 rrangel primarygroup 26M Jun 16 10:10 out/dist/vendor_boot-debug.img
After this change:
$ ls -alh out/dist/vendor_boot-debug.img
-rw-r--r-- 1 rrangel primarygroup 32M Jun 16 11:13 out/dist/vendor_boot-debug.img
This now matches `vendor_boot.img`:
$ ls -alh out/target/product/brya/vendor_boot.img
-rw-r--r-- 1 rrangel primarygroup 32M Jun 16 10:10 out/target/product/brya/vendor_boot.img
This change also makes it possible to add the `vendor_boot-debug.img`
to a `vbmeta.img` using:
$ avbtool make_vbmeta_image \
--include_descriptors_from_image out/target/product/brya/vendor_boot-debug.img \
--algorithm XXX --key XXX ...
Bug: 425369695
Bug: 408264201
Test: m dist && verify vendor_boot-debug.img has vbmeta footer
Flag: EXEMPT debug only change.
Change-Id: I006eeef682fd16f336a218ea0aad51b43e5272c0
Loading
Please register or sign in to comment