blob: ac8b0032db012bbb211c1816f52dbd045d5ba1e0 [file] [log] [blame]
Andrew Geissler4873add2020-11-02 18:44:49 -06001<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='ref-manual-system-requirements'>
7<title>System Requirements</title>
8
9 <para>
10 Welcome to the Yocto Project Reference Manual!
11 This manual provides reference information for the current release
12 of the Yocto Project, and
13 is most effectively used after you have an understanding
14 of the basics of the Yocto Project.
15 The manual is neither meant to be read as a starting point to the
16 Yocto Project, nor read from start to finish.
17 Rather, use this manual to find variable definitions, class
18 descriptions, and so forth as needed during the course of using
19 the Yocto Project.
20 </para>
21
22 <para>
23 For introductory information on the Yocto Project, see the
24 <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink> and the
25 "<ulink url='&YOCTO_DOCS_OM_URL;#overview-development-environment'>Yocto Project Development Environment</ulink>"
26 chapter in the Yocto Project Overview and Concepts Manual.
27 </para>
28
29 <para>
30 If you want to use the Yocto Project to quickly build an image
31 without having to understand concepts, work through the
32 <ulink url='&YOCTO_DOCS_BRIEF_URL;'>Yocto Project Quick Build</ulink>
33 document.
34 You can find "how-to" information in the
35 <ulink url='&YOCTO_DOCS_DEV_URL;'>Yocto Project Development Tasks Manual</ulink>.
36 You can find Yocto Project overview and conceptual information in the
37 <ulink url='&YOCTO_DOCS_OM_URL;'>Yocto Project Overview and Concepts Manual</ulink>.
38 <note><title>Tip</title>
39 For more information about the Yocto Project Documentation set,
40 see the
41 "<link linkend='resources-links-and-related-documentation'>Links and Related Documentation</link>"
42 section.
43 </note>
44 </para>
45
46 <section id='detailed-supported-distros'>
47 <title>Supported Linux Distributions</title>
48
49 <para>
50 Currently, the Yocto Project is supported on the following
51 distributions:
52 <note><title>Notes</title>
53 <itemizedlist>
54 <listitem><para>
55 Yocto Project releases are tested against the stable
56 Linux distributions in the following list.
57 The Yocto Project should work on other distributions but
58 validation is not performed against them.
59 </para></listitem>
60 <listitem><para>
61 In particular, the Yocto Project does not support
62 and currently has no plans to support
63 rolling-releases or development distributions due to
64 their constantly changing nature.
65 We welcome patches and bug reports, but keep in mind
66 that our priority is on the supported platforms listed
67 below.
68 </para></listitem>
69 <listitem><para>
70 You may use Windows Subsystem For Linux v2 to set up a build
71 host using Windows 10, but validation is not performed
72 against build hosts using WSLv2.
73 <note>
74 The Yocto Project is not compatible with WSLv1, it is
75 compatible but not officially supported nor validated
76 with WSLv2, if you still decide to use WSL please upgrade
77 to WSLv2.
78 </note>
79 </para></listitem>
80 <listitem><para>
81 If you encounter problems, please go to
82 <ulink url='&YOCTO_BUGZILLA_URL;'>Yocto Project Bugzilla</ulink>
83 and submit a bug.
84 We are interested in hearing about your experience.
85 For information on how to submit a bug, see the
86 Yocto Project
87 <ulink url='&YOCTO_WIKI_URL;/wiki/Bugzilla_Configuration_and_Bug_Tracking'>Bugzilla wiki page</ulink>
88 and the
89 "<ulink url='&YOCTO_DOCS_DEV_URL;#submitting-a-defect-against-the-yocto-project'>Submitting a Defect Against the Yocto Project</ulink>"
90 section in the Yocto Project Development Tasks Manual.
91 </para></listitem>
92 </itemizedlist>
93 </note>
94 <itemizedlist>
95 <listitem><para>Ubuntu 16.04 (LTS)</para></listitem>
96 <listitem><para>Ubuntu 18.04 (LTS)</para></listitem>
97 <listitem><para>Ubuntu 20.04</para></listitem>
98 <listitem><para>Fedora 30</para></listitem>
99 <listitem><para>Fedora 31</para></listitem>
100 <listitem><para>Fedora 32</para></listitem>
101 <listitem><para>CentOS 7.x</para></listitem>
102 <listitem><para>CentOS 8.x</para></listitem>
103 <listitem><para>Debian GNU/Linux 8.x (Jessie)</para></listitem>
104 <listitem><para>Debian GNU/Linux 9.x (Stretch)</para></listitem>
105 <listitem><para>Debian GNU/Linux 10.x (Buster)</para></listitem>
106 <listitem><para>OpenSUSE Leap 15.1</para></listitem>
107 </itemizedlist>
108 </para>
109
110 <note>
111 While the Yocto Project Team attempts to ensure all Yocto Project
112 releases are one hundred percent compatible with each officially
113 supported Linux distribution, instances might exist where you
114 encounter a problem while using the Yocto Project on a specific
115 distribution.
116 </note>
117 </section>
118
119 <section id='required-packages-for-the-build-host'>
120 <title>Required Packages for the Build Host</title>
121
122 <para>
123 The list of packages you need on the host development system can
124 be large when covering all build scenarios using the Yocto Project.
125 This section describes required packages according to
126 Linux distribution and function.
127 </para>
128
129 <section id='ubuntu-packages'>
130 <title>Ubuntu and Debian</title>
131
132 <para>
133 The following list shows the required packages by function
134 given a supported Ubuntu or Debian Linux distribution:
135 <note><title>Notes</title>
136 <itemizedlist>
137 <listitem><para>
138 If your build system has the
139 <filename>oss4-dev</filename> package installed, you
140 might experience QEMU build failures due to the package
141 installing its own custom
142 <filename>/usr/include/linux/soundcard.h</filename> on
143 the Debian system.
144 If you run into this situation, either of the following
145 solutions exist:
146 <literallayout class='monospaced'>
147 $ sudo apt-get build-dep qemu
148 $ sudo apt-get remove oss4-dev
149 </literallayout>
150 </para></listitem>
151 <listitem><para>
152 For Debian-8, <filename>python3-git</filename> and <filename>pylint3</filename> are no longer available via <filename>apt-get</filename>.
153 <literallayout class='monospaced'>
154 $ sudo pip3 install GitPython pylint==1.9.5
155 </literallayout>
156 </para></listitem>
157 </itemizedlist>
158 </note>
159 <itemizedlist>
160 <listitem><para><emphasis>Essentials:</emphasis>
161 Packages needed to build an image on a headless
162 system:
163 <literallayout class='monospaced'>
164 $ sudo apt-get install &UBUNTU_HOST_PACKAGES_ESSENTIAL;
165 </literallayout></para></listitem>
166 <listitem><para><emphasis>Documentation:</emphasis>
167 Packages needed if you are going to build out the
168 Yocto Project documentation manuals:
169 <literallayout class='monospaced'>
170 $ sudo apt-get install make xsltproc docbook-utils fop dblatex xmlto
171 </literallayout></para></listitem>
172 </itemizedlist>
173 </para>
174 </section>
175
176 <section id='fedora-packages'>
177 <title>Fedora Packages</title>
178
179 <para>
180 The following list shows the required packages by function
181 given a supported Fedora Linux distribution:
182 <itemizedlist>
183 <listitem><para><emphasis>Essentials:</emphasis>
184 Packages needed to build an image for a headless
185 system:
186 <literallayout class='monospaced'>
187 $ sudo dnf install &FEDORA_HOST_PACKAGES_ESSENTIAL;
188 </literallayout></para></listitem>
189 <listitem><para><emphasis>Documentation:</emphasis>
190 Packages needed if you are going to build out the
191 Yocto Project documentation manuals:
192 <literallayout class='monospaced'>
193 $ sudo dnf install docbook-style-dsssl docbook-style-xsl \
194 docbook-dtds docbook-utils fop libxslt dblatex xmlto
195 </literallayout></para></listitem>
196 </itemizedlist>
197 </para>
198 </section>
199
200 <section id='opensuse-packages'>
201 <title>openSUSE Packages</title>
202
203 <para>
204 The following list shows the required packages by function
205 given a supported openSUSE Linux distribution:
206 <itemizedlist>
207 <listitem><para><emphasis>Essentials:</emphasis>
208 Packages needed to build an image for a headless
209 system:
210 <literallayout class='monospaced'>
211 $ sudo zypper install &OPENSUSE_HOST_PACKAGES_ESSENTIAL;
212 </literallayout></para></listitem>
213 <listitem><para><emphasis>Documentation:</emphasis>
214 Packages needed if you are going to build out the
215 Yocto Project documentation manuals:
216 <literallayout class='monospaced'>
217 $ sudo zypper install dblatex xmlto
218 </literallayout></para></listitem>
219 </itemizedlist>
220 </para>
221 </section>
222
223 <section id='centos-7-packages'>
224 <title>CentOS-7 Packages</title>
225
226 <para>
227 The following list shows the required packages by function
228 given a supported CentOS-7 Linux distribution:
229 <itemizedlist>
230 <listitem><para><emphasis>Essentials:</emphasis>
231 Packages needed to build an image for a headless
232 system:
233 <literallayout class='monospaced'>
234 $ sudo yum install &CENTOS7_HOST_PACKAGES_ESSENTIAL;
235 </literallayout>
236 <note><title>Notes</title>
237 <itemizedlist>
238 <listitem><para>
239 Extra Packages for Enterprise Linux
240 (i.e. <filename>epel-release</filename>)
241 is a collection of packages from Fedora
242 built on RHEL/CentOS for easy installation
243 of packages not included in enterprise
244 Linux by default.
245 You need to install these packages
246 separately.
247 </para></listitem>
248 <listitem><para>
249 The <filename>makecache</filename> command
250 consumes additional Metadata from
251 <filename>epel-release</filename>.
252 </para></listitem>
253 </itemizedlist>
254 </note>
255 </para></listitem>
256 <listitem><para><emphasis>Documentation:</emphasis>
257 Packages needed if you are going to build out the
258 Yocto Project documentation manuals:
259 <literallayout class='monospaced'>
260 $ sudo yum install docbook-style-dsssl docbook-style-xsl \
261 docbook-dtds docbook-utils fop libxslt dblatex xmlto
262 </literallayout>
263 </para></listitem>
264 </itemizedlist>
265 </para>
266 </section>
267
268 <section id='centos-8-packages'>
269 <title>CentOS-8 Packages</title>
270
271 <para>
272 The following list shows the required packages by function
273 given a supported CentOS-8 Linux distribution:
274 <itemizedlist>
275 <listitem><para><emphasis>Essentials:</emphasis>
276 Packages needed to build an image for a headless
277 system:
278 <literallayout class='monospaced'>
279 $ sudo dnf install &CENTOS8_HOST_PACKAGES_ESSENTIAL;
280 </literallayout>
281 <note><title>Notes</title>
282 <itemizedlist>
283 <listitem><para>
284 Extra Packages for Enterprise Linux
285 (i.e. <filename>epel-release</filename>)
286 is a collection of packages from Fedora
287 built on RHEL/CentOS for easy installation
288 of packages not included in enterprise
289 Linux by default.
290 You need to install these packages
291 separately.
292 </para></listitem>
293 <listitem><para>
294 The <filename>PowerTools</filename> repo
295 provides additional packages such as
296 <filename>rpcgen</filename> and
297 <filename>texinfo</filename>.
298 </para></listitem>
299 <listitem><para>
300 The <filename>makecache</filename> command
301 consumes additional Metadata from
302 <filename>epel-release</filename>.
303 </para></listitem>
304 </itemizedlist>
305 </note>
306 </para></listitem>
307 <listitem><para><emphasis>Documentation:</emphasis>
308 Packages needed if you are going to build out the
309 Yocto Project documentation manuals:
310 <literallayout class='monospaced'>
311 $ sudo dnf install docbook-style-dsssl docbook-style-xsl \
312 docbook-dtds docbook-utils fop libxslt dblatex xmlto
313 </literallayout>
314 </para></listitem>
315 </itemizedlist>
316 </para>
317 </section>
318 </section>
319
320 <section id='required-git-tar-python-and-gcc-versions'>
321 <title>Required Git, tar, Python and gcc Versions</title>
322
323 <para>
324 In order to use the build system, your host development system
325 must meet the following version requirements for Git, tar, and
326 Python:
327 <itemizedlist>
328 <listitem><para>Git 1.8.3.1 or greater</para></listitem>
329 <listitem><para>tar 1.28 or greater</para></listitem>
330 <listitem><para>Python 3.5.0 or greater</para></listitem>
331 </itemizedlist>
332 </para>
333
334 <para>
335 If your host development system does not meet all these requirements,
336 you can resolve this by installing a <filename>buildtools</filename>
337 tarball that contains these tools.
338 You can get the tarball one of two ways: download a pre-built
339 tarball or use BitBake to build the tarball.
340 </para>
341
342 <para>
343 In addition, your host development system must meet the following
344 version requirement for gcc:
345 <itemizedlist>
346 <listitem><para>gcc 5.0 or greater</para></listitem>
347 </itemizedlist>
348 </para>
349
350 <para>
351 If your host development system does not meet this requirement,
352 you can resolve this by installing a <filename>buildtools-extended</filename>
353 tarball that contains additional tools, the equivalent of <filename>buildtools-essential</filename>.
354 </para>
355 <section id='installing-a-pre-built-buildtools-tarball-with-install-buildtools-script'>
356 <title>Installing a Pre-Built <filename>buildtools</filename> Tarball with <filename>install-buildtools</filename> script</title>
357
358 <para>
359 The <filename>install-buildtools</filename> script is the easiest
360 of the three methods by which you can get these tools. It downloads
361 a pre-built buildtools installer and automatically installs the tools
362 for you:
363 <orderedlist>
364 <listitem><para>
365 Execute the <filename>install-buildtools</filename> script.
366 Here is an example:
367 <literallayout class='monospaced'>
368 $ cd poky
369 $ scripts/install-buildtools --without-extended-buildtools \
370 --base-url &YOCTO_DL_URL;/releases/yocto \
371 --release yocto-&DISTRO; \
372 --installer-version &DISTRO;
373 </literallayout>
374 <para>
375 During execution, the buildtools tarball will be downloaded,
376 the checksum of the download will be verified, the installer
377 will be run for you, and some basic checks will be run to
378 to make sure the installation is functional.
379 </para>
380 <para>
381 To avoid the need of <filename>sudo</filename> privileges,
382 the <filename>install-buildtools</filename> script will
383 by default tell the installer to install in:
384 <literallayout class='monospaced'>
385 <replaceable>/path/to/</replaceable>poky/buildtools
386 </literallayout>
387 </para>
388 <para>
389 If your host development system needs the additional tools
390 provided in the <filename>buildtools-extended</filename>
391 tarball, you can instead execute the
392 <filename>install-buildtools</filename> script with the
393 default parameters:
394 <literallayout class='monospaced'>
395 $ cd poky
396 $ scripts/install-buildtools
397 </literallayout>
398 </para>
399 </para></listitem>
400 <listitem><para>
401 Source the tools environment setup script by using a
402 command like the following:
403 <literallayout class='monospaced'>
404 $ source <replaceable>/path/to/</replaceable>poky/buildtools/environment-setup-x86_64-pokysdk-linux
405 </literallayout>
406 Of course, you need to supply your installation directory and be
407 sure to use the right file (i.e. i586 or x86_64).
408 </para>
409 <para>
410 After you have sourced the setup script,
411 the tools are added to <filename>PATH</filename>
412 and any other environment variables required to run the
413 tools are initialized.
414 The results are working versions versions of Git, tar,
415 Python and <filename>chrpath</filename>. And in the case of
416 the <filename>buildtools-extended</filename> tarball, additional
417 working versions of tools including <filename>gcc</filename>,
418 <filename>make</filename> and the other tools included in
419 <filename>packagegroup-core-buildessential</filename>.
420 </para></listitem>
421 </orderedlist>
422 </para>
423 </section>
424
425 <section id='downloading-a-pre-built-buildtools-tarball'>
426 <title>Downloading a Pre-Built <filename>buildtools</filename> Tarball</title>
427
428 <para>
429 Downloading and running a pre-built buildtools installer is
430 the easiest of the two methods by which you can get these tools:
431 <orderedlist>
432 <listitem><para>
433 Locate and download the <filename>*.sh</filename> at
434 <ulink url='&YOCTO_RELEASE_DL_URL;/buildtools/'></ulink>.
435 </para></listitem>
436 <listitem><para>
437 Execute the installation script.
438 Here is an example for the traditional installer:
439 <literallayout class='monospaced'>
440 $ sh ~/Downloads/x86_64-buildtools-nativesdk-standalone-&DISTRO;.sh
441 </literallayout>
442 Here is an example for the extended installer:
443 <literallayout class='monospaced'>
444 $ sh ~/Downloads/x86_64-buildtools-extended-nativesdk-standalone-&DISTRO;.sh
445 </literallayout>
446 During execution, a prompt appears that allows you to
447 choose the installation directory.
448 For example, you could choose the following:
449 <literallayout class='monospaced'>
450 /home/<replaceable>your-username</replaceable>/buildtools
451 </literallayout>
452 </para></listitem>
453 <listitem><para>
454 Source the tools environment setup script by using a
455 command like the following:
456 <literallayout class='monospaced'>
457 $ source /home/<replaceable>your_username</replaceable>/buildtools/environment-setup-i586-poky-linux
458 </literallayout>
459 Of course, you need to supply your installation directory and be
460 sure to use the right file (i.e. i585 or x86-64).
461 </para>
462 <para>
463 After you have sourced the setup script,
464 the tools are added to <filename>PATH</filename>
465 and any other environment variables required to run the
466 tools are initialized.
467 The results are working versions versions of Git, tar,
468 Python and <filename>chrpath</filename>. And in the case of
469 the <filename>buildtools-extended</filename> tarball, additional
470 working versions of tools including <filename>gcc</filename>,
471 <filename>make</filename> and the other tools included in
472 <filename>packagegroup-core-buildessential</filename>.
473 </para></listitem>
474 </orderedlist>
475 </para>
476 </section>
477
478 <section id='building-your-own-buildtools-tarball'>
479 <title>Building Your Own <filename>buildtools</filename> Tarball</title>
480
481 <para>
482 Building and running your own buildtools installer applies
483 only when you have a build host that can already run BitBake.
484 In this case, you use that machine to build the
485 <filename>.sh</filename> file and then
486 take steps to transfer and run it on a
487 machine that does not meet the minimal Git, tar, and Python
488 (or gcc) requirements.
489 </para>
490
491 <para>
492 Here are the steps to take to build and run your own
493 buildtools installer:
494 <orderedlist>
495 <listitem><para>
496 On the machine that is able to run BitBake,
497 be sure you have set up your build environment with
498 the setup script
499 (<link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>).
500 </para></listitem>
501 <listitem><para>
502 Run the BitBake command to build the tarball:
503 <literallayout class='monospaced'>
504 $ bitbake buildtools-tarball
505 </literallayout>
506 or run the BitBake command to build the extended tarball:
507 <literallayout class='monospaced'>
508 $ bitbake buildtools-extended-tarball
509 </literallayout>
510 <note>
511 The
512 <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>
513 variable in your <filename>local.conf</filename> file
514 determines whether you build tools for a 32-bit
515 or 64-bit system.
516 </note>
517 Once the build completes, you can find the
518 <filename>.sh</filename> file that installs
519 the tools in the <filename>tmp/deploy/sdk</filename>
520 subdirectory of the
521 <link linkend='build-directory'>Build Directory</link>.
522 The installer file has the string "buildtools"
523 (or "buildtools-extended") in the name.
524 </para></listitem>
525 <listitem><para>
526 Transfer the <filename>.sh</filename> file from the
527 build host to the machine that does not meet the
528 Git, tar, or Python (or gcc) requirements.
529 </para></listitem>
530 <listitem><para>
531 On the machine that does not meet the requirements,
532 run the <filename>.sh</filename> file
533 to install the tools.
534 Here is an example for the traditional installer:
535 <literallayout class='monospaced'>
536 $ sh ~/Downloads/x86_64-buildtools-nativesdk-standalone-&DISTRO;.sh
537 </literallayout>
538 Here is an example for the extended installer:
539 <literallayout class='monospaced'>
540 $ sh ~/Downloads/x86_64-buildtools-extended-nativesdk-standalone-&DISTRO;.sh
541 </literallayout>
542 During execution, a prompt appears that allows you to
543 choose the installation directory.
544 For example, you could choose the following:
545 <literallayout class='monospaced'>
546 /home/<replaceable>your_username</replaceable>/buildtools
547 </literallayout>
548 </para></listitem>
549 <listitem><para>
550 Source the tools environment setup script by using a
551 command like the following:
552 <literallayout class='monospaced'>
553 $ source /home/<replaceable>your_username</replaceable>/buildtools/environment-setup-x86_64-poky-linux
554 </literallayout>
555 Of course, you need to supply your installation directory and be
556 sure to use the right file (i.e. i586 or x86_64).
557 </para>
558 <para>
559 After you have sourced the setup script,
560 the tools are added to <filename>PATH</filename>
561 and any other environment variables required to run the
562 tools are initialized.
563 The results are working versions versions of Git, tar,
564 Python and <filename>chrpath</filename>. And in the case of
565 the <filename>buildtools-extended</filename> tarball, additional
566 working versions of tools including <filename>gcc</filename>,
567 <filename>make</filename> and the other tools included in
568 <filename>packagegroup-core-buildessential</filename>.
569 </para></listitem>
570 </orderedlist>
571 </para>
572 </section>
573 </section>
574</chapter>
575<!--
576vim: expandtab tw=80 ts=4
577-->