mt7620: image.mk: make elecom-header reproducible
authorAlexander Couzens <lynxis@fe80.eu>
Fri, 3 Nov 2017 01:45:45 +0000 (02:45 +0100)
committerAlexander Couzens <lynxis@fe80.eu>
Sun, 5 Nov 2017 23:09:18 +0000 (00:09 +0100)
elecom-header adds a timestamp dependency. Replace
the timestamps with SOURCE_DATE_EPOCH [0] variable.

[0] https://reproducible-builds.org/specs/source-date-epoch/

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
target/linux/ramips/image/mt7620.mk

index 2f3f59e4c69f67ea811ea032ba978ab5f600fb7a..796cc619a3a673be6f8b7eb6ab6726287dc13368 100644 (file)
@@ -10,7 +10,9 @@ define Build/elecom-header
                mkhash md5 $(KDIR)/v_0.0.0.bin && \
                echo 458 \
        ) | mkhash md5 > $(KDIR)/v_0.0.0.md5
-       $(STAGING_DIR_HOST)/bin/tar -cf $@ -C $(KDIR) v_0.0.0.bin v_0.0.0.md5
+       $(STAGING_DIR_HOST)/bin/tar -c \
+               $(if $(SOURCE_DATE_EPOCH),--mtime=@$(SOURCE_DATE_EPOCH)) \
+               -f $@ -C $(KDIR) v_0.0.0.bin v_0.0.0.md5
 endef
 
 define Build/zyimage