system-requirements.rst 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403
  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. .. _detailed-supported-distros:
  26. Supported Linux Distributions
  27. =============================
  28. Currently, the Yocto Project is supported on the following
  29. distributions:
  30. - Ubuntu 18.04 (LTS)
  31. - Ubuntu 20.04 (LTS)
  32. - Ubuntu 22.04 (LTS)
  33. - Fedora 34
  34. - Fedora 35
  35. - AlmaLinux 8.5
  36. - Debian GNU/Linux 10.x (Buster)
  37. - Debian GNU/Linux 11.x (Bullseye)
  38. - OpenSUSE Leap 15.3
  39. .. note::
  40. - While the Yocto Project Team attempts to ensure all Yocto Project
  41. releases are one hundred percent compatible with each officially
  42. supported Linux distribution, you may still encounter problems
  43. that happen only with a specific distribution.
  44. - Yocto Project releases are tested against the stable Linux
  45. distributions in the above list. The Yocto Project should work
  46. on other distributions but validation is not performed against
  47. them.
  48. - In particular, the Yocto Project does not support and currently
  49. has no plans to support rolling-releases or development
  50. distributions due to their constantly changing nature. We welcome
  51. patches and bug reports, but keep in mind that our priority is on
  52. the supported platforms listed below.
  53. - You may use Windows Subsystem For Linux v2 to set up a build host
  54. using Windows 10 or later, or Windows Server 2019 or later, but validation
  55. is not performed against build hosts using WSL 2.
  56. See the
  57. :ref:`dev-manual/start:setting up to use windows subsystem for linux (wsl 2)`
  58. section in the Yocto Project Development Tasks Manual for more information.
  59. - If you encounter problems, please go to :yocto_bugs:`Yocto Project
  60. Bugzilla <>` and submit a bug. We are
  61. interested in hearing about your experience. For information on
  62. how to submit a bug, see the Yocto Project
  63. :yocto_wiki:`Bugzilla wiki page </Bugzilla_Configuration_and_Bug_Tracking>`
  64. and the ":ref:`dev-manual/changes:submitting a defect against the yocto project`"
  65. section in the Yocto Project Development Tasks Manual.
  66. Required Packages for the Build Host
  67. ====================================
  68. The list of packages you need on the host development system can be
  69. large when covering all build scenarios using the Yocto Project. This
  70. section describes required packages according to Linux distribution and
  71. function.
  72. .. _ubuntu-packages:
  73. Ubuntu and Debian
  74. -----------------
  75. Here are the required packages by function given a
  76. supported Ubuntu or Debian Linux distribution:
  77. .. note::
  78. - If your build system has the ``oss4-dev`` package installed, you
  79. might experience QEMU build failures due to the package installing
  80. its own custom ``/usr/include/linux/soundcard.h`` on the Debian
  81. system. If you run into this situation, try either of these solutions::
  82. $ sudo apt build-dep qemu
  83. $ sudo apt remove oss4-dev
  84. - *Essentials:* Packages needed to build an image on a headless system::
  85. $ sudo apt install &UBUNTU_HOST_PACKAGES_ESSENTIAL;
  86. - *Documentation:* Packages needed if you are going to build out the
  87. Yocto Project documentation manuals::
  88. $ sudo apt install make python3-pip inkscape texlive-latex-extra
  89. &PIP3_HOST_PACKAGES_DOC;
  90. Fedora Packages
  91. ---------------
  92. Here are the required packages by function given a
  93. supported Fedora Linux distribution:
  94. - *Essentials:* Packages needed to build an image for a headless
  95. system::
  96. $ sudo dnf install &FEDORA_HOST_PACKAGES_ESSENTIAL;
  97. - *Documentation:* Packages needed if you are going to build out the
  98. Yocto Project documentation manuals::
  99. $ sudo dnf install make python3-pip which inkscape texlive-fncychap
  100. &PIP3_HOST_PACKAGES_DOC;
  101. openSUSE Packages
  102. -----------------
  103. Here are the required packages by function given a
  104. supported openSUSE Linux distribution:
  105. - *Essentials:* Packages needed to build an image for a headless
  106. system::
  107. $ sudo zypper install &OPENSUSE_HOST_PACKAGES_ESSENTIAL;
  108. - *Documentation:* Packages needed if you are going to build out the
  109. Yocto Project documentation manuals::
  110. $ sudo zypper install make python3-pip which inkscape texlive-fncychap
  111. &PIP3_HOST_PACKAGES_DOC;
  112. AlmaLinux-8 Packages
  113. --------------------
  114. Here are the required packages by function given a
  115. supported AlmaLinux-8 Linux distribution:
  116. - *Essentials:* Packages needed to build an image for a headless
  117. system::
  118. $ sudo dnf install &CENTOS8_HOST_PACKAGES_ESSENTIAL;
  119. .. note::
  120. - Extra Packages for Enterprise Linux (i.e. ``epel-release``) is
  121. a collection of packages from Fedora built on RHEL/CentOS for
  122. easy installation of packages not included in enterprise Linux
  123. by default. You need to install these packages separately.
  124. - The ``PowerTools`` repo provides additional packages such as
  125. ``rpcgen`` and ``texinfo``.
  126. - The ``makecache`` command consumes additional Metadata from
  127. ``epel-release``.
  128. - *Documentation:* Packages needed if you are going to build out the
  129. Yocto Project documentation manuals::
  130. $ sudo dnf install make python3-pip which inkscape texlive-fncychap
  131. &PIP3_HOST_PACKAGES_DOC;
  132. Required Git, tar, Python, make and gcc Versions
  133. ================================================
  134. In order to use the build system, your host development system must meet
  135. the following version requirements for Git, tar, and Python:
  136. - Git &MIN_GIT_VERSION; or greater
  137. - tar &MIN_TAR_VERSION; or greater
  138. - Python &MIN_PYTHON_VERSION; or greater
  139. - GNU make &MIN_MAKE_VERSION; or greater
  140. If your host development system does not meet all these requirements,
  141. you can resolve this by installing a ``buildtools`` tarball that
  142. contains these tools. You can get the tarball one of two ways: download
  143. a pre-built tarball or use BitBake to build the tarball.
  144. In addition, your host development system must meet the following
  145. version requirement for gcc:
  146. - gcc &MIN_GCC_VERSION; or greater
  147. If your host development system does not meet this requirement, you can
  148. resolve this by installing a ``buildtools-extended`` tarball that
  149. contains additional tools, the equivalent of the Debian/Ubuntu ``build-essential``
  150. package.
  151. For systems with a broken make version (e.g. make 4.2.1 without patches) but
  152. where the rest of the host tools are usable, you can use the ``buildtools-make``
  153. tarball instead.
  154. In the sections that follow, three different methods will be described for
  155. installing the ``buildtools``, ``buildtools-extended`` or ``buildtools-make``
  156. toolset.
  157. Installing a Pre-Built ``buildtools`` Tarball with ``install-buildtools`` script
  158. --------------------------------------------------------------------------------
  159. The ``install-buildtools`` script is the easiest of the three methods by
  160. which you can get these tools. It downloads a pre-built buildtools
  161. installer and automatically installs the tools for you:
  162. 1. Execute the ``install-buildtools`` script. Here is an example::
  163. $ cd poky
  164. $ scripts/install-buildtools \
  165. --without-extended-buildtools \
  166. --base-url &YOCTO_DL_URL;/releases/yocto \
  167. --release yocto-&DISTRO; \
  168. --installer-version &DISTRO;
  169. During execution, the buildtools tarball will be downloaded, the
  170. checksum of the download will be verified, the installer will be run
  171. for you, and some basic checks will be run to make sure the
  172. installation is functional.
  173. To avoid the need of ``sudo`` privileges, the ``install-buildtools``
  174. script will by default tell the installer to install in::
  175. /path/to/poky/buildtools
  176. If your host development system needs the additional tools provided
  177. in the ``buildtools-extended`` tarball, you can instead execute the
  178. ``install-buildtools`` script with the default parameters::
  179. $ cd poky
  180. $ scripts/install-buildtools
  181. Alternatively if your host development system has a broken ``make``
  182. version such that you only need a known good version of ``make``,
  183. you can use the ``--make-only`` option:
  184. $ cd poky
  185. $ scripts/install-buildtools --make-only
  186. 2. Source the tools environment setup script by using a command like the
  187. following::
  188. $ source /path/to/poky/buildtools/environment-setup-x86_64-pokysdk-linux
  189. Of course, you need to supply your installation directory and be sure to
  190. use the right file (i.e. i586 or x86_64).
  191. After you have sourced the setup script, the tools are added to
  192. ``PATH`` and any other environment variables required to run the
  193. tools are initialized. The results are working versions versions of
  194. Git, tar, Python and ``chrpath``. And in the case of the
  195. ``buildtools-extended`` tarball, additional working versions of tools
  196. including ``gcc``, ``make`` and the other tools included in
  197. ``packagegroup-core-buildessential``.
  198. Downloading a Pre-Built ``buildtools`` Tarball
  199. ----------------------------------------------
  200. If you would prefer not to use the ``install-buildtools`` script, you can instead
  201. download and run a pre-built buildtools installer yourself with the following
  202. steps:
  203. 1. Locate and download the ``*.sh`` at :yocto_dl:`/releases/yocto/yocto-&DISTRO;/buildtools/`
  204. 2. Execute the installation script. Here is an example for the
  205. traditional installer::
  206. $ sh ~/Downloads/x86_64-buildtools-nativesdk-standalone-&DISTRO;.sh
  207. Here is an example for the extended installer::
  208. $ sh ~/Downloads/x86_64-buildtools-extended-nativesdk-standalone-&DISTRO;.sh
  209. An example for the make-only installer::
  210. $ sh ~/Downloads/x86_64-buildtools-make-nativesdk-standalone-&DISTRO;.sh
  211. During execution, a prompt appears that allows you to choose the
  212. installation directory. For example, you could choose the following:
  213. ``/home/your-username/buildtools``
  214. 3. Source the tools environment setup script by using a command like the
  215. following::
  216. $ source /home/your_username/buildtools/environment-setup-i586-poky-linux
  217. Of
  218. course, you need to supply your installation directory and be sure to
  219. use the right file (i.e. i585 or x86-64).
  220. After you have sourced the setup script, the tools are added to
  221. ``PATH`` and any other environment variables required to run the
  222. tools are initialized. The results are working versions versions of
  223. Git, tar, Python and ``chrpath``. And in the case of the
  224. ``buildtools-extended`` tarball, additional working versions of tools
  225. including ``gcc``, ``make`` and the other tools included in
  226. ``packagegroup-core-buildessential``.
  227. Building Your Own ``buildtools`` Tarball
  228. ----------------------------------------
  229. Building and running your own buildtools installer applies only when you
  230. have a build host that can already run BitBake. In this case, you use
  231. that machine to build the ``.sh`` file and then take steps to transfer
  232. and run it on a machine that does not meet the minimal Git, tar, and
  233. Python (or gcc) requirements.
  234. Here are the steps to take to build and run your own buildtools
  235. installer:
  236. 1. On the machine that is able to run BitBake, be sure you have set up
  237. your build environment with the setup script
  238. (:ref:`structure-core-script`).
  239. 2. Run the BitBake command to build the tarball::
  240. $ bitbake buildtools-tarball
  241. or run the BitBake command to build the extended tarball::
  242. $ bitbake buildtools-extended-tarball
  243. or to build the make-only tarball::
  244. $ bitbake buildtools-make-tarball
  245. .. note::
  246. The :term:`SDKMACHINE` variable in your ``local.conf`` file determines
  247. whether you build tools for a 32-bit or 64-bit system.
  248. Once the build completes, you can find the ``.sh`` file that installs
  249. the tools in the ``tmp/deploy/sdk`` subdirectory of the
  250. :term:`Build Directory`. The installer file has the string
  251. "buildtools" (or "buildtools-extended") in the name.
  252. 3. Transfer the ``.sh`` file from the build host to the machine that
  253. does not meet the Git, tar, or Python (or gcc) requirements.
  254. 4. On the machine that does not meet the requirements, run the ``.sh``
  255. file to install the tools. Here is an example for the traditional
  256. installer::
  257. $ sh ~/Downloads/x86_64-buildtools-nativesdk-standalone-&DISTRO;.sh
  258. Here is an example for the extended installer::
  259. $ sh ~/Downloads/x86_64-buildtools-extended-nativesdk-standalone-&DISTRO;.sh
  260. or for the make-only installer::
  261. $ sh ~/Downloads/x86_64-buildtools-make-nativesdk-standalone-&DISTRO;.sh
  262. During execution, a prompt appears that allows you to choose the
  263. installation directory. For example, you could choose the following:
  264. ``/home/your_username/buildtools``
  265. 5. Source the tools environment setup script by using a command like the
  266. following::
  267. $ source /home/your_username/buildtools/environment-setup-x86_64-poky-linux
  268. Of course, you need to supply your installation directory and be sure to
  269. use the right file (i.e. i586 or x86_64).
  270. After you have sourced the setup script, the tools are added to
  271. ``PATH`` and any other environment variables required to run the
  272. tools are initialized. The results are working versions versions of
  273. Git, tar, Python and ``chrpath``. And in the case of the
  274. ``buildtools-extended`` tarball, additional working versions of tools
  275. including ``gcc``, ``make`` and the other tools included in
  276. ``packagegroup-core-buildessential``.