system-requirements.rst 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484
  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. ..
  46. Can be generated with yocto-autobuilder-helper's scripts/yocto-supported-distros:
  47. yocto-supported-distros --release scarthgap --config yocto-autobuilder2/config.py --output-format docs --poky-distros
  48. - AlmaLinux 8
  49. - AlmaLinux 9
  50. - Debian 11
  51. - Debian 12
  52. - Fedora 39
  53. - Fedora 40
  54. - Fedora 41
  55. - Rocky Linux 8
  56. - Rocky Linux 9
  57. - Ubuntu 20.04 (LTS)
  58. - Ubuntu 22.04 (LTS)
  59. - Ubuntu 24.04 (LTS)
  60. - Ubuntu 24.10
  61. The following distribution versions are still tested, even though the
  62. organizations publishing them no longer make updates publicly available:
  63. ..
  64. This list contains EOL distros that are still tested on the Autobuilder
  65. (meaning there are running workers).
  66. See https://endoflife.date for information of EOL releases.
  67. - Fedora 39
  68. - Fedora 40
  69. - Ubuntu 20.04 (LTS)
  70. Note that the Yocto Project doesn't have access to private updates
  71. that some of these versions may have. Therefore, our testing has
  72. limited value if you have access to such updates.
  73. Finally, here are the distribution versions which were previously
  74. tested on former revisions of "&DISTRO_NAME;", but no longer are:
  75. ..
  76. Can be generated with yocto-autobuilder-helper's scripts/yocto-supported-distros.
  77. yocto-supported-distros --release scarthgap --config yocto-autobuilder2/config.py --output-format docs --old-distros
  78. - CentOS Stream 8
  79. - Fedora 38
  80. - OpenSUSE Leap 15.4
  81. - Ubuntu 18.04
  82. - Ubuntu 23.04
  83. .. note::
  84. - While the Yocto Project Team attempts to ensure all Yocto Project
  85. releases are one hundred percent compatible with each officially
  86. supported Linux distribution, you may still encounter problems
  87. that happen only with a specific distribution.
  88. - Yocto Project releases are tested against the stable Linux
  89. distributions in the above list. The Yocto Project should work
  90. on other distributions but validation is not performed against
  91. them.
  92. - In particular, the Yocto Project does not support and currently
  93. has no plans to support rolling-releases or development
  94. distributions due to their constantly changing nature. We welcome
  95. patches and bug reports, but keep in mind that our priority is on
  96. the supported platforms listed above.
  97. - If your Linux distribution is not in the above list, we recommend to
  98. get the :term:`buildtools` or :term:`buildtools-extended` tarballs
  99. containing the host tools required by your Yocto Project release,
  100. typically by running ``scripts/install-buildtools`` as explained in
  101. the ":ref:`system-requirements-buildtools`" section.
  102. - You may use Windows Subsystem For Linux v2 to set up a build host
  103. using Windows 10 or later, or Windows Server 2019 or later, but validation
  104. is not performed against build hosts using WSL 2.
  105. See the
  106. :ref:`dev-manual/start:setting up to use windows subsystem for linux (wsl 2)`
  107. section in the Yocto Project Development Tasks Manual for more information.
  108. - If you encounter problems, please go to :yocto_bugs:`Yocto Project
  109. Bugzilla <>` and submit a bug. We are
  110. interested in hearing about your experience. For information on
  111. how to submit a bug, see the Yocto Project
  112. :yocto_wiki:`Bugzilla wiki page </Bugzilla_Configuration_and_Bug_Tracking>`
  113. and the ":doc:`../contributor-guide/report-defect`"
  114. section in the Yocto Project and OpenEmbedded Contributor Guide.
  115. Required Packages for the Build Host
  116. ====================================
  117. The list of packages you need on the host development system can be
  118. large when covering all build scenarios using the Yocto Project. This
  119. section describes required packages according to Linux distribution and
  120. function.
  121. .. _ubuntu-packages:
  122. Ubuntu and Debian
  123. -----------------
  124. Here are the packages needed to build an image on a headless system
  125. with a supported Ubuntu or Debian Linux distribution::
  126. $ sudo apt install &UBUNTU_DEBIAN_HOST_PACKAGES_ESSENTIAL;
  127. You also need to ensure you have the ``en_US.UTF-8`` locale enabled::
  128. $ locale --all-locales | grep en_US.utf8
  129. If this is not the case, you can reconfigure the ``locales`` package to add it
  130. (requires an interactive shell)::
  131. $ sudo dpkg-reconfigure locales
  132. .. note::
  133. - If you are not in an interactive shell, ``dpkg-reconfigure`` will
  134. not work as expected. To add the locale you will need to edit
  135. ``/etc/locale.gen`` file to add/uncomment the ``en_US.UTF-8`` locale.
  136. A naive way to do this as root is::
  137. $ echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
  138. $ locale-gen
  139. - If your build system has the ``oss4-dev`` package installed, you
  140. might experience QEMU build failures due to the package installing
  141. its own custom ``/usr/include/linux/soundcard.h`` on the Debian
  142. system. If you run into this situation, try either of these solutions::
  143. $ sudo apt build-dep qemu
  144. $ sudo apt remove oss4-dev
  145. Here are the packages needed to build Project documentation manuals::
  146. $ sudo apt install &UBUNTU_DEBIAN_HOST_PACKAGES_DOC;
  147. In addition to the previous packages, here are the packages needed to build the
  148. documentation in PDF format::
  149. $ sudo apt install &UBUNTU_DEBIAN_HOST_PACKAGES_DOC_PDF;
  150. Fedora Packages
  151. ---------------
  152. Here are the packages needed to build an image on a headless system
  153. with a supported Fedora Linux distribution::
  154. $ sudo dnf install &FEDORA_HOST_PACKAGES_ESSENTIAL;
  155. Here are the packages needed to build Project documentation manuals::
  156. $ sudo dnf install &FEDORA_HOST_PACKAGES_DOC;
  157. $ sudo pip3 install &PIP3_HOST_PACKAGES_DOC;
  158. In addition to the previous packages, here are the packages needed to build the
  159. documentation in PDF format::
  160. $ sudo dnf install &FEDORA_HOST_PACKAGES_DOC_PDF;
  161. openSUSE Packages
  162. -----------------
  163. Here are the packages needed to build an image on a headless system
  164. with a supported openSUSE distribution::
  165. $ sudo zypper install &OPENSUSE_HOST_PACKAGES_ESSENTIAL;
  166. $ sudo pip3 install &OPENSUSE_PIP3_HOST_PACKAGES_ESSENTIAL;
  167. Here are the packages needed to build Project documentation manuals::
  168. $ sudo zypper install &OPENSUSE_HOST_PACKAGES_DOC;
  169. $ sudo pip3 install &PIP3_HOST_PACKAGES_DOC;
  170. In addition to the previous packages, here are the packages needed to build the
  171. documentation in PDF format::
  172. $ sudo zypper install &OPENSUSE_HOST_PACKAGES_DOC_PDF;
  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. $ sudo dnf install -y epel-release
  178. $ sudo yum install dnf-plugins-core
  179. $ sudo dnf config-manager --set-enabled crb
  180. $ sudo dnf makecache
  181. $ sudo dnf install &ALMALINUX_HOST_PACKAGES_ESSENTIAL;
  182. .. note::
  183. - Extra Packages for Enterprise Linux (i.e. ``epel-release``) is
  184. a collection of packages from Fedora built on RHEL/CentOS for
  185. easy installation of packages not included in enterprise Linux
  186. by default. You need to install these packages separately.
  187. - The ``PowerTools/CRB`` repo provides additional packages such as
  188. ``rpcgen`` and ``texinfo``.
  189. - The ``makecache`` command consumes additional Metadata from
  190. ``epel-release``.
  191. Here are the packages needed to build Project documentation manuals::
  192. $ sudo dnf install &ALMALINUX_HOST_PACKAGES_DOC;
  193. $ sudo pip3 install &PIP3_HOST_PACKAGES_DOC;
  194. In addition to the previous packages, here are the packages needed to build the
  195. documentation in PDF format::
  196. $ sudo dnf install &ALMALINUX_HOST_PACKAGES_DOC_PDF;
  197. .. warning::
  198. Unlike Fedora or OpenSUSE, AlmaLinux does not provide the packages
  199. ``texlive-collection-fontsextra``, ``texlive-collection-lang*`` and
  200. ``texlive-collection-latexextra``, so you may run into issues. These may be
  201. installed using `tlmgr <https://tug.org/texlive/tlmgr.html>`_.
  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``.