mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: Vegard Nossum <vegard.nossum@oracle.com>,
	Masahiro Yamada <masahiroy@kernel.org>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] kbuild: only prompt for compressors that are actually usable
Date: Tue, 12 Oct 2021 12:44:58 -0700	[thread overview]
Message-ID: <adfb38d7-8ce5-3266-df5a-e38e3597d994@infradead.org> (raw)
In-Reply-To: <20211012170121.31549-1-vegard.nossum@oracle.com>

On 10/12/21 10:01 AM, Vegard Nossum wrote:
> If a given compression algorithm for the kernel image is not usable on
> the host system, there is no point prompting for it.
> 
> We can use the kconfig preprocessing feature to check if the command is
> available or not. I've chosen to test this using "which", which exits
> with success if the given command exists in PATH (or it is an absolute
> path), which mimics exactly how it would be found in the kernel's
> Makefiles.

Hi Vegard,

I have made a few patches that used "which", but I was always told
that the POSIX spelling of that command is "command -v", so that is
preferable.

> This uses the make variables that are set in Makefile and/or the
> command line, so you can do e.g.
> 
>    make KGZIP=pigz menuconfig
> 
> and it will test for the correct program.
> 
> I am intentionally adding these dependencies to e.g. KERNEL_LZ4, as
> opposed to HAVE_KERNEL_LZ4, since the latter are "select"-ed
> unconditionally by the architectures that use them, so they are not
> suitable for depending on anything else.
> 
> I've put RFC in the subject as maybe there are downsides to this that
> I'm not aware of.
> 
> Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
> ---
>   init/Kconfig | 7 +++++++
>   1 file changed, 7 insertions(+)


-- 
~Randy

  reply	other threads:[~2021-10-12 19:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-12 17:01 Vegard Nossum
2021-10-12 19:44 ` Randy Dunlap [this message]
2021-10-13  1:34 ` Masahiro Yamada
2021-10-13  5:39   ` Vegard Nossum
2021-10-13  7:00     ` 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=adfb38d7-8ce5-3266-df5a-e38e3597d994@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=vegard.nossum@oracle.com \
    /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®