system-requirements.rst 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483
  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 20.04 (LTS)
  46. - Ubuntu 22.04 (LTS)
  47. - Ubuntu 24.04 (LTS)
  48. - Fedora 38
  49. - Fedora 39
  50. - Fedora 40
  51. - CentOS Stream 8
  52. - Debian GNU/Linux 11 (Bullseye)
  53. - Debian GNU/Linux 12 (Bookworm)
  54. - OpenSUSE Leap 15.4
  55. - OpenSUSE Leap 15.5
  56. - OpenSUSE Leap 15.6
  57. - AlmaLinux 8
  58. - AlmaLinux 9
  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 23.04
  64. Note that the Yocto Project doesn't have access to private updates
  65. that some of these versions may have. Therefore, our testing has
  66. limited value if you have access to such updates.
  67. Finally, here are the distribution versions which were previously
  68. tested on former revisions of "&DISTRO_NAME;", but no longer are:
  69. *This list is currently empty*
  70. .. note::
  71. - While the Yocto Project Team attempts to ensure all Yocto Project
  72. releases are one hundred percent compatible with each officially
  73. supported Linux distribution, you may still encounter problems
  74. that happen only with a specific distribution.
  75. - Yocto Project releases are tested against the stable Linux
  76. distributions in the above list. The Yocto Project should work
  77. on other distributions but validation is not performed against
  78. them.
  79. - In particular, the Yocto Project does not support and currently
  80. has no plans to support rolling-releases or development
  81. distributions due to their constantly changing nature. We welcome
  82. patches and bug reports, but keep in mind that our priority is on
  83. the supported platforms listed above.
  84. - If your Linux distribution is not in the above list, we recommend to
  85. get the :term:`buildtools` or :term:`buildtools-extended` tarballs
  86. containing the host tools required by your Yocto Project release,
  87. typically by running ``scripts/install-buildtools`` as explained in
  88. the ":ref:`system-requirements-buildtools`" section.
  89. - You may use Windows Subsystem For Linux v2 to set up a build host
  90. using Windows 10 or later, or Windows Server 2019 or later, but validation
  91. is not performed against build hosts using WSL 2.
  92. See the
  93. :ref:`dev-manual/start:setting up to use windows subsystem for linux (wsl 2)`
  94. section in the Yocto Project Development Tasks Manual for more information.
  95. - If you encounter problems, please go to :yocto_bugs:`Yocto Project
  96. Bugzilla <>` and submit a bug. We are
  97. interested in hearing about your experience. For information on
  98. how to submit a bug, see the Yocto Project
  99. :yocto_wiki:`Bugzilla wiki page </Bugzilla_Configuration_and_Bug_Tracking>`
  100. and the ":doc:`../contributor-guide/report-defect`"
  101. section in the Yocto Project and OpenEmbedded Contributor Guide.
  102. Required Packages for the Build Host
  103. ====================================
  104. The list of packages you need on the host development system can be
  105. large when covering all build scenarios using the Yocto Project. This
  106. section describes required packages according to Linux distribution and
  107. function.
  108. .. _ubuntu-packages:
  109. Ubuntu and Debian
  110. -----------------
  111. Here are the packages needed to build an image on a headless system
  112. with a supported Ubuntu or Debian Linux distribution::
  113. $ sudo apt install &UBUNTU_DEBIAN_HOST_PACKAGES_ESSENTIAL;
  114. You also need to ensure you have the ``en_US.UTF-8`` locale enabled::
  115. $ locale --all-locales | grep en_US.utf8
  116. If this is not the case, you can reconfigure the ``locales`` package to add it
  117. (requires an interactive shell)::
  118. $ sudo dpkg-reconfigure locales
  119. .. note::
  120. - If you are not in an interactive shell, ``dpkg-reconfigure`` will
  121. not work as expected. To add the locale you will need to edit
  122. ``/etc/locale.gen`` file to add/uncomment the ``en_US.UTF-8`` locale.
  123. A naive way to do this as root is::
  124. $ echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
  125. $ locale-gen
  126. - If your build system has the ``oss4-dev`` package installed, you
  127. might experience QEMU build failures due to the package installing
  128. its own custom ``/usr/include/linux/soundcard.h`` on the Debian
  129. system. If you run into this situation, try either of these solutions::
  130. $ sudo apt build-dep qemu
  131. $ sudo apt remove oss4-dev
  132. Here are the packages needed to build Project documentation manuals::
  133. $ sudo apt install &UBUNTU_DEBIAN_HOST_PACKAGES_DOC;
  134. In addition to the previous packages, here are the packages needed to build the
  135. documentation in PDF format::
  136. $ sudo apt install &UBUNTU_DEBIAN_HOST_PACKAGES_DOC_PDF;
  137. Fedora Packages
  138. ---------------
  139. Here are the packages needed to build an image on a headless system
  140. with a supported Fedora Linux distribution::
  141. $ sudo dnf install &FEDORA_HOST_PACKAGES_ESSENTIAL;
  142. Here are the packages needed to build Project documentation manuals::
  143. $ sudo dnf install &FEDORA_HOST_PACKAGES_DOC;
  144. $ sudo pip3 install &PIP3_HOST_PACKAGES_DOC;
  145. In addition to the previous packages, here are the packages needed to build the
  146. documentation in PDF format::
  147. $ sudo dnf install &FEDORA_HOST_PACKAGES_DOC_PDF;
  148. openSUSE Packages
  149. -----------------
  150. Here are the packages needed to build an image on a headless system
  151. with a supported openSUSE distribution::
  152. $ sudo zypper install &OPENSUSE_HOST_PACKAGES_ESSENTIAL;
  153. $ sudo pip3 install &OPENSUSE_PIP3_HOST_PACKAGES_ESSENTIAL;
  154. Here are the packages needed to build Project documentation manuals::
  155. $ sudo zypper install &OPENSUSE_HOST_PACKAGES_DOC;
  156. $ sudo pip3 install &PIP3_HOST_PACKAGES_DOC;
  157. In addition to the previous packages, here are the packages needed to build the
  158. documentation in PDF format::
  159. $ sudo zypper install &OPENSUSE_HOST_PACKAGES_DOC_PDF;
  160. AlmaLinux Packages
  161. ------------------
  162. Here are the packages needed to build an image on a headless system
  163. with a supported AlmaLinux distribution::
  164. $ sudo dnf install -y epel-release
  165. $ sudo yum install dnf-plugins-core
  166. $ sudo dnf config-manager --set-enabled crb
  167. $ sudo dnf makecache
  168. $ sudo dnf install &ALMALINUX_HOST_PACKAGES_ESSENTIAL;
  169. .. note::
  170. - Extra Packages for Enterprise Linux (i.e. ``epel-release``) is
  171. a collection of packages from Fedora built on RHEL/CentOS for
  172. easy installation of packages not included in enterprise Linux
  173. by default. You need to install these packages separately.
  174. - The ``PowerTools/CRB`` repo provides additional packages such as
  175. ``rpcgen`` and ``texinfo``.
  176. - The ``makecache`` command consumes additional Metadata from
  177. ``epel-release``.
  178. Here are the packages needed to build Project documentation manuals::
  179. $ sudo dnf install &ALMALINUX_HOST_PACKAGES_DOC;
  180. $ sudo pip3 install &PIP3_HOST_PACKAGES_DOC;
  181. In addition to the previous packages, here are the packages needed to build the
  182. documentation in PDF format::
  183. $ sudo dnf install &ALMALINUX_HOST_PACKAGES_DOC_PDF;
  184. .. warning::
  185. Unlike Fedora or OpenSUSE, AlmaLinux does not provide the packages
  186. ``texlive-collection-fontsextra``, ``texlive-collection-lang*`` and
  187. ``texlive-collection-latexextra``, so you may run into issues. These may be
  188. installed using `tlmgr <https://tug.org/texlive/tlmgr.html>`_.
  189. .. _system-requirements-buildtools:
  190. Required Git, tar, Python, make and gcc Versions
  191. ================================================
  192. In order to use the build system, your host development system must meet
  193. the following version requirements for Git, tar, and Python:
  194. - Git &MIN_GIT_VERSION; or greater
  195. - tar &MIN_TAR_VERSION; or greater
  196. - Python &MIN_PYTHON_VERSION; or greater
  197. - GNU make &MIN_MAKE_VERSION; or greater
  198. If your host development system does not meet all these requirements,
  199. you can resolve this by installing a :term:`buildtools` tarball that
  200. contains these tools. You can either download a pre-built tarball or
  201. use BitBake to build one.
  202. In addition, your host development system must meet the following
  203. version requirement for gcc:
  204. - gcc &MIN_GCC_VERSION; or greater
  205. If your host development system does not meet this requirement, you can
  206. resolve this by installing a :term:`buildtools-extended` tarball that
  207. contains additional tools, the equivalent of the Debian/Ubuntu ``build-essential``
  208. package.
  209. For systems with a broken make version (e.g. make 4.2.1 without patches) but
  210. where the rest of the host tools are usable, you can use the :term:`buildtools-make`
  211. tarball instead.
  212. In the sections that follow, three different methods will be described for
  213. installing the :term:`buildtools`, :term:`buildtools-extended` or :term:`buildtools-make`
  214. toolset.
  215. Installing a Pre-Built ``buildtools`` Tarball with ``install-buildtools`` script
  216. --------------------------------------------------------------------------------
  217. The ``install-buildtools`` script is the easiest of the three methods by
  218. which you can get these tools. It downloads a pre-built :term:`buildtools`
  219. installer and automatically installs the tools for you:
  220. #. Execute the ``install-buildtools`` script. Here is an example::
  221. $ cd poky
  222. $ scripts/install-buildtools \
  223. --without-extended-buildtools \
  224. --base-url &YOCTO_DL_URL;/releases/yocto \
  225. --release yocto-&DISTRO; \
  226. --installer-version &DISTRO;
  227. During execution, the :term:`buildtools` tarball will be downloaded, the
  228. checksum of the download will be verified, the installer will be run
  229. for you, and some basic checks will be run to make sure the
  230. installation is functional.
  231. To avoid the need of ``sudo`` privileges, the ``install-buildtools``
  232. script will by default tell the installer to install in::
  233. /path/to/poky/buildtools
  234. If your host development system needs the additional tools provided
  235. in the :term:`buildtools-extended` tarball, you can instead execute the
  236. ``install-buildtools`` script with the default parameters::
  237. $ cd poky
  238. $ scripts/install-buildtools
  239. Alternatively if your host development system has a broken ``make``
  240. version such that you only need a known good version of ``make``,
  241. you can use the ``--make-only`` option::
  242. $ cd poky
  243. $ scripts/install-buildtools --make-only
  244. #. Source the tools environment setup script by using a command like the
  245. following::
  246. $ source /path/to/poky/buildtools/environment-setup-x86_64-pokysdk-linux
  247. After you have sourced the setup script, the tools are added to
  248. ``PATH`` and any other environment variables required to run the
  249. tools are initialized. The results are working versions versions of
  250. Git, tar, Python and ``chrpath``. And in the case of the
  251. :term:`buildtools-extended` tarball, additional working versions of tools
  252. including ``gcc``, ``make`` and the other tools included in
  253. ``packagegroup-core-buildessential``.
  254. Downloading a Pre-Built ``buildtools`` Tarball
  255. ----------------------------------------------
  256. If you would prefer not to use the ``install-buildtools`` script, you can instead
  257. download and run a pre-built :term:`buildtools` installer yourself with the following
  258. steps:
  259. #. Go to :yocto_dl:`/releases/yocto/yocto-&DISTRO;/buildtools/`, locate and
  260. download the ``.sh`` file corresponding to your host architecture
  261. and to :term:`buildtools`, :term:`buildtools-extended` or :term:`buildtools-make`.
  262. #. Execute the installation script. Here is an example for the
  263. traditional installer::
  264. $ sh ~/Downloads/x86_64-buildtools-nativesdk-standalone-&DISTRO;.sh
  265. Here is an example for the extended installer::
  266. $ sh ~/Downloads/x86_64-buildtools-extended-nativesdk-standalone-&DISTRO;.sh
  267. An example for the make-only installer::
  268. $ sh ~/Downloads/x86_64-buildtools-make-nativesdk-standalone-&DISTRO;.sh
  269. During execution, a prompt appears that allows you to choose the
  270. installation directory. For example, you could choose the following:
  271. ``/home/your-username/buildtools``
  272. #. As instructed by the installer script, you will have to source the tools
  273. environment setup script::
  274. $ source /home/your_username/buildtools/environment-setup-x86_64-pokysdk-linux
  275. After you have sourced the setup script, the tools are added to
  276. ``PATH`` and any other environment variables required to run the
  277. tools are initialized. The results are working versions versions of
  278. Git, tar, Python and ``chrpath``. And in the case of the
  279. :term:`buildtools-extended` tarball, additional working versions of tools
  280. including ``gcc``, ``make`` and the other tools included in
  281. ``packagegroup-core-buildessential``.
  282. Building Your Own ``buildtools`` Tarball
  283. ----------------------------------------
  284. Building and running your own :term:`buildtools` installer applies only when you
  285. have a build host that can already run BitBake. In this case, you use
  286. that machine to build the ``.sh`` file and then take steps to transfer
  287. and run it on a machine that does not meet the minimal Git, tar, and
  288. Python (or gcc) requirements.
  289. Here are the steps to take to build and run your own :term:`buildtools`
  290. installer:
  291. #. On the machine that is able to run BitBake, be sure you have set up
  292. your build environment with the setup script
  293. (:ref:`structure-core-script`).
  294. #. Run the BitBake command to build the tarball::
  295. $ bitbake buildtools-tarball
  296. or to build the extended tarball::
  297. $ bitbake buildtools-extended-tarball
  298. or to build the make-only tarball::
  299. $ bitbake buildtools-make-tarball
  300. .. note::
  301. The :term:`SDKMACHINE` variable in your ``local.conf`` file determines
  302. whether you build tools for a 32-bit or 64-bit system.
  303. Once the build completes, you can find the ``.sh`` file that installs
  304. the tools in the ``tmp/deploy/sdk`` subdirectory of the
  305. :term:`Build Directory`. The installer file has the string
  306. "buildtools" or "buildtools-extended" in the name.
  307. #. Transfer the ``.sh`` file from the build host to the machine that
  308. does not meet the Git, tar, or Python (or gcc) requirements.
  309. #. On this machine, run the ``.sh`` file to install the tools. Here is an
  310. example for the traditional installer::
  311. $ sh ~/Downloads/x86_64-buildtools-nativesdk-standalone-&DISTRO;.sh
  312. For the extended installer::
  313. $ sh ~/Downloads/x86_64-buildtools-extended-nativesdk-standalone-&DISTRO;.sh
  314. And for the make-only installer::
  315. $ sh ~/Downloads/x86_64-buildtools-make-nativesdk-standalone-&DISTRO;.sh
  316. During execution, a prompt appears that allows you to choose the
  317. installation directory. For example, you could choose the following:
  318. ``/home/your_username/buildtools``
  319. #. Source the tools environment setup script by using a command like the
  320. following::
  321. $ source /home/your_username/buildtools/environment-setup-x86_64-poky-linux
  322. After you have sourced the setup script, the tools are added to
  323. ``PATH`` and any other environment variables required to run the
  324. tools are initialized. The results are working versions versions of
  325. Git, tar, Python and ``chrpath``. And in the case of the
  326. :term:`buildtools-extended` tarball, additional working versions of tools
  327. including ``gcc``, ``make`` and the other tools included in
  328. ``packagegroup-core-buildessential``.