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