Merge "Makefile: Add the dependency for BUILT_OTATOOLS_PACKAGE." am: c6ad99c926 am: f5529878f8 am: c7b91ee05a

am: e6e6557135

Change-Id: I80e06807eb1676b5cc6830a310289d388d710d68
This commit is contained in:
Tao Bao 2017-05-30 23:41:49 +00:00 committed by android-build-merger
commit 6343317767

View file

@ -1945,6 +1945,7 @@ OTATOOLS := $(HOST_OUT_EXECUTABLES)/minigzip \
$(HOST_OUT_JAVA_LIBRARIES)/dumpkey.jar \
$(HOST_OUT_JAVA_LIBRARIES)/signapk.jar \
$(HOST_OUT_JAVA_LIBRARIES)/BootSignature.jar \
$(HOST_OUT_JAVA_LIBRARIES)/VeritySigner.jar \
$(HOST_OUT_EXECUTABLES)/make_ext4fs \
$(HOST_OUT_EXECUTABLES)/mkuserimg.sh \
$(HOST_OUT_EXECUTABLES)/mke2fs \
@ -2008,23 +2009,31 @@ otatools: $(OTATOOLS)
BUILT_OTATOOLS_PACKAGE := $(PRODUCT_OUT)/otatools.zip
$(BUILT_OTATOOLS_PACKAGE): zip_root := $(call intermediates-dir-for,PACKAGING,otatools)/otatools
$(BUILT_OTATOOLS_PACKAGE): $(OTATOOLS) | $(ACP)
OTATOOLS_DEPS := \
system/extras/verity/build_verity_metadata.py \
system/extras/ext4_utils/mke2fs.conf \
$(shell find build/target/product/security -type f -name \*.x509.pem -o -name \*.pk8 -o \
-name verity_key | sort) \
$(shell find device vendor -type f -name \*.pk8 -o -name verifiedboot\* -o \
-name \*.x509.pem -o -name oem\*.prop | sort)
OTATOOLS_RELEASETOOLS := \
$(shell find build/tools/releasetools -name \*.pyc -prune -o -type f | sort)
ifeq (true,$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SUPPORTS_VBOOT))
OTATOOLS_DEPS += \
$(shell find external/vboot_reference/tests/devkeys -type f | sort)
endif
$(BUILT_OTATOOLS_PACKAGE): $(OTATOOLS) $(OTATOOLS_DEPS) $(OTATOOLS_RELEASETOOLS) | $(ACP)
@echo "Package OTA tools: $@"
$(hide) rm -rf $@ $(zip_root)
$(hide) mkdir -p $(dir $@) $(zip_root)/bin $(zip_root)/framework $(zip_root)/releasetools $(zip_root)/system/extras/verity $(zip_root)/system/extras/ext4_utils
$(hide) mkdir -p $(dir $@) $(zip_root)/bin $(zip_root)/framework $(zip_root)/releasetools
$(call copy-files-with-structure,$(OTATOOLS),$(HOST_OUT)/,$(zip_root))
$(hide) $(ACP) $(HOST_OUT_JAVA_LIBRARIES)/VeritySigner.jar $(zip_root)/framework/
$(hide) $(ACP) -p system/extras/verity/build_verity_metadata.py $(zip_root)/system/extras/verity/
$(hide) $(ACP) -p system/extras/ext4_utils/mke2fs.conf $(zip_root)/system/extras/ext4_utils/
$(hide) $(ACP) -r -d -p build/tools/releasetools/* $(zip_root)/releasetools
ifeq (true,$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SUPPORTS_VBOOT))
$(hide) mkdir -p $(zip_root)/external/vboot_reference/tests/devkeys
$(hide) $(ACP) -r -d -p external/vboot_reference/tests/devkeys/* $(zip_root)/external/vboot_reference/tests/devkeys
endif
$(hide) rm -rf $@ $(zip_root)/releasetools/*.pyc
$(hide) (cd $(zip_root) && zip -qryX $(abspath $@) *)
$(hide) zip -qryX $(abspath $@) build/target/product/security/
$(hide) find device vendor -name \*.pk8 -o -name verifiedboot\* -o -name \*.x509.pem -o -name oem\*.prop | xargs zip -qryX $(abspath $@)>/dev/null || true
$(hide) echo $(OTATOOLS_DEPS) | xargs zip -qryX $(abspath $@)>/dev/null || true
.PHONY: otatools-package
otatools-package: $(BUILT_OTATOOLS_PACKAGE)