Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 1 | <!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; ] > |
Andrew Geissler | 475cb72 | 2020-07-10 16:00:51 -0500 | [diff] [blame] | 4 | <!--SPDX-License-Identifier: CC-BY-2.0-UK--> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 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 |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 12 | of the Yocto Project, and |
| 13 | is most effectively used after you have an understanding |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 14 | of the basics of the Yocto Project. |
| 15 | The manual is neither meant to be read as a starting point to the |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 16 | Yocto Project, nor read from start to finish. |
| 17 | Rather, use this manual to find variable definitions, class |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 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> |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 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> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 79 | </para></listitem> |
| 80 | <listitem><para> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 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> |
Brad Bishop | b1114e5 | 2019-02-13 07:56:10 -0500 | [diff] [blame] | 95 | <listitem><para>Ubuntu 16.04 (LTS)</para></listitem> |
Brad Bishop | f3f93bb | 2019-10-16 14:33:32 -0400 | [diff] [blame] | 96 | <listitem><para>Ubuntu 18.04 (LTS)</para></listitem> |
Andrew Geissler | b7d2861 | 2020-07-24 16:15:54 -0500 | [diff] [blame] | 97 | <listitem><para>Ubuntu 20.04</para></listitem> |
Brad Bishop | f3f93bb | 2019-10-16 14:33:32 -0400 | [diff] [blame] | 98 | <listitem><para>Fedora 30</para></listitem> |
Andrew Geissler | b7d2861 | 2020-07-24 16:15:54 -0500 | [diff] [blame] | 99 | <listitem><para>Fedora 31</para></listitem> |
| 100 | <listitem><para>Fedora 32</para></listitem> |
Brad Bishop | b1114e5 | 2019-02-13 07:56:10 -0500 | [diff] [blame] | 101 | <listitem><para>CentOS 7.x</para></listitem> |
Andrew Geissler | b7d2861 | 2020-07-24 16:15:54 -0500 | [diff] [blame] | 102 | <listitem><para>CentOS 8.x</para></listitem> |
Brad Bishop | b1114e5 | 2019-02-13 07:56:10 -0500 | [diff] [blame] | 103 | <listitem><para>Debian GNU/Linux 8.x (Jessie)</para></listitem> |
| 104 | <listitem><para>Debian GNU/Linux 9.x (Stretch)</para></listitem> |
Brad Bishop | 79641f2 | 2019-09-10 07:20:22 -0400 | [diff] [blame] | 105 | <listitem><para>Debian GNU/Linux 10.x (Buster)</para></listitem> |
Brad Bishop | f3f93bb | 2019-10-16 14:33:32 -0400 | [diff] [blame] | 106 | <listitem><para>OpenSUSE Leap 15.1</para></listitem> |
Brad Bishop | b1114e5 | 2019-02-13 07:56:10 -0500 | [diff] [blame] | 107 | </itemizedlist> |
| 108 | </para> |
Brad Bishop | b1114e5 | 2019-02-13 07:56:10 -0500 | [diff] [blame] | 109 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 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 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 119 | <section id='required-packages-for-the-build-host'> |
| 120 | <title>Required Packages for the Build Host</title> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 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. |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 125 | This section describes required packages according to |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 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: |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 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'> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 147 | $ sudo apt-get build-dep qemu |
| 148 | $ sudo apt-get remove oss4-dev |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 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> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 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> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 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> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 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> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 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'> |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 193 | $ sudo dnf install docbook-style-dsssl docbook-style-xsl \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 194 | docbook-dtds docbook-utils fop libxslt dblatex xmlto |
| 195 | </literallayout></para></listitem> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 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> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 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'> |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 217 | $ sudo zypper install dblatex xmlto |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 218 | </literallayout></para></listitem> |
| 219 | </itemizedlist> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 220 | </para> |
| 221 | </section> |
| 222 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 223 | <section id='centos-7-packages'> |
| 224 | <title>CentOS-7 Packages</title> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 225 | |
| 226 | <para> |
| 227 | The following list shows the required packages by function |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 228 | given a supported CentOS-7 Linux distribution: |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 229 | <itemizedlist> |
| 230 | <listitem><para><emphasis>Essentials:</emphasis> |
| 231 | Packages needed to build an image for a headless |
| 232 | system: |
| 233 | <literallayout class='monospaced'> |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 234 | $ sudo yum install &CENTOS7_HOST_PACKAGES_ESSENTIAL; |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 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. |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 247 | </para></listitem> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 248 | <listitem><para> |
| 249 | The <filename>makecache</filename> command |
| 250 | consumes additional Metadata from |
| 251 | <filename>epel-release</filename>. |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 252 | </para></listitem> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 253 | </itemizedlist> |
| 254 | </note> |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 255 | </para></listitem> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 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'> |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 260 | $ sudo yum install docbook-style-dsssl docbook-style-xsl \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 261 | docbook-dtds docbook-utils fop libxslt dblatex xmlto |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 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> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 315 | </itemizedlist> |
| 316 | </para> |
| 317 | </section> |
| 318 | </section> |
| 319 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 320 | <section id='required-git-tar-python-and-gcc-versions'> |
| 321 | <title>Required Git, tar, Python and gcc Versions</title> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 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> |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 329 | <listitem><para>tar 1.28 or greater</para></listitem> |
| 330 | <listitem><para>Python 3.5.0 or greater</para></listitem> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 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 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 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 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 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 |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 434 | <ulink url='&YOCTO_RELEASE_DL_URL;/buildtools/'></ulink>. |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 435 | </para></listitem> |
| 436 | <listitem><para> |
| 437 | Execute the installation script. |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 438 | Here is an example for the traditional installer: |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 439 | <literallayout class='monospaced'> |
| 440 | $ sh ~/Downloads/x86_64-buildtools-nativesdk-standalone-&DISTRO;.sh |
| 441 | </literallayout> |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 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> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 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, |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 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>. |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 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 |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 488 | (or gcc) requirements. |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 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> |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 506 | or run the BitBake command to build the extended tarball: |
| 507 | <literallayout class='monospaced'> |
Andrew Geissler | 4b740dc | 2020-05-05 08:54:39 -0500 | [diff] [blame] | 508 | $ bitbake buildtools-extended-tarball |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 509 | </literallayout> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 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" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 523 | (or "buildtools-extended") in the name. |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 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 |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 528 | Git, tar, or Python (or gcc) requirements. |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 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. |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 534 | Here is an example for the traditional installer: |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 535 | <literallayout class='monospaced'> |
| 536 | $ sh ~/Downloads/x86_64-buildtools-nativesdk-standalone-&DISTRO;.sh |
| 537 | </literallayout> |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 538 | Here is an example for the extended installer: |
| 539 | <literallayout class='monospaced'> |
Andrew Geissler | 4b740dc | 2020-05-05 08:54:39 -0500 | [diff] [blame] | 540 | $ sh ~/Downloads/x86_64-buildtools-extended-nativesdk-standalone-&DISTRO;.sh |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 541 | </literallayout> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 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'> |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 553 | $ source /home/<replaceable>your_username</replaceable>/buildtools/environment-setup-x86_64-poky-linux |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 554 | </literallayout> |
| 555 | Of course, you need to supply your installation directory and be |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 556 | sure to use the right file (i.e. i586 or x86_64). |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 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, |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 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>. |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 569 | </para></listitem> |
| 570 | </orderedlist> |
| 571 | </para> |
| 572 | </section> |
| 573 | </section> |
| 574 | </chapter> |
| 575 | <!-- |
| 576 | vim: expandtab tw=80 ts=4 |
| 577 | --> |