Install required packages.
root@server1:~# apt-get install git fakeroot build-essential ncurses-dev xz-utils libssl-dev bc flex libelf-dev bison dwarves
Download the source of the required/planned version of the Linux kernel (I had decided on 5.15)
root@server1:~# wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.11.tar.xz
Extract the xz file (to default folder)
root@server1:~# tar xvf linux-5.15.11.tar.xz
root@server1:~# cd linux-5.15.11/
root@server1:~/linux-5.15.11#
Copy the existing configuration file
root@server1:~/linux-5.15.11# cp -v /boot/config-$(uname -r) .config
Debian 11 includes additional trusted X.509 keys directly into the kernel image, which can be used to verify kernel modules before loading them. Need to disable the inclusion
root@server1:~/linux-5.15.11# make menuconfig
Scroll down and select Cryptographic API

Scroll down to the end of the options list and select “Certificates for signature checking”

Select the Additional certificates and clear the contents “debian/certs/debian-uefi-certs.pem”




Exit to the main menu and select ‘Save’



Exit menuconfig


In my server, I have 36 cores / 72 threads. So I decided to increase the concurrency of compilation to make it fast
root@server1:~/linux-5.15.11# make -j64
SYNC include/config/auto.conf.cmd
HOSTCC scripts/kconfig/conf.o
HOSTLD scripts/kconfig/conf
WRAP arch/x86/include/generated/uapi/asm/bpf_perf_event.h
SYSHDR arch/x86/include/generated/uapi/asm/unistd_32.h
WRAP arch/x86/include/generated/uapi/asm/errno.h
. . .
. . .
LD [M] sound/x86/snd-hdmi-lpe-audio.ko
LD [M] sound/xen/snd_xen_front.ko
LD [M] virt/lib/irqbypass.ko
root@server1:~/linux-5.15.11# make modules_install
arch/x86/Makefile:142: CONFIG_X86_X32 enabled but no binutils support
INSTALL /lib/modules/5.15.11-dc-5.15/kernel/arch/x86/crypto/aegis128-aesni.ko
INSTALL /lib/modules/5.15.11-dc-5.15/kernel/arch/x86/crypto/aesni-intel.ko
. . .
. . .
INSTALL /lib/modules/5.15.11-dc-5.15/kernel/sound/xen/snd_xen_front.ko
INSTALL /lib/modules/5.15.11-dc-5.15/kernel/virt/lib/irqbypass.ko
DEPMOD /lib/modules/5.15.11-dc-5.15
root@server1:~/linux-5.15.11# make install
arch/x86/Makefile:142: CONFIG_X86_X32 enabled but no binutils support
sh ./arch/x86/boot/install.sh 5.15.11-dc-5.15 \
arch/x86/boot/bzImage System.map “/boot”
…
Generating grub configuration file …
…
Found initrd image: /boot/initrd.img-5.10.0-10-amd64
done
root@server1:~/linux-5.15.11#]
Reboot the server once.