blob: 0fc92550a51ac62c39859acc63002ac065559e2a [file] [log] [blame]
Andrew Geisslerf0343792020-11-18 10:42:21 -06001.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002
3*******************
4System Requirements
5*******************
6
Andrew Geissler5199d832021-09-24 16:47:35 -05007Welcome to the Yocto Project Reference Manual. This manual provides
Andrew Geisslerc9f78652020-09-18 14:11:35 -05008reference information for the current release of the Yocto Project, and
9is most effectively used after you have an understanding of the basics
10of the Yocto Project. The manual is neither meant to be read as a
11starting point to the Yocto Project, nor read from start to finish.
12Rather, use this manual to find variable definitions, class
13descriptions, and so forth as needed during the course of using the
14Yocto Project.
15
16For introductory information on the Yocto Project, see the
17:yocto_home:`Yocto Project Website <>` and the
Andrew Geissler09209ee2020-12-13 08:44:15 -060018":ref:`overview-manual/development-environment:the yocto project development environment`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -050019chapter in the Yocto Project Overview and Concepts Manual.
20
21If you want to use the Yocto Project to quickly build an image without
22having to understand concepts, work through the
Andrew Geissler09209ee2020-12-13 08:44:15 -060023:doc:`/brief-yoctoprojectqs/index` document. You can find "how-to"
24information in the :doc:`/dev-manual/index`. You can find Yocto Project overview
25and conceptual information in the :doc:`/overview-manual/index`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -050026
27.. note::
28
29 For more information about the Yocto Project Documentation set, see
Andrew Geissler4c19ea12020-10-27 13:52:24 -050030 the :ref:`ref-manual/resources:links and related documentation` section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -050031
Patrick Williams8e7b46e2023-05-01 14:19:06 -050032Minimum Free Disk Space
33=======================
34
35To build an image such as ``core-image-sato`` for the ``qemux86-64`` machine,
36you need a system with at least &MIN_DISK_SPACE; Gbytes of free disk space.
37However, much more disk space will be necessary to build more complex images,
38to run multiple builds and to cache build artifacts, improving build efficiency.
39
40If you have a shortage of disk space, see the ":doc:`/dev-manual/disk-space`"
41section of the Development Tasks Manual.
42
Patrick Williamsb542dec2023-06-09 01:26:37 -050043.. _system-requirements-minimum-ram:
44
Patrick Williams8e7b46e2023-05-01 14:19:06 -050045Minimum System RAM
46==================
47
48You 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
50system with 4 CPU cores, but your builds will be much faster on a system with
51as much RAM and as many CPU cores as possible.
52
53.. _system-requirements-supported-distros:
Andrew Geisslerc9f78652020-09-18 14:11:35 -050054
55Supported Linux Distributions
56=============================
57
Andrew Geissler5082cc72023-09-11 08:41:39 -040058Currently, the &DISTRO; release ("&DISTRO_NAME;") of the Yocto Project is
59supported on the following distributions:
Andrew Geisslerc9f78652020-09-18 14:11:35 -050060
William A. Kennington IIIac69b482021-06-02 12:28:27 -070061- Ubuntu 20.04 (LTS)
Andrew Geisslerc9f78652020-09-18 14:11:35 -050062
Patrick Williams2194f502022-10-16 14:26:09 -050063- Ubuntu 22.04 (LTS)
64
Andrew Geissler5082cc72023-09-11 08:41:39 -040065- Fedora 38
Andrew Geisslerc9f78652020-09-18 14:11:35 -050066
Andrew Geissler5082cc72023-09-11 08:41:39 -040067- CentOS Stream 8
Andrew Geisslerc9f78652020-09-18 14:11:35 -050068
Andrew Geissler5082cc72023-09-11 08:41:39 -040069- Debian GNU/Linux 11 (Bullseye)
70
71- Debian GNU/Linux 12 (Bookworm)
72
73- OpenSUSE Leap 15.4
74
Patrick Williams705982a2024-01-12 09:51:57 -060075- AlmaLinux 8
Andrew Geissler5082cc72023-09-11 08:41:39 -040076
Patrick Williams705982a2024-01-12 09:51:57 -060077- AlmaLinux 9
Andrew Geissler5082cc72023-09-11 08:41:39 -040078
Patrick Williams705982a2024-01-12 09:51:57 -060079- Rocky 9
80
81The following distribution versions are still tested, even though the
82organizations publishing them no longer make updates publicly available:
Andrew Geissler5082cc72023-09-11 08:41:39 -040083
84- Ubuntu 18.04 (LTS)
85
Patrick Williams705982a2024-01-12 09:51:57 -060086- Ubuntu 23.04
Andrew Geisslerc9f78652020-09-18 14:11:35 -050087
Andrew Geissler5082cc72023-09-11 08:41:39 -040088Note that the Yocto Project doesn't have access to private updates
89that some of these versions may have. Therefore, our testing has
90limited value if you have access to such updates.
91
92Finally, here are the distribution versions which were previously
93tested on former revisions of "&DISTRO_NAME;", but no longer are:
94
95*This list is currently empty*
Andrew Geissler6aa7eec2023-03-03 12:41:14 -060096
Andrew Geisslerc9f78652020-09-18 14:11:35 -050097.. note::
98
99 - While the Yocto Project Team attempts to ensure all Yocto Project
100 releases are one hundred percent compatible with each officially
William A. Kennington IIIac69b482021-06-02 12:28:27 -0700101 supported Linux distribution, you may still encounter problems
102 that happen only with a specific distribution.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500103
104 - Yocto Project releases are tested against the stable Linux
105 distributions in the above list. The Yocto Project should work
106 on other distributions but validation is not performed against
107 them.
108
109 - In particular, the Yocto Project does not support and currently
110 has no plans to support rolling-releases or development
111 distributions due to their constantly changing nature. We welcome
112 patches and bug reports, but keep in mind that our priority is on
Andrew Geissler517393d2023-01-13 08:55:19 -0600113 the supported platforms listed above.
114
115 - If your Linux distribution is not in the above list, we recommend to
116 get the :term:`buildtools` or :term:`buildtools-extended` tarballs
117 containing the host tools required by your Yocto Project release,
118 typically by running ``scripts/install-buildtools`` as explained in
119 the ":ref:`system-requirements-buildtools`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500120
121 - You may use Windows Subsystem For Linux v2 to set up a build host
Patrick Williams2390b1b2022-11-03 13:47:49 -0500122 using Windows 10 or later, or Windows Server 2019 or later, but validation
123 is not performed against build hosts using WSL 2.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500124
Patrick Williams2390b1b2022-11-03 13:47:49 -0500125 See the
126 :ref:`dev-manual/start:setting up to use windows subsystem for linux (wsl 2)`
127 section in the Yocto Project Development Tasks Manual for more information.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500128
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500129 - If you encounter problems, please go to :yocto_bugs:`Yocto Project
130 Bugzilla <>` and submit a bug. We are
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500131 interested in hearing about your experience. For information on
132 how to submit a bug, see the Yocto Project
Andrew Geissler09209ee2020-12-13 08:44:15 -0600133 :yocto_wiki:`Bugzilla wiki page </Bugzilla_Configuration_and_Bug_Tracking>`
Andrew Geissler5082cc72023-09-11 08:41:39 -0400134 and the ":doc:`../contributor-guide/report-defect`"
135 section in the Yocto Project and OpenEmbedded Contributor Guide.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500136
137Required Packages for the Build Host
138====================================
139
140The list of packages you need on the host development system can be
141large when covering all build scenarios using the Yocto Project. This
142section describes required packages according to Linux distribution and
143function.
144
145.. _ubuntu-packages:
146
147Ubuntu and Debian
148-----------------
149
Andrew Geisslerfc113ea2023-03-31 09:59:46 -0500150Here are the packages needed to build an image on a headless system
151with a supported Ubuntu or Debian Linux distribution::
152
153 $ sudo apt install &UBUNTU_HOST_PACKAGES_ESSENTIAL;
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500154
155.. note::
156
157 - If your build system has the ``oss4-dev`` package installed, you
158 might experience QEMU build failures due to the package installing
159 its own custom ``/usr/include/linux/soundcard.h`` on the Debian
William A. Kennington IIIac69b482021-06-02 12:28:27 -0700160 system. If you run into this situation, try either of these solutions::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500161
Andrew Geisslereff27472021-10-29 15:35:00 -0500162 $ sudo apt build-dep qemu
163 $ sudo apt remove oss4-dev
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500164
Andrew Geisslerfc113ea2023-03-31 09:59:46 -0500165Here are the packages needed to build Project documentation manuals::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500166
Patrick Williams39653562024-03-01 08:54:02 -0600167 $ sudo apt install git make inkscape texlive-latex-extra
168 $ sudo apt install sphinx python3-saneyaml python3-sphinx-rtd-theme
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500169
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500170Fedora Packages
171---------------
172
Andrew Geisslerfc113ea2023-03-31 09:59:46 -0500173Here are the packages needed to build an image on a headless system
174with a supported Fedora Linux distribution::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500175
Andrew Geisslerfc113ea2023-03-31 09:59:46 -0500176 $ sudo dnf install &FEDORA_HOST_PACKAGES_ESSENTIAL;
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500177
Andrew Geisslerfc113ea2023-03-31 09:59:46 -0500178Here are the packages needed to build Project documentation manuals::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500179
Patrick Williams39653562024-03-01 08:54:02 -0600180 $ sudo dnf install git make python3-pip which inkscape texlive-fncychap
Andrew Geisslerfc113ea2023-03-31 09:59:46 -0500181 &PIP3_HOST_PACKAGES_DOC;
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500182
183openSUSE Packages
184-----------------
185
Andrew Geisslerfc113ea2023-03-31 09:59:46 -0500186Here are the packages needed to build an image on a headless system
187with a supported openSUSE distribution::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500188
Andrew Geisslerfc113ea2023-03-31 09:59:46 -0500189 $ sudo zypper install &OPENSUSE_HOST_PACKAGES_ESSENTIAL;
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500190
Andrew Geisslerfc113ea2023-03-31 09:59:46 -0500191Here are the packages needed to build Project documentation manuals::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500192
Patrick Williams39653562024-03-01 08:54:02 -0600193 $ sudo zypper install git make python3-pip which inkscape texlive-fncychap
Andrew Geisslerfc113ea2023-03-31 09:59:46 -0500194 &PIP3_HOST_PACKAGES_DOC;
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500195
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500196
Andrew Geisslerfc113ea2023-03-31 09:59:46 -0500197AlmaLinux Packages
198------------------
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500199
Andrew Geisslerfc113ea2023-03-31 09:59:46 -0500200Here are the packages needed to build an image on a headless system
201with a supported AlmaLinux distribution::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500202
Andrew Geissler028142b2023-05-05 11:29:21 -0500203 $ sudo dnf install &ALMALINUX_HOST_PACKAGES_ESSENTIAL;
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500204
Andrew Geisslerfc113ea2023-03-31 09:59:46 -0500205.. note::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500206
Andrew Geisslerfc113ea2023-03-31 09:59:46 -0500207 - Extra Packages for Enterprise Linux (i.e. ``epel-release``) is
208 a collection of packages from Fedora built on RHEL/CentOS for
209 easy installation of packages not included in enterprise Linux
210 by default. You need to install these packages separately.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500211
Andrew Geisslerfc113ea2023-03-31 09:59:46 -0500212 - The ``PowerTools/CRB`` repo provides additional packages such as
213 ``rpcgen`` and ``texinfo``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500214
Andrew Geisslerfc113ea2023-03-31 09:59:46 -0500215 - The ``makecache`` command consumes additional Metadata from
216 ``epel-release``.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500217
Andrew Geisslerfc113ea2023-03-31 09:59:46 -0500218Here are the packages needed to build Project documentation manuals::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500219
Patrick Williams39653562024-03-01 08:54:02 -0600220 $ sudo dnf install git make python3-pip which inkscape texlive-fncychap
Andrew Geisslerfc113ea2023-03-31 09:59:46 -0500221 &PIP3_HOST_PACKAGES_DOC;
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500222
Andrew Geissler517393d2023-01-13 08:55:19 -0600223.. _system-requirements-buildtools:
224
Andrew Geissler615f2f12022-07-15 14:00:58 -0500225Required Git, tar, Python, make and gcc Versions
226================================================
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500227
228In order to use the build system, your host development system must meet
229the following version requirements for Git, tar, and Python:
230
Andrew Geissler3b8a17c2021-04-15 15:55:55 -0500231- Git &MIN_GIT_VERSION; or greater
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500232
Andrew Geissler3b8a17c2021-04-15 15:55:55 -0500233- tar &MIN_TAR_VERSION; or greater
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500234
Andrew Geissler3b8a17c2021-04-15 15:55:55 -0500235- Python &MIN_PYTHON_VERSION; or greater
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500236
Andrew Geissler615f2f12022-07-15 14:00:58 -0500237- GNU make &MIN_MAKE_VERSION; or greater
238
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500239If your host development system does not meet all these requirements,
Andrew Geissler517393d2023-01-13 08:55:19 -0600240you can resolve this by installing a :term:`buildtools` tarball that
241contains these tools. You can either download a pre-built tarball or
242use BitBake to build one.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500243
244In addition, your host development system must meet the following
245version requirement for gcc:
246
Andrew Geissler3b8a17c2021-04-15 15:55:55 -0500247- gcc &MIN_GCC_VERSION; or greater
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500248
249If your host development system does not meet this requirement, you can
Andrew Geissler517393d2023-01-13 08:55:19 -0600250resolve this by installing a :term:`buildtools-extended` tarball that
Andrew Geissler3b8a17c2021-04-15 15:55:55 -0500251contains additional tools, the equivalent of the Debian/Ubuntu ``build-essential``
252package.
253
Patrick Williams2390b1b2022-11-03 13:47:49 -0500254For systems with a broken make version (e.g. make 4.2.1 without patches) but
Andrew Geissler517393d2023-01-13 08:55:19 -0600255where the rest of the host tools are usable, you can use the :term:`buildtools-make`
Patrick Williams2390b1b2022-11-03 13:47:49 -0500256tarball instead.
257
Andrew Geissler3b8a17c2021-04-15 15:55:55 -0500258In the sections that follow, three different methods will be described for
Andrew Geissler517393d2023-01-13 08:55:19 -0600259installing the :term:`buildtools`, :term:`buildtools-extended` or :term:`buildtools-make`
Patrick Williams2390b1b2022-11-03 13:47:49 -0500260toolset.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500261
262Installing a Pre-Built ``buildtools`` Tarball with ``install-buildtools`` script
263--------------------------------------------------------------------------------
264
265The ``install-buildtools`` script is the easiest of the three methods by
Andrew Geissler517393d2023-01-13 08:55:19 -0600266which you can get these tools. It downloads a pre-built :term:`buildtools`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500267installer and automatically installs the tools for you:
268
Andrew Geissler517393d2023-01-13 08:55:19 -0600269#. Execute the ``install-buildtools`` script. Here is an example::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500270
271 $ cd poky
Andrew Geissler5199d832021-09-24 16:47:35 -0500272 $ scripts/install-buildtools \
273 --without-extended-buildtools \
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500274 --base-url &YOCTO_DL_URL;/releases/yocto \
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500275 --release yocto-&DISTRO; \
276 --installer-version &DISTRO;
277
Andrew Geissler517393d2023-01-13 08:55:19 -0600278 During execution, the :term:`buildtools` tarball will be downloaded, the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500279 checksum of the download will be verified, the installer will be run
Andrew Geissler3b8a17c2021-04-15 15:55:55 -0500280 for you, and some basic checks will be run to make sure the
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500281 installation is functional.
282
283 To avoid the need of ``sudo`` privileges, the ``install-buildtools``
Andrew Geisslerc926e172021-05-07 16:11:35 -0500284 script will by default tell the installer to install in::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500285
286 /path/to/poky/buildtools
287
288 If your host development system needs the additional tools provided
Andrew Geissler517393d2023-01-13 08:55:19 -0600289 in the :term:`buildtools-extended` tarball, you can instead execute the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500290 ``install-buildtools`` script with the default parameters::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500291
292 $ cd poky
293 $ scripts/install-buildtools
294
Patrick Williams2390b1b2022-11-03 13:47:49 -0500295 Alternatively if your host development system has a broken ``make``
296 version such that you only need a known good version of ``make``,
Andrew Geissler517393d2023-01-13 08:55:19 -0600297 you can use the ``--make-only`` option::
Patrick Williams2390b1b2022-11-03 13:47:49 -0500298
299 $ cd poky
300 $ scripts/install-buildtools --make-only
301
Andrew Geissler517393d2023-01-13 08:55:19 -0600302#. Source the tools environment setup script by using a command like the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500303 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500304
305 $ source /path/to/poky/buildtools/environment-setup-x86_64-pokysdk-linux
306
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500307 After you have sourced the setup script, the tools are added to
308 ``PATH`` and any other environment variables required to run the
309 tools are initialized. The results are working versions versions of
310 Git, tar, Python and ``chrpath``. And in the case of the
Andrew Geissler517393d2023-01-13 08:55:19 -0600311 :term:`buildtools-extended` tarball, additional working versions of tools
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500312 including ``gcc``, ``make`` and the other tools included in
313 ``packagegroup-core-buildessential``.
314
315Downloading a Pre-Built ``buildtools`` Tarball
316----------------------------------------------
317
Andrew Geissler3b8a17c2021-04-15 15:55:55 -0500318If you would prefer not to use the ``install-buildtools`` script, you can instead
Andrew Geissler517393d2023-01-13 08:55:19 -0600319download and run a pre-built :term:`buildtools` installer yourself with the following
Andrew Geissler3b8a17c2021-04-15 15:55:55 -0500320steps:
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500321
Andrew Geissler517393d2023-01-13 08:55:19 -0600322#. Go to :yocto_dl:`/releases/yocto/yocto-&DISTRO;/buildtools/`, locate and
323 download the ``.sh`` file corresponding to your host architecture
324 and to :term:`buildtools`, :term:`buildtools-extended` or :term:`buildtools-make`.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500325
Andrew Geissler517393d2023-01-13 08:55:19 -0600326#. Execute the installation script. Here is an example for the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500327 traditional installer::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500328
Andrew Geisslerd1e89492021-02-12 15:35:20 -0600329 $ sh ~/Downloads/x86_64-buildtools-nativesdk-standalone-&DISTRO;.sh
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500330
Andrew Geisslerc926e172021-05-07 16:11:35 -0500331 Here is an example for the extended installer::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500332
Andrew Geisslerd1e89492021-02-12 15:35:20 -0600333 $ sh ~/Downloads/x86_64-buildtools-extended-nativesdk-standalone-&DISTRO;.sh
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500334
Patrick Williams2390b1b2022-11-03 13:47:49 -0500335 An example for the make-only installer::
336
337 $ sh ~/Downloads/x86_64-buildtools-make-nativesdk-standalone-&DISTRO;.sh
338
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500339 During execution, a prompt appears that allows you to choose the
340 installation directory. For example, you could choose the following:
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500341 ``/home/your-username/buildtools``
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500342
Andrew Geissler517393d2023-01-13 08:55:19 -0600343#. As instructed by the installer script, you will have to source the tools
344 environment setup script::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500345
Andrew Geissler517393d2023-01-13 08:55:19 -0600346 $ source /home/your_username/buildtools/environment-setup-x86_64-pokysdk-linux
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500347
348 After you have sourced the setup script, the tools are added to
349 ``PATH`` and any other environment variables required to run the
350 tools are initialized. The results are working versions versions of
351 Git, tar, Python and ``chrpath``. And in the case of the
Andrew Geissler517393d2023-01-13 08:55:19 -0600352 :term:`buildtools-extended` tarball, additional working versions of tools
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500353 including ``gcc``, ``make`` and the other tools included in
354 ``packagegroup-core-buildessential``.
355
356Building Your Own ``buildtools`` Tarball
357----------------------------------------
358
Andrew Geissler517393d2023-01-13 08:55:19 -0600359Building and running your own :term:`buildtools` installer applies only when you
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500360have a build host that can already run BitBake. In this case, you use
361that machine to build the ``.sh`` file and then take steps to transfer
362and run it on a machine that does not meet the minimal Git, tar, and
363Python (or gcc) requirements.
364
Andrew Geissler517393d2023-01-13 08:55:19 -0600365Here are the steps to take to build and run your own :term:`buildtools`
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500366installer:
367
Andrew Geissler517393d2023-01-13 08:55:19 -0600368#. On the machine that is able to run BitBake, be sure you have set up
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500369 your build environment with the setup script
370 (:ref:`structure-core-script`).
371
Andrew Geissler517393d2023-01-13 08:55:19 -0600372#. Run the BitBake command to build the tarball::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500373
374 $ bitbake buildtools-tarball
375
Andrew Geissler517393d2023-01-13 08:55:19 -0600376 or to build the extended tarball::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500377
378 $ bitbake buildtools-extended-tarball
379
Patrick Williams2390b1b2022-11-03 13:47:49 -0500380 or to build the make-only tarball::
381
382 $ bitbake buildtools-make-tarball
383
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500384 .. note::
385
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500386 The :term:`SDKMACHINE` variable in your ``local.conf`` file determines
387 whether you build tools for a 32-bit or 64-bit system.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500388
389 Once the build completes, you can find the ``.sh`` file that installs
390 the tools in the ``tmp/deploy/sdk`` subdirectory of the
391 :term:`Build Directory`. The installer file has the string
Andrew Geissler517393d2023-01-13 08:55:19 -0600392 "buildtools" or "buildtools-extended" in the name.
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500393
Andrew Geissler517393d2023-01-13 08:55:19 -0600394#. Transfer the ``.sh`` file from the build host to the machine that
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500395 does not meet the Git, tar, or Python (or gcc) requirements.
396
Andrew Geissler517393d2023-01-13 08:55:19 -0600397#. On this machine, run the ``.sh`` file to install the tools. Here is an
398 example for the traditional installer::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500399
400 $ sh ~/Downloads/x86_64-buildtools-nativesdk-standalone-&DISTRO;.sh
401
Andrew Geissler517393d2023-01-13 08:55:19 -0600402 For the extended installer::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500403
404 $ sh ~/Downloads/x86_64-buildtools-extended-nativesdk-standalone-&DISTRO;.sh
405
Andrew Geissler517393d2023-01-13 08:55:19 -0600406 And for the make-only installer::
Patrick Williams2390b1b2022-11-03 13:47:49 -0500407
408 $ sh ~/Downloads/x86_64-buildtools-make-nativesdk-standalone-&DISTRO;.sh
409
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500410 During execution, a prompt appears that allows you to choose the
411 installation directory. For example, you could choose the following:
Andrew Geissler4c19ea12020-10-27 13:52:24 -0500412 ``/home/your_username/buildtools``
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500413
Andrew Geissler517393d2023-01-13 08:55:19 -0600414#. Source the tools environment setup script by using a command like the
Andrew Geisslerc926e172021-05-07 16:11:35 -0500415 following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500416
417 $ source /home/your_username/buildtools/environment-setup-x86_64-poky-linux
418
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500419 After you have sourced the setup script, the tools are added to
420 ``PATH`` and any other environment variables required to run the
421 tools are initialized. The results are working versions versions of
422 Git, tar, Python and ``chrpath``. And in the case of the
Andrew Geissler517393d2023-01-13 08:55:19 -0600423 :term:`buildtools-extended` tarball, additional working versions of tools
Andrew Geisslerc9f78652020-09-18 14:11:35 -0500424 including ``gcc``, ``make`` and the other tools included in
425 ``packagegroup-core-buildessential``.