system-requirements.rst 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499
  1. .. SPDX-License-Identifier: CC-BY-SA-2.0-UK
  2. *******************
  3. System Requirements
  4. *******************
  5. Welcome to the Yocto Project Reference Manual. This manual provides
  6. reference information for the current release of the Yocto Project, and
  7. is most effectively used after you have an understanding of the basics
  8. of the Yocto Project. The manual is neither meant to be read as a
  9. starting point to the Yocto Project, nor read from start to finish.
  10. Rather, use this manual to find variable definitions, class
  11. descriptions, and so forth as needed during the course of using the
  12. Yocto Project.
  13. For introductory information on the Yocto Project, see the
  14. :yocto_home:`Yocto Project Website <>` and the
  15. ":ref:`overview-manual/development-environment:the yocto project development environment`"
  16. chapter in the Yocto Project Overview and Concepts Manual.
  17. If you want to use the Yocto Project to quickly build an image without
  18. having to understand concepts, work through the
  19. :doc:`/brief-yoctoprojectqs/index` document. You can find "how-to"
  20. information in the :doc:`/dev-manual/index`. You can find Yocto Project overview
  21. and conceptual information in the :doc:`/overview-manual/index`.
  22. .. note::
  23. For more information about the Yocto Project Documentation set, see
  24. the :ref:`ref-manual/resources:links and related documentation` section.
  25. Minimum Free Disk Space
  26. =======================
  27. To build an image such as ``core-image-sato`` for the ``qemux86-64`` machine,
  28. you need a system with at least &MIN_DISK_SPACE; Gbytes of free disk space.
  29. However, much more disk space will be necessary to build more complex images,
  30. to run multiple builds and to cache build artifacts, improving build efficiency.
  31. If you have a shortage of disk space, see the ":doc:`/dev-manual/disk-space`"
  32. section of the Development Tasks Manual.
  33. .. _system-requirements-minimum-ram:
  34. Minimum System RAM
  35. ==================
  36. You will manage to build an image such as ``core-image-sato`` for the
  37. ``qemux86-64`` machine with as little as &MIN_RAM; Gbytes of RAM on an old
  38. system with 4 CPU cores, but your builds will be much faster on a system with
  39. as much RAM and as many CPU cores as possible.
  40. .. _system-requirements-supported-distros:
  41. Supported Linux Distributions
  42. =============================
  43. Currently, the &DISTRO; release ("&DISTRO_NAME;") of the Yocto Project is
  44. supported on the following distributions:
  45. - Ubuntu 22.04 (LTS)
  46. - Ubuntu 24.04 (LTS)
  47. - Ubuntu 24.10
  48. - Fedora 39
  49. - Fedora 40
  50. - Fedora 41
  51. - CentOS Stream 9
  52. - Debian GNU/Linux 11 (Bullseye)
  53. - Debian GNU/Linux 12 (Bookworm)
  54. - OpenSUSE Leap 15.5
  55. - OpenSUSE Leap 15.6
  56. - AlmaLinux 8
  57. - AlmaLinux 9
  58. - Rocky 8
  59. - Rocky 9
  60. The following distribution versions are still tested, even though the
  61. organizations publishing them no longer make updates publicly available:
  62. - Ubuntu 18.04 (LTS)
  63. - Ubuntu 20.04 (LTS)
  64. - Ubuntu 23.04
  65. Note that the Yocto Project doesn't have access to private updates
  66. that some of these versions may have. Therefore, our testing has
  67. limited value if you have access to such updates. Also, :term:`buildtools`
  68. may have to be used on older releases in order to get current enough
  69. tools, such as python.
  70. Finally, here are the distribution versions which were previously
  71. tested on former revisions of "&DISTRO_NAME;", but no longer are:
  72. *This list is currently empty*
  73. .. note::
  74. - While the Yocto Project Team attempts to ensure all Yocto Project
  75. releases are one hundred percent compatible with each officially
  76. supported Linux distribution, you may still encounter problems
  77. that happen only with a specific distribution.
  78. - Yocto Project releases are tested against the stable Linux
  79. distributions in the above list. The Yocto Project should work
  80. on other distributions but validation is not performed against
  81. them.
  82. - In particular, the Yocto Project does not support and currently
  83. has no plans to support rolling-releases or development
  84. distributions due to their constantly changing nature. We welcome
  85. patches and bug reports, but keep in mind that our priority is on
  86. the supported platforms listed above.
  87. - If your Linux distribution is not in the above list, we recommend to
  88. get the :term:`buildtools` or :term:`buildtools-extended` tarballs
  89. containing the host tools required by your Yocto Project release,
  90. typically by running ``scripts/install-buildtools`` as explained in
  91. the ":ref:`system-requirements-buildtools`" section.
  92. - You may use Windows Subsystem For Linux v2 to set up a build host
  93. using Windows 10 or later, or Windows Server 2019 or later, but validation
  94. is not performed against build hosts using WSL 2.
  95. See the
  96. :ref:`dev-manual/start:setting up to use windows subsystem for linux (wsl 2)`
  97. section in the Yocto Project Development Tasks Manual for more information.
  98. - If you encounter problems, please go to :yocto_bugs:`Yocto Project
  99. Bugzilla <>` and submit a bug. We are
  100. interested in hearing about your experience. For information on
  101. how to submit a bug, see the Yocto Project
  102. :yocto_wiki:`Bugzilla wiki page </Bugzilla_Configuration_and_Bug_Tracking>`
  103. and the ":doc:`../contributor-guide/report-defect`"
  104. section in the Yocto Project and OpenEmbedded Contributor Guide.
  105. Required Packages for the Build Host
  106. ====================================
  107. The list of packages you need on the host development system can be
  108. large when covering all build scenarios using the Yocto Project. This
  109. section describes required packages according to Linux distribution and
  110. function.
  111. .. _ubuntu-packages:
  112. Ubuntu and Debian
  113. -----------------
  114. Here are the packages needed to build an image on a headless system
  115. with a supported Ubuntu or Debian Linux distribution:
  116. .. literalinclude:: ../tools/host_packages_scripts/ubuntu_essential.sh
  117. :language: shell
  118. You also need to ensure you have the ``en_US.UTF-8`` locale enabled::
  119. $ locale --all-locales | grep en_US.utf8
  120. If this is not the case, you can reconfigure the ``locales`` package to add it
  121. (requires an interactive shell)::
  122. $ sudo dpkg-reconfigure locales
  123. .. note::
  124. - If you are not in an interactive shell, ``dpkg-reconfigure`` will
  125. not work as expected. To add the locale you will need to edit
  126. ``/etc/locale.gen`` file to add/uncomment the ``en_US.UTF-8`` locale.
  127. A naive way to do this as root is::
  128. $ echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
  129. $ locale-gen
  130. - If your build system has the ``oss4-dev`` package installed, you
  131. might experience QEMU build failures due to the package installing
  132. its own custom ``/usr/include/linux/soundcard.h`` on the Debian
  133. system. If you run into this situation, try either of these solutions::
  134. $ sudo apt build-dep qemu
  135. $ sudo apt remove oss4-dev
  136. Here are the packages needed to build Project documentation manuals:
  137. .. literalinclude:: ../tools/host_packages_scripts/ubuntu_docs.sh
  138. :language: shell
  139. In addition to the previous packages, here are the packages needed to build the
  140. documentation in PDF format:
  141. .. literalinclude:: ../tools/host_packages_scripts/ubuntu_docs_pdf.sh
  142. :language: shell
  143. Fedora Packages
  144. ---------------
  145. Here are the packages needed to build an image on a headless system
  146. with a supported Fedora Linux distribution:
  147. .. literalinclude:: ../tools/host_packages_scripts/fedora_essential.sh
  148. :language: shell
  149. Here are the packages needed to build Project documentation manuals:
  150. .. literalinclude:: ../tools/host_packages_scripts/fedora_docs.sh
  151. :language: shell
  152. .. literalinclude:: ../tools/host_packages_scripts/pip3_docs.sh
  153. :language: shell
  154. In addition to the previous packages, here are the packages needed to build the
  155. documentation in PDF format:
  156. .. literalinclude:: ../tools/host_packages_scripts/fedora_docs_pdf.sh
  157. :language: shell
  158. openSUSE Packages
  159. -----------------
  160. Here are the packages needed to build an image on a headless system
  161. with a supported openSUSE distribution:
  162. .. literalinclude:: ../tools/host_packages_scripts/opensuse_essential.sh
  163. :language: shell
  164. Here are the packages needed to build Project documentation manuals:
  165. .. literalinclude:: ../tools/host_packages_scripts/opensuse_docs.sh
  166. :language: shell
  167. .. literalinclude:: ../tools/host_packages_scripts/pip3_docs.sh
  168. :language: shell
  169. In addition to the previous packages, here are the packages needed to build the
  170. documentation in PDF format:
  171. .. literalinclude:: ../tools/host_packages_scripts/opensuse_docs_pdf.sh
  172. :language: shell
  173. AlmaLinux Packages
  174. ------------------
  175. Here are the packages needed to build an image on a headless system
  176. with a supported AlmaLinux distribution:
  177. .. literalinclude:: ../tools/host_packages_scripts/almalinux_essential.sh
  178. :language: shell
  179. .. note::
  180. - Extra Packages for Enterprise Linux (i.e. ``epel-release``) is
  181. a collection of packages from Fedora built on RHEL/CentOS for
  182. easy installation of packages not included in enterprise Linux
  183. by default. You need to install these packages separately.
  184. - The ``PowerTools/CRB`` repo provides additional packages such as
  185. ``rpcgen`` and ``texinfo``.
  186. - The ``makecache`` command consumes additional Metadata from
  187. ``epel-release``.
  188. Here are the packages needed to build Project documentation manuals:
  189. .. literalinclude:: ../tools/host_packages_scripts/almalinux_docs.sh
  190. :language: shell
  191. .. literalinclude:: ../tools/host_packages_scripts/pip3_docs.sh
  192. :language: shell
  193. .. warning::
  194. Unlike Fedora or OpenSUSE, AlmaLinux does not provide the packages
  195. ``texlive-collection-fontsextra``, ``texlive-collection-lang*`` and
  196. ``texlive-collection-latexextra``, so you may run into issues. These may be
  197. installed using `tlmgr <https://tug.org/texlive/tlmgr.html>`_.
  198. In addition to the previous packages, here are the packages needed to build the
  199. documentation in PDF format:
  200. .. literalinclude:: ../tools/host_packages_scripts/almalinux_docs_pdf.sh
  201. :language: shell
  202. .. _system-requirements-buildtools:
  203. Required Git, tar, Python, make and gcc Versions
  204. ================================================
  205. In order to use the build system, your host development system must meet
  206. the following version requirements for Git, tar, and Python:
  207. - Git &MIN_GIT_VERSION; or greater
  208. - tar &MIN_TAR_VERSION; or greater
  209. - Python &MIN_PYTHON_VERSION; or greater
  210. - GNU make &MIN_MAKE_VERSION; or greater
  211. If your host development system does not meet all these requirements,
  212. you can resolve this by installing a :term:`buildtools` tarball that
  213. contains these tools. You can either download a pre-built tarball or
  214. use BitBake to build one.
  215. In addition, your host development system must meet the following
  216. version requirement for gcc:
  217. - gcc &MIN_GCC_VERSION; or greater
  218. If your host development system does not meet this requirement, you can
  219. resolve this by installing a :term:`buildtools-extended` tarball that
  220. contains additional tools, the equivalent of the Debian/Ubuntu ``build-essential``
  221. package.
  222. For systems with a broken make version (e.g. make 4.2.1 without patches) but
  223. where the rest of the host tools are usable, you can use the :term:`buildtools-make`
  224. tarball instead.
  225. In the sections that follow, three different methods will be described for
  226. installing the :term:`buildtools`, :term:`buildtools-extended` or :term:`buildtools-make`
  227. toolset.
  228. Installing a Pre-Built ``buildtools`` Tarball with ``install-buildtools`` script
  229. --------------------------------------------------------------------------------
  230. The ``install-buildtools`` script is the easiest of the three methods by
  231. which you can get these tools. It downloads a pre-built :term:`buildtools`
  232. installer and automatically installs the tools for you:
  233. #. Execute the ``install-buildtools`` script. Here is an example::
  234. $ cd poky
  235. $ scripts/install-buildtools \
  236. --without-extended-buildtools \
  237. --base-url &YOCTO_DL_URL;/releases/yocto \
  238. --release yocto-&DISTRO; \
  239. --installer-version &DISTRO;
  240. During execution, the :term:`buildtools` tarball will be downloaded, the
  241. checksum of the download will be verified, the installer will be run
  242. for you, and some basic checks will be run to make sure the
  243. installation is functional.
  244. To avoid the need of ``sudo`` privileges, the ``install-buildtools``
  245. script will by default tell the installer to install in::
  246. /path/to/poky/buildtools
  247. If your host development system needs the additional tools provided
  248. in the :term:`buildtools-extended` tarball, you can instead execute the
  249. ``install-buildtools`` script with the default parameters::
  250. $ cd poky
  251. $ scripts/install-buildtools
  252. Alternatively if your host development system has a broken ``make``
  253. version such that you only need a known good version of ``make``,
  254. you can use the ``--make-only`` option::
  255. $ cd poky
  256. $ scripts/install-buildtools --make-only
  257. #. Source the tools environment setup script by using a command like the
  258. following::
  259. $ source /path/to/poky/buildtools/environment-setup-x86_64-pokysdk-linux
  260. After you have sourced the setup script, the tools are added to
  261. ``PATH`` and any other environment variables required to run the
  262. tools are initialized. The results are working versions versions of
  263. Git, tar, Python and ``chrpath``. And in the case of the
  264. :term:`buildtools-extended` tarball, additional working versions of tools
  265. including ``gcc``, ``make`` and the other tools included in
  266. ``packagegroup-core-buildessential``.
  267. Downloading a Pre-Built ``buildtools`` Tarball
  268. ----------------------------------------------
  269. If you would prefer not to use the ``install-buildtools`` script, you can instead
  270. download and run a pre-built :term:`buildtools` installer yourself with the following
  271. steps:
  272. #. Go to :yocto_dl:`/releases/yocto/&DISTRO_REL_LATEST_TAG;/buildtools/`, locate and
  273. download the ``.sh`` file corresponding to your host architecture
  274. and to :term:`buildtools`, :term:`buildtools-extended` or :term:`buildtools-make`.
  275. #. Execute the installation script. Here is an example for the
  276. traditional installer::
  277. $ sh ~/Downloads/x86_64-buildtools-nativesdk-standalone-&DISTRO;.sh
  278. Here is an example for the extended installer::
  279. $ sh ~/Downloads/x86_64-buildtools-extended-nativesdk-standalone-&DISTRO;.sh
  280. An example for the make-only installer::
  281. $ sh ~/Downloads/x86_64-buildtools-make-nativesdk-standalone-&DISTRO;.sh
  282. During execution, a prompt appears that allows you to choose the
  283. installation directory. For example, you could choose the following:
  284. ``/home/your-username/buildtools``
  285. #. As instructed by the installer script, you will have to source the tools
  286. environment setup script::
  287. $ source /home/your_username/buildtools/environment-setup-x86_64-pokysdk-linux
  288. After you have sourced the setup script, the tools are added to
  289. ``PATH`` and any other environment variables required to run the
  290. tools are initialized. The results are working versions versions of
  291. Git, tar, Python and ``chrpath``. And in the case of the
  292. :term:`buildtools-extended` tarball, additional working versions of tools
  293. including ``gcc``, ``make`` and the other tools included in
  294. ``packagegroup-core-buildessential``.
  295. Building Your Own ``buildtools`` Tarball
  296. ----------------------------------------
  297. Building and running your own :term:`buildtools` installer applies only when you
  298. have a build host that can already run BitBake. In this case, you use
  299. that machine to build the ``.sh`` file and then take steps to transfer
  300. and run it on a machine that does not meet the minimal Git, tar, and
  301. Python (or gcc) requirements.
  302. Here are the steps to take to build and run your own :term:`buildtools`
  303. installer:
  304. #. On the machine that is able to run BitBake, be sure you have set up
  305. your build environment with the setup script
  306. (:ref:`structure-core-script`).
  307. #. Run the BitBake command to build the tarball::
  308. $ bitbake buildtools-tarball
  309. or to build the extended tarball::
  310. $ bitbake buildtools-extended-tarball
  311. or to build the make-only tarball::
  312. $ bitbake buildtools-make-tarball
  313. .. note::
  314. The :term:`SDKMACHINE` variable in your ``local.conf`` file determines
  315. whether you build tools for a 32-bit or 64-bit system.
  316. Once the build completes, you can find the ``.sh`` file that installs
  317. the tools in the ``tmp/deploy/sdk`` subdirectory of the
  318. :term:`Build Directory`. The installer file has the string
  319. "buildtools" or "buildtools-extended" in the name.
  320. #. Transfer the ``.sh`` file from the build host to the machine that
  321. does not meet the Git, tar, or Python (or gcc) requirements.
  322. #. On this machine, run the ``.sh`` file to install the tools. Here is an
  323. example for the traditional installer::
  324. $ sh ~/Downloads/x86_64-buildtools-nativesdk-standalone-&DISTRO;.sh
  325. For the extended installer::
  326. $ sh ~/Downloads/x86_64-buildtools-extended-nativesdk-standalone-&DISTRO;.sh
  327. And for the make-only installer::
  328. $ sh ~/Downloads/x86_64-buildtools-make-nativesdk-standalone-&DISTRO;.sh
  329. During execution, a prompt appears that allows you to choose the
  330. installation directory. For example, you could choose the following:
  331. ``/home/your_username/buildtools``
  332. #. Source the tools environment setup script by using a command like the
  333. following::
  334. $ source /home/your_username/buildtools/environment-setup-x86_64-poky-linux
  335. After you have sourced the setup script, the tools are added to
  336. ``PATH`` and any other environment variables required to run the
  337. tools are initialized. The results are working versions versions of
  338. Git, tar, Python and ``chrpath``. And in the case of the
  339. :term:`buildtools-extended` tarball, additional working versions of tools
  340. including ``gcc``, ``make`` and the other tools included in
  341. ``packagegroup-core-buildessential``.