##linux-6.6 build #Build Environment # apt build-dep linux linux-image-unsigned-$(uname -r) # apt install libncurses-dev gawk flex bison openssl libssl-dev dkms libelf-dev libudev-dev libpci-dev libiberty-dev autoconf llvm # apt install gcc-12 gcc-12-x86-64-linux-gnu gcc-12-arm-linux-gnueabihf gcc-12-powerpc64le-linux-gnu gcc-12-riscv64-linux-gnu gcc-12-s390x-linux-gnu #Obtaining the source for an Ubuntu release # apt source linux-image-unsigned-$(uname -r) #Modifying the configuration # chmod a+x debian/rules # chmod a+x debian/scripts/* # chmod a+x debian/scripts/misc/* # fakeroot debian/rules clean # fakeroot debian/rules editconfigs # you need to go through each (Y, Exit, Y, Exit..) or get a complaint about config later # ./debian/scripts/misc/annotationss --arch arm64 --flavour generic --import build/.config # #In order to make your kernel "newer" than the stock Ubuntu kernel from which you are based, you should add a local version modifier. Add something like "+test1" to the end of the first version number in the debian.master/changelog file, before building. This will help identify your kernel when running as it also appears in uname -a. Note that when a new Ubuntu kernel is released that will be newer than your kernel (which needs regenerating), so care is needed when upgrading. NOTE: do not attempt to use CONFIG_LOCALVERSION as this _will_ break the build. #Building the kernel # fakeroot debian/rules clean # dpkg-buildpackage -rfakeroot # #quicker build: # fakeroot debian/rules binary-headers binary-generic binary-perarch # #if you need linux-tools or lowlatency kernel, run instead: # fakeroot debian/rules binary