author | Daniel Cardenas <DanielCar@google.com> | 2018-10-02 23:38:06 (GMT) |
---|---|---|
committer | Daniel Cardenas <DanielCar@google.com> | 2018-10-03 18:48:38 (GMT) |
commit | d444b9ac06b6a2d62b22acf8e4b151e2c8807049 (patch) | |
tree | 1a5f313f66132954de7d3630a8aa2c28c3514a98 | |
parent | cb4b42553794e7ef9b555c0b765c9ef0aa842c69 (diff) | |
download | common-d444b9ac06b6a2d62b22acf8e4b151e2c8807049.zip common-d444b9ac06b6a2d62b22acf8e4b151e2c8807049.tar.gz common-d444b9ac06b6a2d62b22acf8e4b151e2c8807049.tar.bz2 |
Make some build targets optional
If the environment variable is defined: NO_AMLOGIC_FACTORY_ZIP then
1. skip creating flashall zip
2. skip creating fastboot image zip
3. skip creating OTA package
4. skip creating AML upgrade package used by USB burning tool
Bug: 116865597
Bug: 113183365
Test: Build with and without environment variable set.
Improved build times by several minutes on my computer
Change-Id: Ibf2016c62af4dd59544b9b98686fa31d5700a66f
-rw-r--r-- | factory.mk | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -309,7 +309,10 @@ define aml-secureboot-sign-bin endef #define aml-secureboot-sign-bin endif# ifeq ($(PRODUCT_BUILD_SECURE_BOOT_IMAGE_DIRECTLY),true) +ifeq ($(NO_AMLOGIC_FACTORY_ZIP),) .PHONY:aml_upgrade +# If target is desired occasionally then can be built with command: make aml_upgrade +endif aml_upgrade:$(INSTALLED_AML_UPGRADE_PACKAGE_TARGET) $(INSTALLED_AML_UPGRADE_PACKAGE_TARGET): \ $(addprefix $(PRODUCT_OUT)/,$(BUILT_IMAGES)) \ @@ -401,7 +404,12 @@ endif ifeq ($(TARGET_PRODUCT),atom) echo "board=atom" > $(PRODUCT_OUT)/fastboot/android-info.txt endif +ifeq ($(NO_AMLOGIC_FACTORY_ZIP),) + echo "Creating $(TARGET_PRODUCT)-fastboot-image-$(BUILD_NUMBER).zip" cd $(PRODUCT_OUT)/fastboot; zip -r ../$(TARGET_PRODUCT)-fastboot-image-$(BUILD_NUMBER).zip $(FASTBOOT_IMAGES) +else + echo "Skip creating $(TARGET_PRODUCT)-fastboot-image-$(BUILD_NUMBER).zip" +endif rm -rf $(PRODUCT_OUT)/fastboot_auto mkdir -p $(PRODUCT_OUT)/fastboot_auto cd $(PRODUCT_OUT); cp $(FASTBOOT_IMAGES) fastboot_auto/ @@ -423,7 +431,12 @@ else endif sed -i 's/fastboot update fastboot.zip/fastboot update $(TARGET_PRODUCT)-fastboot-image-$(BUILD_NUMBER).zip/' $(PRODUCT_OUT)/fastboot_auto/flash-all.sh sed -i 's/fastboot update fastboot.zip/fastboot update $(TARGET_PRODUCT)-fastboot-image-$(BUILD_NUMBER).zip/' $(PRODUCT_OUT)/fastboot_auto/flash-all.bat +ifeq ($(NO_AMLOGIC_FACTORY_ZIP),) + echo "Creating $(TARGET_PRODUCT)-fastboot-flashall-$(BUILD_NUMBER).zip" cd $(PRODUCT_OUT)/fastboot_auto; zip -r ../$(TARGET_PRODUCT)-fastboot-flashall-$(BUILD_NUMBER).zip * +else + echo "Skip creating $(TARGET_PRODUCT)-fastboot-flashall-$(BUILD_NUMBER).zip" +endif name := $(TARGET_PRODUCT) @@ -492,7 +505,10 @@ endif $(if $(OEM_OTA_CONFIG), -o $(OEM_OTA_CONFIG)) \ $(BUILT_TARGET_FILES_PACKAGE) $@ +ifeq ($(NO_AMLOGIC_FACTORY_ZIP),) .PHONY: ota_amlogic +# If target is desired occasionally then can be built with command: make ota_amlogic +endif ota_amlogic: $(AMLOGIC_OTA_PACKAGE_TARGET) droidcore: $(INSTALLED_AML_UPGRADE_PACKAGE_TARGET) $(INSTALLED_MANIFEST_XML) $(INSTALLED_AML_FASTBOOT_ZIP) |