NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: toolchain/26072 (Request: an option to, to build kernels without running "config" and "make depend")

Synopsis: Request: an option to, to build kernels without running "config" and "make depend"

State-Changed-From-To: open->feedback
State-Changed-When: Fri, 19 May 2023 20:31:35 +0000

I'm not convinced that the added complexity of another option is worth the
effort of adding and maintaining yet another option to

If you want to recompile a kernel after a change to a source file
without re-running config & make depend, just run nbmake in the
kernel's build directory. E.g
        $TOOLDIR/nbmake-amd64 -C $SOMEDIR/sys/arch/amd64/compile/GENERIC
(with appropriate shell variables already set)
Note that the latter directory path is printed when you first run kernel=GENERIC

I did some testing on a modern system (AMD Ryzen 9 5950X 16-Core),
comparing using (with the config and make depend passes)
versus just building the kernel, both without any file changes
as well as touching a single source file:

        time ./ -j32 kernel=GENERIC

        time nbmake-amd64 -C $SOMEDIR/sys/arch/amd64/compile/GENERIC

        touch ./sys/dev/usb/xhci.c
        time ./ -j32 kernel=GENERIC

        touch ./sys/dev/usb/xhci.c
        time nbmake-amd64 -C $SOMEDIR/sys/arch/amd64/compile/GENERIC

Not that much quicker even with 1 file change. And if I care about those 3s
I can just run the latter variation without the rerun of config
or make depend.


Home | Main Index | Thread Index | Old Index