summaryrefslogtreecommitdiffstats
path: root/documentation/dev-manual
diff options
context:
space:
mode:
authorAlexander Kanavin <alex@linutronix.de>2025-06-23 14:42:54 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-06-30 17:44:21 +0100
commit1180a5b5919eb26942763a85762822adcca9ed65 (patch)
treeaef45ac273a8136b4965346569dc54c1f816a7f8 /documentation/dev-manual
parentf4447244f54e812996d676dd59f515cf4cfdc454 (diff)
downloadpoky-1180a5b5919eb26942763a85762822adcca9ed65.tar.gz
dev-manual: replace WORKDIR with UNPACKDIR where appropriate
(From yocto-docs rev: 25ea8e2a0428b6cb66402283e64144d5ce61daf6) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/dev-manual')
-rw-r--r--documentation/dev-manual/layers.rst12
-rw-r--r--documentation/dev-manual/licenses.rst4
-rw-r--r--documentation/dev-manual/new-recipe.rst12
-rw-r--r--documentation/dev-manual/packages.rst2
-rw-r--r--documentation/dev-manual/prebuilt-libraries.rst4
-rw-r--r--documentation/dev-manual/temporary-source-code.rst15
6 files changed, 26 insertions, 23 deletions
diff --git a/documentation/dev-manual/layers.rst b/documentation/dev-manual/layers.rst
index c649e2bd60..454c72bcd2 100644
--- a/documentation/dev-manual/layers.rst
+++ b/documentation/dev-manual/layers.rst
@@ -507,7 +507,7 @@ the "meta" layer at ``meta/recipes-bsp/formfactor``::
507 PR = "r45" 507 PR = "r45"
508 508
509 SRC_URI = "file://config file://machconfig" 509 SRC_URI = "file://config file://machconfig"
510 S = "${WORKDIR}" 510 S = "${UNPACKDIR}"
511 511
512 PACKAGE_ARCH = "${MACHINE_ARCH}" 512 PACKAGE_ARCH = "${MACHINE_ARCH}"
513 INHIBIT_DEFAULT_DEPS = "1" 513 INHIBIT_DEFAULT_DEPS = "1"
@@ -586,7 +586,7 @@ Directory`. Here is the main ``xserver-xf86-config`` recipe, which is named
586 586
587 SRC_URI = "file://xorg.conf" 587 SRC_URI = "file://xorg.conf"
588 588
589 S = "${WORKDIR}" 589 S = "${UNPACKDIR}"
590 590
591 CONFFILES:${PN} = "${sysconfdir}/X11/xorg.conf" 591 CONFFILES:${PN} = "${sysconfdir}/X11/xorg.conf"
592 592
@@ -594,9 +594,9 @@ Directory`. Here is the main ``xserver-xf86-config`` recipe, which is named
594 ALLOW_EMPTY:${PN} = "1" 594 ALLOW_EMPTY:${PN} = "1"
595 595
596 do_install () { 596 do_install () {
597 if test -s ${WORKDIR}/xorg.conf; then 597 if test -s ${UNPACKDIR}/xorg.conf; then
598 install -d ${D}/${sysconfdir}/X11 598 install -d ${D}/${sysconfdir}/X11
599 install -m 0644 ${WORKDIR}/xorg.conf ${D}/${sysconfdir}/X11/ 599 install -m 0644 ${UNPACKDIR}/xorg.conf ${D}/${sysconfdir}/X11/
600 fi 600 fi
601 } 601 }
602 602
@@ -614,8 +614,8 @@ file is in the layer at ``recipes-graphics/xorg-xserver``::
614 PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}" 614 PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}"
615 if [ "${PITFT}" = "1" ]; then 615 if [ "${PITFT}" = "1" ]; then
616 install -d ${D}/${sysconfdir}/X11/xorg.conf.d/ 616 install -d ${D}/${sysconfdir}/X11/xorg.conf.d/
617 install -m 0644 ${WORKDIR}/xorg.conf.d/98-pitft.conf ${D}/${sysconfdir}/X11/xorg.conf.d/ 617 install -m 0644 ${UNPACKDIR}/xorg.conf.d/98-pitft.conf ${D}/${sysconfdir}/X11/xorg.conf.d/
618 install -m 0644 ${WORKDIR}/xorg.conf.d/99-calibration.conf ${D}/${sysconfdir}/X11/xorg.conf.d/ 618 install -m 0644 ${UNPACKDIR}/xorg.conf.d/99-calibration.conf ${D}/${sysconfdir}/X11/xorg.conf.d/
619 fi 619 fi
620 } 620 }
621 621
diff --git a/documentation/dev-manual/licenses.rst b/documentation/dev-manual/licenses.rst
index bffff3675f..7d6636eeff 100644
--- a/documentation/dev-manual/licenses.rst
+++ b/documentation/dev-manual/licenses.rst
@@ -55,11 +55,11 @@ Consider this next example::
55 55
56 LIC_FILES_CHKSUM = "file://src/ls.c;beginline=5;endline=16;\ 56 LIC_FILES_CHKSUM = "file://src/ls.c;beginline=5;endline=16;\
57 md5=bb14ed3c4cda583abc85401304b5cd4e" 57 md5=bb14ed3c4cda583abc85401304b5cd4e"
58 LIC_FILES_CHKSUM = "file://${WORKDIR}/license.html;md5=5c94767cedb5d6987c902ac850ded2c6" 58 LIC_FILES_CHKSUM = "file://${UNPACKDIR}/license.html;md5=5c94767cedb5d6987c902ac850ded2c6"
59 59
60The first line locates a file in ``${S}/src/ls.c`` and isolates lines 60The first line locates a file in ``${S}/src/ls.c`` and isolates lines
61five through 16 as license text. The second line refers to a file in 61five through 16 as license text. The second line refers to a file in
62:term:`WORKDIR`. 62:term:`UNPACKDIR`.
63 63
64Note that :term:`LIC_FILES_CHKSUM` variable is mandatory for all recipes, 64Note that :term:`LIC_FILES_CHKSUM` variable is mandatory for all recipes,
65unless the :term:`LICENSE` variable is set to "CLOSED". 65unless the :term:`LICENSE` variable is set to "CLOSED".
diff --git a/documentation/dev-manual/new-recipe.rst b/documentation/dev-manual/new-recipe.rst
index c49881efe6..7b39b9984e 100644
--- a/documentation/dev-manual/new-recipe.rst
+++ b/documentation/dev-manual/new-recipe.rst
@@ -706,7 +706,7 @@ hierarchy to locations that would mirror their locations on the target
706device. The installation process copies files from the 706device. The installation process copies files from the
707``${``\ :term:`S`\ ``}``, 707``${``\ :term:`S`\ ``}``,
708``${``\ :term:`B`\ ``}``, and 708``${``\ :term:`B`\ ``}``, and
709``${``\ :term:`WORKDIR`\ ``}`` 709``${``\ :term:`UNPACKDIR`\ ``}``
710directories to the ``${``\ :term:`D`\ ``}`` 710directories to the ``${``\ :term:`D`\ ``}``
711directory to create the structure as it should appear on the target 711directory to create the structure as it should appear on the target
712system. 712system.
@@ -1145,7 +1145,7 @@ Building an application from a single file that is stored locally (e.g. under
1145``files``) requires a recipe that has the file listed in the :term:`SRC_URI` 1145``files``) requires a recipe that has the file listed in the :term:`SRC_URI`
1146variable. Additionally, you need to manually write the :ref:`ref-tasks-compile` 1146variable. Additionally, you need to manually write the :ref:`ref-tasks-compile`
1147and :ref:`ref-tasks-install` tasks. The :term:`S` variable defines the 1147and :ref:`ref-tasks-install` tasks. The :term:`S` variable defines the
1148directory containing the source code, which is set to :term:`WORKDIR` in this 1148directory containing the source code, which is set to :term:`UNPACKDIR` in this
1149case --- the directory BitBake uses for the build:: 1149case --- the directory BitBake uses for the build::
1150 1150
1151 SUMMARY = "Simple helloworld application" 1151 SUMMARY = "Simple helloworld application"
@@ -1155,7 +1155,7 @@ case --- the directory BitBake uses for the build::
1155 1155
1156 SRC_URI = "file://helloworld.c" 1156 SRC_URI = "file://helloworld.c"
1157 1157
1158 S = "${WORKDIR}" 1158 S = "${UNPACKDIR}"
1159 1159
1160 do_compile() { 1160 do_compile() {
1161 ${CC} ${LDFLAGS} helloworld.c -o helloworld 1161 ${CC} ${LDFLAGS} helloworld.c -o helloworld
@@ -1211,8 +1211,6 @@ In the following example, ``lz4`` is a makefile-based package::
1211 " 1211 "
1212 UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>.*)" 1212 UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>.*)"
1213 1213
1214 S = "${WORKDIR}/git"
1215
1216 CVE_STATUS[CVE-2014-4715] = "fixed-version: Fixed in r118, which is larger than the current version" 1214 CVE_STATUS[CVE-2014-4715] = "fixed-version: Fixed in r118, which is larger than the current version"
1217 1215
1218 EXTRA_OEMAKE = "PREFIX=${prefix} CC='${CC}' CFLAGS='${CFLAGS}' DESTDIR=${D} LIBDIR=${libdir} INCLUDEDIR=${includedir} BUILD_STATIC=no" 1216 EXTRA_OEMAKE = "PREFIX=${prefix} CC='${CC}' CFLAGS='${CFLAGS}' DESTDIR=${D} LIBDIR=${libdir} INCLUDEDIR=${includedir} BUILD_STATIC=no"
@@ -1271,8 +1269,6 @@ is a simple example of an application without dependencies::
1271 SRC_URI = "git://gitlab.com/ipcalc/ipcalc.git;protocol=https;branch=master" 1269 SRC_URI = "git://gitlab.com/ipcalc/ipcalc.git;protocol=https;branch=master"
1272 SRCREV = "4c4261a47f355946ee74013d4f5d0494487cc2d6" 1270 SRCREV = "4c4261a47f355946ee74013d4f5d0494487cc2d6"
1273 1271
1274 S = "${WORKDIR}/git"
1275
1276 inherit meson 1272 inherit meson
1277 1273
1278Applications with dependencies are likely to inherit the 1274Applications with dependencies are likely to inherit the
@@ -1428,7 +1424,7 @@ chapter of the BitBake User Manual.
1428 The following example shows some of the ways you can use variables in 1424 The following example shows some of the ways you can use variables in
1429 recipes:: 1425 recipes::
1430 1426
1431 S = "${WORKDIR}/postfix-${PV}" 1427 S = "${UNPACKDIR}/postfix-${PV}"
1432 CFLAGS += "-DNO_ASM" 1428 CFLAGS += "-DNO_ASM"
1433 CFLAGS:append = " --enable-important-feature" 1429 CFLAGS:append = " --enable-important-feature"
1434 1430
diff --git a/documentation/dev-manual/packages.rst b/documentation/dev-manual/packages.rst
index 8845bf2fab..8bd48c8e8f 100644
--- a/documentation/dev-manual/packages.rst
+++ b/documentation/dev-manual/packages.rst
@@ -1024,7 +1024,7 @@ The ``devtool edit-recipe`` command lets you take a look at the recipe::
1024 npmsw://${THISDIR}/${BPN}/npm-shrinkwrap.json \ 1024 npmsw://${THISDIR}/${BPN}/npm-shrinkwrap.json \
1025 " 1025 "
1026 1026
1027 S = "${WORKDIR}/npm" 1027 S = "${UNPACKDIR}/npm"
1028 1028
1029 inherit npm 1029 inherit npm
1030 1030
diff --git a/documentation/dev-manual/prebuilt-libraries.rst b/documentation/dev-manual/prebuilt-libraries.rst
index a05f39ca1e..d138358eae 100644
--- a/documentation/dev-manual/prebuilt-libraries.rst
+++ b/documentation/dev-manual/prebuilt-libraries.rst
@@ -97,7 +97,7 @@ The complete recipe would look like this::
97 # we use a local link. 97 # we use a local link.
98 SRC_URI = "file://libft4222-linux-${PV}.tgz" 98 SRC_URI = "file://libft4222-linux-${PV}.tgz"
99 99
100 S = "${WORKDIR}" 100 S = "${UNPACKDIR}"
101 101
102 ARCH_DIR:x86-64 = "build-x86_64" 102 ARCH_DIR:x86-64 = "build-x86_64"
103 ARCH_DIR:i586 = "build-i386" 103 ARCH_DIR:i586 = "build-i386"
@@ -204,6 +204,6 @@ versioned library example. The "magic" is setting the :term:`SOLIBS` and
204 204
205 do_install () { 205 do_install () {
206 install -d ${D}${libdir} 206 install -d ${D}${libdir}
207 install -m 0755 ${WORKDIR}/libfoo.so ${D}${libdir} 207 install -m 0755 ${UNPACKDIR}/libfoo.so ${D}${libdir}
208 } 208 }
209 209
diff --git a/documentation/dev-manual/temporary-source-code.rst b/documentation/dev-manual/temporary-source-code.rst
index 08bf68d982..9a7cd0f771 100644
--- a/documentation/dev-manual/temporary-source-code.rst
+++ b/documentation/dev-manual/temporary-source-code.rst
@@ -18,11 +18,10 @@ build packages is available in the :term:`Build Directory` as defined by the
18defined in the ``meta/conf/bitbake.conf`` configuration file in the 18defined in the ``meta/conf/bitbake.conf`` configuration file in the
19:term:`Source Directory`:: 19:term:`Source Directory`::
20 20
21 S = "${WORKDIR}/${BP}" 21 S = "${UNPACKDIR}/${BP}"
22 22
23You should be aware that many recipes override the 23You should be aware that many recipes override the
24:term:`S` variable. For example, recipes that fetch their source from Git 24:term:`S` variable when the default isn't accurate.
25usually set :term:`S` to ``${WORKDIR}/git``.
26 25
27.. note:: 26.. note::
28 27
@@ -31,8 +30,16 @@ usually set :term:`S` to ``${WORKDIR}/git``.
31 30
32 BP = "${BPN}-${PV}" 31 BP = "${BPN}-${PV}"
33 32
33 This matches the location that the git fetcher unpacks to, and usually
34 matches unpacked content of release tarballs (e.g. they contain a single
35 directory which matches value of ${BP} exactly).
34 36
35The path to the work directory for the recipe 37The path to the unpack directory for the recipe
38(:term:`UNPACKDIR`) is defined as follows::
39
40 ${WORKDIR}/sources
41
42In turn, the path to the work directory for the recipe
36(:term:`WORKDIR`) is defined as 43(:term:`WORKDIR`) is defined as
37follows:: 44follows::
38 45