1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-09 05:29:32 +00:00

manuals: code insertion simplification over two lines

This simplifies paragraphs ending with a colon and followed
by code insertion.

Automatically substituted through the command:
sed -i -z "s/:\n\s*::/::/g" file.rst

This generates identical HTML output.

(From yocto-docs rev: 28e2192a7c12d64b68061138a9f6c796453eebb1)

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Michael Opdenacker
2021-04-16 18:27:05 +02:00
committed by Richard Purdie
parent 773536c333
commit c3c6de2187
38 changed files with 974 additions and 1949 deletions
+29 -58
View File
@@ -168,8 +168,7 @@ example use for this class.
the "subpath" parameter limits the checkout to a specific subpath
of the tree. Here is an example where ``${BP}`` is used so that the files
are extracted into the subdirectory expected by the default value of
``S``:
::
``S``::
SRC_URI = "git://example.com/downloads/somepackage.rpm;subpath=${BP}"
@@ -221,8 +220,7 @@ each recipe you wish to blacklist. Specify the :term:`PN`
value as a variable flag (varflag) and provide a reason, which is
reported, if the package is requested to be built as the value. For
example, if you want to blacklist a recipe called "exoticware", you add
the following to your ``local.conf`` or distribution configuration:
::
the following to your ``local.conf`` or distribution configuration::
INHERIT += "blacklist"
PNBLACKLIST[exoticware] = "Not supported by our organization."
@@ -470,8 +468,7 @@ information about using ``devshell``.
The ``devupstream`` class uses
:term:`BBCLASSEXTEND` to add a variant of the
recipe that fetches from an alternative URI (e.g. Git) instead of a
tarball. Following is an example:
::
tarball. Following is an example::
BBCLASSEXTEND = "devupstream:target"
SRC_URI_class-devupstream = "git://git.example.com/example"
@@ -481,8 +478,7 @@ Adding the above statements to your recipe creates a variant that has
:term:`DEFAULT_PREFERENCE` set to "-1".
Consequently, you need to select the variant of the recipe to use it.
Any development-specific adjustments can be done by using the
``class-devupstream`` override. Here is an example:
::
``class-devupstream`` override. Here is an example::
DEPENDS_append_class-devupstream = " gperf-native"
do_configure_prepend_class-devupstream() {
@@ -544,8 +540,7 @@ 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 ``B`` directory is set to the
following, which is separate from the source directory (``S``):
::
following, which is separate from the source directory (``S``)::
${WORKDIR}/${BPN}/{PV}/
@@ -581,8 +576,7 @@ be performed using the
useradd
class to add user and group configuration to a specific recipe.
Here is an example that uses this class in an image recipe:
::
Here is an example that uses this class in an image recipe::
inherit extrausers
EXTRA_USERS_PARAMS = "\
@@ -595,8 +589,7 @@ 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:
::
passwords::
inherit extrausers
EXTRA_USERS_PARAMS = "\
@@ -604,8 +597,7 @@ passwords:
useradd -P tester01 tester-sue; \
"
Finally, here is an example that sets the root password to "1876*18":
::
Finally, here is an example that sets the root password to "1876*18"::
inherit extrausers
EXTRA_USERS_PARAMS = "\
@@ -867,8 +859,7 @@ system need to either inherit the ``icecc`` class or nobody should.
At the distribution level, you can inherit the ``icecc`` class to be
sure that all builders start with the same sstate signatures. After
inheriting the class, you can then disable the feature by setting the
:term:`ICECC_DISABLED` variable to "1" as follows:
::
:term:`ICECC_DISABLED` variable to "1" as follows::
INHERIT_DISTRO_append = " icecc"
ICECC_DISABLED ??= "1"
@@ -876,8 +867,7 @@ inheriting the class, you can then disable the feature by setting the
This practice
makes sure everyone is using the same signatures but also requires
individuals that do want to use Icecream to enable the feature
individually as follows in your ``local.conf`` file:
::
individually as follows in your ``local.conf`` file::
ICECC_DISABLED = ""
@@ -925,8 +915,7 @@ types.
By default, the :ref:`image <ref-classes-image>` class automatically
enables the ``image_types`` class. The ``image`` class uses the
``IMGCLASSES`` variable as follows:
::
``IMGCLASSES`` variable as follows::
IMGCLASSES = "rootfs_${IMAGE_PKGTYPE} image_types ${IMAGE_CLASSES}"
IMGCLASSES += "${@['populate_sdk_base', 'populate_sdk_ext']['linux' in d.getVar("SDK_OS")]}"
@@ -968,8 +957,7 @@ during the :ref:`ref-tasks-rootfs` task, which optimizes
the size of libraries contained in the image.
By default, the class is enabled in the ``local.conf.template`` using
the :term:`USER_CLASSES` variable as follows:
::
the :term:`USER_CLASSES` variable as follows::
USER_CLASSES ?= "buildstats image-mklibs image-prelink"
@@ -984,8 +972,7 @@ the dynamic linking of shared libraries to reduce executable startup
time.
By default, the class is enabled in the ``local.conf.template`` using
the :term:`USER_CLASSES` variable as follows:
::
the :term:`USER_CLASSES` variable as follows::
USER_CLASSES ?= "buildstats image-mklibs image-prelink"
@@ -1014,8 +1001,7 @@ configuration). However, to skip one or more checks in recipes, you
should use :term:`INSANE_SKIP`. For example, to skip
the check for symbolic link ``.so`` files in the main package of a
recipe, add the following to the recipe. You need to realize that the
package name override, in this example ``${PN}``, must be used:
::
package name override, in this example ``${PN}``, must be used::
INSANE_SKIP_${PN} += "dev-so"
@@ -1152,8 +1138,7 @@ The following list shows the tests you can list with the ``WARN_QA`` and
- ``invalid-packageconfig:`` Checks that no undefined features are
being added to :term:`PACKAGECONFIG`. For
example, any name "foo" for which the following form does not exist:
::
example, any name "foo" for which the following form does not exist::
PACKAGECONFIG[foo] = "..."
@@ -1636,8 +1621,7 @@ a couple different ways:
.. note::
When creating a recipe this way, the recipe name must follow this
naming convention:
::
naming convention::
myrecipe-native.bb
@@ -1645,8 +1629,7 @@ a couple different ways:
Not using this naming convention can lead to subtle problems
caused by existing code that depends on that naming convention.
- Create or modify a target recipe that contains the following:
::
- Create or modify a target recipe that contains the following::
BBCLASSEXTEND = "native"
@@ -1677,8 +1660,7 @@ couple different ways:
inherit statement in the recipe after all other inherit statements so
that the ``nativesdk`` class is inherited last.
- Create a ``nativesdk`` variant of any recipe by adding the following:
::
- Create a ``nativesdk`` variant of any recipe by adding the following::
BBCLASSEXTEND = "nativesdk"
@@ -1689,8 +1671,7 @@ couple different ways:
.. note::
When creating a recipe, you must follow this naming convention:
::
When creating a recipe, you must follow this naming convention::
nativesdk-myrecipe.bb
@@ -1753,8 +1734,7 @@ before attempting to fetch it from the upstream specified in
:term:`SRC_URI` within each recipe.
To use this class, inherit it globally and specify
:term:`SOURCE_MIRROR_URL`. Here is an example:
::
:term:`SOURCE_MIRROR_URL`. Here is an example::
INHERIT += "own-mirrors"
SOURCE_MIRROR_URL = "http://example.com/my-source-mirror"
@@ -2017,8 +1997,7 @@ 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::
${SDK_OUTPUT}/${SDK_ARCH}-nativesdk-pkgs
${SDK_OUTPUT}/${SDKTARGETSYSROOT}/target-pkgs
@@ -2180,8 +2159,7 @@ installed by ``libtool``. Removing these files results in them being
absent from both the sysroot and target packages.
If a recipe needs the ``.la`` files to be installed, then the recipe can
override the removal by setting ``REMOVE_LIBTOOL_LA`` to "0" as follows:
::
override the removal by setting ``REMOVE_LIBTOOL_LA`` to "0" as follows::
REMOVE_LIBTOOL_LA = "0"
@@ -2231,8 +2209,7 @@ recipe, enabling ``rm_work`` will potentially result in your changes to
the source being lost. To exclude some recipes from having their work
directories deleted by ``rm_work``, you can add the names of the recipe
or recipes you are working on to the ``RM_WORK_EXCLUDE`` variable, which
can also be set in your ``local.conf`` file. Here is an example:
::
can also be set in your ``local.conf`` file. Here is an example::
RM_WORK_EXCLUDE += "busybox glibc"
@@ -2531,8 +2508,7 @@ You should set :term:`SYSTEMD_SERVICE` to the
name of the service file. You should also use a package name override to
indicate the package to which the value applies. If the value applies to
the recipe's main package, use ``${``\ :term:`PN`\ ``}``. Here
is an example from the connman recipe:
::
is an example from the connman recipe::
SYSTEMD_SERVICE_${PN} = "connman.service"
@@ -2608,8 +2584,7 @@ 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 ``testimage.bbclass`` runs tests on an image when called using the
following:
::
following::
$ bitbake -c testimage image
@@ -2628,8 +2603,7 @@ section in the Yocto Project Development Tasks Manual.
This class supports running automated tests against software development
kits (SDKs). The ``testsdk`` class runs tests on an SDK when called
using the following:
::
using the following::
$ bitbake -c testsdk image
@@ -2684,8 +2658,7 @@ the environment for installed SDKs.
The ``typecheck`` class provides support for validating the values of
variables set at the configuration level against their defined types.
The OpenEmbedded build system allows you to define the type of a
variable using the "type" varflag. Here is an example:
::
variable using the "type" varflag. Here is an example::
IMAGE_FEATURES[type] = "list"
@@ -2695,14 +2668,12 @@ variable using the "type" varflag. Here is an example:
========================
The ``uboot-config`` class provides support for U-Boot configuration for
a machine. Specify the machine in your recipe as follows:
::
a machine. Specify the machine in your recipe as follows::
UBOOT_CONFIG ??= <default>
UBOOT_CONFIG[foo] = "config,images"
You can also specify the machine using this method:
::
You can also specify the machine using this method::
UBOOT_MACHINE = "config"
+17 -34
View File
@@ -22,8 +22,7 @@ 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::
$ devtool -h
NOTE: Starting bitbake server...
@@ -79,8 +78,7 @@ 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"::
$ devtool add --help
NOTE: Starting bitbake server...
@@ -172,8 +170,7 @@ 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``::
$ devtool add jackson /home/user/sources/jackson
@@ -201,8 +198,7 @@ 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::
$ devtool add --srcbranch &DISTRO_NAME_NO_CAP; jackson /home/user/sources/jackson
@@ -210,8 +206,7 @@ specify these options when using the ``devtool add`` command:
branch.
- To specify a specific tag or commit hash, use the ``--srcrev``
option:
::
option::
$ devtool add --srcrev &DISTRO_REL_TAG; jackson /home/user/sources/jackson
$ devtool add --srcrev some_commit_hash /home/user/sources/jackson
@@ -269,8 +264,7 @@ 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::
$ devtool modify recipe
@@ -309,8 +303,7 @@ 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::
$ devtool update-recipe recipe
@@ -321,8 +314,7 @@ 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::
$ devtool update-recipe recipe -a base-layer-directory
@@ -358,8 +350,7 @@ particular recipe.
recipe's latest version tag.
As with all ``devtool`` commands, you can get help on the individual
command:
::
command::
$ devtool check-upgrade-status -h
NOTE: Starting bitbake server...
@@ -462,8 +453,7 @@ 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::
$ devtool reset mtr
NOTE: Cleaning sysroot for recipe mtr...
@@ -482,8 +472,7 @@ 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::
$ devtool build recipe
@@ -499,8 +488,7 @@ 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::
$ devtool build-image image
@@ -510,8 +498,7 @@ 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::
$ devtool deploy-target recipe target
@@ -582,15 +569,13 @@ 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"::
$ 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"::
$ devtool create-workspace /home/scottrif/new-workspace
@@ -603,15 +588,13 @@ 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::
$ devtool status
Following 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::
$ devtool status
mtr:/home/scottrif/poky/build/workspace/sources/mtr (/home/scottrif/poky/build/workspace/recipes/mtr/mtr_0.86.bb)
+4 -8
View File
@@ -209,8 +209,7 @@ section in the Yocto Project Development Tasks Manual.
**A:** You need to create a form factor file as described in the
":ref:`bsp-guide/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::
HAVE_TOUCHSCREEN=1
@@ -313,8 +312,7 @@ HTTPS requests and direct them to the ``http://`` sources mirror. You
can use ``file://`` URLs to point to local directories or network shares
as well.
Aside from the previous technique, these options also exist:
::
Aside from the previous technique, these options also exist::
BB_NO_NETWORK = "1"
@@ -322,8 +320,7 @@ This statement tells BitBake to issue an error
instead of trying to access the Internet. This technique is useful if
you want to ensure code builds only from local sources.
Here is another technique:
::
Here is another technique::
BB_FETCH_PREMIRRORONLY = "1"
@@ -331,8 +328,7 @@ This statement
limits the build system to pulling source from the ``PREMIRRORS`` only.
Again, this technique is useful for reproducing builds.
Here is another technique:
::
Here is another technique::
BB_GENERATE_MIRROR_TARBALLS = "1"
+1 -2
View File
@@ -26,8 +26,7 @@ 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::
$ cd poky
$ git grep 'contains.*MACHINE_FEATURES.*feature'
+1 -2
View File
@@ -18,8 +18,7 @@ image you want.
are going to build an image using non-GPLv3 and similarly licensed
components, you must make the following changes in the ``local.conf``
file before using the BitBake command to build the minimal or base
image:
::
image::
1. Comment out the EXTRA_IMAGE_FEATURES line
2. Set INCOMPATIBLE_LICENSE = "GPL-3.0 LGPL-3.0 AGPL-3.0"
+2 -4
View File
@@ -30,8 +30,7 @@ Command: part or partition
==========================
Either of these commands creates a partition on the system and uses the
following syntax:
::
following syntax::
part [mntpoint]
partition [mntpoint]
@@ -59,8 +58,7 @@ must also provide one of the ``--ondrive``, ``--ondisk``, or
versions of these application are currently excluded.
Here is an example that uses "/" as the mountpoint. The command uses
``--ondisk`` to force the partition onto the ``sdb`` disk:
::
``--ondisk`` to force the partition onto the ``sdb`` disk::
part / --source rootfs --ondisk sdb --fstype=ext3 --label platform --align 1024
+1 -2
View File
@@ -181,8 +181,7 @@ Linux Kernel Naming
-------------------
The naming scheme for kernel output binaries has been changed to now
include :term:`PE` as part of the filename:
::
include :term:`PE` as part of the filename::
KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${PE}-${PV}-${PR}-${MACHINE}-${DATETIME}"
+2 -4
View File
@@ -40,8 +40,7 @@ Differences include the following:
- *Shared State Code:* The shared state code has been optimized to
avoid running unnecessary tasks. For example, the following no longer
populates the target sysroot since that is not necessary:
::
populates the target sysroot since that is not necessary::
$ bitbake -c rootfs some-image
@@ -136,8 +135,7 @@ Target Package Management with RPM
If runtime package management is enabled and the RPM backend is
selected, Smart is now installed for package download, dependency
resolution, and upgrades instead of Zypper. For more information on how
to use Smart, run the following command on the target:
::
to use Smart, run the following command on the target::
smart --help
+2 -4
View File
@@ -53,8 +53,7 @@ Matching Branch Requirement for Git Fetching
When fetching source from a Git repository using
:term:`SRC_URI`, BitBake will now validate the
:term:`SRCREV` value against the branch. You can specify
the branch using the following form:
::
the branch using the following form::
SRC_URI = "git://server.name/repository;branch=branchname"
@@ -248,8 +247,7 @@ the ``autotools`` or ``autotools_stage``\ classes.
``qemu-native`` now builds without SDL-based graphical output support by
default. The following additional lines are needed in your
``local.conf`` to enable it:
::
``local.conf`` to enable it::
PACKAGECONFIG_pn-qemu-native = "sdl"
ASSUME_PROVIDED += "libsdl-native"
+2 -4
View File
@@ -15,8 +15,7 @@ optional features. The method used to set defaults for these options
means that existing ``local.conf`` files will need to be modified to
append to ``PACKAGECONFIG`` for ``qemu-native`` and ``nativesdk-qemu``
instead of setting it. In other words, to enable graphical output for
QEMU, you should now have these lines in ``local.conf``:
::
QEMU, you should now have these lines in ``local.conf``::
PACKAGECONFIG_append_pn-qemu-native = " sdl"
PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
@@ -80,8 +79,7 @@ disable the scripts due to the scripts previously requiring error-prone
path substitution. Software that links against these libraries using
these scripts should use the much more robust ``pkg-config`` instead.
The list of recipes changed in this version (and their configuration
scripts) is as follows:
::
scripts) is as follows::
directfb (directfb-config)
freetype (freetype-config)
+3 -6
View File
@@ -25,8 +25,7 @@ and the porting guide at
https://gcc.gnu.org/gcc-5/porting_to.html.
Alternatively, you can switch back to GCC 4.9 or 4.8 by setting
``GCCVERSION`` in your configuration, as follows:
::
``GCCVERSION`` in your configuration, as follows::
GCCVERSION = "4.9%"
@@ -91,8 +90,7 @@ unlikely to require any changes to Metadata. However, these minor
changes in behavior exist:
- All potential overrides are now visible in the variable history as
seen when you run the following:
::
seen when you run the following::
$ bitbake -e
@@ -200,8 +198,7 @@ changes.
Additionally, work directories for old versions of recipes are now
pruned. If you wish to disable pruning old work directories, you can set
the following variable in your configuration:
::
the following variable in your configuration::
SSTATE_PRUNE_OBSOLETEWORKDIR = "0"
+3 -6
View File
@@ -42,8 +42,7 @@ defaulted to False if not specified. Now, however, no default exists so
one must be specified. You must change any ``getVar()`` calls that do
not specify the final expand parameter to calls that do specify the
parameter. You can run the following ``sed`` command at the base of a
layer to make this change:
::
layer to make this change::
sed -e 's:\(\.getVar([^,()]*\)):\1, False):g' -i `grep -ril getVar *`
sed -e 's:\(\.getVarFlag([^,()]*,[^,()]*\)):\1, False):g' -i `grep -ril getVarFlag *`
@@ -285,8 +284,7 @@ The following changes have been made for the Poky distribution:
Any recipe that needs to opt-out of having the "--disable-static"
option specified on the configure command line either because it is
not a supported option for the configure script or because static
libraries are needed should set the following variable:
::
libraries are needed should set the following variable::
DISABLE_STATIC = ""
@@ -369,8 +367,7 @@ These additional changes exist:
- Previously, the following list of packages were removed if
package-management was not in
:term:`IMAGE_FEATURES`, regardless of any
dependencies:
::
dependencies::
update-rc.d
base-passwd
+4 -8
View File
@@ -144,8 +144,7 @@ The new ``runqemu`` is a Python script. Machine knowledge is no longer
hardcoded into ``runqemu``. You can choose to use the ``qemuboot``
configuration file to define the BSP's own arguments and to make it
bootable with ``runqemu``. If you use a configuration file, use the
following form:
::
following form::
image-name-machine.qemuboot.conf
@@ -160,8 +159,7 @@ rootfs). QEMU boot arguments can be set in BSP's configuration file and
the ``qemuboot`` class will save them to ``qemuboot.conf``.
If you want to use ``runqemu`` without a configuration file, use the
following command form:
::
following command form::
$ runqemu machine rootfs kernel [options]
@@ -244,8 +242,7 @@ recipes. You need to fix these recipes so that they use the expected
``LDFLAGS``. Depending on how the software is built, the build system
used by the software (e.g. a Makefile) might need to be patched.
However, sometimes making this fix is as simple as adding the following
to the recipe:
::
to the recipe::
TARGET_CC_ARCH += "${LDFLAGS}"
@@ -258,8 +255,7 @@ The ``KERNEL_IMAGE_BASE_NAME`` variable no longer uses the
:term:`KERNEL_IMAGETYPE` variable to create the
image's base name. Because the OpenEmbedded build system can now build
multiple kernel image types, this part of the kernel image base name as
been removed leaving only the following:
::
been removed leaving only the following::
KERNEL_IMAGE_BASE_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"
+5 -11
View File
@@ -114,8 +114,7 @@ Changes to Scripts
The following changes to scripts took place:
- ``oe-find-native-sysroot``: The usage for the
``oe-find-native-sysroot`` script has changed to the following:
::
``oe-find-native-sysroot`` script has changed to the following::
$ . oe-find-native-sysroot recipe
@@ -124,8 +123,7 @@ The following changes to scripts took place:
was not necessary to provide the script with the command.
- ``oe-run-native``: The usage for the ``oe-run-native`` script has
changed to the following:
::
changed to the following::
$ oe-run-native native_recipe tool
@@ -453,14 +451,11 @@ The following miscellaneous changes have occurred:
tools.
- The ``USE_LDCONFIG`` variable has been replaced with the "ldconfig"
``DISTRO_FEATURES`` feature. Distributions that previously set:
::
``DISTRO_FEATURES`` feature. Distributions that previously set::
USE_LDCONFIG = "0"
should now instead use the following:
::
should now instead use the following::
DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " ldconfig"
@@ -478,8 +473,7 @@ The following miscellaneous changes have occurred:
order to allow module packages from multiple kernel versions to
co-exist on a target system. If you wish to return to the previous
naming scheme that does not include the version suffix, use the
following:
::
following::
KERNEL_MODULE_PACKAGE_SUFFIX = ""
+2 -4
View File
@@ -138,13 +138,11 @@ The following are BitBake changes:
tree" tasks have been removed (e.g. ``fetchall``, ``checkuriall``,
and the ``*all`` tasks provided by the ``distrodata`` and
``archiver`` classes). There is a BitBake option to complete this for
any arbitrary task. For example:
::
any arbitrary task. For example::
bitbake <target> -c fetchall
should now be replaced with:
::
should now be replaced with::
bitbake <target> --runall=fetch
+5 -10
View File
@@ -161,13 +161,11 @@ The following changes have been made:
allows easier and more direct changes.
The ``IMAGE_VERSION_SUFFIX`` variable is set in the ``bitbake.conf``
configuration file as follows:
::
configuration file as follows::
IMAGE_VERSION_SUFFIX = "-${DATETIME}"
- Several variables have changed names for consistency:
::
- Several variables have changed names for consistency::
Old Variable Name New Variable Name
========================================================
@@ -292,8 +290,7 @@ avoids the ``systemd`` recipe from becoming machine-specific for cases
where machine-specific configurations need to be applied (e.g. for
``qemu*`` machines).
Currently, the new recipe packages the following files:
::
Currently, the new recipe packages the following files::
${sysconfdir}/machine-id
${sysconfdir}/systemd/coredump.conf
@@ -393,8 +390,7 @@ If you wish to disable Python profile-guided optimization regardless of
the value of ``MACHINE_FEATURES``, then ensure that
:term:`PACKAGECONFIG` for the ``python3`` recipe
does not contain "pgo". You could accomplish the latter using the
following at the configuration level:
::
following at the configuration level::
PACKAGECONFIG_remove_pn-python3 = "pgo"
@@ -411,8 +407,7 @@ The following miscellaneous changes occurred:
- Default to using the Thumb-2 instruction set for armv7a and above. If
you have any custom recipes that build software that needs to be
built with the ARM instruction set, change the recipe to set the
instruction set as follows:
::
instruction set as follows::
ARM_INSTRUCTION_SET = "arm"
+1 -2
View File
@@ -71,8 +71,7 @@ when building a simple image such as core-image-minimal. If you do not
need runtime tests enabled for core components, then it is recommended
that you remove "ptest" from
:term:`DISTRO_FEATURES` to save a significant
amount of build time e.g. by adding the following in your configuration:
::
amount of build time e.g. by adding the following in your configuration::
DISTRO_FEATURES_remove = "ptest"
+3 -6
View File
@@ -221,8 +221,7 @@ Errors and Warnings
Typically, the way to solve this performance issue is to add "-fPIC"
or "-fpic" to the compiler command-line options. For example, given
software that reads :term:`CFLAGS` when you build it,
you could add the following to your recipe:
::
you could add the following to your recipe::
CFLAGS_append = " -fPIC "
@@ -240,8 +239,7 @@ Errors and Warnings
variable is being passed to the linker command. A common workaround
for this situation is to pass in ``LDFLAGS`` using
:term:`TARGET_CC_ARCH` within the recipe as
follows:
::
follows::
TARGET_CC_ARCH += "${LDFLAGS}"
@@ -265,8 +263,7 @@ Errors and Warnings
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::
rm ${D}${infodir}/dir
 
+6 -12
View File
@@ -153,8 +153,7 @@ When you run this script, your Yocto Project environment is set up, a
:term:`Build Directory` is created, your working
directory becomes the 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:
::
possible targets to build. Here is an example::
$ source oe-init-build-env
@@ -185,8 +184,7 @@ creates the ``build/`` directory in your current working directory. If
you provide a Build Directory argument when you ``source`` the script,
you direct the OpenEmbedded build system to create a Build Directory of
your choice. For example, the following command creates a Build
Directory named ``mybuilds/`` that is outside of the :term:`Source Directory`:
::
Directory named ``mybuilds/`` that is outside of the :term:`Source Directory`::
$ source oe-init-build-env ~/mybuilds
@@ -269,8 +267,7 @@ and to ``meta/conf/`` when you are building from the OpenEmbedded-Core
environment. 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::
TEMPLATECONF=your_layer/conf
@@ -309,8 +306,7 @@ Project development environment, and to ``meta/conf/`` when you are
building from the OpenEmbedded-Core environment. 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::
TEMPLATECONF=your_layer/conf
@@ -463,8 +459,7 @@ 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::
$ bitbake -c clean virtual/kernel
$ bitbake virtual/kernel
@@ -535,8 +530,7 @@ 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.
Following is an example:
::
Following is an example::
stamps/all-poky-linux/distcc-config/1.0-r0.do_build-2fdd....2do
@@ -120,8 +120,7 @@ supported Ubuntu or Debian Linux distribution:
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, either of the following
solutions exist:
::
solutions exist::
$ sudo apt-get build-dep qemu
$ sudo apt-get remove oss4-dev
@@ -132,14 +131,12 @@ supported Ubuntu or Debian Linux distribution:
$ sudo pip3 install GitPython pylint==1.9.5
- *Essentials:* Packages needed to build an image on a headless system:
::
- *Essentials:* Packages needed to build an image on a headless system::
$ sudo apt-get install &UBUNTU_HOST_PACKAGES_ESSENTIAL;
- *Documentation:* Packages needed if you are going to build out the
Yocto Project documentation manuals:
::
Yocto Project documentation manuals::
$ sudo apt-get install make python3-pip
&PIP3_HOST_PACKAGES_DOC;
@@ -157,14 +154,12 @@ The following list shows the required packages by function given a
supported Fedora Linux distribution:
- *Essentials:* Packages needed to build an image for a headless
system:
::
system::
$ sudo dnf install &FEDORA_HOST_PACKAGES_ESSENTIAL;
- *Documentation:* Packages needed if you are going to build out the
Yocto Project documentation manuals:
::
Yocto Project documentation manuals::
$ sudo dnf install make python3-pip which
&PIP3_HOST_PACKAGES_DOC;
@@ -176,14 +171,12 @@ The following list shows the required packages by function given a
supported openSUSE Linux distribution:
- *Essentials:* Packages needed to build an image for a headless
system:
::
system::
$ sudo zypper install &OPENSUSE_HOST_PACKAGES_ESSENTIAL;
- *Documentation:* Packages needed if you are going to build out the
Yocto Project documentation manuals:
::
Yocto Project documentation manuals::
$ sudo zypper install make python3-pip which
&PIP3_HOST_PACKAGES_DOC;
@@ -196,8 +189,7 @@ The following list shows the required packages by function given a
supported CentOS-7 Linux distribution:
- *Essentials:* Packages needed to build an image for a headless
system:
::
system::
$ sudo yum install &CENTOS7_HOST_PACKAGES_ESSENTIAL;
@@ -212,8 +204,7 @@ supported CentOS-7 Linux distribution:
``epel-release``.
- *Documentation:* Packages needed if you are going to build out the
Yocto Project documentation manuals:
::
Yocto Project documentation manuals::
$ sudo yum install make python3-pip which
&PIP3_HOST_PACKAGES_DOC;
@@ -225,8 +216,7 @@ The following list shows the required packages by function given a
supported CentOS-8 Linux distribution:
- *Essentials:* Packages needed to build an image for a headless
system:
::
system::
$ sudo dnf install &CENTOS8_HOST_PACKAGES_ESSENTIAL;
@@ -244,8 +234,7 @@ supported CentOS-8 Linux distribution:
``epel-release``.
- *Documentation:* Packages needed if you are going to build out the
Yocto Project documentation manuals:
::
Yocto Project documentation manuals::
$ sudo dnf install make python3-pip which
&PIP3_HOST_PACKAGES_DOC;
@@ -287,8 +276,7 @@ The ``install-buildtools`` script is the easiest of the three methods by
which you can get these tools. It downloads a pre-built buildtools
installer and automatically installs the tools for you:
1. Execute the ``install-buildtools`` script. Here is an example:
::
1. Execute the ``install-buildtools`` script. Here is an example::
$ cd poky
$ scripts/install-buildtools --without-extended-buildtools \
@@ -302,22 +290,19 @@ 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::
/path/to/poky/buildtools
If your host development system needs the additional tools provided
in the ``buildtools-extended`` tarball, you can instead execute the
``install-buildtools`` script with the default parameters:
::
``install-buildtools`` script with the default parameters::
$ cd poky
$ scripts/install-buildtools
2. Source the tools environment setup script by using a command like the
following:
::
following::
$ source /path/to/poky/buildtools/environment-setup-x86_64-pokysdk-linux
@@ -342,13 +327,11 @@ steps:
1. Locate and download the ``*.sh`` at &YOCTO_RELEASE_DL_URL;/buildtools/
2. Execute the installation script. Here is an example for the
traditional installer:
::
traditional installer::
$ 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::
$ sh ~/Downloads/x86_64-buildtools-extended-nativesdk-standalone-&DISTRO;.sh
@@ -357,8 +340,7 @@ steps:
``/home/your-username/buildtools``
3. Source the tools environment setup script by using a command like the
following:
::
following::
$ source /home/your_username/buildtools/environment-setup-i586-poky-linux
@@ -390,13 +372,11 @@ installer:
your build environment with the setup script
(:ref:`structure-core-script`).
2. Run the BitBake command to build the tarball:
::
2. Run the BitBake command to build the tarball::
$ bitbake buildtools-tarball
or run the BitBake command to build the extended tarball:
::
or run the BitBake command to build the extended tarball::
$ bitbake buildtools-extended-tarball
@@ -415,13 +395,11 @@ installer:
4. On the machine that does not meet the requirements, run the ``.sh``
file to install the tools. Here is an example for the traditional
installer:
::
installer::
$ 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::
$ sh ~/Downloads/x86_64-buildtools-extended-nativesdk-standalone-&DISTRO;.sh
@@ -430,8 +408,7 @@ installer:
``/home/your_username/buildtools``
5. Source the tools environment setup script by using a command like the
following:
::
following::
$ source /home/your_username/buildtools/environment-setup-x86_64-poky-linux
+16 -32
View File
@@ -93,8 +93,7 @@ output from ``${DEPLOYDIR}`` to ``${DEPLOY_DIR_IMAGE}``.
The ``do_deploy`` task is not added as a task by default and
consequently needs to be added manually. If you want the task to run
after :ref:`ref-tasks-compile`, you can add it by doing
the following:
::
the following::
addtask deploy after do_compile
@@ -103,8 +102,7 @@ Adding ``do_deploy`` after other tasks works the same way.
.. note::
You do not need to add ``before do_build`` to the ``addtask`` command
(though it is harmless), because the ``base`` class contains the following:
::
(though it is harmless), because the ``base`` class contains the following::
do_build[recrdeptask] += "do_deploy"
@@ -302,13 +300,11 @@ 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
:yocto_git:`bluez5 </poky/tree/meta/recipes-connectivity/bluez5>`
recipe from the OE-Core layer (i.e. ``poky/meta``):
::
recipe from the OE-Core layer (i.e. ``poky/meta``)::
poky/meta/recipes-connectivity/bluez5
This recipe has two patch files located here:
::
This recipe has two patch files located here::
poky/meta/recipes-connectivity/bluez5/bluez5
@@ -323,8 +319,7 @@ and patch files needed to build the package.
As mentioned earlier, the build system treats files whose file types are
``.patch`` and ``.diff`` as patch files. However, you can use the
"apply=yes" parameter with the ``SRC_URI`` statement to indicate any
file as a patch file:
::
file as a patch file::
SRC_URI = " \
git://path_to_repo/some_package \
@@ -334,8 +329,7 @@ file as a patch file:
Conversely, if you have a directory full of patch files and you want to
exclude some so that the ``do_patch`` task does not apply them during
the patch phase, you can use the "apply=no" parameter with the
``SRC_URI`` statement:
::
``SRC_URI`` statement::
SRC_URI = " \
git://path_to_repo/some_package \
@@ -455,8 +449,7 @@ of the recipe exists upstream and a status of not updated, updated, or
unknown.
To check the upstream version and status of a recipe, use the following
devtool commands:
::
devtool commands::
$ devtool latest-version
$ devtool check-upgrade-status
@@ -467,8 +460,7 @@ chapter for more information on
section for information on checking the upgrade status of a recipe.
To build the ``checkpkg`` task, use the ``bitbake`` command with the
"-c" option and task name:
::
"-c" option and task name::
$ bitbake core-image-minimal -c checkpkg
@@ -494,8 +486,7 @@ 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::
$ bitbake -c clean recipe
@@ -519,8 +510,7 @@ 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::
$ bitbake -c cleanall recipe
@@ -540,8 +530,7 @@ target. Essentially, the ``do_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::
$ bitbake -c cleansstate recipe
@@ -553,8 +542,7 @@ scratch is guaranteed.
The ``do_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::
$ bitbake -f -c do_cleansstate target
@@ -687,8 +675,7 @@ changes made by the user with other methods (i.e. using
(:ref:`ref-tasks-kernel_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::
$ bitbake linux-yocto -c diffconfig
@@ -718,8 +705,7 @@ 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::
$ bitbake linux-yocto -c kernel_configcheck -f
@@ -750,8 +736,7 @@ tool, which you then use to modify the kernel configuration.
.. note::
You can also invoke this tool from the command line as follows:
::
You can also invoke this tool from the command line as follows::
$ bitbake linux-yocto -c menuconfig
@@ -793,8 +778,7 @@ 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-kernel_menuconfig` task. You
can invoke the task using the following command:
::
can invoke the task using the following command::
$ bitbake linux-yocto -c savedefconfig
+1 -2
View File
@@ -26,8 +26,7 @@ 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::
busybox_1.21.%.bbappend
File diff suppressed because it is too large Load Diff