Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 1/1] fs/common.mk: enable multithreaded xz compression
@ 2019-01-24  8:27 james.hilliard1 at gmail.com
  2019-01-24 15:01 ` Matthew Weber
  2019-08-03 17:31 ` Arnout Vandecappelle
  0 siblings, 2 replies; 5+ messages in thread
From: james.hilliard1 at gmail.com @ 2019-01-24  8:27 UTC (permalink / raw)
  To: buildroot

From: James Hilliard <james.hilliard1@gmail.com>

xz help indicates only 1 thread is used unless we set threads:
-T, --threads=NUM   use at most NUM threads; the default is 1; set to 0
                    to use as many threads as there are processor cores

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>

---
Changes v1 -> v2:
  - use PARALLEL_JOBS to determine how many threads to compress with
  - disable multithreaded compression for reproducible builds
---
 fs/common.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/fs/common.mk b/fs/common.mk
index a560417..76da6d8 100644
--- a/fs/common.mk
+++ b/fs/common.mk
@@ -106,7 +106,11 @@ endif
 ifeq ($$(BR2_TARGET_ROOTFS_$(2)_XZ),y)
 ROOTFS_$(2)_DEPENDENCIES += host-xz
 ROOTFS_$(2)_COMPRESS_EXT = .xz
+ifeq ($(BR2_REPRODUCIBLE),y)
 ROOTFS_$(2)_COMPRESS_CMD = xz -9 -C crc32 -c
+else
+ROOTFS_$(2)_COMPRESS_CMD = xz -T $(PARALLEL_JOBS) -9 -C crc32 -c
+endif
 endif
 
 $$(BINARIES_DIR)/$$(ROOTFS_$(2)_FINAL_IMAGE_NAME): ROOTFS=$(2)
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-08-03 17:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-24  8:27 [Buildroot] [PATCH v2 1/1] fs/common.mk: enable multithreaded xz compression james.hilliard1 at gmail.com
2019-01-24 15:01 ` Matthew Weber
2019-02-04 10:36   ` Matthew Weber
2019-02-04 11:00     ` Thomas Petazzoni
2019-08-03 17:31 ` Arnout Vandecappelle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox