Before you build the kernel, verify that your system meets the minimum software requirements listed here. Running an outdated toolchain is a common source of mysterious build failures — the kernel’sDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/deelerdev/linux/llms.txt
Use this file to discover all available pages before exploring further.
Makefile will outright refuse to proceed if GNU Make is too old.
You can check all installed tool versions at once by running:
Current kernel version
The source files in this documentation correspond to Linux 7.1-rc3 (codename: Baby Opossum Posse), as defined in the top-levelMakefile:
Minimum required versions
Upgrade to at least these versions before reporting a build issue. The command shown in the third column prints the installed version on your system.| Program | Minimum version | Check command |
|---|---|---|
| bash | 4.2 | bash --version |
| bc | 1.06.95 | bc --version |
| binutils | 2.30 | ld -v |
| bison | 2.0 | bison --version |
| flex | 2.5.35 | flex --version |
| GNU C (gcc) | 8.1 | gcc --version |
| GNU make | 4.0 | make --version |
| GNU tar | 1.28 | tar --version |
| kmod | 13 | kmod -V |
| openssl & libcrypto | 1.0.0 | openssl version |
| pahole | 1.22 | pahole --version |
| Perl | 5 | perl --version |
| Python | 3.9.x | python3 --version |
| util-linux | 2.10o | mount --version |
Not every tool is required on every system. If you are not using a particular feature — for example, PC Card hardware or NFS — you do not need the corresponding utility.
Core build tools
GNU C (gcc)
GCC 8.1 or later is required. The exact version requirements may vary depending on your CPU architecture. Check your installed version with:GNU make
The kernel’s build system requires GNU Make 4.0 or later. TheMakefile enforces this at the start of every build and will exit with an error if the requirement is not met:
Binutils
Binutils 2.30 or later provides the linker (ld) and other binary utilities. Check with:
Bash
Several kernel build scripts require Bash 4.2 or newer:flex and bison
Since Linux 4.16, the build system generates lexical analyzers and parsers during the build. This requires flex 2.5.35 or later and bison 2.0 or later:pahole
Since Linux 5.2, ifCONFIG_DEBUG_INFO_BTF is selected, the build generates BTF (BPF Type Format) from DWARF debug info. This requires pahole 1.22 or later, found in the dwarves or pahole package on most distributions:
OpenSSL
Module signing and external certificate handling require the OpenSSL program and its development headers. Required for kernels 3.7 and later when module signing is enabled, and for all kernels 4.3 and later:pkg-config
Since Linux 4.18, the build system uses pkg-config to detect installed kconfig tools and determine flags formake {g,x}config. Install it from your distribution’s package manager.
Optional tools
Clang / LLVM (optional, minimum 15.0.0)
Clang / LLVM (optional, minimum 15.0.0)
You can build the kernel with Clang and LLVM as an alternative to GCC. Only the latest formal release from releases.llvm.org is supported; older releases are not guaranteed to work and workarounds for them may be removed from the kernel at any time.See the kernel documentation on Building Linux with Clang/LLVM for further details.
Rust toolchain (optional, minimum rustc 1.85.0)
Rust toolchain (optional, minimum rustc 1.85.0)
Rust support is optional and requires a recent stable Rust compiler. Check your installed version:To verify that the full Rust toolchain is detected correctly by the build system, run:See
Documentation/rust/quick-start.rst in the kernel source for complete Rust setup instructions.bindgen (optional, minimum 0.71.1)
bindgen (optional, minimum 0.71.1)
bindgen generates Rust bindings to the C side of the kernel. It depends on libclang and is required only when building with Rust support enabled.GNU AWK (optional, minimum 5.1.0)
GNU AWK (optional, minimum 5.1.0)
GNU AWK is required if you enable
CONFIG_BUILTIN_MODULE_RANGES, which generates address range data for built-in modules.gtags / GNU GLOBAL (optional, minimum 6.6.5)
gtags / GNU GLOBAL (optional, minimum 6.6.5)
mkimage (optional, minimum 2017.01)
mkimage (optional, minimum 2017.01)
Used when building a Flat Image Tree (FIT), which is commonly required on ARM platforms. Available via the
u-boot-tools package.Sphinx (optional, minimum 3.4.3)
Sphinx (optional, minimum 3.4.3)
Required only if you want to build the kernel’s HTML, PDF, or other formatted documentation from the
Documentation/ directory.Perl modules
You need Perl 5 and the following modules to build the kernel:Getopt::LongGetopt::StdFile::BasenameFile::Find
Python
Python 3.9 or later is required by several configuration options, includingarm/arm64 default configs, CONFIG_LTO_CLANG, some DRM optional configs, the kernel-doc tool, and the Sphinx documentation build.
Next steps
Build the kernel
Follow the step-by-step guide to clone, configure, and compile your kernel.
Submitting patches
Learn how to contribute your changes back to the kernel.
