changes.rst 13 KB

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