summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--documentation/brief-yoctoprojectqs/index.rst10
-rw-r--r--documentation/dev-manual/index.rst1
-rw-r--r--documentation/dev-manual/poky-manual-setup.rst128
3 files changed, 138 insertions, 1 deletions
diff --git a/documentation/brief-yoctoprojectqs/index.rst b/documentation/brief-yoctoprojectqs/index.rst
index f110a106b7..ebceecabfd 100644
--- a/documentation/brief-yoctoprojectqs/index.rst
+++ b/documentation/brief-yoctoprojectqs/index.rst
@@ -205,6 +205,12 @@ This directory contains:
205- A ``config`` directory, representing the current configuration used for this 205- A ``config`` directory, representing the current configuration used for this
206 :term:`bitbake:setup`. 206 :term:`bitbake:setup`.
207 207
208.. note::
209
210 It is also possible to setup the :term:`Poky` reference distro manually. For
211 that refer to the :doc:`/dev-manual/poky-manual-setup` section of the Yocto
212 Project Development Tasks Manual.
213
208Building Your Image 214Building Your Image
209=================== 215===================
210 216
@@ -261,7 +267,9 @@ an entire Linux distribution, including the toolchain, from source.
261 267
262 These set up the environment similar to what was previously in the local 268 These set up the environment similar to what was previously in the local
263 configuration file :ref:`local.conf <structure-build-conf-local.conf>`, 269 configuration file :ref:`local.conf <structure-build-conf-local.conf>`,
264 which is now largely empty. 270 which is now largely empty. To setup the build how it was done
271 previously, see the :doc:`/dev-manual/poky-manual-setup` section of the
272 Yocto Project Development Tasks Manual.
265 273
266 The current configuration does not allow the ``root`` user to login. As this 274 The current configuration does not allow the ``root`` user to login. As this
267 can be useful for development, you can enable the 275 can be useful for development, you can enable the
diff --git a/documentation/dev-manual/index.rst b/documentation/dev-manual/index.rst
index 7a581236a9..adf776e00b 100644
--- a/documentation/dev-manual/index.rst
+++ b/documentation/dev-manual/index.rst
@@ -17,6 +17,7 @@ Yocto Project Development Tasks Manual
17 upgrading-recipes 17 upgrading-recipes
18 temporary-source-code 18 temporary-source-code
19 creating-fragments 19 creating-fragments
20 poky-manual-setup
20 quilt.rst 21 quilt.rst
21 development-shell 22 development-shell
22 python-development-shell 23 python-development-shell
diff --git a/documentation/dev-manual/poky-manual-setup.rst b/documentation/dev-manual/poky-manual-setup.rst
new file mode 100644
index 0000000000..3e7c7d5066
--- /dev/null
+++ b/documentation/dev-manual/poky-manual-setup.rst
@@ -0,0 +1,128 @@
1.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
2
3Setting Up the Poky Reference Distro Manually
4*********************************************
5
6While the default way to setup the :term:`Poky` reference distro is to use
7``bitbake-setup``, it is also possible to manually setup the environment. This
8document guides through this setup step-by-step.
9
10.. note::
11
12 This document will produce a setup similar to what is described in
13 :doc:`/brief-yoctoprojectqs/index`, which shows how to setup :term:`Poky`
14 with ``bitbake-setup``.
15
16Use Git to Clone The Layers
17===========================
18
19Go to :yocto_wiki:`Releases wiki page </Releases>`, and choose a release
20(such as ``&DISTRO_REL_LATEST_TAG;``), corresponding to either the latest stable
21release or a Long Term Support release.
22
23Once you complete the setup instructions for your machine (see the
24:doc:`/ref-manual/system-requirements` section of the Yocto Project Reference
25Manual), you need to get a copy of the different :term:`layers <Layer>` needed
26to setup the :term:`Poky` reference distribution on your build host. Use the
27following commands:
28
29.. code-block:: shell
30
31 $ mkdir layers/
32 $ git clone -b &DISTRO_REL_LATEST_TAG; https://git.openembedded.org/bitbake ./layers/bitbake
33 $ git clone -b &DISTRO_REL_LATEST_TAG; https://git.openembedded.org/openembedded-core ./layers/openembedded-core
34 $ git clone -b &DISTRO_REL_LATEST_TAG; https://git.yoctoproject.org/meta-yocto ./layers/meta-yocto
35
36Building Your Image
37===================
38
39Use the following steps to build your image. The build process creates
40an entire Linux distribution, including the toolchain, from source.
41
42.. note::
43
44 - If you are working behind a firewall and your build host is not
45 set up for proxies, you could encounter problems with the build
46 process when fetching source code (e.g. fetcher failures or Git
47 failures).
48
49 - If you do not know your proxy settings, consult your local network
50 infrastructure resources and get that information. A good starting
51 point could also be to check your web browser settings. Finally,
52 you can find more information on the
53 ":yocto_wiki:`Working Behind a Network Proxy </Working_Behind_a_Network_Proxy>`"
54 page of the Yocto Project Wiki.
55
56#. **Initialize the Build Environment:** From your current working directory,
57 setup a build environment with the following command:
58
59 .. code-block:: shell
60
61 $ TEMPLATECONF=$PWD/layers/meta-yocto/meta-poky/conf/templates/default source ./layers/openembedded-core/oe-init-build-env
62
63 Among other things, the script creates the :term:`Build Directory`, which is
64 ``build`` in this case and is located in the :term:`Source Directory`.
65 After the script runs, your current working directory is set to the
66 :term:`Build Directory`. Later, when the build completes, the :term:`Build
67 Directory` contains all the files created during the build.
68
69#. **Examine Your Local Configuration File:** When you set up the build
70 environment, a local configuration file named ``local.conf`` becomes
71 available in a ``conf`` sub-directory of the :term:`Build Directory`. For
72 this example, the defaults are set to build for a ``qemux86-64`` target,
73 which is suitable for emulation. The package manager used is set to the RPM
74 package manager.
75
76 .. tip::
77
78 You can significantly speed up your build and guard against fetcher
79 failures by using :ref:`overview-manual/concepts:shared state cache`
80 mirrors and enabling :ref:`overview-manual/concepts:hash equivalence`.
81 This way, you can use pre-built artifacts rather than building them.
82 This is relevant only when your network and the server that you use
83 can download these artifacts faster than you would be able to build them.
84
85 To use such mirrors, uncomment the below lines in your ``conf/local.conf``
86 file in the :term:`Build Directory`::
87
88 BB_HASHSERVE_UPSTREAM = "wss://hashserv.yoctoproject.org/ws"
89 SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/all/PATH;downloadfilename=PATH"
90 BB_HASHSERVE = "auto"
91 BB_SIGNATURE_HANDLER = "OEEquivHash"
92
93 The hash equivalence server needs the websockets python module version 9.1
94 or later. Debian GNU/Linux 12 (Bookworm) and later, Fedora, CentOS Stream
95 9 and later, and Ubuntu 22.04 (LTS) and later, all have a recent enough
96 package. Other supported distributions need to get the module some other
97 place than their package feed, e.g. via ``pip``. You can otherwise
98 install a :term:`Buildtools` tarball by following the instructions in
99 the :ref:`system-requirements-buildtools` section of the Yocto Project
100 Reference Manual.
101
102#. **Start the Build:** Continue with the following command to build an OS
103 image for the target, which is ``core-image-sato`` in this example:
104
105 .. code-block:: shell
106
107 $ bitbake core-image-sato
108
109 For information on using the ``bitbake`` command, see the
110 :ref:`overview-manual/concepts:bitbake` section in the Yocto Project Overview and
111 Concepts Manual, or see
112 :ref:`bitbake-user-manual/bitbake-user-manual-intro:the bitbake command`
113 in the BitBake User Manual.
114
115#. **Simulate Your Image Using QEMU:** Once this particular image is
116 built, you can start QEMU, which is a Quick EMUlator that ships with
117 the Yocto Project:
118
119 .. code-block:: shell
120
121 $ runqemu qemux86-64
122
123 If you want to learn more about running QEMU, see the
124 :ref:`dev-manual/qemu:using the quick emulator (qemu)` chapter in
125 the Yocto Project Development Tasks Manual.
126
127#. **Exit QEMU:** Exit QEMU by either clicking on the shutdown icon or by typing
128 ``Ctrl-C`` in the QEMU transcript window from which you evoked QEMU.