diff --git a/core/Makefile b/core/Makefile index 12d49158f..bc334959c 100644 --- a/core/Makefile +++ b/core/Makefile @@ -472,7 +472,22 @@ bootimage-nodeps: $(MKEXT2IMG) @echo "make $@: ignoring dependencies" $(hide) $(MKEXT2BOOTIMG) $(INTERNAL_BOOTIMAGE_ARGS) --output $(INSTALLED_BOOTIMAGE_TARGET) -else # TARGET_BOOTIMAGE_USE_EXT2 != true +else ifeq (true,$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SUPPORTS_VERITY)) # TARGET_BOOTIMAGE_USE_EXT2 != true + +$(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES) $(BOOT_SIGNER) + $(call pretty,"Target boot image: $@") + $(hide) $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --output $@ + $(BOOT_SIGNER) /boot $@ $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_VERITY_SIGNING_KEY) $@ + $(hide) $(call assert-max-image-size,$@,$(BOARD_BOOTIMAGE_PARTITION_SIZE)) + +.PHONY: bootimage-nodeps +bootimage-nodeps: $(MKBOOTIMG) $(BOOT_SIGNER) + @echo "make $@: ignoring dependencies" + $(hide) $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --output $(INSTALLED_BOOTIMAGE_TARGET) + $(BOOT_SIGNER) /boot $(INSTALLED_BOOTIMAGE_TARGET) $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_VERITY_SIGNING_KEY) $(INSTALLED_BOOTIMAGE_TARGET) + $(hide) $(call assert-max-image-size,$(INSTALLED_BOOTIMAGE_TARGET),$(BOARD_BOOTIMAGE_PARTITION_SIZE)) + +else # PRODUCT_SUPPORTS_VERITY != true $(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES) $(call pretty,"Target boot image: $@") @@ -1191,7 +1206,8 @@ DISTTOOLS := $(HOST_OUT_EXECUTABLES)/minigzip \ $(HOST_OUT_EXECUTABLES)/syspatch_host \ $(HOST_OUT_EXECUTABLES)/build_verity_tree \ $(HOST_OUT_EXECUTABLES)/verity_signer \ - $(HOST_OUT_EXECUTABLES)/append2simg + $(HOST_OUT_EXECUTABLES)/append2simg \ + $(HOST_OUT_EXECUTABLES)/boot_signer OTATOOLS := $(DISTTOOLS) \ $(HOST_OUT_EXECUTABLES)/aapt diff --git a/core/config.mk b/core/config.mk index c4d088d55..0e612a7ee 100644 --- a/core/config.mk +++ b/core/config.mk @@ -405,6 +405,7 @@ RMTYPEDEFS := $(HOST_OUT_EXECUTABLES)/rmtypedefs APPEND2SIMG := $(HOST_OUT_EXECUTABLES)/append2simg VERITY_SIGNER := $(HOST_OUT_EXECUTABLES)/verity_signer BUILD_VERITY_TREE := $(HOST_OUT_EXECUTABLES)/build_verity_tree +BOOT_SIGNER := $(HOST_OUT_EXECUTABLES)/boot_signer # ACP is always for the build OS, not for the host OS ACP := $(BUILD_OUT_EXECUTABLES)/acp$(BUILD_EXECUTABLE_SUFFIX)