Steps on how to compile and install linux kernel by yourself based on: ITSFOSS Ref
sudo apt update
sudo apt install bc binutils bison dwarves flex gcc git gnupg2 gzip libelf-dev libncurses5-dev libssl-dev make openssl pahole perl-base rsync tar xz-utilswget https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.10.6.tar.xz
wget https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.10.6.tar.signunxz --keep linux-*.tar.xzgpg2: OpenPGP encryption and signing tool
gpg2 --locate-keys [email protected] [email protected]
gpg2 --verify linux-*.tar.signtar -xf linux-*.tarcp /boot/config-"$(uname -r)" .config
file .configTo update an existing .config file, the make command is used with the target olddefconfig. Broken down, this is old default configuration. This will take the "old configuration file" (which is currently saved as .config as a literal copy of your distribution's configuration) and check for any new configuration options that were added to the Linux codebase since
make olddefconfigThe most reliable way to modify your config file is via the menuconfig command
make menuconfigGeneral Setup -> CONFIG_LOCALVERSION -> "-CodeVoyageWithIman"
make -j$(nproc) 2>&1 | tee logIf you want, you can time your compile process, in that case use the commnad below:
(time make -j$(nproc) 2>&1 | tee log) 2>&1 | tee build_time.logsudo make modules_install -j$(nproc)
sudo make headers_install -j$(nproc)
sudo make install -j$(nproc)uname -r