Update the system and the available packages to the latest versions
sudo apt update sudo apt upgrade -yCheck the current Linux Kernel
uname -rInstall the required packages and build tools
sudo apt install build-essential dwarves python3 libncurses-dev flex bison libssl-dev bc libelf-dev zstd gnupg2 wget git -y
The linux Kernel can be gotten from the kernel.org I use the
Linux kernel 6.2.10
Download
wget https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.2.10.tar.xzExtract
tar xvf linux-6.2.10.tar.xz cd linux-6.2.10/
Copy config file to our project
cp -v /boot/config-$(uname -r) .config make menuconfig
And then
Save
andExit
Modify the created config by disabling SYSTEM_REVOCATION_KEYS
scripts/config --disable SYSTEM_REVOCATION_KEYS make localmodconfig
Compile the Linux Kernel
make bzImage -j$(nproc)
It's gonna take a long time
Compile the Linux Kernel modules
make modules -j$(nproc)
Enable Kernel Selection
sudo vi /etc/default/grubMake the below line to comment
GRUB_TIMEOUT_STYLE=hidden GRUB_TIMEOUT=0
Update grub
sudo update-grub
Install kernel modules
sudo make modules_install -j$(nproc)
Install kernel
sudo make install -j$(nproc)
And then reboot
sudo reboot -i