blob: 041f64c598f7398629cba7bebdce77ed4c6e880d [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001.. 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/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/brief-yoctoprojectqs` document. You can find "how-to"
24information in the :doc:`../dev-manual/dev-manual`. You can find Yocto Project overview
25and conceptual information in the :doc:`../overview-manual/overview-manual`.
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
32.. _detailed-supported-distros:
33
34Supported Linux Distributions
35=============================
36
37Currently, the Yocto Project is supported on the following
38distributions:
39
40- Ubuntu 16.04 (LTS)
41
42- Ubuntu 18.04 (LTS)
43
44- Ubuntu 19.04
45
46- Ubuntu 20.04
47
48- Fedora 28
49
50- Fedora 29
51
52- Fedora 30
53
54- Fedora 31
55
56- Fedora 32
57
58- Fedora 33
59
60- Fedora 34
61
62- CentOS 7.x
63
64- Debian GNU/Linux 8.x (Jessie)
65
66- Debian GNU/Linux 9.x (Stretch)
67
68- Debian GNU/Linux 10.x (Buster)
69
70- Debian GNU/Linux 11.x (Bullseye)
71
72- OpenSUSE Leap 15.1
73
74- OpenSUSE Leap 15.2
75
76
77.. note::
78
79 - While the Yocto Project Team attempts to ensure all Yocto Project
80 releases are one hundred percent compatible with each officially
81 supported Linux distribution, instances might exist where you
82 encounter a problem while using the Yocto Project on a specific
83 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 below.
95
96 - You may use Windows Subsystem For Linux v2 to set up a build host
97 using Windows 10, but validation is not performed against build
98 hosts using WSLv2.
99
100 - The Yocto Project is not compatible with WSLv1, it is
101 compatible but not officially supported nor validated with
102 WSLv2, if you still decide to use WSL please upgrade to WSLv2.
103
104 - If you encounter problems, please go to :yocto_bugs:`Yocto Project
105 Bugzilla <>` and submit a bug. We are
106 interested in hearing about your experience. For information on
107 how to submit a bug, see the Yocto Project
108 :yocto_wiki:`Bugzilla wiki page </wiki/Bugzilla_Configuration_and_Bug_Tracking>`
109 and the ":ref:`dev-manual/dev-manual-common-tasks:submitting a defect against the yocto project`"
110 section in the Yocto Project Development Tasks Manual.
111
112
113Required Packages for the Build Host
114====================================
115
116The list of packages you need on the host development system can be
117large when covering all build scenarios using the Yocto Project. This
118section describes required packages according to Linux distribution and
119function.
120
121.. _ubuntu-packages:
122
123Ubuntu and Debian
124-----------------
125
126The following list shows the required packages by function given a
127supported Ubuntu or Debian Linux distribution:
128
129.. note::
130
131 - If your build system has the ``oss4-dev`` package installed, you
132 might experience QEMU build failures due to the package installing
133 its own custom ``/usr/include/linux/soundcard.h`` on the Debian
134 system. If you run into this situation, either of the following
135 solutions exist:
136 ::
137
138 $ sudo apt-get build-dep qemu
139 $ sudo apt-get remove oss4-dev
140
141 - For Debian-8, ``python3-git`` and ``pylint3`` are no longer
142 available via ``apt-get``.
143 ::
144
145 $ sudo pip3 install GitPython pylint==1.9.5
146
147- *Essentials:* Packages needed to build an image on a headless system:
148 ::
149
150 $ sudo apt-get install &UBUNTU_HOST_PACKAGES_ESSENTIAL;
151
152- *Documentation:* Packages needed if you are going to build out the
153 Yocto Project documentation manuals:
154 ::
155
156 $ sudo apt-get install make python3-pip
157 &PIP3_HOST_PACKAGES_DOC;
158
159 .. note::
160
161 It is currently not possible to build out documentation from Debian 8
162 (Jessie) because of outdated ``pip3`` and ``python3``. ``python3-sphinx``
163 is too outdated.
164
165Fedora Packages
166---------------
167
168The following list shows the required packages by function given a
169supported Fedora Linux distribution:
170
171- *Essentials:* Packages needed to build an image for a headless
172 system:
173 ::
174
175 $ sudo dnf install &FEDORA_HOST_PACKAGES_ESSENTIAL;
176
177- *Documentation:* Packages needed if you are going to build out the
178 Yocto Project documentation manuals:
179 ::
180
181 $ sudo dnf install make python3-pip which
182 &PIP3_HOST_PACKAGES_DOC;
183
184openSUSE Packages
185-----------------
186
187The following list shows the required packages by function given a
188supported openSUSE Linux distribution:
189
190- *Essentials:* Packages needed to build an image for a headless
191 system:
192 ::
193
194 $ sudo zypper install &OPENSUSE_HOST_PACKAGES_ESSENTIAL;
195
196- *Documentation:* Packages needed if you are going to build out the
197 Yocto Project documentation manuals:
198 ::
199
200 $ sudo zypper install make python3-pip which
201 &PIP3_HOST_PACKAGES_DOC;
202
203
204CentOS-7 Packages
205-----------------
206
207The following list shows the required packages by function given a
208supported CentOS-7 Linux distribution:
209
210- *Essentials:* Packages needed to build an image for a headless
211 system:
212 ::
213
214 $ sudo yum install &CENTOS7_HOST_PACKAGES_ESSENTIAL;
215
216 .. note::
217
218 - Extra Packages for Enterprise Linux (i.e. ``epel-release``) is
219 a collection of packages from Fedora built on RHEL/CentOS for
220 easy installation of packages not included in enterprise Linux
221 by default. You need to install these packages separately.
222
223 - The ``makecache`` command consumes additional Metadata from
224 ``epel-release``.
225
226- *Documentation:* Packages needed if you are going to build out the
227 Yocto Project documentation manuals:
228 ::
229
230 $ sudo yum install make python3-pip which
231 &PIP3_HOST_PACKAGES_DOC;
232
233CentOS-8 Packages
234-----------------
235
236The following list shows the required packages by function given a
237supported CentOS-8 Linux distribution:
238
239- *Essentials:* Packages needed to build an image for a headless
240 system:
241 ::
242
243 $ sudo dnf install &CENTOS8_HOST_PACKAGES_ESSENTIAL;
244
245 .. note::
246
247 - Extra Packages for Enterprise Linux (i.e. ``epel-release``) is
248 a collection of packages from Fedora built on RHEL/CentOS for
249 easy installation of packages not included in enterprise Linux
250 by default. You need to install these packages separately.
251
252 - The ``PowerTools`` repo provides additional packages such as
253 ``rpcgen`` and ``texinfo``.
254
255 - The ``makecache`` command consumes additional Metadata from
256 ``epel-release``.
257
258- *Documentation:* Packages needed if you are going to build out the
259 Yocto Project documentation manuals:
260 ::
261
262 $ sudo dnf install make python3-pip which
263 &PIP3_HOST_PACKAGES_DOC;
264
265Required Git, tar, Python and gcc Versions
266==========================================
267
268In order to use the build system, your host development system must meet
269the following version requirements for Git, tar, and Python:
270
271- Git 1.8.3.1 or greater
272
273- tar 1.28 or greater
274
275- Python 3.5.0 or greater
276
277If your host development system does not meet all these requirements,
278you can resolve this by installing a ``buildtools`` tarball that
279contains these tools. You can get the tarball one of two ways: download
280a pre-built tarball or use BitBake to build the tarball.
281
282In addition, your host development system must meet the following
283version requirement for gcc:
284
285- gcc 5.0 or greater
286
287If your host development system does not meet this requirement, you can
288resolve this by installing a ``buildtools-extended`` tarball that
289contains additional tools, the equivalent of ``buildtools-essential``.
290
291Installing a Pre-Built ``buildtools`` Tarball with ``install-buildtools`` script
292--------------------------------------------------------------------------------
293
294The ``install-buildtools`` script is the easiest of the three methods by
295which you can get these tools. It downloads a pre-built buildtools
296installer and automatically installs the tools for you:
297
2981. Execute the ``install-buildtools`` script. Here is an example:
299 ::
300
301 $ cd poky
302 $ scripts/install-buildtools --without-extended-buildtools \
303 --base-url &YOCTO_DL_URL;/releases/yocto \
304 --release yocto-&DISTRO; \
305 --installer-version &DISTRO;
306
307 During execution, the buildtools tarball will be downloaded, the
308 checksum of the download will be verified, the installer will be run
309 for you, and some basic checks will be run to to make sure the
310 installation is functional.
311
312 To avoid the need of ``sudo`` privileges, the ``install-buildtools``
313 script will by default tell the installer to install in:
314 ::
315
316 /path/to/poky/buildtools
317
318 If your host development system needs the additional tools provided
319 in the ``buildtools-extended`` tarball, you can instead execute the
320 ``install-buildtools`` script with the default parameters:
321 ::
322
323 $ cd poky
324 $ scripts/install-buildtools
325
3262. Source the tools environment setup script by using a command like the
327 following:
328 ::
329
330 $ source /path/to/poky/buildtools/environment-setup-x86_64-pokysdk-linux
331
332 Of course, you need to supply your installation directory and be sure to
333 use the right file (i.e. i586 or x86_64).
334
335 After you have sourced the setup script, the tools are added to
336 ``PATH`` and any other environment variables required to run the
337 tools are initialized. The results are working versions versions of
338 Git, tar, Python and ``chrpath``. And in the case of the
339 ``buildtools-extended`` tarball, additional working versions of tools
340 including ``gcc``, ``make`` and the other tools included in
341 ``packagegroup-core-buildessential``.
342
343Downloading a Pre-Built ``buildtools`` Tarball
344----------------------------------------------
345
346Downloading and running a pre-built buildtools installer is the easiest
347of the two methods by which you can get these tools:
348
3491. Locate and download the ``*.sh`` at &YOCTO_RELEASE_DL_URL;/buildtools/
350
3512. Execute the installation script. Here is an example for the
352 traditional installer:
353 ::
354
355 $ sh ~/Downloads/x86_64-buildtools-nativesdk-standalone-DISTRO.sh
356
357 Here is an example for the extended installer:
358 ::
359
360 $ sh ~/Downloads/x86_64-buildtools-extended-nativesdk-standalone-DISTRO.sh
361
362 During execution, a prompt appears that allows you to choose the
363 installation directory. For example, you could choose the following:
364 ``/home/your-username/buildtools``
365
3663. Source the tools environment setup script by using a command like the
367 following:
368 ::
369
370 $ source /home/your_username/buildtools/environment-setup-i586-poky-linux
371
372 Of
373 course, you need to supply your installation directory and be sure to
374 use the right file (i.e. i585 or x86-64).
375
376 After you have sourced the setup script, the tools are added to
377 ``PATH`` and any other environment variables required to run the
378 tools are initialized. The results are working versions versions of
379 Git, tar, Python and ``chrpath``. And in the case of the
380 ``buildtools-extended`` tarball, additional working versions of tools
381 including ``gcc``, ``make`` and the other tools included in
382 ``packagegroup-core-buildessential``.
383
384Building Your Own ``buildtools`` Tarball
385----------------------------------------
386
387Building and running your own buildtools installer applies only when you
388have a build host that can already run BitBake. In this case, you use
389that machine to build the ``.sh`` file and then take steps to transfer
390and run it on a machine that does not meet the minimal Git, tar, and
391Python (or gcc) requirements.
392
393Here are the steps to take to build and run your own buildtools
394installer:
395
3961. On the machine that is able to run BitBake, be sure you have set up
397 your build environment with the setup script
398 (:ref:`structure-core-script`).
399
4002. Run the BitBake command to build the tarball:
401 ::
402
403 $ bitbake buildtools-tarball
404
405 or run the BitBake command to build the extended tarball:
406 ::
407
408 $ bitbake buildtools-extended-tarball
409
410 .. note::
411
412 The :term:`SDKMACHINE` variable in your ``local.conf`` file determines
413 whether you build tools for a 32-bit or 64-bit system.
414
415 Once the build completes, you can find the ``.sh`` file that installs
416 the tools in the ``tmp/deploy/sdk`` subdirectory of the
417 :term:`Build Directory`. The installer file has the string
418 "buildtools" (or "buildtools-extended") in the name.
419
4203. Transfer the ``.sh`` file from the build host to the machine that
421 does not meet the Git, tar, or Python (or gcc) requirements.
422
4234. On the machine that does not meet the requirements, run the ``.sh``
424 file to install the tools. Here is an example for the traditional
425 installer:
426 ::
427
428 $ sh ~/Downloads/x86_64-buildtools-nativesdk-standalone-&DISTRO;.sh
429
430 Here is an example for the extended installer:
431 ::
432
433 $ sh ~/Downloads/x86_64-buildtools-extended-nativesdk-standalone-&DISTRO;.sh
434
435 During execution, a prompt appears that allows you to choose the
436 installation directory. For example, you could choose the following:
437 ``/home/your_username/buildtools``
438
4395. Source the tools environment setup script by using a command like the
440 following:
441 ::
442
443 $ source /home/your_username/buildtools/environment-setup-x86_64-poky-linux
444
445 Of course, you need to supply your installation directory and be sure to
446 use the right file (i.e. i586 or x86_64).
447
448 After you have sourced the setup script, the tools are added to
449 ``PATH`` and any other environment variables required to run the
450 tools are initialized. The results are working versions versions of
451 Git, tar, Python and ``chrpath``. And in the case of the
452 ``buildtools-extended`` tarball, additional working versions of tools
453 including ``gcc``, ``make`` and the other tools included in
454 ``packagegroup-core-buildessential``.