@@ -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
@@ -22,7 +22,9 @@ Getting Help
The ``devtool`` command line is organized similarly to Git in that it
has a number of sub-commands for each function. You can run
-``devtool --help`` to see all the commands::
+``devtool --help`` to see all the commands:
+
+.. code-block:: console
$ devtool --help
NOTE: Starting bitbake server...
@@ -73,7 +75,9 @@ has a number of sub-commands for each function. You can run
As directed in the general help output, you can
get more syntax on a specific command by providing the command name and
-using ``--help``::
+using ``--help``:
+
+.. code-block:: console
$ devtool add --help
NOTE: Starting bitbake server...
@@ -165,7 +169,9 @@ you. The source files the recipe uses should exist in an external area.
The following example creates and adds a new recipe named ``jackson`` to
a workspace layer the tool creates. The source code built by the recipes
-resides in ``/home/user/sources/jackson``::
+resides in ``/home/user/sources/jackson``:
+
+.. code-block:: console
$ devtool add jackson /home/user/sources/jackson
@@ -193,7 +199,9 @@ unpacking files from a remote URI. In some cases, you might want to
specify a source revision by branch, tag, or commit hash. You can
specify these options when using the ``devtool add`` command:
-- To specify a source branch, use the ``--srcbranch`` option::
+- To specify a source branch, use the ``--srcbranch`` option:
+
+ .. code-block:: console
$ devtool add --srcbranch &DISTRO_NAME_NO_CAP; jackson /home/user/sources/jackson
@@ -201,7 +209,9 @@ specify these options when using the ``devtool add`` command:
branch.
- To specify a specific tag or commit hash, use the ``--srcrev``
- option::
+ option:
+
+ .. code-block:: console
$ devtool add --srcrev &DISTRO_REL_TAG; jackson /home/user/sources/jackson
$ devtool add --srcrev some_commit_hash /home/user/sources/jackson
@@ -259,7 +269,9 @@ The ``devtool modify`` command extracts the source for a recipe, sets it
up as a Git repository if the source had not already been fetched from
Git, checks out a branch for development, and applies any patches from
the recipe as commits on top. You can use the following command to
-checkout the source files::
+checkout the source files:
+
+.. code-block:: console
$ devtool modify recipe
@@ -295,7 +307,9 @@ compile, and test the code.
When you are satisfied with the results and you have committed your
changes to the Git repository, you can then run the
-``devtool update-recipe`` to create the patches and update the recipe::
+``devtool update-recipe`` to create the patches and update the recipe:
+
+.. code-block:: console
$ devtool update-recipe recipe
@@ -306,7 +320,9 @@ Often, you might want to apply customizations made to your software in
your own layer rather than apply them to the original recipe. If so, you
can use the ``-a`` or ``--append`` option with the
``devtool update-recipe`` command. These options allow you to specify
-the layer into which to write an append file::
+the layer into which to write an append file:
+
+.. code-block:: console
$ devtool update-recipe recipe -a base-layer-directory
@@ -356,7 +372,9 @@ variables in package recipes.
in the recipe).
As with all ``devtool`` commands, you can get help on the individual
-command::
+command:
+
+.. code-block:: console
$ devtool check-upgrade-status -h
NOTE: Starting bitbake server...
@@ -374,7 +392,9 @@ command::
Unless you provide a specific recipe name on the command line, the
command checks all recipes in all configured layers.
-Here is a partial example table that reports on all the recipes::
+Here is a partial example table that reports on all the recipes:
+
+.. code-block:: console
$ devtool check-upgrade-status
...
@@ -456,7 +476,9 @@ files have been modified, the command preserves the modified files in a
separate "attic" subdirectory under the workspace layer.
Here is an example that resets the workspace directory that contains the
-``mtr`` recipe::
+``mtr`` recipe:
+
+.. code-block:: console
$ devtool reset mtr
NOTE: Cleaning sysroot for recipe mtr...
@@ -472,7 +494,9 @@ specified recipe in the specified layer and remove it from your workspace.
This is roughly equivalent to the ``devtool update-recipe`` command followed by
the ``devtool reset`` command. The changes must have been committed to the git
-repository created by ``devtool``. Here is an example::
+repository created by ``devtool``. Here is an example:
+
+.. code-block:: console
$ devtool finish <recipe> <path/to/custom/layer>
@@ -488,7 +512,9 @@ Use the ``devtool build`` command to build your recipe. The
When you use the ``devtool build`` command, you must supply the root
name of the recipe (i.e. do not provide versions, paths, or extensions).
You can use either the ``-s`` or the ``--disable-parallel-make`` options to
-disable parallel makes during the build. Here is an example::
+disable parallel makes during the build. Here is an example:
+
+.. code-block:: console
$ devtool build recipe
@@ -504,7 +530,9 @@ device for testing. For proper integration into a final image, you need
to edit your custom image recipe appropriately.
When you use the ``devtool build-image`` command, you must supply the
-name of the image. This command has no command line options::
+name of the image. This command has no command line options:
+
+.. code-block:: console
$ devtool build-image image
@@ -514,7 +542,9 @@ Deploying Your Software on the Target Machine
=============================================
Use the ``devtool deploy-target`` command to deploy the recipe's build
-output to the live target machine::
+output to the live target machine:
+
+.. code-block:: console
$ devtool deploy-target recipe target
@@ -585,7 +615,9 @@ Use the ``devtool undeploy-target`` command to remove deployed build
output from the target machine. For the ``devtool undeploy-target``
command to work, you must have previously used the
":ref:`devtool deploy-target <ref-manual/devtool-reference:deploying your software on the target machine>`"
-command::
+command:
+
+.. code-block:: console
$ devtool undeploy-target recipe target
@@ -604,13 +636,17 @@ new workspace layer, it is populated with the ``README`` file and the
``conf`` directory only.
The following example creates a new workspace layer in your current
-working and by default names the workspace layer "workspace"::
+working and by default names the workspace layer "workspace":
+
+.. code-block:: console
$ devtool create-workspace
You can create a workspace layer anywhere by supplying a pathname with
the command. The following command creates a new workspace layer named
-"new-workspace"::
+"new-workspace":
+
+.. code-block:: console
$ devtool create-workspace /home/user/new-workspace
@@ -623,13 +659,17 @@ Use the ``devtool status`` command to list the recipes currently in your
workspace. Information includes the paths to their respective external
source trees.
-The ``devtool status`` command has no command-line options::
+The ``devtool status`` command has no command-line options:
+
+.. code-block:: console
$ devtool status
Here is sample output after using
:ref:`devtool add <ref-manual/devtool-reference:adding a new recipe to the workspace layer>`
-to create and add the ``mtr_0.86.bb`` recipe to the ``workspace`` directory::
+to create and add the ``mtr_0.86.bb`` recipe to the ``workspace`` directory:
+
+.. code-block:: console
$ devtool status
mtr:/home/user/bitbake-builds/build/workspace/sources/mtr (/home/user/bitbake-builds/build/workspace/recipes/mtr/mtr_0.86.bb)
@@ -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
@@ -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'
@@ -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
@@ -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
@@ -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>
@@ -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
@@ -478,7 +478,9 @@ The ``install-buildtools`` script is the easiest of the three methods by
which you can get these tools. It downloads a pre-built :term:`buildtools`
installer and automatically installs the tools for you:
-#. Execute the ``install-buildtools`` script. Here is an example::
+#. Execute the ``install-buildtools`` script. Here is an example:
+
+ .. code-block:: console
$ cd /path/to/bitbake-builds
$ ./layers/openembedded-core/scripts/install-buildtools \
@@ -493,26 +495,34 @@ installer and automatically installs the tools for you:
installation is functional.
To avoid the need of ``sudo`` privileges, the ``install-buildtools``
- script will by default tell the installer to install in::
+ script will by default tell the installer to install in:
+
+ .. code-block:: text
/path/to/bitbake-builds/buildtools
If your host development system needs the additional tools provided
in the :term:`buildtools-extended` tarball, you can instead execute the
- ``install-buildtools`` script with the default parameters::
+ ``install-buildtools`` script with the default parameters:
+
+ .. code-block:: console
$ cd /path/to/bitbake-builds
$ ./layers/openembedded-core/scripts/install-buildtools
Alternatively if your host development system has a broken ``make``
version such that you only need a known good version of ``make``,
- you can use the ``--make-only`` option::
+ you can use the ``--make-only`` option:
+
+ .. code-block:: console
$ cd /path/to/bitbake-builds
$ ./layers/openembedded-core/scripts/install-buildtools --make-only
#. Source the tools environment setup script by using a command like the
- following::
+ following:
+
+ .. code-block:: console
$ source /path/to/bitbake-builds/buildtools/environment-setup-x86_64-pokysdk-linux
@@ -536,15 +546,21 @@ steps:
and to :term:`buildtools`, :term:`buildtools-extended` or :term:`buildtools-make`.
#. Execute the installation script. Here is an example for the
- traditional installer::
+ traditional installer:
+
+ .. code-block:: console
$ sh ~/Downloads/x86_64-buildtools-nativesdk-standalone-&DISTRO;.sh
- Here is an example for the extended installer::
+ Here is an example for the extended installer:
+
+ .. code-block:: console
$ sh ~/Downloads/x86_64-buildtools-extended-nativesdk-standalone-&DISTRO;.sh
- An example for the make-only installer::
+ An example for the make-only installer:
+
+ .. code-block:: console
$ sh ~/Downloads/x86_64-buildtools-make-nativesdk-standalone-&DISTRO;.sh
@@ -553,7 +569,9 @@ steps:
``/home/your-username/buildtools``
#. As instructed by the installer script, you will have to source the tools
- environment setup script::
+ environment setup script:
+
+ .. code-block:: console
$ source /home/your_username/buildtools/environment-setup-x86_64-pokysdk-linux
@@ -581,15 +599,21 @@ installer:
your build environment with the setup script
(:ref:`structure-core-script`).
-#. Run the BitBake command to build the tarball::
+#. Run the BitBake command to build the tarball:
+
+ .. code-block:: console
$ bitbake buildtools-tarball
- or to build the extended tarball::
+ or to build the extended tarball:
+
+ .. code-block:: console
$ bitbake buildtools-extended-tarball
- or to build the make-only tarball::
+ or to build the make-only tarball:
+
+ .. code-block:: console
$ bitbake buildtools-make-tarball
@@ -607,15 +631,21 @@ installer:
does not meet the Git, tar, or Python (or gcc) requirements.
#. On this machine, run the ``.sh`` file to install the tools. Here is an
- example for the traditional installer::
+ example for the traditional installer:
+
+ .. code-block:: console
$ sh ~/Downloads/x86_64-buildtools-nativesdk-standalone-&DISTRO;.sh
- For the extended installer::
+ For the extended installer:
+
+ .. code-block:: console
$ sh ~/Downloads/x86_64-buildtools-extended-nativesdk-standalone-&DISTRO;.sh
- And for the make-only installer::
+ And for the make-only installer:
+
+ .. code-block:: console
$ sh ~/Downloads/x86_64-buildtools-make-nativesdk-standalone-&DISTRO;.sh
@@ -624,7 +654,9 @@ installer:
``/home/your_username/buildtools``
#. Source the tools environment setup script by using a command like the
- following::
+ following:
+
+ .. code-block:: console
$ source /home/your_username/buildtools/environment-setup-x86_64-poky-linux
@@ -316,11 +316,15 @@ Patch files, by default, are ``*.patch`` and ``*.diff`` files created
and kept in a subdirectory of the directory holding the recipe file. For
example, consider the
:oe_git:`bluez5 </openembedded-core/tree/meta/recipes-connectivity/bluez5>`
-recipe from the :term:`OpenEmbedded-Core (OE-Core)` layer::
+recipe from the :term:`OpenEmbedded-Core (OE-Core)` layer:
+
+.. code-block:: text
meta/recipes-connectivity/bluez5
-This recipe has two patch files located here::
+This recipe has two patch files located here:
+
+.. code-block:: text
meta/recipes-connectivity/bluez5/bluez5
@@ -497,7 +501,9 @@ Removes all output files for a target from the
:ref:`ref-tasks-install`, and
:ref:`ref-tasks-package`).
-You can run this task using BitBake as follows::
+You can run this task using BitBake as follows:
+
+.. code-block:: console
$ bitbake -c clean recipe
@@ -522,20 +528,26 @@ downloaded source files for a target (i.e. the contents of
identical to the :ref:`ref-tasks-cleansstate` task
with the added removal of downloaded source files.
-You can run this task using BitBake as follows::
+You can run this task using BitBake as follows:
+
+.. code-block:: console
$ bitbake -c cleanall recipe
You should never use the :ref:`ref-tasks-cleanall` task in a normal
scenario. If you want to start fresh with the :ref:`ref-tasks-fetch` task,
-use instead::
+use instead:
+
+.. code-block:: console
$ bitbake -f -c fetch recipe
.. note::
The reason to prefer ``bitbake -f -c fetch`` is that the
- :ref:`ref-tasks-cleanall` task would break in some cases, such as::
+ :ref:`ref-tasks-cleanall` task would break in some cases, such as:
+
+ .. code-block:: console
$ bitbake -c fetch recipe
$ bitbake -c cleanall recipe-native
@@ -562,7 +574,9 @@ target. Essentially, the :ref:`ref-tasks-cleansstate` task is identical to the
shared state (:ref:`sstate <overview-manual/concepts:shared state cache>`)
cache.
-You can run this task using BitBake as follows::
+You can run this task using BitBake as follows:
+
+.. code-block:: console
$ bitbake -c cleansstate recipe
@@ -586,7 +600,9 @@ scratch is guaranteed.
The :ref:`ref-tasks-cleansstate` task cannot remove sstate from a remote sstate
mirror. If you need to build a target from scratch using remote mirrors, use
- the "-f" option as follows::
+ the "-f" option as follows:
+
+ .. code-block:: console
$ bitbake -f -c do_cleansstate target
@@ -725,7 +741,9 @@ changes made by the user with other methods (i.e. using
(:ref:`ref-tasks-menuconfig`). Once the
file of differences is created, it can be used to create a config
fragment that only contains the differences. You can invoke this task
-from the command line as follows::
+from the command line as follows:
+
+.. code-block:: console
$ bitbake linux-yocto -c diffconfig
@@ -755,7 +773,9 @@ Validates the configuration produced by the
configuration does not appear in the final ``.config`` file or when you
override a policy configuration in a hardware configuration fragment.
You can run this task explicitly and view the output by using the
-following command::
+following command:
+
+.. code-block:: console
$ bitbake linux-yocto -c kernel_configcheck -f
@@ -817,7 +837,9 @@ instead of the default defconfig. The saved defconfig contains the
differences between the default defconfig and the changes made by the
user using other methods (i.e. the
:ref:`ref-tasks-menuconfig` task. You
-can invoke the task using the following command::
+can invoke the task using the following command:
+
+.. code-block:: console
$ bitbake linux-yocto -c savedefconfig
@@ -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
@@ -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
@@ -203,7 +203,9 @@ system and gives an overview of their function and contents.
system. Separate multiple entries using spaces.
As an example, use the following form to add an ``shlib`` provider of
- shlibname in packagename with the optional version::
+ shlibname in packagename with the optional version:
+
+ .. code-block:: text
shlibname:packagename[_version]
@@ -978,7 +980,9 @@ system and gives an overview of their function and contents.
BitBake remote server.
Use the following format to export the variable to the BitBake
- environment::
+ environment:
+
+ .. code-block:: console
$ export BBSERVER=localhost:$port
@@ -1031,7 +1035,9 @@ system and gives an overview of their function and contents.
:term:`BP`
The base recipe name and version but without any special recipe name
suffix (i.e. ``-native``, ``lib64-``, and so forth). :term:`BP` is
- comprised of the following::
+ comprised of the following:
+
+ .. code-block:: text
${BPN}-${PV}
@@ -2152,7 +2158,9 @@ system and gives an overview of their function and contents.
The destination directory. The location in the :term:`Build Directory`
where components are installed by the
:ref:`ref-tasks-install` task. This location defaults
- to::
+ to:
+
+ .. code-block:: text
${WORKDIR}/image
@@ -2646,7 +2654,9 @@ system and gives an overview of their function and contents.
You can set this directory by defining the :term:`DL_DIR` variable in the
:ref:`structure-build-conf-local.conf` file. This directory is self-maintaining and you
should not have to touch it. By default, the directory is
- ``downloads`` in the :term:`Build Directory`::
+ ``downloads`` in the :term:`Build Directory`:
+
+ .. code-block:: text
#DL_DIR ?= "${TOPDIR}/downloads"
@@ -3044,7 +3054,9 @@ system and gives an overview of their function and contents.
The set list of commands you can configure using the
:term:`EXTRA_USERS_PARAMS` is shown in the
:ref:`ref-classes-extrausers` class. These commands map to the normal
- Unix commands of the same names::
+ Unix commands of the same names:
+
+ .. code-block:: text
# EXTRA_USERS_PARAMS = "\
# useradd -p '' tester; \
@@ -3059,7 +3071,9 @@ system and gives an overview of their function and contents.
``useradd`` or ``usermod``, but only hashed.
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)
@@ -3337,7 +3351,9 @@ system and gives an overview of their function and contents.
You can take advantage of this searching behavior in useful ways. For
example, consider a case where there is the following directory structure
- for general and machine-specific configurations::
+ for general and machine-specific configurations:
+
+ .. code-block:: text
files/defconfig
files/MACHINEA/defconfig
@@ -3808,7 +3824,9 @@ system and gives an overview of their function and contents.
- Use the script file from the U-Boot shell. The name of the script in
FIT image is ``bootscr-${FIT_UBOOT_ENV}``. This example loads the FIT
- image from a TFTP server::
+ image from a TFTP server:
+
+ .. code-block:: shell
tftp $loadaddr $fit_tftp_path
source $loadaddr#bootscr-boot.cmd
@@ -4510,7 +4528,9 @@ system and gives an overview of their function and contents.
:term:`IMAGE_MANIFEST`
The manifest file for the image. This file lists all the installed
packages that make up the image. The file contains package
- information on a line-per-package basis as follows::
+ information on a line-per-package basis as follows:
+
+ .. code-block:: text
packagename packagearch version
@@ -4701,7 +4721,9 @@ system and gives an overview of their function and contents.
the generated image, a requested size for the image, and requested
additional free disk space to be added to the image. Programatically,
the build system determines the final size of the generated image as
- follows::
+ follows:
+
+ .. code-block:: text
if (image-du * overhead) < rootfs-size:
internal-rootfs-size = rootfs-size + xspace
@@ -5826,7 +5848,9 @@ system and gives an overview of their function and contents.
Provides a short description of a configuration fragment. You use
this variable in the ``.scc`` file that describes a configuration
fragment file. Here is the variable used in a file named ``smp.scc``
- to describe SMP being enabled::
+ to describe SMP being enabled:
+
+ .. code-block:: text
define KFEATURE_DESCRIPTION "Enable SMP"
@@ -5878,7 +5902,9 @@ system and gives an overview of their function and contents.
- ``prefer-modules``: prefer a kernel configuration to be set as ``m``
instead of the default value ``y`` if the kernel configuration was
- defined as follows::
+ defined as follows:
+
+ .. code-block:: ini
CONFIG_FOO=y # OVERRIDE:$MODULE_OR_Y
@@ -6099,7 +6125,9 @@ system and gives an overview of their function and contents.
LICENSE_FLAGS_DETAILS[FooBar-EULA] = "For further details, see https://example.com/eula."
If ``Foobar-EULA`` isn't in :term:`LICENSE_FLAGS_ACCEPTED`, the
- error message is more useful::
+ error message is more useful:
+
+ .. code-block:: text
Has a restricted license 'FooBar-EULA' which is not listed in your LICENSE_FLAGS_ACCEPTED.
For further details, see https://example.com/eula.
@@ -6153,7 +6181,9 @@ system and gives an overview of their function and contents.
Defining this variable essentially sets the Linux kernel
configuration item ``CONFIG_LOCALVERSION``, which is visible through
the ``uname`` command. Here is an example that shows the extension
- assuming it was set as previously shown::
+ assuming it was set as previously shown:
+
+ .. code-block:: console
$ uname -r
3.7.0-rc8-custom
@@ -6577,7 +6607,9 @@ system and gives an overview of their function and contents.
target systems to be put into different subdirectories of the same
output directory.
- The default value of this variable is::
+ The default value of this variable is:
+
+ .. code-block:: text
${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}
@@ -6937,7 +6969,9 @@ system and gives an overview of their function and contents.
Project Development Tasks Manual for more information.
:term:`P`
- The recipe name and version. :term:`P` is comprised of the following::
+ The recipe name and version. :term:`P` is comprised of the following:
+
+ .. code-block:: text
${PN}-${PV}
@@ -7291,7 +7325,9 @@ system and gives an overview of their function and contents.
recipe on a per-recipe basis. :term:`PACKAGECONFIG` blocks are defined in
recipes when you specify features and then arguments that define
feature behaviors. Here is the basic block structure (broken over
- multiple lines for readability)::
+ multiple lines for readability):
+
+ .. code-block:: text
PACKAGECONFIG ??= "f1 f2 f3 ..."
PACKAGECONFIG[f1] = "\
@@ -7375,13 +7411,17 @@ system and gives an overview of their function and contents.
Consider the following example of a :ref:`ref-classes-cmake` recipe with a systemd service
in which :term:`PACKAGECONFIG` is used to transform the systemd service
- into a feature that can be easily enabled or disabled via :term:`PACKAGECONFIG`::
+ into a feature that can be easily enabled or disabled via :term:`PACKAGECONFIG`:
+
+ .. code-block:: text
example.c
example.service
CMakeLists.txt
- The ``CMakeLists.txt`` file contains::
+ The ``CMakeLists.txt`` file contains:
+
+ .. code-block:: cmake
if(WITH_SYSTEMD)
install(FILES ${PROJECT_SOURCE_DIR}/example.service DESTINATION /etc/systemd/systemd)
@@ -7431,7 +7471,9 @@ system and gives an overview of their function and contents.
:term:`PACKAGES`
The list of packages the recipe creates. The default value is the
- following::
+ following:
+
+ .. code-block:: text
${PN}-src ${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}
@@ -7619,7 +7661,9 @@ system and gives an overview of their function and contents.
:term:`PKGD`
Points to the destination directory for files to be packaged before
they are split into individual packages. This directory defaults to
- the following::
+ the following:
+
+ .. code-block:: text
${WORKDIR}/package
@@ -7631,7 +7675,9 @@ system and gives an overview of their function and contents.
:ref:`ref-tasks-packagedata` task packages data
for each recipe and installs it into this shared area.
This directory defaults to the following, which you should not
- change::
+ change:
+
+ .. code-block:: text
${TMPDIR}/pkgdata/${MACHINE}
@@ -7644,7 +7690,9 @@ system and gives an overview of their function and contents.
:term:`PKGDEST`
Points to the parent directory for files to be packaged after they
have been split into individual packages. This directory defaults to
- the following::
+ the following:
+
+ .. code-block:: text
${WORKDIR}/packages-split
@@ -7655,7 +7703,9 @@ system and gives an overview of their function and contents.
:term:`PKGDESTWORK`
Points to a temporary work area where the
:ref:`ref-tasks-package` task saves package metadata.
- The :term:`PKGDESTWORK` location defaults to the following::
+ The :term:`PKGDESTWORK` location defaults to the following:
+
+ .. code-block:: text
${WORKDIR}/pkgdata
@@ -8912,7 +8962,9 @@ system and gives an overview of their function and contents.
As an example, assume a :term:`Source Directory`
top-level folder named ``bitbake-builds`` and a default :term:`Build Directory` at
``bitbake-builds/build``. In this case, the work directory the build system
- uses to keep the unpacked recipe for ``db`` is the following::
+ uses to keep the unpacked recipe for ``db`` is the following:
+
+ .. code-block:: text
bitbake-builds/build/tmp/work/qemux86-poky-linux/db/5.1.19-r3/sources/db-5.1.19
@@ -9067,7 +9119,9 @@ system and gives an overview of their function and contents.
The manifest file for the host part of the SDK. This file lists all
the installed packages that make up the host part of the SDK. The
file contains package information on a line-per-package basis as
- follows::
+ follows:
+
+ .. code-block:: text
packagename packagearch version
@@ -9198,7 +9252,9 @@ system and gives an overview of their function and contents.
The manifest file for the target part of the SDK. This file lists all
the installed packages that make up the target part of the SDK. The
file contains package information on a line-per-package basis as
- follows::
+ follows:
+
+ .. code-block:: text
packagename packagearch version
@@ -9278,7 +9334,9 @@ system and gives an overview of their function and contents.
:term:`SDKIMAGE_FEATURES`
Equivalent to :term:`IMAGE_FEATURES`. However, this variable applies to
- the SDK generated from an image using the following command::
+ the SDK generated from an image using the following command:
+
+ .. code-block:: console
$ bitbake -c populate_sdk imagename
@@ -9406,7 +9464,9 @@ system and gives an overview of their function and contents.
SIGGEN_LOCKEDSIGS += "bc:do_compile:09772aa4532512baf96d433484f27234d4b7c11dd9cda0d6f56fa1b7ce6f25f0"
- You can obtain the signature of all the tasks for the recipe ``bc`` using::
+ You can obtain the signature of all the tasks for the recipe ``bc`` using:
+
+ .. code-block:: console
$ bitbake -S none bc
@@ -9556,14 +9616,18 @@ system and gives an overview of their function and contents.
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 example.com
login <user>
password <password>
This file requires permissions set to ``400`` or ``600`` to prevent
- other users from reading the file::
+ other users from reading the file:
+
+ .. code-block:: console
$ chmod 600 "$HOME/.netrc"
@@ -9637,7 +9701,9 @@ system and gives an overview of their function and contents.
ANNOTATION2 = "Second annotation for recipe"
SPDX_CUSTOM_ANNOTATION_VARS = "ANNOTATION1 ANNOTATION2"
- This will add a new block to the recipe ``.sdpx.json`` output::
+ This will add a new block to the recipe ``.sdpx.json`` output:
+
+ .. code-block:: json
"annotations": [
{
@@ -10080,7 +10146,9 @@ system and gives an overview of their function and contents.
To make such a change, it is recommended to customize the
``psplash`` recipe in a custom layer. Here is an example structure for
- an ``ACME`` board::
+ an ``ACME`` board:
+
+ .. code-block:: text
meta-acme/recipes-core/psplash
├── files
@@ -11347,7 +11415,9 @@ system and gives an overview of their function and contents.
packages specified by this variable are part of the toolchain set
that runs on the :term:`SDKMACHINE`, and each
package should usually have the prefix ``nativesdk-``. For example,
- consider the following command when building an SDK::
+ consider the following command when building an SDK:
+
+ .. code-block:: console
$ bitbake -c populate_sdk imagename
@@ -11612,7 +11682,9 @@ system and gives an overview of their function and contents.
UBOOT_CONFIG_BINARY[bar] = "binary2"
It specifies the 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::
+ The output of a U-Boot build may be more than one binary, for example:
+
+ .. code-block:: text
u-boot.bin
u-boot-with-spl.bin
@@ -12855,7 +12927,9 @@ system and gives an overview of their function and contents.
:term:`TMPDIR` directory structure and is specific to
the recipe being built and the system for which it is being built.
- The :term:`WORKDIR` directory is defined as follows::
+ The :term:`WORKDIR` directory is defined as follows:
+
+ .. code-block:: text
${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}
@@ -12874,7 +12948,9 @@ system and gives an overview of their function and contents.
``qemux86-poky-linux`` machine target system. Furthermore, suppose
your recipe is named ``foo_1.3.0-r0.bb``. In this case, the work
directory the build system uses to build the package would be as
- follows::
+ follows:
+
+ .. code-block:: text
bitbake-builds/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0
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) Signed-off-by: Trevor Woerner <twoerner@gmail.com> --- 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(-)