changes.rst 15 KB

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