docs: highlight code blocks as BitBake by default
cover docs: highlight code blocks as BitBake by default
This makes BitBake the default highlight language for the manuals, as decided in [1], so most of their code is highlighted as what it is and only the blocks that are something else need to say so.
The blocks that are not BitBake get their language first, so every commit builds clean under -W on its own:
- a patch per manual, giving every block that is not BitBake an explicit language
- a patch showing as text the few BitBake examples the Pygments BitBake lexer misreads, each with a comment saying why
- a patch removing the file-wide ".. highlight::" directives, kept separate as asked
- a patch setting highlight_language in conf.py
- a patch writing the rule down in standards.md
Whether a block is BitBake was decided by asking BitBake's own parser, and the language of each remaining block by reading it.
[1] https://lore.kernel.org/r/[email protected]
Trevor Woerner (16):
brief-yoctoprojectqs: state the language of the blocks that are not
BitBake
bsp-manual: state the language of the blocks that are not BitBake
contributor-guide: state the language of the blocks that are not
BitBake
dev-manual: state the language of the blocks that are not BitBake
kernel-dev: state the language of the blocks that are not BitBake
migration-guides: state the language of the blocks that are not
BitBake
overview-manual: state the language of the blocks that are not BitBake
profile-manual: state the language of the blocks that are not BitBake
ref-manual: state the language of the blocks that are not BitBake
security-manual: state the language of the blocks that are not BitBake
test-manual: state the language of the blocks that are not BitBake
toaster-manual: state the language of the blocks that are not BitBake
docs: show the examples the BitBake lexer misreads as text
docs: drop the file-wide highlight directives
conf.py: default the highlight language to bitbake
standards: describe how a code block states its language
documentation/brief-yoctoprojectqs/index.rst | 8 +- documentation/bsp-manual/bsp.rst | 80 +++- documentation/conf.py | 3 + .../ai-assisted-contribution-policy.rst | 8 +- .../contributor-guide/recipe-style-guide.rst | 24 +- .../contributor-guide/submit-changes.rst | 144 +++++-- documentation/dev-manual/bblock.rst | 36 +- documentation/dev-manual/bmaptool.rst | 24 +- documentation/dev-manual/build-quality.rst | 16 +- documentation/dev-manual/building.rst | 32 +- .../dev-manual/creating-fragments.rst | 16 +- ...ustom-template-configuration-directory.rst | 12 +- documentation/dev-manual/debugging.rst | 176 ++++++-- .../dev-manual/development-shell.rst | 8 +- documentation/dev-manual/devtool.rst | 148 +++++-- documentation/dev-manual/disk-space.rst | 8 +- .../efficiently-fetching-sources.rst | 4 +- .../dev-manual/error-reporting-tool.rst | 8 +- .../dev-manual/gobject-introspection.rst | 4 +- documentation/dev-manual/hashequivserver.rst | 8 +- documentation/dev-manual/layers.rst | 52 ++- documentation/dev-manual/libraries.rst | 8 +- .../dev-manual/limiting-resources.rst | 8 +- documentation/dev-manual/multiconfig.rst | 20 +- documentation/dev-manual/new-machine.rst | 4 +- documentation/dev-manual/new-recipe.rst | 36 +- documentation/dev-manual/packages.rst | 56 ++- .../dev-manual/prebuilt-libraries.rst | 4 +- .../dev-manual/python-development-shell.rst | 4 +- documentation/dev-manual/qemu.rst | 48 ++- documentation/dev-manual/quilt.rst | 16 +- .../dev-manual/sstate-mirrors-setup.rst | 8 +- documentation/dev-manual/start.rst | 24 +- .../dev-manual/temporary-source-code.rst | 12 +- .../dev-manual/upgrading-recipes.rst | 76 +++- documentation/dev-manual/wayland.rst | 8 +- documentation/dev-manual/x32-psabi.rst | 4 +- documentation/kernel-dev/advanced.rst | 74 +++- documentation/kernel-dev/common.rst | 208 +++++++--- documentation/kernel-dev/concepts-appx.rst | 8 +- documentation/kernel-dev/maint-appx.rst | 20 +- .../migration-guides/migration-1.3.rst | 4 +- .../migration-guides/migration-1.4.rst | 8 +- .../migration-guides/migration-1.7.rst | 4 +- .../migration-guides/migration-2.0.rst | 4 +- .../migration-guides/migration-2.1.rst | 8 +- .../migration-guides/migration-2.2.rst | 16 +- .../migration-guides/migration-2.3.rst | 8 +- .../migration-guides/migration-2.5.rst | 8 +- .../migration-guides/migration-2.6.rst | 8 +- .../migration-guides/migration-3.4.rst | 4 +- .../migration-guides/migration-4.0.rst | 8 +- .../migration-guides/migration-4.1.rst | 8 +- .../migration-guides/migration-5.2.rst | 12 +- .../migration-guides/migration-5.3.rst | 24 +- .../migration-guides/migration-6.0.rst | 22 +- .../migration-guides/migration-6.1.rst | 8 +- .../migration-guides/release-notes-4.2.rst | 4 +- .../migration-guides/release-notes-5.1.rst | 4 +- .../migration-guides/release-notes-5.3.rst | 16 +- documentation/overview-manual/concepts.rst | 48 ++- .../development-environment.rst | 8 +- documentation/profile-manual/intro.rst | 8 +- documentation/profile-manual/usage.rst | 385 +++++++++++++----- documentation/ref-manual/classes.rst | 74 +++- .../ref-manual/devtool-reference.rst | 80 +++- documentation/ref-manual/faq.rst | 20 +- documentation/ref-manual/features.rst | 4 +- documentation/ref-manual/fragments.rst | 32 +- documentation/ref-manual/images.rst | 4 +- documentation/ref-manual/qa-checks.rst | 24 +- documentation/ref-manual/structure.rst | 28 +- .../ref-manual/system-requirements.rst | 64 ++- documentation/ref-manual/tasks.rst | 44 +- documentation/ref-manual/terms.rst | 16 +- .../ubuntu-debian-host-packages-nodocs.rst | 16 +- documentation/ref-manual/variables.rst | 182 +++++++-- .../security-manual/vulnerabilities.rst | 12 +- documentation/standards.md | 22 + documentation/test-manual/intro.rst | 72 +++- documentation/test-manual/ptest.rst | 12 +- .../test-manual/reproducible-builds.rst | 4 +- documentation/test-manual/runtime-testing.rst | 36 +- .../test-manual/understand-autobuilder.rst | 20 +- documentation/toaster-manual/reference.rst | 26 +- .../toaster-manual/setup-and-use.rst | 134 ++++-- documentation/toaster-manual/start.rst | 18 +- 87 files changed, 2277 insertions(+), 759 deletions(-)
Signature · 1 line
2.50.0.173.g8b6f19ccfc3a
PATCH 1/16 brief-yoctoprojectqs: state the language of the blocks that are not BitBake
The manuals are moving to a default of bitbake for code blocks, so a BitBake block needs no language and every other block needs one. This gives the blocks in this manual that are not BitBake their language.
AI-Generated: codex/claude-opus 5.5 (xhigh)
--- documentation/brief-yoctoprojectqs/index.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
documentation/brief-yoctoprojectqs/index.rst +6 -2
@@ -305,7 +305,9 @@ an entire Linux distribution, including the toolchain, from source. can download these artifacts faster than you would be able to build them. To use such mirrors, enable the - :ref:`ref-fragments-core-yocto-sstate-mirror-cdn` fragment:: + :ref:`ref-fragments-core-yocto-sstate-mirror-cdn` fragment: + + .. code-block:: console $ bitbake-config-build enable-fragment core/yocto/sstate-mirror-cdn
@@ -371,7 +373,9 @@ layer>`: adds the :yocto_git:`meta-raspberrypi </meta-raspberrypi>` BSP layer. - First, clone the layer next to the other layers:: + First, clone the layer next to the other layers: + + .. code-block:: console $ git clone -b &DISTRO_NAME_NO_CAP; https://git.yoctoproject.org/meta-raspberrypi ../layers/meta-raspberrypi
Signature · 1 line
2.50.0.173.g8b6f19ccfc3a
PATCH 2/16 bsp-manual: state the language of the blocks that are not BitBake
In reply to Trevor WoernerThe manuals are moving to a default of bitbake for code blocks, so a BitBake block needs no language and every other block needs one. This gives the blocks in this manual that are not BitBake their language.
AI-Generated: codex/claude-opus 5.5 (xhigh)
--- documentation/bsp-manual/bsp.rst | 80 ++++++++++++++++++++++++-------- 1 file changed, 60 insertions(+), 20 deletions(-)
documentation/bsp-manual/bsp.rst +60 -20
@@ -26,7 +26,9 @@ A BSP consists of a file structure inside a base directory. Collectively, you can think of the base directory, its file structure, and the contents as a BSP layer. Although not a strict requirement, BSP layers in the Yocto Project use the following well-established naming -convention:: +convention: + +.. code-block:: text meta-bsp_root_name
@@ -58,7 +60,9 @@ Each repository is a BSP layer supported by the Yocto Project (e.g. ``meta-raspberrypi`` and ``meta-intel``). Each of these layers is a repository unto itself and clicking on the layer name displays two URLs from which you can clone the layer's repository to your local system. -Here is an example that clones the Raspberry Pi BSP layer:: +Here is an example that clones the Raspberry Pi BSP layer: + +.. code-block:: console $ git clone https://git.yoctoproject.org/meta-raspberrypi
@@ -175,7 +179,9 @@ section. #. *Navigate to Your Source Directory:* Typically, you set up the ``meta-intel`` Git repository next to the other layers in your build. - #. *Clone the Layer:* :: + #. *Clone the Layer:* + + .. code-block:: console $ git clone https://git.yoctoproject.org/meta-intel.git Cloning into 'meta-intel'...
@@ -188,7 +194,9 @@ section. #. *Check Out the Proper Branch:* The branch you check out for ``meta-intel`` must match the same branch you are using for the - Yocto Project release (e.g. ``&DISTRO_NAME_NO_CAP;``):: + Yocto Project release (e.g. ``&DISTRO_NAME_NO_CAP;``): + + .. code-block:: console $ cd meta-intel $ git checkout -b &DISTRO_NAME_NO_CAP; remotes/origin/&DISTRO_NAME_NO_CAP;
@@ -208,7 +216,9 @@ section. The process is identical to the process used for the ``meta-intel`` layer except for the layer's name. For example, if you determine that your hardware most closely matches the ``meta-raspberrypi``, clone - that layer:: + that layer: + + .. code-block:: console $ git clone https://git.yoctoproject.org/meta-raspberrypi Cloning into 'meta-raspberrypi'...
@@ -222,7 +232,9 @@ section. #. *Initialize the Build Environment:* While in the :term:`Source Directory`, run the :ref:`structure-core-script` environment setup script located in :term:`OpenEmbedded-Core (OE-Core)` to define the OpenEmbedded - build environment on your build host. :: + build environment on your build host. + + .. code-block:: console $ source layers/openembedded-core/oe-init-build-env
@@ -269,7 +281,9 @@ Project. For that list of requirements, see the Below is the typical directory structure for a BSP layer. While this basic form represents the standard, realize that the actual layout for -individual BSPs could differ. :: +individual BSPs could differ. + +.. code-block:: text meta-bsp_root_name/ meta-bsp_root_name/bsp_license_file
@@ -447,7 +461,9 @@ The following sections describe each part of the proposed BSP format. License Files ------------- -You can find these files in the BSP Layer at:: +You can find these files in the BSP Layer at: + +.. code-block:: text meta-bsp_root_name/bsp_license_file
@@ -465,7 +481,9 @@ section in the Yocto Project Development Tasks Manual. README File ----------- -You can find this file in the BSP Layer at:: +You can find this file in the BSP Layer at: + +.. code-block:: text meta-bsp_root_name/README
@@ -480,7 +498,9 @@ name of the BSP maintainer with his or her contact information. README.sources File ------------------- -You can find this file in the BSP Layer at:: +You can find this file in the BSP Layer at: + +.. code-block:: text meta-bsp_root_name/README.sources
@@ -499,7 +519,9 @@ used to generate the images that ship with the BSP. Pre-built User Binaries ----------------------- -You can find these files in the BSP Layer at:: +You can find these files in the BSP Layer at: + +.. code-block:: text meta-bsp_root_name/binary/bootable_images
@@ -522,7 +544,9 @@ information on the Metadata. Layer Configuration File ------------------------ -You can find this file in the BSP Layer at:: +You can find this file in the BSP Layer at: + +.. code-block:: text meta-bsp_root_name/conf/layer.conf
@@ -570,7 +594,9 @@ recognize the BSP. Hardware Configuration Options ------------------------------ -You can find these files in the BSP Layer at:: +You can find these files in the BSP Layer at: + +.. code-block:: text meta-bsp_root_name/conf/machine/*.conf
@@ -608,7 +634,9 @@ configuration file. For example, the Raspberry Pi BSP Miscellaneous BSP-Specific Recipe Files --------------------------------------- -You can find these files in the BSP Layer at:: +You can find these files in the BSP Layer at: + +.. code-block:: text meta-bsp_root_name/recipes-bsp/*
@@ -618,7 +646,9 @@ Raspberry Pi BSP, there is the ``formfactor_%.bbappend`` file, which is an append file used to augment the recipe that starts the build. Furthermore, there are machine-specific settings used during the build that are defined by the ``machconfig`` file further down in the -directory. Here is the ``machconfig`` file for the Raspberry Pi BSP:: +directory. Here is the ``machconfig`` file for the Raspberry Pi BSP: + +.. code-block:: shell HAVE_TOUCHSCREEN=0 HAVE_KEYBOARD=1
@@ -638,7 +668,9 @@ directory. Here is the ``machconfig`` file for the Raspberry Pi BSP:: Display Support Files --------------------- -You can find these files in the BSP Layer at:: +You can find these files in the BSP Layer at: + +.. code-block:: text meta-bsp_root_name/recipes-graphics/*
@@ -649,7 +681,9 @@ to support a display are kept here. Linux Kernel Configuration -------------------------- -You can find these files in the BSP Layer at:: +You can find these files in the BSP Layer at: + +.. code-block:: text meta-bsp_root_name/recipes-kernel/linux/linux*.bbappend meta-bsp_root_name/recipes-kernel/linux/*.bb
@@ -693,7 +727,9 @@ in the Yocto Project Linux Kernel Development Manual. An alternate scenario is when you create your own kernel recipe for the BSP. A good example of this is the Raspberry Pi BSP. If you examine the ``recipes-kernel/linux`` directory in that layer you see the following -Raspberry Pi-specific recipes and associated files:: +Raspberry Pi-specific recipes and associated files: + +.. code-block:: text files/ linux-raspberrypi_6.12.bb
@@ -1033,14 +1069,18 @@ also supports several other machines: directory. #. Create and place the new ``interfaces`` configuration file in the - BSP's layer here:: + BSP's layer here: + + .. code-block:: text meta-xyz/recipes-core/init-ifupdown/files/xyz-machine-one/interfaces .. note:: If the ``meta-xyz`` layer did not support multiple machines, you would place - the interfaces configuration file in the layer here:: + the interfaces configuration file in the layer here: + + .. code-block:: text meta-xyz/recipes-core/init-ifupdown/files/interfaces
Signature · 1 line
2.50.0.173.g8b6f19ccfc3a
PATCH 3/16 contributor-guide: state the language of the blocks that are not BitBake
In reply to Trevor WoernerThe manuals are moving to a default of bitbake for code blocks, so a BitBake block needs no language and every other block needs one. This gives the blocks in this manual that are not BitBake their language.
AI-Generated: codex/claude-opus 5.5 (xhigh)
--- .../ai-assisted-contribution-policy.rst | 8 +- .../contributor-guide/recipe-style-guide.rst | 24 ++- .../contributor-guide/submit-changes.rst | 144 +++++++++++++----- 3 files changed, 132 insertions(+), 44 deletions(-)
documentation/contributor-guide/ai-assisted-contribution-policy.rst +6 -2
@@ -141,11 +141,15 @@ In patches and commits **Where AI-generated code is contributed to the project, commit messages must include the** ``AI-Generated`` **tag identifying the AI tool or framework and the specific AI model used**. We encourage contributors to -be as specific as they can be. For example:: +be as specific as they can be. For example: + +.. code-block:: text AI-Generated: Claude Code, Opus 5.0 -Or:: +Or: + +.. code-block:: text AI-Generated: Copilot, GPT-5.5
documentation/contributor-guide/recipe-style-guide.rst +18 -6
@@ -270,7 +270,9 @@ License Updates When you change the :term:`LICENSE` or :term:`LIC_FILES_CHKSUM` in the recipe due to upstream making modifications to the license files, you need to briefly explain the reason for the change via a ``License-Update:`` tag. Often it's -quite trivial, such as:: +quite trivial, such as: + +.. code-block:: text License-Update: copyright years refreshed
@@ -372,7 +374,9 @@ responsibility for upstreaming. Examples -------- -Here's an example of a patch that has been submitted upstream:: +Here's an example of a patch that has been submitted upstream: + +.. code-block:: text rpm: Adjusted the foo setting in bar
@@ -388,7 +392,9 @@ Here's an example of a patch that has been submitted upstream:: A future update can change the value to ``Backport`` or ``Denied`` as appropriate. -Another example of a patch that is specific to OpenEmbedded:: +Another example of a patch that is specific to OpenEmbedded: + +.. code-block:: text Do not treat warnings as errors
@@ -398,7 +404,9 @@ Another example of a patch that is specific to OpenEmbedded:: Upstream-Status: Inappropriate [oe specific] -Here's a patch that has been backported from an upstream commit:: +Here's a patch that has been backported from an upstream commit: + +.. code-block:: text include missing sys/file.h for LOCK_EX
@@ -414,7 +422,9 @@ one CVE is fixed, separate them using spaces. CVE Examples ------------ -This should be the header of patch that fixes :cve_nist:`2015-8370` in GRUB2:: +This should be the header of patch that fixes :cve_nist:`2015-8370` in GRUB2: + +.. code-block:: text grub2: Fix CVE-2015-8370
@@ -434,7 +444,9 @@ Patch format By default, patches created with ``git format-patch`` have a `Git` version signature at the end. To avoid having a `Git` signature at the end of generated or updated patches, -you can use `Git` configuration settings:: +you can use `Git` configuration settings: + +.. code-block:: console $ git config --global format.signature ""
documentation/contributor-guide/submit-changes.rst +108 -36
346 lines not on this page · raw message
Signature · 1 line
2.50.0.173.g8b6f19ccfc3a
PATCH 5/16 kernel-dev: state the language of the blocks that are not BitBake
In reply to Trevor WoernerThe manuals are moving to a default of bitbake for code blocks, so a BitBake block needs no language and every other block needs one. This gives the blocks in this manual that are not BitBake their language.
AI-Generated: codex/claude-opus 5.5 (xhigh)
--- documentation/kernel-dev/advanced.rst | 74 +++++--- documentation/kernel-dev/common.rst | 208 +++++++++++++++------ documentation/kernel-dev/concepts-appx.rst | 8 +- documentation/kernel-dev/maint-appx.rst | 20 +- 4 files changed, 228 insertions(+), 82 deletions(-)
documentation/kernel-dev/advanced.rst +52 -22
@@ -152,7 +152,9 @@ types to form the final description of what will be assembled and built. While the kernel Metadata syntax does not enforce any logical separation of configuration fragments, patches, features or kernel types, best practices dictate a logical separation of these types of Metadata. The -following Metadata file hierarchy is recommended:: +following Metadata file hierarchy is recommended: + +.. code-block:: text base/ bsp/
@@ -218,7 +220,7 @@ two files: ``smp.scc`` and ``smp.cfg``. You can find these files in the ``cfg`` directory of the ``yocto-4.12`` branch in the ``yocto-kernel-cache`` Git repository. -.. code-block:: +.. code-block:: shell :caption: cfg/smp.scc define KFEATURE_DESCRIPTION "Enable SMP for 32 bit builds"
@@ -226,7 +228,7 @@ two files: ``smp.scc`` and ``smp.cfg``. You can find these files in the kconf hardware smp.cfg -.. code-block:: +.. code-block:: ini :caption: cfg/smp.cfg CONFIG_SMP=y
@@ -262,7 +264,9 @@ non-hardware fragment. As described in the ":ref:`kernel-dev/common:validating configuration`" section, you can -use the following BitBake command to audit your configuration:: +use the following BitBake command to audit your configuration: + +.. code-block:: console $ bitbake linux-yocto -c kernel_configcheck -f
@@ -282,7 +286,7 @@ kernel as defined outside of the recipe space (i.e. in the ``patches/build`` directory of the ``yocto-4.12`` branch in the ``yocto-kernel-cache`` Git repository. -.. code-block:: +.. code-block:: shell :caption: patches/build/build.scc patch arm-serialize-build-targets.patch
@@ -297,7 +301,7 @@ in the ``patches/build`` directory of the ``yocto-4.12`` branch in the and part of the patch it names: -.. code-block:: +.. code-block:: text :caption: patches/build/modpost-mask-trivial-warnings.patch From bd48931bc142bdd104668f3a062a1f22600aae61 Mon Sep 17 00:00:00 2001
@@ -334,7 +338,7 @@ Features are complex kernel Metadata types that consist of configuration fragments, patches, and possibly other feature description files. As an example, consider the following generic listing: -.. code-block:: +.. code-block:: shell :caption: features/myfeature.scc define KFEATURE_DESCRIPTION "Enable myfeature"
@@ -406,7 +410,9 @@ for Linux Yocto kernels: For any given kernel type, the Metadata is defined by the ``.scc`` (e.g. ``standard.scc``). Here is a partial listing for the ``standard.scc`` file, which is found in the ``ktypes/standard`` directory of the -``yocto-kernel-cache`` Git repository:: +``yocto-kernel-cache`` Git repository: + +.. code-block:: shell # Include this kernel type fragment to get the standard features and # configuration values.
@@ -475,13 +481,17 @@ Description Overview For simplicity, consider the following root BSP layer description files for the BeagleBone board. These files employ both a structure and naming convention for consistency. The naming convention for the file is as -follows:: +follows: + +.. code-block:: text bsp_root_name-kernel_type.scc Here are some example root layer BSP filenames for the BeagleBone Board BSP, which is supported by the -Yocto Project:: +Yocto Project: + +.. code-block:: text beaglebone-standard.scc beaglebone-preempt-rt.scc
@@ -489,7 +499,9 @@ Yocto Project:: Each file uses the root name (i.e "beaglebone") BSP name followed by the kernel type. -Examine the ``beaglebone-standard.scc`` file:: +Examine the ``beaglebone-standard.scc`` file: + +.. code-block:: shell define KMACHINE beaglebone define KTYPE standard
@@ -545,13 +557,17 @@ For information on how to break a complete ``.config`` file into the various configuration fragments, see the ":ref:`kernel-dev/common:creating configuration fragments`" section. Finally, if you have any configurations specific to the hardware that -are not in a ``*.scc`` file, you can include them as follows:: +are not in a ``*.scc`` file, you can include them as follows: + +.. code-block:: shell kconf hardware mybsp-extra.cfg The BeagleBone example does not include these types of configurations. However, the Malta 32-bit board does -("mti-malta32"). Here is the ``mti-malta32-le-standard.scc`` file:: +("mti-malta32"). Here is the ``mti-malta32-le-standard.scc`` file: + +.. code-block:: shell define KMACHINE mti-malta32-le define KMACHINE qemumipsel
@@ -570,7 +586,9 @@ Example Many real-world examples are more complex. Like any other ``.scc`` file, BSP descriptions can aggregate features. Consider the Minnow BSP definition given the ``linux-yocto-4.4`` branch of the -``yocto-kernel-cache`` (i.e. ``yocto-kernel-cache/bsp/minnow/minnow.scc``):: +``yocto-kernel-cache`` (i.e. ``yocto-kernel-cache/bsp/minnow/minnow.scc``): + +.. code-block:: shell include cfg/x86.scc include features/eg20t/eg20t.scc
@@ -605,7 +623,9 @@ found on the machine. This ``minnow.scc`` description file is then included in each of the three "minnow" description files for the supported kernel types (i.e. "standard", "preempt-rt", and "tiny"). Consider the "minnow" description for the "standard" kernel type (i.e. -``minnow-standard.scc``):: +``minnow-standard.scc``): + +.. code-block:: shell define KMACHINE minnow define KTYPE standard
@@ -637,7 +657,9 @@ that defines all enabled hardware for the BSP that is common to all kernel types. Using this command significantly reduces duplication. Now consider the "minnow" description for the "tiny" kernel type (i.e. -``minnow-tiny.scc``):: +``minnow-tiny.scc``): + +.. code-block:: shell define KMACHINE minnow define KTYPE tiny
@@ -699,7 +721,9 @@ See the ":ref:`kernel-dev/common:modifying an existing recipe`" section for more information. Here is an example that shows a trivial tree of kernel Metadata stored -in recipe-space within a BSP layer:: +in recipe-space within a BSP layer: + +.. code-block:: text meta-my_bsp_layer/ `-- recipes-kernel
@@ -810,7 +834,9 @@ supplied as a fragment, its ``patch`` directives, and those of everything it If your BSP genuinely lives outside the kernel source history (the branch you build does **not** already contain the BSP commits, and the patches *must* be applied), the BSP description can opt back in to patch application by adding the -following directive to the description itself:: +following directive to the description itself: + +.. code-block:: shell define KMETA_EXTERNAL_BSP 1
@@ -884,7 +910,7 @@ new branch as the :term:`KBRANCH` to use for the board as follows:: Another method is to use the ``branch`` command in the BSP description: -.. code-block:: +.. code-block:: shell :caption: mybsp.scc define KMACHINE mybsp
@@ -898,13 +924,17 @@ description: If you find yourself with numerous branches, you might consider using a hierarchical branching system similar to what the Yocto Linux Kernel Git -repositories use:: +repositories use: + +.. code-block:: text common/kernel_type/machine If you had two kernel types, "standard" and "small" for instance, three machines, and common as ``mydir``, the branches in your Git repository -might look like this:: +might look like this: + +.. code-block:: text mydir/base mydir/standard/base
@@ -938,7 +968,7 @@ provide for this with the ``git merge`` command. To merge a feature branch into a BSP, insert the ``git merge`` command after any ``branch`` commands: -.. code-block:: +.. code-block:: shell :caption: mybsp.scc define KMACHINE mybsp
documentation/kernel-dev/common.rst +155 -53
510 lines not on this page · raw message
documentation/kernel-dev/concepts-appx.rst +6 -2
@@ -343,7 +343,9 @@ To determine whether or not a given option is "hardware" or "non-hardware", the kernel Metadata in ``yocto-kernel-cache`` contains files that classify individual or groups of options as either hardware or non-hardware. To better show this, consider a situation where the -``yocto-kernel-cache`` contains the following files:: +``yocto-kernel-cache`` contains the following files: + +.. code-block:: text yocto-kernel-cache/features/drm-psb/hardware.cfg yocto-kernel-cache/features/kgdb/hardware.cfg
@@ -382,7 +384,9 @@ Here are explanations for the various files: (i.e. ``hardware.kcf`` or ``non-hardware.kcf``). Here is a specific example using the -``kernel-cache/bsp/mti-malta32/hardware.cfg``:: +``kernel-cache/bsp/mti-malta32/hardware.cfg``: + +.. code-block:: text CONFIG_SERIAL_8250 CONFIG_SERIAL_8250_CONSOLE
documentation/kernel-dev/maint-appx.rst +15 -5
@@ -28,7 +28,9 @@ in the Yocto Project Linux kernel in any clone of the Yocto Project Linux kernel source repository and ``yocto-kernel-cache`` Git trees. For example, the following commands clone the Yocto Project baseline Linux kernel that branches off ``linux.org`` version 4.12 and the -``yocto-kernel-cache``, which contains stores of kernel Metadata:: +``yocto-kernel-cache``, which contains stores of kernel Metadata: + +.. code-block:: console $ git clone https://git.yoctoproject.org/linux-yocto-4.12 $ git clone https://git.yoctoproject.org/yocto-kernel-cache
@@ -41,14 +43,18 @@ section. Once you have cloned the kernel Git repository and the cache of Metadata on your local machine, you can discover the branches that are available -in the repository using the following Git command:: +in the repository using the following Git command: + +.. code-block:: console $ git branch -a Checking out a branch allows you to work with a particular Yocto Linux kernel. For example, the following commands check out the "standard/beagleboard" branch of the Yocto Linux kernel repository and -the "yocto-4.12" branch of the ``yocto-kernel-cache`` repository:: +the "yocto-4.12" branch of the ``yocto-kernel-cache`` repository: + +.. code-block:: console $ cd ~/linux-yocto-4.12 $ git checkout -b my-kernel-4.12 remotes/origin/standard/beagleboard
@@ -108,7 +114,9 @@ patch, or BSP: For a typical build, the target of the search is a feature description in an ``.scc`` file whose name follows this format (e.g. - ``beaglebone-standard.scc`` and ``beaglebone-preempt-rt.scc``):: + ``beaglebone-standard.scc`` and ``beaglebone-preempt-rt.scc``): + + .. code-block:: text bsp_root_name-kernel_type.scc
@@ -218,7 +226,9 @@ build process generates a build tree that is separate from your kernel's local Git source repository tree. This build tree has a name that uses the following form, where ``${MACHINE}`` is the metadata name of the machine (BSP) and "kernel_type" is one of the Yocto Project supported -kernel types (e.g. "standard"):: +kernel types (e.g. "standard"): + +.. code-block:: text linux-${MACHINE}-kernel_type-build
Signature · 1 line
2.50.0.173.g8b6f19ccfc3a
PATCH 10/16 security-manual: state the language of the blocks that are not BitBake
In reply to Trevor WoernerThe manuals are moving to a default of bitbake for code blocks, so a BitBake block needs no language and every other block needs one. This gives the blocks in this manual that are not BitBake their language.
AI-Generated: codex/claude-opus 5.5 (xhigh)
--- documentation/security-manual/vulnerabilities.rst | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
documentation/security-manual/vulnerabilities.rst +9 -3
@@ -224,7 +224,9 @@ Modify the patch adding OE-related metadata. We will follow the example of the ``CVE-2022-3341.patch``. The original `commit message <https://github.com/FFmpeg/FFmpeg/commit/9cf652cef49d74afe3d454f27d49eb1a1394951e.patch/>`__ -is:: +is: + +.. code-block:: diff From 9cf652cef49d74afe3d454f27d49eb1a1394951e Mon Sep 17 00:00:00 2001 From: Jiasheng Jiang <[email protected]>
@@ -242,7 +244,9 @@ is:: For the correct operations of :ref:`ref-classes-sbom-cve-check`, it requires the CVE identification in a ``CVE:`` tag of the patch file commit message using -the format:: +the format: + +.. code-block:: text CVE: CVE-2022-3341
@@ -251,7 +255,9 @@ to the original patch and sign-off by people working on the backport. If there are any modifications to the original patch, note them in the ``Comments:`` tag. -With the additional information, the header of the patch file in OE-core becomes:: +With the additional information, the header of the patch file in OE-core becomes: + +.. code-block:: diff From 9cf652cef49d74afe3d454f27d49eb1a1394951e Mon Sep 17 00:00:00 2001 From: Jiasheng Jiang <[email protected]>
Signature · 1 line
2.50.0.173.g8b6f19ccfc3a
PATCH 4/16 dev-manual: state the language of the blocks that are not BitBake
In reply to Trevor WoernerThe manuals are moving to a default of bitbake for code blocks, so a BitBake block needs no language and every other block needs one. This gives the blocks in this manual that are not BitBake their language.
AI-Generated: codex/claude-opus 5.5 (xhigh)
--- documentation/dev-manual/bblock.rst | 36 +++- documentation/dev-manual/bmaptool.rst | 24 ++- documentation/dev-manual/build-quality.rst | 16 +- documentation/dev-manual/building.rst | 32 +++- .../dev-manual/creating-fragments.rst | 16 +- ...ustom-template-configuration-directory.rst | 12 +- documentation/dev-manual/debugging.rst | 176 +++++++++++++----- .../dev-manual/development-shell.rst | 8 +- documentation/dev-manual/devtool.rst | 148 +++++++++++---- documentation/dev-manual/disk-space.rst | 8 +- .../efficiently-fetching-sources.rst | 4 +- .../dev-manual/error-reporting-tool.rst | 8 +- .../dev-manual/gobject-introspection.rst | 4 +- documentation/dev-manual/hashequivserver.rst | 8 +- documentation/dev-manual/layers.rst | 52 ++++-- documentation/dev-manual/libraries.rst | 8 +- .../dev-manual/limiting-resources.rst | 8 +- documentation/dev-manual/multiconfig.rst | 20 +- documentation/dev-manual/new-machine.rst | 4 +- documentation/dev-manual/new-recipe.rst | 36 +++- documentation/dev-manual/packages.rst | 56 ++++-- .../dev-manual/prebuilt-libraries.rst | 4 +- .../dev-manual/python-development-shell.rst | 4 +- documentation/dev-manual/qemu.rst | 48 +++-- documentation/dev-manual/quilt.rst | 16 +- .../dev-manual/sstate-mirrors-setup.rst | 8 +- documentation/dev-manual/start.rst | 24 ++- .../dev-manual/temporary-source-code.rst | 12 +- .../dev-manual/upgrading-recipes.rst | 76 ++++++-- documentation/dev-manual/wayland.rst | 8 +- documentation/dev-manual/x32-psabi.rst | 4 +- 31 files changed, 666 insertions(+), 222 deletions(-)
documentation/dev-manual/bblock.rst +27 -9
@@ -32,17 +32,23 @@ specific signatures, forcing BitBake to use the sstate cache for them. Locking tasks and recipes ------------------------- -To lock a recipe, use:: +To lock a recipe, use: + +.. code-block:: console $ bblock recipe -You can also use a space-separated list of recipes to lock multiple recipes:: +You can also use a space-separated list of recipes to lock multiple recipes: + +.. code-block:: console $ bblock recipe1 recipe2 Locking a recipe means locking all tasks of the recipe. If you need to lock only particular tasks, use the `-t` option with a comma-separated -list of tasks:: +list of tasks: + +.. code-block:: console $ bblock -t task1,task2 recipe
@@ -50,21 +56,29 @@ list of tasks:: Unlocking tasks and recipes --------------------------- -To unlock a recipe, use the ``-r`` option:: +To unlock a recipe, use the ``-r`` option: + +.. code-block:: console $ bblock -r recipe -You can also use a space-separated list of recipes to unlock multiple recipes:: +You can also use a space-separated list of recipes to unlock multiple recipes: + +.. code-block:: console $ bblock -r recipe1 recipe2 Unlocking a recipe means unlocking all tasks of the recipe. If you need to unlock only particular tasks use the ``-t`` option with a comma-separated -list of tasks:: +list of tasks: + +.. code-block:: console $ bblock -r -t task1,task2 recipe -To unlock all recipes, do not specify any recipe:: +To unlock all recipes, do not specify any recipe: + +.. code-block:: console $ bblock -r
@@ -75,7 +89,9 @@ Configuration file ``bblock`` will dump the signatures in the :ref:`structure-build-conf-bblock.conf` file, included by default in :oe_git:`meta/conf/bitbake.conf </openembedded-core/tree/meta/conf/bitbake.conf>`. -To dump the file, use the ``-d`` option:: +To dump the file, use the ``-d`` option: + +.. code-block:: console $ bblock -d
@@ -101,7 +117,9 @@ Example ------- When working on the ``python3`` recipe, we can lock ``python3-native`` with -the following:: +the following: + +.. code-block:: console $ bblock python3-native $ bblock -d
documentation/dev-manual/bmaptool.rst +18 -6
@@ -15,12 +15,16 @@ system image files much faster. - If you are using Ubuntu or Debian distributions, you can install the ``bmaptool`` package using the following command and then use the tool without specifying ``PATH`` even from the root - account:: + account: + + .. code-block:: console $ sudo apt install bmaptool - If you are unable to install the ``bmaptool`` package, you will - need to build `bmaptool` before using it. Use the following command:: + need to build `bmaptool` before using it. Use the following command: + + .. code-block:: console $ bitbake bmaptool-native -caddto_recipe_sysroot
@@ -36,7 +40,9 @@ any type of image. Use these steps to flash an image using `bmaptool`: #. *Get Your Image:* Either have your image ready (pre-built with the :term:`IMAGE_FSTYPES` - setting previously mentioned) or take the step to build the image:: + setting previously mentioned) or take the step to build the image: + + .. code-block:: console $ bitbake image
@@ -44,16 +50,22 @@ any type of image. Use these steps to flash an image using `bmaptool`: depending on your particular setup. The following commands assume the image resides in the :term:`Build Directory`'s ``deploy/images/`` area: - - If you installed the package for `bmaptool`, you can directly run:: + - If you installed the package for `bmaptool`, you can directly run: + + .. code-block:: console $ sudo bmaptool copy build-directory/tmp/deploy/images/machine/image.wic /dev/sdX - - Otherwise, if you built `bmaptool` with BitBake, run:: + - Otherwise, if you built `bmaptool` with BitBake, run: + + .. code-block:: console $ sudo chmod a+w /dev/sdX # get write access to the media, needed only once after booting $ oe-run-native bmaptool-native bmaptool copy build-directory/tmp/deploy/images/machine/image.wic /dev/sdX -For help on the ``bmaptool`` command, use the following command:: +For help on the ``bmaptool`` command, use the following command: + +.. code-block:: console $ bmaptool --help
documentation/dev-manual/build-quality.rst +12 -4
@@ -136,7 +136,9 @@ collect the stored :term:`SRCREV` values from build history and report them in a format suitable for use in global configuration (e.g., a distro include :term:`configuration file`) to override floating :term:`AUTOREV` values to a fixed set of revisions. Here is some example -output from this command:: +output from this command: + +.. code-block:: console $ buildhistory-collect-srcrevs -a # all-poky-linux
@@ -359,7 +361,9 @@ interface. To see any changes that have occurred (assuming you have :term:`BUILDHISTORY_COMMIT` = "1"), you can simply use any Git command that allows you to view the history -of a repository. Here is one method:: +of a repository. Here is one method: + +.. code-block:: console $ git log -p
@@ -369,7 +373,9 @@ however, that this method does show changes that are not significant There is a command-line tool called ``buildhistory-diff``, though, that queries the Git repository and prints just the differences that -might be significant in human-readable form. Here is an example:: +might be significant in human-readable form. Here is an example: + +.. code-block:: console $ bitbake-builds/layers/openembedded-core/scripts/buildhistory-diff . HEAD^ Changes to images/qemux86_64/glibc/core-image-minimal (files-in-image.txt):
@@ -389,7 +395,9 @@ might be significant in human-readable form. Here is an example:: .. note:: The ``buildhistory-diff`` tool requires the ``GitPython`` - package. Be sure to install it using Pip3 as follows:: + package. Be sure to install it using Pip3 as follows: + + .. code-block:: console $ pip3 install GitPython --user
documentation/dev-manual/building.rst +24 -8
@@ -55,7 +55,9 @@ The following figure and list overviews the build process: define the :term:`MACHINE` or :term:`DISTRO`, and open your :ref:`structure-build-conf-site.conf` file to set site-specific settings. -#. *Build the Image:* Build the image using the ``bitbake`` command:: +#. *Build the Image:* Build the image using the ``bitbake`` command: + + .. code-block:: console $ bitbake target
@@ -74,7 +76,9 @@ The following figure and list overviews the build process: Project Reference Manual. As an example, the following command builds the - ``core-image-minimal`` image:: + ``core-image-minimal`` image: + + .. code-block:: console $ bitbake core-image-minimal
@@ -387,7 +391,9 @@ happens, which changes the way you build them. You can also modify the filesystem itself or select a different filesystem. First, find out what is hogging your root filesystem by running the -``dirsize.py`` script from your root directory:: +``dirsize.py`` script from your root directory: + +.. code-block:: console $ cd root-directory-of-image $ dirsize.py 100000 > dirsize-100k.log
@@ -402,7 +408,9 @@ the root filesystem that take up large amounts of memory. You need to be sure that what you eliminate does not cripple the functionality you need. One way to see how packages relate to each other -is by using the Dependency Explorer UI with the BitBake command:: +is by using the Dependency Explorer UI with the BitBake command: + +.. code-block:: console $ cd image-directory $ bitbake -u taskexp -g image
@@ -445,7 +453,9 @@ building? Which drivers do you build by default? You can modify the kernel source if you want to help with boot time. Run the ``ksize.py`` script from the top-level Linux build directory to -get an idea of what is making up the kernel:: +get an idea of what is making up the kernel: + +.. code-block:: console $ cd top-level-linux-build-directory $ ksize.py > ksize.log
@@ -459,7 +469,9 @@ in a compressed kernel image. Look to reduce the areas that are large and taking up around the "90% rule." To examine, or drill down, into any particular area, use the ``-d`` -option with the script:: +option with the script: + +.. code-block:: console $ ksize.py -d > ksize.log
@@ -771,7 +783,9 @@ Follow these steps to populate your Downloads directory: variable for more information. #. *Populate Your Downloads Directory Without Building:* Use BitBake to - fetch your sources but inhibit the build:: + fetch your sources but inhibit the build: + + .. code-block:: console $ bitbake target --runall=fetch
@@ -812,7 +826,9 @@ directory: removing the ``${``\ :term:`TMPDIR`\ ``}`` directory or using a new :term:`Build Directory`. -#. *Build Your Target:* Use BitBake to build your target:: +#. *Build Your Target:* Use BitBake to build your target: + + .. code-block:: console $ bitbake target
documentation/dev-manual/creating-fragments.rst +12 -4
@@ -33,7 +33,9 @@ directive>` directive in :oe_git:`bitbake.conf </openembedded-core/tree/meta/con You can create one or more :term:`configuration fragment` files in your :term:`layer` in this directory. Let's take the following example, where -``custom-fragment.conf`` is our custom fragment file:: +``custom-fragment.conf`` is our custom fragment file: + +.. code-block:: text meta-custom ├── conf
@@ -84,7 +86,9 @@ threads :term:`BitBake` will use with the :term:`BB_NUMBER_THREADS` and For now, our fragment exists and is listed by the :ref:`ref-bitbake-config-build-list-fragments` command, but is not enabled. To enable this fragment, use the :ref:`ref-bitbake-config-build-enable-fragment` -command:: +command: + +.. code-block:: console $ bitbake-config-build enable-fragment meta-custom/custom-fragment
@@ -95,7 +99,9 @@ command:: the ``conf/layer.conf`` file of your layer. Standard Configuration fragments can be organized in a more complex way. For -example, it's possible to create sub-directories to organize your fragments:: +example, it's possible to create sub-directories to organize your fragments: + +.. code-block:: text meta-custom ├── conf
@@ -141,6 +147,8 @@ configuration file: the retained solution to create new built-in fragments. You can then use the :ref:`ref-bitbake-config-build-enable-fragment` command to -set a value to the ``CUSTOM_VARIABLE`` variable:: +set a value to the ``CUSTOM_VARIABLE`` variable: + +.. code-block:: console $ bitbake-config-build enable-fragment custom-builtin-fragment/somevalue
documentation/dev-manual/custom-template-configuration-directory.rst +9 -3
@@ -11,7 +11,9 @@ message that is shown when setting up the build. This can be done by creating one or more template configuration directories in your custom distribution layer. -This can be done by using ``bitbake-layers save-build-conf``:: +This can be done by using ``bitbake-layers save-build-conf``: + +.. code-block:: console $ bitbake-layers save-build-conf ../../meta-alex/ test-1 NOTE: Starting bitbake server...
@@ -25,7 +27,9 @@ replaces site-specific paths in :ref:`structure-build-conf-bblayers.conf` with ` the config files into a specified layer under a specified template name. To use those saved templates as a starting point for a build, users should point -to one of them with :term:`TEMPLATECONF` environment variable:: +to one of them with :term:`TEMPLATECONF` environment variable: + +.. code-block:: shell TEMPLATECONF=/srv/bitbake-builds/layers/meta-alex/conf/templates/test-1 . /srv/bitbake-builds/layers/openembedded-core/oe-init-build-env build-try-test-1
@@ -37,7 +41,9 @@ configuration information that ultimately ends up in the If :term:`TEMPLATECONF` is not set, the default value is obtained from ``.templateconf`` file that is read from the same directory as ``oe-init-build-env`` script. For the Poky reference distribution this -would be:: +would be: + +.. code-block:: shell TEMPLATECONF=${TEMPLATECONF:-meta/conf/templates/default}
documentation/dev-manual/debugging.rst +132 -44
421 lines not on this page · raw message
documentation/dev-manual/development-shell.rst +6 -2
@@ -17,7 +17,9 @@ this way can be helpful when debugging a build or preparing software to be used with the OpenEmbedded build system. Here is an example that uses ``devshell`` on a target named -``matchbox-desktop``:: +``matchbox-desktop``: + +.. code-block:: console $ bitbake matchbox-desktop -c devshell
@@ -46,7 +48,9 @@ corresponding ``run.*`` script in the directory (e.g., ``run.do_configure.``\ `pid`). If a task's script does not exist, which would be the case if the task was skipped by way of the sstate cache, you can create the task by first running it outside of the -``devshell``:: +``devshell``: + +.. code-block:: console $ bitbake -c task
documentation/dev-manual/devtool.rst +111 -37
369 lines not on this page · raw message
documentation/dev-manual/disk-space.rst +6 -2
@@ -31,7 +31,9 @@ multiple cache files for a given package, consuming a substantial amount of disk space. However, only the most recent ones are likely to be reused. The following command is a quick way to purge all the cache files which -haven't been used for a least a specified number of days:: +haven't been used for a least a specified number of days: + +.. code-block:: console $ find build/sstate-cache -type f -mtime +$DAYS -delete
@@ -47,7 +49,9 @@ architecture, and also to remove files that it considers unreachable by exploring a set of build configurations. However, this command requires a full build environment to be available and doesn't work well covering multiple releases. It won't work either on limited environments -such as BSD based NAS:: +such as BSD based NAS: + +.. code-block:: console $ sstate-cache-management.py --remove-duplicated --cache-dir=sstate-cache
documentation/dev-manual/efficiently-fetching-sources.rst +3 -1
@@ -57,7 +57,9 @@ download directory :ref:`structure-build-downloads`, which is located with :term:`DL_DIR`. Use the following BitBake command form to fetch all the necessary -sources without starting the build:: +sources without starting the build: + +.. code-block:: console $ bitbake target --runall=fetch
documentation/dev-manual/error-reporting-tool.rst +6 -2
@@ -44,7 +44,9 @@ reporting causes the build process to collect the errors and store them in a file as previously described. When the build system encounters an error, it includes a command as part of the console output. You can run the command to send the error file to the server. For example, the -following command sends the errors to an upstream server:: +following command sends the errors to an upstream server: + +.. code-block:: console $ send-error-report /home/brandusa/project/poky/build/tmp/log/error-report/error_report_201403141617.txt
@@ -52,7 +54,9 @@ In the previous example, the errors are sent to a public database available at https://errors.yoctoproject.org, which is used by the entire community. If you specify a particular server, you can send the errors to a different database. Use the following command for more -information on available options:: +information on available options: + +.. code-block:: console $ send-error-report --help
documentation/dev-manual/gobject-introspection.rst +3 -1
@@ -123,7 +123,9 @@ working in an image: #. Launch a Terminal and then start Python in the terminal. -#. Enter the following in the terminal:: +#. Enter the following in the terminal: + + .. code-block:: text >>> from gi.repository import GLib >>> GLib.get_host_name()
documentation/dev-manual/hashequivserver.rst +6 -2
@@ -20,7 +20,9 @@ Hash Equivalence Server Setup From this point onwards, the commands displayed below are assumed to be run from the :term:`BitBake` repository, which can be found :oe_git:`here </bitbake>`. -To start a basic Hash Equivalence server, one could simply run:: +To start a basic Hash Equivalence server, one could simply run: + +.. code-block:: console $ ./bin/bitbake-hashserv
@@ -124,6 +126,8 @@ With ``hashequiv.json`` containing the following content: } This will make Hash Equivalence related changes be printed on the console, such -as:: +as: + +.. code-block:: text NOTE: Task <recipe.bb>:do_<task> unihash changed to dc0da29c62a2d78d8d853fbb9c173778fe7d6fa4a68c67494b17afffe8ca1894
documentation/dev-manual/layers.rst +39 -13
127 lines not on this page · raw message
documentation/dev-manual/libraries.rst +6 -2
@@ -135,12 +135,16 @@ on this particular tuning, see The example then includes ``lib32-glib-2.0`` in all the images, which illustrates one method of including a multiple library dependency. You -can use a normal image build to include this dependency, for example:: +can use a normal image build to include this dependency, for example: + +.. code-block:: console $ bitbake core-image-sato You can also build Multilib packages -specifically with a command like this:: +specifically with a command like this: + +.. code-block:: console $ bitbake lib32-glib-2.0
documentation/dev-manual/limiting-resources.rst +6 -2
@@ -102,7 +102,9 @@ details. This script can be stopped by pressing Control + C. - #. Then, start a heavy-load build, for example:: + #. Then, start a heavy-load build, for example: + + .. code-block:: console $ bitbake virtual/kernel -c compile -f
@@ -140,7 +142,9 @@ details. This variable will limit the number of threads :term:`BitBake` will start by monitoring the current CPU load of the host system. :term:`BitBake` will print the following when the limit set by :term:`BB_LOADFACTOR_MAX` is - reached:: + reached: + + .. code-block:: text Load average limiting set to True as load average: 0.7188262939453125 - using 37/64 bitbake threads
documentation/dev-manual/multiconfig.rst +15 -5
@@ -91,11 +91,15 @@ Follow these steps to set up and execute multiple configuration builds: with "". - *Launch BitBake*: Use the following BitBake command form to launch - the multiple configuration build:: + the multiple configuration build: + + .. code-block:: console $ bitbake [mc:multiconfigname:]target [[[mc:multiconfigname:]target] ... ] - For the example in this section, the following command applies:: + For the example in this section, the following command applies: + + .. code-block:: console $ bitbake mc:x86:core-image-minimal mc:arm:core-image-sato mc::core-image-base
@@ -150,7 +154,9 @@ task on which the :ref:`ref-tasks-image` task in the recipe depends is the with the "arm" multiconfig. Once you set up this dependency, you can build the "x86" multiconfig -using a BitBake command as follows:: +using a BitBake command as follows: + +.. code-block:: console $ bitbake mc:x86:core-image-sato
@@ -192,7 +198,9 @@ Suggested best practices the deployed item based on :term:`TMPDIR`. The :ref:`ref-tasks-install` and :ref:`ref-tasks-deploy` tasks should look - like this:: + like this: + + .. code-block:: text do_install() { install -m 0644 ${TMPDIR}-<multiconfig>/tmp/deploy/images/<machine>/somefile ${D}/some/path
@@ -261,7 +269,9 @@ following that the file is named ``my-firmware.elf``. Building the firmware --------------------- -The firmware can be built with BitBake with the following command:: +The firmware can be built with BitBake with the following command: + +.. code-block:: console $ bitbake mc:baremetal-firmware:my-firmware
documentation/dev-manual/new-machine.rst +3 -1
@@ -104,7 +104,9 @@ contains directories for specific machines such as ``qemuarm`` and defaults, see the ``meta/recipes-bsp/formfactor/files/config`` file found in the same area. -Here is an example for "qemuarm" machine:: +Here is an example for "qemuarm" machine: + +.. code-block:: shell HAVE_TOUCHSCREEN=1 HAVE_KEYBOARD=1
documentation/dev-manual/new-recipe.rst +27 -9
@@ -74,7 +74,9 @@ license requirements, and checksums configured. To run the tool, you just need to be in your :term:`Build Directory` and have sourced the build environment setup script (i.e. :ref:`structure-core-script`). To get help on the tool, use the following -command:: +command: + +.. code-block:: console $ recipetool -h NOTE: Starting bitbake server...
@@ -104,19 +106,25 @@ locates it properly in the layer that contains your source files. Here are some syntax examples: - Use this syntax to generate a recipe based on source. Once generated, - the recipe resides in the existing source code layer:: + the recipe resides in the existing source code layer: + + .. code-block:: console $ recipetool create -o OUTFILE source - Use this syntax to generate a recipe using code that you extract from source. The extracted code is placed in its own layer - defined by :term:`EXTERNALSRC`:: + defined by :term:`EXTERNALSRC`: + + .. code-block:: console $ recipetool create -o OUTFILE -x EXTERNALSRC source - Use this syntax to generate a recipe based on source. The options direct ``recipetool`` to generate debugging information. Once generated, - the recipe resides in the existing source code layer:: + the recipe resides in the existing source code layer: + + .. code-block:: console $ recipetool create -d -o OUTFILE source
@@ -182,7 +190,9 @@ the recipe. ":ref:`dev-manual/layers:understanding and creating layers`" section. - *Naming Your Recipe:* When you name your recipe, you need to follow - this naming convention:: + this naming convention: + + .. code-block:: text basename_version.bb
@@ -208,7 +218,9 @@ progressively discover and add information to the recipe file. Assuming you have sourced the build environment setup script (i.e. :ref:`structure-core-script`) and you are in the :term:`Build Directory`, use BitBake to process your recipe. All you need to provide is the -``basename`` of the recipe as described in the previous section:: +``basename`` of the recipe as described in the previous section: + +.. code-block:: console $ bitbake basename
@@ -220,7 +232,9 @@ compilation and packaging files, and so forth. The path to the per-recipe temporary work directory depends on the context in which it is being built. The quickest way to find this path -is to use the ``bitbake-getvar`` utility:: +is to use the ``bitbake-getvar`` utility: + +.. code-block:: console $ bitbake-getvar -r basename WORKDIR
@@ -231,7 +245,9 @@ top-level folder named ``bitbake-builds``, a default :term:`Build Directory` at Furthermore, suppose your recipe is named ``foo_1.3.0.bb``. In this case, the work directory the build system uses to build the package -would be as follows:: +would be as follows: + +.. code-block:: text bitbake-builds/build/tmp/work/cortexa57-poky-linux/foo/1.3.0
@@ -289,7 +305,9 @@ recipe to match the new version. Here is a simple example from the :oe_git:`strace recipe </openembedded-core/tree/meta/recipes-devtools/strace>` where the source comes from a single tarball. Notice the use of the -:term:`PV` variable:: +:term:`PV` variable: + +.. code-block:: text SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/strace-${PV}.tar.xz \
documentation/dev-manual/packages.rst +42 -14
137 lines not on this page · raw message
documentation/dev-manual/prebuilt-libraries.rst +3 -1
@@ -27,7 +27,9 @@ Versioned Libraries In this example we work with pre-built libraries for the FT4222H USB I/O chip. Libraries are built for several target architecture variants and packaged in -an archive as follows:: +an archive as follows: + +.. code-block:: text ├── build-arm-hisiv300 │ └── libft4222.so.1.4.4.44
documentation/dev-manual/python-development-shell.rst +3 -1
@@ -37,7 +37,9 @@ helpful when debugging a build or preparing software to be used with the OpenEmbedded build system. Here is an example that uses ``pydevshell`` on a target named -``matchbox-desktop``:: +``matchbox-desktop``: + +.. code-block:: console $ bitbake matchbox-desktop -c pydevshell
documentation/dev-manual/qemu.rst +36 -12
113 lines not on this page · raw message
documentation/dev-manual/quilt.rst +12 -4
@@ -32,13 +32,17 @@ Follow these general steps: #. *Create a New Patch:* Before modifying source code, you need to create a new patch. To create a new patch file, use ``quilt new`` as - below:: + below: + + .. code-block:: console $ quilt new my_changes.patch #. *Notify Quilt and Add Files:* After creating the patch, you need to notify Quilt about the files you plan to edit. You notify Quilt by - adding the files to the patch you just created:: + adding the files to the patch you just created: + + .. code-block:: console $ quilt add file1.c file2.c file3.c
@@ -47,7 +51,9 @@ Follow these general steps: #. *Test Your Changes:* Once you have modified the source code, the easiest way to test your changes is by calling the :ref:`ref-tasks-compile` - task as shown in the following example:: + task as shown in the following example: + + .. code-block:: console $ bitbake -c compile -f package
@@ -67,7 +73,9 @@ Follow these general steps: #. *Generate the Patch:* Once your changes work as expected, you need to use Quilt to generate the final patch that contains all your - modifications:: + modifications: + + .. code-block:: console $ quilt refresh
documentation/dev-manual/sstate-mirrors-setup.rst +6 -2
@@ -119,7 +119,9 @@ Going Further The recommended way to do that is by setting the following parameters in ``$HOME/.netrc`` (``$HOME`` being the :term:`build host` home - directory):: + directory): + + .. code-block:: text machine someserver.tld login <user>
@@ -134,7 +136,9 @@ Going Further Another method to configure the username and password is from the URL in :term:`SSTATE_MIRRORS` directly, with the ``user`` and ``pswd`` - parameters:: + parameters: + + .. code-block:: text SSTATE_MIRRORS ?= "\ file://.* https://someserver.tld/share/sstate/PATH;user=<user>;pswd=<password>;downloadfilename=PATH \
documentation/dev-manual/start.rst +18 -6
@@ -370,7 +370,9 @@ your Yocto Project build host: <https://learn.microsoft.com/en-us/windows/wsl/install-on-server>`__. To check which build version you are running, you may open a command - prompt on Windows and execute the command "ver":: + prompt on Windows and execute the command "ver": + + .. code-block:: doscon C:\Users\myuser> ver
@@ -387,7 +389,9 @@ your Yocto Project build host: distribution. #. *Check which Linux distribution WSL 2 is using:* Open a Windows - PowerShell and run:: + PowerShell and run: + + .. code-block:: doscon C:\WINDOWS\system32> wsl -l -v NAME STATE VERSION
@@ -412,7 +416,9 @@ your Yocto Project build host: 1. *Find the location of your VHDX file:* First you need to find the distro app package directory, to achieve this - open a Windows Powershell as Administrator and run:: + open a Windows Powershell as Administrator and run: + + .. code-block:: doscon C:\WINDOWS\system32> Get-AppxPackage -Name "*Ubuntu*" | Select PackageFamilyName PackageFamilyName
@@ -422,7 +428,9 @@ your Yocto Project build host: You should now replace the PackageFamilyName and your user on the following path - to find your VHDX file:: + to find your VHDX file: + + .. code-block:: doscon C:\WINDOWS\system32> ls C:\Users\myuser\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79abcdefgh\LocalState Mode LastWriteTime Length Name
@@ -435,7 +443,9 @@ your Yocto Project build host: To use the ``optimize-vhd`` cmdlet below, first install the Hyper-V option on Windows. Then, open a Windows Powershell as Administrator to - optimize your VHDX file, shutting down WSL first:: + optimize your VHDX file, shutting down WSL first: + + .. code-block:: doscon C:\WINDOWS\system32> wsl --shutdown C:\WINDOWS\system32> optimize-vhd -Path C:\Users\myuser\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79abcdefgh\LocalState\ext4.vhdx -Mode full
@@ -449,7 +459,9 @@ your Yocto Project build host: The ``optimize-vhd`` cmdlet noted in step 2a above is provided by Hyper-V. Not all SKUs of Windows can install Hyper-V. As an alternative, use the DiskPart tool. To start, open a Windows command prompt as - Administrator to optimize your VHDX file, shutting down WSL first:: + Administrator to optimize your VHDX file, shutting down WSL first: + + .. code-block:: doscon C:\WINDOWS\system32> wsl --shutdown C:\WINDOWS\system32> diskpart
documentation/dev-manual/temporary-source-code.rst +9 -3
@@ -35,13 +35,17 @@ You should be aware that many recipes override the directory which matches value of ${BP} exactly). The path to the unpack directory for the recipe -(:term:`UNPACKDIR`) is defined as follows:: +(:term:`UNPACKDIR`) is defined as follows: + +.. code-block:: text ${WORKDIR}/sources In turn, the path to the work directory for the recipe (:term:`WORKDIR`) is defined as -follows:: +follows: + +.. code-block:: text ${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}/${PN}/${PV}
@@ -61,7 +65,9 @@ As an example, assume a Source Directory top-level folder named ``project``, a default :term:`Build Directory` at ``project/build``, and a ``qemux86-poky-linux`` machine target system. Furthermore, suppose your recipe is named ``foo_1.3.0.bb``. In this case, the work directory the -build system uses to build the package would be as follows:: +build system uses to build the package would be as follows: + +.. code-block:: text project/build/tmp/work/qemux86-poky-linux/foo/1.3.0
documentation/dev-manual/upgrading-recipes.rst +57 -19
174 lines not on this page · raw message
documentation/dev-manual/wayland.rst +6 -2
@@ -78,13 +78,17 @@ Alternatively, you can run Weston through the command-line interpretor (CLI), which is better suited for development work. To run Weston under the CLI, you need to do the following after your image is built: -#. Run these commands to export ``XDG_RUNTIME_DIR``:: +#. Run these commands to export ``XDG_RUNTIME_DIR``: + + .. code-block:: console user@machine:~$ mkdir -p /tmp/$USER-weston user@machine:~$ chmod 0700 /tmp/$USER-weston user@machine:~$ export XDG_RUNTIME_DIR=/tmp/$USER-weston -#. Launch Weston in the shell:: +#. Launch Weston in the shell: + + .. code-block:: console user@machine:~$ weston
documentation/dev-manual/x32-psabi.rst +3 -1
@@ -48,7 +48,9 @@ configuration file as follows:: Once you have set up your configuration file, use BitBake to build an image that supports -the x32 psABI. Here is an example:: +the x32 psABI. Here is an example: + +.. code-block:: console $ bitbake core-image-sato
Signature · 1 line
2.50.0.173.g8b6f19ccfc3a
PATCH 6/16 migration-guides: state the language of the blocks that are not BitBake
In reply to Trevor WoernerThe manuals are moving to a default of bitbake for code blocks, so a BitBake block needs no language and every other block needs one. This gives the blocks in this manual that are not BitBake their language.
AI-Generated: codex/claude-opus 5.5 (xhigh)
--- .../migration-guides/migration-1.3.rst | 4 +++- .../migration-guides/migration-1.4.rst | 8 +++++-- .../migration-guides/migration-1.7.rst | 4 +++- .../migration-guides/migration-2.0.rst | 4 +++- .../migration-guides/migration-2.1.rst | 8 +++++-- .../migration-guides/migration-2.2.rst | 16 +++++++++---- .../migration-guides/migration-2.3.rst | 8 +++++-- .../migration-guides/migration-2.5.rst | 8 +++++-- .../migration-guides/migration-2.6.rst | 8 +++++-- .../migration-guides/migration-3.4.rst | 4 +++- .../migration-guides/migration-4.0.rst | 8 +++++-- .../migration-guides/migration-4.1.rst | 8 +++++-- .../migration-guides/migration-5.2.rst | 12 +++++++--- .../migration-guides/migration-5.3.rst | 24 ++++++++++++++----- .../migration-guides/migration-6.0.rst | 22 ++++++++++++----- .../migration-guides/migration-6.1.rst | 8 +++++-- .../migration-guides/release-notes-4.2.rst | 4 +++- .../migration-guides/release-notes-5.1.rst | 4 +++- .../migration-guides/release-notes-5.3.rst | 16 +++++++++---- 19 files changed, 133 insertions(+), 45 deletions(-)
documentation/migration-guides/migration-1.3.rst +3 -1
@@ -184,7 +184,9 @@ include :term:`PE` as part of the filename:: Because the :term:`PE` variable is not set by default, these binary files could result with names that include two dash characters. Here is an -example:: +example: + +.. code-block:: text bzImage--3.10.9+git0+cd502a8814_7144bcc4b8-r0-qemux86-64-20130830085431.bin
documentation/migration-guides/migration-1.4.rst +6 -2
@@ -42,7 +42,9 @@ Differences include the following: - *Shared State Code:* The shared state code has been optimized to avoid running unnecessary tasks. For example, the following no longer - populates the target sysroot since that is not necessary:: + populates the target sysroot since that is not necessary: + + .. code-block:: console $ bitbake -c rootfs some-image
@@ -137,7 +139,9 @@ Target Package Management with RPM If runtime package management is enabled and the RPM backend is selected, Smart is now installed for package download, dependency resolution, and upgrades instead of Zypper. For more information on how -to use Smart, run the following command on the target:: +to use Smart, run the following command on the target: + +.. code-block:: text smart --help
documentation/migration-guides/migration-1.7.rst +3 -1
@@ -80,7 +80,9 @@ disable the scripts due to the scripts previously requiring error-prone path substitution. Software that links against these libraries using these scripts should use the much more robust ``pkg-config`` instead. The list of recipes changed in this version (and their configuration -scripts) is as follows:: +scripts) is as follows: + +.. code-block:: text directfb (directfb-config) freetype (freetype-config)
documentation/migration-guides/migration-2.0.rst +3 -1
@@ -92,7 +92,9 @@ unlikely to require any changes to Metadata. However, these minor changes in behavior exist: - All potential overrides are now visible in the variable history as - seen when you run the following:: + seen when you run the following: + + .. code-block:: console $ bitbake -e
documentation/migration-guides/migration-2.1.rst +6 -2
@@ -44,7 +44,9 @@ defaulted to False if not specified. Now, however, no default exists so one must be specified. You must change any ``getVar()`` calls that do not specify the final expand parameter to calls that do specify the parameter. You can run the following ``sed`` command at the base of a -layer to make this change:: +layer to make this change: + +.. code-block:: console $ sed -e 's:\(\.getVar([^,()]*\)):\1, False):g' -i `grep -ril getVar *` $ sed -e 's:\(\.getVarFlag([^,()]*,[^,()]*\)):\1, False):g' -i `grep -ril getVarFlag *`
@@ -367,7 +369,9 @@ These additional changes exist: - Previously, the following list of packages were removed if package-management was not in :term:`IMAGE_FEATURES`, regardless of any - dependencies:: + dependencies: + + .. code-block:: text update-rc.d base-passwd
documentation/migration-guides/migration-2.2.rst +12 -4
@@ -145,7 +145,9 @@ The new ``runqemu`` is a Python script. Machine knowledge is no longer hardcoded into ``runqemu``. You can choose to use the ``qemuboot`` configuration file to define the BSP's own arguments and to make it bootable with ``runqemu``. If you use a configuration file, use the -following form:: +following form: + +.. code-block:: text image-name-machine.qemuboot.conf
@@ -160,7 +162,9 @@ rootfs). QEMU boot arguments can be set in BSP's configuration file and the ``qemuboot`` class will save them to ``qemuboot.conf``. If you want to use ``runqemu`` without a configuration file, use the -following command form:: +following command form: + +.. code-block:: console $ runqemu machine rootfs kernel [options]
@@ -178,12 +182,16 @@ Supported machines are as follows: Consider the following example, which uses the ``qemux86-64`` machine, provides a -root filesystem, provides an image, and uses the ``nographic`` option:: +root filesystem, provides an image, and uses the ``nographic`` option: + +.. code-block:: console $ runqemu qemux86-64 tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.ext4 tmp/deploy/images/qemux86-64/bzImage nographic Here is a list of variables that can be set in configuration files -such as ``bsp.conf`` to enable the BSP to be booted by ``runqemu``:: +such as ``bsp.conf`` to enable the BSP to be booted by ``runqemu``: + +.. code-block:: text QB_SYSTEM_NAME: QEMU name (e.g. "qemu-system-i386") QB_OPT_APPEND: Options to append to QEMU (e.g. "-show-cursor")
documentation/migration-guides/migration-2.3.rst +6 -2
@@ -116,7 +116,9 @@ Changes to Scripts The following changes to scripts took place: - ``oe-find-native-sysroot``: The usage for the - ``oe-find-native-sysroot`` script has changed to the following:: + ``oe-find-native-sysroot`` script has changed to the following: + + .. code-block:: console $ . oe-find-native-sysroot recipe
@@ -125,7 +127,9 @@ The following changes to scripts took place: was not necessary to provide the script with the command. - ``oe-run-native``: The usage for the ``oe-run-native`` script has - changed to the following:: + changed to the following: + + .. code-block:: console $ oe-run-native native_recipe tool
documentation/migration-guides/migration-2.5.rst +6 -2
@@ -136,11 +136,15 @@ BitBake Changes tree" tasks have been removed (e.g. ``fetchall``, ``checkuriall``, and the ``*all`` tasks provided by the ``distrodata`` and :ref:`ref-classes-archiver` classes). There is a BitBake option to complete this for - any arbitrary task. For example:: + any arbitrary task. For example: + + .. code-block:: console $ bitbake <target> -c fetchall - should now be replaced with:: + should now be replaced with: + + .. code-block:: console $ bitbake <target> --runall=fetch
documentation/migration-guides/migration-2.6.rst +6 -2
@@ -166,7 +166,9 @@ The following changes have been made: IMAGE_VERSION_SUFFIX = "-${DATETIME}" -- Several variables have changed names for consistency:: +- Several variables have changed names for consistency: + + .. code-block:: text Old Variable Name New Variable Name ========================================================
@@ -288,7 +290,9 @@ avoids the ``systemd`` recipe from becoming machine-specific for cases where machine-specific configurations need to be applied (e.g. for ``qemu*`` machines). -Currently, the new recipe packages the following files:: +Currently, the new recipe packages the following files: + +.. code-block:: text ${sysconfdir}/machine-id ${sysconfdir}/systemd/coredump.conf
documentation/migration-guides/migration-3.4.rst +3 -1
@@ -67,7 +67,9 @@ may be the same as a :term:`DISTRO` override causing some confusion. We do plan to try and improve consistency as these issues are identified. To help with migration of layers, a script has been provided in OE-Core. -Once configured with the overrides used by a layer, this can be run as:: +Once configured with the overrides used by a layer, this can be run as: + +.. code-block:: text <oe-core>/scripts/contrib/convert-overrides.py <layerdir>
documentation/migration-guides/migration-4.0.rst +6 -2
@@ -65,7 +65,9 @@ A :oe_git:`convert-variable-renames.py script is provided to convert your recipes and configuration, and also warns you about the use of problematic words. The script performs changes and you need to review them before committing. An example warning -looks like:: +looks like: + +.. code-block:: text poky/scripts/lib/devtool/upgrade.py needs further work at line 275 since it contains abort
@@ -254,7 +256,9 @@ Miscellaneous changes these with ``cortexa72`` and ``cortexa72-crypto`` respectively. - The Python development shell (previously known as ``devpyshell``) feature has been - renamed to ``pydevshell``. To start it you should now run:: + renamed to ``pydevshell``. To start it you should now run: + + .. code-block:: console $ bitbake <target> -c pydevshell
documentation/migration-guides/migration-4.1.rst +6 -2
@@ -166,11 +166,15 @@ Miscellaneous changes :ref:`ref-classes-archiver` class then you may need to adjust it to the new structure. - If you are not using `systemd` then udev is now configured to use labels - (``LABEL`` or ``PARTLABEL``) to set the mount point for the device. For example:: + (``LABEL`` or ``PARTLABEL``) to set the mount point for the device. For example: + + .. code-block:: text /run/media/rootfs-sda2 - instead of:: + instead of: + + .. code-block:: text /run/media/sda2
documentation/migration-guides/migration-5.2.rst +9 -3
@@ -85,7 +85,9 @@ systemd changes the other service files were automatically added to the :term:`FILES` variable of the same package. Example: - a.service contains:: + a.service contains: + + .. code-block:: ini [Install] Also=b.service
@@ -130,7 +132,9 @@ key toolchain providers listed in ``BB_VIRTUAL_RECIPE_PROVIDERS``. As part of that support, the ``cross`` providers were simplified to remove the triplet prefix (:term:`TARGET_PREFIX`, :term:`SDK_PREFIX` and :term:`HOST_PREFIX`) and generalise the naming. Here are examples of how references to these variables -can be changed to use the new ``cross`` syntax:: +can be changed to use the new ``cross`` syntax: + +.. code-block:: text virtual/${HOST_PREFIX}binutils -> virtual/cross-binutils virtual/${TARGET_PREFIX}binutils -> virtual/cross-binutils
@@ -145,7 +149,9 @@ can be changed to use the new ``cross`` syntax:: virtual/${TARGET_PREFIX}g++ -> virtual/cross-c++ -A :term:`PREFERRED_PROVIDER` assignment can be transformed as follows:: +A :term:`PREFERRED_PROVIDER` assignment can be transformed as follows: + +.. code-block:: text PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}binutils -> PREFERRED_PROVIDER_virtual/cross-binutils PREFERRED_PROVIDER_virtual/${SDK_PREFIX}binutils -> PREFERRED_PROVIDER_virtual/cross-binutils:class-nativesdk
documentation/migration-guides/migration-5.3.rst +18 -6
@@ -81,16 +81,22 @@ How to make those adjustments without tedious manual editing ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The following sed command can be used to remove S = "${WORKDIR}/git -across a whole layer:: +across a whole layer: + +.. code-block:: console $ sed -i "/^S = \"\${WORKDIR}\/git\"/d" `find . -name '*.bb' -o -name '*.inc' -o -name '*.bbclass'` Then, the following command can tweak the remaining :term:`S` assignments to -refer to :term:`UNPACKDIR` instead of :term:`WORKDIR`:: +refer to :term:`UNPACKDIR` instead of :term:`WORKDIR`: + +.. code-block:: console $ sed -i "s/^S = \"\${WORKDIR}\//S = \"\${UNPACKDIR}\//g" `find . -name '*.bb' -o -name '*.inc' -o -name '*.bbclass'` -The first change can introduce a lot of consecutive empty lines, so those can be removed with:: +The first change can introduce a lot of consecutive empty lines, so those can be removed with: + +.. code-block:: console $ sed -i -z -E 's/([ \t\f\v\r]*\n){3,}/\n\n/g' `find . -name '*.bb' -o -name '*.inc'`
@@ -108,7 +114,9 @@ Space around equal assignment ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ A new warning is now printed when there are no whitespaces around an ``=`` -assignment in recipes:: +assignment in recipes: + +.. code-block:: text <filename>:<line number> has a lack of whitespace around the assignment: '<assignment>'
@@ -310,11 +318,15 @@ The following classes have been removed in this release: KERNEL_CLASSES += "kernel-fit-extra-artifacts" #. Use the specific FIT image recipe rather than the base kernel recipe. - For example, instead of:: + For example, instead of: + + .. code-block:: console $ bitbake linux-yocto - the FIT image is now build by:: + the FIT image is now build by: + + .. code-block:: console $ bitbake linux-yocto-fitimage
documentation/migration-guides/migration-6.0.rst +16 -6
@@ -261,12 +261,16 @@ See commit :oecore_rev:`68d2d38483efada7bc2409e10508b03a7431caff` for more infor Image recipes that inherit the :ref:`ref-classes-vex` class have an extra JSON document generated which was previously ending with the ``.json`` suffix. For example, a build for the ``core-image-minimal`` image recipe with this class -inherited would have resulted in a file named:: +inherited would have resulted in a file named: + +.. code-block:: text core-image-minimal-qemuarm64.rootfs.json The suffix of this file is now ``.vex.json``. Taking the above example, the same -file is now named:: +file is now named: + +.. code-block:: text core-image-minimal-qemuarm64.rootfs.vex.json
@@ -276,7 +280,7 @@ Support for SPDX 2.2 removed Support for generating SPDX 2.2 document through the ``create-spdx-2.2`` class was removed: -.. code-block:: +.. code-block:: text Removes SPDX 2.2 support in favor of SPDX 3 support being the only option. The SPDX 3 data is far superior to SPDX 2.2 and thus more useful
@@ -388,7 +392,9 @@ size of the partitions generated by the :doc:`WIC </dev-manual/wic>` tool. The replaces this variable. While this variable can still be used in recipes, a warning is now printed on -the console when used:: +the console when used: + +.. code-block:: text DEPRECATED: WIC_SECTOR_SIZE is deprecated, use the --sector-size command-line argument instead.
@@ -414,13 +420,17 @@ files) should be moved to the ``files/wic/`` directory of the layer containing them. If not done, the build will fail with errors indicating how to move these files, -for example:: +for example: + +.. code-block:: text wic/wks files at ../meta-custom/wic need to be moved to files/wic within the layer to be found/used wic/wks files at ../meta-custom/scripts/lib/wic/canned-wks need to be moved to files/wic within the layer to be found/used For example, here is the content of the :term:`OpenEmbedded-Core (OE-Core)` -"meta" layer as of writing:: +"meta" layer as of writing: + +.. code-block:: text meta/files/wic ├── common.wks.inc
documentation/migration-guides/migration-6.1.rst +6 -2
@@ -65,11 +65,15 @@ The ``oe.utils.all_distro_features()`` and ``oe.utils.any_distro_features()`` functions have been removed from :term:`OpenEmbedded-Core (OE-Core)`. Those can be replaced by ``bb.utils.contains()`` and ``bb.utils.contains_any()`` -calls:: +calls: + +.. code-block:: text oe.utils.all_distro_features("x y", ...) -> bb.utils.contains("DISTRO_FEATURES", "x y", ...) -And:: +And: + +.. code-block:: text oe.utils.any_distro_features("x y", ...) -> bb.utils.contains_any("DISTRO_FEATURES", "x y", ...)
documentation/migration-guides/release-notes-4.2.rst +3 -1
@@ -171,7 +171,9 @@ New Features / Enhancements in 4.2 which is a thin wrapper over :oe_git:`resulttool </openembedded-core/tree/scripts/resulttool>`. Here is an example command, which allowed to spot and fix a regression in the - ``quilt`` ptest:: + ``quilt`` ptest: + + .. code-block:: console $ yocto_testresults_query.py regression-report 4.2_M1 4.2_M2
documentation/migration-guides/release-notes-5.1.rst +3 -1
@@ -166,7 +166,9 @@ New Features / Enhancements in 5.1 - ``fetcher2``: remote name for ``git://`` is now ``origin`` by default. - - Codeparser now supports shell substitution in quotes, for example:: + - Codeparser now supports shell substitution in quotes, for example: + + .. code-block:: shell var1="$(cmd1 ...)"
documentation/migration-guides/release-notes-5.3.rst +12 -4
@@ -85,7 +85,9 @@ New Features / Enhancements in |yocto-ver| Listing these built-in fragments can be done with :oe_git:`bitbake-config-build list-fragments</bitbake/tree/bin/bitbake-config-build>`, which could - list:: + list: + + .. code-block:: text Available built-in fragments: machine/... Sets MACHINE = ...
@@ -257,7 +259,9 @@ New Features / Enhancements in |yocto-ver| https://web.archive.org/web/20240420122324/https://www.linuxkernelcves.com/). - ``kernel-yocto``: allow annotated options to be modified. For example if - the following kernel configuration is set:: + the following kernel configuration is set: + + .. code-block:: ini CONFIG_INET_TUNNEL=y # OVERRIDE:$MODULE_OR_Y
@@ -464,7 +468,9 @@ New Features / Enhancements in |yocto-ver| - ``runqemu``: - The script can now run compressed images with snapshot mode. For - example, with :term:`IMAGE_FSTYPES` containing ``ext4.zst``, you can run:: + example, with :term:`IMAGE_FSTYPES` containing ``ext4.zst``, you can run: + + .. code-block:: console $ runqemu snapshot ext4.zst <image-recipe>
@@ -704,7 +710,9 @@ New Features / Enhancements in |yocto-ver| - When using the ``ipk`` and ``rpm`` package managers, give out more possible reasons about unmatched packages. - For example:: + For example: + + .. code-block:: text E: Package 'catch2' has no installation candidate catch2 is a recipe. Its generated packages are: ['catch2-src', 'catch2-dbg', 'catch2-staticdev', 'catch2-dev', 'catch2-doc']
Signature · 1 line
2.50.0.173.g8b6f19ccfc3a
PATCH 7/16 overview-manual: state the language of the blocks that are not BitBake
In reply to Trevor WoernerThe manuals are moving to a default of bitbake for code blocks, so a BitBake block needs no language and every other block needs one. This gives the blocks in this manual that are not BitBake their language.
AI-Generated: codex/claude-opus 5.5 (xhigh)
--- documentation/overview-manual/concepts.rst | 48 ++++++++++++++----- .../development-environment.rst | 8 +++- 2 files changed, 42 insertions(+), 14 deletions(-)
documentation/overview-manual/concepts.rst +36 -12
@@ -63,7 +63,9 @@ This section briefly introduces BitBake. If you want more information on BitBake, see the :doc:`BitBake User Manual <bitbake:index>`. To see a list of the options BitBake supports, use either of the -following commands:: +following commands: + +.. code-block:: console $ bitbake -h $ bitbake --help
@@ -73,7 +75,9 @@ The most common usage for BitBake is ``bitbake recipename``, where to as the "target"). The target often equates to the first part of a recipe's filename (e.g. "foo" for a recipe file named ``foo_1.3.0.bb``). So, to process the ``matchbox-desktop_1.2.3.bb`` recipe file, you might -type the following:: +type the following: + +.. code-block:: console $ bitbake matchbox-desktop
@@ -913,7 +917,9 @@ list of files for ``${PN}-dev``, also defined in :oe_git:`bitbake.conf The paths in this list must be *absolute* paths from the point of view of the root filesystem on the target, and must *not* make a reference to the variable -:term:`D` or any :term:`WORKDIR` related variable. A correct example would be:: +:term:`D` or any :term:`WORKDIR` related variable. A correct example would be: + +.. code-block:: text ${sysconfdir}/foo.conf
@@ -930,7 +936,9 @@ package. .. note:: To find out which package installs a file, the ``oe-pkgdata-util`` - command-line utility can be used:: + command-line utility can be used: + + .. code-block:: console $ oe-pkgdata-util find-path '/etc/fstab' base-files: /etc/fstab
@@ -1057,13 +1065,17 @@ the image. The formats used for the root filesystem depend on the support compression. As an example, a dynamically created task when creating a particular -image type would take the following form:: +image type would take the following form: + +.. code-block:: text do_image_type So, if the type as specified by the :term:`IMAGE_FSTYPES` were ``ext4``, the dynamically -generated task would be as follows:: +generated task would be as follows: + +.. code-block:: text do_image_ext4
@@ -1456,7 +1468,9 @@ compiler is what BitBake uses to compile source files when creating the target image. You can think of it simply as an automatically generated cross-compiler that is used internally within BitBake only. -The chain of events that occurs when the standard toolchain is bootstrapped:: +The chain of events that occurs when the standard toolchain is bootstrapped: + +.. code-block:: text gcc -> virtual/cross-binutils -> linux-libc-headers -> virtual/cross-cc -> libgcc-initial -> virtual/libc -> libgcc -> virtual/compilerlibs
@@ -1505,7 +1519,9 @@ Host. can take advantage of pre-built images that ship with the Yocto Project and already contain cross-development toolchain installers. -Here is the bootstrap process for the relocatable toolchain:: +Here is the bootstrap process for the relocatable toolchain: + +.. code-block:: text gcc -> virtual/cross-binutils -> linux-libc-headers -> virtual/cross-cc -> libgcc-initial -> virtual/libc -> gcc-cross-canadian/clang-cross-canadian
@@ -2252,7 +2268,9 @@ which is integrating ``sayhello`` in our root file system: #. Add ``sayhello`` to :term:`IMAGE_INSTALL` to integrate it into the root file system -The contents of ``libhello/Makefile`` are:: +The contents of ``libhello/Makefile`` are: + +.. code-block:: make LIB=libhello.so
@@ -2280,7 +2298,9 @@ The contents of ``libhello/Makefile`` are:: and ``CFLAGS`` as BitBake will set them as environment variables according to your build configuration. -The contents of ``libhello/hellolib.h`` are:: +The contents of ``libhello/hellolib.h`` are: + +.. code-block:: c #ifndef HELLOLIB_H #define HELLOLIB_H
@@ -2289,7 +2309,9 @@ The contents of ``libhello/hellolib.h`` are:: #endif -The contents of ``libhello/hellolib.c`` are:: +The contents of ``libhello/hellolib.c`` are: + +.. code-block:: c #include <stdio.h>
@@ -2312,7 +2334,9 @@ The contents of ``sayhello/Makefile`` are: clean: rm -rf $(EXEC) *.o -The contents of ``sayhello/sayhello.c`` are:: +The contents of ``sayhello/sayhello.c`` are: + +.. code-block:: c #include <hellolib.h>
documentation/overview-manual/development-environment.rst +6 -2
@@ -400,7 +400,9 @@ local working area (also called a branch) that tracks a specific development branch from the upstream source Git repository. In other words, you can define your local Git environment to work on any development branch in the repository. To help illustrate, consider the -following example Git commands:: +following example Git commands: + +.. code-block:: console $ cd ~ $ git clone https://git.yoctoproject.org/yocto-docs -b &DISTRO_NAME_NO_CAP;
@@ -439,7 +441,9 @@ create and check out a local working Git branch based on a tag name. When you do this, you get a snapshot of the Git repository that reflects the state of the files when the change was made associated with that tag. The most common use is to check out a working branch that matches a -specific Yocto Project release. Here is an example:: +specific Yocto Project release. Here is an example: + +.. code-block:: console $ cd ~ $ git clone https://git.yoctoproject.org/yocto-docs
Signature · 1 line
2.50.0.173.g8b6f19ccfc3a
PATCH 8/16 profile-manual: state the language of the blocks that are not BitBake
In reply to Trevor WoernerThe manuals are moving to a default of bitbake for code blocks, so a BitBake block needs no language and every other block needs one. This gives the blocks in this manual that are not BitBake their language.
AI-Generated: codex/claude-opus 5.5 (xhigh)
--- documentation/profile-manual/intro.rst | 8 +- documentation/profile-manual/usage.rst | 384 ++++++++++++++++++------- 2 files changed, 294 insertions(+), 98 deletions(-)
documentation/profile-manual/intro.rst +6 -2
@@ -36,7 +36,9 @@ after adding ``tools-profile`` to the :term:`EXTRA_IMAGE_FEATURES` variable. So, in order to be able to access all of the tools described here, you can build and boot -an ``sdk`` image, perhaps one of:: +an ``sdk`` image, perhaps one of: + +.. code-block:: console $ bitbake core-image-sato-sdk $ bitbake core-image-weston-sdk
@@ -48,7 +50,9 @@ your :ref:`structure-build-conf-local.conf` file:: EXTRA_IMAGE_FEATURES:append = " tools-profile" If you use the ``tools-profile`` method, you don't need to build an sdk image --- -the tracing and profiling tools will be included in non-sdk images as well e.g.:: +the tracing and profiling tools will be included in non-sdk images as well e.g.: + +.. code-block:: console $ bitbake core-image-sato
documentation/profile-manual/usage.rst +288 -96
914 lines not on this page · raw message
Signature · 1 line
2.50.0.173.g8b6f19ccfc3a
PATCH 9/16 ref-manual: state the language of the blocks that are not BitBake
In reply to Trevor WoernerThe manuals are moving to a default of bitbake for code blocks, so a BitBake block needs no language and every other block needs one. This gives the blocks in this manual that are not BitBake their language.
AI-Generated: codex/claude-opus 5.5 (xhigh)
--- documentation/ref-manual/classes.rst | 68 ++++++-- .../ref-manual/devtool-reference.rst | 80 ++++++--- documentation/ref-manual/faq.rst | 20 ++- documentation/ref-manual/features.rst | 4 +- documentation/ref-manual/fragments.rst | 32 +++- documentation/ref-manual/images.rst | 4 +- documentation/ref-manual/qa-checks.rst | 24 ++- documentation/ref-manual/structure.rst | 28 +++- .../ref-manual/system-requirements.rst | 64 ++++++-- documentation/ref-manual/tasks.rst | 44 +++-- documentation/ref-manual/terms.rst | 16 +- .../ubuntu-debian-host-packages-nodocs.rst | 16 +- documentation/ref-manual/variables.rst | 152 +++++++++++++----- 13 files changed, 414 insertions(+), 138 deletions(-)
documentation/ref-manual/classes.rst +51 -17
@@ -364,7 +364,9 @@ by reading the ``Cargo.lock`` file in the source tree. To do so, create a recipe for your program, for example using :doc:`devtool </ref-manual/devtool-reference>`, make it inherit the :ref:`ref-classes-cargo` and -:ref:`ref-classes-cargo-update-recipe-crates` and run:: +:ref:`ref-classes-cargo-update-recipe-crates` and run: + +.. code-block:: console $ bitbake -c update_crates recipe
@@ -454,7 +456,9 @@ involves a certain risk, which is also the reason why this feature is not part o the main :ref:`ref-classes-cmake` class by default. One use case is the execution of cross-compiled unit tests with CTest on the build -machine. If ``CMAKE_CROSSCOMPILING_EMULATOR`` is configured:: +machine. If ``CMAKE_CROSSCOMPILING_EMULATOR`` is configured: + +.. code-block:: text cmake --build --target test
@@ -749,7 +753,9 @@ By default, this class expects the source code to support recipe builds that use the :term:`B` variable to point to the directory in which the OpenEmbedded build system places the generated objects built from the recipes. By default, the :term:`B` directory is set to the -following, which is separate from the source directory (:term:`S`):: +following, which is separate from the source directory (:term:`S`): + +.. code-block:: text ${WORKDIR}/${BPN}-{PV}/
@@ -795,7 +801,9 @@ Here is an example that uses this class in an image recipe:: " Here is an example that adds two users named "tester-jim" and "tester-sue" and assigns -passwords. First on host, create the (escaped) password hash:: +passwords. First on host, create the (escaped) password hash: + +.. code-block:: text printf "%q" $(mkpasswd -m sha256crypt tester01)
@@ -1370,7 +1378,9 @@ The simplest example for building a FIT image is to add:: KERNEL_CLASSES += "kernel-fit-extra-artifacts" -to the machine :term:`configuration file` and to execute:: +to the machine :term:`configuration file` and to execute: + +.. code-block:: console $ bitbake linux-yocto-fitimage
@@ -1384,7 +1394,9 @@ lines to the machine configuration file:: KERNEL_CLASSES += "kernel-fit-extra-artifacts" PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-rt" -The FIT image, this time including the RT kernel, is built again by calling:: +The FIT image, this time including the RT kernel, is built again by calling: + +.. code-block:: console $ bitbake linux-yocto-fitimage
@@ -1757,7 +1769,9 @@ a couple different ways: .. note:: When creating a recipe this way, the recipe name must follow this - naming convention:: + naming convention: + + .. code-block:: text myrecipe-native.bb
@@ -1799,7 +1813,9 @@ couple different ways: .. note:: - When creating a recipe, you must follow this naming convention:: + When creating a recipe, you must follow this naming convention: + + .. code-block:: text nativesdk-myrecipe.bb
@@ -1913,7 +1929,9 @@ To achieve that :ref:`ref-classes-overlayfs` provides a ``systemd`` helper service for mounting overlays. This helper service is named ``${PN}-overlays.service`` and can be depended on in your application recipe (named ``application`` in the following example) ``systemd`` unit by adding -to the unit the following:: +to the unit the following: + +.. code-block:: ini [Unit] After=application-overlays.service
@@ -2356,7 +2374,9 @@ established and then populates the SDK. After populating the SDK, the contains the cross-compiler and associated tooling, and the target, which contains a target root filesystem that is configured for the SDK usage. These two images reside in :term:`SDK_OUTPUT`, -which consists of the following:: +which consists of the following: + +.. code-block:: text ${SDK_OUTPUT}/${SDK_ARCH}-nativesdk-pkgs ${SDK_OUTPUT}/${SDKTARGETSYSROOT}/target-pkgs
@@ -2531,11 +2551,15 @@ paths. This is occasionally used in some recipes that create wrong symbolic links when their :ref:`ref-classes-native` version is built, and/or would cause breakage in the :ref:`overview-manual/concepts:shared state cache`. -For example, if the following symbolic link is found in :term:`D`:: +For example, if the following symbolic link is found in :term:`D`: + +.. code-block:: text /usr/bin/foo -> /sbin/bar -It is replaced by:: +It is replaced by: + +.. code-block:: text /usr/bin/foo -> ../../sbin/bar
@@ -3152,7 +3176,9 @@ The tests are commands that run on the target system over ``ssh``. Each test is written in Python and makes use of the ``unittest`` module. The :ref:`ref-classes-testimage` class runs tests on an image when called using the -following:: +following: + +.. code-block:: console $ bitbake -c testimage image
@@ -3172,7 +3198,9 @@ section in the Yocto Project Test Environment Manual. This class supports running automated tests against software development kits (SDKs). The :ref:`ref-classes-testsdk` class runs tests on an SDK when called -using the following:: +using the following: + +.. code-block:: console $ bitbake -c testsdk image
@@ -3378,7 +3406,9 @@ There are three ways to configure the recipe for your machine: - ``UBOOT_CONFIG_BINARY[config]``: binary to select as the one to deploy in :term:`DEPLOY_DIR_IMAGE`. The output of a U-Boot build may be more than - one binary, for example:: + one binary, for example: + + .. code-block:: text u-boot.bin u-boot-with-spl.bin
@@ -3445,7 +3475,9 @@ There are three ways to configure the recipe for your machine: - ``binary``: binary to select as the one to deploy in :term:`DEPLOY_DIR_IMAGE`. The output of a U-Boot build may be more than - one binary, for example:: + one binary, for example: + + .. code-block:: text u-boot.bin u-boot-with-spl.bin
@@ -3862,7 +3894,9 @@ If an image is built it will generate a report in :term:`DEPLOY_DIR_IMAGE` for all the packages used, it will also generate a file for all recipes used in the build. -Example usage:: +Example usage: + +.. code-block:: console $ bitbake -c generate_vex openssl
documentation/ref-manual/devtool-reference.rst +60 -20
198 lines not on this page · raw message
documentation/ref-manual/faq.rst +15 -5
@@ -237,7 +237,9 @@ file. Here is the applicable code for setting various proxy types in the ``.wgetrc`` file. By default, these settings are disabled with comments. -To use them, remove the comments:: +To use them, remove the comments: + +.. code-block:: text # You can set the default proxies for Wget to use for http, https, and ftp. # They will override the value in the environment.
@@ -312,7 +314,9 @@ Why does the build fail with ``iconv.h`` problems? When you try to build a native recipe, you may get an error message that indicates that GNU ``libiconv`` is not in use but ``iconv.h`` has been -included from ``libiconv``:: +included from ``libiconv``: + +.. code-block:: text #error GNU libiconv not in use but included iconv.h is from libiconv
@@ -514,7 +518,9 @@ directly to the build machine's root file system. Consequently, the build system uses paths within the Build Directory for ``DESTDIR``, ``bindir`` and related variables. To better understand this, consider the following two paths (artificially broken across lines for readability) where the -first is relatively normal and the second is not:: +first is relatively normal and the second is not: + +.. code-block:: text /home/user/poky-bootchart2/build/tmp/work/i586-poky-linux/zlib/ 1.2.8-r0/sysroot-destdir/usr/bin
@@ -578,7 +584,9 @@ How do I disable the cursor on my touchscreen device? You need to create a form factor file as described in the ":ref:`bsp-manual/bsp:miscellaneous bsp-specific recipe files`" section in the Yocto Project Board Support Packages (BSP) Developer's Guide. Set -the ``HAVE_TOUCHSCREEN`` variable equal to one as follows:: +the ``HAVE_TOUCHSCREEN`` variable equal to one as follows: + +.. code-block:: shell HAVE_TOUCHSCREEN=1
@@ -592,7 +600,9 @@ to add a BSP-specific netbase that includes an interfaces file. See the the Yocto Project Board Support Packages (BSP) Developer's Guide for information on creating these types of miscellaneous recipe files. -For example, add the following files to your layer:: +For example, add the following files to your layer: + +.. code-block:: text meta-MACHINE/recipes-bsp/netbase/netbase/MACHINE/interfaces meta-MACHINE/recipes-bsp/netbase/netbase_5.0.bbappend
documentation/ref-manual/features.rst +3 -1
@@ -26,7 +26,9 @@ One method you can use to determine which recipes are checking to see if a particular feature is contained or not is to ``grep`` through the :term:`Metadata` for the feature. Here is an example that discovers the recipes whose build is potentially changed based on a -given feature:: +given feature: + +.. code-block:: console $ cd openembedded-core $ git grep 'contains.*MACHINE_FEATURES.*feature'
documentation/ref-manual/fragments.rst +24 -8
@@ -70,25 +70,33 @@ From the list obtained with the :ref:`ref-bitbake-config-build-list-fragments` command, you can determine which fragments can be enabled for your build. For example, the following command would enable the -:ref:`ref-fragments-core-yocto-sstate-mirror-cdn` fragment:: +:ref:`ref-fragments-core-yocto-sstate-mirror-cdn` fragment: + +.. code-block:: console $ bitbake-config-build enable-fragment core/yocto/sstate-mirror-cdn .. note:: - Multiple fragments can be enabled at once with the same command:: + Multiple fragments can be enabled at once with the same command: + + .. code-block:: console $ bitbake-config-build enable-fragment <fragment1> <fragment2> ... :term:`Built-in fragments <Built-in Fragment>` are enabled the same way, and their values are defined from the command-line directly. For example, the following command sets the ``qemuarm64`` :term:`MACHINE` through the -:ref:`ref-fragments-builtin-core-machine` fragment:: +:ref:`ref-fragments-builtin-core-machine` fragment: + +.. code-block:: console $ bitbake-config-build enable-fragment machine/qemuarm64 This fragment can be overridden from the command-line by setting it to another -value, for example:: +value, for example: + +.. code-block:: console $ bitbake-config-build enable-fragment machine/qemux86-64
@@ -116,18 +124,24 @@ command. The list of enabled fragments can be obtained with :ref:`ref-bitbake-config-build-list-fragments`. For example, the following command disables the -:ref:`ref-fragments-core-yocto-sstate-mirror-cdn` fragment:: +:ref:`ref-fragments-core-yocto-sstate-mirror-cdn` fragment: + +.. code-block:: console $ bitbake-config-build disable-fragment core/yocto/sstate-mirror-cdn Likewise, :term:`Built-in Fragments <Built-in Fragment>` are disabled the -same way. For example, this would disable the ``machine/qemuarm64`` fragment:: +same way. For example, this would disable the ``machine/qemuarm64`` fragment: + +.. code-block:: console $ bitbake-config-build disable-fragment machine/qemuarm64 .. note:: - Multiple fragments can be disabled at once with the same command:: + Multiple fragments can be disabled at once with the same command: + + .. code-block:: console $ bitbake-config-build disable-fragment <fragment1> <fragment2>
@@ -140,7 +154,9 @@ The :ref:`ref-bitbake-config-build-disable-all-fragments` command disables all o currently enabled fragments. The list of enabled fragments can be obtained with :ref:`ref-bitbake-config-build-list-fragments`. -This command is run without arguments:: +This command is run without arguments: + +.. code-block:: console $ bitbake-config-build disable-all-fragments
documentation/ref-manual/images.rst +3 -1
@@ -28,7 +28,9 @@ image you want. INCOMPATIBLE_LICENSE:pn-your-image-name = "GPL-3.0* LGPL-3.0*" From within the :term:`OpenEmbedded-Core (OE-Core)` Git repository, you can use the following -command to display the list of directories that contain image recipe files:: +command to display the list of directories that contain image recipe files: + +.. code-block:: console $ ls meta*/recipes*/images/*.bb
documentation/ref-manual/qa-checks.rst +18 -6
@@ -354,7 +354,9 @@ see the section describing the The ``/usr/share/info/dir`` should not be packaged. Add the following line to your :ref:`ref-tasks-install` task or to your -``do_install:append`` within the recipe as follows:: +``do_install:append`` within the recipe as follows: + +.. code-block:: text rm ${D}${infodir}/dir
@@ -530,7 +532,9 @@ This check looks for evidence of "fuzz" when applying patches within the :ref:`r task. Patch fuzz is a situation when the ``patch`` tool ignores some of the context lines in order to apply the patch. Consider this example: -Patch to be applied:: +Patch to be applied: + +.. code-block:: diff --- filename +++ filename
@@ -542,7 +546,9 @@ Patch to be applied:: context line 5 context line 6 -Original source code:: +Original source code: + +.. code-block:: text different context line 1 different context line 2
@@ -551,7 +557,9 @@ Original source code:: different context line 5 different context line 6 -Outcome (after applying patch with fuzz):: +Outcome (after applying patch with fuzz): + +.. code-block:: text different context line 1 different context line 2
@@ -571,14 +579,18 @@ patched file to still compile without errors. *How to eliminate patch fuzz warnings* Use the ``devtool`` command as explained by the warning. First, unpack the -source into devtool workspace:: +source into devtool workspace: + +.. code-block:: console $ devtool modify <recipe> This will apply all of the patches, and create new commits out of them in the workspace --- with the patch context updated. -Then, replace the patches in the recipe layer:: +Then, replace the patches in the recipe layer: + +.. code-block:: console $ devtool finish --force-patch-refresh <recipe> <layer_path>
documentation/ref-manual/structure.rst +21 -7
@@ -156,7 +156,9 @@ When you run this script, your Yocto Project environment is set up, a :term:`Build Directory` is created, your working directory becomes the :term:`Build Directory`, and you are presented with some simple suggestions as to what to do next, including a list of some possible -targets to build. Here is an example:: +targets to build. Here is an example: + +.. code-block:: console $ source oe-init-build-env
@@ -200,7 +202,9 @@ you provide a :term:`Build Directory` argument when you ``source`` the script, you direct the OpenEmbedded build system to create a :term:`Build Directory` of your choice. For example, the following command creates a :term:`Build Directory` named ``mybuilds/`` that is outside of the -:term:`Source Directory`:: +:term:`Source Directory`: + +.. code-block:: console $ source oe-init-build-env ~/mybuilds
@@ -321,7 +325,9 @@ The source ``local.conf.sample`` file used depends on the Because the script variable points to the source of the ``local.conf.sample`` file, this implies that you can configure your build environment from any layer by setting the variable in the -top-level build environment setup script as follows:: +top-level build environment setup script as follows: + +.. code-block:: shell TEMPLATECONF=your_layer/conf/templates/your_template_name
@@ -355,7 +361,9 @@ file used depends on the :term:`TEMPLATECONF` script variable, which defaults to :oecore_path:`meta/conf/templates/default` . Because the script variable points to the source of the ``bblayers.conf.sample`` file, this implies that you can base your build from any layer by setting the -variable in the top-level build environment setup script as follows:: +variable in the top-level build environment setup script as follows: + +.. code-block:: shell TEMPLATECONF=your_layer/conf/templates/your_template_name
@@ -382,7 +390,9 @@ want to access downloaded files (:term:`DL_DIR`). This file can be shared for multiple build directories. For example, :doc:`bitbake-setup <bitbake:bitbake-user-manual/bitbake-user-manual-environment-setup>` makes the :ref:`structure-build-conf-site.conf` file a symbolic link to a common -:ref:`structure-build-conf-auto.conf` file:: +:ref:`structure-build-conf-auto.conf` file: + +.. code-block:: text ├── poky-master-poky-distro_poky-machine_qemux86-64/ │ └── build/
@@ -571,7 +581,9 @@ image again. If you do accidentally delete files here, you will need to force them to be re-created. In order to do that, you will need to know the target that produced them. For example, these commands rebuild and re-create -the kernel files:: +the kernel files: + +.. code-block:: console $ bitbake -c clean virtual/kernel $ bitbake virtual/kernel
@@ -666,7 +678,9 @@ recipe-specific :term:`WORKDIR` directories. Thus, the This directory holds information that BitBake uses for accounting purposes to track what tasks have run and when they have run. The directory is sub-divided by architecture, package name, and version. -Here is an example:: +Here is an example: + +.. code-block:: text stamps/all-poky-linux/distcc-config/1.0-r0.do_build-2fdd....2do
documentation/ref-manual/system-requirements.rst +48 -16
140 lines not on this page · raw message
documentation/ref-manual/tasks.rst +33 -11
106 lines not on this page · raw message
documentation/ref-manual/terms.rst +12 -4
@@ -26,7 +26,9 @@ universal, the list includes them just in case: When you name an append file, you can use the "``%``" wildcard character to allow for matching recipe names. For example, suppose you have an - append file named as follows:: + append file named as follows: + + .. code-block:: text busybox_1.21.%.bbappend
@@ -144,7 +146,9 @@ universal, the list includes them just in case: </bitbake/tree/bin/bitbake-config-build>` command-line utility. When declared, a built-in fragment follows the following naming - convention:: + convention: + + .. code-block:: text <fragment>:<variable name>
@@ -154,7 +158,9 @@ universal, the list includes them just in case: - ``<variable name>`` is the name of the variable to be modified by this fragment. - For example:: + For example: + + .. code-block:: text machine:MACHINE
@@ -162,7 +168,9 @@ universal, the list includes them just in case: the :term:`MACHINE` variable. Setting the :term:`MACHINE` variable through this fragment must follow - this syntax:: + this syntax: + + .. code-block:: text machine/qemux86-64
documentation/ref-manual/ubuntu-debian-host-packages-nodocs.rst +12 -4
@@ -4,12 +4,16 @@ with a supported Ubuntu or Debian Linux distribution: .. literalinclude:: ../tools/host_packages_scripts/ubuntu_essential.sh :language: shell -You also need to ensure you have the ``en_US.UTF-8`` locale enabled:: +You also need to ensure you have the ``en_US.UTF-8`` locale enabled: + +.. code-block:: console $ locale --all-locales | grep en_US.utf8 If this is not the case, you can reconfigure the ``locales`` package to add it -(requires an interactive shell):: +(requires an interactive shell): + +.. code-block:: console $ sudo dpkg-reconfigure locales
@@ -18,7 +22,9 @@ If this is not the case, you can reconfigure the ``locales`` package to add it - If you are not in an interactive shell, ``dpkg-reconfigure`` will not work as expected. To add the locale you will need to edit ``/etc/locale.gen`` file to add/uncomment the ``en_US.UTF-8`` locale. - A simple way to do this as root is:: + A simple way to do this as root is: + + .. code-block:: console $ echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen $ locale-gen
@@ -26,7 +32,9 @@ If this is not the case, you can reconfigure the ``locales`` package to add it - If your build system has the ``oss4-dev`` package installed, you might experience QEMU build failures due to the package installing its own custom ``/usr/include/linux/soundcard.h`` on the Debian - system. If you run into this situation, try either of these solutions:: + system. If you run into this situation, try either of these solutions: + + .. code-block:: console $ sudo apt build-dep qemu $ sudo apt remove oss4-dev
documentation/ref-manual/variables.rst +114 -38
379 lines not on this page · raw message
Signature · 1 line
2.50.0.173.g8b6f19ccfc3a
PATCH 11/16 test-manual: state the language of the blocks that are not BitBake
In reply to Trevor WoernerThe manuals are moving to a default of bitbake for code blocks, so a BitBake block needs no language and every other block needs one. This gives the blocks in this manual that are not BitBake their language.
AI-Generated: codex/claude-opus 5.5 (xhigh)
--- documentation/test-manual/intro.rst | 72 ++++++++++++++----- documentation/test-manual/ptest.rst | 12 +++- .../test-manual/reproducible-builds.rst | 4 +- documentation/test-manual/runtime-testing.rst | 36 +++++++--- .../test-manual/understand-autobuilder.rst | 20 ++++-- 5 files changed, 108 insertions(+), 36 deletions(-)
documentation/test-manual/intro.rst +54 -18
@@ -113,7 +113,9 @@ the following types of tests: ensure we have no single point of failure and can ensure the different distros work effectively. -- *eSDK Testing:* Image tests initiated through the following command:: +- *eSDK Testing:* Image tests initiated through the following command: + + .. code-block:: console $ bitbake image -c testsdkext
@@ -124,7 +126,9 @@ the following types of tests: :ref:`OpenEmbedded Self test (oe-selftest) <ref-manual/release-process:Testing and Quality Assurance>`. We test oe-selftest on each of the main distributions we support. -- *Image Testing:* Image tests initiated through the following command:: +- *Image Testing:* Image tests initiated through the following command: + + .. code-block:: console $ bitbake image -c testimage
@@ -146,7 +150,9 @@ the following types of tests: ":yocto_wiki:`Ptest </Ptest>`" Wiki page for more information on Ptest. -- *SDK Testing:* Image tests initiated through the following command:: +- *SDK Testing:* Image tests initiated through the following command: + + .. code-block:: console $ bitbake image -c testsdk
@@ -175,21 +181,29 @@ Tests map into the codebase as follows: Some of these tests run the ``bitbake`` command, so ``bitbake/bin`` must be added to the ``PATH`` before running ``bitbake-selftest``. - From within the BitBake repository, run the following:: + From within the BitBake repository, run the following: + + .. code-block:: console $ export PATH=$PWD/bin:$PATH - After that, you can run the selftest script:: + After that, you can run the selftest script: + + .. code-block:: console $ bitbake-selftest The default output is quiet and just prints a summary of what was - run. To see more information, there is a verbose option:: + run. To see more information, there is a verbose option: + + .. code-block:: console $ bitbake-selftest -v To skip tests that access the Internet, use the ``BB_SKIP_NETTESTS`` - variable when running ``bitbake-selftest`` as follows:: + variable when running ``bitbake-selftest`` as follows: + + .. code-block:: console $ BB_SKIP_NETTESTS=yes bitbake-selftest
@@ -197,12 +211,16 @@ Tests map into the codebase as follows: which are mostly necessary to test the fetcher modules. To specify individual test modules to run, append the test module name to the ``bitbake-selftest`` command. For example, to specify the tests for - ``bb.tests.data.DataExpansions``, run:: + ``bb.tests.data.DataExpansions``, run: + + .. code-block:: console $ bitbake-selftest bb.tests.data.DataExpansions You can also specify individual tests by defining the full name and module - plus the class path of the test, for example:: + plus the class path of the test, for example: + + .. code-block:: console $ bitbake-selftest bb.tests.data.DataExpansions.test_one_var
@@ -226,23 +244,31 @@ Tests map into the codebase as follows: - The code for the tests resides in ``meta/lib/oeqa/selftest/cases/``. - - To run all the tests, enter the following command:: + - To run all the tests, enter the following command: + + .. code-block:: console $ oe-selftest -a - To run a specific test, use the following command form where - ``testname`` is the name of the specific test:: + ``testname`` is the name of the specific test: + + .. code-block:: console $ oe-selftest -r <testname> For example, the following command would run the ``tinfoil`` - ``getVar`` API test:: + ``getVar`` API test: + + .. code-block:: console $ oe-selftest -r tinfoil.TinfoilTests.test_getvar It is also possible to run a set of tests. For example the following command will run all of the - ``tinfoil`` tests:: + ``tinfoil`` tests: + + .. code-block:: console $ oe-selftest -r tinfoil
@@ -257,7 +283,9 @@ Tests map into the codebase as follows: IMAGE_CLASSES += "testimage" - - Run the tests using the following command form:: + - Run the tests using the following command form: + + .. code-block:: console $ bitbake image -c testimage
@@ -268,7 +296,9 @@ Tests map into the codebase as follows: - The code for these tests resides in ``meta/lib/oeqa/sdk/cases/``. - - Run the test using the following command form:: + - Run the test using the following command form: + + .. code-block:: console $ bitbake image -c testsdk
@@ -279,7 +309,9 @@ Tests map into the codebase as follows: - The code for these tests resides in ``meta/lib/oeqa/sdkext/cases/``. - - To run the tests, use the following command form:: + - To run the tests, use the following command form: + + .. code-block:: console $ bitbake image -c testsdkext
@@ -290,7 +322,9 @@ Tests map into the codebase as follows: - The code for these tests resides in ``meta/lib/oeqa/buildperf``. - - To run the tests, use the following command form:: + - To run the tests, use the following command form: + + .. code-block:: console $ oe-build-perf-test <options>
@@ -492,7 +526,9 @@ working correctly. The test would only run if Python3 is installed in the SDK. The performance tests usually measure how long operations take and the resource utilization as that happens. An example from -``meta/lib/oeqa/buildperf/test_basic.py`` contains the following:: +``meta/lib/oeqa/buildperf/test_basic.py`` contains the following: + +.. code-block:: python class Test3(BuildPerfTestCase): def test3(self):
documentation/test-manual/ptest.rst +9 -3
@@ -13,7 +13,9 @@ hand, the test can be anything from a simple shell script that runs a binary and checks the output to an elaborate system of test binaries and data files. -The test generates output in the format used by Automake:: +The test generates output in the format used by Automake: + +.. code-block:: text result: testname
@@ -117,7 +119,9 @@ test. Here is what you have to do for each recipe: script where you will refer to it using :term:`SRC_URI`. Be sure ``run-ptest`` exits with 0 to mark it as successfully executed otherwise will be marked as fail. - Here is an example that starts a test for ``dbus``:: + Here is an example that starts a test for ``dbus``: + + .. code-block:: shell #!/bin/sh cd test
@@ -129,7 +133,9 @@ test. Here is what you have to do for each recipe: - *Make sure the test prints at least one test result*: The execution of the ``run-ptest`` script must result in at least one test result output on the - console, with the following format:: + console, with the following format: + + .. code-block:: text result: testname
documentation/test-manual/reproducible-builds.rst +3 -1
@@ -87,7 +87,9 @@ it always depends upon the paths it is built in. classes, etc. To run our automated selftest, as we use in our CI on the Autobuilder, you can -run:: +run: + +.. code-block:: console $ oe-selftest -r reproducible.ReproducibleTests.test_reproducible_builds
documentation/test-manual/runtime-testing.rst +27 -9
@@ -56,7 +56,9 @@ In order to run tests, you need to do the following: - Ensure that your host has the package ``iptables`` installed. - The package recipe ``qemu-helper-native`` is required to run - this script. Build the package using the following command:: + this script. Build the package using the following command: + + .. code-block:: console $ bitbake qemu-helper-native
@@ -230,7 +232,9 @@ The final thing you need to do when setting :term:`TEST_TARGET` to TEST_TARGET = "SystemdbootTarget" TEST_TARGET_IP = "192.168.2.3" -#. *Build your test image:* Use BitBake to build the image:: +#. *Build your test image:* Use BitBake to build the image: + + .. code-block:: console $ bitbake core-image-sato
@@ -324,7 +328,9 @@ You can start the tests automatically or manually: TESTIMAGE_AUTO = "1" Next, build your image. If the image successfully builds, the - tests run:: + tests run: + + .. code-block:: console $ bitbake core-image-sato
@@ -334,7 +340,9 @@ You can start the tests automatically or manually: IMAGE_CLASSES += "testimage" - Next, use BitBake to run the tests:: + Next, use BitBake to run the tests: + + .. code-block:: console $ bitbake -c testimage image
@@ -408,7 +416,9 @@ If your image is already built, make sure the following are set in your TEST_SERVER_IP = "IP-address-for-the-test-server" You can then export the tests with the -following BitBake command form:: +following BitBake command form: + +.. code-block:: console $ bitbake image -c testexport
@@ -416,7 +426,9 @@ Exporting the tests places them in the :term:`Build Directory` in ``tmp/testimage/``\ image, which is controlled by the :term:`TEST_EXPORT_DIR` variable. -You can now run the tests outside of the build environment:: +You can now run the tests outside of the build environment: + +.. code-block:: console $ cd tmp/testimage/image $ ./oe-test runtime
@@ -433,12 +445,16 @@ Here is a complete example that shows IP addresses and uses the TEST_TARGET_IP = "192.168.7.2" TEST_SERVER_IP = "192.168.7.1" -Use BitBake to export the tests:: +Use BitBake to export the tests: + +.. code-block:: console $ bitbake core-image-sato -c testexport Run the tests outside of -the build environment using the following:: +the build environment using the following: + +.. code-block:: console $ cd tmp/testimage/core-image-sato $ ./oe-test runtime
@@ -580,7 +596,9 @@ data: Here is an example JSON file that handles test "foo" installing package "bar" and test "foobar" installing packages "foo" and "bar". -Once the test is complete, the packages are removed from the DUT:: +Once the test is complete, the packages are removed from the DUT: + +.. code-block:: json { "foo": {
documentation/test-manual/understand-autobuilder.rst +15 -5
@@ -20,7 +20,9 @@ each of those targets on a separate buildbot worker. To understand the configuration, you need to look at the entry on ``config.json`` file within the :yocto_git:`yocto-autobuilder-helper </yocto-autobuilder-helper>` repository. The targets are defined in the ``overrides`` section, a quick -example could be ``qemux86-64`` which looks like:: +example could be ``qemux86-64`` which looks like: + +.. code-block:: text "qemux86-64" : { "MACHINE" : "qemux86-64",
@@ -33,7 +35,9 @@ example could be ``qemux86-64`` which looks like:: }, And to expand that, you need the ``arch-qemu`` entry from -the ``templates`` section, which looks like:: +the ``templates`` section, which looks like: + +.. code-block:: text "arch-qemu" : { "BUILDINFO" : true,
@@ -276,18 +280,24 @@ The standard ``config.json`` minimally attempts to allow substitution of the paths. The Helper script repository includes a ``local-example.json`` file to show how you could override these from a separate configuration file. Pass the following into the environment of -the Autobuilder:: +the Autobuilder: + +.. code-block:: console $ ABHELPER_JSON="config.json local-example.json" As another example, you could also pass the following into the -environment:: +environment: + +.. code-block:: console $ ABHELPER_JSON="config.json /some/location/local.json" One issue users often run into is validation of the ``config.json`` files. A tip for minimizing issues from invalid JSON files is to use a Git ``pre-commit-hook.sh`` script to verify the JSON file before committing -it. Create a symbolic link as follows:: +it. Create a symbolic link as follows: + +.. code-block:: console $ ln -s ../../scripts/pre-commit-hook.sh .git/hooks/pre-commit
Signature · 1 line
2.50.0.173.g8b6f19ccfc3a
PATCH 12/16 toaster-manual: state the language of the blocks that are not BitBake
In reply to Trevor WoernerThe manuals are moving to a default of bitbake for code blocks, so a BitBake block needs no language and every other block needs one. This gives the blocks in this manual that are not BitBake their language.
AI-Generated: codex/claude-opus 5.5 (xhigh)
--- documentation/toaster-manual/reference.rst | 26 +++- .../toaster-manual/setup-and-use.rst | 132 +++++++++++++----- documentation/toaster-manual/start.rst | 16 ++- 3 files changed, 130 insertions(+), 44 deletions(-)
documentation/toaster-manual/reference.rst +19 -7
@@ -89,7 +89,9 @@ Use the Administration Interface Access the administration interface through a browser by entering the URL of your Toaster instance and adding "``/admin``" to the end of the URL. As an example, if you are running Toaster locally, use the -following URL:: +following URL: + +.. code-block:: text http://127.0.0.1:8000/admin
@@ -380,7 +382,9 @@ Checking Health Before you use remote Toaster monitoring, you should do a health check. To do this, ping the Toaster server using the following call to see if -it is still alive:: +it is still alive: + +.. code-block:: text http://host:port/health
@@ -399,7 +403,9 @@ Determining Status of Builds in Progress ---------------------------------------- Sometimes it is useful to determine the status of a build in progress. -To get the status of pending builds, use the following call:: +To get the status of pending builds, use the following call: + +.. code-block:: text http://host:port/toastergui/api/building
@@ -434,7 +440,9 @@ Checking Status of Builds Completed ----------------------------------- Once a build is completed, you get the status when you use the following -call:: +call: + +.. code-block:: text http://host:port/toastergui/api/builds
@@ -468,7 +476,9 @@ Determining Status of a Specific Build -------------------------------------- Sometimes it is useful to determine the status of a specific build. To -get the status of a specific build, use the following call:: +get the status of a specific build, use the following call: + +.. code-block:: text http://host:port/toastergui/api/build/ID
@@ -556,7 +566,9 @@ example that assumes default repository and :term:`Build Directory` names: If your Toaster database had only one build, the above :ref:`toaster-manual/reference:``buildslist``` -command would return something like the following:: +command would return something like the following: + +.. code-block:: text 1: qemux86 poky core-image-minimal
@@ -566,7 +578,7 @@ command would return something like the following:: The ``builddelete`` command deletes data associated with a build. Access the command as follows: -.. code-block:: +.. code-block:: console $ bitbake/lib/toaster/manage.py builddelete build_id
documentation/toaster-manual/setup-and-use.rst +99 -33
302 lines not on this page · raw message
documentation/toaster-manual/start.rst +12 -4
@@ -16,7 +16,9 @@ Before you can use Toaster, you need to first set up your build system to run the Yocto Project. To do this, follow the instructions in the ":ref:`dev-manual/start:preparing the build host`" section of the Yocto Project Development Tasks Manual. For Ubuntu/Debian, you might -also need to do an additional install of pip3. :: +also need to do an additional install of pip3. + +.. code-block:: console $ sudo apt install python3-pip
@@ -35,17 +37,23 @@ Install Toaster Packages ------------------------ You need to install the packages that Toaster requires. Use this -command:: +command: + +.. code-block:: console $ pip3 install --user -r bitbake/toaster-requirements.txt The previous command installs the necessary Toaster modules into a local Python 3 cache in your ``$HOME`` directory. The caches is actually located in ``$HOME/.local``. To see what packages have been installed -into your ``$HOME`` directory, do the following:: +into your ``$HOME`` directory, do the following: + +.. code-block:: console $ pip3 list installed --local -If you need to remove something, the following works:: +If you need to remove something, the following works: + +.. code-block:: console $ pip3 uninstall PackageNameToUninstall
Signature · 1 line
2.50.0.173.g8b6f19ccfc3a
PATCH 13/16 docs: show the examples the BitBake lexer misreads as text
In reply to Trevor WoernerPygments' BitBake lexer reports errors in a few valid BitBake examples, which would fail the build once BitBake is the default highlight language. Show them as text, each with a comment saying why, so they can be switched back once the lexer reads them.
AI-Generated: codex/claude-opus 5.5 (xhigh)
--- documentation/ref-manual/classes.rst | 6 +++++- documentation/ref-manual/variables.rst | 30 +++++++++++++++++++++----- 2 files changed, 30 insertions(+), 6 deletions(-)
documentation/ref-manual/classes.rst +5 -1
@@ -679,7 +679,11 @@ See :oe_git:`devicetree.bbclass sources for further variables controlling this class. Here is an excerpt of an example ``recipes-kernel/linux/devicetree-acme.bb`` -recipe inheriting this class:: +recipe inheriting this class: + +.. Shown as text: the Pygments BitBake lexer misreads this block. + +.. code-block:: text inherit devicetree COMPATIBLE_MACHINE = "^mymachine$"
documentation/ref-manual/variables.rst +25 -5
@@ -1690,7 +1690,11 @@ system and gives an overview of their function and contents. with the current machine. If one wants to have a recipe only available for some architectures - (here ``aarch64`` and ``mips64``), the following can be used:: + (here ``aarch64`` and ``mips64``), the following can be used: + + .. Shown as text: the Pygments BitBake lexer misreads this block. + + .. code-block:: text COMPATIBLE_MACHINE = "^$" COMPATIBLE_MACHINE:arch64 = "^(aarch64)$"
@@ -1705,7 +1709,11 @@ system and gives an overview of their function and contents. The third is for matching all machines whose :term:`MACHINEOVERRIDES` contains one override which is exactly ``mips64``. - The same could be achieved with:: + The same could be achieved with: + + .. Shown as text: the Pygments BitBake lexer misreads this block. + + .. code-block:: text COMPATIBLE_MACHINE = "^(aarch64|mips64)$"
@@ -9728,7 +9736,11 @@ system and gives an overview of their function and contents. By default this variable is empty, meaning no files are excluded. - Example usage:: + Example usage: + + .. Shown as text: the Pygments BitBake lexer misreads this block. + + .. code-block:: text SPDX_FILE_EXCLUDE_PATTERNS = "\\.patch$ \\.diff$ /test/ \\.pyc$ \\.o$"
@@ -11580,7 +11592,11 @@ system and gives an overview of their function and contents. are not conflicting and that they are supported. The BitBake configuration file (``meta/conf/bitbake.conf``) defines - :term:`TUNE_FEATURES` as follows:: + :term:`TUNE_FEATURES` as follows: + + .. Shown as text: the Pygments BitBake lexer misreads this block. + + .. code-block:: text TUNE_FEATURES ??= "${TUNE_FEATURES:tune-${DEFAULTTUNE}}"
@@ -12574,7 +12590,11 @@ system and gives an overview of their function and contents. For recipes with dot-separated versions, inherit the :ref:`ref-classes-upstream-stable-release-point` class to generate this - variable automatically. For other versioning schemes, set it directly:: + variable automatically. For other versioning schemes, set it directly: + + .. Shown as text: the Pygments BitBake lexer misreads this block. + + .. code-block:: text UPSTREAM_STABLE_RELEASE_REGEX = "^10\.2p\d+$"
Signature · 1 line
2.50.0.173.g8b6f19ccfc3a
PATCH 14/16 docs: drop the file-wide highlight directives
In reply to Trevor WoernerA few pages set their whole file to the shell language, which hides the language of every block on them and mislabels the BitBake ones. The blocks that are not BitBake state their own language, so the directives only do harm.
AI-Generated: codex/claude-opus 5.5 (xhigh)
--- documentation/profile-manual/usage.rst | 1 - documentation/toaster-manual/setup-and-use.rst | 2 -- documentation/toaster-manual/start.rst | 2 -- 3 files changed, 5 deletions(-)
documentation/profile-manual/usage.rst +0 -1
@@ -1,5 +1,4 @@ .. SPDX-License-Identifier: CC-BY-SA-2.0-UK -.. highlight:: shell *************************************************************** Basic Usage (with examples) for each of the Yocto Tracing Tools
documentation/toaster-manual/setup-and-use.rst +0 -2
@@ -1,6 +1,4 @@ .. SPDX-License-Identifier: CC-BY-SA-2.0-UK -.. Set default pygment highlighting to 'shell' for this document -.. highlight:: shell **************************** Setting Up and Using Toaster
documentation/toaster-manual/start.rst +0 -2
@@ -1,6 +1,4 @@ .. SPDX-License-Identifier: CC-BY-SA-2.0-UK -.. Set default pygments highlighting to shell for this document -.. highlight:: shell ************************ Preparing to Use Toaster
Signature · 1 line
2.50.0.173.g8b6f19ccfc3a
PATCH 15/16 conf.py: default the highlight language to bitbake
In reply to Trevor WoernerMost code blocks in these manuals are BitBake metadata, and a contributor adding one should not have to remember to say so. Blocks in any other language state it explicitly.
AI-Generated: codex/claude-opus 5.5 (xhigh)
--- documentation/conf.py | 3 +++ 1 file changed, 3 insertions(+)
documentation/conf.py +3 -0
@@ -111,6 +111,9 @@ templates_path = ['_templates'] # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path. +# Code blocks are BitBake unless they say otherwise. +highlight_language = 'bitbake' + exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'boilerplate.rst'] # master document name. The default changed from contents to index. so better
Signature · 1 line
2.50.0.173.g8b6f19ccfc3a
PATCH 16/16 standards: describe how a code block states its language
In reply to Trevor WoernerThe manuals highlight a code block as BitBake unless it says otherwise, which is a rule a contributor can only discover by reading conf.py. Write it down, along with the languages the other blocks use and what to do with a block the BitBake lexer cannot read.
AI-Generated: codex/claude-opus 5.5 (xhigh)
--- documentation/standards.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)
documentation/standards.md +22 -0
@@ -134,6 +134,28 @@ Note that only "absolute" paths (starting with a '/') are allowed. The root directory of that path is documentation/, that is, :doc:`/bsp-manual/index` points at documentation/bsp-manual/index.rst. +### Code blocks + +A code block is highlighted as BitBake unless it says otherwise, because +most of the code in the manuals is BitBake metadata. A block of anything +else states its language: + + .. code-block:: console + + $ bitbake core-image-minimal + +Use the language the block actually is, not the one it resembles. A +session with a prompt is `console`, a script without one is `shell`, and +a listing of paths or program output is `text`. + +If the BitBake lexer cannot read a valid BitBake block, show it as `text` +and say why in a comment above it, so it can be switched back once the +lexer is fixed: + + .. Shown as text: the Pygments BitBake lexer misreads this block. + + .. code-block:: text + ## Adding screenshots The preferred format for adding screenshots is
Signature · 1 line
2.50.0.173.g8b6f19ccfc3a