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