Once the edits to the custom configuration file have been saved, the source code for the kernel can be compiled using the following steps:
Change to this directory:
Compile the new kernel by specifying the name of the custom kernel configuration file:
make buildkernel KERNCONF=
Install the new kernel associated with the specified kernel configuration file. This command will copy the new kernel to
/boot/kernel/kerneland save the old kernel to
make installkernel KERNCONF=
Shutdown the system and reboot into the new kernel. If something goes wrong, refer to The kernel does not boot.
By default, when a custom kernel is compiled, all kernel
modules are rebuilt. To update a kernel faster or to build
only custom modules, edit
before starting to build the kernel.
For example, this variable specifies the list of modules to build instead of using the default of building all modules:
MODULES_OVERRIDE = linux acpi
Alternately, this variable lists which modules to exclude from the build process:
WITHOUT_MODULES = linux acpi sound
Additional variables are available. Refer to make.conf(5) for details.