From: Simon Glass <sjg@chromium.org>
To: linux-arm-kernel@lists.infradead.org
Cc: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
"J . Neuschäfer" <j.ne@posteo.net>,
"Masahiro Yamada" <masahiroy@kernel.org>,
"Ahmad Fatoum" <a.fatoum@pengutronix.de>,
"Nicolas Schier" <nicolas@fjasle.eu>,
"Tom Rini" <trini@konsulko.com>,
"Chen-Yu Tsai" <wenst@chromium.org>,
"Simon Glass" <sjg@chromium.org>,
"Nicolas Schier" <nsc@kernel.org>,
"David Sterba" <dsterba@suse.com>,
"Nick Terrell" <terrelln@fb.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH v9 5/6] scripts/make_fit: Support a few more parallel compressors
Date: Tue, 6 Jan 2026 09:27:35 -0700 [thread overview]
Message-ID: <20260106162738.2605574-6-sjg@chromium.org> (raw)
In-Reply-To: <20260106162738.2605574-1-sjg@chromium.org>
Add support for pbzip2, xz and plzip which can compress in parallel.
This speeds up the ramdisk compression.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Nicolas Schier <nsc@kernel.org>
---
(no changes since v7)
Changes in v7:
- Mention xz as well, in the commit message
scripts/make_fit.py | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/scripts/make_fit.py b/scripts/make_fit.py
index 7ddaf3c0d783..defb87f223d7 100755
--- a/scripts/make_fit.py
+++ b/scripts/make_fit.py
@@ -50,11 +50,12 @@ import libfdt
CompTool = collections.namedtuple('CompTool', 'ext,tools')
COMP_TOOLS = {
- 'bzip2': CompTool('.bz2', 'bzip2'),
+ 'bzip2': CompTool('.bz2', 'pbzip2,bzip2'),
'gzip': CompTool('.gz', 'pigz,gzip'),
'lz4': CompTool('.lz4', 'lz4'),
- 'lzma': CompTool('.lzma', 'lzma'),
+ 'lzma': CompTool('.lzma', 'plzip,lzma'),
'lzo': CompTool('.lzo', 'lzop'),
+ 'xz': CompTool('.xz', 'xz'),
'zstd': CompTool('.zstd', 'zstd'),
}
@@ -207,7 +208,12 @@ def compress_data(inf, compress):
done = False
for tool in comp.tools.split(','):
try:
- subprocess.call([tool, '-c'], stdin=inf, stdout=outf)
+ # Add parallel flags for tools that support them
+ cmd = [tool]
+ if tool in ('zstd', 'xz'):
+ cmd.extend(['-T0']) # Use all available cores
+ cmd.append('-c')
+ subprocess.call(cmd, stdin=inf, stdout=outf)
done = True
break
except FileNotFoundError:
--
2.43.0
next prev parent reply other threads:[~2026-01-06 16:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-06 16:27 [PATCH v9 0/6] scripts/make_fit: Support ramdisks and faster operations Simon Glass
2026-01-06 16:27 ` [PATCH v9 1/6] scripts/make_fit: Speed up operation Simon Glass
2026-01-06 16:27 ` [PATCH v9 2/6] scripts/make_fit: Support an initial ramdisk Simon Glass
2026-01-06 16:27 ` [PATCH v9 3/6] scripts/make_fit: Move dtb processing into a function Simon Glass
2026-01-06 16:27 ` [PATCH v9 4/6] kbuild: Support a FIT_EXTRA_ARGS environment variable Simon Glass
2026-01-06 16:27 ` Simon Glass [this message]
2026-01-06 16:27 ` [PATCH v9 6/6] scripts/make_fit: Compress dtbs in parallel Simon Glass
2026-02-03 2:45 ` [PATCH v9 0/6] scripts/make_fit: Support ramdisks and faster operations Simon Glass
2026-02-03 4:51 ` Nathan Chancellor
2026-02-03 21:59 ` Simon Glass
2026-02-05 19:23 ` Nathan Chancellor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260106162738.2605574-6-sjg@chromium.org \
--to=sjg@chromium.org \
--cc=a.fatoum@pengutronix.de \
--cc=dsterba@suse.com \
--cc=j.ne@posteo.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=nicolas@fjasle.eu \
--cc=nsc@kernel.org \
--cc=terrelln@fb.com \
--cc=thomas.weissschuh@linutronix.de \
--cc=trini@konsulko.com \
--cc=wenst@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®