Also referred to as «building the Linux kernel».
Specifying an alternate config file
By default, the make system uses
./.config
as build configuration file.
An alternate file can be chosen by setting the environment variable KCONFIG_CONFIG
to the path of a config file or specyfing the alternate config file directly like so:
make KCONFIG_CONFIG=test.config
Specifying a separate build directory
By default, the generated files go into the same tree as the kernel sources. Invoking
make with
O=/path/to/output/dir
allows to specify an alternative destination
cd /usr/src/linux-4.X
make O=/home/name/build/kernel menuconfig
make O=/home/name/build/kernel
sudo make O=/home/name/build/kernel modules_install install