aboutsummaryrefslogtreecommitdiffstats
path: root/target/imagebuilder/Makefile
diff options
context:
space:
mode:
authorPaul Spooren <mail@aparcar.org>2020-08-13 13:46:43 -1000
committerMatthias Schiffer <mschiffer@universe-factory.net>2020-08-23 18:55:49 +0200
commit8c9a7881729d82afefc74a8c6e552b20b722b011 (patch)
tree007f30edd255131b26d1366df37c59aa5d39ea17 /target/imagebuilder/Makefile
parent1cf842dd136ceb9a1e1a61d4d4caa3b3a46c0c1b (diff)
downloadupstream-8c9a7881729d82afefc74a8c6e552b20b722b011.tar.gz
upstream-8c9a7881729d82afefc74a8c6e552b20b722b011.tar.bz2
upstream-8c9a7881729d82afefc74a8c6e552b20b722b011.zip
build: SDK/IB reproducible and faster compression
Both IB and SDK now use the same logic for packing. This commit add reproducible multithread compression to the SDK and corrects the file mtime for both. Previously all files where just copied over from the build system, generating random mtimes. Signed-off-by: Paul Spooren <mail@aparcar.org>
Diffstat (limited to 'target/imagebuilder/Makefile')
-rw-r--r--target/imagebuilder/Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/target/imagebuilder/Makefile b/target/imagebuilder/Makefile
index b463feb456..ad19ab2b53 100644
--- a/target/imagebuilder/Makefile
+++ b/target/imagebuilder/Makefile
@@ -86,7 +86,10 @@ endif
(cd $(PKG_BUILD_DIR); find staging_dir/host/bin/ $(IB_LDIR)/scripts/dtc/ -type f | \
$(XARGS) $(SCRIPT_DIR)/bundle-libraries.sh $(PKG_BUILD_DIR)/staging_dir/host)
STRIP=sstrip $(SCRIPT_DIR)/rstrip.sh $(PKG_BUILD_DIR)/staging_dir/host/bin/
- $(TAR) -cf - -C $(BUILD_DIR) $(IB_NAME) | xz -T$(if $(filter 1,$(NPROC)),2,0) -zc -7e > $@
+ (cd $(BUILD_DIR); \
+ tar -I '$(STAGING_DIR_HOST)/bin/xz -7e -T$(if $(filter 1,$(NPROC)),2,0)' -cf $@ $(IB_NAME) \
+ --mtime="$(shell date --date=@$(SOURCE_DATE_EPOCH))"; \
+ )
download:
prepare: