Merge "Makefile: Add the dependency for BUILT_OTATOOLS_PACKAGE."
This commit is contained in:
commit
c6ad99c926
|
@ -1879,6 +1879,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 \
|
||||
|
@ -1942,23 +1943,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)
|
||||
|
|
Loading…
Reference in New Issue