[PATCH] scripts/make_fit.py: Drop explicit LZMA parallel compression

Chen-Yu Tsai posted 1 patch 2 months ago
scripts/make_fit.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] scripts/make_fit.py: Drop explicit LZMA parallel compression
Posted by Chen-Yu Tsai 2 months ago
Parallel compression for LZMA was added using the plzip tool. However
plzip produces lzip format output, which is different from the raw LZMA
format that the lzma tool produces. This causes depthcharge (the second
stage bootloader on Chromebooks) to fail to load the payload.

Drop the explicit LZMA parallel compression toolchain. If the lzma tool
on the build machine is from xz-utils, then there's a chance parallel
compression is already enabled.

The xz-utils manpage says the following for the -T (threads) argument:

    Specify the number of worker threads to use.  Setting threads to a
    special value 0 makes xz use up to as many threads as the processor(s)
    on the system support.  The actual number of threads can be fewer than
    threads if the input file is not big enough for threading with the
    given settings or if using more threads would exceed the memory usage
    limit.

    [...]

    The default value for threads is 0.  In xz 5.4.x and older the default
    is 1.

Fixes: fcdcf22a34b0 ("scripts/make_fit: Support a few more parallel compressors")
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
---
Please merge this for fixes.

 scripts/make_fit.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/make_fit.py b/scripts/make_fit.py
index 517ca84fd32c..76ab40353d9a 100755
--- a/scripts/make_fit.py
+++ b/scripts/make_fit.py
@@ -54,7 +54,7 @@ COMP_TOOLS = {
     'bzip2': CompTool('.bz2', 'pbzip2,bzip2'),
     'gzip': CompTool('.gz', 'pigz,gzip'),
     'lz4': CompTool('.lz4', 'lz4'),
-    'lzma': CompTool('.lzma', 'plzip,lzma'),
+    'lzma': CompTool('.lzma', 'lzma'),
     'lzo': CompTool('.lzo', 'lzop'),
     'xz': CompTool('.xz', 'xz'),
     'zstd': CompTool('.zstd', 'zstd'),
-- 
2.53.0.239.g8d8fc8a987-goog
Re: [PATCH] scripts/make_fit.py: Drop explicit LZMA parallel compression
Posted by Nathan Chancellor 1 month, 4 weeks ago
On Thu, 12 Feb 2026 15:43:07 +0800, Chen-Yu Tsai wrote:
> Parallel compression for LZMA was added using the plzip tool. However
> plzip produces lzip format output, which is different from the raw LZMA
> format that the lzma tool produces. This causes depthcharge (the second
> stage bootloader on Chromebooks) to fail to load the payload.
> 
> Drop the explicit LZMA parallel compression toolchain. If the lzma tool
> on the build machine is from xz-utils, then there's a chance parallel
> compression is already enabled.
> 
> [...]

Applied to

  https://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux.git kbuild-fixes

Thanks!

[1/1] scripts/make_fit.py: Drop explicit LZMA parallel compression
      https://git.kernel.org/kbuild/c/59f18d88d96e8

Please look out for regression or issue reports or other follow up
comments, as they may result in the patch/series getting dropped or
reverted. Patches applied to an "unstable" branch are accepted pending
wider testing in -next and any post-commit review; they will generally
be moved to the main branch in a week if no issues are found.

Best regards,
-- 
Nathan Chancellor <nathan@kernel.org>
Re: [PATCH] scripts/make_fit.py: Drop explicit LZMA parallel compression
Posted by Simon Glass 2 months ago
On Thu, 12 Feb 2026 at 00:43, Chen-Yu Tsai <wenst@chromium.org> wrote:
>
> Parallel compression for LZMA was added using the plzip tool. However
> plzip produces lzip format output, which is different from the raw LZMA
> format that the lzma tool produces. This causes depthcharge (the second
> stage bootloader on Chromebooks) to fail to load the payload.
>
> Drop the explicit LZMA parallel compression toolchain. If the lzma tool
> on the build machine is from xz-utils, then there's a chance parallel
> compression is already enabled.
>
> The xz-utils manpage says the following for the -T (threads) argument:
>
>     Specify the number of worker threads to use.  Setting threads to a
>     special value 0 makes xz use up to as many threads as the processor(s)
>     on the system support.  The actual number of threads can be fewer than
>     threads if the input file is not big enough for threading with the
>     given settings or if using more threads would exceed the memory usage
>     limit.
>
>     [...]
>
>     The default value for threads is 0.  In xz 5.4.x and older the default
>     is 1.
>
> Fixes: fcdcf22a34b0 ("scripts/make_fit: Support a few more parallel compressors")
> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
> ---
> Please merge this for fixes.
>
>  scripts/make_fit.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Simon Glass <simon.glass@canonical.com>

Thanks for spotting that.

>
> diff --git a/scripts/make_fit.py b/scripts/make_fit.py
> index 517ca84fd32c..76ab40353d9a 100755
> --- a/scripts/make_fit.py
> +++ b/scripts/make_fit.py
> @@ -54,7 +54,7 @@ COMP_TOOLS = {
>      'bzip2': CompTool('.bz2', 'pbzip2,bzip2'),
>      'gzip': CompTool('.gz', 'pigz,gzip'),
>      'lz4': CompTool('.lz4', 'lz4'),
> -    'lzma': CompTool('.lzma', 'plzip,lzma'),
> +    'lzma': CompTool('.lzma', 'lzma'),
>      'lzo': CompTool('.lzo', 'lzop'),
>      'xz': CompTool('.xz', 'xz'),
>      'zstd': CompTool('.zstd', 'zstd'),
> --
> 2.53.0.239.g8d8fc8a987-goog
>