diff options
author | Diogo Ferreira <diogo@underdev.org> | 2015-04-03 12:39:37 +0100 |
---|---|---|
committer | Adnan Begovic <adnan@cyngn.com> | 2015-10-09 17:10:26 -0700 |
commit | 8222d80fa56ad4e1d5894fc2dd16ae7cd3ecdcbf (patch) | |
tree | 2e2f7e0b11584f62b71b1311045b7fdce3e84922 /core/Makefile | |
parent | d03b0a81a281bf9eb078f4956a4b6c00d5517b7a (diff) | |
download | build-8222d80fa56ad4e1d5894fc2dd16ae7cd3ecdcbf.zip build-8222d80fa56ad4e1d5894fc2dd16ae7cd3ecdcbf.tar.gz build-8222d80fa56ad4e1d5894fc2dd16ae7cd3ecdcbf.tar.bz2 |
build: Add the factorypackage target
The build system generates several artifacts, among them update zips,
OTAs and update packages for fastboot.
Shipping devices typically need extra-special packages in order to
fulfill factory automation requirements.
This patches adds a "factorypackage" target that can be customized
by devices by providing a script that converts target files into the
desired format. The script path should be set into
TARGET_RELEASETOOL_FACTORY_FROM_TARGET_SCRIPT.
Change-Id: I993f12766c96274f096c5f6c6da5aaa32394abbc
Diffstat (limited to 'core/Makefile')
-rw-r--r-- | core/Makefile | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/core/Makefile b/core/Makefile index 5e84e9a..91ce060 100644 --- a/core/Makefile +++ b/core/Makefile @@ -1750,6 +1750,35 @@ bacon: otapackage $(hide) $(MD5SUM) $(CM_TARGET_PACKAGE) > $(CM_TARGET_PACKAGE).md5sum @echo -e ${CL_CYN}"Package Complete: $(CM_TARGET_PACKAGE)"${CL_RST} +# ----------------------------------------------------------------- +# The factory package + +name := $(TARGET_PRODUCT)-factory-$(FILE_NAME_TAG) + +INTERNAL_FACTORY_PACKAGE_TARGET := $(PRODUCT_OUT)/$(name).zip + +ifeq ($(TARGET_RELEASETOOLS_EXTENSIONS),) +# default to common dir for device vendor +$(INTERNAL_FACTORY_PACKAGE_TARGET): extensions := $(TARGET_DEVICE_DIR)/../common +else +$(INTERNAL_FACTORY_PACKAGE_TARGET): extensions := $(TARGET_RELEASETOOLS_EXTENSIONS) +endif + +$(INTERNAL_FACTORY_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(DISTTOOLS) + @echo -e ${CL_YLW}"Package:"${CL_RST}" $@" + if [ -z $(TARGET_RELEASETOOL_FACTORY_FROM_TARGET_SCRIPT) ]; then \ + echo "Error: Factory script is not defined by target"; \ + exit 1; \ + fi + MKBOOTIMG=$(BOARD_CUSTOM_BOOTIMG_MK) \ + $(TARGET_RELEASETOOL_FACTORY_FROM_TARGET_SCRIPT) -v \ + -s $(extensions) \ + -p $(HOST_OUT) \ + $(BUILT_TARGET_FILES_PACKAGE) $@ + +.PHONY: factorypackage +factorypackage: $(INTERNAL_FACTORY_PACKAGE_TARGET) + endif # recovery_fstab is defined endif # TARGET_NO_KERNEL != true endif # TARGET_DEVICE != generic* |