2022-08-24 21:08:29

by Thitat Auareesuksakul

[permalink] [raw]
Subject: [PATCH] scripts/extract-ikconfig: add zstd compression support

Add extract-ikconfig support for kernel images compressed with zstd.

Signed-off-by: Thitat Auareesuksakul <[email protected]>
---
scripts/extract-ikconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/scripts/extract-ikconfig b/scripts/extract-ikconfig
index 3b42f255e2ba..8df33e7d6daa 100755
--- a/scripts/extract-ikconfig
+++ b/scripts/extract-ikconfig
@@ -62,6 +62,7 @@ try_decompress 'BZh' xy bunzip2
try_decompress '\135\0\0\0' xxx unlzma
try_decompress '\211\114\132' xy 'lzop -d'
try_decompress '\002\041\114\030' xyy 'lz4 -d -l'
+try_decompress '\050\265\057\375' xxx unzstd

# Bail out:
echo "$me: Cannot find kernel config." >&2
--
2.37.2


2022-08-25 07:50:31

by Nicolas Schier

[permalink] [raw]
Subject: Re: [PATCH] scripts/extract-ikconfig: add zstd compression support

On Thu, Aug 25, 2022 at 03:03:40AM +0700, Thitat Auareesuksakul wrote:
> Add extract-ikconfig support for kernel images compressed with zstd.
>
> Signed-off-by: Thitat Auareesuksakul <[email protected]>
> ---

Tested-by: Nicolas Schier <[email protected]>

> scripts/extract-ikconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/scripts/extract-ikconfig b/scripts/extract-ikconfig
> index 3b42f255e2ba..8df33e7d6daa 100755
> --- a/scripts/extract-ikconfig
> +++ b/scripts/extract-ikconfig
> @@ -62,6 +62,7 @@ try_decompress 'BZh' xy bunzip2
> try_decompress '\135\0\0\0' xxx unlzma
> try_decompress '\211\114\132' xy 'lzop -d'
> try_decompress '\002\041\114\030' xyy 'lz4 -d -l'
> +try_decompress '\050\265\057\375' xxx unzstd
>
> # Bail out:
> echo "$me: Cannot find kernel config." >&2
> --
> 2.37.2
>

2022-08-27 14:47:10

by Masahiro Yamada

[permalink] [raw]
Subject: Re: [PATCH] scripts/extract-ikconfig: add zstd compression support

On Thu, Aug 25, 2022 at 4:22 PM Nicolas Schier <[email protected]> wrote:
>
> On Thu, Aug 25, 2022 at 03:03:40AM +0700, Thitat Auareesuksakul wrote:
> > Add extract-ikconfig support for kernel images compressed with zstd.
> >
> > Signed-off-by: Thitat Auareesuksakul <[email protected]>
> > ---
>
> Tested-by: Nicolas Schier <[email protected]>
>
> > scripts/extract-ikconfig | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/scripts/extract-ikconfig b/scripts/extract-ikconfig
> > index 3b42f255e2ba..8df33e7d6daa 100755
> > --- a/scripts/extract-ikconfig
> > +++ b/scripts/extract-ikconfig
> > @@ -62,6 +62,7 @@ try_decompress 'BZh' xy bunzip2
> > try_decompress '\135\0\0\0' xxx unlzma
> > try_decompress '\211\114\132' xy 'lzop -d'
> > try_decompress '\002\041\114\030' xyy 'lz4 -d -l'
> > +try_decompress '\050\265\057\375' xxx unzstd
> >
> > # Bail out:
> > echo "$me: Cannot find kernel config." >&2
> > --
> > 2.37.2
> >


Applied to linux-kbuild. Thanks.



--
Best Regards
Masahiro Yamada