diff --git a/core/tasks/build_custom_images.mk b/core/tasks/build_custom_images.mk index 8ebf89b0e7..c5f2a96416 100644 --- a/core/tasks/build_custom_images.mk +++ b/core/tasks/build_custom_images.mk @@ -54,6 +54,8 @@ custom_image_parameter_variables := \ CUSTOM_IMAGE_SELINUX \ CUSTOM_IMAGE_SUPPORT_VERITY \ CUSTOM_IMAGE_VERITY_BLOCK_DEVICE \ + CUSTOM_IMAGE_AVB_ENABLE \ + CUSTOM_IMAGE_AVB_ADD_HASHTREE_FOOTER_ARGS \ # We don't expect product makefile to inherit/override PRODUCT_CUSTOM_IMAGE_MAKEFILES, # so we don't put it in the _product_var_list. diff --git a/core/tasks/tools/build_custom_image.mk b/core/tasks/tools/build_custom_image.mk index f0db476bcf..f916e86232 100644 --- a/core/tasks/tools/build_custom_image.mk +++ b/core/tasks/tools/build_custom_image.mk @@ -74,6 +74,11 @@ $(my_built_custom_image): PRIVATE_SUPPORT_VERITY := $(CUSTOM_IMAGE_SUPPORT_VERIT $(my_built_custom_image): PRIVATE_VERITY_KEY := $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_VERITY_SIGNING_KEY) $(my_built_custom_image): PRIVATE_VERITY_BLOCK_DEVICE := $(CUSTOM_IMAGE_VERITY_BLOCK_DEVICE) $(my_built_custom_image): PRIVATE_DICT_FILE := $(CUSTOM_IMAGE_DICT_FILE) +$(my_built_custom_image): PRIVATE_AVB_ENABLE := $(CUSTOM_IMAGE_AVB_ENABLE) +$(my_built_custom_image): PRIVATE_AVB_ADD_HASHTREE_FOOTER_ARGS := $(CUSTOM_IMAGE_AVB_ADD_HASHTREE_FOOTER_ARGS) +ifeq (true,$(CUSTOM_IMAGE_AVB_ENABLE)) + $(my_built_custom_image): $(AVBTOOL) +endif $(my_built_custom_image): $(INTERNAL_USERIMAGES_DEPS) $(my_built_modules) $(my_image_copy_files) \ $(CUSTOM_IMAGE_DICT_FILE) @echo "Build image $@" @@ -97,6 +102,11 @@ $(my_built_custom_image): $(INTERNAL_USERIMAGES_DEPS) $(my_built_modules) $(my_i echo "verity_key=$(PRIVATE_VERITY_KEY)" >> $(PRIVATE_INTERMEDIATES)/image_info.txt;\ echo "verity_signer_cmd=$(VERITY_SIGNER)" >> $(PRIVATE_INTERMEDIATES)/image_info.txt;\ echo "verity_block_device=$(PRIVATE_VERITY_BLOCK_DEVICE)" >> $(PRIVATE_INTERMEDIATES)/image_info.txt) + $(if $(PRIVATE_AVB_ENABLE),\ + $(hide) echo "avb_enable=$(PRIVATE_AVB_ENABLE)" >> $(PRIVATE_INTERMEDIATES)/image_info.txt;\ + echo "avb_avbtool=$(AVBTOOL)" >> $(PRIVATE_INTERMEDIATES)/image_info.txt;\ + echo "avb_signing_args=$(INTERNAL_AVB_SIGNING_ARGS)" >> $(PRIVATE_INTERMEDIATES)/image_info.txt;\ + echo "avb_add_hashtree_footer_args=$(PRIVATE_AVB_ADD_HASHTREE_FOOTER_ARGS)" >> $(PRIVATE_INTERMEDIATES)/image_info.txt) $(if $(PRIVATE_DICT_FILE),\ $(hide) echo "# Properties from $(PRIVATE_DICT_FILE)" >> $(PRIVATE_INTERMEDIATES)/image_info.txt;\ cat $(PRIVATE_DICT_FILE) >> $(PRIVATE_INTERMEDIATES)/image_info.txt)