Build Linux Kernel for Debian11 Bullseye

Concept of Core Steps

The typical workflow of building a software could be generalized as 3 steps: collecting source code (including build dependencies), assembling (configuring, building, compiling, and linking), and deployment. When working on anything related to debian (or say debian packages), paying attention on how the files under debian directory play the role of "assembling" will pay off.

For example, in Ubuntu, we use debian/rules directly to build the corresponding Linux kernel. That is, fakeroot debian/rules binary-generic, for example. See Ubuntu Wiki and this post. But in Debian, we use make (and then invoke debian/rules). See Debian Wiki.

When looking for documents, keep in mind which step of the 3 steps we are looking at will help you not get lost in different and variant commands. Several questions asking yourself may help:

The Core Steps

According to Debian Wiki, I execute the core steps by the following commands: