Recently, I decided to dive deeper into Linux Kernel. So, I subscribed to some email lists and want to create a VM dedicated for running latest kernel. My first choice is Ubuntu, but it appears that Ubuntu (or Debian I think) has an annotation file limiting you to choose values of flags. Then I installed a Debian and make it running with a Linux 6.0.0-rc4+ kernel.
The step was quite straight and simple, we just need to:
- Clone the Kernel source code
- Copy the config of the current kernel
- Make some changes in menu config
- Compile and install
There are some essential commands I ran:
|
|
If you meet some errors like a subprocess returned an exit status. And the detailed error message is:
|
|
You can get the file from Debian’s GitLab: debian-uefi-certs.pem, and put it to the right location. You may also want to enable some debug flags to make kernel development easier.
Most debug flags are located at Kernel Hacking menu, whiling some flags like driver debug is at Device Drivers menu.
If build succeed, you can find these file and install them by apt or dpkg.
It highly recommended that backup your machine before booting into the new kernel.
After a reboot, we are using the new kernel!