From: Kevin Martin <kevinmbecause@gmail.com>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: Kevin Martin <kevinmbecause@gmail.com>,
Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Nicolas Schier <nicolas@fjasle.eu>,
linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] kbuild: Enable decompression for use by EXTRA_FIRMWARE The build system can currently only compress files. This patch adds the functionality to decompress files. Decompression is needed for building firmware files into the kernel if those files are compressed on the filesystem. Compressed firmware files are in use by Gentoo, Fedora, Arch, and others.
Date: Thu, 4 Jan 2024 02:04:21 -0500 (EST) [thread overview]
Message-ID: <d5989a0b-f46f-fb49-8d44-1822d69bc4cf@gmail.com> (raw)
In-Reply-To: <CAK7LNAQX+h-a3yBEOqXG2_7mw+6bS5NmJ=UYAEt=oghQvi4W2Q@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2475 bytes --]
On Wed, 3 Jan 2024, Masahiro Yamada wrote:
> On Wed, Dec 20, 2023 at 7:26 PM Kevin Martin <kevinmbecause@gmail.com> wrote:
> >
> > Signed-off-by: Kevin Martin <kevinmbecause@gmail.com>
> > ---
> > scripts/Makefile.lib | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
> > index 1a965fe68..d043be3dc 100644
> > --- a/scripts/Makefile.lib
> > +++ b/scripts/Makefile.lib
> > @@ -523,6 +523,9 @@ quiet_cmd_xzkern_with_size = XZKERN $@
> > quiet_cmd_xzmisc = XZMISC $@
> > cmd_xzmisc = cat $(real-prereqs) | $(XZ) --check=crc32 --lzma2=dict=1MiB > $@
> >
> > +quiet_cmd_xzdec = XZDEC $@
> > + cmd_xzdec = cat $(real-prereqs) | $(XZ) --decompress > $@
> > +
>
>
>
> Please do not fork the meaningless 'cat' process.
>
> This should be a single process to take just one input file.
>
> cmd_xzdec = $(XZ) --decompress --stdout $< > $@
>
>
>
>
> Commit d3dd3b5a29bb9582957451531fed461628dfc834
> was a very bad commit.
>
> The 'cat' and compression/decompression must be
> separate rules.
>
> We should not repeat the mistake in the past.
>
Would it be preferable to change all of the compression rules or just the
new decompression rules?
I could change just the new ones and then begin working on a different
patch to clean up the 'cat' processes in the compression rules.
>
>
> > # ZSTD
> > # ---------------------------------------------------------------------------
> > # Appends the uncompressed size of the data using size_append. The .zst
> > @@ -548,6 +551,9 @@ quiet_cmd_zstd22 = ZSTD22 $@
> > quiet_cmd_zstd22_with_size = ZSTD22 $@
> > cmd_zstd22_with_size = { cat $(real-prereqs) | $(ZSTD) -22 --ultra; $(size_append); } > $@
> >
> > +quiet_cmd_zstddec = ZSTDDEC $@
> > + cmd_zstddec = cat $(real-prereqs) | $(ZSTD) --decompress > $@
> > +
>
>
> Same here.
> Please make this a single process:
>
> cmd_zstddec = $(ZSTD) --decompress --force --output=$@ $<
>
>
>
>
>
>
> One small concern in the future is, if we end up with adding
> quiet_cmd_bzip2dec, we will run out of the 7-column of the short log.
>
> quiet_cmd_bzip2dec = BZIP2DEC$@
>
> We can increase the column size if needed, so I do not think
> it is a big issue.
>
>
>
>
>
>
>
>
>
>
> > # ASM offsets
> > # ---------------------------------------------------------------------------
> >
> > --
> > 2.41.0
> >
>
>
> --
> Best Regards
> Masahiro Yamada
>
next prev parent reply other threads:[~2024-01-04 7:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-20 10:22 [PATCH 0/2] Enable compressed files in EXTRA_FIRMWARE Kevin Martin
2023-12-20 10:22 ` [PATCH 1/2] kbuild: Enable decompression for use by EXTRA_FIRMWARE The build system can currently only compress files. This patch adds the functionality to decompress files. Decompression is needed for building firmware files into the kernel if those files are compressed on the filesystem. Compressed firmware files are in use by Gentoo, Fedora, Arch, and others Kevin Martin
2024-01-02 6:46 ` Nicolas Schier
2024-01-03 12:00 ` Masahiro Yamada
2024-01-04 7:04 ` Kevin Martin [this message]
2024-01-04 14:13 ` Masahiro Yamada
2023-12-20 10:29 ` [PATCH 2/2] firmware_loader: Enable compressed files in EXTRA_FIRMWARE Kevin Martin
2024-01-02 6:46 ` Nicolas Schier
2024-01-03 12:22 ` Masahiro Yamada
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=d5989a0b-f46f-fb49-8d44-1822d69bc4cf@gmail.com \
--to=kevinmbecause@gmail.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=nicolas@fjasle.eu \
/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®