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