How to build FreeBSD kernel faster than the previous builds

I was making change in kernel code, and I build a kernel with following command
$ make buildkernel installkernel
for each time, it was taking 20 mins
But I have made change in a single file, even though it was taking more time

Please can anyone give me the solution to build kernel faster
 
You can add -DNO_CLEAN, that should help.

Code:
     NO_CLEAN               If set, no object tree files are cleaned at all.
                            This is the default when WITH_META_MODE is used
                            with filemon(4) loaded.  See src.conf(5) for more
                            details.  Setting NO_CLEAN implies NO_KERNELCLEAN,
                            so when NO_CLEAN is set no kernel objects are
                            cleaned either.
See build(7).
 
There actually is a dedicated option:
Code:
KERNFAST          If set, the build    target buildkernel defaults to setting
              NO_KERNELCLEAN, NO_KERNELCONFIG, and NO_KERNELOBJ.  When
              set to a value other than    1 then KERNCONF    is set to the
              value of KERNFAST.
See build(7)
 
Back
Top