changes.rst 15 KB

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