aboutsummaryrefslogtreecommitdiffstats
path: root/include/image-commands.mk
diff options
context:
space:
mode:
Diffstat (limited to 'include/image-commands.mk')
-rw-r--r--include/image-commands.mk10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/image-commands.mk b/include/image-commands.mk
index 169c1919e7..70c09ad90c 100644
--- a/include/image-commands.mk
+++ b/include/image-commands.mk
@@ -168,6 +168,16 @@ define Build/gzip
@mv $@.new $@
endef
+define Build/zip
+ mkdir $@.tmp
+ mv $@ $@.tmp/$(1)
+
+ zip -j -X \
+ $(if $(SOURCE_DATE_EPOCH),--mtime="$(SOURCE_DATE_EPOCH)") \
+ $@ $@.tmp/$(if $(1),$(1),$@)
+ rm -rf $@.tmp
+endef
+
define Build/jffs2
rm -rf $(KDIR_TMP)/$(DEVICE_NAME)/jffs2 && \
mkdir -p $(KDIR_TMP)/$(DEVICE_NAME)/jffs2/$$(dirname $(1)) && \