[LEDE-DEV] [PATCH] sdk: automatically use all CPU cores for xz

Karl Palsson karlp at etactica.com
Thu Aug 17 06:05:10 PDT 2017


xz has supported multithreaded compression since 5.2 in 2014.  Enable
it's automatic support for this via the "-T 0" flag.

Previously: (xz -7e)
real	3m13.631s

Now: (xz -T 0 -7e)
real	1m23.051s

Signed-off-by: Karl Palsson <karlp at etactica.com>
---
 target/sdk/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/sdk/Makefile b/target/sdk/Makefile
index ae65fd1c8f4a..07616a4d7aa2 100644
--- a/target/sdk/Makefile
+++ b/target/sdk/Makefile
@@ -140,7 +140,7 @@ $(BIN_DIR)/$(SDK_NAME).tar.xz: clean
 	find $(SDK_BUILD_DIR) -name CVS | $(XARGS) rm -rf
 	-make -C $(SDK_BUILD_DIR)/scripts/config clean
 	(cd $(BUILD_DIR); \
-		tar -I 'xz -7e' -cf $@ $(SDK_NAME); \
+		tar -I 'xz -T 0 -7e' -cf $@ $(SDK_NAME); \
 	)
 
 download:
-- 
2.4.11




More information about the Lede-dev mailing list