NetBSD-Bugs archive

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

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



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

State-Changed-From-To: open->feedback
State-Changed-By: lukem%NetBSD.org@localhost
State-Changed-When: Fri, 19 May 2023 20:31:35 +0000
State-Changed-Why:

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


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
build.sh kernel=GENERIC


I did some testing on a modern system (AMD Ryzen 9 5950X 16-Core),
comparing using build.sh (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 ./build.sh -j32 kernel=GENERIC
        4.31s

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


        touch ./sys/dev/usb/xhci.c
        time ./build.sh -j32 kernel=GENERIC
        15.51s

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

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.
        
        
Thoughts?

regards,
Luke.





Home | Main Index | Thread Index | Old Index