Rebuild a changed kernel quickly with make?

Valdis.Kletnieks at Valdis.Kletnieks at
Thu Jul 4 14:18:38 EDT 2013

On Thu, 04 Jul 2013 08:33:00 +0200, Martin Kepplinger said:

> When I change something in the kernel and just hit make from toplevel
> dir, it always compiles everything again, no matter if it wasn't changed
> at all in the meantime.

It *really* depends on which CONFIG_ variable you change.

If you change some CONFIG_ variables like the ones that control whether
a specific module is built, the rebuild may in fact only compile 1 or 2
.c files and link the module into a .ko and be done. Maybe a few more
if you have /proc/config.gz enabled, because then it has to rebuild and
relink the data for that into the kernel.

THe gotcha is that changing other CONFIG_ variables can result in almost
everything being rebuilt - for instance, if you change a CONFIG_ that
controls a #ifdef in sched.h or one of the base networking headers, that
will cause a recompile of everything that includes that .h (and pretty
much everybody and their pet llama ends up including sched.h indirectly).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : 

More information about the Kernelnewbies mailing list