lkml.org 
[lkml]   [2021]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH] kbuild: only prompt for compressors that are actually usable
From
Date
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

\
 
 \ /
  Last update: 2021-10-12 21:45    [W:0.069 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site