Re: [PATCH] kbuild: drop dependency on .config for tools/

From: Nicolas Schier

Date: Fri Sep 11 2026 - 15:29:14 EST


On Fri, Sep 11, 2026 at 12:42:33PM +0200, Alexis Lothoré (eBPF Foundation) wrote:
> When trying to build some tooling from tools/ in an unconfigured kernel
> tree, the build fails to start because of missing .config:
>
> $ make tools/bpf
> ***
> *** Configuration file ".config" not found!
> ***
> *** Please run some configurator (e.g. "make oldconfig" or
> *** "make menuconfig" or "make xconfig").
> ***
> /home/alexis/src/linux/Makefile:810: include/config/auto.conf: No such file or directory
> make[1]: *** [/home/alexis/src/linux/Makefile:892: .config] Error 1
> make: *** [Makefile:248: __sub-make] Error 2
>
> The failure is due to the tools/<foo> targets having need-config=1 set.
> With a proper .config present, a standard `make tools/bpf` works, but:
> - those tools don't need a .config to build and run, they are built
> independently of the kernel configuration

Doesn't tools/testing/ need a kernel configuration?

--
Nicolas