What You Need to Build a Kernel

As with any package, the kernel source includes documentation explaining what you need to compile a functional kernel. These three aspects of your system are particularly important for building a kernel:

  • A C compiler (gcc). Most distributions put the C compiler in a development tools package. Make sure that your C compiler agrees with the recommendations in the kernel source code, specifically the README file. Kernel developers have not been eager to adopt the latest versions of gcc. Some distributions have a separate compiler named kgcc for compiling the kernel.

  • Disk space. A new kernel source tree can easily unpack to more than 100MB even before building any object files.

  • A relatively fast computer with plenty of ...

Get How Linux Works now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.