From: Simon Glass <sjg@chromium.org>
To: linux-arm-kernel@lists.infradead.org
Cc: "Chen-Yu Tsai" <wenst@chromium.org>,
"Ahmad Fatoum" <a.fatoum@pengutronix.de>,
"Masahiro Yamada" <masahiroy@kernel.org>,
"J . Neuschäfer" <j.ne@posteo.net>,
"Nicolas Schier" <nicolas@fjasle.eu>,
"Tom Rini" <trini@konsulko.com>, "Simon Glass" <sjg@chromium.org>,
"David Sterba" <dsterba@suse.com>,
"Nick Terrell" <terrelln@fb.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH v4 6/7] scripts/make_fit: Support a few more parallel compressors
Date: Mon, 6 Oct 2025 17:01:57 -0600 [thread overview]
Message-ID: <20251006230205.521341-7-sjg@chromium.org> (raw)
In-Reply-To: <20251006230205.521341-1-sjg@chromium.org>
Add support for pbzip2 and plzip which can compress in parallel. This
speeds up the ramdisk compression.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
(no changes since v1)
scripts/make_fit.py | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/scripts/make_fit.py b/scripts/make_fit.py
index 3db129f40b20..10a040f4eb83 100755
--- a/scripts/make_fit.py
+++ b/scripts/make_fit.py
@@ -57,10 +57,10 @@ 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'),
'zstd': CompTool('.zstd', 'zstd'),
}
@@ -220,7 +220,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:[~2025-10-06 23:02 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-06 23:01 [PATCH v4 0/7] scripts/make_fit: Support ramdisks and faster operations Simon Glass
2025-10-06 23:01 ` [PATCH v4 1/7] scripts/make_fit: Speed up operation Simon Glass
2025-11-08 21:14 ` Nicolas Schier
2025-10-06 23:01 ` [PATCH v4 2/7] scripts/make_fit: Support an initial ramdisk Simon Glass
2025-11-08 21:15 ` Nicolas Schier
2025-10-06 23:01 ` [PATCH v4 3/7] scripts/make_fit: Move dtb processing into a function Simon Glass
2025-11-08 21:15 ` Nicolas Schier
2025-10-06 23:01 ` [PATCH v4 4/7] scripts/make_fit: Provide a way to add built modules Simon Glass
2025-11-08 21:16 ` Nicolas Schier
2025-11-14 18:09 ` Simon Glass
2025-10-06 23:01 ` [PATCH v4 5/7] kbuild: Allow adding modules into the FIT ramdisk Simon Glass
2025-11-08 21:17 ` Nicolas Schier
2025-11-14 14:29 ` Simon Glass
2025-10-06 23:01 ` Simon Glass [this message]
2025-10-06 23:01 ` [PATCH v4 7/7] scripts/make_fit: Compress dtbs in parallel Simon Glass
2025-10-30 17:48 ` [PATCH v4 0/7] scripts/make_fit: Support ramdisks and faster operations Simon Glass
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=20251006230205.521341-7-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=terrelln@fb.com \
--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®