system-requirements.rst 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442
  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 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 </Bugzilla_Configuration_and_Bug_Tracking>`
  68. and the ":ref:`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 python3-pip
  101. &PIP3_HOST_PACKAGES_DOC;
  102. .. note::
  103. It is currently not possible to build out documentation from Debian 8
  104. (Jessie) because of outdated ``pip3`` and ``python3``. ``python3-sphinx``
  105. is too outdated.
  106. Fedora Packages
  107. ---------------
  108. The following list shows the required packages by function given a
  109. supported Fedora Linux distribution:
  110. - *Essentials:* Packages needed to build an image for a headless
  111. system:
  112. ::
  113. $ sudo dnf install &FEDORA_HOST_PACKAGES_ESSENTIAL;
  114. - *Documentation:* Packages needed if you are going to build out the
  115. Yocto Project documentation manuals:
  116. ::
  117. $ sudo dnf install make python3-pip which
  118. &PIP3_HOST_PACKAGES_DOC;
  119. openSUSE Packages
  120. -----------------
  121. The following list shows the required packages by function given a
  122. supported openSUSE Linux distribution:
  123. - *Essentials:* Packages needed to build an image for a headless
  124. system:
  125. ::
  126. $ sudo zypper install &OPENSUSE_HOST_PACKAGES_ESSENTIAL;
  127. - *Documentation:* Packages needed if you are going to build out the
  128. Yocto Project documentation manuals:
  129. ::
  130. $ sudo zypper install make python3-pip which
  131. &PIP3_HOST_PACKAGES_DOC;
  132. CentOS-7 Packages
  133. -----------------
  134. The following list shows the required packages by function given a
  135. supported CentOS-7 Linux distribution:
  136. - *Essentials:* Packages needed to build an image for a headless
  137. system:
  138. ::
  139. $ sudo yum install &CENTOS7_HOST_PACKAGES_ESSENTIAL;
  140. .. note::
  141. - Extra Packages for Enterprise Linux (i.e. ``epel-release``) is
  142. a collection of packages from Fedora built on RHEL/CentOS for
  143. easy installation of packages not included in enterprise Linux
  144. by default. You need to install these packages separately.
  145. - The ``makecache`` command consumes additional Metadata from
  146. ``epel-release``.
  147. - *Documentation:* Packages needed if you are going to build out the
  148. Yocto Project documentation manuals:
  149. ::
  150. $ sudo yum install make python3-pip which
  151. &PIP3_HOST_PACKAGES_DOC;
  152. CentOS-8 Packages
  153. -----------------
  154. The following list shows the required packages by function given a
  155. supported CentOS-8 Linux distribution:
  156. - *Essentials:* Packages needed to build an image for a headless
  157. system:
  158. ::
  159. $ sudo dnf install &CENTOS8_HOST_PACKAGES_ESSENTIAL;
  160. .. note::
  161. - Extra Packages for Enterprise Linux (i.e. ``epel-release``) is
  162. a collection of packages from Fedora built on RHEL/CentOS for
  163. easy installation of packages not included in enterprise Linux
  164. by default. You need to install these packages separately.
  165. - The ``PowerTools`` repo provides additional packages such as
  166. ``rpcgen`` and ``texinfo``.
  167. - The ``makecache`` command consumes additional Metadata from
  168. ``epel-release``.
  169. - *Documentation:* Packages needed if you are going to build out the
  170. Yocto Project documentation manuals:
  171. ::
  172. $ sudo dnf install make python3-pip which
  173. &PIP3_HOST_PACKAGES_DOC;
  174. Required Git, tar, Python and gcc Versions
  175. ==========================================
  176. In order to use the build system, your host development system must meet
  177. the following version requirements for Git, tar, and Python:
  178. - Git 1.8.3.1 or greater
  179. - tar 1.28 or greater
  180. - Python 3.5.0 or greater
  181. If your host development system does not meet all these requirements,
  182. you can resolve this by installing a ``buildtools`` tarball that
  183. contains these tools. You can get the tarball one of two ways: download
  184. a pre-built tarball or use BitBake to build the tarball.
  185. In addition, your host development system must meet the following
  186. version requirement for gcc:
  187. - gcc 5.0 or greater
  188. If your host development system does not meet this requirement, you can
  189. resolve this by installing a ``buildtools-extended`` tarball that
  190. contains additional tools, the equivalent of ``buildtools-essential``.
  191. Installing a Pre-Built ``buildtools`` Tarball with ``install-buildtools`` script
  192. --------------------------------------------------------------------------------
  193. The ``install-buildtools`` script is the easiest of the three methods by
  194. which you can get these tools. It downloads a pre-built buildtools
  195. installer and automatically installs the tools for you:
  196. 1. Execute the ``install-buildtools`` script. Here is an example:
  197. ::
  198. $ cd poky
  199. $ scripts/install-buildtools --without-extended-buildtools \
  200. --base-url &YOCTO_DL_URL;/releases/yocto \
  201. --release yocto-&DISTRO; \
  202. --installer-version &DISTRO;
  203. During execution, the buildtools tarball will be downloaded, the
  204. checksum of the download will be verified, the installer will be run
  205. for you, and some basic checks will be run to to make sure the
  206. installation is functional.
  207. To avoid the need of ``sudo`` privileges, the ``install-buildtools``
  208. script will by default tell the installer to install in:
  209. ::
  210. /path/to/poky/buildtools
  211. If your host development system needs the additional tools provided
  212. in the ``buildtools-extended`` tarball, you can instead execute the
  213. ``install-buildtools`` script with the default parameters:
  214. ::
  215. $ cd poky
  216. $ scripts/install-buildtools
  217. 2. Source the tools environment setup script by using a command like the
  218. following:
  219. ::
  220. $ source /path/to/poky/buildtools/environment-setup-x86_64-pokysdk-linux
  221. Of course, you need to supply your installation directory and be sure to
  222. use the right file (i.e. i586 or x86_64).
  223. After you have sourced the setup script, the tools are added to
  224. ``PATH`` and any other environment variables required to run the
  225. tools are initialized. The results are working versions versions of
  226. Git, tar, Python and ``chrpath``. And in the case of the
  227. ``buildtools-extended`` tarball, additional working versions of tools
  228. including ``gcc``, ``make`` and the other tools included in
  229. ``packagegroup-core-buildessential``.
  230. Downloading a Pre-Built ``buildtools`` Tarball
  231. ----------------------------------------------
  232. Downloading and running a pre-built buildtools installer is the easiest
  233. of the two methods by which you can get these tools:
  234. 1. Locate and download the ``*.sh`` at &YOCTO_RELEASE_DL_URL;/buildtools/
  235. 2. Execute the installation script. Here is an example for the
  236. traditional installer:
  237. ::
  238. $ sh ~/Downloads/x86_64-buildtools-nativesdk-standalone-DISTRO.sh
  239. Here is an example for the extended installer:
  240. ::
  241. $ sh ~/Downloads/x86_64-buildtools-extended-nativesdk-standalone-DISTRO.sh
  242. During execution, a prompt appears that allows you to choose the
  243. installation directory. For example, you could choose the following:
  244. ``/home/your-username/buildtools``
  245. 3. Source the tools environment setup script by using a command like the
  246. following:
  247. ::
  248. $ source /home/your_username/buildtools/environment-setup-i586-poky-linux
  249. Of
  250. course, you need to supply your installation directory and be sure to
  251. use the right file (i.e. i585 or x86-64).
  252. After you have sourced the setup script, the tools are added to
  253. ``PATH`` and any other environment variables required to run the
  254. tools are initialized. The results are working versions versions of
  255. Git, tar, Python and ``chrpath``. And in the case of the
  256. ``buildtools-extended`` tarball, additional working versions of tools
  257. including ``gcc``, ``make`` and the other tools included in
  258. ``packagegroup-core-buildessential``.
  259. Building Your Own ``buildtools`` Tarball
  260. ----------------------------------------
  261. Building and running your own buildtools installer applies only when you
  262. have a build host that can already run BitBake. In this case, you use
  263. that machine to build the ``.sh`` file and then take steps to transfer
  264. and run it on a machine that does not meet the minimal Git, tar, and
  265. Python (or gcc) requirements.
  266. Here are the steps to take to build and run your own buildtools
  267. installer:
  268. 1. On the machine that is able to run BitBake, be sure you have set up
  269. your build environment with the setup script
  270. (:ref:`structure-core-script`).
  271. 2. Run the BitBake command to build the tarball:
  272. ::
  273. $ bitbake buildtools-tarball
  274. or run the BitBake command to build the extended tarball:
  275. ::
  276. $ bitbake buildtools-extended-tarball
  277. .. note::
  278. The :term:`SDKMACHINE` variable in your ``local.conf`` file determines
  279. whether you build tools for a 32-bit or 64-bit system.
  280. Once the build completes, you can find the ``.sh`` file that installs
  281. the tools in the ``tmp/deploy/sdk`` subdirectory of the
  282. :term:`Build Directory`. The installer file has the string
  283. "buildtools" (or "buildtools-extended") in the name.
  284. 3. Transfer the ``.sh`` file from the build host to the machine that
  285. does not meet the Git, tar, or Python (or gcc) requirements.
  286. 4. On the machine that does not meet the requirements, run the ``.sh``
  287. file to install the tools. Here is an example for the traditional
  288. installer:
  289. ::
  290. $ sh ~/Downloads/x86_64-buildtools-nativesdk-standalone-&DISTRO;.sh
  291. Here is an example for the extended installer:
  292. ::
  293. $ sh ~/Downloads/x86_64-buildtools-extended-nativesdk-standalone-&DISTRO;.sh
  294. During execution, a prompt appears that allows you to choose the
  295. installation directory. For example, you could choose the following:
  296. ``/home/your_username/buildtools``
  297. 5. Source the tools environment setup script by using a command like the
  298. following:
  299. ::
  300. $ source /home/your_username/buildtools/environment-setup-x86_64-poky-linux
  301. Of course, you need to supply your installation directory and be sure to
  302. use the right file (i.e. i586 or x86_64).
  303. After you have sourced the setup script, the tools are added to
  304. ``PATH`` and any other environment variables required to run the
  305. tools are initialized. The results are working versions versions of
  306. Git, tar, Python and ``chrpath``. And in the case of the
  307. ``buildtools-extended`` tarball, additional working versions of tools
  308. including ``gcc``, ``make`` and the other tools included in
  309. ``packagegroup-core-buildessential``.