ref-system-requirements.rst 15 KB

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