Inject boot patch level into boot-debug.img
When /boot partition is AVB chained, boot patch level will be
included into the AVB metadata appended to boot.img. We should
also do the same for boot-debug.img to pass keymaster v4 VTS
tests, whichs checks per-partition security patch levels are
indicated in AVB properties.
Bug: 136980825
Test: avbtool info_image --image $OUT/boot-debug.img, checks
com.android.build.boot.security_patch is there
Change-Id: I2ea1ebfa6abbbbc95639817c208a90642fc3d068
diff --git a/core/Makefile b/core/Makefile
index dc06051..5c16465 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -2165,7 +2165,8 @@
$(AVBTOOL) add_hash_footer \
--image $@ \
--partition_size $(BOARD_BOOTIMAGE_PARTITION_SIZE) \
- --partition_name boot $(PRIVATE_AVB_DEBUG_BOOT_SIGNING_ARGS), \
+ --partition_name boot $(PRIVATE_AVB_DEBUG_BOOT_SIGNING_ARGS) \
+ $(BOARD_AVB_BOOT_ADD_HASH_FOOTER_ARGS), \
$(call assert-max-image-size,$@,$(BOARD_BOOTIMAGE_PARTITION_SIZE)))
.PHONY: bootimage_debug-nodeps
@@ -2177,7 +2178,8 @@
$(AVBTOOL) add_hash_footer \
--image $(INSTALLED_DEBUG_BOOTIMAGE_TARGET) \
--partition_size $(BOARD_BOOTIMAGE_PARTITION_SIZE) \
- --partition_name boot $(PRIVATE_AVB_DEBUG_BOOT_SIGNING_ARGS), \
+ --partition_name boot $(PRIVATE_AVB_DEBUG_BOOT_SIGNING_ARGS) \
+ $(BOARD_AVB_BOOT_ADD_HASH_FOOTER_ARGS), \
$(call assert-max-image-size,$(INSTALLED_DEBUG_BOOTIMAGE_TARGET),$(BOARD_BOOTIMAGE_PARTITION_SIZE)))
endif # TARGET_NO_KERNEL