1.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
2
3*******************
4System Requirements
5*******************
6
7Welcome to the Yocto Project Reference Manual. This manual provides
8reference 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
18":ref:`overview-manual/development-environment:the yocto project development environment`"
19chapter 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
23: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`.
26
27.. note::
28
29   For more information about the Yocto Project Documentation set, see
30   the :ref:`ref-manual/resources:links and related documentation` section.
31
32Minimum Free Disk Space
33=======================
34
35To build an image such as ``core-image-sato`` for the ``qemux86-64`` machine,
36you need a system with at least &MIN_DISK_SPACE; Gbytes of free disk space.
37However, much more disk space will be necessary to build more complex images,
38to run multiple builds and to cache build artifacts, improving build efficiency.
39
40If you have a shortage of disk space, see the ":doc:`/dev-manual/disk-space`"
41section of the Development Tasks Manual.
42
43Minimum System RAM
44==================
45
46You will manage to build an image such as ``core-image-sato`` for the
47``qemux86-64`` machine with as little as &MIN_RAM; Gbytes of RAM on an old
48system with 4 CPU cores, but your builds will be much faster on a system with
49as much RAM and as many CPU cores as possible.
50
51.. _system-requirements-supported-distros:
52
53Supported Linux Distributions
54=============================
55
56Currently, the Yocto Project is supported on the following distributions:
57
58-  Ubuntu 18.04 (LTS)
59
60-  Ubuntu 20.04 (LTS)
61
62-  Ubuntu 22.04 (LTS)
63
64-  Fedora 36
65
66-  Fedora 37
67
68-  AlmaLinux 8.7
69
70-  AlmaLinux 9.1
71
72-  Debian GNU/Linux 11.x (Bullseye)
73
74-  OpenSUSE Leap 15.3
75
76-  OpenSUSE Leap 15.4
77
78.. note::
79
80   -  While the Yocto Project Team attempts to ensure all Yocto Project
81      releases are one hundred percent compatible with each officially
82      supported Linux distribution, you may still encounter problems
83      that happen only with a specific distribution.
84
85   -  Yocto Project releases are tested against the stable Linux
86      distributions in the above list. The Yocto Project should work
87      on other distributions but validation is not performed against
88      them.
89
90   -  In particular, the Yocto Project does not support and currently
91      has no plans to support rolling-releases or development
92      distributions due to their constantly changing nature. We welcome
93      patches and bug reports, but keep in mind that our priority is on
94      the supported platforms listed above.
95
96   -  If your Linux distribution is not in the above list, we recommend to
97      get the :term:`buildtools` or :term:`buildtools-extended` tarballs
98      containing the host tools required by your Yocto Project release,
99      typically by running ``scripts/install-buildtools`` as explained in
100      the ":ref:`system-requirements-buildtools`" section.
101
102   -  You may use Windows Subsystem For Linux v2 to set up a build host
103      using Windows 10 or later, or Windows Server 2019 or later, but validation
104      is not performed against build hosts using WSL 2.
105
106      See the
107      :ref:`dev-manual/start:setting up to use windows subsystem for linux (wsl 2)`
108      section in the Yocto Project Development Tasks Manual for more information.
109
110   -  If you encounter problems, please go to :yocto_bugs:`Yocto Project
111      Bugzilla <>` and submit a bug. We are
112      interested in hearing about your experience. For information on
113      how to submit a bug, see the Yocto Project
114      :yocto_wiki:`Bugzilla wiki page </Bugzilla_Configuration_and_Bug_Tracking>`
115      and the ":ref:`dev-manual/changes:submitting a defect against the yocto project`"
116      section in the Yocto Project Development Tasks Manual.
117
118
119Required Packages for the Build Host
120====================================
121
122The list of packages you need on the host development system can be
123large when covering all build scenarios using the Yocto Project. This
124section describes required packages according to Linux distribution and
125function.
126
127.. _ubuntu-packages:
128
129Ubuntu and Debian
130-----------------
131
132Here are the packages needed to build an image on a headless system
133with a supported Ubuntu or Debian Linux distribution::
134
135   $ sudo apt install &UBUNTU_HOST_PACKAGES_ESSENTIAL;
136
137.. note::
138
139   -  If your build system has the ``oss4-dev`` package installed, you
140      might experience QEMU build failures due to the package installing
141      its own custom ``/usr/include/linux/soundcard.h`` on the Debian
142      system. If you run into this situation, try either of these solutions::
143
144         $ sudo apt build-dep qemu
145         $ sudo apt remove oss4-dev
146
147Here are the packages needed to build Project documentation manuals::
148
149   $ sudo apt install make python3-pip inkscape texlive-latex-extra
150   &PIP3_HOST_PACKAGES_DOC;
151
152Fedora Packages
153---------------
154
155Here are the packages needed to build an image on a headless system
156with a supported Fedora Linux distribution::
157
158   $ sudo dnf install &FEDORA_HOST_PACKAGES_ESSENTIAL;
159
160Here are the packages needed to build Project documentation manuals::
161
162   $ sudo dnf install make python3-pip which inkscape texlive-fncychap
163   &PIP3_HOST_PACKAGES_DOC;
164
165openSUSE Packages
166-----------------
167
168Here are the packages needed to build an image on a headless system
169with a supported openSUSE distribution::
170
171   $ sudo zypper install &OPENSUSE_HOST_PACKAGES_ESSENTIAL;
172
173Here are the packages needed to build Project documentation manuals::
174
175   $ sudo zypper install make python3-pip which inkscape texlive-fncychap
176   &PIP3_HOST_PACKAGES_DOC;
177
178
179AlmaLinux Packages
180------------------
181
182Here are the packages needed to build an image on a headless system
183with a supported AlmaLinux distribution::
184
185   $ sudo dnf install &ALMALINUX8_HOST_PACKAGES_ESSENTIAL;
186
187.. note::
188
189   -  Extra Packages for Enterprise Linux (i.e. ``epel-release``) is
190      a collection of packages from Fedora built on RHEL/CentOS for
191      easy installation of packages not included in enterprise Linux
192      by default. You need to install these packages separately.
193
194   -  The ``PowerTools/CRB`` repo provides additional packages such as
195      ``rpcgen`` and ``texinfo``.
196
197   -  The ``makecache`` command consumes additional Metadata from
198      ``epel-release``.
199
200Here are the packages needed to build Project documentation manuals::
201
202   $ sudo dnf install make python3-pip which inkscape texlive-fncychap
203   &PIP3_HOST_PACKAGES_DOC;
204
205.. _system-requirements-buildtools:
206
207Required Git, tar, Python, make and gcc Versions
208================================================
209
210In order to use the build system, your host development system must meet
211the following version requirements for Git, tar, and Python:
212
213-  Git &MIN_GIT_VERSION; or greater
214
215-  tar &MIN_TAR_VERSION; or greater
216
217-  Python &MIN_PYTHON_VERSION; or greater
218
219-  GNU make &MIN_MAKE_VERSION; or greater
220
221If your host development system does not meet all these requirements,
222you can resolve this by installing a :term:`buildtools` tarball that
223contains these tools. You can either download a pre-built tarball or
224use BitBake to build one.
225
226In addition, your host development system must meet the following
227version requirement for gcc:
228
229-  gcc &MIN_GCC_VERSION; or greater
230
231If your host development system does not meet this requirement, you can
232resolve this by installing a :term:`buildtools-extended` tarball that
233contains additional tools, the equivalent of the Debian/Ubuntu ``build-essential``
234package.
235
236For systems with a broken make version (e.g. make 4.2.1 without patches) but
237where the rest of the host tools are usable, you can use the :term:`buildtools-make`
238tarball instead.
239
240In the sections that follow, three different methods will be described for
241installing the :term:`buildtools`, :term:`buildtools-extended` or :term:`buildtools-make`
242toolset.
243
244Installing a Pre-Built ``buildtools`` Tarball with ``install-buildtools`` script
245--------------------------------------------------------------------------------
246
247The ``install-buildtools`` script is the easiest of the three methods by
248which you can get these tools. It downloads a pre-built :term:`buildtools`
249installer and automatically installs the tools for you:
250
251#. Execute the ``install-buildtools`` script. Here is an example::
252
253      $ cd poky
254      $ scripts/install-buildtools \
255        --without-extended-buildtools \
256        --base-url &YOCTO_DL_URL;/releases/yocto \
257        --release yocto-&DISTRO; \
258        --installer-version &DISTRO;
259
260   During execution, the :term:`buildtools` tarball will be downloaded, the
261   checksum of the download will be verified, the installer will be run
262   for you, and some basic checks will be run to make sure the
263   installation is functional.
264
265   To avoid the need of ``sudo`` privileges, the ``install-buildtools``
266   script will by default tell the installer to install in::
267
268      /path/to/poky/buildtools
269
270   If your host development system needs the additional tools provided
271   in the :term:`buildtools-extended` tarball, you can instead execute the
272   ``install-buildtools`` script with the default parameters::
273
274      $ cd poky
275      $ scripts/install-buildtools
276
277   Alternatively if your host development system has a broken ``make``
278   version such that you only need a known good version of ``make``,
279   you can use the ``--make-only`` option::
280
281      $ cd poky
282      $ scripts/install-buildtools --make-only
283
284#. Source the tools environment setup script by using a command like the
285   following::
286
287      $ source /path/to/poky/buildtools/environment-setup-x86_64-pokysdk-linux
288
289   After you have sourced the setup script, the tools are added to
290   ``PATH`` and any other environment variables required to run the
291   tools are initialized. The results are working versions versions of
292   Git, tar, Python and ``chrpath``. And in the case of the
293   :term:`buildtools-extended` tarball, additional working versions of tools
294   including ``gcc``, ``make`` and the other tools included in
295   ``packagegroup-core-buildessential``.
296
297Downloading a Pre-Built ``buildtools`` Tarball
298----------------------------------------------
299
300If you would prefer not to use the ``install-buildtools`` script, you can instead
301download and run a pre-built :term:`buildtools` installer yourself with the following
302steps:
303
304#. Go to :yocto_dl:`/releases/yocto/yocto-&DISTRO;/buildtools/`, locate and
305   download the ``.sh`` file corresponding to your host architecture
306   and to :term:`buildtools`, :term:`buildtools-extended` or :term:`buildtools-make`.
307
308#. Execute the installation script. Here is an example for the
309   traditional installer::
310
311      $ sh ~/Downloads/x86_64-buildtools-nativesdk-standalone-&DISTRO;.sh
312
313   Here is an example for the extended installer::
314
315      $ sh ~/Downloads/x86_64-buildtools-extended-nativesdk-standalone-&DISTRO;.sh
316
317   An example for the make-only installer::
318
319      $ sh ~/Downloads/x86_64-buildtools-make-nativesdk-standalone-&DISTRO;.sh
320
321   During execution, a prompt appears that allows you to choose the
322   installation directory. For example, you could choose the following:
323   ``/home/your-username/buildtools``
324
325#. As instructed by the installer script, you will have to source the tools
326   environment setup script::
327
328      $ source /home/your_username/buildtools/environment-setup-x86_64-pokysdk-linux
329
330   After you have sourced the setup script, the tools are added to
331   ``PATH`` and any other environment variables required to run the
332   tools are initialized. The results are working versions versions of
333   Git, tar, Python and ``chrpath``. And in the case of the
334   :term:`buildtools-extended` tarball, additional working versions of tools
335   including ``gcc``, ``make`` and the other tools included in
336   ``packagegroup-core-buildessential``.
337
338Building Your Own ``buildtools`` Tarball
339----------------------------------------
340
341Building and running your own :term:`buildtools` installer applies only when you
342have a build host that can already run BitBake. In this case, you use
343that machine to build the ``.sh`` file and then take steps to transfer
344and run it on a machine that does not meet the minimal Git, tar, and
345Python (or gcc) requirements.
346
347Here are the steps to take to build and run your own :term:`buildtools`
348installer:
349
350#. On the machine that is able to run BitBake, be sure you have set up
351   your build environment with the setup script
352   (:ref:`structure-core-script`).
353
354#. Run the BitBake command to build the tarball::
355
356      $ bitbake buildtools-tarball
357
358   or to build the extended tarball::
359
360      $ bitbake buildtools-extended-tarball
361
362   or to build the make-only tarball::
363
364      $ bitbake buildtools-make-tarball
365
366   .. note::
367
368      The :term:`SDKMACHINE` variable in your ``local.conf`` file determines
369      whether you build tools for a 32-bit or 64-bit system.
370
371   Once the build completes, you can find the ``.sh`` file that installs
372   the tools in the ``tmp/deploy/sdk`` subdirectory of the
373   :term:`Build Directory`. The installer file has the string
374   "buildtools" or "buildtools-extended" in the name.
375
376#. Transfer the ``.sh`` file from the build host to the machine that
377   does not meet the Git, tar, or Python (or gcc) requirements.
378
379#. On this machine, run the ``.sh`` file to install the tools. Here is an
380   example for the traditional installer::
381
382      $ sh ~/Downloads/x86_64-buildtools-nativesdk-standalone-&DISTRO;.sh
383
384   For the extended installer::
385
386      $ sh ~/Downloads/x86_64-buildtools-extended-nativesdk-standalone-&DISTRO;.sh
387
388   And for the make-only installer::
389
390      $ sh ~/Downloads/x86_64-buildtools-make-nativesdk-standalone-&DISTRO;.sh
391
392   During execution, a prompt appears that allows you to choose the
393   installation directory. For example, you could choose the following:
394   ``/home/your_username/buildtools``
395
396#. Source the tools environment setup script by using a command like the
397   following::
398
399      $ source /home/your_username/buildtools/environment-setup-x86_64-poky-linux
400
401   After you have sourced the setup script, the tools are added to
402   ``PATH`` and any other environment variables required to run the
403   tools are initialized. The results are working versions versions of
404   Git, tar, Python and ``chrpath``. And in the case of the
405   :term:`buildtools-extended` tarball, additional working versions of tools
406   including ``gcc``, ``make`` and the other tools included in
407   ``packagegroup-core-buildessential``.
408