Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1 | .. SPDX-License-Identifier: CC-BY-SA-2.0-UK |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2 | |
| 3 | ******************* |
| 4 | System Requirements |
| 5 | ******************* |
| 6 | |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 7 | Welcome to the Yocto Project Reference Manual. This manual provides |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 8 | reference information for the current release of the Yocto Project, and |
| 9 | is most effectively used after you have an understanding of the basics |
| 10 | of the Yocto Project. The manual is neither meant to be read as a |
| 11 | starting point to the Yocto Project, nor read from start to finish. |
| 12 | Rather, use this manual to find variable definitions, class |
| 13 | descriptions, and so forth as needed during the course of using the |
| 14 | Yocto Project. |
| 15 | |
| 16 | For introductory information on the Yocto Project, see the |
| 17 | :yocto_home:`Yocto Project Website <>` and the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 18 | ":ref:`overview-manual/development-environment:the yocto project development environment`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 19 | chapter in the Yocto Project Overview and Concepts Manual. |
| 20 | |
| 21 | If you want to use the Yocto Project to quickly build an image without |
| 22 | having to understand concepts, work through the |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 23 | :doc:`/brief-yoctoprojectqs/index` document. You can find "how-to" |
| 24 | information in the :doc:`/dev-manual/index`. You can find Yocto Project overview |
| 25 | and conceptual information in the :doc:`/overview-manual/index`. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 26 | |
| 27 | .. note:: |
| 28 | |
| 29 | For more information about the Yocto Project Documentation set, see |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 30 | the :ref:`ref-manual/resources:links and related documentation` section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 31 | |
| 32 | .. _detailed-supported-distros: |
| 33 | |
| 34 | Supported Linux Distributions |
| 35 | ============================= |
| 36 | |
| 37 | Currently, the Yocto Project is supported on the following |
| 38 | distributions: |
| 39 | |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 40 | - Ubuntu 18.04 (LTS) |
| 41 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 42 | - Ubuntu 20.04 (LTS) |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 43 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 44 | - Fedora 33 |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 45 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 46 | - Fedora 34 |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 47 | |
| 48 | - CentOS 7.x |
| 49 | |
| 50 | - CentOS 8.x |
| 51 | |
| 52 | - Debian GNU/Linux 8.x (Jessie) |
| 53 | |
| 54 | - Debian GNU/Linux 9.x (Stretch) |
| 55 | |
| 56 | - Debian GNU/Linux 10.x (Buster) |
| 57 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 58 | - Debian GNU/Linux 11.x (Bullseye) |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 59 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 60 | - OpenSUSE Leap 15.1 |
| 61 | |
| 62 | - OpenSUSE Leap 15.2 |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 63 | |
| 64 | .. note:: |
| 65 | |
| 66 | - While the Yocto Project Team attempts to ensure all Yocto Project |
| 67 | releases are one hundred percent compatible with each officially |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 68 | supported Linux distribution, you may still encounter problems |
| 69 | that happen only with a specific distribution. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 70 | |
| 71 | - Yocto Project releases are tested against the stable Linux |
| 72 | distributions in the above list. The Yocto Project should work |
| 73 | on other distributions but validation is not performed against |
| 74 | them. |
| 75 | |
| 76 | - In particular, the Yocto Project does not support and currently |
| 77 | has no plans to support rolling-releases or development |
| 78 | distributions due to their constantly changing nature. We welcome |
| 79 | patches and bug reports, but keep in mind that our priority is on |
| 80 | the supported platforms listed below. |
| 81 | |
| 82 | - You may use Windows Subsystem For Linux v2 to set up a build host |
| 83 | using Windows 10, but validation is not performed against build |
| 84 | hosts using WSLv2. |
| 85 | |
| 86 | - The Yocto Project is not compatible with WSLv1, it is |
| 87 | compatible but not officially supported nor validated with |
| 88 | WSLv2, if you still decide to use WSL please upgrade to WSLv2. |
| 89 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 90 | - If you encounter problems, please go to :yocto_bugs:`Yocto Project |
| 91 | Bugzilla <>` and submit a bug. We are |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 92 | interested in hearing about your experience. For information on |
| 93 | how to submit a bug, see the Yocto Project |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 94 | :yocto_wiki:`Bugzilla wiki page </Bugzilla_Configuration_and_Bug_Tracking>` |
| 95 | and the ":ref:`dev-manual/common-tasks:submitting a defect against the yocto project`" |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 96 | section in the Yocto Project Development Tasks Manual. |
| 97 | |
| 98 | |
| 99 | Required Packages for the Build Host |
| 100 | ==================================== |
| 101 | |
| 102 | The list of packages you need on the host development system can be |
| 103 | large when covering all build scenarios using the Yocto Project. This |
| 104 | section describes required packages according to Linux distribution and |
| 105 | function. |
| 106 | |
| 107 | .. _ubuntu-packages: |
| 108 | |
| 109 | Ubuntu and Debian |
| 110 | ----------------- |
| 111 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 112 | Here are the required packages by function given a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 113 | supported Ubuntu or Debian Linux distribution: |
| 114 | |
| 115 | .. note:: |
| 116 | |
| 117 | - If your build system has the ``oss4-dev`` package installed, you |
| 118 | might experience QEMU build failures due to the package installing |
| 119 | its own custom ``/usr/include/linux/soundcard.h`` on the Debian |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 120 | system. If you run into this situation, try either of these solutions:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 121 | |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 122 | $ sudo apt build-dep qemu |
| 123 | $ sudo apt remove oss4-dev |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 124 | |
| 125 | - For Debian-8, ``python3-git`` and ``pylint3`` are no longer |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 126 | available via ``apt``. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 127 | :: |
| 128 | |
| 129 | $ sudo pip3 install GitPython pylint==1.9.5 |
| 130 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 131 | - *Essentials:* Packages needed to build an image on a headless system:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 132 | |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 133 | $ sudo apt install &UBUNTU_HOST_PACKAGES_ESSENTIAL; |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 134 | |
| 135 | - *Documentation:* Packages needed if you are going to build out the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 136 | Yocto Project documentation manuals:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 137 | |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 138 | $ sudo apt install make python3-pip |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 139 | &PIP3_HOST_PACKAGES_DOC; |
| 140 | |
| 141 | .. note:: |
| 142 | |
| 143 | It is currently not possible to build out documentation from Debian 8 |
| 144 | (Jessie) because of outdated ``pip3`` and ``python3``. ``python3-sphinx`` |
| 145 | is too outdated. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 146 | |
| 147 | Fedora Packages |
| 148 | --------------- |
| 149 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 150 | Here are the required packages by function given a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 151 | supported Fedora Linux distribution: |
| 152 | |
| 153 | - *Essentials:* Packages needed to build an image for a headless |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 154 | system:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 155 | |
| 156 | $ sudo dnf install &FEDORA_HOST_PACKAGES_ESSENTIAL; |
| 157 | |
| 158 | - *Documentation:* Packages needed if you are going to build out the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 159 | Yocto Project documentation manuals:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 160 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 161 | $ sudo dnf install make python3-pip which |
| 162 | &PIP3_HOST_PACKAGES_DOC; |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 163 | |
| 164 | openSUSE Packages |
| 165 | ----------------- |
| 166 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 167 | Here are the required packages by function given a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 168 | supported openSUSE Linux distribution: |
| 169 | |
| 170 | - *Essentials:* Packages needed to build an image for a headless |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 171 | system:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 172 | |
| 173 | $ sudo zypper install &OPENSUSE_HOST_PACKAGES_ESSENTIAL; |
| 174 | |
| 175 | - *Documentation:* Packages needed if you are going to build out the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 176 | Yocto Project documentation manuals:: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 177 | |
| 178 | $ sudo zypper install make python3-pip which |
| 179 | &PIP3_HOST_PACKAGES_DOC; |
| 180 | |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 181 | |
| 182 | CentOS-7 Packages |
| 183 | ----------------- |
| 184 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 185 | Here are the required packages by function given a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 186 | supported CentOS-7 Linux distribution: |
| 187 | |
| 188 | - *Essentials:* Packages needed to build an image for a headless |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 189 | system:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 190 | |
| 191 | $ sudo yum install &CENTOS7_HOST_PACKAGES_ESSENTIAL; |
| 192 | |
| 193 | .. note:: |
| 194 | |
| 195 | - Extra Packages for Enterprise Linux (i.e. ``epel-release``) is |
| 196 | a collection of packages from Fedora built on RHEL/CentOS for |
| 197 | easy installation of packages not included in enterprise Linux |
| 198 | by default. You need to install these packages separately. |
| 199 | |
| 200 | - The ``makecache`` command consumes additional Metadata from |
| 201 | ``epel-release``. |
| 202 | |
| 203 | - *Documentation:* Packages needed if you are going to build out the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 204 | Yocto Project documentation manuals:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 205 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 206 | $ sudo yum install make python3-pip which |
| 207 | &PIP3_HOST_PACKAGES_DOC; |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 208 | |
| 209 | CentOS-8 Packages |
| 210 | ----------------- |
| 211 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 212 | Here are the required packages by function given a |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 213 | supported CentOS-8 Linux distribution: |
| 214 | |
| 215 | - *Essentials:* Packages needed to build an image for a headless |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 216 | system:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 217 | |
| 218 | $ sudo dnf install &CENTOS8_HOST_PACKAGES_ESSENTIAL; |
| 219 | |
| 220 | .. note:: |
| 221 | |
| 222 | - Extra Packages for Enterprise Linux (i.e. ``epel-release``) is |
| 223 | a collection of packages from Fedora built on RHEL/CentOS for |
| 224 | easy installation of packages not included in enterprise Linux |
| 225 | by default. You need to install these packages separately. |
| 226 | |
| 227 | - The ``PowerTools`` repo provides additional packages such as |
| 228 | ``rpcgen`` and ``texinfo``. |
| 229 | |
| 230 | - The ``makecache`` command consumes additional Metadata from |
| 231 | ``epel-release``. |
| 232 | |
| 233 | - *Documentation:* Packages needed if you are going to build out the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 234 | Yocto Project documentation manuals:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 235 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 236 | $ sudo dnf install make python3-pip which |
| 237 | &PIP3_HOST_PACKAGES_DOC; |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 238 | |
| 239 | Required Git, tar, Python and gcc Versions |
| 240 | ========================================== |
| 241 | |
| 242 | In order to use the build system, your host development system must meet |
| 243 | the following version requirements for Git, tar, and Python: |
| 244 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 245 | - Git &MIN_GIT_VERSION; or greater |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 246 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 247 | - tar &MIN_TAR_VERSION; or greater |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 248 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 249 | - Python &MIN_PYTHON_VERSION; or greater |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 250 | |
| 251 | If your host development system does not meet all these requirements, |
| 252 | you can resolve this by installing a ``buildtools`` tarball that |
| 253 | contains these tools. You can get the tarball one of two ways: download |
| 254 | a pre-built tarball or use BitBake to build the tarball. |
| 255 | |
| 256 | In addition, your host development system must meet the following |
| 257 | version requirement for gcc: |
| 258 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 259 | - gcc &MIN_GCC_VERSION; or greater |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 260 | |
| 261 | If your host development system does not meet this requirement, you can |
| 262 | resolve this by installing a ``buildtools-extended`` tarball that |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 263 | contains additional tools, the equivalent of the Debian/Ubuntu ``build-essential`` |
| 264 | package. |
| 265 | |
| 266 | In the sections that follow, three different methods will be described for |
| 267 | installing the ``buildtools`` or ``buildtools-extended`` toolset. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 268 | |
| 269 | Installing a Pre-Built ``buildtools`` Tarball with ``install-buildtools`` script |
| 270 | -------------------------------------------------------------------------------- |
| 271 | |
| 272 | The ``install-buildtools`` script is the easiest of the three methods by |
| 273 | which you can get these tools. It downloads a pre-built buildtools |
| 274 | installer and automatically installs the tools for you: |
| 275 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 276 | 1. Execute the ``install-buildtools`` script. Here is an example:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 277 | |
| 278 | $ cd poky |
Andrew Geissler | 5199d83 | 2021-09-24 16:47:35 -0500 | [diff] [blame] | 279 | $ scripts/install-buildtools \ |
| 280 | --without-extended-buildtools \ |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 281 | --base-url &YOCTO_DL_URL;/releases/yocto \ |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 282 | --release yocto-&DISTRO; \ |
| 283 | --installer-version &DISTRO; |
| 284 | |
| 285 | During execution, the buildtools tarball will be downloaded, the |
| 286 | checksum of the download will be verified, the installer will be run |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 287 | for you, and some basic checks will be run to make sure the |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 288 | installation is functional. |
| 289 | |
| 290 | To avoid the need of ``sudo`` privileges, the ``install-buildtools`` |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 291 | script will by default tell the installer to install in:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 292 | |
| 293 | /path/to/poky/buildtools |
| 294 | |
| 295 | If your host development system needs the additional tools provided |
| 296 | in the ``buildtools-extended`` tarball, you can instead execute the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 297 | ``install-buildtools`` script with the default parameters:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 298 | |
| 299 | $ cd poky |
| 300 | $ scripts/install-buildtools |
| 301 | |
| 302 | 2. Source the tools environment setup script by using a command like the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 303 | following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 304 | |
| 305 | $ source /path/to/poky/buildtools/environment-setup-x86_64-pokysdk-linux |
| 306 | |
| 307 | Of course, you need to supply your installation directory and be sure to |
| 308 | use the right file (i.e. i586 or x86_64). |
| 309 | |
| 310 | After you have sourced the setup script, the tools are added to |
| 311 | ``PATH`` and any other environment variables required to run the |
| 312 | tools are initialized. The results are working versions versions of |
| 313 | Git, tar, Python and ``chrpath``. And in the case of the |
| 314 | ``buildtools-extended`` tarball, additional working versions of tools |
| 315 | including ``gcc``, ``make`` and the other tools included in |
| 316 | ``packagegroup-core-buildessential``. |
| 317 | |
| 318 | Downloading a Pre-Built ``buildtools`` Tarball |
| 319 | ---------------------------------------------- |
| 320 | |
Andrew Geissler | 3b8a17c | 2021-04-15 15:55:55 -0500 | [diff] [blame] | 321 | If you would prefer not to use the ``install-buildtools`` script, you can instead |
| 322 | download and run a pre-built buildtools installer yourself with the following |
| 323 | steps: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 324 | |
| 325 | 1. Locate and download the ``*.sh`` at &YOCTO_RELEASE_DL_URL;/buildtools/ |
| 326 | |
| 327 | 2. Execute the installation script. Here is an example for the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 328 | traditional installer:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 329 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 330 | $ sh ~/Downloads/x86_64-buildtools-nativesdk-standalone-&DISTRO;.sh |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 331 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 332 | Here is an example for the extended installer:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 333 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 334 | $ sh ~/Downloads/x86_64-buildtools-extended-nativesdk-standalone-&DISTRO;.sh |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 335 | |
| 336 | During execution, a prompt appears that allows you to choose the |
| 337 | installation directory. For example, you could choose the following: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 338 | ``/home/your-username/buildtools`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 339 | |
| 340 | 3. Source the tools environment setup script by using a command like the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 341 | following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 342 | |
| 343 | $ source /home/your_username/buildtools/environment-setup-i586-poky-linux |
| 344 | |
| 345 | Of |
| 346 | course, you need to supply your installation directory and be sure to |
| 347 | use the right file (i.e. i585 or x86-64). |
| 348 | |
| 349 | After you have sourced the setup script, the tools are added to |
| 350 | ``PATH`` and any other environment variables required to run the |
| 351 | tools are initialized. The results are working versions versions of |
| 352 | Git, tar, Python and ``chrpath``. And in the case of the |
| 353 | ``buildtools-extended`` tarball, additional working versions of tools |
| 354 | including ``gcc``, ``make`` and the other tools included in |
| 355 | ``packagegroup-core-buildessential``. |
| 356 | |
| 357 | Building Your Own ``buildtools`` Tarball |
| 358 | ---------------------------------------- |
| 359 | |
| 360 | Building and running your own buildtools installer applies only when you |
| 361 | have a build host that can already run BitBake. In this case, you use |
| 362 | that machine to build the ``.sh`` file and then take steps to transfer |
| 363 | and run it on a machine that does not meet the minimal Git, tar, and |
| 364 | Python (or gcc) requirements. |
| 365 | |
| 366 | Here are the steps to take to build and run your own buildtools |
| 367 | installer: |
| 368 | |
| 369 | 1. On the machine that is able to run BitBake, be sure you have set up |
| 370 | your build environment with the setup script |
| 371 | (:ref:`structure-core-script`). |
| 372 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 373 | 2. Run the BitBake command to build the tarball:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 374 | |
| 375 | $ bitbake buildtools-tarball |
| 376 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 377 | or run the BitBake command to build the extended tarball:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 378 | |
| 379 | $ bitbake buildtools-extended-tarball |
| 380 | |
| 381 | .. note:: |
| 382 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 383 | The :term:`SDKMACHINE` variable in your ``local.conf`` file determines |
| 384 | whether you build tools for a 32-bit or 64-bit system. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 385 | |
| 386 | Once the build completes, you can find the ``.sh`` file that installs |
| 387 | the tools in the ``tmp/deploy/sdk`` subdirectory of the |
| 388 | :term:`Build Directory`. The installer file has the string |
| 389 | "buildtools" (or "buildtools-extended") in the name. |
| 390 | |
| 391 | 3. Transfer the ``.sh`` file from the build host to the machine that |
| 392 | does not meet the Git, tar, or Python (or gcc) requirements. |
| 393 | |
| 394 | 4. On the machine that does not meet the requirements, run the ``.sh`` |
| 395 | file to install the tools. Here is an example for the traditional |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 396 | installer:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 397 | |
| 398 | $ sh ~/Downloads/x86_64-buildtools-nativesdk-standalone-&DISTRO;.sh |
| 399 | |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 400 | Here is an example for the extended installer:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 401 | |
| 402 | $ sh ~/Downloads/x86_64-buildtools-extended-nativesdk-standalone-&DISTRO;.sh |
| 403 | |
| 404 | During execution, a prompt appears that allows you to choose the |
| 405 | installation directory. For example, you could choose the following: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 406 | ``/home/your_username/buildtools`` |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 407 | |
| 408 | 5. Source the tools environment setup script by using a command like the |
Andrew Geissler | c926e17 | 2021-05-07 16:11:35 -0500 | [diff] [blame] | 409 | following:: |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 410 | |
| 411 | $ source /home/your_username/buildtools/environment-setup-x86_64-poky-linux |
| 412 | |
| 413 | Of course, you need to supply your installation directory and be sure to |
| 414 | use the right file (i.e. i586 or x86_64). |
| 415 | |
| 416 | After you have sourced the setup script, the tools are added to |
| 417 | ``PATH`` and any other environment variables required to run the |
| 418 | tools are initialized. The results are working versions versions of |
| 419 | Git, tar, Python and ``chrpath``. And in the case of the |
| 420 | ``buildtools-extended`` tarball, additional working versions of tools |
| 421 | including ``gcc``, ``make`` and the other tools included in |
| 422 | ``packagegroup-core-buildessential``. |