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