From patchwork Tue Dec 1 15:22:37 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Trevor Woerner X-Patchwork-Id: 106819 Received: from mail-oi1-f171.google.com (mail-oi1-f171.google.com [209.85.167.171]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.13566.1796138591604675893 for ; Tue, 01 Dec 2026 07:23:11 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20260707 header.b=mUbwwV74; spf=pass (domain: gmail.com, ip: 209.85.167.171, mailfrom: twoerner@gmail.com) Received: by mail-oi1-f171.google.com with SMTP id 5614622812f47-4d198f1a591so11797454b6e.2 for ; Tue, 01 Dec 2026 07:23:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796138591; x=1796743391; darn=lists.yoctoproject.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Nfv9WG/NbmEppvK+d2h/oNwrkw7i5067dR/k+RTf6z8=; b=mUbwwV74pwmy49H4TDAsCq4QHX5YJrUyiTmmiwY912Db/pSjn7zDtZCrxAwwgWMbag AN7irg94EvIzRvRZYzvcmdRkCO31QbtVah/n5nv3Zpe4qf3zhdRxmuPspMQ+PdRcKefT HX/bhxZK6Kkyvv0hsnEP3T+lvkaHiaey3VQX/PW9LkdZwirAlKrIpxd1Y3+PXldYdPEv Ov6REs0ojSS9A6/9GJVJ3nnWpAkdl0z74Eqo/0pOC1foWYvsuGLYK5Ee2sOkZ1rLx7v2 4vnTZPIhSFs/m2E6+xAblr/yMcLSMa/dsZDftdgZELqABMyxavBePaM1Mq9+W40PPo12 ldiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796138591; x=1796743391; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Nfv9WG/NbmEppvK+d2h/oNwrkw7i5067dR/k+RTf6z8=; b=lKHnQ1pvLrVI5E/AEjKe1PB3xZvi6iB1ax99lKXeCNTRtCgw0ZW2k6pLv5UF2Zva6r CLDBPycGAflkwY9bLvQmk5dr2EyVAM0ELlAGl8Ara5eWujTvXL223vtiMJflKR3jAvyk AW40zKlWl9TT9FN8ZEJ4kO+i4JX5lRxQm9WHV40GCZStPzi6Llq5AcF+9wuztzPPyiDL IdlO2rmq3KzKlcI7grDIfvSd7YQnf7TeqWguFRAThQ0uHsCBVJPW87xtUfS2se67b2nE li0OYxQ77HIqBZIZZOl/L7DzNPtXxT5d4CTPBLzLm3D2DBI/mS3V6ENf2jlKjUuW05pb a9PA== X-Gm-Message-State: APuU4Z/vQOK2PPxaYxZ9IBe6ujcB2l2WnwleI11fzbd3A0QH49MzXkAB PqQDqCDdo1o9h7DDlNktXXZhRI50IaQo3e+ogAC/AHNyV4KjAAdS6g29ymMEtQ== X-Gm-Gg: AZFdTZdCN5YGYUOIpxq48q+tzn10J/fYG91sibL5WL35fAioT8c+cDl6w0IEA3dEXtY IW9e932MEPCHETjTxMlk7ZiHutEL/UAwQ3KLoyTmTl2KOP0SOZ4bglXvYPFeMeUpT2p3BxTV+Pe xSFGF68ci4ZLYwMZ4NYt0WJFwxQmBBReMbdQXsNwI7VJe8Ii3uNbdIUA6MY1FtK4+XcEBsDRaNd LHO467nZvZwRRStuKypOnozmBPuwQ3yrHuUWGvzh7NP38sP3yQSvsEQGTu2Y3/Urj7+k4SZ8CP1 IOrE0738QevLeDZ46rJo3yxGJ1fduy7pj1fT/AriG8VxUCrd/BB337WEdJ5ufRr0XgxAUMRoiu3 QBSzKeQFpAcG1roX+pYSwhYioKNgZIjtW1pIJwZ133ttUqWmEmcNGgHP6Ev/oS9LGMFiM6MVadg LHD3+1N3a/7EmCvLcUU3gn9PRwBXZF4mLwgBGAV8VvVQvYpRaq+G2tASbQvcnOyPQOnCksIW8Ty y+HB2Z7M6kIhkyl7+YsM4Sg8XK7V3tWG1rGklDqn4+WDvlXPlxQTxF/xQCtVL1fP/H1wPYqv1NV LJVYUJpLWiTzVZCsWH/C/2TU1uiadgElQqJw4r8nmmzXSrfC8BUWHo46Ibyoj6Ndam9J5adZIxs FZmGX+P4Rukg3Q/KkaOIZfEynCIz6XKI= X-Received: by 2002:a05:6808:640a:b0:572:e8fb:2125 with SMTP id 5614622812f47-57a09504aadmr34738748b6e.20.1796138586992; Tue, 01 Dec 2026 07:23:06 -0800 (PST) Return-Path: Received: from localhost.localdomain (pppoe-209-91-167-254.vianet.ca. [209.91.167.254]) by smtp.gmail.com with ESMTPSA id 5614622812f47-57a31929223sm27818249b6e.1.2026.12.01.07.23.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2026 07:23:05 -0800 (PST) From: Trevor Woerner To: docs@lists.yoctoproject.org Subject: [PATCH 04/16] dev-manual: state the language of the blocks that are not BitBake Date: Tue, 1 Dec 2026 10:22:37 -0500 Message-ID: <20261201152251.2742634-5-twoerner@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20261201152251.2742634-1-twoerner@gmail.com> References: <20261201152251.2742634-1-twoerner@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Tue, 01 Dec 2026 15:23:21 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/10864 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 --- 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(-) diff --git a/documentation/dev-manual/bblock.rst b/documentation/dev-manual/bblock.rst index b9d6606a99b4..59207383e576 100644 --- a/documentation/dev-manual/bblock.rst +++ b/documentation/dev-manual/bblock.rst @@ -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 `. -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 diff --git a/documentation/dev-manual/bmaptool.rst b/documentation/dev-manual/bmaptool.rst index b145974c6b9a..496b5b4ab446 100644 --- a/documentation/dev-manual/bmaptool.rst +++ b/documentation/dev-manual/bmaptool.rst @@ -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 diff --git a/documentation/dev-manual/build-quality.rst b/documentation/dev-manual/build-quality.rst index dc10d1f05d5b..77a7c812f1e6 100644 --- a/documentation/dev-manual/build-quality.rst +++ b/documentation/dev-manual/build-quality.rst @@ -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 diff --git a/documentation/dev-manual/building.rst b/documentation/dev-manual/building.rst index d36a523f508f..0bb8033a113d 100644 --- a/documentation/dev-manual/building.rst +++ b/documentation/dev-manual/building.rst @@ -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 diff --git a/documentation/dev-manual/creating-fragments.rst b/documentation/dev-manual/creating-fragments.rst index cd87341e9a51..a221ad9e77e4 100644 --- a/documentation/dev-manual/creating-fragments.rst +++ b/documentation/dev-manual/creating-fragments.rst @@ -33,7 +33,9 @@ directive>` directive in :oe_git:`bitbake.conf ` did not work out as expected. BitBake's ``bitbake-getvar`` command is used to display variable values after parsing. The following command displays the variable value for :term:`OVERRIDES` after the configuration files (i.e. ``local.conf``, :ref:`structure-build-conf-bblayers.conf`, -``bitbake.conf`` and so forth) have been parsed:: +``bitbake.conf`` and so forth) have been parsed: + +.. code-block:: console $ bitbake-getvar OVERRIDES The following command displays the value of :term:`PV` after a specific recipe -has been parsed:: +has been parsed: + +.. code-block:: console $ bitbake-getvar -r recipename PV @@ -142,11 +146,15 @@ includes variable flags (varflags) set on the variable. The output can be very helpful during debugging. Variables that are exported to the environment are preceded by -``export`` in the output of ``bitbake-getvar``. See the following example:: +``export`` in the output of ``bitbake-getvar``. See the following example: + +.. code-block:: text export CC="i586-poky-linux-gcc -m32 -march=i586 --sysroot=/home/user/poky/build/tmp/sysroots/qemux86" -Shell functions and tasks can also be inspected with the same mechanism:: +Shell functions and tasks can also be inspected with the same mechanism: + +.. code-block:: console $ bitbake-getvar -r recipename do_install @@ -208,7 +216,9 @@ Here are a few of the available ``oe-pkgdata-util`` subcommands. - ``oe-pkgdata-util find-path path ...``: Lists the names of the packages that contain the given paths. For example, the following tells us that ``/usr/share/man/man1/make.1`` is contained in the - ``make-doc`` package:: + ``make-doc`` package: + + .. code-block:: console $ oe-pkgdata-util find-path /usr/share/man/man1/make.1 make-doc: /usr/share/man/man1/make.1 @@ -217,7 +227,9 @@ Here are a few of the available ``oe-pkgdata-util`` subcommands. of the recipes that produce the given packages. For more information on the ``oe-pkgdata-util`` command, use the help -facility:: +facility: + +.. code-block:: console $ oe-pkgdata-util --help $ oe-pkgdata-util subcommand --help @@ -230,7 +242,9 @@ before the one you have specified. Dependency information can help you understand why a recipe is built. To generate dependency information for a recipe, run the following -command:: +command: + +.. code-block:: console $ bitbake -g recipename @@ -259,7 +273,9 @@ format and can be converted to images (e.g. using the ``dot`` tool from provide useful information. As an example, the ``task-depends.dot`` file contains lines such - as the following:: + as the following: + + .. code-block:: text "libxslt.do_configure" -> "libxml2.do_populate_sysroot" @@ -276,11 +292,15 @@ format and can be converted to images (e.g. using the ``dot`` tool from displays paths between graph nodes. You can use a different method to view dependency information by using -either:: +either: + +.. code-block:: console $ bitbake -g -u taskexp recipename -or:: +or: + +.. code-block:: console $ bitbake -g -u taskexp_ncurses recipename @@ -305,7 +325,9 @@ If you are unsure whether a variable dependency is being picked up automatically for a given task, you can list the variable dependencies BitBake has determined by doing the following: -#. Build the recipe containing the task:: +#. Build the recipe containing the task: + + .. code-block:: console $ bitbake recipename @@ -316,7 +338,9 @@ BitBake has determined by doing the following: checksum for the task. As an example, for the :ref:`ref-tasks-fetch` task of the ``db`` recipe, the ``sigdata`` file might be found in the following - location:: + location: + + .. code-block:: text ${BUILDDIR}/tmp/stamps/i586-poky-linux/db/6.0.30-r1.do_fetch.sigdata.7c048c18222b16ff0bcee2000ef648b1 @@ -328,14 +352,18 @@ BitBake has determined by doing the following: same information as ``sigdata`` files. #. Run ``bitbake-dumpsig`` on the ``sigdata`` or ``siginfo`` file. Here - is an example:: + is an example: + + .. code-block:: console $ bitbake-dumpsig ${BUILDDIR}/tmp/stamps/i586-poky-linux/db/6.0.30-r1.do_fetch.sigdata.7c048c18222b16ff0bcee2000ef648b1 In the output of the above command, you will find a line like the following, which lists all the (inferred) variable dependencies for the task. This list also includes indirect dependencies from - variables depending on other variables, recursively:: + variables depending on other variables, recursively: + + .. code-block:: text Task dependencies: ['PV', 'SRCREV', 'SRC_URI', 'SRC_URI[sha256sum]', 'base_do_fetch'] @@ -360,7 +388,9 @@ call ``bitbake-diffsigs`` with just one file, the command behaves like You can also use BitBake to dump out the signature construction information without executing tasks by using either of the following -BitBake command-line options:: +BitBake command-line options: + +.. code-block:: text --dump-signatures=SIGNATURE_HANDLER -S SIGNATURE_HANDLER @@ -451,7 +481,9 @@ behavior in most cases is: :ref:`ref-tasks-fetch`, :ref:`ref-tasks-unpack`, :ref :ref:`ref-tasks-build` and any tasks on which it depends build first. Some tasks, such as :ref:`ref-tasks-devshell`, are not part of the default build chain. If you wish to run a task that is not part of the default build chain, you can -use the ``-c`` option in BitBake. Here is an example:: +use the ``-c`` option in BitBake. Here is an example: + +.. code-block:: console $ bitbake matchbox-desktop -c devshell @@ -476,7 +508,9 @@ out), then you can use the ``-f`` option. [\ :ref:`nostamp `\ ] variable flag is already set for the task. -The following example shows one way you can use the ``-f`` option:: +The following example shows one way you can use the ``-f`` option: + +.. code-block:: console $ bitbake matchbox-desktop . @@ -505,7 +539,9 @@ Using this option invalidates the given task and then runs the :ref:`ref-tasks-build` task, which is the default task if no task is given, and the tasks on which it depends. You could replace the final two commands in the previous example with -the following single command:: +the following single command: + +.. code-block:: console $ bitbake matchbox-desktop -C compile @@ -529,14 +565,18 @@ task dependency mechanisms. and build output might not be in the clean state they would be in for a "normal" build, depending on what actions you took. To get rid of such warnings, you can remove the work directory and rebuild the - recipe, as follows:: + recipe, as follows: + + .. code-block:: console $ bitbake matchbox-desktop -c clean $ bitbake matchbox-desktop You can view a list of tasks in a given package by running the -:ref:`ref-tasks-listtasks` task as follows:: +:ref:`ref-tasks-listtasks` task as follows: + +.. code-block:: console $ bitbake matchbox-desktop -c listtasks @@ -560,7 +600,9 @@ Building with No Dependencies ============================= To build a specific recipe (``.bb`` file), you can use the following -command form:: +command form: + +.. code-block:: console $ bitbake -b somepath/somerecipe.bb @@ -789,18 +831,24 @@ build, set the :term:`PARALLEL_MAKE` variable in your :ref:`structure-build-conf-local.conf` file to a high number (e.g. "-j 20"). Using a high value for :term:`PARALLEL_MAKE` increases the chances of the race -condition showing up:: +condition showing up: + +.. code-block:: console $ bitbake neard -Once the local build for "neard" completes, start a ``devshell`` build:: +Once the local build for "neard" completes, start a ``devshell`` build: + +.. code-block:: console $ bitbake neard -c devshell For information on how to use a ``devshell``, see the ":ref:`dev-manual/development-shell:using a development shell`" section. -In the ``devshell``, do the following:: +In the ``devshell``, do the following: + +.. code-block:: console $ make clean $ make tools/snep-send.o @@ -808,7 +856,9 @@ In the ``devshell``, do the following:: The ``devshell`` commands cause the failure to clearly be visible. In this case, there is a missing dependency for the ``neard`` Makefile target. Here is some abbreviated, sample output with the -missing dependency clearly visible at the end:: +missing dependency clearly visible at the end: + +.. code-block:: text i586-poky-linux-gcc -m32 -march=i586 --sysroot= . @@ -828,7 +878,9 @@ Creating a Patch for the Fix Because there is a missing dependency for the Makefile target, you need to patch the ``Makefile.am`` file, which is generated from -``Makefile.in``. You can use Quilt to create the patch:: +``Makefile.in``. You can use Quilt to create the patch: + +.. code-block:: console $ quilt new parallelmake.patch Patch patches/parallelmake.patch is now on top @@ -840,19 +892,25 @@ For more information on using Quilt, see the At this point you need to make the edits to ``Makefile.am`` to add the missing dependency. For our example, you have to add the following line -to the file:: +to the file: + +.. code-block:: text tools/snep-send.$(OBJEXT): include/near/dbus.h Once you have edited the file, use the ``refresh`` command to create the -patch:: +patch: + +.. code-block:: console $ quilt refresh Refreshed patch patches/parallelmake.patch Once the patch file is created, you need to add it back to the originating recipe folder. Here is an example assuming :term:`OpenEmbedded-Core (OE-Core)` -is named ``openembedded-core``:: +is named ``openembedded-core``: + +.. code-block:: console $ cp patches/parallelmake.patch openembedded-core/meta/recipes-connectivity/neard/neard @@ -869,7 +927,9 @@ is what the edited :term:`SRC_URI` statement would look like:: " With the patch complete and moved to the correct folder and the -:term:`SRC_URI` statement updated, you can exit the ``devshell``:: +:term:`SRC_URI` statement updated, you can exit the ``devshell``: + +.. code-block:: console $ exit @@ -877,14 +937,18 @@ Testing the Build ----------------- With everything in place, you can get back to trying the build again -locally:: +locally: + +.. code-block:: console $ bitbake neard This build should succeed. Now you can open up a ``devshell`` again and repeat the clean and make -operations as follows:: +operations as follows: + +.. code-block:: console $ bitbake neard -c devshell $ make clean @@ -949,18 +1013,24 @@ To run a ``debuginfod`` server, you need to do the following: This distro feature enables the server and client library in ``elfutils``, and enables ``debuginfod`` support in clients (at the moment, ``gdb`` and ``binutils``). -- Run the following commands to launch the ``debuginfod`` server on the host:: +- Run the following commands to launch the ``debuginfod`` server on the host: + + .. code-block:: console $ oe-debuginfod - To use ``debuginfod`` on the target, you need to know the ip:port where ``debuginfod`` is listening on the host (port defaults to 8002), and export - that into the shell environment, for example in ``qemu``:: + that into the shell environment, for example in ``qemu``: + + .. code-block:: console root@qemux86-64:~# export DEBUGINFOD_URLS="http://192.168.7.1:8002/" - Then debug info fetching should simply work when running the target ``gdb``, - ``readelf`` or ``objdump``, for example:: + ``readelf`` or ``objdump``, for example: + + .. code-block:: console root@qemux86-64:~# gdb /bin/cat ... @@ -968,7 +1038,9 @@ To run a ``debuginfod`` server, you need to do the following: Downloading separate debug info for /bin/cat... Reading symbols from /home/root/.cache/debuginfod_client/923dc4780cfbc545850c616bffa884b6b5eaf322/debuginfo... -- It's also possible to use ``debuginfod-find`` to just query the server:: +- It's also possible to use ``debuginfod-find`` to just query the server: + + .. code-block:: console root@qemux86-64:~# debuginfod-find debuginfo /bin/ls /home/root/.cache/debuginfod_client/356edc585f7f82d46f94fcb87a86a3fe2d2e60bd/debuginfo @@ -1038,25 +1110,33 @@ debugger. #. *Build the environment:* Use the following command to construct the image and the companion - Debug Filesystem:: + Debug Filesystem: + + .. code-block:: console $ bitbake image Build the cross GDB component and make it available for debugging. Build the SDK that matches the image. Building the SDK is best for a production build that can be - used later for debugging, especially during long term maintenance:: + used later for debugging, especially during long term maintenance: + + .. code-block:: console $ bitbake -c populate_sdk image Alternatively, you can build the minimal toolchain components that match the target. Doing so creates a smaller than typical SDK and only contains a minimal set of components with which to build simple - test applications, as well as run the debugger:: + test applications, as well as run the debugger: + + .. code-block:: console $ bitbake meta-toolchain - A final method is to build Gdb itself within the build system:: + A final method is to build Gdb itself within the build system: + + .. code-block:: console $ bitbake gdb-cross- @@ -1073,7 +1153,9 @@ debugger. #. *Set up the* ``debugfs``\ *:* - Run the following commands to set up the ``debugfs``:: + Run the following commands to set up the ``debugfs``: + + .. code-block:: console $ mkdir debugfs $ cd debugfs @@ -1112,7 +1194,9 @@ debugger. Documentation `__. After running gdbserver on the target, you need to run Gdb on the - host and configure it and connect to the target. Use these commands:: + host and configure it and connect to the target. Use these commands: + + .. code-block:: console $ cd $ -gdb @@ -1143,7 +1227,9 @@ debugger. If the binary is processed through the debug splitting in OpenEmbedded, you should also copy the debug items (i.e. ``.debug`` contents and corresponding ``/usr/src/debug`` files) from the work - directory. Here is an example:: + directory. Here is an example: + + .. code-block:: console $ bitbake bash $ bitbake -c devshell bash @@ -1254,7 +1340,9 @@ Here are some other tips that you might find useful: "$@" } - Here are some usage examples:: + Here are some usage examples: + + .. code-block:: console $ g FOO # Search recursively for "FOO" $ g -i foo # Search recursively for "foo", ignoring case diff --git a/documentation/dev-manual/development-shell.rst b/documentation/dev-manual/development-shell.rst index be26bcffc7ba..373223dd2b5d 100644 --- a/documentation/dev-manual/development-shell.rst +++ b/documentation/dev-manual/development-shell.rst @@ -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 diff --git a/documentation/dev-manual/devtool.rst b/documentation/dev-manual/devtool.rst index 3abec4a41aaa..210f2c396771 100644 --- a/documentation/dev-manual/devtool.rst +++ b/documentation/dev-manual/devtool.rst @@ -50,7 +50,9 @@ command: to be extracted. In this situation, the source code is extracted to the default workspace --- you do not want the files in some specific location outside of the workspace. Thus, everything you - need will be located in the workspace:: + need will be located in the workspace: + + .. code-block:: console $ devtool add recipe fetchuri @@ -65,7 +67,9 @@ command: ``devtool`` workspace. The following command provides a new recipe name and identifies - the existing source tree location:: + the existing source tree location: + + .. code-block:: console $ devtool add recipe srctree @@ -93,7 +97,9 @@ command: Furthermore, the first positional argument ``srctree`` in this case identifies where the ``devtool add`` command will locate the extracted code outside of the workspace. You need to specify an - empty directory:: + empty directory: + + .. code-block:: console $ devtool add recipe srctree fetchuri @@ -105,7 +111,9 @@ command: #. *Edit the Recipe*: You can use ``devtool edit-recipe`` to open up the editor as defined by the ``$EDITOR`` environment variable and modify - the file:: + the file: + + .. code-block:: console $ devtool edit-recipe recipe @@ -124,14 +132,18 @@ command: depends on what you are going to do with the new code. If you need to eventually move the build output to the target - hardware, use the following ``devtool`` command:: + hardware, use the following ``devtool`` command: + + .. code-block:: console $ devtool build recipe On the other hand, if you want an image to contain the recipe's packages from the workspace for immediate deployment onto a device (e.g. for testing purposes), you can use the ``devtool build-image`` - command:: + command: + + .. code-block:: console $ devtool build-image image @@ -149,7 +161,9 @@ command: development machine. You can deploy your build output to that target hardware by using the - ``devtool deploy-target`` command:: + ``devtool deploy-target`` command: + + .. code-block:: console $ devtool deploy-target recipe target @@ -177,7 +191,9 @@ command: creates any patches corresponding to commits in the local Git repository, moves the new recipe to a more permanent layer, and then resets the recipe so that the recipe is built normally rather than - from the workspace:: + from the workspace: + + .. code-block:: console $ devtool finish recipe layer @@ -245,7 +261,9 @@ command: The following command tells ``devtool`` the recipe with which to work, uses the "-n" option to indicate source does not need to be extracted, and uses ``srctree`` to point to the previously extracted - source files:: + source files: + + .. code-block:: console $ devtool modify -n recipe srctree @@ -271,7 +289,9 @@ command: outside the workspace (i.e. ``meta-``\ layername). The following command identifies the recipe and, by default, - extracts the source files:: + extracts the source files: + + .. code-block:: console $ devtool modify recipe @@ -319,7 +339,9 @@ command: The following command tells ``devtool`` the recipe with which to work and, in this case, identifies a local area for the extracted source files that exists outside of the default ``devtool`` - workspace:: + workspace: + + .. code-block:: console $ devtool modify recipe srctree @@ -357,14 +379,18 @@ command: depends on what you are going to do with the new code. If you need to eventually move the build output to the target - hardware, use the following ``devtool`` command:: + hardware, use the following ``devtool`` command: + + .. code-block:: console $ devtool build recipe On the other hand, if you want an image to contain the recipe's packages from the workspace for immediate deployment onto a device (e.g. for testing purposes), you can use the ``devtool build-image`` - command:: + command: + + .. code-block:: console $ devtool build-image image @@ -382,7 +408,9 @@ command: development machine. You can deploy your build output to that target hardware by using the - ``devtool deploy-target`` command:: + ``devtool deploy-target`` command: + + .. code-block:: console $ devtool deploy-target recipe target @@ -401,7 +429,9 @@ command: repository, updates the recipe to point to them (or creates a ``.bbappend`` file to do so, depending on the specified destination layer), and then resets the recipe so that the recipe is built - normally rather than from the workspace:: + normally rather than from the workspace: + + .. code-block:: console $ devtool finish recipe layer @@ -646,7 +676,9 @@ Assuming the BitBake environment is set up correctly and a ``devtool`` workspace has been created for the recipe using ``devtool modify my-recipe`` (or, for a more useful debug build, ``devtool modify my-recipe --debug-build``), the following command can create the SDK and the configuration for VSCode in -the recipe's ``devtool`` workspace:: +the recipe's ``devtool`` workspace: + +.. code-block:: console $ devtool ide-sdk my-recipe core-image-minimal --target root@192.168.7.2 @@ -657,14 +689,18 @@ see :ref:`dev-manual/devtool:selecting the ide`. The command requires an image recipe (``core-image-minimal`` for this example) that is used to create the SDK. This firmware image should also be installed on the target device. -It is possible to pass multiple recipes:: +It is possible to pass multiple recipes: + +.. code-block:: console $ devtool ide-sdk my-recipe-1 my-recipe-2 core-image-minimal --target root@192.168.7.2 If only an image recipe is passed, all recipes currently modified in the ``devtool`` workspace (i.e. everything with a ``/appends/*.bbappend`` file) are used automatically, so the above -is usually equivalent to just:: +is usually equivalent to just: + +.. code-block:: console $ devtool ide-sdk core-image-minimal --target root@192.168.7.2 @@ -715,7 +751,9 @@ privileges, but is only reachable through forwarded host ports. ``devtool ide-sdk`` supports this setup: it adds the port forwards required by the debug servers to ``QB_SLIRP_OPT`` in the image's ``.bbappend`` file, so that ``runqemu`` reads -them from the image's ``.qemuboot.conf`` file:: +them from the image's ``.qemuboot.conf`` file: + +.. code-block:: console $ devtool ide-sdk my-recipe core-image-minimal --target root@localhost --port 2222 $ runqemu slirp serialstdio snapshot @@ -736,7 +774,9 @@ workflow. Passing ``--nfs=rootfs`` (or ``--nfs=rootfs-dbg`` to also include the debug filesystem) extracts the selected root filesystem below ``/nfs-exports//`` and generates a ``runqemu-rootfs``/``runqemu-rootfs-dbg`` helper script to boot QEMU with -that root filesystem mounted over NFS:: +that root filesystem mounted over NFS: + +.. code-block:: console $ devtool ide-sdk my-recipe core-image-minimal --nfs=rootfs-dbg --target root@192.168.7.2 $ build/workspace/nfs-exports/core-image-minimal/runqemu-rootfs-dbg nographic @@ -777,7 +817,9 @@ With ``--nfs``, the deploy scripts generated by ``devtool ide-sdk`` (and thus the deploy tasks of the IDE) copy the build output of the recipe directly into the exported root filesystem on the host instead of using SSH. This works because ``devtool deploy-target`` accepts the absolute path of a -local root filesystem directory as target. The same can be done manually, e.g.:: +local root filesystem directory as target. The same can be done manually, e.g.: + +.. code-block:: console $ devtool deploy-target my-recipe \ /path/to/build/workspace/nfs-exports/core-image-minimal/rootfs-dbg @@ -841,7 +883,9 @@ VSCode: Of course, issuing commands in the terminal works as well. - To work on the source code of a recipe another instance of VSCode is - started in the recipe's workspace. Example:: + started in the recipe's workspace. Example: + + .. code-block:: console $ code build/workspace/sources/my-recipe @@ -960,7 +1004,9 @@ The ``--ide`` option selects the IDE plugin. If it is omitted, VSCode is configured when the ``code`` executable is found in ``PATH``, and no IDE (``--ide=none``) otherwise. The option can be given multiple times to configure several IDEs in one invocation, and ``--ide=all`` configures -every supported IDE:: +every supported IDE: + +.. code-block:: console $ devtool ide-sdk my-recipe core-image-minimal --ide=code --ide=none $ devtool ide-sdk my-recipe core-image-minimal --ide=all @@ -1092,7 +1138,9 @@ Example Creating an SDK with shared :term:`Sysroots ` that contains all the dependencies needed to work with ``my-recipe`` is possible with the following -example command:: +example command: + +.. code-block:: console $ devtool ide-sdk --mode=shared my-recipe @@ -1101,7 +1149,9 @@ For VSCode the cross-toolchain is exposed as a CMake kits are defined in ``~/.local/share/CMakeTools/cmake-tools-kits.json``. The following example shows how the cross-toolchain can be selected in VSCode. First of all we need a folder containing a CMake project. -For this example, let's create a CMake project and start VSCode:: +For this example, let's create a CMake project and start VSCode: + +.. code-block:: console $ mkdir kit-test $ echo "project(foo VERSION 1.0)" > kit-test/CMakeLists.txt @@ -1128,7 +1178,9 @@ Modified mode configures the IDE for recipes in ``devtool modify`` state, while shared mode provides a standalone cross-toolchain and shared :term:`Sysroots ` for working on other source code. Repeating the ``--mode`` option runs both workflows in a single invocation, so the image -is built only once:: +is built only once: + +.. code-block:: console $ devtool modify my-recipe $ devtool ide-sdk --mode=modified --mode=shared my-recipe other-recipe core-image-minimal @@ -1202,7 +1254,9 @@ The following diagram shows the common development flow used with the A common situation is where third-party software has undergone a revision so that it has been upgraded. The recipe you have access to is likely in your own layer. Thus, you need to upgrade the recipe to - use the newer version of the software:: + use the newer version of the software: + + .. code-block:: console $ devtool upgrade -V version recipe @@ -1210,7 +1264,9 @@ The following diagram shows the common development flow used with the code into the ``sources`` directory in the :ref:`devtool-the-workspace-layer-structure`. If you want the code extracted to any other location, you need to - provide the ``srctree`` positional argument with the command as follows:: + provide the ``srctree`` positional argument with the command as follows: + + .. code-block:: console $ devtool upgrade -V version recipe srctree @@ -1266,14 +1322,18 @@ The following diagram shows the common development flow used with the depends on what you are going to do with the new code. If you need to eventually move the build output to the target - hardware, use the following ``devtool`` command:: + hardware, use the following ``devtool`` command: + + .. code-block:: console $ devtool build recipe On the other hand, if you want an image to contain the recipe's packages from the workspace for immediate deployment onto a device (e.g. for testing purposes), you can use the ``devtool build-image`` - command:: + command: + + .. code-block:: console $ devtool build-image image @@ -1291,7 +1351,9 @@ The following diagram shows the common development flow used with the development machine. You can deploy your build output to that target hardware by using the - ``devtool deploy-target`` command:: + ``devtool deploy-target`` command: + + .. code-block:: console $ devtool deploy-target recipe target @@ -1318,7 +1380,9 @@ The following diagram shows the common development flow used with the If you specify a destination layer that is the same as the original source, then the old version of the recipe and associated files are - removed prior to adding the new version:: + removed prior to adding the new version: + + .. code-block:: console $ devtool finish recipe layer @@ -1393,7 +1457,9 @@ name and version, just the name, or just the version as part of the command line. Sometimes the name or version determined from the source tree might be -incorrect. For such a case, you must reset the recipe:: +incorrect. For such a case, you must reset the recipe: + +.. code-block:: console $ devtool reset -n recipename @@ -1554,7 +1620,9 @@ Adding Node.js Modules You can use the ``devtool add`` command two different ways to add Node.js modules: through ``npm`` or from a repository or local source. -Use the following form to add Node.js modules through ``npm``:: +Use the following form to add Node.js modules through ``npm``: + +.. code-block:: console $ devtool add "npm://registry.npmjs.org;name=forever;version=0.15.1" @@ -1575,7 +1643,9 @@ these behaviors ensure the reproducibility and integrity of the build. As mentioned earlier, you can also add Node.js modules directly from a repository or local source tree. To add modules this way, use -``devtool add`` in the following form:: +``devtool add`` in the following form: + +.. code-block:: console $ devtool add https://github.com/diversario/node-ssdp @@ -1738,13 +1808,17 @@ need to restore the original files that existed prior to running the ``devtool deploy-target`` command. Because the ``devtool deploy-target`` command backs up any files it overwrites, you can use the ``devtool undeploy-target`` command to restore those files and remove -any other files the recipe deployed. Consider the following example:: +any other files the recipe deployed. Consider the following example: + +.. code-block:: console $ devtool undeploy-target lighttpd root@192.168.7.2 If you have deployed multiple applications, you can remove them all using the "-a" option -thus restoring the target device to its original state:: +thus restoring the target device to its original state: + +.. code-block:: console $ devtool undeploy-target -a root@192.168.7.2 diff --git a/documentation/dev-manual/disk-space.rst b/documentation/dev-manual/disk-space.rst index ee02b267081c..b9acc63e0c8b 100644 --- a/documentation/dev-manual/disk-space.rst +++ b/documentation/dev-manual/disk-space.rst @@ -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 diff --git a/documentation/dev-manual/efficiently-fetching-sources.rst b/documentation/dev-manual/efficiently-fetching-sources.rst index ab72e8dd2ee7..05e5e0799169 100644 --- a/documentation/dev-manual/efficiently-fetching-sources.rst +++ b/documentation/dev-manual/efficiently-fetching-sources.rst @@ -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 diff --git a/documentation/dev-manual/error-reporting-tool.rst b/documentation/dev-manual/error-reporting-tool.rst index dabade0783af..9eb9272414ff 100644 --- a/documentation/dev-manual/error-reporting-tool.rst +++ b/documentation/dev-manual/error-reporting-tool.rst @@ -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 diff --git a/documentation/dev-manual/gobject-introspection.rst b/documentation/dev-manual/gobject-introspection.rst index 8203f17f0177..ee596bef6f3f 100644 --- a/documentation/dev-manual/gobject-introspection.rst +++ b/documentation/dev-manual/gobject-introspection.rst @@ -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() diff --git a/documentation/dev-manual/hashequivserver.rst b/documentation/dev-manual/hashequivserver.rst index 0a67e79b66bc..b7397e3d8305 100644 --- a/documentation/dev-manual/hashequivserver.rst +++ b/documentation/dev-manual/hashequivserver.rst @@ -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 `. -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 :do_ unihash changed to dc0da29c62a2d78d8d853fbb9c173778fe7d6fa4a68c67494b17afffe8ca1894 diff --git a/documentation/dev-manual/layers.rst b/documentation/dev-manual/layers.rst index babf2f023aee..45a6a840d9b1 100644 --- a/documentation/dev-manual/layers.rst +++ b/documentation/dev-manual/layers.rst @@ -48,13 +48,17 @@ Follow these general steps to create your layer without using tools: $ bitbake-layers create-layer your_layer_name While not strictly required, prepend the name of the directory with - the string "meta-". For example:: + the string "meta-". For example: + + .. code-block:: text meta-mylayer meta-GUI_xyz meta-mymachine - With rare exceptions, a layer's name follows this form:: + With rare exceptions, a layer's name follows this form: + + .. code-block:: text meta-root_name @@ -382,7 +386,9 @@ the COMMON and DISTRO related tests. Furthermore, if your layer is a BSP layer, the layer must pass the COMMON and BSP set of tests. To execute the script, enter the following commands from your build -directory:: +directory: + +.. code-block:: console $ source oe-init-build-env $ yocto-check-layer your_layer_directory @@ -391,13 +397,17 @@ Be sure to provide the actual directory for your layer as part of the command. You should pass the dependencies of your layer using the ``--dependency`` -argument:: +argument: + +.. code-block:: console $ source oe-init-build-env $ yocto-check-layer --dependency ... -- your_layer_directory For :term:`BSP ` layers, the ``--machines`` -argument should be passed as part of the command:: +argument should be passed as part of the command: + +.. code-block:: console $ source oe-init-build-env $ yocto-check-layer --machines ... -- your_layer_directory @@ -422,13 +432,17 @@ with one class: - ``distro``: ``DistroCheckLayer``, in :oe_git:`distro.py `. -For example, to run all the BSP tests:: +For example, to run all the BSP tests: + +.. code-block:: console $ source oe-init-build-env $ yocto-check-layer --run-tests bsp --machines ... -- your_layer_directory Or to run only the ``test_world`` test listed below as -``common.test_world``, and the ``test_machine_signatures`` one:: +``common.test_world``, and the ``test_machine_signatures`` one: + +.. code-block:: console $ source oe-init-build-env $ yocto-check-layer --run-tests common.CommonCheckLayer.test_world \ @@ -835,7 +849,9 @@ with their paths and priorities and on ``.bbappend`` files and their applicable recipes can help to reveal potential problems. For help on the BitBake layer management tool, use the following -command:: +command: + +.. code-block:: console $ bitbake-layers --help @@ -882,7 +898,9 @@ The following list describes the available commands: variable values, you need to tidy these up yourself. Consider the following example. Here, the ``bitbake-layers`` command adds the line ``#### bbappended ...`` so that you know where the following - lines originate:: + lines originate: + + .. code-block:: text ... DESCRIPTION = "A useful utility" @@ -896,7 +914,9 @@ The following list describes the available commands: EXTRA_OECONF += "--enable-somethingelse" - Ideally, you would tidy up these utilities as follows:: + Ideally, you would tidy up these utilities as follows: + + .. code-block:: text ... DESCRIPTION = "Customized utility" @@ -933,7 +953,9 @@ Once you create your general layer, you must add it to your makes the OpenEmbedded build system aware of your layer so that it can search it for metadata. -Add your layer by using the ``bitbake-layers add-layer`` command:: +Add your layer by using the ``bitbake-layers add-layer`` command: + +.. code-block:: console $ bitbake-layers add-layer your_layer_name @@ -973,7 +995,9 @@ Once you have a working build with the correct set of layers, it is beneficial to capture the layer setup --- what they are, which repositories they come from and which SCM revisions they're at --- into a configuration file, so that this setup can be easily replicated later, perhaps on a different machine. Here's -how to do this:: +how to do this: + +.. code-block:: console $ bitbake-layers create-layers-setup /srv/work/alex/meta-alex/ NOTE: Starting bitbake server... @@ -992,7 +1016,9 @@ above: #. Clone the bootstrap layer or some other repository to obtain the json config and the setup script that can use it. -#. Run the script directly with no options:: +#. Run the script directly with no options: + + .. code-block:: console alex@Zen2:/srv/work/alex/my-build$ meta-alex/setup-layers Note: not checking out source meta-alex, use --force-bootstraplayer-checkout to override. diff --git a/documentation/dev-manual/libraries.rst b/documentation/dev-manual/libraries.rst index d7b9f0cfc04f..791381a7921e 100644 --- a/documentation/dev-manual/libraries.rst +++ b/documentation/dev-manual/libraries.rst @@ -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 diff --git a/documentation/dev-manual/limiting-resources.rst b/documentation/dev-manual/limiting-resources.rst index 93c20c44c36e..b779fbb835a9 100644 --- a/documentation/dev-manual/limiting-resources.rst +++ b/documentation/dev-manual/limiting-resources.rst @@ -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 diff --git a/documentation/dev-manual/multiconfig.rst b/documentation/dev-manual/multiconfig.rst index 58ff95c170f4..f021985eec8a 100644 --- a/documentation/dev-manual/multiconfig.rst +++ b/documentation/dev-manual/multiconfig.rst @@ -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}-/tmp/deploy/images//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 diff --git a/documentation/dev-manual/new-machine.rst b/documentation/dev-manual/new-machine.rst index b4d29027be12..4d7c332faad6 100644 --- a/documentation/dev-manual/new-machine.rst +++ b/documentation/dev-manual/new-machine.rst @@ -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 diff --git a/documentation/dev-manual/new-recipe.rst b/documentation/dev-manual/new-recipe.rst index a270d82b5958..a9f38a6bcf72 100644 --- a/documentation/dev-manual/new-recipe.rst +++ b/documentation/dev-manual/new-recipe.rst @@ -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 ` 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 \ diff --git a/documentation/dev-manual/packages.rst b/documentation/dev-manual/packages.rst index 380d806be041..d8bdab8f489f 100644 --- a/documentation/dev-manual/packages.rst +++ b/documentation/dev-manual/packages.rst @@ -174,7 +174,9 @@ stopping the server. If you have a more complex setup where multiple host development systems work against a common, shared package feed, you have a single PR Service running and it is connected to each building system. For this scenario, -you need to start the PR Service using the ``bitbake-prserv`` command:: +you need to start the PR Service using the ``bitbake-prserv`` command: + +.. code-block:: console $ bitbake-prserv --host ip --port port --start @@ -261,7 +263,9 @@ code changes. Here is an example:: PV = "1.0+git" The OpenEmbedded build system will automatically add the source control -information to the end of the variable :term:`PKGV`, in this format:: +information to the end of the variable :term:`PKGV`, in this format: + +.. code-block:: text AUTOINC+source_code_revision @@ -384,7 +388,9 @@ directory of :term:`OpenEmbedded-Core (OE-Core)`. You can also find examples in ``meta/classes-recipe/kernel.bbclass``. Here is a reference that shows ``do_split_packages`` mandatory and -optional arguments:: +optional arguments: + +.. code-block:: text Mandatory arguments @@ -595,13 +601,17 @@ target's package database(s) later once your image is up and running. Whenever you perform any sort of build step that can potentially generate a package or modify existing package, it is always a good idea to re-generate the package index after the build by using the following -command:: +command: + +.. code-block:: console $ bitbake package-index It might be tempting to build the package and the package index at the same time with a command such as -the following:: +the following: + +.. code-block:: console $ bitbake some-package package-index @@ -654,7 +664,9 @@ Lighttpd, or Nginx), take the appropriate steps to do so. From within the :term:`Build Directory` where you have built an image based on your packaging choice (i.e. the :term:`PACKAGE_CLASSES` setting), simply start the server. The following example assumes a :term:`Build Directory` of ``bitbake-builds/build`` -and a :term:`PACKAGE_CLASSES` setting of ":ref:`ref-classes-package_rpm`":: +and a :term:`PACKAGE_CLASSES` setting of ":ref:`ref-classes-package_rpm`": + +.. code-block:: console $ cd bitbake-builds/build/tmp/deploy/rpm $ python3 -m http.server @@ -719,7 +731,9 @@ for all architectures. You cannot do both: architectures. - *Create a Single (Full) Package Index:* Define a single base URL that - identifies where a full package database is located:: + identifies where a full package database is located: + + .. code-block:: text [oe-packages] baseurl=http://my.server/rpm @@ -984,7 +998,9 @@ which is a file browser web application. You must know the ``cute-files`` module version. The first thing you need to do is use ``devtool`` and the NPM fetcher to -create the recipe:: +create the recipe: + +.. code-block:: console $ devtool add "npm://registry.npmjs.org;package=cute-files;version=1.0.2" @@ -994,7 +1010,9 @@ fetch URI to download each dependency and capture license details where possible. The result is a generated recipe. After running for quite a long time, in particular building the -``nodejs-native`` package, the command should end as follows:: +``nodejs-native`` package, the command should end as follows: + +.. code-block:: text INFO: Recipe /home/.../build/workspace/recipes/cute-files/cute-files_1.0.2.bb has been automatically created; further editing may be required to make it fully functional @@ -1017,7 +1035,9 @@ runs. practical way to have the licenses for all of the dependencies represented in the license manifest of the image. -The ``devtool edit-recipe`` command lets you take a look at the recipe:: +The ``devtool edit-recipe`` command lets you take a look at the recipe: + +.. code-block:: console $ devtool edit-recipe cute-files # Recipe created by recipetool @@ -1070,7 +1090,9 @@ Three key points in the previous example are: - The ``inherit npm`` statement causes the :ref:`ref-classes-npm` class to package up all the modules. -You can run the following command to build the ``cute-files`` package:: +You can run the following command to build the ``cute-files`` package: + +.. code-block:: console $ devtool build cute-files @@ -1078,12 +1100,16 @@ Remember that ``nodejs`` must be installed on the target before your package. Assuming 192.168.7.2 for the target's IP address, use the following -command to deploy your package:: +command to deploy your package: + +.. code-block:: console $ devtool deploy-target -s cute-files root@192.168.7.2 Once the package is installed on the target, you can -test the application to show the contents of any directory:: +test the application to show the contents of any directory: + +.. code-block:: console $ cd /usr/lib/node_modules/cute-files $ cute-files @@ -1110,7 +1136,9 @@ projects method, you provide ``devtool`` with an URL that points to the source files. Replicating the same example, (i.e. ``cute-files``) use the following -command:: +command: + +.. code-block:: console $ devtool add https://github.com/martinaglv/cute-files.git diff --git a/documentation/dev-manual/prebuilt-libraries.rst b/documentation/dev-manual/prebuilt-libraries.rst index 9cc8bd2d9dee..5422200507f4 100644 --- a/documentation/dev-manual/prebuilt-libraries.rst +++ b/documentation/dev-manual/prebuilt-libraries.rst @@ -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 diff --git a/documentation/dev-manual/python-development-shell.rst b/documentation/dev-manual/python-development-shell.rst index 76167f5bacf4..f518dc40e7a8 100644 --- a/documentation/dev-manual/python-development-shell.rst +++ b/documentation/dev-manual/python-development-shell.rst @@ -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 diff --git a/documentation/dev-manual/qemu.rst b/documentation/dev-manual/qemu.rst index d7e0b2f2f44f..a6be0f793cc7 100644 --- a/documentation/dev-manual/qemu.rst +++ b/documentation/dev-manual/qemu.rst @@ -63,7 +63,9 @@ available. Follow these general steps to run QEMU: - If you installed a cross-toolchain, you can run the script that initializes the toolchain. For example, the following commands run - the initialization script from the default ``poky_sdk`` directory:: + the initialization script from the default ``poky_sdk`` directory: + + .. code-block:: console $ . poky_sdk/environment-setup-core2-64-poky-linux @@ -85,7 +87,9 @@ available. Follow these general steps to run QEMU: Extensible Software Development Kit (eSDK) manual for information on how to extract a root filesystem. -#. *Run QEMU:* The basic ``runqemu`` command syntax is as follows:: +#. *Run QEMU:* The basic ``runqemu`` command syntax is as follows: + + .. code-block:: console $ runqemu [option ] [...] @@ -104,7 +108,9 @@ available. Follow these general steps to run QEMU: automatically finds the ``bzImage-qemux86-64.bin`` image file and the ``core-image-minimal-qemux86-64-20200218002850.rootfs.ext4`` (assuming the current build created a ``core-image-minimal`` - image):: + image): + + .. code-block:: console $ runqemu qemux86-64 @@ -116,7 +122,9 @@ available. Follow these general steps to run QEMU: - This example produces the exact same results as the previous example. This command, however, specifically provides the image - and root filesystem type:: + and root filesystem type: + + .. code-block:: console $ runqemu qemux86-64 core-image-minimal ext4 @@ -136,20 +144,26 @@ available. Follow these general steps to run QEMU: variable ``FSTYPE`` to ``cpio.gz``. Also, for audio to be enabled, an appropriate driver must be installed (see the ``audio`` option in :ref:`dev-manual/qemu:\`\`runqemu\`\` command-line options` - for more information):: + for more information): + + .. code-block:: console $ runqemu qemux86-64 ramfs audio - This example does not provide enough information for QEMU to launch. While the command does provide a root filesystem type, it - must also minimally provide a `MACHINE`, `KERNEL`, or `VM` option:: + must also minimally provide a `MACHINE`, `KERNEL`, or `VM` option: + + .. code-block:: console $ runqemu ext4 - This example specifies to boot a virtual machine image (``.wic.vmdk`` file). From the ``.wic.vmdk``, ``runqemu`` determines the QEMU architecture (`MACHINE`) to be "qemux86-64" and - the root filesystem type to be "vmdk":: + the root filesystem type to be "vmdk": + + .. code-block:: console $ runqemu /home/user/vm/core-image-minimal-qemux86-64.wic.vmdk @@ -225,15 +239,21 @@ using an NFS server. Should you need to start, stop, or restart the NFS share, you can use the following commands: - - To start the NFS share:: + - To start the NFS share: + + .. code-block:: console $ runqemu-export-rootfs start file-system-location - - To stop the NFS share:: + - To stop the NFS share: + + .. code-block:: console $ runqemu-export-rootfs stop file-system-location - - To restart the NFS share:: + - To restart the NFS share: + + .. code-block:: console $ runqemu-export-rootfs restart file-system-location @@ -311,7 +331,9 @@ present, the toolchain is also automatically used. QEMU Command-Line Syntax ======================== -The basic ``runqemu`` command syntax is as follows:: +The basic ``runqemu`` command syntax is as follows: + +.. code-block:: console $ runqemu [option ] [...] @@ -322,7 +344,9 @@ timestamp when it needs to look for an image. Minimally, through the use of options, you must provide either a machine name, a virtual machine image (``*wic.vmdk``), or a kernel image (``*.bin``). -Here is the command-line help output for the ``runqemu`` command:: +Here is the command-line help output for the ``runqemu`` command: + +.. code-block:: console $ runqemu --help diff --git a/documentation/dev-manual/quilt.rst b/documentation/dev-manual/quilt.rst index 59240705ad99..511a34b3199d 100644 --- a/documentation/dev-manual/quilt.rst +++ b/documentation/dev-manual/quilt.rst @@ -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 diff --git a/documentation/dev-manual/sstate-mirrors-setup.rst b/documentation/dev-manual/sstate-mirrors-setup.rst index e69aa00d1cc6..af369b254e9e 100644 --- a/documentation/dev-manual/sstate-mirrors-setup.rst +++ b/documentation/dev-manual/sstate-mirrors-setup.rst @@ -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 @@ -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=;pswd=;downloadfilename=PATH \ diff --git a/documentation/dev-manual/start.rst b/documentation/dev-manual/start.rst index 81466ca40254..d65913159b2c 100644 --- a/documentation/dev-manual/start.rst +++ b/documentation/dev-manual/start.rst @@ -370,7 +370,9 @@ your Yocto Project build host: `__. 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 diff --git a/documentation/dev-manual/temporary-source-code.rst b/documentation/dev-manual/temporary-source-code.rst index cb27d22070ef..1a899070db86 100644 --- a/documentation/dev-manual/temporary-source-code.rst +++ b/documentation/dev-manual/temporary-source-code.rst @@ -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 diff --git a/documentation/dev-manual/upgrading-recipes.rst b/documentation/dev-manual/upgrading-recipes.rst index f4b9df241093..b664bbc8acbe 100644 --- a/documentation/dev-manual/upgrading-recipes.rst +++ b/documentation/dev-manual/upgrading-recipes.rst @@ -59,19 +59,25 @@ The following steps describe how to set up the AUH utility: #. *Make Sure Git is Configured:* The AUH utility requires Git to be configured because AUH uses Git to save upgrades. Thus, you must have Git user and email configured. The following command shows your - configurations:: + configurations: + + .. code-block:: console $ git config --list If you do not have the user and - email configured, you can use the following commands to do so:: + email configured, you can use the following commands to do so: + + .. code-block:: console $ git config --global user.name some_name $ git config --global user.email username@domain.com #. *Clone the AUH Repository:* To use AUH, you must clone the repository onto your development host. The following command uses Git to create - a local copy of the repository on your system:: + a local copy of the repository on your system: + + .. code-block:: console $ git clone https://git.yoctoproject.org/auto-upgrade-helper Cloning into 'auto-upgrade-helper'... remote: Counting objects: 768, done. @@ -87,7 +93,9 @@ The following steps describe how to set up the AUH utility: #. *Create a Dedicated Build Directory:* Create a new :term:`bitbake:Setup` with ``bitbake-setup`` or manually run the :ref:`structure-core-script` script to create a fresh :term:`Build Directory` that you use exclusively - for running the AUH utility:: + for running the AUH utility: + + .. code-block:: console $ source layers/openembedded-core/oe-init-build-env your_AUH_build_directory @@ -129,7 +137,9 @@ The following steps describe how to set up the AUH utility: #. *Optionally Start a vncserver:* If you are running in a server - without an X11 session, you need to start a vncserver:: + without an X11 session, you need to start a vncserver: + + .. code-block:: console $ vncserver :1 $ export DISPLAY=:1 @@ -154,38 +164,52 @@ The following steps describe how to set up the AUH utility: This next set of examples describes how to use the AUH: - *Upgrading a Specific Recipe:* To upgrade a specific recipe, use the - following form:: + following form: + + .. code-block:: console $ upgrade-helper.py recipe_name - For example, this command upgrades the ``xmodmap`` recipe:: + For example, this command upgrades the ``xmodmap`` recipe: + + .. code-block:: console $ upgrade-helper.py xmodmap - *Upgrading a Specific Recipe to a Particular Version:* To upgrade a - specific recipe to a particular version, use the following form:: + specific recipe to a particular version, use the following form: + + .. code-block:: console $ upgrade-helper.py recipe_name -t version - For example, this command upgrades the ``xmodmap`` recipe to version 1.2.3:: + For example, this command upgrades the ``xmodmap`` recipe to version 1.2.3: + + .. code-block:: console $ upgrade-helper.py xmodmap -t 1.2.3 - *Upgrading all Recipes to the Latest Versions and Suppressing Email Notifications:* To upgrade all recipes to their most recent versions - and suppress the email notifications, use the following command:: + and suppress the email notifications, use the following command: + + .. code-block:: console $ upgrade-helper.py all - *Upgrading all Recipes to the Latest Versions and Send Email Notifications:* To upgrade all recipes to their most recent versions and send email messages to maintainers for each attempted recipe as - well as a status email, use the following command:: + well as a status email, use the following command: + + .. code-block:: console $ upgrade-helper.py -e all Once you have run the AUH utility, you can find the results in the AUH -:term:`Build Directory`:: +:term:`Build Directory`: + +.. code-block:: text ${BUILDDIR}/upgrade-helper/timestamp @@ -210,13 +234,17 @@ section in the Yocto Project Application Development and the Extensible Software Development Kit (eSDK) Manual. To see all the command-line options available with ``devtool upgrade``, -use the following help command:: +use the following help command: + +.. code-block:: console $ devtool upgrade -h If you want to find out what version a recipe is currently at upstream without any attempt to upgrade your local version of the recipe, you can -use the following command:: +use the following command: + +.. code-block:: console $ devtool latest-version recipe_name @@ -242,12 +270,16 @@ could add it easily using the ":ref:`bitbake-layers `" script. For example, suppose you use the ``nano.bb`` recipe from the ``meta-oe`` layer in the ``meta-openembedded`` repository. For this -example, assume that the layer has been cloned into following area:: +example, assume that the layer has been cloned into following area: + +.. code-block:: text /home/user/bitbake-builds/layers/meta-openembedded The following command from your :term:`Build Directory` adds the layer to -your build configuration (i.e. ``${BUILDDIR}/conf/bblayers.conf``):: +your build configuration (i.e. ``${BUILDDIR}/conf/bblayers.conf``): + +.. code-block:: console $ bitbake-layers add-layer /home/user/bitbake-builds/layers/meta-openembedded/meta-oe NOTE: Starting bitbake server... @@ -261,7 +293,9 @@ your build configuration (i.e. ``${BUILDDIR}/conf/bblayers.conf``):: For this example, assume that the ``nano.bb`` recipe that is upstream has a 2.9.3 version number. However, the version in the local repository is 2.7.4. The following command from your build -directory automatically upgrades the recipe for you:: +directory automatically upgrades the recipe for you: + +.. code-block:: console $ devtool upgrade nano -V 2.9.3 NOTE: Starting bitbake server... @@ -286,7 +320,9 @@ directory automatically upgrades the recipe for you:: ``devtool upgrade`` to upgrade the recipe to the most recent version. Continuing with this example, you can use ``devtool build`` to build the -newly upgraded recipe:: +newly upgraded recipe: + +.. code-block:: console $ devtool build nano NOTE: Starting bitbake server... @@ -311,7 +347,9 @@ and submit commits for the changes generated by the upgrade process. Once the tree is clean, you can clean things up in this example with the following command from the ``${BUILDDIR}/workspace/sources/nano`` -directory:: +directory: + +.. code-block:: console $ devtool finish nano meta-oe NOTE: Starting bitbake server... diff --git a/documentation/dev-manual/wayland.rst b/documentation/dev-manual/wayland.rst index ec8ed86c1c60..7113aa30d1b3 100644 --- a/documentation/dev-manual/wayland.rst +++ b/documentation/dev-manual/wayland.rst @@ -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 diff --git a/documentation/dev-manual/x32-psabi.rst b/documentation/dev-manual/x32-psabi.rst index 4ee5a5379a4f..592c0e30b4bb 100644 --- a/documentation/dev-manual/x32-psabi.rst +++ b/documentation/dev-manual/x32-psabi.rst @@ -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