Re: [PATCH 3/3] kbuild: check the presence of lzo and lz4 tools when necessary

From: Masahiro Yamada
Date: Wed Oct 17 2018 - 05:26:18 EST


On Wed, Oct 17, 2018 at 6:12 PM Borislav Petkov <bp@xxxxxxx> wrote:
>
> On Wed, Oct 17, 2018 at 05:59:02PM +0900, Masahiro Yamada wrote:
> > > DESCEND objtool
> > > CALL scripts/checksyscalls.sh
> > > CHK include/generated/compile.h
> > > Building modules, stage 2.
> > > CC arch/x86/boot/compressed/misc.o
> > > LZ4 arch/x86/boot/compressed/vmlinux.bin.lz4
> > > /bin/sh: 1: lz4c: not found
> > > make[2]: *** [arch/x86/boot/compressed/Makefile:143: arch/x86/boot/compressed/vmlinux.bin.lz4] Error 1
> > > make[2]: *** Waiting for unfinished jobs....
> > > make[1]: *** [arch/x86/boot/Makefile:112: arch/x86/boot/compressed/vmlinux] Error 2
> > > make: *** [arch/x86/Makefile:290: bzImage] Error 2
> > > make: *** Waiting for unfinished jobs....
> > > MODPOST 956 modules
> > >
> > > What am I missing?
> >
> >
> > I have no idea.
> >
> > With liblz4-tool package installed on my machine,
> > I can build x86 kernel with CONFIG_KERNEL_LZ4.
>
> What happens if you remove the lz4c executable? Do you see the ugly
> error above or the "lz4 tool not found. Please install it." message with
> my config?
>

I tried that.
I can see the expected error message.



masahiro@pug:~/ref/linux$ git log --oneline | head -n 4
6cd6271 kbuild: check the presence of lzo and lz4 tools when necessary
b72cfb7 objtool: move libelf check out of top Makefile
e3061d8 kbuild: provide a new place to check necessary host tools
b955a91 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
masahiro@pug:~/ref/linux$ git clean -dqfx
masahiro@pug:~/ref/linux$ cp ~/Downloads/config.lz4 .config
masahiro@pug:~/ref/linux$ sudo mv /usr/bin/lz4c /usr/bin/lz4c.backup
[sudo] password for masahiro:
masahiro@pug:~/ref/linux$ make
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
YACC scripts/kconfig/zconf.tab.c
LEX scripts/kconfig/zconf.lex.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf --syncconfig Kconfig
*
* Restart config...
*
*
* GCC plugins
*
GCC plugins (GCC_PLUGINS) [N/y/?] (NEW)
*
* lz4 tool not found. Please install it.
*
make[1]: *** [scripts/Makefile.toolcheck;46: check_lz4] Error 1
Makefile:595: include/config/auto.conf: No such file or directory
make: *** [Makefile;636: include/config/auto.conf] Error 2
make: *** Deleting file 'include/config/auto.conf'





--
Best Regards
Masahiro Yamada