Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scripts/make_fit: Support a few more parallel compressors

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>
Link: https://patch.msgid.link/20260106162738.2605574-6-sjg@chromium.org
Signed-off-by: Nathan Chancellor <nathan@kernel.org>

authored by

Simon Glass and committed by
Nathan Chancellor
fcdcf22a 9a329df6

+9 -3
+9 -3
scripts/make_fit.py
··· 50 50 CompTool = collections.namedtuple('CompTool', 'ext,tools') 51 51 52 52 COMP_TOOLS = { 53 - 'bzip2': CompTool('.bz2', 'bzip2'), 53 + 'bzip2': CompTool('.bz2', 'pbzip2,bzip2'), 54 54 'gzip': CompTool('.gz', 'pigz,gzip'), 55 55 'lz4': CompTool('.lz4', 'lz4'), 56 - 'lzma': CompTool('.lzma', 'lzma'), 56 + 'lzma': CompTool('.lzma', 'plzip,lzma'), 57 57 'lzo': CompTool('.lzo', 'lzop'), 58 + 'xz': CompTool('.xz', 'xz'), 58 59 'zstd': CompTool('.zstd', 'zstd'), 59 60 } 60 61 ··· 208 207 done = False 209 208 for tool in comp.tools.split(','): 210 209 try: 211 - subprocess.call([tool, '-c'], stdin=inf, stdout=outf) 210 + # Add parallel flags for tools that support them 211 + cmd = [tool] 212 + if tool in ('zstd', 'xz'): 213 + cmd.extend(['-T0']) # Use all available cores 214 + cmd.append('-c') 215 + subprocess.call(cmd, stdin=inf, stdout=outf) 212 216 done = True 213 217 break 214 218 except FileNotFoundError: