diff options
Diffstat (limited to 'documentation/dev-manual')
-rw-r--r-- | documentation/dev-manual/building.rst | 8 | ||||
-rw-r--r-- | documentation/dev-manual/debugging.rst | 4 | ||||
-rw-r--r-- | documentation/dev-manual/disk-space.rst | 2 | ||||
-rw-r--r-- | documentation/dev-manual/efficiently-fetching-sources.rst | 4 | ||||
-rw-r--r-- | documentation/dev-manual/init-manager.rst | 2 | ||||
-rw-r--r-- | documentation/dev-manual/layers.rst | 20 | ||||
-rw-r--r-- | documentation/dev-manual/libraries.rst | 32 | ||||
-rw-r--r-- | documentation/dev-manual/licenses.rst | 4 | ||||
-rw-r--r-- | documentation/dev-manual/new-recipe.rst | 55 | ||||
-rw-r--r-- | documentation/dev-manual/packages.rst | 2 | ||||
-rw-r--r-- | documentation/dev-manual/prebuilt-libraries.rst | 6 | ||||
-rw-r--r-- | documentation/dev-manual/sbom.rst | 3 | ||||
-rw-r--r-- | documentation/dev-manual/start.rst | 18 | ||||
-rw-r--r-- | documentation/dev-manual/temporary-source-code.rst | 15 | ||||
-rw-r--r-- | documentation/dev-manual/vulnerabilities.rst | 2 |
15 files changed, 86 insertions, 91 deletions
diff --git a/documentation/dev-manual/building.rst b/documentation/dev-manual/building.rst index 807c665f68..32c7aa5da0 100644 --- a/documentation/dev-manual/building.rst +++ b/documentation/dev-manual/building.rst | |||
@@ -48,7 +48,7 @@ The following figure and list overviews the build process: | |||
48 | :width: 100% | 48 | :width: 100% |
49 | 49 | ||
50 | #. *Set up Your Host Development System to Support Development Using the | 50 | #. *Set up Your Host Development System to Support Development Using the |
51 | Yocto Project*: See the ":doc:`start`" section for options on how to get a | 51 | Yocto Project*: See the ":doc:`/dev-manual/start`" section for options on how to get a |
52 | build host ready to use the Yocto Project. | 52 | build host ready to use the Yocto Project. |
53 | 53 | ||
54 | #. *Initialize the Build Environment:* Initialize the build environment | 54 | #. *Initialize the Build Environment:* Initialize the build environment |
@@ -113,7 +113,7 @@ The following figure and list overviews the build process: | |||
113 | Building Images for Multiple Targets Using Multiple Configurations | 113 | Building Images for Multiple Targets Using Multiple Configurations |
114 | ================================================================== | 114 | ================================================================== |
115 | 115 | ||
116 | See the :doc:`multiconfig` section of the Yocto Project Development Tasks | 116 | See the :doc:`/dev-manual/multiconfig` section of the Yocto Project Development Tasks |
117 | Manual. | 117 | Manual. |
118 | 118 | ||
119 | Building an Initial RAM Filesystem (Initramfs) Image | 119 | Building an Initial RAM Filesystem (Initramfs) Image |
@@ -591,7 +591,7 @@ If build speed and package feed maintenance are considerations, you | |||
591 | should consider the points in this section that can help you optimize | 591 | should consider the points in this section that can help you optimize |
592 | your tunings to best consider build times and package feed maintenance. | 592 | your tunings to best consider build times and package feed maintenance. |
593 | 593 | ||
594 | - *Share the :term:`Build Directory`:* If at all possible, share the | 594 | - *Share the* :term:`Build Directory` *:* If at all possible, share the |
595 | :term:`TMPDIR` across builds. The Yocto Project supports switching between | 595 | :term:`TMPDIR` across builds. The Yocto Project supports switching between |
596 | different :term:`MACHINE` values in the same :term:`TMPDIR`. This practice | 596 | different :term:`MACHINE` values in the same :term:`TMPDIR`. This practice |
597 | is well supported and regularly used by developers when building for | 597 | is well supported and regularly used by developers when building for |
@@ -813,7 +813,7 @@ directory: | |||
813 | 813 | ||
814 | #. *Using Local Files Only:* Inside your ``local.conf`` file, add the | 814 | #. *Using Local Files Only:* Inside your ``local.conf`` file, add the |
815 | :term:`SOURCE_MIRROR_URL` variable, inherit the | 815 | :term:`SOURCE_MIRROR_URL` variable, inherit the |
816 | :ref:`ref-classes-own-mirrors` class, and use the | 816 | :ref:`ref-classes-own-mirrors` class, and add the |
817 | :term:`BB_NO_NETWORK` variable to your ``local.conf``:: | 817 | :term:`BB_NO_NETWORK` variable to your ``local.conf``:: |
818 | 818 | ||
819 | SOURCE_MIRROR_URL ?= "file:///home/your-download-dir/" | 819 | SOURCE_MIRROR_URL ?= "file:///home/your-download-dir/" |
diff --git a/documentation/dev-manual/debugging.rst b/documentation/dev-manual/debugging.rst index 8552b26aea..6c45ccf652 100644 --- a/documentation/dev-manual/debugging.rst +++ b/documentation/dev-manual/debugging.rst | |||
@@ -890,7 +890,7 @@ The build should work without issue. | |||
890 | As with all solved problems, if they originated upstream, you need to | 890 | As with all solved problems, if they originated upstream, you need to |
891 | submit the fix for the recipe in OE-Core and upstream so that the | 891 | submit the fix for the recipe in OE-Core and upstream so that the |
892 | problem is taken care of at its source. See the | 892 | problem is taken care of at its source. See the |
893 | ":doc:`../contributor-guide/submit-changes`" section for more information. | 893 | ":doc:`/contributor-guide/submit-changes`" section for more information. |
894 | 894 | ||
895 | Debugging With the GNU Project Debugger (GDB) Remotely | 895 | Debugging With the GNU Project Debugger (GDB) Remotely |
896 | ====================================================== | 896 | ====================================================== |
@@ -1261,7 +1261,7 @@ Here are some other tips that you might find useful: | |||
1261 | :yocto_bugs:`Bugzilla <>`. For information on | 1261 | :yocto_bugs:`Bugzilla <>`. For information on |
1262 | how to submit a bug against the Yocto Project, see the Yocto Project | 1262 | how to submit a bug against the Yocto Project, see the Yocto Project |
1263 | Bugzilla :yocto_wiki:`wiki page </Bugzilla_Configuration_and_Bug_Tracking>` | 1263 | Bugzilla :yocto_wiki:`wiki page </Bugzilla_Configuration_and_Bug_Tracking>` |
1264 | and the ":doc:`../contributor-guide/report-defect`" section. | 1264 | and the ":doc:`/contributor-guide/report-defect`" section. |
1265 | 1265 | ||
1266 | .. note:: | 1266 | .. note:: |
1267 | 1267 | ||
diff --git a/documentation/dev-manual/disk-space.rst b/documentation/dev-manual/disk-space.rst index efca82601d..ba3afa5a2c 100644 --- a/documentation/dev-manual/disk-space.rst +++ b/documentation/dev-manual/disk-space.rst | |||
@@ -52,7 +52,7 @@ such as BSD based NAS:: | |||
52 | sstate-cache-management.py --remove-duplicated --cache-dir=sstate-cache | 52 | sstate-cache-management.py --remove-duplicated --cache-dir=sstate-cache |
53 | 53 | ||
54 | This command will ask you to confirm the deletions it identifies. | 54 | This command will ask you to confirm the deletions it identifies. |
55 | Run ``sstate-cache-management.sh`` for more details about this script. | 55 | Run ``sstate-cache-management.py`` for more details about this script. |
56 | 56 | ||
57 | .. note:: | 57 | .. note:: |
58 | 58 | ||
diff --git a/documentation/dev-manual/efficiently-fetching-sources.rst b/documentation/dev-manual/efficiently-fetching-sources.rst index a15f0a92ce..a3366226c0 100644 --- a/documentation/dev-manual/efficiently-fetching-sources.rst +++ b/documentation/dev-manual/efficiently-fetching-sources.rst | |||
@@ -6,7 +6,7 @@ Efficiently Fetching Source Files During a Build | |||
6 | The OpenEmbedded build system works with source files located through | 6 | The OpenEmbedded build system works with source files located through |
7 | the :term:`SRC_URI` variable. When | 7 | the :term:`SRC_URI` variable. When |
8 | you build something using BitBake, a big part of the operation is | 8 | you build something using BitBake, a big part of the operation is |
9 | locating and downloading all the source tarballs. For images, | 9 | locating and downloading all of the source code. For images, |
10 | downloading all the source for various packages can take a significant | 10 | downloading all the source for various packages can take a significant |
11 | amount of time. | 11 | amount of time. |
12 | 12 | ||
@@ -18,7 +18,7 @@ Setting up Effective Mirrors | |||
18 | ============================ | 18 | ============================ |
19 | 19 | ||
20 | A good deal that goes into a Yocto Project build is simply downloading | 20 | A good deal that goes into a Yocto Project build is simply downloading |
21 | all of the source tarballs. Maybe you have been working with another | 21 | source code. Maybe you have been working with another |
22 | build system for which you have built up a | 22 | build system for which you have built up a |
23 | sizable directory of source tarballs. Or, perhaps someone else has such | 23 | sizable directory of source tarballs. Or, perhaps someone else has such |
24 | a directory for which you have read access. If so, you can save time by | 24 | a directory for which you have read access. If so, you can save time by |
diff --git a/documentation/dev-manual/init-manager.rst b/documentation/dev-manual/init-manager.rst index ddce82b81f..d0fdfdf773 100644 --- a/documentation/dev-manual/init-manager.rst +++ b/documentation/dev-manual/init-manager.rst | |||
@@ -44,7 +44,7 @@ therefore increasing the total system boot time. systemd also substantially | |||
44 | increases system size because of its multiple components and the extra | 44 | increases system size because of its multiple components and the extra |
45 | dependencies it pulls. | 45 | dependencies it pulls. |
46 | 46 | ||
47 | On the contrary, BusyBox init is the simplest and the lightest solution and | 47 | By contrast, BusyBox init is the simplest and the lightest solution and |
48 | also comes with BusyBox mdev as device manager, a lighter replacement to | 48 | also comes with BusyBox mdev as device manager, a lighter replacement to |
49 | :wikipedia:`udev <Udev>`, which SysVinit and systemd both use. | 49 | :wikipedia:`udev <Udev>`, which SysVinit and systemd both use. |
50 | 50 | ||
diff --git a/documentation/dev-manual/layers.rst b/documentation/dev-manual/layers.rst index c649e2bd60..67482bf544 100644 --- a/documentation/dev-manual/layers.rst +++ b/documentation/dev-manual/layers.rst | |||
@@ -80,7 +80,7 @@ Follow these general steps to create your layer without using tools: | |||
80 | BBFILE_PATTERN_yoctobsp = "^${LAYERDIR}/" | 80 | BBFILE_PATTERN_yoctobsp = "^${LAYERDIR}/" |
81 | BBFILE_PRIORITY_yoctobsp = "5" | 81 | BBFILE_PRIORITY_yoctobsp = "5" |
82 | LAYERVERSION_yoctobsp = "4" | 82 | LAYERVERSION_yoctobsp = "4" |
83 | LAYERSERIES_COMPAT_yoctobsp = "dunfell" | 83 | LAYERSERIES_COMPAT_yoctobsp = "walnascar" |
84 | 84 | ||
85 | Here is an explanation of the layer configuration file: | 85 | Here is an explanation of the layer configuration file: |
86 | 86 | ||
@@ -306,7 +306,7 @@ The Yocto Project Compatibility Program consists of a layer application | |||
306 | process that requests permission to use the Yocto Project Compatibility | 306 | process that requests permission to use the Yocto Project Compatibility |
307 | Logo for your layer and application. The process consists of two parts: | 307 | Logo for your layer and application. The process consists of two parts: |
308 | 308 | ||
309 | #. Successfully passing a script (``yocto-check-layer``) that when run | 309 | #. Successfully passing a script (``yocto-check-layer``) that, when run |
310 | against your layer, tests it against constraints based on experiences | 310 | against your layer, tests it against constraints based on experiences |
311 | of how layers have worked in the real world and where pitfalls have | 311 | of how layers have worked in the real world and where pitfalls have |
312 | been found. Getting a "PASS" result from the script is required for | 312 | been found. Getting a "PASS" result from the script is required for |
@@ -478,7 +478,7 @@ name. To handle these errors, the best practice is to rename the ``.bbappend`` | |||
478 | to match the original recipe version. This also gives you the opportunity to see | 478 | to match the original recipe version. This also gives you the opportunity to see |
479 | if the ``.bbappend`` is still relevant for the new version of the recipe. | 479 | if the ``.bbappend`` is still relevant for the new version of the recipe. |
480 | 480 | ||
481 | Another method it to use the character ``%`` in the ``.bbappend`` filename. For | 481 | Another method is to use the character ``%`` in the ``.bbappend`` filename. For |
482 | example, to append information to every ``6.*`` minor versions of the recipe | 482 | example, to append information to every ``6.*`` minor versions of the recipe |
483 | ``someapp``, the ``someapp_6.%.bbappend`` file can be created. This way, an | 483 | ``someapp``, the ``someapp_6.%.bbappend`` file can be created. This way, an |
484 | error will only be triggered if the ``someapp`` recipe has a major version | 484 | error will only be triggered if the ``someapp`` recipe has a major version |
@@ -504,10 +504,9 @@ the "meta" layer at ``meta/recipes-bsp/formfactor``:: | |||
504 | SECTION = "base" | 504 | SECTION = "base" |
505 | LICENSE = "MIT" | 505 | LICENSE = "MIT" |
506 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | 506 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" |
507 | PR = "r45" | ||
508 | 507 | ||
509 | SRC_URI = "file://config file://machconfig" | 508 | SRC_URI = "file://config file://machconfig" |
510 | S = "${WORKDIR}" | 509 | S = "${UNPACKDIR}" |
511 | 510 | ||
512 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 511 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
513 | INHIBIT_DEFAULT_DEPS = "1" | 512 | INHIBIT_DEFAULT_DEPS = "1" |
@@ -582,11 +581,10 @@ Directory`. Here is the main ``xserver-xf86-config`` recipe, which is named | |||
582 | SECTION = "x11/base" | 581 | SECTION = "x11/base" |
583 | LICENSE = "MIT" | 582 | LICENSE = "MIT" |
584 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | 583 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" |
585 | PR = "r33" | ||
586 | 584 | ||
587 | SRC_URI = "file://xorg.conf" | 585 | SRC_URI = "file://xorg.conf" |
588 | 586 | ||
589 | S = "${WORKDIR}" | 587 | S = "${UNPACKDIR}" |
590 | 588 | ||
591 | CONFFILES:${PN} = "${sysconfdir}/X11/xorg.conf" | 589 | CONFFILES:${PN} = "${sysconfdir}/X11/xorg.conf" |
592 | 590 | ||
@@ -594,9 +592,9 @@ Directory`. Here is the main ``xserver-xf86-config`` recipe, which is named | |||
594 | ALLOW_EMPTY:${PN} = "1" | 592 | ALLOW_EMPTY:${PN} = "1" |
595 | 593 | ||
596 | do_install () { | 594 | do_install () { |
597 | if test -s ${WORKDIR}/xorg.conf; then | 595 | if test -s ${UNPACKDIR}/xorg.conf; then |
598 | install -d ${D}/${sysconfdir}/X11 | 596 | install -d ${D}/${sysconfdir}/X11 |
599 | install -m 0644 ${WORKDIR}/xorg.conf ${D}/${sysconfdir}/X11/ | 597 | install -m 0644 ${UNPACKDIR}/xorg.conf ${D}/${sysconfdir}/X11/ |
600 | fi | 598 | fi |
601 | } | 599 | } |
602 | 600 | ||
@@ -614,8 +612,8 @@ file is in the layer at ``recipes-graphics/xorg-xserver``:: | |||
614 | PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}" | 612 | PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}" |
615 | if [ "${PITFT}" = "1" ]; then | 613 | if [ "${PITFT}" = "1" ]; then |
616 | install -d ${D}/${sysconfdir}/X11/xorg.conf.d/ | 614 | 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/ | 615 | 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/ | 616 | install -m 0644 ${UNPACKDIR}/xorg.conf.d/99-calibration.conf ${D}/${sysconfdir}/X11/xorg.conf.d/ |
619 | fi | 617 | fi |
620 | } | 618 | } |
621 | 619 | ||
diff --git a/documentation/dev-manual/libraries.rst b/documentation/dev-manual/libraries.rst index 521dbb9a7c..a8c38128ea 100644 --- a/documentation/dev-manual/libraries.rst +++ b/documentation/dev-manual/libraries.rst | |||
@@ -37,40 +37,10 @@ library files. | |||
37 | Some previously released versions of the Yocto Project defined the | 37 | Some previously released versions of the Yocto Project defined the |
38 | static library files through ``${PN}-dev``. | 38 | static library files through ``${PN}-dev``. |
39 | 39 | ||
40 | Here is the part of the BitBake configuration file, where you can see | 40 | Here is a small part of the BitBake configuration file, where you can see |
41 | how the static library files are defined:: | 41 | how the static library files are defined:: |
42 | 42 | ||
43 | PACKAGE_BEFORE_PN ?= "" | ||
44 | PACKAGES = "${PN}-src ${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}" | 43 | PACKAGES = "${PN}-src ${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}" |
45 | PACKAGES_DYNAMIC = "^${PN}-locale-.*" | ||
46 | FILES = "" | ||
47 | |||
48 | FILES:${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*${SOLIBS} \ | ||
49 | ${sysconfdir} ${sharedstatedir} ${localstatedir} \ | ||
50 | ${base_bindir}/* ${base_sbindir}/* \ | ||
51 | ${base_libdir}/*${SOLIBS} \ | ||
52 | ${base_prefix}/lib/udev ${prefix}/lib/udev \ | ||
53 | ${base_libdir}/udev ${libdir}/udev \ | ||
54 | ${datadir}/${BPN} ${libdir}/${BPN}/* \ | ||
55 | ${datadir}/pixmaps ${datadir}/applications \ | ||
56 | ${datadir}/idl ${datadir}/omf ${datadir}/sounds \ | ||
57 | ${libdir}/bonobo/servers" | ||
58 | |||
59 | FILES:${PN}-bin = "${bindir}/* ${sbindir}/*" | ||
60 | |||
61 | FILES:${PN}-doc = "${docdir} ${mandir} ${infodir} ${datadir}/gtk-doc \ | ||
62 | ${datadir}/gnome/help" | ||
63 | SECTION:${PN}-doc = "doc" | ||
64 | |||
65 | FILES_SOLIBSDEV ?= "${base_libdir}/lib*${SOLIBSDEV} ${libdir}/lib*${SOLIBSDEV}" | ||
66 | FILES:${PN}-dev = "${includedir} ${FILES_SOLIBSDEV} ${libdir}/*.la \ | ||
67 | ${libdir}/*.o ${libdir}/pkgconfig ${datadir}/pkgconfig \ | ||
68 | ${datadir}/aclocal ${base_libdir}/*.o \ | ||
69 | ${libdir}/${BPN}/*.la ${base_libdir}/*.la \ | ||
70 | ${libdir}/cmake ${datadir}/cmake" | ||
71 | SECTION:${PN}-dev = "devel" | ||
72 | ALLOW_EMPTY:${PN}-dev = "1" | ||
73 | RDEPENDS:${PN}-dev = "${PN} (= ${EXTENDPKGV})" | ||
74 | 44 | ||
75 | FILES:${PN}-staticdev = "${libdir}/*.a ${base_libdir}/*.a ${libdir}/${BPN}/*.a" | 45 | FILES:${PN}-staticdev = "${libdir}/*.a ${base_libdir}/*.a ${libdir}/${BPN}/*.a" |
76 | SECTION:${PN}-staticdev = "devel" | 46 | SECTION:${PN}-staticdev = "devel" |
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 | ||
60 | The first line locates a file in ``${S}/src/ls.c`` and isolates lines | 60 | The first line locates a file in ``${S}/src/ls.c`` and isolates lines |
61 | five through 16 as license text. The second line refers to a file in | 61 | five through 16 as license text. The second line refers to a file in |
62 | :term:`WORKDIR`. | 62 | :term:`UNPACKDIR`. |
63 | 63 | ||
64 | Note that :term:`LIC_FILES_CHKSUM` variable is mandatory for all recipes, | 64 | Note that :term:`LIC_FILES_CHKSUM` variable is mandatory for all recipes, |
65 | unless the :term:`LICENSE` variable is set to "CLOSED". | 65 | unless 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 9792bd4c1f..832aa300e1 100644 --- a/documentation/dev-manual/new-recipe.rst +++ b/documentation/dev-manual/new-recipe.rst | |||
@@ -188,13 +188,14 @@ the recipe. | |||
188 | Use lower-cased characters and do not include the reserved suffixes | 188 | Use lower-cased characters and do not include the reserved suffixes |
189 | ``-native``, ``-cross``, ``-initial``, or ``-dev`` casually (i.e. do not use | 189 | ``-native``, ``-cross``, ``-initial``, or ``-dev`` casually (i.e. do not use |
190 | them as part of your recipe name unless the string applies). Here are some | 190 | them as part of your recipe name unless the string applies). Here are some |
191 | examples: | 191 | examples (which includes the use of the string "git" as a special case of a |
192 | version identifier): | ||
192 | 193 | ||
193 | .. code-block:: none | 194 | .. code-block:: none |
194 | 195 | ||
195 | cups_1.7.0.bb | 196 | cups_2.4.12.bb |
196 | gawk_4.0.2.bb | 197 | gawk_5.3.2.bb |
197 | irssi_0.8.16-rc1.bb | 198 | psplash_git.bb |
198 | 199 | ||
199 | Running a Build on the Recipe | 200 | Running a Build on the Recipe |
200 | ============================= | 201 | ============================= |
@@ -276,11 +277,11 @@ upgrading the recipe to a future version is as simple as renaming the | |||
276 | recipe to match the new version. | 277 | recipe to match the new version. |
277 | 278 | ||
278 | Here is a simple example from the | 279 | Here is a simple example from the |
279 | ``meta/recipes-devtools/strace/strace_5.5.bb`` recipe where the source | 280 | :oe_git:`strace recipe </openembedded-core/tree/meta/recipes-devtools/strace>` |
280 | comes from a single tarball. Notice the use of the | 281 | where the source comes from a single tarball. Notice the use of the |
281 | :term:`PV` variable:: | 282 | :term:`PV` variable:: |
282 | 283 | ||
283 | SRC_URI = "https://strace.io/files/${PV}/strace-${PV}.tar.xz \ | 284 | SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/strace-${PV}.tar.xz \ |
284 | 285 | ||
285 | Files mentioned in :term:`SRC_URI` whose names end in a typical archive | 286 | Files mentioned in :term:`SRC_URI` whose names end in a typical archive |
286 | extension (e.g. ``.tar``, ``.tar.gz``, ``.tar.bz2``, ``.zip``, and so | 287 | extension (e.g. ``.tar``, ``.tar.gz``, ``.tar.bz2``, ``.zip``, and so |
@@ -292,7 +293,7 @@ another example that specifies these types of files, see the | |||
292 | Another way of specifying source is from an SCM. For Git repositories, | 293 | Another way of specifying source is from an SCM. For Git repositories, |
293 | you must specify :term:`SRCREV` and you should specify :term:`PV` to include | 294 | you must specify :term:`SRCREV` and you should specify :term:`PV` to include |
294 | a ``+`` sign in its definition. Here is an example from the recipe | 295 | a ``+`` sign in its definition. Here is an example from the recipe |
295 | :oe_git:`meta/recipes-sato/l3afpad/l3afpad_git.bb </openembedded-core/tree/meta/recipes-sato/l3afpad/l3afpad_git.bb>`:: | 296 | :oe_git:`l3afpad_git.bb </openembedded-core/tree/meta/recipes-sato/l3afpad/l3afpad_git.bb>`:: |
296 | 297 | ||
297 | SRC_URI = "git://github.com/stevenhoneyman/l3afpad.git;branch=master;protocol=https" | 298 | SRC_URI = "git://github.com/stevenhoneyman/l3afpad.git;branch=master;protocol=https" |
298 | 299 | ||
@@ -347,8 +348,8 @@ paste them into your recipe and then run the build again to continue. | |||
347 | continuing with the build. | 348 | continuing with the build. |
348 | 349 | ||
349 | This final example is a bit more complicated and is from the | 350 | This final example is a bit more complicated and is from the |
350 | ``meta/recipes-sato/rxvt-unicode/rxvt-unicode_9.20.bb`` recipe. The | 351 | :oe_git:`rxvt-unicode </openembedded-core/tree/meta/recipes-sato/rxvt-unicode>` |
351 | example's :term:`SRC_URI` statement identifies multiple files as the source | 352 | recipe. The example's :term:`SRC_URI` statement identifies multiple files as the source |
352 | files for the recipe: a tarball, a patch file, a desktop file, and an icon:: | 353 | files for the recipe: a tarball, a patch file, a desktop file, and an icon:: |
353 | 354 | ||
354 | SRC_URI = "http://dist.schmorp.de/rxvt-unicode/Attic/rxvt-unicode-${PV}.tar.bz2 \ | 355 | SRC_URI = "http://dist.schmorp.de/rxvt-unicode/Attic/rxvt-unicode-${PV}.tar.bz2 \ |
@@ -706,7 +707,7 @@ hierarchy to locations that would mirror their locations on the target | |||
706 | device. The installation process copies files from the | 707 | device. The installation process copies files from the |
707 | ``${``\ :term:`S`\ ``}``, | 708 | ``${``\ :term:`S`\ ``}``, |
708 | ``${``\ :term:`B`\ ``}``, and | 709 | ``${``\ :term:`B`\ ``}``, and |
709 | ``${``\ :term:`WORKDIR`\ ``}`` | 710 | ``${``\ :term:`UNPACKDIR`\ ``}`` |
710 | directories to the ``${``\ :term:`D`\ ``}`` | 711 | directories to the ``${``\ :term:`D`\ ``}`` |
711 | directory to create the structure as it should appear on the target | 712 | directory to create the structure as it should appear on the target |
712 | system. | 713 | system. |
@@ -1145,7 +1146,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` | 1146 | ``files``) requires a recipe that has the file listed in the :term:`SRC_URI` |
1146 | variable. Additionally, you need to manually write the :ref:`ref-tasks-compile` | 1147 | variable. Additionally, you need to manually write the :ref:`ref-tasks-compile` |
1147 | and :ref:`ref-tasks-install` tasks. The :term:`S` variable defines the | 1148 | and :ref:`ref-tasks-install` tasks. The :term:`S` variable defines the |
1148 | directory containing the source code, which is set to :term:`WORKDIR` in this | 1149 | directory containing the source code, which is set to :term:`UNPACKDIR` in this |
1149 | case --- the directory BitBake uses for the build:: | 1150 | case --- the directory BitBake uses for the build:: |
1150 | 1151 | ||
1151 | SUMMARY = "Simple helloworld application" | 1152 | SUMMARY = "Simple helloworld application" |
@@ -1155,7 +1156,7 @@ case --- the directory BitBake uses for the build:: | |||
1155 | 1156 | ||
1156 | SRC_URI = "file://helloworld.c" | 1157 | SRC_URI = "file://helloworld.c" |
1157 | 1158 | ||
1158 | S = "${WORKDIR}" | 1159 | S = "${UNPACKDIR}" |
1159 | 1160 | ||
1160 | do_compile() { | 1161 | do_compile() { |
1161 | ${CC} ${LDFLAGS} helloworld.c -o helloworld | 1162 | ${CC} ${LDFLAGS} helloworld.c -o helloworld |
@@ -1211,8 +1212,6 @@ In the following example, ``lz4`` is a makefile-based package:: | |||
1211 | " | 1212 | " |
1212 | UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>.*)" | 1213 | UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>.*)" |
1213 | 1214 | ||
1214 | S = "${WORKDIR}/git" | ||
1215 | |||
1216 | CVE_STATUS[CVE-2014-4715] = "fixed-version: Fixed in r118, which is larger than the current version" | 1215 | CVE_STATUS[CVE-2014-4715] = "fixed-version: Fixed in r118, which is larger than the current version" |
1217 | 1216 | ||
1218 | EXTRA_OEMAKE = "PREFIX=${prefix} CC='${CC}' CFLAGS='${CFLAGS}' DESTDIR=${D} LIBDIR=${libdir} INCLUDEDIR=${includedir} BUILD_STATIC=no" | 1217 | EXTRA_OEMAKE = "PREFIX=${prefix} CC='${CC}' CFLAGS='${CFLAGS}' DESTDIR=${D} LIBDIR=${libdir} INCLUDEDIR=${includedir} BUILD_STATIC=no" |
@@ -1271,8 +1270,6 @@ is a simple example of an application without dependencies:: | |||
1271 | SRC_URI = "git://gitlab.com/ipcalc/ipcalc.git;protocol=https;branch=master" | 1270 | SRC_URI = "git://gitlab.com/ipcalc/ipcalc.git;protocol=https;branch=master" |
1272 | SRCREV = "4c4261a47f355946ee74013d4f5d0494487cc2d6" | 1271 | SRCREV = "4c4261a47f355946ee74013d4f5d0494487cc2d6" |
1273 | 1272 | ||
1274 | S = "${WORKDIR}/git" | ||
1275 | |||
1276 | inherit meson | 1273 | inherit meson |
1277 | 1274 | ||
1278 | Applications with dependencies are likely to inherit the | 1275 | Applications with dependencies are likely to inherit the |
@@ -1397,11 +1394,31 @@ doing the following: | |||
1397 | where you have installed them and whether those files are in | 1394 | where you have installed them and whether those files are in |
1398 | different locations than the defaults. | 1395 | different locations than the defaults. |
1399 | 1396 | ||
1397 | As a basic example of a :ref:`ref-classes-bin-package`-style recipe, consider | ||
1398 | this snippet from the | ||
1399 | :oe_git:`wireless-regdb </openembedded-core/tree/meta/recipes-kernel/wireless-regdb>` | ||
1400 | recipe file, which fetches a single tarball of binary content and manually | ||
1401 | installs with no need for any configuration or compilation:: | ||
1402 | |||
1403 | SRC_URI = "https://www.kernel.org/pub/software/network/${BPN}/${BP}.tar.xz" | ||
1404 | SRC_URI[sha256sum] = "57f8e7721cf5a880c13ae0c202edbb21092a060d45f9e9c59bcd2a8272bfa456" | ||
1405 | |||
1406 | inherit bin_package allarch | ||
1407 | |||
1408 | do_install() { | ||
1409 | install -d -m0755 ${D}${nonarch_libdir}/crda | ||
1410 | install -d -m0755 ${D}${sysconfdir}/wireless-regdb/pubkeys | ||
1411 | install -m 0644 regulatory.bin ${D}${nonarch_libdir}/crda/regulatory.bin | ||
1412 | install -m 0644 wens.key.pub.pem ${D}${sysconfdir}/wireless-regdb/pubkeys/wens.key.pub.pem | ||
1413 | install -m 0644 -D regulatory.db ${D}${nonarch_base_libdir}/firmware/regulatory.db | ||
1414 | install -m 0644 regulatory.db.p7s ${D}${nonarch_base_libdir}/firmware/regulatory.db.p7s | ||
1415 | } | ||
1416 | |||
1400 | Following Recipe Style Guidelines | 1417 | Following Recipe Style Guidelines |
1401 | ================================= | 1418 | ================================= |
1402 | 1419 | ||
1403 | When writing recipes, it is good to conform to existing style guidelines. | 1420 | When writing recipes, it is good to conform to existing style guidelines. |
1404 | See the ":doc:`../contributor-guide/recipe-style-guide`" in the Yocto Project | 1421 | See the ":doc:`/contributor-guide/recipe-style-guide`" in the Yocto Project |
1405 | and OpenEmbedded Contributor Guide for reference. | 1422 | and OpenEmbedded Contributor Guide for reference. |
1406 | 1423 | ||
1407 | It is common for existing recipes to deviate a bit from this style. | 1424 | It is common for existing recipes to deviate a bit from this style. |
@@ -1428,7 +1445,7 @@ chapter of the BitBake User Manual. | |||
1428 | The following example shows some of the ways you can use variables in | 1445 | The following example shows some of the ways you can use variables in |
1429 | recipes:: | 1446 | recipes:: |
1430 | 1447 | ||
1431 | S = "${WORKDIR}/postfix-${PV}" | 1448 | S = "${UNPACKDIR}/postfix-${PV}" |
1432 | CFLAGS += "-DNO_ASM" | 1449 | CFLAGS += "-DNO_ASM" |
1433 | CFLAGS:append = " --enable-important-feature" | 1450 | CFLAGS:append = " --enable-important-feature" |
1434 | 1451 | ||
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..59621ca16d 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" |
@@ -170,7 +170,7 @@ as follows:: | |||
170 | The modifications cause the ``.so`` file to be the real library | 170 | The modifications cause the ``.so`` file to be the real library |
171 | and unset :term:`FILES_SOLIBSDEV` so that no libraries get packaged into | 171 | and unset :term:`FILES_SOLIBSDEV` so that no libraries get packaged into |
172 | ``${PN}-dev``. The changes are required because unless :term:`PACKAGES` is changed, | 172 | ``${PN}-dev``. The changes are required because unless :term:`PACKAGES` is changed, |
173 | ``${PN}-dev`` collects files before `${PN}`. ``${PN}-dev`` must not collect any of | 173 | ``${PN}-dev`` collects files before ``${PN}``. ``${PN}-dev`` must not collect any of |
174 | the files you want in ``${PN}``. | 174 | the files you want in ``${PN}``. |
175 | 175 | ||
176 | Finally, loadable modules, essentially unversioned libraries that are linked | 176 | Finally, loadable modules, essentially unversioned libraries that are linked |
@@ -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/sbom.rst b/documentation/dev-manual/sbom.rst index e6806ce929..ca0fc8b9d6 100644 --- a/documentation/dev-manual/sbom.rst +++ b/documentation/dev-manual/sbom.rst | |||
@@ -60,6 +60,9 @@ more information in the output :term:`SPDX` data: | |||
60 | - Add a description of the source files used to generate host tools and target | 60 | - Add a description of the source files used to generate host tools and target |
61 | packages (:term:`SPDX_INCLUDE_SOURCES`) | 61 | packages (:term:`SPDX_INCLUDE_SOURCES`) |
62 | 62 | ||
63 | - Add a description of the **compiled** source files used to generate host tools | ||
64 | and target packages (:term:`SPDX_INCLUDE_COMPILED_SOURCES`) | ||
65 | |||
63 | - Add archives of these source files themselves (:term:`SPDX_ARCHIVE_SOURCES`). | 66 | - Add archives of these source files themselves (:term:`SPDX_ARCHIVE_SOURCES`). |
64 | 67 | ||
65 | Though the toplevel :term:`SPDX` output is available in | 68 | Though the toplevel :term:`SPDX` output is available in |
diff --git a/documentation/dev-manual/start.rst b/documentation/dev-manual/start.rst index 73548132a3..44bd2de137 100644 --- a/documentation/dev-manual/start.rst +++ b/documentation/dev-manual/start.rst | |||
@@ -109,7 +109,7 @@ particular working environment and set of practices. | |||
109 | 109 | ||
110 | - Keep your cross-development toolchains updated. You can do this | 110 | - Keep your cross-development toolchains updated. You can do this |
111 | through provisioning either as new toolchain downloads or as | 111 | through provisioning either as new toolchain downloads or as |
112 | updates through a package update mechanism using ``opkg`` to | 112 | updates through a package update mechanism to |
113 | provide updates to an existing toolchain. The exact mechanics of | 113 | provide updates to an existing toolchain. The exact mechanics of |
114 | how and when to do this depend on local policy. | 114 | how and when to do this depend on local policy. |
115 | 115 | ||
@@ -159,7 +159,7 @@ particular working environment and set of practices. | |||
159 | are made. | 159 | are made. |
160 | 160 | ||
161 | - Allows triggering of automated image booting and testing under | 161 | - Allows triggering of automated image booting and testing under |
162 | the QuickEMUlator (QEMU). | 162 | the Quick EMUlator (QEMU). |
163 | 163 | ||
164 | - Supports incremental build testing and from-scratch builds. | 164 | - Supports incremental build testing and from-scratch builds. |
165 | 165 | ||
@@ -234,7 +234,7 @@ particular working environment and set of practices. | |||
234 | - The Yocto Project community encourages you to send patches to the | 234 | - The Yocto Project community encourages you to send patches to the |
235 | project to fix bugs or add features. If you do submit patches, | 235 | project to fix bugs or add features. If you do submit patches, |
236 | follow the project commit guidelines for writing good commit | 236 | follow the project commit guidelines for writing good commit |
237 | messages. See the ":doc:`../contributor-guide/submit-changes`" | 237 | messages. See the ":doc:`/contributor-guide/submit-changes`" |
238 | section in the Yocto Project and OpenEmbedded Contributor Guide. | 238 | section in the Yocto Project and OpenEmbedded Contributor Guide. |
239 | 239 | ||
240 | - Send changes to the core sooner than later as others are likely | 240 | - Send changes to the core sooner than later as others are likely |
@@ -310,7 +310,7 @@ Project Build Host: | |||
310 | 310 | ||
311 | - GNU make &MIN_MAKE_VERSION; or greater | 311 | - GNU make &MIN_MAKE_VERSION; or greater |
312 | 312 | ||
313 | If your build host does not meet any of these listed version | 313 | If your build host does not satisfy all of these listed version |
314 | requirements, you can take steps to prepare the system so that you | 314 | requirements, you can take steps to prepare the system so that you |
315 | can still use the Yocto Project. See the | 315 | can still use the Yocto Project. See the |
316 | ":ref:`ref-manual/system-requirements:required git, tar, python, make and gcc versions`" | 316 | ":ref:`ref-manual/system-requirements:required git, tar, python, make and gcc versions`" |
@@ -568,7 +568,7 @@ extension accordingly. | |||
568 | Locating Yocto Project Source Files | 568 | Locating Yocto Project Source Files |
569 | =================================== | 569 | =================================== |
570 | 570 | ||
571 | This section shows you how to locate, fetch and configure the source | 571 | This section shows you how to locate, fetch, unpack, patch and configure the source |
572 | files you'll need to work with the Yocto Project. | 572 | files you'll need to work with the Yocto Project. |
573 | 573 | ||
574 | .. note:: | 574 | .. note:: |
@@ -720,11 +720,11 @@ Follow these steps to create a local version of the upstream | |||
720 | $ git branch | 720 | $ git branch |
721 | * master | 721 | * master |
722 | 722 | ||
723 | Your local repository of poky is identical to the | 723 | Your local repository of poky is initially identical to the |
724 | upstream poky repository at the time from which it was cloned. As you | 724 | upstream poky repository from which it was cloned. As you |
725 | work with the local branch, you can periodically use the | 725 | work with the local branch, you can periodically use the |
726 | ``git pull --rebase`` command to be sure you are up-to-date | 726 | ``git pull`` command to be sure you stay up-to-date |
727 | with the upstream branch. | 727 | with the upstream poky branch. |
728 | 728 | ||
729 | Checking Out by Branch in Poky | 729 | Checking Out by Branch in Poky |
730 | ------------------------------ | 730 | ------------------------------ |
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 | |||
18 | defined in the ``meta/conf/bitbake.conf`` configuration file in the | 18 | defined 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 | ||
23 | You should be aware that many recipes override the | 23 | You 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. |
25 | usually 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 | ||
35 | The path to the work directory for the recipe | 37 | The path to the unpack directory for the recipe |
38 | (:term:`UNPACKDIR`) is defined as follows:: | ||
39 | |||
40 | ${WORKDIR}/sources | ||
41 | |||
42 | In turn, the path to the work directory for the recipe | ||
36 | (:term:`WORKDIR`) is defined as | 43 | (:term:`WORKDIR`) is defined as |
37 | follows:: | 44 | follows:: |
38 | 45 | ||
diff --git a/documentation/dev-manual/vulnerabilities.rst b/documentation/dev-manual/vulnerabilities.rst index d901ff975b..5331a63991 100644 --- a/documentation/dev-manual/vulnerabilities.rst +++ b/documentation/dev-manual/vulnerabilities.rst | |||
@@ -22,7 +22,7 @@ issues may be impacting Poky and OE-Core. It is up to the maintainers, users, | |||
22 | contributors and anyone interested in the issues to investigate and possibly fix them by | 22 | contributors and anyone interested in the issues to investigate and possibly fix them by |
23 | updating software components to newer versions or by applying patches to address them. | 23 | updating software components to newer versions or by applying patches to address them. |
24 | It is recommended to work with Poky and OE-Core upstream maintainers and submit | 24 | It is recommended to work with Poky and OE-Core upstream maintainers and submit |
25 | patches to fix them, see ":doc:`../contributor-guide/submit-changes`" for details. | 25 | patches to fix them, see ":doc:`/contributor-guide/submit-changes`" for details. |
26 | 26 | ||
27 | Vulnerability check at build time | 27 | Vulnerability check at build time |
28 | ================================= | 28 | ================================= |