From patchwork Thu Jan 24 08:27:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Hilliard X-Patchwork-Id: 1030360 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Lf573BI7"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43lZzN5sMGz9s55 for ; Thu, 24 Jan 2019 19:28:00 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 1F6CF878F1; Thu, 24 Jan 2019 08:27:57 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aO-jHbq9ec4A; Thu, 24 Jan 2019 08:27:50 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 33D4082115; Thu, 24 Jan 2019 08:27:50 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 83EA71BF3EA for ; Thu, 24 Jan 2019 08:27:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 7F514221B7 for ; Thu, 24 Jan 2019 08:27:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OVkU3E37tkOl for ; Thu, 24 Jan 2019 08:27:44 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) by silver.osuosl.org (Postfix) with ESMTPS id 17254220D6 for ; Thu, 24 Jan 2019 08:27:44 +0000 (UTC) Received: by mail-io1-f65.google.com with SMTP id s8so3956588iob.13 for ; Thu, 24 Jan 2019 00:27:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=RW0e4RtEE4bKE9E5HnuSeVo3iTdTO/GIjIto0w0g/+M=; b=Lf573BI7+9jBFdcBxgKLlMY/nmHjVm0R70n8rykJLY+i4ZLQayraPVWp4iylfuBPrh 3nAvk0Opxv2DNESwhTVahP/qsERwVdMMwIlTA/rBSupOLSJbv12F6zyHnW/f98liLzUR lwhwn5qMw/IcypT2iI067aKtYtWFYzndHEacyV+cT61kNXwUvLAQukyzvMGEN/aZOcdU TLo8TxVC/NulcrVSWNicyBn6qqS5PwptPcXI1pymde5T/YlOirwrdINs9vjjnIEXhrmx wO9qctSM9GHkk/kHNlsEO9AUKkuzKhy+PaLC1NgBvlivqqKCSH+OIeDm21wtLpdTC3Ek XHnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=RW0e4RtEE4bKE9E5HnuSeVo3iTdTO/GIjIto0w0g/+M=; b=d5oMGtYm52EcXEHmE7H1p+GB8TXdmGPvdj0zc2dwg5q6MtWuYbaAtxhQJTb6yQ2/jR AJE6FeDGYURnt+VZtvPQ6W7cvlEKTUbZQn185xi3i+WjqYeBOzuOyy3YxOT2uTls6q66 HXRPeI0x/sEtT8m6emAGPdHm5rrG5/agFEGFL+qAF+TgVJdswFVetzzqydzVh1rddKL/ aLYsZ5NA+qipOYEaQsVF4idYjcn8UOXiWQCfQqnbnMcJGjDgWo9UkgZoIEJV+pVndfqj Fd3dzMDrbSMR+pv2r14kaYaGaubkgWjT/CqEZizMCgQMl0oYHMDqY9onFDtUCxhe8WWt Jdyw== X-Gm-Message-State: AJcUukdEy+T/wE6U7aYmKt5yB31woK2YAomobi9d1d+rMgleZGeCvdKe z77QZcx81PYNpyMQbwhiyP7VqBAu X-Google-Smtp-Source: AHgI3IbpQOLNhI6sk6h7GDgPaa7Y3f6dYdmX1662o/LjZ1WkwLB0RBkzFWOTaUeKtUp98d6cy9k01g== X-Received: by 2002:a5d:8889:: with SMTP id d9mr3549610ioo.68.1548318462937; Thu, 24 Jan 2019 00:27:42 -0800 (PST) Received: from dragon.Home (71-218-4-112.hlrn.qwest.net. [71.218.4.112]) by smtp.gmail.com with ESMTPSA id u9sm8226497iol.77.2019.01.24.00.27.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 24 Jan 2019 00:27:42 -0800 (PST) From: james.hilliard1@gmail.com To: buildroot@buildroot.org Date: Thu, 24 Jan 2019 16:27:33 +0800 Message-Id: <1548318453-25435-1-git-send-email-james.hilliard1@gmail.com> X-Mailer: git-send-email 2.7.4 Subject: [Buildroot] [PATCH v2 1/1] fs/common.mk: enable multithreaded xz compression X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: James Hilliard MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: James Hilliard 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 Reviewed-by: Matthew Weber --- 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)