Ubuntu configs
curl '<https://kernel.ubuntu.com/config/noble/linux/6.8.0-40.40/amd64-config.flavour.generic>' -o .config
# cp /boot/config-$(uname -r) .config
make olddefconfig
Disable dbgsym compilation
scripts/config --disable DEBUG_INFO_DWARF5
# for old kernels:
scripts/config --disable DEBUG_INFO
Disable Canonical certificates
scripts/config --set-str SYSTEM_TRUSTED_KEYS ""
scripts/config --set-str SYSTEM_REVOCATION_KEYS ""
# Set up and apply patches
mkdir patches
# put the patch to patches/
quilt new patches/file.patch
quilt pop -a && quilt push -a
# put the config file
make menuconfig
make bindeb-pkg -j$(nproc) LOCALVERSION=-custom
Compiling 5.4 with newer binutils