Search code examples
ubuntulinux-kerneldebian-packaging

making kernel image debian packages from kernel source


I am on Ubuntu 21.10 which has linux 5.13.0 version.

Ubuntu has no newer kernels than that, other than an OEM 5.14.

However, to use the Integrated GPU of an Alder Lake CPU, you need 5.16 or higher, which neither Ubuntu not Debian provides.

Hence... building linux 5.16.5 from source.

However, if you grab the source from kernel.org then you will not have the part that creates a debian package.

The ./linux-5.16.5/debian/ directory does not exist.

I could build a kernel, but I want to install that kernel as a package, not just blindly copy them over to /boot as that seems more dangerous and messy.

So, apt-get source will not get me to 5.16, and the raw kernel sources do not get me to a .deb package.

How should I proceed?


Solution

  • In the end, I opted for a non-package install. To get there:

    • $ sudo apt install dwarves
    • $ cd linux-5-16-5
    • $ make menuconfig
    • My root is NVMe, so I had to make sure that NVMe support was baked in [*] and not just a module [M]
    • Ubuntu's certificates get in the way, so you need to manually edit the .config file.
    • Use CONFIG_SYSTEM_TRUSTED_KEYS=""
    • Use CONFIG_SYSTEM_REVOCATION_KEYS=""
    • $ make -j20
    • $ sudo make install modules_install
    • $ sudo update-grub

    This got me a working linux kernel that GRUB will use when selecting Ubuntu. (You can select a different kernel in the Special Options.)

    Booting with 5.16.5 gives me a working Intel GPU, that will be used by Xorg.

    You can verify with:

    $ sudo apt install intel-gpu-tools
    $ sudo intel_gpu_top