blob: 04f9efaa23d3d4f76308325c172e7f137eb0d7b4 [file] [log] [blame]
Andrew Geisslerf0343792020-11-18 10:42:21 -06001.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002
3*******************
4System Requirements
5*******************
6
Andrew Geissler5199d832021-09-24 16:47:35 -05007Welcome to the Yocto Project Reference Manual. This manual provides
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008reference information for the current release of the Yocto Project, and
9is most effectively used after you have an understanding of the basics
10of the Yocto Project. The manual is neither meant to be read as a
11starting point to the Yocto Project, nor read from start to finish.
12Rather, use this manual to find variable definitions, class
13descriptions, and so forth as needed during the course of using the
14Yocto Project.
15
16For introductory information on the Yocto Project, see the
17:yocto_home:`Yocto Project Website <>` and the
Andrew Geissler09209ee2020-12-13 08:44:15 -060018":ref:`overview-manual/development-environment:the yocto project development environment`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -050019chapter in the Yocto Project Overview and Concepts Manual.
20
21If you want to use the Yocto Project to quickly build an image without
22having to understand concepts, work through the
Andrew Geissler09209ee2020-12-13 08:44:15 -060023:doc:`/brief-yoctoprojectqs/index` document. You can find "how-to"
24information in the :doc:`/dev-manual/index`. You can find Yocto Project overview
25and conceptual information in the :doc:`/overview-manual/index`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -050026
27.. note::
28
29 For more information about the Yocto Project Documentation set, see
Andrew Geissler4c19ea12020-10-27 13:52:24 -050030 the :ref:`ref-manual/resources:links and related documentation` section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -050031
32.. _detailed-supported-distros:
33
34Supported Linux Distributions
35=============================
36
37Currently, the Yocto Project is supported on the following
38distributions:
39
Andrew Geisslerc9f78652020-09-18 14:11:35 -050040- Ubuntu 18.04 (LTS)
41
William A. Kennington IIIac69b482021-06-02 12:28:27 -070042- Ubuntu 20.04 (LTS)
Andrew Geisslerc9f78652020-09-18 14:11:35 -050043
Andrew Geissler595f6302022-01-24 19:11:47 +000044- Fedora 34
Andrew Geisslerc9f78652020-09-18 14:11:35 -050045
Andrew Geissler9aee5002022-03-30 16:27:02 +000046- Fedora 35
47
Andrew Geisslerc9f78652020-09-18 14:11:35 -050048- CentOS 7.x
49
50- CentOS 8.x
51
Andrew Geissler9aee5002022-03-30 16:27:02 +000052- AlmaLinux 8.5
Andrew Geisslerc9f78652020-09-18 14:11:35 -050053
54- Debian GNU/Linux 9.x (Stretch)
55
56- Debian GNU/Linux 10.x (Buster)
57
Andrew Geissler595f6302022-01-24 19:11:47 +000058- Debian GNU/Linux 11.x (Bullseye)
Andrew Geisslerc9f78652020-09-18 14:11:35 -050059
Andrew Geissler9aee5002022-03-30 16:27:02 +000060- OpenSUSE Leap 15.3
Andrew Geisslerc9f78652020-09-18 14:11:35 -050061
62.. note::
63
64 - While the Yocto Project Team attempts to ensure all Yocto Project
65 releases are one hundred percent compatible with each officially
William A. Kennington IIIac69b482021-06-02 12:28:27 -070066 supported Linux distribution, you may still encounter problems
67 that happen only with a specific distribution.
Andrew Geisslerc9f78652020-09-18 14:11:35 -050068
69 - Yocto Project releases are tested against the stable Linux
70 distributions in the above list. The Yocto Project should work
71 on other distributions but validation is not performed against
72 them.
73
74 - In particular, the Yocto Project does not support and currently
75 has no plans to support rolling-releases or development
76 distributions due to their constantly changing nature. We welcome
77 patches and bug reports, but keep in mind that our priority is on
78 the supported platforms listed below.
79
80 - You may use Windows Subsystem For Linux v2 to set up a build host
81 using Windows 10, but validation is not performed against build
82 hosts using WSLv2.
83
84 - The Yocto Project is not compatible with WSLv1, it is
85 compatible but not officially supported nor validated with
86 WSLv2, if you still decide to use WSL please upgrade to WSLv2.
87
Andrew Geissler4c19ea12020-10-27 13:52:24 -050088 - If you encounter problems, please go to :yocto_bugs:`Yocto Project
89 Bugzilla <>` and submit a bug. We are
Andrew Geisslerc9f78652020-09-18 14:11:35 -050090 interested in hearing about your experience. For information on
91 how to submit a bug, see the Yocto Project
Andrew Geissler09209ee2020-12-13 08:44:15 -060092 :yocto_wiki:`Bugzilla wiki page </Bugzilla_Configuration_and_Bug_Tracking>`
93 and the ":ref:`dev-manual/common-tasks:submitting a defect against the yocto project`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -050094 section in the Yocto Project Development Tasks Manual.
95
96
97Required Packages for the Build Host
98====================================
99
100The list of packages you need on the host development system can be
101large when covering all build scenarios using the Yocto Project. This
102section describes required packages according to Linux distribution and
103function.
104
105.. _ubuntu-packages:
106
107Ubuntu and Debian
108-----------------
109
William A. Kennington IIIac69b482021-06-02 12:28:27 -0700110Here are the required packages by function given a
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500111supported Ubuntu or Debian Linux distribution:
112
113.. note::
114
115 - If your build system has the ``oss4-dev`` package installed, you
116 might experience QEMU build failures due to the package installing
117 its own custom ``/usr/include/linux/soundcard.h`` on the Debian
William A. Kennington IIIac69b482021-06-02 12:28:27 -0700118 system. If you run into this situation, try either of these solutions::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500119
Andrew Geisslereff27472021-10-29 15:35:00 -0500120 $ sudo apt build-dep qemu
121 $ sudo apt remove oss4-dev
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500122
123 - For Debian-8, ``python3-git`` and ``pylint3`` are no longer
Andrew Geisslereff27472021-10-29 15:35:00 -0500124 available via ``apt``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500125 ::
126
127 $ sudo pip3 install GitPython pylint==1.9.5
128
Andrew Geisslerc926e172021-05-07 16:11:35 -0500129- *Essentials:* Packages needed to build an image on a headless system::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500130
Andrew Geisslereff27472021-10-29 15:35:00 -0500131 $ sudo apt install &UBUNTU_HOST_PACKAGES_ESSENTIAL;
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500132
133- *Documentation:* Packages needed if you are going to build out the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500134 Yocto Project documentation manuals::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500135
Andrew Geisslereff27472021-10-29 15:35:00 -0500136 $ sudo apt install make python3-pip
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500137 &PIP3_HOST_PACKAGES_DOC;
138
139 .. note::
140
141 It is currently not possible to build out documentation from Debian 8
142 (Jessie) because of outdated ``pip3`` and ``python3``. ``python3-sphinx``
143 is too outdated.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500144
145Fedora Packages
146---------------
147
William A. Kennington IIIac69b482021-06-02 12:28:27 -0700148Here are the required packages by function given a
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500149supported Fedora Linux distribution:
150
151- *Essentials:* Packages needed to build an image for a headless
Andrew Geisslerc926e172021-05-07 16:11:35 -0500152 system::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500153
154 $ sudo dnf install &FEDORA_HOST_PACKAGES_ESSENTIAL;
155
156- *Documentation:* Packages needed if you are going to build out the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500157 Yocto Project documentation manuals::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500158
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500159 $ sudo dnf install make python3-pip which
160 &PIP3_HOST_PACKAGES_DOC;
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500161
162openSUSE Packages
163-----------------
164
William A. Kennington IIIac69b482021-06-02 12:28:27 -0700165Here are the required packages by function given a
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500166supported openSUSE Linux distribution:
167
168- *Essentials:* Packages needed to build an image for a headless
Andrew Geisslerc926e172021-05-07 16:11:35 -0500169 system::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500170
171 $ sudo zypper install &OPENSUSE_HOST_PACKAGES_ESSENTIAL;
172
173- *Documentation:* Packages needed if you are going to build out the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500174 Yocto Project documentation manuals::
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500175
176 $ sudo zypper install make python3-pip which
177 &PIP3_HOST_PACKAGES_DOC;
178
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500179
180CentOS-7 Packages
181-----------------
182
William A. Kennington IIIac69b482021-06-02 12:28:27 -0700183Here are the required packages by function given a
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500184supported CentOS-7 Linux distribution:
185
186- *Essentials:* Packages needed to build an image for a headless
Andrew Geisslerc926e172021-05-07 16:11:35 -0500187 system::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500188
189 $ sudo yum install &CENTOS7_HOST_PACKAGES_ESSENTIAL;
190
191 .. note::
192
193 - Extra Packages for Enterprise Linux (i.e. ``epel-release``) is
194 a collection of packages from Fedora built on RHEL/CentOS for
195 easy installation of packages not included in enterprise Linux
196 by default. You need to install these packages separately.
197
198 - The ``makecache`` command consumes additional Metadata from
199 ``epel-release``.
200
201- *Documentation:* Packages needed if you are going to build out the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500202 Yocto Project documentation manuals::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500203
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500204 $ sudo yum install make python3-pip which
205 &PIP3_HOST_PACKAGES_DOC;
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500206
207CentOS-8 Packages
208-----------------
209
William A. Kennington IIIac69b482021-06-02 12:28:27 -0700210Here are the required packages by function given a
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500211supported CentOS-8 Linux distribution:
212
213- *Essentials:* Packages needed to build an image for a headless
Andrew Geisslerc926e172021-05-07 16:11:35 -0500214 system::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500215
216 $ sudo dnf install &CENTOS8_HOST_PACKAGES_ESSENTIAL;
217
218 .. note::
219
220 - Extra Packages for Enterprise Linux (i.e. ``epel-release``) is
221 a collection of packages from Fedora built on RHEL/CentOS for
222 easy installation of packages not included in enterprise Linux
223 by default. You need to install these packages separately.
224
225 - The ``PowerTools`` repo provides additional packages such as
226 ``rpcgen`` and ``texinfo``.
227
228 - The ``makecache`` command consumes additional Metadata from
229 ``epel-release``.
230
231- *Documentation:* Packages needed if you are going to build out the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500232 Yocto Project documentation manuals::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500233
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500234 $ sudo dnf install make python3-pip which
235 &PIP3_HOST_PACKAGES_DOC;
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500236
237Required Git, tar, Python and gcc Versions
238==========================================
239
240In order to use the build system, your host development system must meet
241the following version requirements for Git, tar, and Python:
242
Andrew Geissler3b8a17c2021-04-15 15:55:55 -0500243- Git &MIN_GIT_VERSION; or greater
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500244
Andrew Geissler3b8a17c2021-04-15 15:55:55 -0500245- tar &MIN_TAR_VERSION; or greater
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500246
Andrew Geissler3b8a17c2021-04-15 15:55:55 -0500247- Python &MIN_PYTHON_VERSION; or greater
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500248
249If your host development system does not meet all these requirements,
250you can resolve this by installing a ``buildtools`` tarball that
251contains these tools. You can get the tarball one of two ways: download
252a pre-built tarball or use BitBake to build the tarball.
253
254In addition, your host development system must meet the following
255version requirement for gcc:
256
Andrew Geissler3b8a17c2021-04-15 15:55:55 -0500257- gcc &MIN_GCC_VERSION; or greater
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500258
259If your host development system does not meet this requirement, you can
260resolve this by installing a ``buildtools-extended`` tarball that
Andrew Geissler3b8a17c2021-04-15 15:55:55 -0500261contains additional tools, the equivalent of the Debian/Ubuntu ``build-essential``
262package.
263
264In the sections that follow, three different methods will be described for
265installing the ``buildtools`` or ``buildtools-extended`` toolset.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500266
267Installing a Pre-Built ``buildtools`` Tarball with ``install-buildtools`` script
268--------------------------------------------------------------------------------
269
270The ``install-buildtools`` script is the easiest of the three methods by
271which you can get these tools. It downloads a pre-built buildtools
272installer and automatically installs the tools for you:
273
Andrew Geisslerc926e172021-05-07 16:11:35 -05002741. Execute the ``install-buildtools`` script. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500275
276 $ cd poky
Andrew Geissler5199d832021-09-24 16:47:35 -0500277 $ scripts/install-buildtools \
278 --without-extended-buildtools \
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500279 --base-url &YOCTO_DL_URL;/releases/yocto \
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500280 --release yocto-&DISTRO; \
281 --installer-version &DISTRO;
282
283 During execution, the buildtools tarball will be downloaded, the
284 checksum of the download will be verified, the installer will be run
Andrew Geissler3b8a17c2021-04-15 15:55:55 -0500285 for you, and some basic checks will be run to make sure the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500286 installation is functional.
287
288 To avoid the need of ``sudo`` privileges, the ``install-buildtools``
Andrew Geisslerc926e172021-05-07 16:11:35 -0500289 script will by default tell the installer to install in::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500290
291 /path/to/poky/buildtools
292
293 If your host development system needs the additional tools provided
294 in the ``buildtools-extended`` tarball, you can instead execute the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500295 ``install-buildtools`` script with the default parameters::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500296
297 $ cd poky
298 $ scripts/install-buildtools
299
3002. Source the tools environment setup script by using a command like the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500301 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500302
303 $ source /path/to/poky/buildtools/environment-setup-x86_64-pokysdk-linux
304
305 Of course, you need to supply your installation directory and be sure to
306 use the right file (i.e. i586 or x86_64).
307
308 After you have sourced the setup script, the tools are added to
309 ``PATH`` and any other environment variables required to run the
310 tools are initialized. The results are working versions versions of
311 Git, tar, Python and ``chrpath``. And in the case of the
312 ``buildtools-extended`` tarball, additional working versions of tools
313 including ``gcc``, ``make`` and the other tools included in
314 ``packagegroup-core-buildessential``.
315
316Downloading a Pre-Built ``buildtools`` Tarball
317----------------------------------------------
318
Andrew Geissler3b8a17c2021-04-15 15:55:55 -0500319If you would prefer not to use the ``install-buildtools`` script, you can instead
320download and run a pre-built buildtools installer yourself with the following
321steps:
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500322
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00003231. Locate and download the ``*.sh`` at :yocto_dl:`/releases/yocto/yocto-&DISTRO;/buildtools/`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500324
3252. Execute the installation script. Here is an example for the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500326 traditional installer::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500327
Andrew Geisslerd1e89492021-02-12 15:35:20 -0600328 $ sh ~/Downloads/x86_64-buildtools-nativesdk-standalone-&DISTRO;.sh
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500329
Andrew Geisslerc926e172021-05-07 16:11:35 -0500330 Here is an example for the extended installer::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500331
Andrew Geisslerd1e89492021-02-12 15:35:20 -0600332 $ sh ~/Downloads/x86_64-buildtools-extended-nativesdk-standalone-&DISTRO;.sh
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500333
334 During execution, a prompt appears that allows you to choose the
335 installation directory. For example, you could choose the following:
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500336 ``/home/your-username/buildtools``
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500337
3383. Source the tools environment setup script by using a command like the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500339 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500340
341 $ source /home/your_username/buildtools/environment-setup-i586-poky-linux
342
343 Of
344 course, you need to supply your installation directory and be sure to
345 use the right file (i.e. i585 or x86-64).
346
347 After you have sourced the setup script, the tools are added to
348 ``PATH`` and any other environment variables required to run the
349 tools are initialized. The results are working versions versions of
350 Git, tar, Python and ``chrpath``. And in the case of the
351 ``buildtools-extended`` tarball, additional working versions of tools
352 including ``gcc``, ``make`` and the other tools included in
353 ``packagegroup-core-buildessential``.
354
355Building Your Own ``buildtools`` Tarball
356----------------------------------------
357
358Building and running your own buildtools installer applies only when you
359have a build host that can already run BitBake. In this case, you use
360that machine to build the ``.sh`` file and then take steps to transfer
361and run it on a machine that does not meet the minimal Git, tar, and
362Python (or gcc) requirements.
363
364Here are the steps to take to build and run your own buildtools
365installer:
366
3671. On the machine that is able to run BitBake, be sure you have set up
368 your build environment with the setup script
369 (:ref:`structure-core-script`).
370
Andrew Geisslerc926e172021-05-07 16:11:35 -05003712. Run the BitBake command to build the tarball::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500372
373 $ bitbake buildtools-tarball
374
Andrew Geisslerc926e172021-05-07 16:11:35 -0500375 or run the BitBake command to build the extended tarball::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500376
377 $ bitbake buildtools-extended-tarball
378
379 .. note::
380
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500381 The :term:`SDKMACHINE` variable in your ``local.conf`` file determines
382 whether you build tools for a 32-bit or 64-bit system.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500383
384 Once the build completes, you can find the ``.sh`` file that installs
385 the tools in the ``tmp/deploy/sdk`` subdirectory of the
386 :term:`Build Directory`. The installer file has the string
387 "buildtools" (or "buildtools-extended") in the name.
388
3893. Transfer the ``.sh`` file from the build host to the machine that
390 does not meet the Git, tar, or Python (or gcc) requirements.
391
3924. On the machine that does not meet the requirements, run the ``.sh``
393 file to install the tools. Here is an example for the traditional
Andrew Geisslerc926e172021-05-07 16:11:35 -0500394 installer::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500395
396 $ sh ~/Downloads/x86_64-buildtools-nativesdk-standalone-&DISTRO;.sh
397
Andrew Geisslerc926e172021-05-07 16:11:35 -0500398 Here is an example for the extended installer::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500399
400 $ sh ~/Downloads/x86_64-buildtools-extended-nativesdk-standalone-&DISTRO;.sh
401
402 During execution, a prompt appears that allows you to choose the
403 installation directory. For example, you could choose the following:
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500404 ``/home/your_username/buildtools``
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500405
4065. Source the tools environment setup script by using a command like the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500407 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500408
409 $ source /home/your_username/buildtools/environment-setup-x86_64-poky-linux
410
411 Of course, you need to supply your installation directory and be sure to
412 use the right file (i.e. i586 or x86_64).
413
414 After you have sourced the setup script, the tools are added to
415 ``PATH`` and any other environment variables required to run the
416 tools are initialized. The results are working versions versions of
417 Git, tar, Python and ``chrpath``. And in the case of the
418 ``buildtools-extended`` tarball, additional working versions of tools
419 including ``gcc``, ``make`` and the other tools included in
420 ``packagegroup-core-buildessential``.