xref: /openbmc/linux/Documentation/process/changes.rst (revision b230235b386589d8f0d631b1c77a95ca79bb0732)
1.. _changes:
2
3Minimal requirements to compile the Kernel
4++++++++++++++++++++++++++++++++++++++++++
5
6Intro
7=====
8
9This document is designed to provide a list of the minimum levels of
10software necessary to run the current kernel version.
11
12This document is originally based on my "Changes" file for 2.0.x kernels
13and therefore owes credit to the same people as that file (Jared Mauch,
14Axel Boldt, Alessandro Sigala, and countless other users all over the
15'net).
16
17Current Minimal Requirements
18****************************
19
20Upgrade to at **least** these software revisions before thinking you've
21encountered a bug!  If you're unsure what version you're currently
22running, the suggested command should tell you.
23
24Again, keep in mind that this list assumes you are already functionally
25running a Linux kernel.  Also, not all tools are necessary on all
26systems; obviously, if you don't have any PC Card hardware, for example,
27you probably needn't concern yourself with pcmciautils.
28
29====================== ===============  ========================================
30        Program        Minimal version       Command to check the version
31====================== ===============  ========================================
32GNU C                  5.1              gcc --version
33Clang/LLVM (optional)  11.0.0           clang --version
34Rust (optional)        1.62.0           rustc --version
35bindgen (optional)     0.56.0           bindgen --version
36GNU make               3.82             make --version
37bash                   4.2              bash --version
38binutils               2.25             ld -v
39flex                   2.5.35           flex --version
40bison                  2.0              bison --version
41pahole                 1.16             pahole --version
42util-linux             2.10o            fdformat --version
43kmod                   13               depmod -V
44e2fsprogs              1.41.4           e2fsck -V
45jfsutils               1.1.3            fsck.jfs -V
46reiserfsprogs          3.6.3            reiserfsck -V
47xfsprogs               2.6.0            xfs_db -V
48squashfs-tools         4.0              mksquashfs -version
49btrfs-progs            0.18             btrfsck
50pcmciautils            004              pccardctl -V
51quota-tools            3.09             quota -V
52PPP                    2.4.0            pppd --version
53nfs-utils              1.0.5            showmount --version
54procps                 3.2.0            ps --version
55udev                   081              udevd --version
56grub                   0.93             grub --version || grub-install --version
57mcelog                 0.6              mcelog --version
58iptables               1.4.2            iptables -V
59openssl & libcrypto    1.0.0            openssl version
60bc                     1.06.95          bc --version
61Sphinx\ [#f1]_         1.7              sphinx-build --version
62cpio                   any              cpio --version
63gtags (optional)       6.6.5            gtags --version
64====================== ===============  ========================================
65
66.. [#f1] Sphinx is needed only to build the Kernel documentation
67
68Kernel compilation
69******************
70
71GCC
72---
73
74The gcc version requirements may vary depending on the type of CPU in your
75computer.
76
77Clang/LLVM (optional)
78---------------------
79
80The latest formal release of clang and LLVM utils (according to
81`releases.llvm.org <https://releases.llvm.org>`_) are supported for building
82kernels. Older releases aren't guaranteed to work, and we may drop workarounds
83from the kernel that were used to support older versions. Please see additional
84docs on :ref:`Building Linux with Clang/LLVM <kbuild_llvm>`.
85
86Rust (optional)
87---------------
88
89A particular version of the Rust toolchain is required. Newer versions may or
90may not work because the kernel depends on some unstable Rust features, for
91the moment.
92
93Each Rust toolchain comes with several "components", some of which are required
94(like ``rustc``) and some that are optional. The ``rust-src`` component (which
95is optional) needs to be installed to build the kernel. Other components are
96useful for developing.
97
98Please see Documentation/rust/quick-start.rst for instructions on how to
99satisfy the build requirements of Rust support. In particular, the ``Makefile``
100target ``rustavailable`` is useful to check why the Rust toolchain may not
101be detected.
102
103bindgen (optional)
104------------------
105
106``bindgen`` is used to generate the Rust bindings to the C side of the kernel.
107It depends on ``libclang``.
108
109Make
110----
111
112You will need GNU make 3.82 or later to build the kernel.
113
114Bash
115----
116
117Some bash scripts are used for the kernel build.
118Bash 4.2 or newer is needed.
119
120Binutils
121--------
122
123Binutils 2.25 or newer is needed to build the kernel.
124
125pkg-config
126----------
127
128The build system, as of 4.18, requires pkg-config to check for installed
129kconfig tools and to determine flags settings for use in
130'make {g,x}config'.  Previously pkg-config was being used but not
131verified or documented.
132
133Flex
134----
135
136Since Linux 4.16, the build system generates lexical analyzers
137during build.  This requires flex 2.5.35 or later.
138
139
140Bison
141-----
142
143Since Linux 4.16, the build system generates parsers
144during build.  This requires bison 2.0 or later.
145
146pahole:
147-------
148
149Since Linux 5.2, if CONFIG_DEBUG_INFO_BTF is selected, the build system
150generates BTF (BPF Type Format) from DWARF in vmlinux, a bit later from kernel
151modules as well.  This requires pahole v1.16 or later.
152
153It is found in the 'dwarves' or 'pahole' distro packages or from
154https://fedorapeople.org/~acme/dwarves/.
155
156Perl
157----
158
159You will need perl 5 and the following modules: ``Getopt::Long``,
160``Getopt::Std``, ``File::Basename``, and ``File::Find`` to build the kernel.
161
162BC
163--
164
165You will need bc to build kernels 3.10 and higher
166
167
168OpenSSL
169-------
170
171Module signing and external certificate handling use the OpenSSL program and
172crypto library to do key creation and signature generation.
173
174You will need openssl to build kernels 3.7 and higher if module signing is
175enabled.  You will also need openssl development packages to build kernels 4.3
176and higher.
177
178gtags / GNU GLOBAL (optional)
179-----------------------------
180
181The kernel build requires GNU GLOBAL version 6.6.5 or later to generate
182tag files through ``make gtags``.  This is due to its use of the gtags
183``-C (--directory)`` flag.
184
185System utilities
186****************
187
188Architectural changes
189---------------------
190
191DevFS has been obsoleted in favour of udev
192(https://www.kernel.org/pub/linux/utils/kernel/hotplug/)
193
19432-bit UID support is now in place.  Have fun!
195
196Linux documentation for functions is transitioning to inline
197documentation via specially-formatted comments near their
198definitions in the source.  These comments can be combined with ReST
199files the Documentation/ directory to make enriched documentation, which can
200then be converted to PostScript, HTML, LaTex, ePUB and PDF files.
201In order to convert from ReST format to a format of your choice, you'll need
202Sphinx.
203
204Util-linux
205----------
206
207New versions of util-linux provide ``fdisk`` support for larger disks,
208support new options to mount, recognize more supported partition
209types, have a fdformat which works with 2.4 kernels, and similar goodies.
210You'll probably want to upgrade.
211
212Ksymoops
213--------
214
215If the unthinkable happens and your kernel oopses, you may need the
216ksymoops tool to decode it, but in most cases you don't.
217It is generally preferred to build the kernel with ``CONFIG_KALLSYMS`` so
218that it produces readable dumps that can be used as-is (this also
219produces better output than ksymoops).  If for some reason your kernel
220is not build with ``CONFIG_KALLSYMS`` and you have no way to rebuild and
221reproduce the Oops with that option, then you can still decode that Oops
222with ksymoops.
223
224Mkinitrd
225--------
226
227These changes to the ``/lib/modules`` file tree layout also require that
228mkinitrd be upgraded.
229
230E2fsprogs
231---------
232
233The latest version of ``e2fsprogs`` fixes several bugs in fsck and
234debugfs.  Obviously, it's a good idea to upgrade.
235
236JFSutils
237--------
238
239The ``jfsutils`` package contains the utilities for the file system.
240The following utilities are available:
241
242- ``fsck.jfs`` - initiate replay of the transaction log, and check
243  and repair a JFS formatted partition.
244
245- ``mkfs.jfs`` - create a JFS formatted partition.
246
247- other file system utilities are also available in this package.
248
249Reiserfsprogs
250-------------
251
252The reiserfsprogs package should be used for reiserfs-3.6.x
253(Linux kernels 2.4.x). It is a combined package and contains working
254versions of ``mkreiserfs``, ``resize_reiserfs``, ``debugreiserfs`` and
255``reiserfsck``. These utils work on both i386 and alpha platforms.
256
257Xfsprogs
258--------
259
260The latest version of ``xfsprogs`` contains ``mkfs.xfs``, ``xfs_db``, and the
261``xfs_repair`` utilities, among others, for the XFS filesystem.  It is
262architecture independent and any version from 2.0.0 onward should
263work correctly with this version of the XFS kernel code (2.6.0 or
264later is recommended, due to some significant improvements).
265
266PCMCIAutils
267-----------
268
269PCMCIAutils replaces ``pcmcia-cs``. It properly sets up
270PCMCIA sockets at system startup and loads the appropriate modules
271for 16-bit PCMCIA devices if the kernel is modularized and the hotplug
272subsystem is used.
273
274Quota-tools
275-----------
276
277Support for 32 bit uid's and gid's is required if you want to use
278the newer version 2 quota format.  Quota-tools version 3.07 and
279newer has this support.  Use the recommended version or newer
280from the table above.
281
282Intel IA32 microcode
283--------------------
284
285A driver has been added to allow updating of Intel IA32 microcode,
286accessible as a normal (misc) character device.  If you are not using
287udev you may need to::
288
289  mkdir /dev/cpu
290  mknod /dev/cpu/microcode c 10 184
291  chmod 0644 /dev/cpu/microcode
292
293as root before you can use this.  You'll probably also want to
294get the user-space microcode_ctl utility to use with this.
295
296udev
297----
298
299``udev`` is a userspace application for populating ``/dev`` dynamically with
300only entries for devices actually present. ``udev`` replaces the basic
301functionality of devfs, while allowing persistent device naming for
302devices.
303
304FUSE
305----
306
307Needs libfuse 2.4.0 or later.  Absolute minimum is 2.3.0 but mount
308options ``direct_io`` and ``kernel_cache`` won't work.
309
310Networking
311**********
312
313General changes
314---------------
315
316If you have advanced network configuration needs, you should probably
317consider using the network tools from ip-route2.
318
319Packet Filter / NAT
320-------------------
321The packet filtering and NAT code uses the same tools like the previous 2.4.x
322kernel series (iptables).  It still includes backwards-compatibility modules
323for 2.2.x-style ipchains and 2.0.x-style ipfwadm.
324
325PPP
326---
327
328The PPP driver has been restructured to support multilink and to
329enable it to operate over diverse media layers.  If you use PPP,
330upgrade pppd to at least 2.4.0.
331
332If you are not using udev, you must have the device file /dev/ppp
333which can be made by::
334
335  mknod /dev/ppp c 108 0
336
337as root.
338
339NFS-utils
340---------
341
342In ancient (2.4 and earlier) kernels, the nfs server needed to know
343about any client that expected to be able to access files via NFS.  This
344information would be given to the kernel by ``mountd`` when the client
345mounted the filesystem, or by ``exportfs`` at system startup.  exportfs
346would take information about active clients from ``/var/lib/nfs/rmtab``.
347
348This approach is quite fragile as it depends on rmtab being correct
349which is not always easy, particularly when trying to implement
350fail-over.  Even when the system is working well, ``rmtab`` suffers from
351getting lots of old entries that never get removed.
352
353With modern kernels we have the option of having the kernel tell mountd
354when it gets a request from an unknown host, and mountd can give
355appropriate export information to the kernel.  This removes the
356dependency on ``rmtab`` and means that the kernel only needs to know about
357currently active clients.
358
359To enable this new functionality, you need to::
360
361  mount -t nfsd nfsd /proc/fs/nfsd
362
363before running exportfs or mountd.  It is recommended that all NFS
364services be protected from the internet-at-large by a firewall where
365that is possible.
366
367mcelog
368------
369
370On x86 kernels the mcelog utility is needed to process and log machine check
371events when ``CONFIG_X86_MCE`` is enabled. Machine check events are errors
372reported by the CPU. Processing them is strongly encouraged.
373
374Kernel documentation
375********************
376
377Sphinx
378------
379
380Please see :ref:`sphinx_install` in :ref:`Documentation/doc-guide/sphinx.rst <sphinxdoc>`
381for details about Sphinx requirements.
382
383rustdoc
384-------
385
386``rustdoc`` is used to generate the documentation for Rust code. Please see
387Documentation/rust/general-information.rst for more information.
388
389Getting updated software
390========================
391
392Kernel compilation
393******************
394
395gcc
396---
397
398- <ftp://ftp.gnu.org/gnu/gcc/>
399
400Clang/LLVM
401----------
402
403- :ref:`Getting LLVM <getting_llvm>`.
404
405Rust
406----
407
408- Documentation/rust/quick-start.rst.
409
410bindgen
411-------
412
413- Documentation/rust/quick-start.rst.
414
415Make
416----
417
418- <ftp://ftp.gnu.org/gnu/make/>
419
420Bash
421----
422
423- <ftp://ftp.gnu.org/gnu/bash/>
424
425Binutils
426--------
427
428- <https://www.kernel.org/pub/linux/devel/binutils/>
429
430Flex
431----
432
433- <https://github.com/westes/flex/releases>
434
435Bison
436-----
437
438- <ftp://ftp.gnu.org/gnu/bison/>
439
440OpenSSL
441-------
442
443- <https://www.openssl.org/>
444
445System utilities
446****************
447
448Util-linux
449----------
450
451- <https://www.kernel.org/pub/linux/utils/util-linux/>
452
453Kmod
454----
455
456- <https://www.kernel.org/pub/linux/utils/kernel/kmod/>
457- <https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git>
458
459Ksymoops
460--------
461
462- <https://www.kernel.org/pub/linux/utils/kernel/ksymoops/v2.4/>
463
464Mkinitrd
465--------
466
467- <https://code.launchpad.net/initrd-tools/main>
468
469E2fsprogs
470---------
471
472- <https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/>
473- <https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git/>
474
475JFSutils
476--------
477
478- <http://jfs.sourceforge.net/>
479
480Reiserfsprogs
481-------------
482
483- <https://git.kernel.org/pub/scm/linux/kernel/git/jeffm/reiserfsprogs.git/>
484
485Xfsprogs
486--------
487
488- <https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git>
489- <https://www.kernel.org/pub/linux/utils/fs/xfs/xfsprogs/>
490
491Pcmciautils
492-----------
493
494- <https://www.kernel.org/pub/linux/utils/kernel/pcmcia/>
495
496Quota-tools
497-----------
498
499- <http://sourceforge.net/projects/linuxquota/>
500
501
502Intel P6 microcode
503------------------
504
505- <https://downloadcenter.intel.com/>
506
507udev
508----
509
510- <https://www.freedesktop.org/software/systemd/man/udev.html>
511
512FUSE
513----
514
515- <https://github.com/libfuse/libfuse/releases>
516
517mcelog
518------
519
520- <http://www.mcelog.org/>
521
522cpio
523----
524
525- <https://www.gnu.org/software/cpio/>
526
527Networking
528**********
529
530PPP
531---
532
533- <https://download.samba.org/pub/ppp/>
534- <https://git.ozlabs.org/?p=ppp.git>
535- <https://github.com/paulusmack/ppp/>
536
537NFS-utils
538---------
539
540- <http://sourceforge.net/project/showfiles.php?group_id=14>
541
542Iptables
543--------
544
545- <https://netfilter.org/projects/iptables/index.html>
546
547Ip-route2
548---------
549
550- <https://www.kernel.org/pub/linux/utils/net/iproute2/>
551
552OProfile
553--------
554
555- <http://oprofile.sf.net/download/>
556
557NFS-Utils
558---------
559
560- <http://nfs.sourceforge.net/>
561
562Kernel documentation
563********************
564
565Sphinx
566------
567
568- <https://www.sphinx-doc.org/>
569