diff options
author | Felix Fietkau <nbd@nbd.name> | 2017-01-13 15:58:37 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2017-01-13 16:59:28 +0100 |
commit | 87b668765e1e987aebef8cf0aae657569b631477 (patch) | |
tree | eedb7b7c397e47774b5254b91f8c99d15c6a715c | |
parent | c914fa04a3cb20f3c4134c3a2c4a4caf7160edd2 (diff) | |
download | mtk-20170518-87b668765e1e987aebef8cf0aae657569b631477.zip mtk-20170518-87b668765e1e987aebef8cf0aae657569b631477.tar.gz mtk-20170518-87b668765e1e987aebef8cf0aae657569b631477.tar.bz2 |
image: when using the new image build code, gzip ext4 images by default
This reduces the amount of hacks in the makefile code.
Remove the apm821xx code to do the same - it was broken and left both
compressed and uncompressed images in $(BIN_DIR)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r-- | include/image.mk | 7 | ||||
-rw-r--r-- | target/linux/apm821xx/image/Makefile | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/include/image.mk b/include/image.mk index ab5b816..4bd923f 100644 --- a/include/image.mk +++ b/include/image.mk @@ -445,7 +445,8 @@ define Device/Build/kernel endef define Device/Build/image - $$(_TARGET): $(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2)) + GZ_SUFFIX := $(if $(filter %dtb %gz,$(2)),,$(if $(and $(findstring ext4,$(1)),$(CONFIG_TARGET_IMAGES_GZIP)),.gz)) + $$(_TARGET): $(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2))$$(GZ_SUFFIX) $(eval $(call Device/Export,$(KDIR)/tmp/$(call IMAGE_NAME,$(1),$(2)),$(1))) ROOTFS/$(1)/$(3) := \ $(KDIR)/root.$(1)$$(strip \ @@ -462,6 +463,10 @@ define Device/Build/image $$(call concat_cmd,$(if $(IMAGE/$(2)/$(1)),$(IMAGE/$(2)/$(1)),$(IMAGE/$(2)))) .IGNORE: $(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2)) + + $(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2)).gz: $(KDIR)/tmp/$(call IMAGE_NAME,$(1),$(2)) + gzip -c -9n $$^ > $$@ + $(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2)): $(KDIR)/tmp/$(call IMAGE_NAME,$(1),$(2)) cp $$^ $$@ diff --git a/target/linux/apm821xx/image/Makefile b/target/linux/apm821xx/image/Makefile index 0ee9cdc..0ded83d 100644 --- a/target/linux/apm821xx/image/Makefile +++ b/target/linux/apm821xx/image/Makefile @@ -232,7 +232,6 @@ endef define Build/hdd-img ./mbl_gen_hdd_img.sh $@ $@.boot $(IMAGE_ROOTFS) - $(if $(CONFIG_TARGET_IMAGES_GZIP),gzip -9n -c $@ > $(BIN_DIR)/$(notdir $@).gz) endef define Device/MyBookLiveDefault |