0001 .. _changes:
0002
0003 Minimal requirements to compile the Kernel
0004 ++++++++++++++++++++++++++++++++++++++++++
0005
0006 Intro
0007 =====
0008
0009 This document is designed to provide a list of the minimum levels of
0010 software necessary to run the current kernel version.
0011
0012 This document is originally based on my "Changes" file for 2.0.x kernels
0013 and therefore owes credit to the same people as that file (Jared Mauch,
0014 Axel Boldt, Alessandro Sigala, and countless other users all over the
0015 'net).
0016
0017 Current Minimal Requirements
0018 ****************************
0019
0020 Upgrade to at **least** these software revisions before thinking you've
0021 encountered a bug! If you're unsure what version you're currently
0022 running, the suggested command should tell you.
0023
0024 Again, keep in mind that this list assumes you are already functionally
0025 running a Linux kernel. Also, not all tools are necessary on all
0026 systems; obviously, if you don't have any PC Card hardware, for example,
0027 you probably needn't concern yourself with pcmciautils.
0028
0029 ====================== =============== ========================================
0030 Program Minimal version Command to check the version
0031 ====================== =============== ========================================
0032 GNU C 5.1 gcc --version
0033 Clang/LLVM (optional) 11.0.0 clang --version
0034 GNU make 3.81 make --version
0035 bash 4.2 bash --version
0036 binutils 2.23 ld -v
0037 flex 2.5.35 flex --version
0038 bison 2.0 bison --version
0039 pahole 1.16 pahole --version
0040 util-linux 2.10o fdformat --version
0041 kmod 13 depmod -V
0042 e2fsprogs 1.41.4 e2fsck -V
0043 jfsutils 1.1.3 fsck.jfs -V
0044 reiserfsprogs 3.6.3 reiserfsck -V
0045 xfsprogs 2.6.0 xfs_db -V
0046 squashfs-tools 4.0 mksquashfs -version
0047 btrfs-progs 0.18 btrfsck
0048 pcmciautils 004 pccardctl -V
0049 quota-tools 3.09 quota -V
0050 PPP 2.4.0 pppd --version
0051 nfs-utils 1.0.5 showmount --version
0052 procps 3.2.0 ps --version
0053 udev 081 udevd --version
0054 grub 0.93 grub --version || grub-install --version
0055 mcelog 0.6 mcelog --version
0056 iptables 1.4.2 iptables -V
0057 openssl & libcrypto 1.0.0 openssl version
0058 bc 1.06.95 bc --version
0059 Sphinx\ [#f1]_ 1.7 sphinx-build --version
0060 cpio any cpio --version
0061 ====================== =============== ========================================
0062
0063 .. [#f1] Sphinx is needed only to build the Kernel documentation
0064
0065 Kernel compilation
0066 ******************
0067
0068 GCC
0069 ---
0070
0071 The gcc version requirements may vary depending on the type of CPU in your
0072 computer.
0073
0074 Clang/LLVM (optional)
0075 ---------------------
0076
0077 The latest formal release of clang and LLVM utils (according to
0078 `releases.llvm.org <https://releases.llvm.org>`_) are supported for building
0079 kernels. Older releases aren't guaranteed to work, and we may drop workarounds
0080 from the kernel that were used to support older versions. Please see additional
0081 docs on :ref:`Building Linux with Clang/LLVM <kbuild_llvm>`.
0082
0083 Make
0084 ----
0085
0086 You will need GNU make 3.81 or later to build the kernel.
0087
0088 Bash
0089 ----
0090
0091 Some bash scripts are used for the kernel build.
0092 Bash 4.2 or newer is needed.
0093
0094 Binutils
0095 --------
0096
0097 Binutils 2.23 or newer is needed to build the kernel.
0098
0099 pkg-config
0100 ----------
0101
0102 The build system, as of 4.18, requires pkg-config to check for installed
0103 kconfig tools and to determine flags settings for use in
0104 'make {g,x}config'. Previously pkg-config was being used but not
0105 verified or documented.
0106
0107 Flex
0108 ----
0109
0110 Since Linux 4.16, the build system generates lexical analyzers
0111 during build. This requires flex 2.5.35 or later.
0112
0113
0114 Bison
0115 -----
0116
0117 Since Linux 4.16, the build system generates parsers
0118 during build. This requires bison 2.0 or later.
0119
0120 pahole:
0121 -------
0122
0123 Since Linux 5.2, if CONFIG_DEBUG_INFO_BTF is selected, the build system
0124 generates BTF (BPF Type Format) from DWARF in vmlinux, a bit later from kernel
0125 modules as well. This requires pahole v1.16 or later.
0126
0127 It is found in the 'dwarves' or 'pahole' distro packages or from
0128 https://fedorapeople.org/~acme/dwarves/.
0129
0130 Perl
0131 ----
0132
0133 You will need perl 5 and the following modules: ``Getopt::Long``,
0134 ``Getopt::Std``, ``File::Basename``, and ``File::Find`` to build the kernel.
0135
0136 BC
0137 --
0138
0139 You will need bc to build kernels 3.10 and higher
0140
0141
0142 OpenSSL
0143 -------
0144
0145 Module signing and external certificate handling use the OpenSSL program and
0146 crypto library to do key creation and signature generation.
0147
0148 You will need openssl to build kernels 3.7 and higher if module signing is
0149 enabled. You will also need openssl development packages to build kernels 4.3
0150 and higher.
0151
0152
0153 System utilities
0154 ****************
0155
0156 Architectural changes
0157 ---------------------
0158
0159 DevFS has been obsoleted in favour of udev
0160 (https://www.kernel.org/pub/linux/utils/kernel/hotplug/)
0161
0162 32-bit UID support is now in place. Have fun!
0163
0164 Linux documentation for functions is transitioning to inline
0165 documentation via specially-formatted comments near their
0166 definitions in the source. These comments can be combined with ReST
0167 files the Documentation/ directory to make enriched documentation, which can
0168 then be converted to PostScript, HTML, LaTex, ePUB and PDF files.
0169 In order to convert from ReST format to a format of your choice, you'll need
0170 Sphinx.
0171
0172 Util-linux
0173 ----------
0174
0175 New versions of util-linux provide ``fdisk`` support for larger disks,
0176 support new options to mount, recognize more supported partition
0177 types, have a fdformat which works with 2.4 kernels, and similar goodies.
0178 You'll probably want to upgrade.
0179
0180 Ksymoops
0181 --------
0182
0183 If the unthinkable happens and your kernel oopses, you may need the
0184 ksymoops tool to decode it, but in most cases you don't.
0185 It is generally preferred to build the kernel with ``CONFIG_KALLSYMS`` so
0186 that it produces readable dumps that can be used as-is (this also
0187 produces better output than ksymoops). If for some reason your kernel
0188 is not build with ``CONFIG_KALLSYMS`` and you have no way to rebuild and
0189 reproduce the Oops with that option, then you can still decode that Oops
0190 with ksymoops.
0191
0192 Mkinitrd
0193 --------
0194
0195 These changes to the ``/lib/modules`` file tree layout also require that
0196 mkinitrd be upgraded.
0197
0198 E2fsprogs
0199 ---------
0200
0201 The latest version of ``e2fsprogs`` fixes several bugs in fsck and
0202 debugfs. Obviously, it's a good idea to upgrade.
0203
0204 JFSutils
0205 --------
0206
0207 The ``jfsutils`` package contains the utilities for the file system.
0208 The following utilities are available:
0209
0210 - ``fsck.jfs`` - initiate replay of the transaction log, and check
0211 and repair a JFS formatted partition.
0212
0213 - ``mkfs.jfs`` - create a JFS formatted partition.
0214
0215 - other file system utilities are also available in this package.
0216
0217 Reiserfsprogs
0218 -------------
0219
0220 The reiserfsprogs package should be used for reiserfs-3.6.x
0221 (Linux kernels 2.4.x). It is a combined package and contains working
0222 versions of ``mkreiserfs``, ``resize_reiserfs``, ``debugreiserfs`` and
0223 ``reiserfsck``. These utils work on both i386 and alpha platforms.
0224
0225 Xfsprogs
0226 --------
0227
0228 The latest version of ``xfsprogs`` contains ``mkfs.xfs``, ``xfs_db``, and the
0229 ``xfs_repair`` utilities, among others, for the XFS filesystem. It is
0230 architecture independent and any version from 2.0.0 onward should
0231 work correctly with this version of the XFS kernel code (2.6.0 or
0232 later is recommended, due to some significant improvements).
0233
0234 PCMCIAutils
0235 -----------
0236
0237 PCMCIAutils replaces ``pcmcia-cs``. It properly sets up
0238 PCMCIA sockets at system startup and loads the appropriate modules
0239 for 16-bit PCMCIA devices if the kernel is modularized and the hotplug
0240 subsystem is used.
0241
0242 Quota-tools
0243 -----------
0244
0245 Support for 32 bit uid's and gid's is required if you want to use
0246 the newer version 2 quota format. Quota-tools version 3.07 and
0247 newer has this support. Use the recommended version or newer
0248 from the table above.
0249
0250 Intel IA32 microcode
0251 --------------------
0252
0253 A driver has been added to allow updating of Intel IA32 microcode,
0254 accessible as a normal (misc) character device. If you are not using
0255 udev you may need to::
0256
0257 mkdir /dev/cpu
0258 mknod /dev/cpu/microcode c 10 184
0259 chmod 0644 /dev/cpu/microcode
0260
0261 as root before you can use this. You'll probably also want to
0262 get the user-space microcode_ctl utility to use with this.
0263
0264 udev
0265 ----
0266
0267 ``udev`` is a userspace application for populating ``/dev`` dynamically with
0268 only entries for devices actually present. ``udev`` replaces the basic
0269 functionality of devfs, while allowing persistent device naming for
0270 devices.
0271
0272 FUSE
0273 ----
0274
0275 Needs libfuse 2.4.0 or later. Absolute minimum is 2.3.0 but mount
0276 options ``direct_io`` and ``kernel_cache`` won't work.
0277
0278 Networking
0279 **********
0280
0281 General changes
0282 ---------------
0283
0284 If you have advanced network configuration needs, you should probably
0285 consider using the network tools from ip-route2.
0286
0287 Packet Filter / NAT
0288 -------------------
0289 The packet filtering and NAT code uses the same tools like the previous 2.4.x
0290 kernel series (iptables). It still includes backwards-compatibility modules
0291 for 2.2.x-style ipchains and 2.0.x-style ipfwadm.
0292
0293 PPP
0294 ---
0295
0296 The PPP driver has been restructured to support multilink and to
0297 enable it to operate over diverse media layers. If you use PPP,
0298 upgrade pppd to at least 2.4.0.
0299
0300 If you are not using udev, you must have the device file /dev/ppp
0301 which can be made by::
0302
0303 mknod /dev/ppp c 108 0
0304
0305 as root.
0306
0307 NFS-utils
0308 ---------
0309
0310 In ancient (2.4 and earlier) kernels, the nfs server needed to know
0311 about any client that expected to be able to access files via NFS. This
0312 information would be given to the kernel by ``mountd`` when the client
0313 mounted the filesystem, or by ``exportfs`` at system startup. exportfs
0314 would take information about active clients from ``/var/lib/nfs/rmtab``.
0315
0316 This approach is quite fragile as it depends on rmtab being correct
0317 which is not always easy, particularly when trying to implement
0318 fail-over. Even when the system is working well, ``rmtab`` suffers from
0319 getting lots of old entries that never get removed.
0320
0321 With modern kernels we have the option of having the kernel tell mountd
0322 when it gets a request from an unknown host, and mountd can give
0323 appropriate export information to the kernel. This removes the
0324 dependency on ``rmtab`` and means that the kernel only needs to know about
0325 currently active clients.
0326
0327 To enable this new functionality, you need to::
0328
0329 mount -t nfsd nfsd /proc/fs/nfsd
0330
0331 before running exportfs or mountd. It is recommended that all NFS
0332 services be protected from the internet-at-large by a firewall where
0333 that is possible.
0334
0335 mcelog
0336 ------
0337
0338 On x86 kernels the mcelog utility is needed to process and log machine check
0339 events when ``CONFIG_X86_MCE`` is enabled. Machine check events are errors
0340 reported by the CPU. Processing them is strongly encouraged.
0341
0342 Kernel documentation
0343 ********************
0344
0345 Sphinx
0346 ------
0347
0348 Please see :ref:`sphinx_install` in :ref:`Documentation/doc-guide/sphinx.rst <sphinxdoc>`
0349 for details about Sphinx requirements.
0350
0351 Getting updated software
0352 ========================
0353
0354 Kernel compilation
0355 ******************
0356
0357 gcc
0358 ---
0359
0360 - <ftp://ftp.gnu.org/gnu/gcc/>
0361
0362 Clang/LLVM
0363 ----------
0364
0365 - :ref:`Getting LLVM <getting_llvm>`.
0366
0367 Make
0368 ----
0369
0370 - <ftp://ftp.gnu.org/gnu/make/>
0371
0372 Bash
0373 ----
0374
0375 - <ftp://ftp.gnu.org/gnu/bash/>
0376
0377 Binutils
0378 --------
0379
0380 - <https://www.kernel.org/pub/linux/devel/binutils/>
0381
0382 Flex
0383 ----
0384
0385 - <https://github.com/westes/flex/releases>
0386
0387 Bison
0388 -----
0389
0390 - <ftp://ftp.gnu.org/gnu/bison/>
0391
0392 OpenSSL
0393 -------
0394
0395 - <https://www.openssl.org/>
0396
0397 System utilities
0398 ****************
0399
0400 Util-linux
0401 ----------
0402
0403 - <https://www.kernel.org/pub/linux/utils/util-linux/>
0404
0405 Kmod
0406 ----
0407
0408 - <https://www.kernel.org/pub/linux/utils/kernel/kmod/>
0409 - <https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git>
0410
0411 Ksymoops
0412 --------
0413
0414 - <https://www.kernel.org/pub/linux/utils/kernel/ksymoops/v2.4/>
0415
0416 Mkinitrd
0417 --------
0418
0419 - <https://code.launchpad.net/initrd-tools/main>
0420
0421 E2fsprogs
0422 ---------
0423
0424 - <https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/>
0425 - <https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git/>
0426
0427 JFSutils
0428 --------
0429
0430 - <http://jfs.sourceforge.net/>
0431
0432 Reiserfsprogs
0433 -------------
0434
0435 - <https://git.kernel.org/pub/scm/linux/kernel/git/jeffm/reiserfsprogs.git/>
0436
0437 Xfsprogs
0438 --------
0439
0440 - <https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git>
0441 - <https://www.kernel.org/pub/linux/utils/fs/xfs/xfsprogs/>
0442
0443 Pcmciautils
0444 -----------
0445
0446 - <https://www.kernel.org/pub/linux/utils/kernel/pcmcia/>
0447
0448 Quota-tools
0449 -----------
0450
0451 - <http://sourceforge.net/projects/linuxquota/>
0452
0453
0454 Intel P6 microcode
0455 ------------------
0456
0457 - <https://downloadcenter.intel.com/>
0458
0459 udev
0460 ----
0461
0462 - <https://www.freedesktop.org/software/systemd/man/udev.html>
0463
0464 FUSE
0465 ----
0466
0467 - <https://github.com/libfuse/libfuse/releases>
0468
0469 mcelog
0470 ------
0471
0472 - <http://www.mcelog.org/>
0473
0474 cpio
0475 ----
0476
0477 - <https://www.gnu.org/software/cpio/>
0478
0479 Networking
0480 **********
0481
0482 PPP
0483 ---
0484
0485 - <https://download.samba.org/pub/ppp/>
0486 - <https://git.ozlabs.org/?p=ppp.git>
0487 - <https://github.com/paulusmack/ppp/>
0488
0489 NFS-utils
0490 ---------
0491
0492 - <http://sourceforge.net/project/showfiles.php?group_id=14>
0493
0494 Iptables
0495 --------
0496
0497 - <https://netfilter.org/projects/iptables/index.html>
0498
0499 Ip-route2
0500 ---------
0501
0502 - <https://www.kernel.org/pub/linux/utils/net/iproute2/>
0503
0504 OProfile
0505 --------
0506
0507 - <http://oprofile.sf.net/download/>
0508
0509 NFS-Utils
0510 ---------
0511
0512 - <http://nfs.sourceforge.net/>
0513
0514 Kernel documentation
0515 ********************
0516
0517 Sphinx
0518 ------
0519
0520 - <https://www.sphinx-doc.org/>