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> |
| 97 | <listitem><para>Ubuntu 19.04</para></listitem> |
Brad Bishop | b1114e5 | 2019-02-13 07:56:10 -0500 | [diff] [blame] | 98 | <listitem><para>Fedora 28</para></listitem> |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 99 | <listitem><para>Fedora 29</para></listitem> |
Brad Bishop | f3f93bb | 2019-10-16 14:33:32 -0400 | [diff] [blame] | 100 | <listitem><para>Fedora 30</para></listitem> |
Brad Bishop | b1114e5 | 2019-02-13 07:56:10 -0500 | [diff] [blame] | 101 | <listitem><para>CentOS 7.x</para></listitem> |
| 102 | <listitem><para>Debian GNU/Linux 8.x (Jessie)</para></listitem> |
| 103 | <listitem><para>Debian GNU/Linux 9.x (Stretch)</para></listitem> |
Brad Bishop | 79641f2 | 2019-09-10 07:20:22 -0400 | [diff] [blame] | 104 | <listitem><para>Debian GNU/Linux 10.x (Buster)</para></listitem> |
Brad Bishop | f3f93bb | 2019-10-16 14:33:32 -0400 | [diff] [blame] | 105 | <listitem><para>OpenSUSE Leap 15.1</para></listitem> |
Brad Bishop | b1114e5 | 2019-02-13 07:56:10 -0500 | [diff] [blame] | 106 | </itemizedlist> |
| 107 | </para> |
Brad Bishop | b1114e5 | 2019-02-13 07:56:10 -0500 | [diff] [blame] | 108 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 109 | <note> |
| 110 | While the Yocto Project Team attempts to ensure all Yocto Project |
| 111 | releases are one hundred percent compatible with each officially |
| 112 | supported Linux distribution, instances might exist where you |
| 113 | encounter a problem while using the Yocto Project on a specific |
| 114 | distribution. |
| 115 | </note> |
| 116 | </section> |
| 117 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 118 | <section id='required-packages-for-the-build-host'> |
| 119 | <title>Required Packages for the Build Host</title> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 120 | |
| 121 | <para> |
| 122 | The list of packages you need on the host development system can |
| 123 | be large when covering all build scenarios using the Yocto Project. |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 124 | This section describes required packages according to |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 125 | Linux distribution and function. |
| 126 | </para> |
| 127 | |
| 128 | <section id='ubuntu-packages'> |
| 129 | <title>Ubuntu and Debian</title> |
| 130 | |
| 131 | <para> |
| 132 | The following list shows the required packages by function |
| 133 | given a supported Ubuntu or Debian Linux distribution: |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 134 | <note><title>Notes</title> |
| 135 | <itemizedlist> |
| 136 | <listitem><para> |
| 137 | If your build system has the |
| 138 | <filename>oss4-dev</filename> package installed, you |
| 139 | might experience QEMU build failures due to the package |
| 140 | installing its own custom |
| 141 | <filename>/usr/include/linux/soundcard.h</filename> on |
| 142 | the Debian system. |
| 143 | If you run into this situation, either of the following |
| 144 | solutions exist: |
| 145 | <literallayout class='monospaced'> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 146 | $ sudo apt-get build-dep qemu |
| 147 | $ sudo apt-get remove oss4-dev |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 148 | </literallayout> |
| 149 | </para></listitem> |
| 150 | <listitem><para> |
| 151 | For Debian-8, <filename>python3-git</filename> and <filename>pylint3</filename> are no longer available via <filename>apt-get</filename>. |
| 152 | <literallayout class='monospaced'> |
| 153 | $ sudo pip3 install GitPython pylint==1.9.5 |
| 154 | </literallayout> |
| 155 | </para></listitem> |
| 156 | </itemizedlist> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 157 | </note> |
| 158 | <itemizedlist> |
| 159 | <listitem><para><emphasis>Essentials:</emphasis> |
| 160 | Packages needed to build an image on a headless |
| 161 | system: |
| 162 | <literallayout class='monospaced'> |
| 163 | $ sudo apt-get install &UBUNTU_HOST_PACKAGES_ESSENTIAL; |
| 164 | </literallayout></para></listitem> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 165 | <listitem><para><emphasis>Documentation:</emphasis> |
| 166 | Packages needed if you are going to build out the |
| 167 | Yocto Project documentation manuals: |
| 168 | <literallayout class='monospaced'> |
| 169 | $ sudo apt-get install make xsltproc docbook-utils fop dblatex xmlto |
| 170 | </literallayout></para></listitem> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 171 | </itemizedlist> |
| 172 | </para> |
| 173 | </section> |
| 174 | |
| 175 | <section id='fedora-packages'> |
| 176 | <title>Fedora Packages</title> |
| 177 | |
| 178 | <para> |
| 179 | The following list shows the required packages by function |
| 180 | given a supported Fedora Linux distribution: |
| 181 | <itemizedlist> |
| 182 | <listitem><para><emphasis>Essentials:</emphasis> |
| 183 | Packages needed to build an image for a headless |
| 184 | system: |
| 185 | <literallayout class='monospaced'> |
| 186 | $ sudo dnf install &FEDORA_HOST_PACKAGES_ESSENTIAL; |
| 187 | </literallayout></para></listitem> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 188 | <listitem><para><emphasis>Documentation:</emphasis> |
| 189 | Packages needed if you are going to build out the |
| 190 | Yocto Project documentation manuals: |
| 191 | <literallayout class='monospaced'> |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 192 | $ sudo dnf install docbook-style-dsssl docbook-style-xsl \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 193 | docbook-dtds docbook-utils fop libxslt dblatex xmlto |
| 194 | </literallayout></para></listitem> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 195 | </itemizedlist> |
| 196 | </para> |
| 197 | </section> |
| 198 | |
| 199 | <section id='opensuse-packages'> |
| 200 | <title>openSUSE Packages</title> |
| 201 | |
| 202 | <para> |
| 203 | The following list shows the required packages by function |
| 204 | given a supported openSUSE Linux distribution: |
| 205 | <itemizedlist> |
| 206 | <listitem><para><emphasis>Essentials:</emphasis> |
| 207 | Packages needed to build an image for a headless |
| 208 | system: |
| 209 | <literallayout class='monospaced'> |
| 210 | $ sudo zypper install &OPENSUSE_HOST_PACKAGES_ESSENTIAL; |
| 211 | </literallayout></para></listitem> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 212 | <listitem><para><emphasis>Documentation:</emphasis> |
| 213 | Packages needed if you are going to build out the |
| 214 | Yocto Project documentation manuals: |
| 215 | <literallayout class='monospaced'> |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 216 | $ sudo zypper install dblatex xmlto |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 217 | </literallayout></para></listitem> |
| 218 | </itemizedlist> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 219 | </para> |
| 220 | </section> |
| 221 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 222 | <section id='centos-7-packages'> |
| 223 | <title>CentOS-7 Packages</title> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 224 | |
| 225 | <para> |
| 226 | The following list shows the required packages by function |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 227 | given a supported CentOS-7 Linux distribution: |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 228 | <itemizedlist> |
| 229 | <listitem><para><emphasis>Essentials:</emphasis> |
| 230 | Packages needed to build an image for a headless |
| 231 | system: |
| 232 | <literallayout class='monospaced'> |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 233 | $ sudo yum install &CENTOS7_HOST_PACKAGES_ESSENTIAL; |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 234 | </literallayout> |
| 235 | <note><title>Notes</title> |
| 236 | <itemizedlist> |
| 237 | <listitem><para> |
| 238 | Extra Packages for Enterprise Linux |
| 239 | (i.e. <filename>epel-release</filename>) |
| 240 | is a collection of packages from Fedora |
| 241 | built on RHEL/CentOS for easy installation |
| 242 | of packages not included in enterprise |
| 243 | Linux by default. |
| 244 | You need to install these packages |
| 245 | separately. |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 246 | </para></listitem> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 247 | <listitem><para> |
| 248 | The <filename>makecache</filename> command |
| 249 | consumes additional Metadata from |
| 250 | <filename>epel-release</filename>. |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 251 | </para></listitem> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 252 | </itemizedlist> |
| 253 | </note> |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 254 | </para></listitem> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 255 | <listitem><para><emphasis>Documentation:</emphasis> |
| 256 | Packages needed if you are going to build out the |
| 257 | Yocto Project documentation manuals: |
| 258 | <literallayout class='monospaced'> |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 259 | $ sudo yum install docbook-style-dsssl docbook-style-xsl \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 260 | docbook-dtds docbook-utils fop libxslt dblatex xmlto |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 261 | </literallayout> |
| 262 | </para></listitem> |
| 263 | </itemizedlist> |
| 264 | </para> |
| 265 | </section> |
| 266 | |
| 267 | <section id='centos-8-packages'> |
| 268 | <title>CentOS-8 Packages</title> |
| 269 | |
| 270 | <para> |
| 271 | The following list shows the required packages by function |
| 272 | given a supported CentOS-8 Linux distribution: |
| 273 | <itemizedlist> |
| 274 | <listitem><para><emphasis>Essentials:</emphasis> |
| 275 | Packages needed to build an image for a headless |
| 276 | system: |
| 277 | <literallayout class='monospaced'> |
| 278 | $ sudo dnf install &CENTOS8_HOST_PACKAGES_ESSENTIAL; |
| 279 | </literallayout> |
| 280 | <note><title>Notes</title> |
| 281 | <itemizedlist> |
| 282 | <listitem><para> |
| 283 | Extra Packages for Enterprise Linux |
| 284 | (i.e. <filename>epel-release</filename>) |
| 285 | is a collection of packages from Fedora |
| 286 | built on RHEL/CentOS for easy installation |
| 287 | of packages not included in enterprise |
| 288 | Linux by default. |
| 289 | You need to install these packages |
| 290 | separately. |
| 291 | </para></listitem> |
| 292 | <listitem><para> |
| 293 | The <filename>PowerTools</filename> repo |
| 294 | provides additional packages such as |
| 295 | <filename>rpcgen</filename> and |
| 296 | <filename>texinfo</filename>. |
| 297 | </para></listitem> |
| 298 | <listitem><para> |
| 299 | The <filename>makecache</filename> command |
| 300 | consumes additional Metadata from |
| 301 | <filename>epel-release</filename>. |
| 302 | </para></listitem> |
| 303 | </itemizedlist> |
| 304 | </note> |
| 305 | </para></listitem> |
| 306 | <listitem><para><emphasis>Documentation:</emphasis> |
| 307 | Packages needed if you are going to build out the |
| 308 | Yocto Project documentation manuals: |
| 309 | <literallayout class='monospaced'> |
| 310 | $ sudo dnf install docbook-style-dsssl docbook-style-xsl \ |
| 311 | docbook-dtds docbook-utils fop libxslt dblatex xmlto |
| 312 | </literallayout> |
| 313 | </para></listitem> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 314 | </itemizedlist> |
| 315 | </para> |
| 316 | </section> |
| 317 | </section> |
| 318 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 319 | <section id='required-git-tar-python-and-gcc-versions'> |
| 320 | <title>Required Git, tar, Python and gcc Versions</title> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 321 | |
| 322 | <para> |
| 323 | In order to use the build system, your host development system |
| 324 | must meet the following version requirements for Git, tar, and |
| 325 | Python: |
| 326 | <itemizedlist> |
| 327 | <listitem><para>Git 1.8.3.1 or greater</para></listitem> |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 328 | <listitem><para>tar 1.28 or greater</para></listitem> |
| 329 | <listitem><para>Python 3.5.0 or greater</para></listitem> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 330 | </itemizedlist> |
| 331 | </para> |
| 332 | |
| 333 | <para> |
| 334 | If your host development system does not meet all these requirements, |
| 335 | you can resolve this by installing a <filename>buildtools</filename> |
| 336 | tarball that contains these tools. |
| 337 | You can get the tarball one of two ways: download a pre-built |
| 338 | tarball or use BitBake to build the tarball. |
| 339 | </para> |
| 340 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 341 | <para> |
| 342 | In addition, your host development system must meet the following |
| 343 | version requirement for gcc: |
| 344 | <itemizedlist> |
| 345 | <listitem><para>gcc 5.0 or greater</para></listitem> |
| 346 | </itemizedlist> |
| 347 | </para> |
| 348 | |
| 349 | <para> |
| 350 | If your host development system does not meet this requirement, |
| 351 | you can resolve this by installing a <filename>buildtools-extended</filename> |
| 352 | tarball that contains additional tools, the equivalent of <filename>buildtools-essential</filename>. |
| 353 | </para> |
| 354 | <section id='installing-a-pre-built-buildtools-tarball-with-install-buildtools-script'> |
| 355 | <title>Installing a Pre-Built <filename>buildtools</filename> Tarball with <filename>install-buildtools</filename> script</title> |
| 356 | |
| 357 | <para> |
| 358 | The <filename>install-buildtools</filename> script is the easiest |
| 359 | of the three methods by which you can get these tools. It downloads |
| 360 | a pre-built buildtools installer and automatically installs the tools |
| 361 | for you: |
| 362 | <orderedlist> |
| 363 | <listitem><para> |
| 364 | Execute the <filename>install-buildtools</filename> script. |
| 365 | Here is an example: |
| 366 | <literallayout class='monospaced'> |
| 367 | $ cd poky |
| 368 | $ scripts/install-buildtools --without-extended-buildtools \ |
| 369 | --base-url &YOCTO_DL_URL;/releases/yocto \ |
| 370 | --release yocto-&DISTRO; \ |
| 371 | --installer-version &DISTRO; |
| 372 | </literallayout> |
| 373 | <para> |
| 374 | During execution, the buildtools tarball will be downloaded, |
| 375 | the checksum of the download will be verified, the installer |
| 376 | will be run for you, and some basic checks will be run to |
| 377 | to make sure the installation is functional. |
| 378 | </para> |
| 379 | <para> |
| 380 | To avoid the need of <filename>sudo</filename> privileges, |
| 381 | the <filename>install-buildtools</filename> script will |
| 382 | by default tell the installer to install in: |
| 383 | <literallayout class='monospaced'> |
| 384 | <replaceable>/path/to/</replaceable>poky/buildtools |
| 385 | </literallayout> |
| 386 | </para> |
| 387 | <para> |
| 388 | If your host development system needs the additional tools |
| 389 | provided in the <filename>buildtools-extended</filename> |
| 390 | tarball, you can instead execute the |
| 391 | <filename>install-buildtools</filename> script with the |
| 392 | default parameters: |
| 393 | <literallayout class='monospaced'> |
| 394 | $ cd poky |
| 395 | $ scripts/install-buildtools |
| 396 | </literallayout> |
| 397 | </para> |
| 398 | </para></listitem> |
| 399 | <listitem><para> |
| 400 | Source the tools environment setup script by using a |
| 401 | command like the following: |
| 402 | <literallayout class='monospaced'> |
| 403 | $ source <replaceable>/path/to/</replaceable>poky/buildtools/environment-setup-x86_64-pokysdk-linux |
| 404 | </literallayout> |
| 405 | Of course, you need to supply your installation directory and be |
| 406 | sure to use the right file (i.e. i586 or x86_64). |
| 407 | </para> |
| 408 | <para> |
| 409 | After you have sourced the setup script, |
| 410 | the tools are added to <filename>PATH</filename> |
| 411 | and any other environment variables required to run the |
| 412 | tools are initialized. |
| 413 | The results are working versions versions of Git, tar, |
| 414 | Python and <filename>chrpath</filename>. And in the case of |
| 415 | the <filename>buildtools-extended</filename> tarball, additional |
| 416 | working versions of tools including <filename>gcc</filename>, |
| 417 | <filename>make</filename> and the other tools included in |
| 418 | <filename>packagegroup-core-buildessential</filename>. |
| 419 | </para></listitem> |
| 420 | </orderedlist> |
| 421 | </para> |
| 422 | </section> |
| 423 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 424 | <section id='downloading-a-pre-built-buildtools-tarball'> |
| 425 | <title>Downloading a Pre-Built <filename>buildtools</filename> Tarball</title> |
| 426 | |
| 427 | <para> |
| 428 | Downloading and running a pre-built buildtools installer is |
| 429 | the easiest of the two methods by which you can get these tools: |
| 430 | <orderedlist> |
| 431 | <listitem><para> |
| 432 | Locate and download the <filename>*.sh</filename> at |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 433 | <ulink url='&YOCTO_RELEASE_DL_URL;/buildtools/'></ulink>. |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 434 | </para></listitem> |
| 435 | <listitem><para> |
| 436 | Execute the installation script. |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 437 | Here is an example for the traditional installer: |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 438 | <literallayout class='monospaced'> |
| 439 | $ sh ~/Downloads/x86_64-buildtools-nativesdk-standalone-&DISTRO;.sh |
| 440 | </literallayout> |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 441 | Here is an example for the extended installer: |
| 442 | <literallayout class='monospaced'> |
| 443 | $ sh ~/Downloads/x86_64-buildtools-extended-nativesdk-standalone-&DISTRO;.sh |
| 444 | </literallayout> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 445 | During execution, a prompt appears that allows you to |
| 446 | choose the installation directory. |
| 447 | For example, you could choose the following: |
| 448 | <literallayout class='monospaced'> |
| 449 | /home/<replaceable>your-username</replaceable>/buildtools |
| 450 | </literallayout> |
| 451 | </para></listitem> |
| 452 | <listitem><para> |
| 453 | Source the tools environment setup script by using a |
| 454 | command like the following: |
| 455 | <literallayout class='monospaced'> |
| 456 | $ source /home/<replaceable>your_username</replaceable>/buildtools/environment-setup-i586-poky-linux |
| 457 | </literallayout> |
| 458 | Of course, you need to supply your installation directory and be |
| 459 | sure to use the right file (i.e. i585 or x86-64). |
| 460 | </para> |
| 461 | <para> |
| 462 | After you have sourced the setup script, |
| 463 | the tools are added to <filename>PATH</filename> |
| 464 | and any other environment variables required to run the |
| 465 | tools are initialized. |
| 466 | The results are working versions versions of Git, tar, |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 467 | Python and <filename>chrpath</filename>. And in the case of |
| 468 | the <filename>buildtools-extended</filename> tarball, additional |
| 469 | working versions of tools including <filename>gcc</filename>, |
| 470 | <filename>make</filename> and the other tools included in |
| 471 | <filename>packagegroup-core-buildessential</filename>. |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 472 | </para></listitem> |
| 473 | </orderedlist> |
| 474 | </para> |
| 475 | </section> |
| 476 | |
| 477 | <section id='building-your-own-buildtools-tarball'> |
| 478 | <title>Building Your Own <filename>buildtools</filename> Tarball</title> |
| 479 | |
| 480 | <para> |
| 481 | Building and running your own buildtools installer applies |
| 482 | only when you have a build host that can already run BitBake. |
| 483 | In this case, you use that machine to build the |
| 484 | <filename>.sh</filename> file and then |
| 485 | take steps to transfer and run it on a |
| 486 | machine that does not meet the minimal Git, tar, and Python |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 487 | (or gcc) requirements. |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 488 | </para> |
| 489 | |
| 490 | <para> |
| 491 | Here are the steps to take to build and run your own |
| 492 | buildtools installer: |
| 493 | <orderedlist> |
| 494 | <listitem><para> |
| 495 | On the machine that is able to run BitBake, |
| 496 | be sure you have set up your build environment with |
| 497 | the setup script |
| 498 | (<link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>). |
| 499 | </para></listitem> |
| 500 | <listitem><para> |
| 501 | Run the BitBake command to build the tarball: |
| 502 | <literallayout class='monospaced'> |
| 503 | $ bitbake buildtools-tarball |
| 504 | </literallayout> |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 505 | or run the BitBake command to build the extended tarball: |
| 506 | <literallayout class='monospaced'> |
Andrew Geissler | 4b740dc | 2020-05-05 08:54:39 -0500 | [diff] [blame] | 507 | $ bitbake buildtools-extended-tarball |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 508 | </literallayout> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 509 | <note> |
| 510 | The |
| 511 | <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link> |
| 512 | variable in your <filename>local.conf</filename> file |
| 513 | determines whether you build tools for a 32-bit |
| 514 | or 64-bit system. |
| 515 | </note> |
| 516 | Once the build completes, you can find the |
| 517 | <filename>.sh</filename> file that installs |
| 518 | the tools in the <filename>tmp/deploy/sdk</filename> |
| 519 | subdirectory of the |
| 520 | <link linkend='build-directory'>Build Directory</link>. |
| 521 | The installer file has the string "buildtools" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 522 | (or "buildtools-extended") in the name. |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 523 | </para></listitem> |
| 524 | <listitem><para> |
| 525 | Transfer the <filename>.sh</filename> file from the |
| 526 | build host to the machine that does not meet the |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 527 | Git, tar, or Python (or gcc) requirements. |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 528 | </para></listitem> |
| 529 | <listitem><para> |
| 530 | On the machine that does not meet the requirements, |
| 531 | run the <filename>.sh</filename> file |
| 532 | to install the tools. |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 533 | Here is an example for the traditional installer: |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 534 | <literallayout class='monospaced'> |
| 535 | $ sh ~/Downloads/x86_64-buildtools-nativesdk-standalone-&DISTRO;.sh |
| 536 | </literallayout> |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 537 | Here is an example for the extended installer: |
| 538 | <literallayout class='monospaced'> |
Andrew Geissler | 4b740dc | 2020-05-05 08:54:39 -0500 | [diff] [blame] | 539 | $ sh ~/Downloads/x86_64-buildtools-extended-nativesdk-standalone-&DISTRO;.sh |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 540 | </literallayout> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 541 | During execution, a prompt appears that allows you to |
| 542 | choose the installation directory. |
| 543 | For example, you could choose the following: |
| 544 | <literallayout class='monospaced'> |
| 545 | /home/<replaceable>your_username</replaceable>/buildtools |
| 546 | </literallayout> |
| 547 | </para></listitem> |
| 548 | <listitem><para> |
| 549 | Source the tools environment setup script by using a |
| 550 | command like the following: |
| 551 | <literallayout class='monospaced'> |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 552 | $ 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] | 553 | </literallayout> |
| 554 | Of course, you need to supply your installation directory and be |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 555 | sure to use the right file (i.e. i586 or x86_64). |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 556 | </para> |
| 557 | <para> |
| 558 | After you have sourced the setup script, |
| 559 | the tools are added to <filename>PATH</filename> |
| 560 | and any other environment variables required to run the |
| 561 | tools are initialized. |
| 562 | The results are working versions versions of Git, tar, |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 563 | Python and <filename>chrpath</filename>. And in the case of |
| 564 | the <filename>buildtools-extended</filename> tarball, additional |
| 565 | working versions of tools including <filename>gcc</filename>, |
| 566 | <filename>make</filename> and the other tools included in |
| 567 | <filename>packagegroup-core-buildessential</filename>. |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 568 | </para></listitem> |
| 569 | </orderedlist> |
| 570 | </para> |
| 571 | </section> |
| 572 | </section> |
| 573 | </chapter> |
| 574 | <!-- |
| 575 | vim: expandtab tw=80 ts=4 |
| 576 | --> |