summaryrefslogtreecommitdiff
path: root/make_helpers
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2018-01-26 11:42:01 +0900
committerMasahiro Yamada <yamada.masahiro@socionext.com>2018-02-02 00:18:50 +0900
commit14db8908bc9be79affa521e601d1b9d9ee1de40b (patch)
treeb8234a15fef114ddb8bd4a4a6a548b2a1104acc1 /make_helpers
parent2da522bb4ec3031ff7401c33614cb347122f4a7d (diff)
Build: add GZIP compression filter
One typical usage of the pre-tool image filter is data compression, and GZIP is one of the most commonly used compression methods. I guess this is generic enough to be put in the common script instead of platform.mk. If you want to use this, you can add something like follows to your platform.mk: BL32_PRE_TOOL_FILTER := GZIP BL33_PRE_TOOL_FILTER := GZIP Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'make_helpers')
-rw-r--r--make_helpers/build_macros.mk13
1 files changed, 13 insertions, 0 deletions
diff --git a/make_helpers/build_macros.mk b/make_helpers/build_macros.mk
index 7ff1e154..0d2cf106 100644
--- a/make_helpers/build_macros.mk
+++ b/make_helpers/build_macros.mk
@@ -171,6 +171,19 @@ check_$(1):
endef
################################################################################
+# Generic image processing filters
+################################################################################
+
+# GZIP
+define GZIP_RULE
+$(1): $(2)
+ @echo " GZIP $$@"
+ $(Q)gzip -n -f -9 $$< --stdout > $$@
+endef
+
+GZIP_SUFFIX := .gz
+
+################################################################################
# Auxiliary macros to build TF images from sources
################################################################################