summaryrefslogtreecommitdiffstats
path: root/documentation/dev-manual/temporary-source-code.rst
diff options
context:
space:
mode:
authorMichael Opdenacker <michael.opdenacker@bootlin.com>2023-09-18 16:11:24 +0200
committerSteve Sakoman <steve@sakoman.com>2023-09-23 05:26:16 -1000
commit337a21080bdb50fa8726d8ed74a290190463dd5f (patch)
tree66c53d600108699bee608df0a154967ae5394e52 /documentation/dev-manual/temporary-source-code.rst
parent90e943b8d1b76dac3b6d6822119ac6650efc90ba (diff)
downloadpoky-337a21080bdb50fa8726d8ed74a290190463dd5f.tar.gz
dev-manual: split common-tasks.rst
Reusing content from the master branch which underwent this change earlier. This change makes it much easier to backport manual updates to the kirkstone LTS branch. To make the change and future updates simpler, reused file contents from master, only excluding changes which don't apply to kirkstone. (From yocto-docs rev: 95171233f0e96c00d55ed40cf713c62e6df57b8d) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'documentation/dev-manual/temporary-source-code.rst')
-rw-r--r--documentation/dev-manual/temporary-source-code.rst66
1 files changed, 66 insertions, 0 deletions
diff --git a/documentation/dev-manual/temporary-source-code.rst b/documentation/dev-manual/temporary-source-code.rst
new file mode 100644
index 0000000000..08bf68d982
--- /dev/null
+++ b/documentation/dev-manual/temporary-source-code.rst
@@ -0,0 +1,66 @@
1.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
2
3Finding Temporary Source Code
4*****************************
5
6You might find it helpful during development to modify the temporary
7source code used by recipes to build packages. For example, suppose you
8are developing a patch and you need to experiment a bit to figure out
9your solution. After you have initially built the package, you can
10iteratively tweak the source code, which is located in the
11:term:`Build Directory`, and then you can force a re-compile and quickly
12test your altered code. Once you settle on a solution, you can then preserve
13your changes in the form of patches.
14
15During a build, the unpacked temporary source code used by recipes to
16build packages is available in the :term:`Build Directory` as defined by the
17:term:`S` variable. Below is the default value for the :term:`S` variable as
18defined in the ``meta/conf/bitbake.conf`` configuration file in the
19:term:`Source Directory`::
20
21 S = "${WORKDIR}/${BP}"
22
23You should be aware that many recipes override the
24:term:`S` variable. For example, recipes that fetch their source from Git
25usually set :term:`S` to ``${WORKDIR}/git``.
26
27.. note::
28
29 The :term:`BP` represents the base recipe name, which consists of the name
30 and version::
31
32 BP = "${BPN}-${PV}"
33
34
35The path to the work directory for the recipe
36(:term:`WORKDIR`) is defined as
37follows::
38
39 ${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}
40
41The actual directory depends on several things:
42
43- :term:`TMPDIR`: The top-level build
44 output directory.
45
46- :term:`MULTIMACH_TARGET_SYS`:
47 The target system identifier.
48
49- :term:`PN`: The recipe name.
50
51- :term:`EXTENDPE`: The epoch --- if
52 :term:`PE` is not specified, which is
53 usually the case for most recipes, then :term:`EXTENDPE` is blank.
54
55- :term:`PV`: The recipe version.
56
57- :term:`PR`: The recipe revision.
58
59As an example, assume a Source Directory top-level folder named
60``poky``, a default :term:`Build Directory` at ``poky/build``, and a
61``qemux86-poky-linux`` machine target system. Furthermore, suppose your
62recipe is named ``foo_1.3.0.bb``. In this case, the work directory the
63build system uses to build the package would be as follows::
64
65 poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0
66