Compiling linux (6.7)
Over time, there are more and more dependencies to install to be able to compile linux.
In .config, enable or disable like this:
# enable
CONFIG_KERNEL_XZ=y
# disable
# CONFIG_KERNEL_LZO is not set
Disabled options not in this format are considered missing and the makefile will add them as new options.
In debian bookworm
Install needed packages and clone linux git repo:
apt-get install flex bc debhelper libelf-dev pahole libdw-dev
git clone --depth=1 https://github.com/torvalds/linux
cd linux
# or
git clone --depth=1 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
cd linux
Or clone linux stable:
apt-get install flex bc debhelper libelf-dev pahole libdw-dev
git clone --depth=1 https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
cd linux
Configure and build:
cp /boot/config-5.18.0-4-amd64 .config
# disable as many as modules as possible
make menuconfig
make -j10 deb-pkg
# it failed to compile with -10, continue with:
make deb-pkg
Install the new kernel, it sets up GRUB:
dpkg -i ../linux-image-6.7.0-rc6+_6.7.0-rc6-g3f82f1c3a036-4_amd64.deb
reboot
Choose the Advanced options for Debian GNU/Linux menu and then the kernel to boot.
In slackware 15
Here the steps for compiling the linux kernel in Slackware 15
Hashtag: #linux