summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2017-01-13 16:19:00 +0100
committerFelix Fietkau <nbd@nbd.name>2017-01-13 16:59:28 +0100
commit8af5e5751d230fda28a0921f1e312b5090a5ac97 (patch)
treefc7cee39e50f809f9b1b0d3a408ce5d86b3d3df8
parent6f57e32f9502daf707dc1b04bf12a3a99e60b471 (diff)
downloadmtk-20170518-8af5e5751d230fda28a0921f1e312b5090a5ac97.zip
mtk-20170518-8af5e5751d230fda28a0921f1e312b5090a5ac97.tar.gz
mtk-20170518-8af5e5751d230fda28a0921f1e312b5090a5ac97.tar.bz2
image.mk: add generic function for gzipping images if enabled
Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r--include/image.mk7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/image.mk b/include/image.mk
index 4bd923f..81519cd 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -147,6 +147,13 @@ define Image/BuildKernel/MkFIT
PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $(KDIR)/fit-$(1).its $(KDIR)/fit-$(1)$(7).itb
endef
+ifdef CONFIG_TARGET_IMAGES_GZIP
+ define Image/Gzip
+ rm -f $(1).gz
+ gzip -9n $(1)
+ endef
+endif
+
# $(1) source dts file
# $(2) target dtb file
# $(3) extra CPP flags