From 8a30f72c0c70d5b5eb47fd32a9a62c771aaa5796 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Mon, 28 Apr 2014 16:27:32 -0700 Subject: [PATCH] verity: clean up verity build dependencies Move image dependencies out of PRODUCT_PACKAGES and into direct dependencies for the image building rules. Fix the test for PRODUCT_SUPPORTS_VERITY, it needs to check for the current project as the global is no longer set. Change-Id: I811501834ae5ec658229bd505fcc48275ff578c9 --- core/Makefile | 8 +++----- core/config.mk | 2 ++ target/product/verity.mk | 6 ------ 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/core/Makefile b/core/Makefile index 480c7194ae..d0667e201b 100644 --- a/core/Makefile +++ b/core/Makefile @@ -410,8 +410,6 @@ else INSTALLED_KERNEL_TARGET := endif -VERITY_SIGNER_CMD := $(HOST_OUT_EXECUTABLES)/verity_signer - # ----------------------------------------------------------------- # the ramdisk INTERNAL_RAMDISK_FILES := $(filter $(TARGET_ROOT_OUT)/%, \ @@ -644,8 +642,8 @@ INTERNAL_USERIMAGES_DEPS := $(MKYAFFS2) endif INTERNAL_USERIMAGES_BINARY_PATHS := $(sort $(dir $(INTERNAL_USERIMAGES_DEPS))) -ifeq (true, $(PRODUCT_SUPPORTS_VERITY)) -INTERNAL_USERIMAGES_DEPS += $(HOST_OUT_EXECUTABLES)/verity_signer +ifeq (true,$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SUPPORTS_VERITY)) +INTERNAL_USERIMAGES_DEPS += $(APPEND2SIMG) $(VERITY_SIGNER) endif SELINUX_FC := $(TARGET_ROOT_OUT)/file_contexts @@ -881,7 +879,7 @@ define build-systemimage-target verity=$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SUPPORTS_VERITY) \ verity_block_device=$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_VERITY_PARTITION) \ verity_key=$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_VERITY_SIGNING_KEY) \ - verity_signer_cmd=$(VERITY_SIGNER_CMD)) + verity_signer_cmd=$(VERITY_SIGNER)) $(hide) PATH=$(foreach p,$(INTERNAL_USERIMAGES_BINARY_PATHS),$(p):)$$PATH \ ./build/tools/releasetools/build_image.py \ $(TARGET_OUT) $(systemimage_intermediates)/system_image_info.txt $(1) diff --git a/core/config.mk b/core/config.mk index e11a7a3c0a..b809d942af 100644 --- a/core/config.mk +++ b/core/config.mk @@ -375,6 +375,8 @@ LLVM_RS_CC := $(HOST_OUT_EXECUTABLES)/llvm-rs-cc$(HOST_EXECUTABLE_SUFFIX) BCC_COMPAT := $(HOST_OUT_EXECUTABLES)/bcc_compat$(HOST_EXECUTABLE_SUFFIX) LINT := prebuilts/sdk/tools/lint RMTYPEDEFS := $(HOST_OUT_EXECUTABLES)/rmtypedefs +APPEND2SIMG := $(HOST_OUT_EXECUTABLES)/append2simg +VERITY_SIGNER := $(HOST_OUT_EXECUTABLES)/verity_signer # ACP is always for the build OS, not for the host OS ACP := $(BUILD_OUT_EXECUTABLES)/acp$(BUILD_EXECUTABLE_SUFFIX) diff --git a/target/product/verity.mk b/target/product/verity.mk index 1133e65491..4a1ca5e3ce 100644 --- a/target/product/verity.mk +++ b/target/product/verity.mk @@ -20,10 +20,4 @@ PRODUCT_SUPPORTS_VERITY := true PRODUCT_VERITY_SIGNING_KEY := build/target/product/security/verity_private_dev_key PRODUCT_PACKAGES += \ - generate_verity_key \ - VeritySigner \ - verity_signer \ - build_verity_tree.py \ - build_verity_metadata.py \ - append2simg \ verity_key