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