forked from openkylin/platform_build
am 4acabe0f: resolved conflicts for merge of f5b9830b
to stage-aosp-master
* commit '4acabe0fd8778aad079ed4b3a9bbe011db12ece3': Better way to package up the otatools-package.
This commit is contained in:
commit
133415d551
|
@ -1251,26 +1251,30 @@ endif
|
||||||
# host tools needed to build dist and OTA packages
|
# host tools needed to build dist and OTA packages
|
||||||
|
|
||||||
DISTTOOLS := $(HOST_OUT_EXECUTABLES)/minigzip \
|
DISTTOOLS := $(HOST_OUT_EXECUTABLES)/minigzip \
|
||||||
$(HOST_OUT_EXECUTABLES)/mkbootfs \
|
$(HOST_OUT_EXECUTABLES)/mkbootfs \
|
||||||
$(HOST_OUT_EXECUTABLES)/mkbootimg \
|
$(HOST_OUT_EXECUTABLES)/mkbootimg \
|
||||||
$(HOST_OUT_EXECUTABLES)/fs_config \
|
$(HOST_OUT_EXECUTABLES)/fs_config \
|
||||||
$(HOST_OUT_EXECUTABLES)/zipalign \
|
$(HOST_OUT_EXECUTABLES)/zipalign \
|
||||||
$(HOST_OUT_EXECUTABLES)/bsdiff \
|
$(HOST_OUT_EXECUTABLES)/bsdiff \
|
||||||
$(HOST_OUT_EXECUTABLES)/imgdiff \
|
$(HOST_OUT_EXECUTABLES)/imgdiff \
|
||||||
$(HOST_OUT_JAVA_LIBRARIES)/dumpkey.jar \
|
$(HOST_OUT_JAVA_LIBRARIES)/dumpkey.jar \
|
||||||
$(HOST_OUT_JAVA_LIBRARIES)/signapk.jar \
|
$(HOST_OUT_JAVA_LIBRARIES)/signapk.jar \
|
||||||
$(HOST_OUT_JAVA_LIBRARIES)/BootSignature.jar \
|
$(HOST_OUT_JAVA_LIBRARIES)/BootSignature.jar \
|
||||||
$(HOST_OUT_EXECUTABLES)/mkuserimg.sh \
|
$(HOST_OUT_EXECUTABLES)/mkuserimg.sh \
|
||||||
$(HOST_OUT_EXECUTABLES)/make_ext4fs \
|
$(HOST_OUT_EXECUTABLES)/make_ext4fs \
|
||||||
$(HOST_OUT_EXECUTABLES)/simg2img \
|
$(HOST_OUT_EXECUTABLES)/simg2img \
|
||||||
$(HOST_OUT_EXECUTABLES)/e2fsck \
|
$(HOST_OUT_EXECUTABLES)/e2fsck \
|
||||||
$(HOST_OUT_EXECUTABLES)/build_verity_tree \
|
$(HOST_OUT_EXECUTABLES)/build_verity_tree \
|
||||||
$(HOST_OUT_EXECUTABLES)/verity_signer \
|
$(HOST_OUT_EXECUTABLES)/verity_signer \
|
||||||
$(HOST_OUT_EXECUTABLES)/append2simg \
|
$(HOST_OUT_EXECUTABLES)/append2simg \
|
||||||
$(HOST_OUT_EXECUTABLES)/boot_signer
|
$(HOST_OUT_EXECUTABLES)/boot_signer
|
||||||
|
|
||||||
|
# Shared libraries.
|
||||||
|
DISTTOOLS += \
|
||||||
|
$(HOST_LIBRARY_PATH)/libc++$(HOST_SHLIB_SUFFIX)
|
||||||
|
|
||||||
OTATOOLS := $(DISTTOOLS) \
|
OTATOOLS := $(DISTTOOLS) \
|
||||||
$(HOST_OUT_EXECUTABLES)/aapt
|
$(HOST_OUT_EXECUTABLES)/aapt
|
||||||
|
|
||||||
.PHONY: otatools
|
.PHONY: otatools
|
||||||
otatools: $(OTATOOLS)
|
otatools: $(OTATOOLS)
|
||||||
|
@ -1281,16 +1285,14 @@ $(BUILT_OTATOOLS_PACKAGE): \
|
||||||
$(BUILT_OTATOOLS_PACKAGE): \
|
$(BUILT_OTATOOLS_PACKAGE): \
|
||||||
zip_root := $(intermediate)/otatools
|
zip_root := $(intermediate)/otatools
|
||||||
|
|
||||||
$(BUILT_OTATOOLS_PACKAGE): \
|
$(BUILT_OTATOOLS_PACKAGE): $(OTATOOLS) | $(ACP)
|
||||||
$(OTATOOLS)
|
|
||||||
@echo "Package OTA tools: $@"
|
@echo "Package OTA tools: $@"
|
||||||
$(hide) rm -rf $@ $(zip_root)
|
$(hide) rm -rf $@ $(zip_root)
|
||||||
$(hide) mkdir -p $(dir $@) $(zip_root)/bin $(zip_root)/framework $(zip_root)/releasetools
|
$(hide) mkdir -p $(dir $@) $(zip_root)/bin $(zip_root)/framework $(zip_root)/releasetools
|
||||||
$(hide) $(ACP) -p $(OTATOOLS) $(zip_root)/bin
|
$(call copy-files-with-structure,$(OTATOOLS),$(HOST_OUT)/,$(zip_root))
|
||||||
$(hide) mv $(zip_root)/bin/*.jar $(zip_root)/framework/
|
|
||||||
$(hide) $(ACP) -r -d -p build/tools/releasetools/* $(zip_root)/releasetools
|
$(hide) $(ACP) -r -d -p build/tools/releasetools/* $(zip_root)/releasetools
|
||||||
$(hide) rm -rf $@ $(zip_root)/releasetools/*.pyc
|
$(hide) rm -rf $@ $(zip_root)/releasetools/*.pyc
|
||||||
$(hide) (cd $(zip_root) && zip -qry $(abspath $@) bin framework releasetools)
|
$(hide) (cd $(zip_root) && zip -qry $(abspath $@) *)
|
||||||
$(hide) zip -qry $(abspath $@) build/target/product/security/
|
$(hide) zip -qry $(abspath $@) build/target/product/security/
|
||||||
$(hide) find device vendor -name \*.pk8 -o -name \*.x509.pem -o -name oem.prop | xargs zip -qry $(abspath $@)>/dev/null || true
|
$(hide) find device vendor -name \*.pk8 -o -name \*.x509.pem -o -name oem.prop | xargs zip -qry $(abspath $@)>/dev/null || true
|
||||||
|
|
||||||
|
|
|
@ -2080,6 +2080,17 @@ define transform-prebuilt-to-target-strip-comments
|
||||||
$(copy-file-to-target-strip-comments)
|
$(copy-file-to-target-strip-comments)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
# Copy a list of files/directories to target location, with sub dir structure preserved.
|
||||||
|
# For example $(HOST_OUT_EXECUTABLES)/aapt -> $(staging)/bin/aapt .
|
||||||
|
# $(1): the source list of files/directories.
|
||||||
|
# $(2): the path prefix to strip. In the above example it would be $(HOST_OUT).
|
||||||
|
# $(3): the target location.
|
||||||
|
define copy-files-with-structure
|
||||||
|
$(foreach t,$(1),\
|
||||||
|
$(eval s := $(patsubst $(2)%,%,$(t)))\
|
||||||
|
$(hide) mkdir -p $(dir $(3)/$(s)); cp -Rf $(t) $(3)/$(s)$(newline))
|
||||||
|
endef
|
||||||
|
|
||||||
###########################################################
|
###########################################################
|
||||||
## On some platforms (MacOS), after copying a static
|
## On some platforms (MacOS), after copying a static
|
||||||
## library, ranlib must be run to update an internal
|
## library, ranlib must be run to update an internal
|
||||||
|
|
Loading…
Reference in New Issue