Something went wrong. Try again.
(I'm so sorry!) Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
Something went wrong. Try again.
16 kB · 578 lines
at master
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579.. _changes:
Minimal requirements to compile the Kernel++++++++++++++++++++++++++++++++++++++++++
Intro=====
This document is designed to provide a list of the minimum levels ofsoftware necessary to run the current kernel version.
This document is originally based on my "Changes" file for 2.0.x kernelsand therefore owes credit to the same people as that file (Jared Mauch,Axel Boldt, Alessandro Sigala, and countless other users all over the'net).
Current Minimal Requirements****************************
Upgrade to at **least** these software revisions before thinking you'veencountered a bug! If you're unsure what version you're currentlyrunning, the suggested command should tell you. For a list of the programson your system including their version execute ./scripts/ver_linux
Again, keep in mind that this list assumes you are already functionallyrunning a Linux kernel. Also, not all tools are necessary on allsystems; obviously, if you don't have any PC Card hardware, for example,you probably do not need to concern yourself with pcmciautils.
====================== =============== ======================================== Program Minimal version Command to check the version====================== =============== ========================================bash 4.2 bash --versionbc 1.06.95 bc --versionbindgen (optional) 0.71.1 bindgen --versionbinutils 2.30 ld -vbison 2.0 bison --versionbtrfs-progs 0.18 btrfs --versionClang/LLVM (optional) 17.0.1 clang --versione2fsprogs 1.41.4 e2fsck -Vflex 2.5.35 flex --versiongdb 7.2 gdb --versionGNU awk (optional) 5.1.0 gawk --versionGNU C 8.1 gcc --versionGNU make 4.0 make --versionGNU tar 1.28 tar --versionGRUB 0.93 grub --version || grub-install --versiongtags (optional) 6.6.5 gtags --versioniptables 1.4.2 iptables -Vjfsutils 1.1.3 fsck.jfs -Vkmod 13 kmod -Vmcelog 0.6 mcelog --versionmkimage (optional) 2017.01 mkimage --versionnfs-utils 1.0.5 showmount --versionopenssl & libcrypto 1.0.0 openssl versionpahole 1.26 pahole --versionpcmciautils 004 pccardctl -Vpigz (optional) 2.4 pigz --versionPPP 2.4.0 pppd --versionprocps 3.2.0 ps --versionPython 3.9.x python3 --versionquota-tools 3.09 quota -VRust (optional) 1.85.0 rustc --versionSphinx\ [#f1]_ 3.4.3 sphinx-build --versionsquashfs-tools 4.0 mksquashfs -versionudev 081 udevadm --versionutil-linux 2.10o mount --versionxfsprogs 2.6.0 xfs_db -V====================== =============== ========================================
.. [#f1] Sphinx is needed only to build the Kernel documentation
Kernel compilation******************
GCC---
The gcc version requirements may vary depending on the type of CPU in yourcomputer.
Clang/LLVM (optional)---------------------
The latest formal release of clang and LLVM utils (according to`releases.llvm.org <https://releases.llvm.org>`_) are supported for buildingkernels. Older releases aren't guaranteed to work, and we may drop workaroundsfrom the kernel that were used to support older versions. Please see additionaldocs on :ref:`Building Linux with Clang/LLVM <kbuild_llvm>`.
Rust (optional)---------------
A recent version of the Rust compiler is required.
Please see Documentation/rust/quick-start.rst for instructions on how tosatisfy the build requirements of Rust support. In particular, the ``Makefile``target ``rustavailable`` is useful to check why the Rust toolchain may notbe detected.
bindgen (optional)------------------
``bindgen`` is used to generate the Rust bindings to the C side of the kernel.It depends on ``libclang``.
Make----
You will need GNU make 4.0 or later to build the kernel.
Bash----
Some bash scripts are used for the kernel build.Bash 4.2 or newer is needed.
Binutils--------
Binutils 2.30 or newer is needed to build the kernel.
pkg-config----------
The build system, as of 4.18, requires pkg-config to check for installedkconfig tools and to determine flags settings for use in'make {g,x}config'. Previously pkg-config was being used but notverified or documented.
Flex----
Since Linux 4.16, the build system generates lexical analyzersduring build. This requires flex 2.5.35 or later.
Bison-----
Since Linux 4.16, the build system generates parsersduring build. This requires bison 2.0 or later.
pahole------
Since Linux 5.2, if CONFIG_DEBUG_INFO_BTF is selected, the build systemgenerates BTF (BPF Type Format) from DWARF in vmlinux, a bit later from kernelmodules as well. This requires pahole v1.22 or later.
It is found in the 'dwarves' or 'pahole' distro packages or fromhttps://fedorapeople.org/~acme/dwarves/.
Perl----
You will need perl 5 and the following modules: ``Getopt::Long``,``Getopt::Std``, ``File::Basename``, and ``File::Find`` to build the kernel.
Python------
Several config options require it: it is required for arm/arm64default configs, CONFIG_LTO_CLANG, some DRM optional configs,the kernel-doc tool, and docs build (Sphinx), among others.
BC--
You will need bc to build kernels 3.10 and higher
OpenSSL-------
Module signing and external certificate handling use the OpenSSL program andcrypto library to do key creation and signature generation.
You will need openssl to build kernels 3.7 and higher if module signing isenabled. You will also need openssl development packages to build kernels 4.3and higher.
Tar---
GNU tar is needed if you want to enable access to the kernel headers via sysfs(CONFIG_IKHEADERS).
gtags / GNU GLOBAL (optional)-----------------------------
The kernel build requires GNU GLOBAL version 6.6.5 or later to generatetag files through ``make gtags``. This is due to its use of the gtags``-C (--directory)`` flag.
mkimage-------
This tool is used when building a Flat Image Tree (FIT), commonly used on ARMplatforms. The tool is available via the ``u-boot-tools`` package or can bebuilt from the U-Boot source code. See the instructions athttps://docs.u-boot.org/en/latest/build/tools.html#building-tools-for-linux
GNU AWK-------
GNU AWK is needed if you want kernel builds to generate address range data forbuiltin modules (CONFIG_BUILTIN_MODULE_RANGES).
pigz (optional)---------------
pigz is a parallel implementation of gzip. If it is installed the compressedkernel image is produced with it rather than with gzip, see ``KPGZIP`` inDocumentation/kbuild/kbuild.rst.
System utilities****************
Architectural changes---------------------
DevFS has been obsoleted in favour of udev(https://www.kernel.org/pub/linux/utils/kernel/hotplug/)
32-bit UID support is now in place. Have fun!
Linux documentation for functions is transitioning to inlinedocumentation via specially-formatted comments near theirdefinitions in the source. These comments can be combined with ReSTfiles in the Documentation/ directory to make enriched documentation, which canthen be converted to PostScript, HTML, LaTex, ePUB and PDF files.In order to convert from ReST format to a format of your choice, you'll needSphinx.
Util-linux----------
New versions of util-linux provide ``fdisk`` support for larger disks,support new options to mount, recognize more supported partitiontypes, and similar goodies.You'll probably want to upgrade.
Ksymoops--------
If the unthinkable happens and your kernel oopses, you may need theksymoops tool to decode it, but in most cases you don't.It is generally preferred to build the kernel with ``CONFIG_KALLSYMS`` sothat it produces readable dumps that can be used as-is (this alsoproduces better output than ksymoops). If for some reason your kernelis not build with ``CONFIG_KALLSYMS`` and you have no way to rebuild andreproduce the Oops with that option, then you can still decode that Oopswith ksymoops.
Mkinitrd--------
These changes to the ``/lib/modules`` file tree layout also require thatmkinitrd be upgraded.
E2fsprogs---------
The latest version of ``e2fsprogs`` fixes several bugs in fsck anddebugfs. Obviously, it's a good idea to upgrade.
JFSutils--------
The ``jfsutils`` package contains the utilities for the file system.The following utilities are available:
- ``fsck.jfs`` - initiate replay of the transaction log, and check and repair a JFS formatted partition.
- ``mkfs.jfs`` - create a JFS formatted partition.
- other file system utilities are also available in this package.
Xfsprogs--------
The latest version of ``xfsprogs`` contains ``mkfs.xfs``, ``xfs_db``, and the``xfs_repair`` utilities, among others, for the XFS filesystem. It isarchitecture independent and any version from 2.0.0 onward shouldwork correctly with this version of the XFS kernel code (2.6.0 orlater is recommended, due to some significant improvements).
PCMCIAutils-----------
PCMCIAutils replaces ``pcmcia-cs``. It properly sets upPCMCIA sockets at system startup and loads the appropriate modulesfor 16-bit PCMCIA devices if the kernel is modularized and the hotplugsubsystem is used.
Quota-tools-----------
Support for 32 bit uid's and gid's is required if you want to usethe newer version 2 quota format. Quota-tools version 3.07 andnewer has this support. Use the recommended version or newerfrom the table above.
Intel IA32 microcode--------------------
A driver has been added to allow updating of Intel IA32 microcode,accessible as a normal (misc) character device. If you are not usingudev you may need to::
mkdir /dev/cpu mknod /dev/cpu/microcode c 10 184 chmod 0644 /dev/cpu/microcode
as root before you can use this. You'll probably also want toget the user-space microcode_ctl utility to use with this.
udev----
``udev`` is a userspace application for populating ``/dev`` dynamically withonly entries for devices actually present. ``udev`` replaces the basicfunctionality of devfs, while allowing persistent device naming fordevices.
FUSE----
Needs libfuse 2.4.0 or later. Absolute minimum is 2.3.0 but mountoptions ``direct_io`` and ``kernel_cache`` won't work.
Networking**********
General changes---------------
If you have advanced network configuration needs, you should probablyconsider using the network tools from ip-route2.
Packet Filter / NAT-------------------The packet filtering and NAT code uses the same tools like the previous 2.4.xkernel series (iptables). It still includes backwards-compatibility modulesfor 2.2.x-style ipchains and 2.0.x-style ipfwadm.
PPP---
The PPP driver has been restructured to support multilink and toenable it to operate over diverse media layers. If you use PPP,upgrade pppd to at least 2.4.0.
If you are not using udev, you must have the device file /dev/pppwhich can be made by::
mknod /dev/ppp c 108 0
as root.
NFS-utils---------
In ancient (2.4 and earlier) kernels, the nfs server needed to knowabout any client that expected to be able to access files via NFS. Thisinformation would be given to the kernel by ``mountd`` when the clientmounted the filesystem, or by ``exportfs`` at system startup. exportfswould take information about active clients from ``/var/lib/nfs/rmtab``.
This approach is quite fragile as it depends on rmtab being correctwhich is not always easy, particularly when trying to implementfail-over. Even when the system is working well, ``rmtab`` suffers fromgetting lots of old entries that never get removed.
With modern kernels we have the option of having the kernel tell mountdwhen it gets a request from an unknown host, and mountd can giveappropriate export information to the kernel. This removes thedependency on ``rmtab`` and means that the kernel only needs to know aboutcurrently active clients.
To enable this new functionality, you need to::
mount -t nfsd nfsd /proc/fs/nfsd
before running exportfs or mountd. It is recommended that all NFSservices be protected from the internet-at-large by a firewall wherethat is possible.
mcelog------
On x86 kernels the mcelog utility is needed to process and log machine checkevents when ``CONFIG_X86_MCE`` is enabled. Machine check events are errorsreported by the CPU. Processing them is strongly encouraged.
Kernel documentation********************
Sphinx------
Please see :ref:`sphinx_install` in Documentation/doc-guide/sphinx.rstfor details about Sphinx requirements.
rustdoc-------
``rustdoc`` is used to generate the documentation for Rust code. Please seeDocumentation/rust/general-information.rst for more information.
Getting updated software========================
Kernel compilation******************
gcc---
- <ftp://ftp.gnu.org/gnu/gcc/>
Clang/LLVM----------
- :ref:`Getting LLVM <getting_llvm>`.
Rust----
- Documentation/rust/quick-start.rst.
bindgen-------
- Documentation/rust/quick-start.rst.
Make----
- <ftp://ftp.gnu.org/gnu/make/>
Bash----
- <ftp://ftp.gnu.org/gnu/bash/>
Binutils--------
- <https://www.kernel.org/pub/linux/devel/binutils/>
Flex----
- <https://github.com/westes/flex/releases>
Bison-----
- <ftp://ftp.gnu.org/gnu/bison/>
OpenSSL-------
- <https://www.openssl.org/>
System utilities****************
Util-linux----------
- <https://www.kernel.org/pub/linux/utils/util-linux/>
Kmod----
- <https://www.kernel.org/pub/linux/utils/kernel/kmod/>- <https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git>
Ksymoops--------
- <https://www.kernel.org/pub/linux/utils/kernel/ksymoops/v2.4/>
Mkinitrd--------
- <https://code.launchpad.net/initrd-tools/main>
E2fsprogs---------
- <https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/>- <https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git/>
JFSutils--------
- <https://jfs.sourceforge.net/>
Xfsprogs--------
- <https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git>- <https://www.kernel.org/pub/linux/utils/fs/xfs/xfsprogs/>
Pcmciautils-----------
- <https://www.kernel.org/pub/linux/utils/kernel/pcmcia/>
Quota-tools-----------
- <https://sourceforge.net/projects/linuxquota/>
Intel P6 microcode------------------
- <https://downloadcenter.intel.com/>
udev----
- <https://www.freedesktop.org/software/systemd/man/udev.html>
FUSE----
- <https://github.com/libfuse/libfuse/releases>
mcelog------
- <https://www.mcelog.org/>
Networking**********
PPP---
- <https://download.samba.org/pub/ppp/>- <https://git.ozlabs.org/?p=ppp.git>- <https://github.com/paulusmack/ppp/>
NFS-utils---------
- <https://sourceforge.net/project/showfiles.php?group_id=14>- <https://nfs.sourceforge.net/>
Iptables--------
- <https://netfilter.org/projects/iptables/index.html>
Ip-route2---------
- <https://www.kernel.org/pub/linux/utils/net/iproute2/>
OProfile--------
- <https://oprofile.sf.net/download/>
Kernel documentation********************
Sphinx------
- <https://www.sphinx-doc.org/>