Complete Yocto mirror with license table for TQMa6UL (2038-compliance)
- 264 license table entries with exact download URLs (224/264 resolved) - Complete sources/ directory with all BitBake recipes - Build configuration: tqma6ul-multi-mba6ulx, spaetzle (musl) - Full traceability for Softwarefreigabeantrag - GCC 13.4.0, Linux 6.6.102, U-Boot 2023.04, musl 1.2.4 - License distribution: GPL-2.0 (24), MIT (23), GPL-2.0+ (18), BSD-3 (16)
This commit is contained in:
3511
sources/poky/documentation/ref-manual/classes.rst
Normal file
3511
sources/poky/documentation/ref-manual/classes.rst
Normal file
File diff suppressed because it is too large
Load Diff
690
sources/poky/documentation/ref-manual/devtool-reference.rst
Normal file
690
sources/poky/documentation/ref-manual/devtool-reference.rst
Normal file
@@ -0,0 +1,690 @@
|
||||
.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
|
||||
|
||||
***************************
|
||||
``devtool`` Quick Reference
|
||||
***************************
|
||||
|
||||
The ``devtool`` command-line tool provides a number of features that
|
||||
help you build, test, and package software. This command is available
|
||||
alongside the ``bitbake`` command. Additionally, the ``devtool`` command
|
||||
is a key part of the extensible SDK.
|
||||
|
||||
This chapter provides a Quick Reference for the ``devtool`` command. For
|
||||
more information on how to apply the command when using the extensible
|
||||
SDK, see the ":doc:`/sdk-manual/extensible`" chapter in the Yocto
|
||||
Project Application Development and the Extensible Software Development
|
||||
Kit (eSDK) manual.
|
||||
|
||||
.. _devtool-getting-help:
|
||||
|
||||
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
|
||||
NOTE: Starting bitbake server...
|
||||
usage: devtool [--basepath BASEPATH] [--bbpath BBPATH] [-d] [-q] [--color COLOR] [-h] <subcommand> ...
|
||||
|
||||
OpenEmbedded development tool
|
||||
|
||||
options:
|
||||
--basepath BASEPATH Base directory of SDK / build directory
|
||||
--bbpath BBPATH Explicitly specify the BBPATH, rather than getting it from the metadata
|
||||
-d, --debug Enable debug output
|
||||
-q, --quiet Print only errors
|
||||
--color COLOR Colorize output (where COLOR is auto, always, never)
|
||||
-h, --help show this help message and exit
|
||||
|
||||
subcommands:
|
||||
Beginning work on a recipe:
|
||||
add Add a new recipe
|
||||
modify Modify the source for an existing recipe
|
||||
upgrade Upgrade an existing recipe
|
||||
Getting information:
|
||||
status Show workspace status
|
||||
latest-version Report the latest version of an existing recipe
|
||||
check-upgrade-status Report upgradability for multiple (or all) recipes
|
||||
search Search available recipes
|
||||
Working on a recipe in the workspace:
|
||||
build Build a recipe
|
||||
ide-sdk Setup the SDK and configure the IDE
|
||||
rename Rename a recipe file in the workspace
|
||||
edit-recipe Edit a recipe file
|
||||
find-recipe Find a recipe file
|
||||
configure-help Get help on configure script options
|
||||
update-recipe Apply changes from external source tree to recipe
|
||||
reset Remove a recipe from your workspace
|
||||
finish Finish working on a recipe in your workspace
|
||||
Testing changes on target:
|
||||
deploy-target Deploy recipe output files to live target machine
|
||||
undeploy-target Undeploy recipe output files in live target machine
|
||||
build-image Build image including workspace recipe packages
|
||||
Advanced:
|
||||
create-workspace Set up workspace in an alternative location
|
||||
import Import exported tar archive into workspace
|
||||
export Export workspace into a tar archive
|
||||
extract Extract the source for an existing recipe
|
||||
sync Synchronize the source tree for an existing recipe
|
||||
menuconfig Alter build-time configuration for a recipe
|
||||
Use devtool <subcommand> --help to get help on a specific command
|
||||
|
||||
As directed in the general help output, you can
|
||||
get more syntax on a specific command by providing the command name and
|
||||
using ``--help``::
|
||||
|
||||
$ devtool add --help
|
||||
NOTE: Starting bitbake server...
|
||||
usage: devtool add [-h] [--same-dir | --no-same-dir] [--fetch URI] [--npm-dev] [--no-pypi] [--version VERSION] [--no-git] [--srcrev SRCREV | --autorev]
|
||||
[--srcbranch SRCBRANCH] [--binary] [--also-native] [--src-subdir SUBDIR] [--mirrors] [--provides PROVIDES]
|
||||
[recipename] [srctree] [fetchuri]
|
||||
|
||||
Adds a new recipe to the workspace to build a specified source tree. Can optionally fetch a remote URI and unpack it to create the source tree.
|
||||
|
||||
arguments:
|
||||
recipename Name for new recipe to add (just name - no version, path or extension). If not specified, will attempt to auto-detect it.
|
||||
srctree Path to external source tree. If not specified, a subdirectory of /media/build1/poky/build/workspace/sources will be used.
|
||||
fetchuri Fetch the specified URI and extract it to create the source tree
|
||||
|
||||
options:
|
||||
-h, --help show this help message and exit
|
||||
--same-dir, -s Build in same directory as source
|
||||
--no-same-dir Force build in a separate build directory
|
||||
--fetch URI, -f URI Fetch the specified URI and extract it to create the source tree (deprecated - pass as positional argument instead)
|
||||
--npm-dev For npm, also fetch devDependencies
|
||||
--no-pypi Do not inherit pypi class
|
||||
--version VERSION, -V VERSION
|
||||
Version to use within recipe (PV)
|
||||
--no-git, -g If fetching source, do not set up source tree as a git repository
|
||||
--srcrev SRCREV, -S SRCREV
|
||||
Source revision to fetch if fetching from an SCM such as git (default latest)
|
||||
--autorev, -a When fetching from a git repository, set SRCREV in the recipe to a floating revision instead of fixed
|
||||
--srcbranch SRCBRANCH, -B SRCBRANCH
|
||||
Branch in source repository if fetching from an SCM such as git (default master)
|
||||
--binary, -b Treat the source tree as something that should be installed verbatim (no compilation, same directory structure). Useful with binary packages e.g. RPMs.
|
||||
--also-native Also add native variant (i.e. support building recipe for the build host as well as the target machine)
|
||||
--src-subdir SUBDIR Specify subdirectory within source tree to use
|
||||
--mirrors Enable PREMIRRORS and MIRRORS for source tree fetching (disable by default).
|
||||
--provides PROVIDES, -p PROVIDES
|
||||
Specify an alias for the item provided by the recipe. E.g. virtual/libgl
|
||||
|
||||
.. _devtool-the-workspace-layer-structure:
|
||||
|
||||
The Workspace Layer Structure
|
||||
=============================
|
||||
|
||||
``devtool`` uses a "Workspace" layer in which to accomplish builds. This
|
||||
layer is not specific to any single ``devtool`` command but is rather a
|
||||
common working area used across the tool.
|
||||
|
||||
The following figure shows the workspace structure:
|
||||
|
||||
.. image:: figures/build-workspace-directory.png
|
||||
:scale: 100%
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
attic - A directory created if devtool believes it must preserve
|
||||
anything when you run "devtool reset". For example, if you
|
||||
run "devtool add", make changes to the recipe, and then
|
||||
run "devtool reset", devtool takes notice that the file has
|
||||
been changed and moves it into the attic should you still
|
||||
want the recipe.
|
||||
|
||||
README - Provides information on what is in workspace layer and how to
|
||||
manage it.
|
||||
|
||||
.devtool_md5 - A checksum file used by devtool.
|
||||
|
||||
appends - A directory that contains *.bbappend files, which point to
|
||||
external source.
|
||||
|
||||
conf - A configuration directory that contains the layer.conf file.
|
||||
|
||||
recipes - A directory containing recipes. This directory contains a
|
||||
folder for each directory added whose name matches that of the
|
||||
added recipe. devtool places the recipe.bb file
|
||||
within that sub-directory.
|
||||
|
||||
sources - A directory containing a working copy of the source files used
|
||||
when building the recipe. This is the default directory used
|
||||
as the location of the source tree when you do not provide a
|
||||
source tree path. This directory contains a folder for each
|
||||
set of source files matched to a corresponding recipe.
|
||||
|
||||
.. _devtool-adding-a-new-recipe-to-the-workspace:
|
||||
|
||||
Adding a New Recipe to the Workspace Layer
|
||||
==========================================
|
||||
|
||||
Use the ``devtool add`` command to add a new recipe to the workspace
|
||||
layer. The recipe you add should not exist --- ``devtool`` creates it for
|
||||
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``::
|
||||
|
||||
$ devtool add jackson /home/user/sources/jackson
|
||||
|
||||
If you add a recipe and the workspace layer does not exist, the command
|
||||
creates the layer and populates it as described in
|
||||
":ref:`devtool-the-workspace-layer-structure`" section.
|
||||
|
||||
Running ``devtool add`` when the workspace layer exists causes the tool
|
||||
to add the recipe, append files, and source files into the existing
|
||||
workspace layer. The ``.bbappend`` file is created to point to the
|
||||
external source tree.
|
||||
|
||||
.. note::
|
||||
|
||||
If your recipe has runtime dependencies defined, you must be sure
|
||||
that these packages exist on the target hardware before attempting to
|
||||
run your application. If dependent packages (e.g. libraries) do not
|
||||
exist on the target, your application, when run, will fail to find
|
||||
those functions. For more information, see the
|
||||
":ref:`ref-manual/devtool-reference:deploying your software on the target machine`"
|
||||
section.
|
||||
|
||||
By default, ``devtool add`` uses the latest revision (i.e. master) when
|
||||
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::
|
||||
|
||||
$ devtool add --srcbranch &DISTRO_NAME_NO_CAP; jackson /home/user/sources/jackson
|
||||
|
||||
In the previous example, you are checking out the &DISTRO_NAME_NO_CAP;
|
||||
branch.
|
||||
|
||||
- To specify a specific tag or commit hash, use the ``--srcrev``
|
||||
option::
|
||||
|
||||
$ devtool add --srcrev &DISTRO_REL_TAG; jackson /home/user/sources/jackson
|
||||
$ devtool add --srcrev some_commit_hash /home/user/sources/jackson
|
||||
|
||||
The previous examples check out the
|
||||
&DISTRO_REL_TAG; tag and the commit associated with the
|
||||
some_commit_hash hash.
|
||||
|
||||
.. note::
|
||||
|
||||
If you prefer to use the latest revision every time the recipe is
|
||||
built, use the options ``--autorev`` or ``-a``.
|
||||
|
||||
.. _devtool-extracting-the-source-for-an-existing-recipe:
|
||||
|
||||
Extracting the Source for an Existing Recipe
|
||||
============================================
|
||||
|
||||
Use the ``devtool extract`` command to extract the source for an
|
||||
existing recipe. When you use this command, you must supply the root
|
||||
name of the recipe (i.e. no version, paths, or extensions), and you must
|
||||
supply the directory to which you want the source extracted.
|
||||
|
||||
Additional command options let you control the name of a development
|
||||
branch into which you can checkout the source and whether or not to keep
|
||||
a temporary directory, which is useful for debugging.
|
||||
|
||||
.. _devtool-synchronizing-a-recipes-extracted-source-tree:
|
||||
|
||||
Synchronizing a Recipe's Extracted Source Tree
|
||||
==============================================
|
||||
|
||||
Use the ``devtool sync`` command to synchronize a previously extracted
|
||||
source tree for an existing recipe. When you use this command, you must
|
||||
supply the root name of the recipe (i.e. no version, paths, or
|
||||
extensions), and you must supply the directory to which you want the
|
||||
source extracted.
|
||||
|
||||
Additional command options let you control the name of a development
|
||||
branch into which you can checkout the source and whether or not to keep
|
||||
a temporary directory, which is useful for debugging.
|
||||
|
||||
.. _devtool-modifying-a-recipe:
|
||||
|
||||
Modifying an Existing Recipe
|
||||
============================
|
||||
|
||||
Use the ``devtool modify`` command to begin modifying the source of an
|
||||
existing recipe. This command is very similar to the
|
||||
:ref:`add <devtool-adding-a-new-recipe-to-the-workspace>` command
|
||||
except that it does not physically create the recipe in the workspace
|
||||
layer because the recipe already exists in an another layer.
|
||||
|
||||
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::
|
||||
|
||||
$ devtool modify recipe
|
||||
|
||||
Using the above command form, ``devtool`` uses the existing recipe's
|
||||
:term:`SRC_URI` statement to locate the upstream source,
|
||||
extracts the source into the default sources location in the workspace.
|
||||
The default development branch used is "devtool".
|
||||
|
||||
.. _devtool-edit-an-existing-recipe:
|
||||
|
||||
Edit an Existing Recipe
|
||||
=======================
|
||||
|
||||
Use the ``devtool edit-recipe`` command to run the default editor, which
|
||||
is identified using the ``EDITOR`` variable, on the specified recipe.
|
||||
|
||||
When you use the ``devtool edit-recipe`` command, you must supply the
|
||||
root name of the recipe (i.e. no version, paths, or extensions). Also,
|
||||
the recipe file itself must reside in the workspace as a result of the
|
||||
``devtool add`` or ``devtool upgrade`` commands.
|
||||
|
||||
.. _devtool-updating-a-recipe:
|
||||
|
||||
Updating a Recipe
|
||||
=================
|
||||
|
||||
Use the ``devtool update-recipe`` command to update your recipe with
|
||||
patches that reflect changes you make to the source files. For example,
|
||||
if you know you are going to work on some code, you could first use the
|
||||
:ref:`devtool modify <devtool-modifying-a-recipe>` command to extract
|
||||
the code and set up the workspace. After which, you could modify,
|
||||
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 recipe
|
||||
|
||||
If you run the ``devtool update-recipe``
|
||||
without committing your changes, the command ignores the changes.
|
||||
|
||||
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::
|
||||
|
||||
$ devtool update-recipe recipe -a base-layer-directory
|
||||
|
||||
The ``*.bbappend`` file is created at the
|
||||
appropriate path within the specified layer directory, which may or may
|
||||
not be in your ``bblayers.conf`` file. If an append file already exists,
|
||||
the command updates it appropriately.
|
||||
|
||||
.. _devtool-checking-on-the-upgrade-status-of-a-recipe:
|
||||
|
||||
Checking on the Upgrade Status of a Recipe
|
||||
==========================================
|
||||
|
||||
Upstream recipes change over time. Consequently, you might find that you
|
||||
need to determine if you can upgrade a recipe to a newer version.
|
||||
|
||||
To check on the upgrade status of a recipe, you can use the
|
||||
``devtool latest-version recipe`` command, which quickly shows the current
|
||||
version and the latest version available upstream. To get a more global
|
||||
picture, use the ``devtool check-upgrade-status`` command, which takes a
|
||||
list of recipes as input, or no arguments, in which case it checks all
|
||||
available recipes. This command will only print the recipes for which
|
||||
a new upstream version is available. Each such recipe will have its current
|
||||
version and latest upstream version, as well as the email of the maintainer
|
||||
and any additional information such as the commit hash or reason for not
|
||||
being able to upgrade it, displayed in a table.
|
||||
|
||||
This upgrade checking mechanism relies on the optional :term:`UPSTREAM_CHECK_URI`,
|
||||
:term:`UPSTREAM_CHECK_REGEX`, :term:`UPSTREAM_CHECK_GITTAGREGEX`,
|
||||
:term:`UPSTREAM_CHECK_COMMITS` and :term:`UPSTREAM_VERSION_UNKNOWN`
|
||||
variables in package recipes.
|
||||
|
||||
.. note::
|
||||
|
||||
- Most of the time, the above variables are unnecessary. They are only
|
||||
required when upstream does something unusual, and default
|
||||
mechanisms cannot find the new upstream versions.
|
||||
|
||||
- For the ``oe-core`` layer, recipe maintainers come from the
|
||||
:yocto_git:`maintainers.inc </poky/tree/meta/conf/distro/include/maintainers.inc>`
|
||||
file.
|
||||
|
||||
- If the recipe is using the :ref:`bitbake-user-manual/bitbake-user-manual-fetching:git fetcher (\`\`git://\`\`)`
|
||||
rather than a tarball, the commit hash points to the commit that matches
|
||||
the recipe's latest version tag, or in the absence of suitable tags,
|
||||
to the latest commit (when :term:`UPSTREAM_CHECK_COMMITS` set to ``1``
|
||||
in the recipe).
|
||||
|
||||
As with all ``devtool`` commands, you can get help on the individual
|
||||
command::
|
||||
|
||||
$ devtool check-upgrade-status -h
|
||||
NOTE: Starting bitbake server...
|
||||
usage: devtool check-upgrade-status [-h] [--all] [recipe [recipe ...]]
|
||||
|
||||
Prints a table of recipes together with versions currently provided by recipes, and latest upstream versions, when there is a later version available
|
||||
|
||||
arguments:
|
||||
recipe Name of the recipe to report (omit to report upgrade info for all recipes)
|
||||
|
||||
options:
|
||||
-h, --help show this help message and exit
|
||||
--all, -a Show all recipes, not just recipes needing upgrade
|
||||
|
||||
Unless you provide a specific recipe name on the command line, the
|
||||
command checks all recipes in all configured layers.
|
||||
|
||||
Here is a partial example table that reports on all the recipes::
|
||||
|
||||
$ devtool check-upgrade-status
|
||||
...
|
||||
INFO: bind 9.16.20 9.16.21 Armin Kuster <akuster808@gmail.com>
|
||||
INFO: inetutils 2.1 2.2 Tom Rini <trini@konsulko.com>
|
||||
INFO: iproute2 5.13.0 5.14.0 Changhyeok Bae <changhyeok.bae@gmail.com>
|
||||
INFO: openssl 1.1.1l 3.0.0 Alexander Kanavin <alex.kanavin@gmail.com>
|
||||
INFO: base-passwd 3.5.29 3.5.51 Anuj Mittal <anuj.mittal@intel.com> cannot be updated due to: Version 3.5.38 requires cdebconf for update-passwd utility
|
||||
...
|
||||
|
||||
Notice the reported reason for not upgrading the ``base-passwd`` recipe.
|
||||
In this example, while a new version is available upstream, you do not
|
||||
want to use it because the dependency on ``cdebconf`` is not easily
|
||||
satisfied. Maintainers can explicit the reason that is shown by adding
|
||||
the :term:`RECIPE_NO_UPDATE_REASON` variable to the corresponding recipe.
|
||||
See :yocto_git:`base-passwd.bb </poky/tree/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb?h=kirkstone>`
|
||||
for an example::
|
||||
|
||||
RECIPE_NO_UPDATE_REASON = "Version 3.5.38 requires cdebconf for update-passwd utility"
|
||||
|
||||
Last but not least, you may set :term:`UPSTREAM_VERSION_UNKNOWN` to ``1``
|
||||
in a recipe when there's currently no way to determine its latest upstream
|
||||
version.
|
||||
|
||||
.. _devtool-upgrading-a-recipe:
|
||||
|
||||
Upgrading a Recipe
|
||||
==================
|
||||
|
||||
As software matures, upstream recipes are upgraded to newer versions. As
|
||||
a developer, you need to keep your local recipes up-to-date with the
|
||||
upstream version releases. There are several ways of upgrading recipes.
|
||||
You can read about them in the ":ref:`dev-manual/upgrading-recipes:upgrading recipes`"
|
||||
section of the Yocto Project Development Tasks Manual. This section
|
||||
overviews the ``devtool upgrade`` command.
|
||||
|
||||
Before you upgrade a recipe, you can check on its upgrade status. See
|
||||
the ":ref:`devtool-checking-on-the-upgrade-status-of-a-recipe`" section
|
||||
for more information.
|
||||
|
||||
The ``devtool upgrade`` command upgrades an existing recipe to a more
|
||||
recent version of the recipe upstream. The command puts the upgraded
|
||||
recipe file along with any associated files into a "workspace" and, if
|
||||
necessary, extracts the source tree to a specified location. During the
|
||||
upgrade, patches associated with the recipe are rebased or added as
|
||||
needed.
|
||||
|
||||
When you use the ``devtool upgrade`` command, you must supply the root
|
||||
name of the recipe (i.e. no version, paths, or extensions), and you must
|
||||
supply the directory to which you want the source extracted. Additional
|
||||
command options let you control things such as the version number to
|
||||
which you want to upgrade (i.e. the :term:`PV`), the source
|
||||
revision to which you want to upgrade (i.e. the
|
||||
:term:`SRCREV`), whether or not to apply patches, and so
|
||||
forth.
|
||||
|
||||
You can read more on the ``devtool upgrade`` workflow in the
|
||||
":ref:`sdk-manual/extensible:use \`\`devtool upgrade\`\` to create a version of the recipe that supports a newer version of the software`"
|
||||
section in the Yocto Project Application Development and the Extensible
|
||||
Software Development Kit (eSDK) manual. You can also see an example of
|
||||
how to use ``devtool upgrade`` in the ":ref:`dev-manual/upgrading-recipes:using ``devtool upgrade```"
|
||||
section in the Yocto Project Development Tasks Manual.
|
||||
|
||||
.. _devtool-resetting-a-recipe:
|
||||
|
||||
Resetting a Recipe
|
||||
==================
|
||||
|
||||
Use the ``devtool reset`` command to remove a recipe and its
|
||||
configuration (e.g. the corresponding ``.bbappend`` file) from the
|
||||
workspace layer. Realize that this command deletes the recipe and the
|
||||
append file. The command does not physically move them for you.
|
||||
Consequently, you must be sure to physically relocate your updated
|
||||
recipe and the append file outside of the workspace layer before running
|
||||
the ``devtool reset`` command.
|
||||
|
||||
If the ``devtool reset`` command detects that the recipe or the append
|
||||
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::
|
||||
|
||||
$ devtool reset mtr
|
||||
NOTE: Cleaning sysroot for recipe mtr...
|
||||
NOTE: Leaving source tree /home/scottrif/poky/build/workspace/sources/mtr as-is; if you no longer need it then please delete it manually
|
||||
$
|
||||
|
||||
.. _devtool-finish-working-on-a-recipe:
|
||||
|
||||
Finish Working on a Recipe
|
||||
==========================
|
||||
|
||||
Use the ``devtool finish`` command to push any committed changes to the
|
||||
specified recipe in the specified layer and remove it from your workspace.
|
||||
|
||||
This is roughly equivalent to the ``devtool update-recipe`` command followed by
|
||||
the ``devtool reset`` command. The changes must have been committed to the git
|
||||
repository created by ``devtool``. Here is an example::
|
||||
|
||||
$ devtool finish recipe /path/to/custom/layer
|
||||
|
||||
.. _devtool-building-your-recipe:
|
||||
|
||||
Building Your Recipe
|
||||
====================
|
||||
|
||||
Use the ``devtool build`` command to build your recipe. The
|
||||
``devtool build`` command is equivalent to the
|
||||
``bitbake -c populate_sysroot`` command.
|
||||
|
||||
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::
|
||||
|
||||
$ devtool build recipe
|
||||
|
||||
.. _devtool-building-your-image:
|
||||
|
||||
Building Your Image
|
||||
===================
|
||||
|
||||
Use the ``devtool build-image`` command to build an image, extending it
|
||||
to include packages from recipes in the workspace. Using this command is
|
||||
useful when you want an image that ready for immediate deployment onto a
|
||||
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::
|
||||
|
||||
$ devtool build-image image
|
||||
|
||||
.. _devtool-deploying-your-software-on-the-target-machine:
|
||||
|
||||
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::
|
||||
|
||||
$ devtool deploy-target recipe target
|
||||
|
||||
The target is the address of the target machine, which must be running
|
||||
an SSH server (i.e. ``user@hostname[:destdir]``).
|
||||
|
||||
This command deploys all files installed during the
|
||||
:ref:`ref-tasks-install` task. Furthermore, you do not
|
||||
need to have package management enabled within the target machine. If
|
||||
you do, the package manager is bypassed.
|
||||
|
||||
.. note::
|
||||
|
||||
The ``deploy-target`` functionality is for development only. You
|
||||
should never use it to update an image that will be used in
|
||||
production.
|
||||
|
||||
Some conditions could prevent a deployed application from
|
||||
behaving as expected. When both of the following conditions are met, your
|
||||
application has the potential to not behave correctly when run on the
|
||||
target:
|
||||
|
||||
- You are deploying a new application to the target and the recipe you
|
||||
used to build the application had correctly defined runtime
|
||||
dependencies.
|
||||
|
||||
- The target does not physically have the packages on which the
|
||||
application depends installed.
|
||||
|
||||
If both of these conditions are met, your application will not behave as
|
||||
expected. The reason for this misbehavior is because the
|
||||
``devtool deploy-target`` command does not deploy the packages (e.g.
|
||||
libraries) on which your new application depends. The assumption is that
|
||||
the packages are already on the target. Consequently, when a runtime
|
||||
call is made in the application for a dependent function (e.g. a library
|
||||
call), the function cannot be found.
|
||||
|
||||
.. warning::
|
||||
|
||||
Runtime dependencies can be explicitly listed in the :term:`RDEPENDS`
|
||||
variable, but may also be the result of a :term:`DEPENDS` assignment in your
|
||||
application's recipe. This is usually the case when your application depends
|
||||
on libraries for compilation: these libraries are listed as build-time
|
||||
dependencies in the :term:`DEPENDS` variable in your application's recipe.
|
||||
However these may also be runtime dependencies if they install shared objects
|
||||
on which your application will dynamically link to at runtime (e.g. shared
|
||||
libraries ending with ``.so``).
|
||||
|
||||
These runtime dependencies are automatically resolved by the
|
||||
:term:`OpenEmbedded Build System` during the packaging phase. Since
|
||||
``devtool`` ignores packaging dependencies, they will not be installed
|
||||
automatically with ``devtool deploy-target``.
|
||||
|
||||
For more information on how the :term:`OpenEmbedded Build System` handles
|
||||
packaging, see the :ref:`overview-manual/concepts:Automatically Added Runtime
|
||||
Dependencies` section of the Yocto Project Overview and Concepts Manual.
|
||||
|
||||
To be sure you have all the dependencies local to the target, you need
|
||||
to be sure that the packages are pre-deployed (installed) on the target
|
||||
before attempting to run your application.
|
||||
|
||||
.. _devtool-removing-your-software-from-the-target-machine:
|
||||
|
||||
Removing Your Software from the Target Machine
|
||||
==============================================
|
||||
|
||||
Use the ``devtool undeploy-target`` command to remove deployed build
|
||||
output from the target machine. For the ``devtool undeploy-target``
|
||||
command to work, you must have previously used the
|
||||
":ref:`devtool deploy-target <ref-manual/devtool-reference:deploying your software on the target machine>`"
|
||||
command::
|
||||
|
||||
$ devtool undeploy-target recipe target
|
||||
|
||||
The target is the
|
||||
address of the target machine, which must be running an SSH server (i.e.
|
||||
``user@hostname``).
|
||||
|
||||
.. _devtool-creating-the-workspace:
|
||||
|
||||
Creating the Workspace Layer in an Alternative Location
|
||||
=======================================================
|
||||
|
||||
Use the ``devtool create-workspace`` command to create a new workspace
|
||||
layer in your :term:`Build Directory`. When you create a
|
||||
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"::
|
||||
|
||||
$ 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"::
|
||||
|
||||
$ devtool create-workspace /home/scottrif/new-workspace
|
||||
|
||||
.. _devtool-get-the-status-of-the-recipes-in-your-workspace:
|
||||
|
||||
Get the Status of the Recipes in Your Workspace
|
||||
===============================================
|
||||
|
||||
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::
|
||||
|
||||
$ devtool status
|
||||
|
||||
Here is sample output after using
|
||||
:ref:`devtool add <ref-manual/devtool-reference:adding a new recipe to the workspace layer>`
|
||||
to create and add the ``mtr_0.86.bb`` recipe to the ``workspace`` directory::
|
||||
|
||||
$ devtool status
|
||||
mtr:/home/scottrif/poky/build/workspace/sources/mtr (/home/scottrif/poky/build/workspace/recipes/mtr/mtr_0.86.bb)
|
||||
$
|
||||
|
||||
.. _devtool-search-for-available-target-recipes:
|
||||
|
||||
Search for Available Target Recipes
|
||||
===================================
|
||||
|
||||
Use the ``devtool search`` command to search for available target
|
||||
recipes. The command matches the recipe name, package name, description,
|
||||
and installed files. The command displays the recipe name as a result of
|
||||
a match.
|
||||
|
||||
When you use the ``devtool search`` command, you must supply a keyword.
|
||||
The command uses the keyword when searching for a match.
|
||||
|
||||
Alternatively, the ``devtool find-recipe`` command can be used to search for
|
||||
recipe files instead of recipe names. Likewise, you must supply a keyword.
|
||||
|
||||
.. _devtool-get-the-configure-script-help:
|
||||
|
||||
Get Information on Recipe Configuration Scripts
|
||||
===============================================
|
||||
|
||||
Use the ``devtool configure-help`` command to get help on the configuration
|
||||
script options for a given recipe. You must supply the recipe name to the
|
||||
command. For example, it shows the output of ``./configure --help`` for
|
||||
:ref:`autotools <ref-classes-autotools>`-based recipes.
|
||||
|
||||
The ``configure-help`` command will also display the configuration options
|
||||
currently in use, including the ones passed through the :term:`EXTRA_OECONF`
|
||||
variable.
|
||||
|
||||
.. _devtool-generate-an-ide-configuration-for-a-recipe:
|
||||
|
||||
Generate an IDE Configuration for a Recipe
|
||||
==========================================
|
||||
|
||||
The ``devtool ide-sdk`` automatically creates an IDE configuration and SDK to
|
||||
work on a given recipe. Depending on the ``--mode`` parameter, different types
|
||||
of SDKs are generated:
|
||||
|
||||
- ``modified`` mode: this creates an SDK and generates an IDE configuration in
|
||||
the workspace directory.
|
||||
|
||||
- ``shared`` mode: this creates a cross-compiling toolchain and the
|
||||
corresponding shared sysroot directories of the supplied recipe(s).
|
||||
|
||||
The ``--target`` option can be used to specify a ``username@hostname`` string
|
||||
and create a remote debugging configuration for the recipe. Similarly to
|
||||
``devtool deploy-target``, it requires an SSH server running on the target.
|
||||
|
||||
For further details on the ``devtool ide-sdk`` command, see the
|
||||
":doc:`/sdk-manual/extensible`" chapter in the Yocto Project Application
|
||||
Development and the Extensible Software Development Kit (eSDK) manual.
|
||||
497
sources/poky/documentation/ref-manual/faq.rst
Normal file
497
sources/poky/documentation/ref-manual/faq.rst
Normal file
@@ -0,0 +1,497 @@
|
||||
.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
|
||||
|
||||
***
|
||||
FAQ
|
||||
***
|
||||
|
||||
.. contents::
|
||||
|
||||
General questions
|
||||
=================
|
||||
|
||||
How does Poky differ from OpenEmbedded?
|
||||
---------------------------------------
|
||||
|
||||
The term ``Poky`` refers to the specific reference build
|
||||
system that the Yocto Project provides. Poky is based on
|
||||
:term:`OpenEmbedded-Core (OE-Core)` and :term:`BitBake`. Thus, the
|
||||
generic term used here for the build system is the "OpenEmbedded build
|
||||
system." Development in the Yocto Project using Poky is closely tied to
|
||||
OpenEmbedded, with changes always being merged to OE-Core or BitBake
|
||||
first before being pulled back into Poky. This practice benefits both
|
||||
projects immediately.
|
||||
|
||||
How can you claim Poky / OpenEmbedded-Core is stable?
|
||||
-----------------------------------------------------
|
||||
|
||||
There are three areas that help with stability;
|
||||
|
||||
- The Yocto Project team keeps :term:`OpenEmbedded-Core (OE-Core)` small and
|
||||
focused, containing around 830 recipes as opposed to the thousands
|
||||
available in other OpenEmbedded community layers. Keeping it small
|
||||
makes it easy to test and maintain.
|
||||
|
||||
- The Yocto Project team runs manual and automated tests using a small,
|
||||
fixed set of reference hardware as well as emulated targets.
|
||||
|
||||
- The Yocto Project uses an :yocto_ab:`autobuilder <>`, which provides
|
||||
continuous build and integration tests.
|
||||
|
||||
Are there any products built using the OpenEmbedded build system?
|
||||
-----------------------------------------------------------------
|
||||
|
||||
See :yocto_wiki:`Products that use the Yocto Project
|
||||
</Project_Users#Products_that_use_the_Yocto_Project>` in the Yocto Project
|
||||
Wiki. Don't hesitate to contribute to this page if you know other such
|
||||
products.
|
||||
|
||||
Why isn't systemd the default init system for OpenEmbedded-Core/Yocto Project or in Poky?
|
||||
-----------------------------------------------------------------------------------------
|
||||
|
||||
`systemd <https://systemd.io/>`__ is a desktop Linux init system with a specific
|
||||
focus that is not entirely aligned with a customisable "embedded" build
|
||||
system/environment.
|
||||
|
||||
It understandably mandates certain layouts and configurations which may
|
||||
or may not align with what the objectives and direction :term:`OpenEmbedded-Core
|
||||
(OE-Core)` or Yocto Project want to take. It doesn't support all of our targets.
|
||||
For example `musl <https://www.musl-libc.org/>`__ support in systemd is
|
||||
problematic.
|
||||
|
||||
If it were our default, we would have to align with all their choices
|
||||
and this doesn't make sense. It is therefore a configuration option and
|
||||
available to anyone where the design goals align. But we are clear it
|
||||
is not the only way to handle init.
|
||||
|
||||
Our automated testing includes it through the ``poky-altcfg`` :term:`DISTRO` and
|
||||
we don't really need it to be the default: it is tested, it works, and people
|
||||
can choose to use it.
|
||||
|
||||
Building environment
|
||||
====================
|
||||
|
||||
Missing dependencies on the development system?
|
||||
-----------------------------------------------
|
||||
|
||||
If your development system does not meet the required Git, tar, and
|
||||
Python versions, you can get the required tools on your host development
|
||||
system in different ways (i.e. building a tarball or downloading a
|
||||
tarball). See the ":ref:`ref-manual/system-requirements:required git, tar, python, make and gcc versions`"
|
||||
section for steps on how to update your build tools.
|
||||
|
||||
How does OpenEmbedded fetch source code? Will it work through a firewall or proxy server?
|
||||
-----------------------------------------------------------------------------------------
|
||||
|
||||
The way the build system obtains source code is highly
|
||||
configurable. You can setup the build system to get source code in most
|
||||
environments if HTTP transport is available.
|
||||
|
||||
When the build system searches for source code, it first tries the local
|
||||
download directory. If that location fails, Poky tries
|
||||
:term:`PREMIRRORS`, the upstream source, and then
|
||||
:term:`MIRRORS` in that order.
|
||||
|
||||
Assuming your distribution is "poky", the OpenEmbedded build system uses
|
||||
the Yocto Project source :term:`PREMIRRORS` by default for SCM-based
|
||||
sources, upstreams for normal tarballs, and then falls back to a number
|
||||
of other mirrors including the Yocto Project source mirror if those
|
||||
fail.
|
||||
|
||||
As an example, you could add a specific server for the build system to
|
||||
attempt before any others by adding something like the following to the
|
||||
``local.conf`` configuration file::
|
||||
|
||||
PREMIRRORS:prepend = "\
|
||||
git://.*/.* &YOCTO_DL_URL;/mirror/sources/ \
|
||||
ftp://.*/.* &YOCTO_DL_URL;/mirror/sources/ \
|
||||
http://.*/.* &YOCTO_DL_URL;/mirror/sources/ \
|
||||
https://.*/.* &YOCTO_DL_URL;/mirror/sources/"
|
||||
|
||||
These changes cause the build system to intercept Git, FTP, HTTP, and
|
||||
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.
|
||||
|
||||
Another option is to set::
|
||||
|
||||
BB_NO_NETWORK = "1"
|
||||
|
||||
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::
|
||||
|
||||
BB_FETCH_PREMIRRORONLY = "1"
|
||||
|
||||
This statement limits the build system to pulling source from the
|
||||
:term:`PREMIRRORS` only. Again, this technique is useful for reproducing
|
||||
builds.
|
||||
|
||||
Here is yet another technique::
|
||||
|
||||
BB_GENERATE_MIRROR_TARBALLS = "1"
|
||||
|
||||
This statement tells the build system to generate mirror tarballs. This
|
||||
technique is useful if you want to create a mirror server. If not,
|
||||
however, the technique can simply waste time during the build.
|
||||
|
||||
Finally, consider an example where you are behind an HTTP-only firewall.
|
||||
You could make the following changes to the ``local.conf`` configuration
|
||||
file as long as the :term:`PREMIRRORS` server is current::
|
||||
|
||||
PREMIRRORS:prepend = "\
|
||||
git://.*/.* &YOCTO_DL_URL;/mirror/sources/ \
|
||||
ftp://.*/.* &YOCTO_DL_URL;/mirror/sources/ \
|
||||
http://.*/.* &YOCTO_DL_URL;/mirror/sources/ \
|
||||
https://.*/.* &YOCTO_DL_URL;/mirror/sources/"
|
||||
BB_FETCH_PREMIRRORONLY = "1"
|
||||
|
||||
These changes would cause the build system to successfully fetch source
|
||||
over HTTP and any network accesses to anything other than the
|
||||
:term:`PREMIRRORS` would fail.
|
||||
|
||||
Most source fetching by the OpenEmbedded build system is done by
|
||||
``wget`` and you therefore need to specify the proxy settings in a
|
||||
``.wgetrc`` file, which can be in your home directory if you are a
|
||||
single user or can be in ``/usr/local/etc/wgetrc`` as a global user
|
||||
file.
|
||||
|
||||
Here is the applicable code for setting various proxy types in the
|
||||
``.wgetrc`` file. By default, these settings are disabled with comments.
|
||||
To use them, remove the comments::
|
||||
|
||||
# You can set the default proxies for Wget to use for http, https, and ftp.
|
||||
# They will override the value in the environment.
|
||||
#https_proxy = http://proxy.yoyodyne.com:18023/
|
||||
#http_proxy = http://proxy.yoyodyne.com:18023/
|
||||
#ftp_proxy = http://proxy.yoyodyne.com:18023/
|
||||
|
||||
# If you do not want to use proxy at all, set this to off.
|
||||
#use_proxy = on
|
||||
|
||||
The build system also accepts ``http_proxy``, ``ftp_proxy``, ``https_proxy``,
|
||||
and ``all_proxy`` set as to standard shell environment variables to redirect
|
||||
requests through proxy servers.
|
||||
|
||||
The Yocto Project also includes a
|
||||
``meta-poky/conf/templates/default/site.conf.sample`` file that shows
|
||||
how to configure CVS and Git proxy servers if needed.
|
||||
|
||||
.. note::
|
||||
|
||||
You can find more information on the
|
||||
":yocto_wiki:`Working Behind a Network Proxy </Working_Behind_a_Network_Proxy>`"
|
||||
Wiki page.
|
||||
|
||||
Using the OpenEmbedded Build system
|
||||
===================================
|
||||
|
||||
How do I use an external toolchain?
|
||||
-----------------------------------
|
||||
|
||||
See the ":ref:`dev-manual/external-toolchain:optionally using an external toolchain`"
|
||||
section in the Development Task manual.
|
||||
|
||||
Why do I get chmod permission issues?
|
||||
-------------------------------------
|
||||
|
||||
If you see the error
|
||||
``chmod: XXXXX new permissions are r-xrwxrwx, not r-xr-xr-x``,
|
||||
you are probably running the build on an NTFS filesystem. Instead,
|
||||
run the build system on a partition with a modern Linux filesystem such as
|
||||
``ext4``, ``btrfs`` or ``xfs``.
|
||||
|
||||
I see many 404 errors trying to download sources. Is anything wrong?
|
||||
--------------------------------------------------------------------
|
||||
|
||||
Nothing is wrong. The OpenEmbedded build system checks any
|
||||
configured source mirrors before downloading from the upstream sources.
|
||||
The build system does this searching for both source archives and
|
||||
pre-checked out versions of SCM-managed software. These checks help in
|
||||
large installations because it can reduce load on the SCM servers
|
||||
themselves. This can also allow builds to continue to work if an
|
||||
upstream source disappears.
|
||||
|
||||
Why do I get random build failures?
|
||||
-----------------------------------
|
||||
|
||||
If the same build is failing in totally different and random
|
||||
ways, the most likely explanation is:
|
||||
|
||||
- The hardware you are running the build on has some problem.
|
||||
|
||||
- You are running the build under virtualization, in which case the
|
||||
virtualization probably has bugs.
|
||||
|
||||
The OpenEmbedded build system processes a massive amount of data that
|
||||
causes lots of network, disk and CPU activity and is sensitive to even
|
||||
single-bit failures in any of these areas. True random failures have
|
||||
always been traced back to hardware or virtualization issues.
|
||||
|
||||
Why does the build fail with ``iconv.h`` problems?
|
||||
--------------------------------------------------
|
||||
|
||||
When you try to build a native recipe, you may get an error message that
|
||||
indicates that GNU ``libiconv`` is not in use but ``iconv.h`` has been
|
||||
included from ``libiconv``::
|
||||
|
||||
#error GNU libiconv not in use but included iconv.h is from libiconv
|
||||
|
||||
When this happens, you need to check whether you have a previously
|
||||
installed version of the header file in ``/usr/local/include/``.
|
||||
If that's the case, you should either uninstall it or temporarily rename
|
||||
it and try the build again.
|
||||
|
||||
This issue is just a single manifestation of "system leakage" issues
|
||||
caused when the OpenEmbedded build system finds and uses previously
|
||||
installed files during a native build. This type of issue might not be
|
||||
limited to ``iconv.h``. Make sure that leakage cannot occur from
|
||||
``/usr/local/include`` and ``/opt`` locations.
|
||||
|
||||
Why don't other recipes find the files provided by my ``*-native`` recipe?
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
Files provided by your native recipe could be missing from the native
|
||||
sysroot, your recipe could also be installing to the wrong place, or you
|
||||
could be getting permission errors during the :ref:`ref-tasks-install`
|
||||
task in your recipe.
|
||||
|
||||
This situation happens when the build system used by a package does not
|
||||
recognize the environment variables supplied to it by :term:`BitBake`. The
|
||||
incident that prompted this FAQ entry involved a Makefile that used an
|
||||
environment variable named ``BINDIR`` instead of the more standard
|
||||
variable ``bindir``. The makefile's hardcoded default value of
|
||||
"/usr/bin" worked most of the time, but not for the recipe's ``-native``
|
||||
variant. For another example, permission errors might be caused by a
|
||||
Makefile that ignores ``DESTDIR`` or uses a different name for that
|
||||
environment variable. Check the build system of the package to see if
|
||||
these kinds of issues exist.
|
||||
|
||||
Can I get rid of build output so I can start over?
|
||||
--------------------------------------------------
|
||||
|
||||
Yes --- you can easily do this. When you use BitBake to build an
|
||||
image, all the build output goes into the directory created when you run
|
||||
the build environment setup script (i.e. :ref:`structure-core-script`).
|
||||
By default, this :term:`Build Directory` is named ``build`` but can be named
|
||||
anything you want.
|
||||
|
||||
Within the :term:`Build Directory`, is the ``tmp`` directory. To remove all the
|
||||
build output yet preserve any source code or downloaded files from
|
||||
previous builds, simply remove the ``tmp`` directory.
|
||||
|
||||
Why isn't there a way to append bbclass files like bbappend for recipes?
|
||||
------------------------------------------------------------------------
|
||||
|
||||
The Yocto Project has consciously chosen not to implement such functionality.
|
||||
Class code is designed to be shared and reused, and exposes some level of
|
||||
configuration to its users. We want to encourage people to share these changes
|
||||
so we can build the best classes.
|
||||
|
||||
If the ``append`` functionality was available for classes, our evidence and
|
||||
experience suggest that people would create their custom changes in their
|
||||
layer instead of sharing and discussing the issues and/or limitations they
|
||||
encountered. This would lead to bizarre class interactions when new layers are
|
||||
included. We therefore consciously choose to have a natural pressure to share
|
||||
class code improvements or fixes.
|
||||
|
||||
There are also technical considerations like which recipes a class append would
|
||||
apply to and how that would fit within the layer model. These are complications
|
||||
we think we can live without!
|
||||
|
||||
Customizing generated images
|
||||
============================
|
||||
|
||||
What does the OpenEmbedded build system produce as output?
|
||||
----------------------------------------------------------
|
||||
|
||||
Because you can use the same set of recipes to create output of
|
||||
various formats, the output of an OpenEmbedded build depends on how you
|
||||
start it. Usually, the output is a flashable image ready for the target
|
||||
device.
|
||||
|
||||
How do I make the Yocto Project support my board?
|
||||
-------------------------------------------------
|
||||
|
||||
Support for an additional board is added by creating a Board
|
||||
Support Package (BSP) layer for it. For more information on how to
|
||||
create a BSP layer, see the
|
||||
":ref:`dev-manual/layers:understanding and creating layers`"
|
||||
section in the Yocto Project Development Tasks Manual and the
|
||||
:doc:`/bsp-guide/index`.
|
||||
|
||||
Usually, if the board is not completely exotic, adding support in the
|
||||
Yocto Project is fairly straightforward.
|
||||
|
||||
How do I make the Yocto Project support my package?
|
||||
---------------------------------------------------
|
||||
|
||||
To add a package, you need to create a BitBake recipe. For
|
||||
information on how to create a BitBake recipe, see the
|
||||
":ref:`dev-manual/new-recipe:writing a new recipe`"
|
||||
section in the Yocto Project Development Tasks Manual.
|
||||
|
||||
What do I need to ship for license compliance?
|
||||
----------------------------------------------
|
||||
|
||||
This is a difficult question and you need to consult your lawyer
|
||||
for the answer for your specific case. It is worth bearing in mind that
|
||||
for GPL compliance, there needs to be enough information shipped to
|
||||
allow someone else to rebuild and produce the same end result you are
|
||||
shipping. This means sharing the source code, any patches applied to it,
|
||||
and also any configuration information about how that package was
|
||||
configured and built.
|
||||
|
||||
You can find more information on licensing in the
|
||||
":ref:`overview-manual/development-environment:licensing`"
|
||||
section in the Yocto Project Overview and Concepts Manual and also in the
|
||||
":ref:`dev-manual/licenses:maintaining open source license compliance during your product's lifecycle`"
|
||||
section in the Yocto Project Development Tasks Manual.
|
||||
|
||||
Do I have to make a full reflash after recompiling one package?
|
||||
---------------------------------------------------------------
|
||||
|
||||
The OpenEmbedded build system can build packages in various
|
||||
formats such as IPK for OPKG, Debian package (``.deb``), or RPM. You can
|
||||
then upgrade only the modified packages using the package tools on the device,
|
||||
much like on a desktop distribution such as Ubuntu or Fedora. However,
|
||||
package management on the target is entirely optional.
|
||||
|
||||
How to prevent my package from being marked as machine specific?
|
||||
----------------------------------------------------------------
|
||||
|
||||
If you have machine-specific data in a package for one machine only
|
||||
but the package is being marked as machine-specific in all cases,
|
||||
you can set :term:`SRC_URI_OVERRIDES_PACKAGE_ARCH` = "0" in the ``.bb`` file.
|
||||
However, but make sure the package is manually marked as machine-specific for the
|
||||
case that needs it. The code that handles :term:`SRC_URI_OVERRIDES_PACKAGE_ARCH`
|
||||
is in the ``meta/classes-global/base.bbclass`` file.
|
||||
|
||||
What's the difference between ``target`` and ``target-native``?
|
||||
---------------------------------------------------------------
|
||||
|
||||
The ``*-native`` targets are designed to run on the system being
|
||||
used for the build. These are usually tools that are needed to assist
|
||||
the build in some way such as ``quilt-native``, which is used to apply
|
||||
patches. The non-native version is the one that runs on the target
|
||||
device.
|
||||
|
||||
Why do ``${bindir}`` and ``${libdir}`` have strange values for ``-native`` recipes?
|
||||
-----------------------------------------------------------------------------------
|
||||
|
||||
Executables and libraries might need to be used from a directory
|
||||
other than the directory into which they were initially installed.
|
||||
Complicating this situation is the fact that sometimes these executables
|
||||
and libraries are compiled with the expectation of being run from that
|
||||
initial installation target directory. If this is the case, moving them
|
||||
causes problems.
|
||||
|
||||
This scenario is a fundamental problem for package maintainers of
|
||||
mainstream Linux distributions as well as for the OpenEmbedded build
|
||||
system. As such, a well-established solution exists. Makefiles,
|
||||
Autotools configuration scripts, and other build systems are expected to
|
||||
respect environment variables such as ``bindir``, ``libdir``, and
|
||||
``sysconfdir`` that indicate where executables, libraries, and data
|
||||
reside when a program is actually run. They are also expected to respect
|
||||
a ``DESTDIR`` environment variable, which is prepended to all the other
|
||||
variables when the build system actually installs the files. It is
|
||||
understood that the program does not actually run from within
|
||||
``DESTDIR``.
|
||||
|
||||
When the OpenEmbedded build system uses a recipe to build a
|
||||
target-architecture program (i.e. one that is intended for inclusion on
|
||||
the image being built), that program eventually runs from the root file
|
||||
system of that image. Thus, the build system provides a value of
|
||||
"/usr/bin" for ``bindir``, a value of "/usr/lib" for ``libdir``, and so
|
||||
forth.
|
||||
|
||||
Meanwhile, ``DESTDIR`` is a path within the :term:`Build Directory`.
|
||||
However, when the recipe builds a native program (i.e. one that is
|
||||
intended to run on the build machine), that program is never installed
|
||||
directly to the build machine's root file system. Consequently, the build
|
||||
system uses paths within the Build Directory for ``DESTDIR``, ``bindir``
|
||||
and related variables. To better understand this, consider the following
|
||||
two paths (artificially broken across lines for readability) where the
|
||||
first is relatively normal and the second is not::
|
||||
|
||||
/home/maxtothemax/poky-bootchart2/build/tmp/work/i586-poky-linux/zlib/
|
||||
1.2.8-r0/sysroot-destdir/usr/bin
|
||||
|
||||
/home/maxtothemax/poky-bootchart2/build/tmp/work/x86_64-linux/
|
||||
zlib-native/1.2.8-r0/sysroot-destdir/home/maxtothemax/poky-bootchart2/
|
||||
build/tmp/sysroots/x86_64-linux/usr/bin
|
||||
|
||||
Even if the paths look unusual, they both are correct --- the first for
|
||||
a target and the second for a native recipe. These paths are a consequence
|
||||
of the ``DESTDIR`` mechanism and while they appear strange, they are correct
|
||||
and in practice very effective.
|
||||
|
||||
How do I create images with more free space?
|
||||
--------------------------------------------
|
||||
|
||||
By default, the OpenEmbedded build system creates images that are
|
||||
1.3 times the size of the populated root filesystem. To affect the image
|
||||
size, you need to set various configurations:
|
||||
|
||||
- *Image Size:* The OpenEmbedded build system uses the
|
||||
:term:`IMAGE_ROOTFS_SIZE` variable to define
|
||||
the size of the image in Kbytes. The build system determines the size
|
||||
by taking into account the initial root filesystem size before any
|
||||
modifications such as requested size for the image and any requested
|
||||
additional free disk space to be added to the image.
|
||||
|
||||
- *Overhead:* Use the
|
||||
:term:`IMAGE_OVERHEAD_FACTOR` variable
|
||||
to define the multiplier that the build system applies to the initial
|
||||
image size, which is 1.3 by default.
|
||||
|
||||
- *Additional Free Space:* Use the
|
||||
:term:`IMAGE_ROOTFS_EXTRA_SPACE`
|
||||
variable to add additional free space to the image. The build system
|
||||
adds this space to the image after it determines its
|
||||
:term:`IMAGE_ROOTFS_SIZE`.
|
||||
|
||||
Why aren't spaces in path names supported?
|
||||
------------------------------------------
|
||||
|
||||
The Yocto Project team has tried to do this before but too many
|
||||
of the tools the OpenEmbedded build system depends on, such as
|
||||
``autoconf``, break when they find spaces in pathnames. Until that
|
||||
situation changes, the team will not support spaces in pathnames.
|
||||
|
||||
I'm adding a binary in a recipe. Why is it different in the image?
|
||||
------------------------------------------------------------------
|
||||
|
||||
The first most obvious change is the system stripping debug symbols from
|
||||
it. Setting :term:`INHIBIT_PACKAGE_STRIP` to stop debug symbols being
|
||||
stripped and/or :term:`INHIBIT_PACKAGE_DEBUG_SPLIT` to stop debug symbols
|
||||
being split into a separate file will ensure the binary is unchanged.
|
||||
|
||||
Issues on the running system
|
||||
============================
|
||||
|
||||
How do I disable the cursor on my touchscreen device?
|
||||
-----------------------------------------------------
|
||||
|
||||
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::
|
||||
|
||||
HAVE_TOUCHSCREEN=1
|
||||
|
||||
How to always bring up connected network interfaces?
|
||||
----------------------------------------------------
|
||||
|
||||
The default interfaces file provided by the netbase recipe does
|
||||
not automatically bring up network interfaces. Therefore, you will need
|
||||
to add a BSP-specific netbase that includes an interfaces file. See the
|
||||
":ref:`bsp-guide/bsp:miscellaneous bsp-specific recipe files`" section in
|
||||
the Yocto Project Board Support Packages (BSP) Developer's Guide for
|
||||
information on creating these types of miscellaneous recipe files.
|
||||
|
||||
For example, add the following files to your layer::
|
||||
|
||||
meta-MACHINE/recipes-bsp/netbase/netbase/MACHINE/interfaces
|
||||
meta-MACHINE/recipes-bsp/netbase/netbase_5.0.bbappend
|
||||
474
sources/poky/documentation/ref-manual/features.rst
Normal file
474
sources/poky/documentation/ref-manual/features.rst
Normal file
@@ -0,0 +1,474 @@
|
||||
.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
|
||||
|
||||
********
|
||||
Features
|
||||
********
|
||||
|
||||
This chapter provides a reference of shipped machine and distro features
|
||||
you can include as part of your image, a reference on image features you
|
||||
can select, and a reference on :ref:`ref-features-backfill`.
|
||||
|
||||
Features provide a mechanism for working out which packages should be
|
||||
included in the generated images. Distributions can select which
|
||||
features they want to support through the :term:`DISTRO_FEATURES` variable,
|
||||
which is set or appended to in a distribution's configuration file such
|
||||
as ``poky.conf``, ``poky-tiny.conf``, ``poky-altcfg.conf`` and so forth.
|
||||
Machine features are set in the :term:`MACHINE_FEATURES` variable, which is
|
||||
set in the machine configuration file and specifies the hardware
|
||||
features for a given machine.
|
||||
|
||||
These two variables combine to work out which kernel modules, utilities,
|
||||
and other packages to include. A given distribution can support a
|
||||
selected subset of features so some machine features might not be
|
||||
included if the distribution itself does not support them.
|
||||
|
||||
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::
|
||||
|
||||
$ cd poky
|
||||
$ git grep 'contains.*MACHINE_FEATURES.*feature'
|
||||
|
||||
.. _ref-features-machine:
|
||||
|
||||
Machine Features
|
||||
================
|
||||
|
||||
The items below are features you can use with
|
||||
:term:`MACHINE_FEATURES`. Features do not have a
|
||||
one-to-one correspondence to packages, and they can go beyond simply
|
||||
controlling the installation of a package or packages. Sometimes a
|
||||
feature can influence how certain recipes are built. For example, a
|
||||
feature might determine whether a particular configure option is
|
||||
specified within the :ref:`ref-tasks-configure` task
|
||||
for a particular recipe.
|
||||
|
||||
This feature list only represents features as shipped with the Yocto
|
||||
Project metadata:
|
||||
|
||||
- *acpi:* Hardware has ACPI (x86/x86_64 only)
|
||||
|
||||
- *alsa:* Hardware has ALSA audio drivers
|
||||
|
||||
- *bluetooth:* Hardware has integrated BT
|
||||
|
||||
- *efi:* Support for booting through EFI
|
||||
|
||||
- *ext2:* Hardware HDD or Microdrive
|
||||
|
||||
- *keyboard:* Hardware has a keyboard
|
||||
|
||||
- *numa:* Hardware has non-uniform memory access
|
||||
|
||||
- *pcbios:* Support for booting through BIOS
|
||||
|
||||
- *pci:* Hardware has a PCI bus
|
||||
|
||||
- *pcmcia:* Hardware has PCMCIA or CompactFlash sockets
|
||||
|
||||
- *phone:* Mobile phone (voice) support
|
||||
|
||||
- *qemu-usermode:* QEMU can support user-mode emulation for this machine
|
||||
|
||||
- *qvga:* Machine has a QVGA (320x240) display
|
||||
|
||||
- *rtc:* Machine has a Real-Time Clock
|
||||
|
||||
- *screen:* Hardware has a screen
|
||||
|
||||
- *serial:* Hardware has serial support (usually RS232)
|
||||
|
||||
- *touchscreen:* Hardware has a touchscreen
|
||||
|
||||
- *usbgadget:* Hardware is USB gadget device capable
|
||||
|
||||
- *usbhost:* Hardware is USB Host capable
|
||||
|
||||
- *vfat:* FAT file system support
|
||||
|
||||
- *wifi:* Hardware has integrated WiFi
|
||||
|
||||
.. _ref-features-distro:
|
||||
|
||||
Distro Features
|
||||
===============
|
||||
|
||||
The items below are features you can use with
|
||||
:term:`DISTRO_FEATURES` to enable features across
|
||||
your distribution. Features do not have a one-to-one correspondence to
|
||||
packages, and they can go beyond simply controlling the installation of
|
||||
a package or packages. In most cases, the presence or absence of a
|
||||
feature translates to the appropriate option supplied to the configure
|
||||
script during the :ref:`ref-tasks-configure` task for
|
||||
the recipes that optionally support the feature. Appropriate options
|
||||
must be supplied, and enabling/disabling :term:`PACKAGECONFIG` for the
|
||||
concerned packages is one way of supplying such options.
|
||||
|
||||
Some distro features are also machine features. These select features
|
||||
make sense to be controlled both at the machine and distribution
|
||||
configuration level. See the
|
||||
:term:`COMBINED_FEATURES` variable for more
|
||||
information.
|
||||
|
||||
.. note::
|
||||
|
||||
:term:`DISTRO_FEATURES` is normally independent of kernel configuration,
|
||||
so if a feature specified in :term:`DISTRO_FEATURES` also relies on
|
||||
support in the kernel, you will also need to ensure that support is
|
||||
enabled in the kernel configuration.
|
||||
|
||||
This list only represents features as shipped with the Yocto Project
|
||||
metadata, as extra layers can define their own:
|
||||
|
||||
- *3g:* Include support for cellular data.
|
||||
|
||||
- *acl:* Include :wikipedia:`Access Control List <Access-control_list>` support.
|
||||
|
||||
- *alsa:* Include :wikipedia:`Advanced Linux Sound Architecture <Advanced_Linux_Sound_Architecture>`
|
||||
support (OSS compatibility kernel modules installed if available).
|
||||
|
||||
- *api-documentation:* Enables generation of API documentation during
|
||||
recipe builds. The resulting documentation is added to SDK tarballs
|
||||
when the ``bitbake -c populate_sdk`` command is used. See the
|
||||
":ref:`sdk-manual/appendix-customizing-standard:adding api documentation to the standard sdk`"
|
||||
section in the Yocto Project Application Development and the
|
||||
Extensible Software Development Kit (eSDK) manual.
|
||||
|
||||
- *bluetooth:* Include bluetooth support (integrated BT only).
|
||||
|
||||
- *cramfs:* Include CramFS support.
|
||||
|
||||
- *debuginfod:* Include support for getting ELF debugging information through
|
||||
a :ref:`debuginfod <dev-manual/debugging:using the debuginfod server method>`
|
||||
server.
|
||||
|
||||
- *directfb:* Include DirectFB support.
|
||||
|
||||
- *ext2:* Include tools for supporting devices with internal
|
||||
HDD/Microdrive for storing files (instead of Flash only devices).
|
||||
|
||||
- *gobject-introspection-data:* Include data to support
|
||||
`GObject Introspection <https://gi.readthedocs.io/en/latest/>`__.
|
||||
|
||||
- *ipsec:* Include IPSec support.
|
||||
|
||||
- *ipv4:* Include IPv4 support.
|
||||
|
||||
- *ipv6:* Include IPv6 support.
|
||||
|
||||
- *keyboard:* Include keyboard support (e.g. keymaps will be loaded
|
||||
during boot).
|
||||
|
||||
- *minidebuginfo:* Add minimal debug symbols :ref:`(minidebuginfo)<dev-manual/debugging:enabling minidebuginfo>`
|
||||
to binary files containing, allowing ``coredumpctl`` and ``gdb`` to show symbolicated stack traces.
|
||||
|
||||
- *multiarch:* Enable building applications with multiple architecture
|
||||
support.
|
||||
|
||||
- *ld-is-gold:* Use the :wikipedia:`gold <Gold_(linker)>`
|
||||
linker instead of the standard GCC linker (bfd).
|
||||
|
||||
- *ldconfig:* Include support for ldconfig and ``ld.so.conf`` on the
|
||||
target.
|
||||
|
||||
- *lto:* Enable `Link-Time Optimisation <https://gcc.gnu.org/wiki/LinkTimeOptimization>`__.
|
||||
|
||||
- *nfc:* Include support for
|
||||
`Near Field Communication <https://en.wikipedia.org/wiki/Near-field_communication>`__.
|
||||
|
||||
- *nfs:* Include NFS client support (for mounting NFS exports on
|
||||
device).
|
||||
|
||||
- *nls:* Include National Language Support (NLS).
|
||||
|
||||
- *opengl:* Include the Open Graphics Library, which is a
|
||||
cross-language, multi-platform application programming interface used
|
||||
for rendering two and three-dimensional graphics.
|
||||
|
||||
- *overlayfs:* Include `OverlayFS <https://docs.kernel.org/filesystems/overlayfs.html>`__
|
||||
support.
|
||||
|
||||
- *pam:* Include :wikipedia:`Pluggable Authentication Module (PAM) <Pluggable_authentication_module>`
|
||||
support.
|
||||
|
||||
- *pci:* Include PCI bus support.
|
||||
|
||||
- *pcmcia:* Include PCMCIA/CompactFlash support.
|
||||
|
||||
- *pni-names:* Enable generation of persistent network interface names, i.e.
|
||||
the system tries hard to have the same but unique names for the network
|
||||
interfaces even after a reinstall.
|
||||
|
||||
- *polkit:* Include :wikipedia:`Polkit <Polkit>` support.
|
||||
|
||||
- *ppp:* Include PPP dialup support.
|
||||
|
||||
- *ptest:* Enables building the package tests where supported by
|
||||
individual recipes. For more information on package tests, see the
|
||||
":ref:`test-manual/ptest:testing packages with ptest`" section
|
||||
in the Yocto Project Development Tasks Manual.
|
||||
|
||||
- *pulseaudio:* Include support for
|
||||
`PulseAudio <https://www.freedesktop.org/wiki/Software/PulseAudio/>`__.
|
||||
|
||||
- *selinux:* Include support for
|
||||
:wikipedia:`Security-Enhanced Linux (SELinux) <Security-Enhanced_Linux>`
|
||||
(requires `meta-selinux <https://layers.openembedded.org/layerindex/layer/meta-selinux/>`__).
|
||||
|
||||
- *seccomp:* Enables building applications with
|
||||
:wikipedia:`seccomp <Seccomp>` support, to
|
||||
allow them to strictly restrict the system calls that they are allowed
|
||||
to invoke.
|
||||
|
||||
- *smbfs:* Include SMB networks client support (for mounting
|
||||
Samba/Microsoft Windows shares on device).
|
||||
|
||||
- *systemd:* Include support for this ``init`` manager, which is a full
|
||||
replacement of for ``init`` with parallel starting of services,
|
||||
reduced shell overhead, and other features. This ``init`` manager is
|
||||
used by many distributions.
|
||||
|
||||
- *systemd-resolved:* Include support and use ``systemd-resolved`` as the
|
||||
main DNS name resolver in ``glibc`` Name Service Switch. This is a DNS
|
||||
resolver daemon from ``systemd``.
|
||||
|
||||
- *usbgadget:* Include USB Gadget Device support (for USB
|
||||
networking/serial/storage).
|
||||
|
||||
- *usbhost:* Include USB Host support (allows to connect external
|
||||
keyboard, mouse, storage, network etc).
|
||||
|
||||
- *usrmerge:* Merges the ``/bin``, ``/sbin``, ``/lib``, and ``/lib64``
|
||||
directories into their respective counterparts in the ``/usr``
|
||||
directory to provide better package and application compatibility.
|
||||
|
||||
- *vfat:* Include :wikipedia:`FAT filesystem <File_Allocation_Table>`
|
||||
support.
|
||||
|
||||
- *vulkan:* Include support for the :wikipedia:`Vulkan API <Vulkan>`.
|
||||
|
||||
- *wayland:* Include the Wayland display server protocol and the
|
||||
library that supports it.
|
||||
|
||||
- *wifi:* Include WiFi support (integrated only).
|
||||
|
||||
- *x11:* Include the X server and libraries.
|
||||
|
||||
- *xattr:* Include support for
|
||||
:wikipedia:`extended file attributes <Extended_file_attributes>`.
|
||||
|
||||
- *zeroconf:* Include support for
|
||||
`zero configuration networking <https://en.wikipedia.org/wiki/Zero-configuration_networking>`__.
|
||||
|
||||
.. _ref-features-image:
|
||||
|
||||
Image Features
|
||||
==============
|
||||
|
||||
The contents of images generated by the OpenEmbedded build system can be
|
||||
controlled by the :term:`IMAGE_FEATURES` and
|
||||
:term:`EXTRA_IMAGE_FEATURES` variables that
|
||||
you typically configure in your image recipes. Through these variables,
|
||||
you can add several different predefined packages such as development
|
||||
utilities or packages with debug information needed to investigate
|
||||
application problems or profile applications.
|
||||
|
||||
The image features available for all images are:
|
||||
|
||||
- *allow-empty-password:* Allows Dropbear and OpenSSH to accept
|
||||
logins from accounts having an empty password string.
|
||||
|
||||
- *allow-root-login:* Allows Dropbear and OpenSSH to accept root logins.
|
||||
|
||||
- *dbg-pkgs:* Installs debug symbol packages for all packages installed
|
||||
in a given image.
|
||||
|
||||
- *debug-tweaks:* Makes an image suitable for development (e.g. allows
|
||||
root logins, logins without passwords ---including root ones, and enables
|
||||
post-installation logging). See the ``allow-empty-password``,
|
||||
``allow-root-login``, ``empty-root-password``, and ``post-install-logging``
|
||||
features in this list for additional information.
|
||||
|
||||
- *dev-pkgs:* Installs development packages (headers and extra library
|
||||
links) for all packages installed in a given image.
|
||||
|
||||
- *doc-pkgs:* Installs documentation packages for all packages
|
||||
installed in a given image.
|
||||
|
||||
- *empty-root-password:* This feature or ``debug-tweaks`` is required if
|
||||
you want to allow root login with an empty password. If these features
|
||||
are not present in :term:`IMAGE_FEATURES`, a non-empty password is
|
||||
forced in ``/etc/passwd`` and ``/etc/shadow`` if such files exist.
|
||||
|
||||
.. note::
|
||||
``empty-root-password`` doesn't set an empty root password by itself.
|
||||
You get an initial empty root password thanks to the
|
||||
:oe_git:`base-passwd </openembedded-core/tree/meta/recipes-core/base-passwd/>`
|
||||
and :oe_git:`shadow </openembedded-core/tree/meta/recipes-extended/shadow/>`
|
||||
recipes, and the presence of ``empty-root-password`` or ``debug-tweaks``
|
||||
just disables the mechanism which forces an non-empty password for the
|
||||
root user.
|
||||
|
||||
- *lic-pkgs:* Installs license packages for all packages installed in a
|
||||
given image.
|
||||
|
||||
- *overlayfs-etc:* Configures the ``/etc`` directory to be in ``overlayfs``.
|
||||
This allows to store device specific information elsewhere, especially
|
||||
if the root filesystem is configured to be read-only.
|
||||
|
||||
- *package-management:* Installs package management tools and preserves
|
||||
the package manager database.
|
||||
|
||||
- *post-install-logging:* Enables logging postinstall script runs to
|
||||
the ``/var/log/postinstall.log`` file on first boot of the image on
|
||||
the target system.
|
||||
|
||||
.. note::
|
||||
|
||||
To make the ``/var/log`` directory on the target persistent, use the
|
||||
:term:`VOLATILE_LOG_DIR` variable by setting it to "no".
|
||||
|
||||
- *ptest-pkgs:* Installs ptest packages for all ptest-enabled recipes.
|
||||
|
||||
- *read-only-rootfs:* Creates an image whose root filesystem is
|
||||
read-only. See the
|
||||
":ref:`dev-manual/read-only-rootfs:creating a read-only root filesystem`"
|
||||
section in the Yocto Project Development Tasks Manual for more
|
||||
information.
|
||||
|
||||
- *read-only-rootfs-delayed-postinsts:* when specified in conjunction
|
||||
with ``read-only-rootfs``, specifies that post-install scripts are
|
||||
still permitted (this assumes that the root filesystem will be made
|
||||
writeable for the first boot; this feature does not do anything to
|
||||
ensure that - it just disables the check for post-install scripts.)
|
||||
|
||||
- *serial-autologin-root:* when specified in conjunction with
|
||||
``empty-root-password`` will automatically login as root on the
|
||||
serial console. This of course opens up a security hole if the
|
||||
serial console is potentially accessible to an attacker, so use
|
||||
with caution.
|
||||
|
||||
- *splash:* Enables showing a splash screen during boot. By default,
|
||||
this screen is provided by ``psplash``, which does allow
|
||||
customization. If you prefer to use an alternative splash screen
|
||||
package, you can do so by setting the :term:`SPLASH` variable to a
|
||||
different package name (or names) within the image recipe or at the
|
||||
distro configuration level.
|
||||
|
||||
- *stateless-rootfs:*: specifies that the image should be created as
|
||||
stateless - when using ``systemd``, ``systemctl-native`` will not
|
||||
be run on the image, leaving the image for population at runtime by
|
||||
systemd.
|
||||
|
||||
- *staticdev-pkgs:* Installs static development packages, which are
|
||||
static libraries (i.e. ``*.a`` files), for all packages installed in
|
||||
a given image.
|
||||
|
||||
Some image features are available only when you inherit the
|
||||
:ref:`ref-classes-core-image` class. The current list of
|
||||
these valid features is as follows:
|
||||
|
||||
- *hwcodecs:* Installs hardware acceleration codecs.
|
||||
|
||||
- *nfs-server:* Installs an NFS server.
|
||||
|
||||
- *perf:* Installs profiling tools such as ``perf``, ``systemtap``, and
|
||||
``LTTng``. For general information on user-space tools, see the
|
||||
:doc:`/sdk-manual/index` manual.
|
||||
|
||||
- *ssh-server-dropbear:* Installs the Dropbear minimal SSH server.
|
||||
|
||||
.. note::
|
||||
|
||||
As of the 4.1 release, the ``ssh-server-dropbear`` feature also
|
||||
recommends the ``openssh-sftp-server`` package, which by default
|
||||
will be pulled into the image. This is because recent versions of
|
||||
the OpenSSH ``scp`` client now use the SFTP protocol, and thus
|
||||
require an SFTP server to be present to connect to. However, if
|
||||
you wish to use the Dropbear ssh server `without` the SFTP server
|
||||
installed, you can either remove ``ssh-server-dropbear`` from
|
||||
``IMAGE_FEATURES`` and add ``dropbear`` to :term:`IMAGE_INSTALL`
|
||||
instead, or alternatively still use the feature but set
|
||||
:term:`BAD_RECOMMENDATIONS` as follows::
|
||||
|
||||
BAD_RECOMMENDATIONS += "openssh-sftp-server"
|
||||
|
||||
- *ssh-server-openssh:* Installs the OpenSSH SSH server, which is more
|
||||
full-featured than Dropbear. Note that if both the OpenSSH SSH server
|
||||
and the Dropbear minimal SSH server are present in
|
||||
:term:`IMAGE_FEATURES`, then OpenSSH will take precedence and Dropbear
|
||||
will not be installed.
|
||||
|
||||
- *tools-debug:* Installs debugging tools such as ``strace`` and
|
||||
``gdb``. For information on GDB, see the
|
||||
":ref:`dev-manual/debugging:debugging with the gnu project debugger (gdb) remotely`" section
|
||||
in the Yocto Project Development Tasks Manual. For information on
|
||||
tracing and profiling, see the :doc:`/profile-manual/index`.
|
||||
|
||||
- *tools-sdk:* Installs a full SDK that runs on the device.
|
||||
|
||||
- *tools-testapps:* Installs device testing tools (e.g. touchscreen
|
||||
debugging).
|
||||
|
||||
- *weston:* Installs Weston (reference Wayland environment).
|
||||
|
||||
- *x11:* Installs the X server.
|
||||
|
||||
- *x11-base:* Installs the X server with a minimal environment.
|
||||
|
||||
- *x11-sato:* Installs the OpenedHand Sato environment.
|
||||
|
||||
.. _ref-features-backfill:
|
||||
|
||||
Feature Backfilling
|
||||
===================
|
||||
|
||||
Sometimes it is necessary in the OpenEmbedded build system to
|
||||
add new functionality to :term:`MACHINE_FEATURES` or
|
||||
:term:`DISTRO_FEATURES`, but at the same time, allow existing
|
||||
distributions or machine definitions to opt out of such new
|
||||
features, to retain the same overall level of functionality.
|
||||
|
||||
To make this possible, the OpenEmbedded build system has a mechanism to
|
||||
automatically "backfill" features into existing distro or machine
|
||||
configurations. You can see the list of features for which this is done
|
||||
by checking the :term:`DISTRO_FEATURES_BACKFILL` and
|
||||
:term:`MACHINE_FEATURES_BACKFILL` variables in the
|
||||
``meta/conf/bitbake.conf`` file.
|
||||
|
||||
These two variables are paired with the
|
||||
:term:`DISTRO_FEATURES_BACKFILL_CONSIDERED`
|
||||
and :term:`MACHINE_FEATURES_BACKFILL_CONSIDERED` variables
|
||||
which allow distro or machine configuration maintainers to `consider` any
|
||||
added feature, and decide when they wish to keep or exclude such feature,
|
||||
thus preventing the backfilling from happening.
|
||||
|
||||
Here are two examples to illustrate feature backfilling:
|
||||
|
||||
- *The "pulseaudio" distro feature option*: Previously, PulseAudio support was
|
||||
enabled within the Qt and GStreamer frameworks. Because of this, the feature
|
||||
is now backfilled and thus enabled for all distros through the
|
||||
:term:`DISTRO_FEATURES_BACKFILL` variable in the ``meta/conf/bitbake.conf``
|
||||
file. However, if your distro needs to disable the feature, you can do so
|
||||
without affecting other existing distro configurations that need PulseAudio
|
||||
support. You do this by adding "pulseaudio" to
|
||||
:term:`DISTRO_FEATURES_BACKFILL_CONSIDERED` in your distro's ``.conf``
|
||||
file. So, adding the feature to this variable when it also exists in the
|
||||
:term:`DISTRO_FEATURES_BACKFILL` variable prevents the build system from
|
||||
adding the feature to your configuration's :term:`DISTRO_FEATURES`,
|
||||
effectively disabling the feature for that particular distro.
|
||||
|
||||
- *The "rtc" machine feature option*: Previously, real time clock (RTC)
|
||||
support was enabled for all target devices. Because of this, the
|
||||
feature is backfilled and thus enabled for all machines through the
|
||||
:term:`MACHINE_FEATURES_BACKFILL` variable in the ``meta/conf/bitbake.conf``
|
||||
file. However, if your target device does not have this capability, you can
|
||||
disable RTC support for your device without affecting other machines
|
||||
that need RTC support. You do this by adding the "rtc" feature to the
|
||||
:term:`MACHINE_FEATURES_BACKFILL_CONSIDERED` list in your machine's ``.conf``
|
||||
file. So, adding the feature to this variable when it also exists in the
|
||||
:term:`MACHINE_FEATURES_BACKFILL` variable prevents the build system from
|
||||
adding the feature to your configuration's :term:`MACHINE_FEATURES`,
|
||||
effectively disabling RTC support for that particular machine.
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
BIN
sources/poky/documentation/ref-manual/figures/define-generic.png
Normal file
BIN
sources/poky/documentation/ref-manual/figures/define-generic.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 623 B |
BIN
sources/poky/documentation/ref-manual/figures/poky-title.png
Normal file
BIN
sources/poky/documentation/ref-manual/figures/poky-title.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
114
sources/poky/documentation/ref-manual/images.rst
Normal file
114
sources/poky/documentation/ref-manual/images.rst
Normal file
@@ -0,0 +1,114 @@
|
||||
.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
|
||||
|
||||
******
|
||||
Images
|
||||
******
|
||||
|
||||
The OpenEmbedded build system provides several example images to satisfy
|
||||
different needs. When you issue the ``bitbake`` command you provide a
|
||||
"top-level" recipe that essentially begins the build for the type of
|
||||
image you want.
|
||||
|
||||
.. note::
|
||||
|
||||
Building an image without GNU General Public License Version 3
|
||||
(GPLv3), GNU Lesser General Public License Version 3 (LGPLv3), and
|
||||
the GNU Affero General Public License Version 3 (AGPL-3.0) components
|
||||
is only tested for core-image-minimal image. Furthermore, if you would like to
|
||||
build an image and verify that it does not include GPLv3 and similarly licensed
|
||||
components, you must make the following changes in the image recipe
|
||||
file before using the BitBake command to build the image:
|
||||
|
||||
INCOMPATIBLE_LICENSE = "GPL-3.0* LGPL-3.0*"
|
||||
|
||||
Alternatively, you can adjust ``local.conf`` file, repeating and adjusting the line
|
||||
for all images where the license restriction must apply:
|
||||
|
||||
INCOMPATIBLE_LICENSE:pn-your-image-name = "GPL-3.0* LGPL-3.0*"
|
||||
|
||||
From within the ``poky`` Git repository, you can use the following
|
||||
command to display the list of directories within the :term:`Source Directory`
|
||||
that contain image recipe files::
|
||||
|
||||
$ ls meta*/recipes*/images/*.bb
|
||||
|
||||
Here is a list of supported recipes:
|
||||
|
||||
- ``build-appliance-image``: An example virtual machine that contains
|
||||
all the pieces required to run builds using the build system as well
|
||||
as the build system itself. You can boot and run the image using
|
||||
either the `VMware
|
||||
Player <https://www.vmware.com/products/player/overview.html>`__ or
|
||||
`VMware
|
||||
Workstation <https://www.vmware.com/products/workstation/overview.html>`__.
|
||||
For more information on this image, see the :yocto_home:`Build
|
||||
Appliance </software-item/build-appliance>` page
|
||||
on the Yocto Project website.
|
||||
|
||||
- ``core-image-base``: A console-only image that fully supports the
|
||||
target device hardware.
|
||||
|
||||
- ``core-image-full-cmdline``: A console-only image with more
|
||||
full-featured Linux system functionality installed.
|
||||
|
||||
- ``core-image-minimal``: A small image just capable of allowing a
|
||||
device to boot.
|
||||
|
||||
- ``core-image-minimal-dev``: A ``core-image-minimal`` image suitable
|
||||
for development work using the host. The image includes headers and
|
||||
libraries you can use in a host development environment.
|
||||
|
||||
- ``core-image-minimal-initramfs``: A ``core-image-minimal`` image that
|
||||
has the Minimal RAM-based Initial Root Filesystem (:term:`Initramfs`) as part
|
||||
of the kernel, which allows the system to find the first "init"
|
||||
program more efficiently. See the
|
||||
:term:`PACKAGE_INSTALL` variable for
|
||||
additional information helpful when working with :term:`Initramfs` images.
|
||||
|
||||
- ``core-image-minimal-mtdutils``: A ``core-image-minimal`` image that
|
||||
has support for the Minimal MTD Utilities, which let the user
|
||||
interact with the MTD subsystem in the kernel to perform operations
|
||||
on flash devices.
|
||||
|
||||
- ``core-image-rt``: A ``core-image-minimal`` image plus a real-time
|
||||
test suite and tools appropriate for real-time use.
|
||||
|
||||
- ``core-image-rt-sdk``: A ``core-image-rt`` image that includes
|
||||
everything in the cross-toolchain. The image also includes
|
||||
development headers and libraries to form a complete stand-alone SDK
|
||||
and is suitable for development using the target.
|
||||
|
||||
- ``core-image-sato``: An image with Sato support, a mobile environment
|
||||
and visual style that works well with mobile devices. The image
|
||||
supports X11 with a Sato theme and applications such as a terminal,
|
||||
editor, file manager, media player, and so forth.
|
||||
|
||||
- ``core-image-sato-dev``: A ``core-image-sato`` image suitable for
|
||||
development using the host. The image includes libraries needed to
|
||||
build applications on the device itself, testing and profiling tools,
|
||||
and debug symbols. This image was formerly ``core-image-sdk``.
|
||||
|
||||
- ``core-image-sato-sdk``: A ``core-image-sato`` image that includes
|
||||
everything in the cross-toolchain. The image also includes
|
||||
development headers and libraries to form a complete standalone SDK
|
||||
and is suitable for development using the target.
|
||||
|
||||
- ``core-image-testmaster``: A "controller" image designed to be used for
|
||||
automated runtime testing. Provides a "known good" image that is
|
||||
deployed to a separate partition so that you can boot into it and use
|
||||
it to deploy a second image to be tested. You can find more
|
||||
information about runtime testing in the
|
||||
":ref:`test-manual/runtime-testing:performing automated runtime testing`"
|
||||
section in the Yocto Project Test Environment Manual.
|
||||
|
||||
- ``core-image-testmaster-initramfs``: A RAM-based Initial Root
|
||||
Filesystem (:term:`Initramfs`) image tailored for use with the
|
||||
``core-image-testmaster`` image.
|
||||
|
||||
- ``core-image-weston``: A very basic Wayland image with a terminal.
|
||||
This image provides the Wayland protocol libraries and the reference
|
||||
Weston compositor. For more information, see the
|
||||
":ref:`dev-manual/wayland:using wayland and weston`"
|
||||
section in the Yocto Project Development Tasks Manual.
|
||||
|
||||
- ``core-image-x11``: A very basic X11 image with a terminal.
|
||||
29
sources/poky/documentation/ref-manual/index.rst
Normal file
29
sources/poky/documentation/ref-manual/index.rst
Normal file
@@ -0,0 +1,29 @@
|
||||
.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
|
||||
|
||||
==============================
|
||||
Yocto Project Reference Manual
|
||||
==============================
|
||||
|
||||
|
|
||||
|
||||
.. toctree::
|
||||
:caption: Table of Contents
|
||||
:numbered:
|
||||
|
||||
system-requirements
|
||||
terms
|
||||
release-process
|
||||
structure
|
||||
classes
|
||||
tasks
|
||||
devtool-reference
|
||||
kickstart
|
||||
qa-checks
|
||||
images
|
||||
features
|
||||
variables
|
||||
varlocality
|
||||
faq
|
||||
resources
|
||||
|
||||
.. include:: /boilerplate.rst
|
||||
234
sources/poky/documentation/ref-manual/kickstart.rst
Normal file
234
sources/poky/documentation/ref-manual/kickstart.rst
Normal file
@@ -0,0 +1,234 @@
|
||||
.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
|
||||
|
||||
*******************************************
|
||||
OpenEmbedded Kickstart (``.wks``) Reference
|
||||
*******************************************
|
||||
|
||||
.. _openembedded-kickstart-wks-reference:
|
||||
|
||||
Introduction
|
||||
============
|
||||
|
||||
The current Wic implementation supports only the basic kickstart
|
||||
partitioning commands: ``partition`` (or ``part`` for short) and
|
||||
``bootloader``.
|
||||
|
||||
.. note::
|
||||
|
||||
Future updates will implement more commands and options. If you use
|
||||
anything that is not specifically supported, results can be
|
||||
unpredictable.
|
||||
|
||||
This chapter provides a reference on the available kickstart commands.
|
||||
The information lists the commands, their syntax, and meanings.
|
||||
Kickstart commands are based on the Fedora kickstart versions but with
|
||||
modifications to reflect Wic capabilities. You can see the original
|
||||
documentation for those commands at the following link:
|
||||
https://pykickstart.readthedocs.io/en/latest/kickstart-docs.html
|
||||
|
||||
Command: part or partition
|
||||
==========================
|
||||
|
||||
Either of these commands creates a partition on the system and uses the
|
||||
following syntax::
|
||||
|
||||
part [mntpoint]
|
||||
partition [mntpoint]
|
||||
|
||||
If you do not
|
||||
provide mntpoint, Wic creates a partition but does not mount it.
|
||||
|
||||
The ``mntpoint`` is where the partition is mounted and must be in one of
|
||||
the following forms:
|
||||
|
||||
- ``/path``: For example, "/", "/usr", or "/home"
|
||||
|
||||
- ``swap``: The created partition is used as swap space
|
||||
|
||||
Specifying a mntpoint causes the partition to automatically be mounted.
|
||||
Wic achieves this by adding entries to the filesystem table (fstab)
|
||||
during image generation. In order for Wic to generate a valid fstab, you
|
||||
must also provide one of the ``--ondrive``, ``--ondisk``, or
|
||||
``--use-uuid`` partition options as part of the command.
|
||||
|
||||
.. note::
|
||||
|
||||
The mount program must understand the PARTUUID syntax you use with
|
||||
``--use-uuid`` and non-root *mountpoint*, including swap. The default
|
||||
configuration of BusyBox in OpenEmbedded supports this, but this may
|
||||
be disabled in custom configurations.
|
||||
|
||||
Here is an example that uses "/" as the mountpoint. The command uses
|
||||
``--ondisk`` to force the partition onto the ``sdb`` disk::
|
||||
|
||||
part / --source rootfs --ondisk sdb --fstype=ext3 --label platform --align 1024
|
||||
|
||||
Here is a list that describes other supported options you can use with
|
||||
the ``part`` and ``partition`` commands:
|
||||
|
||||
- ``--size``: The minimum partition size. Specify as an integer value
|
||||
optionally followed by one of the units "k" / "K" for kibibyte,
|
||||
"M" for mebibyte and "G" for gibibyte. The default unit if none is
|
||||
given is "M". You do not need this option if you use ``--source``.
|
||||
|
||||
- ``--fixed-size``: The exact partition size. Specify as an integer
|
||||
value optionally followed by one of the units "k" / "K" for kibibyte,
|
||||
"M" for mebibyte and "G" for gibibyte. The default unit if none is
|
||||
given is "M". Cannot be specify together with ``--size``. An error
|
||||
occurs when assembling the disk image if the partition data is larger
|
||||
than ``--fixed-size``.
|
||||
|
||||
- ``--source``: This option is a Wic-specific option that names the
|
||||
source of the data that populates the partition. The most common
|
||||
value for this option is "rootfs", but you can use any value that
|
||||
maps to a valid source plugin. For information on the source plugins,
|
||||
see the ":ref:`dev-manual/wic:using the wic plugin interface`"
|
||||
section in the Yocto Project Development Tasks Manual.
|
||||
|
||||
If you use ``--source rootfs``, Wic creates a partition as large as
|
||||
needed and fills it with the contents of the root filesystem pointed
|
||||
to by the ``-r`` command-line option or the equivalent root filesystem derived
|
||||
from the ``-e`` command-line option. The filesystem type used to
|
||||
create the partition is driven by the value of the ``--fstype``
|
||||
option specified for the partition. See the entry on ``--fstype``
|
||||
that follows for more information.
|
||||
|
||||
If you use ``--source plugin-name``, Wic creates a partition as large
|
||||
as needed and fills it with the contents of the partition that is
|
||||
generated by the specified plugin name using the data pointed to by
|
||||
the ``-r`` command-line option or the equivalent root filesystem derived from
|
||||
the ``-e`` command-line option. Exactly what those contents are and
|
||||
filesystem type used are dependent on the given plugin
|
||||
implementation.
|
||||
|
||||
If you do not use the ``--source`` option, the ``wic`` command
|
||||
creates an empty partition. Consequently, you must use the ``--size``
|
||||
option to specify the size of the empty partition.
|
||||
|
||||
- ``--ondisk`` or ``--ondrive``: Forces the partition to be created
|
||||
on a particular disk.
|
||||
|
||||
- ``--fstype``: Sets the file system type for the partition. Valid
|
||||
values are:
|
||||
|
||||
- ``btrfs``
|
||||
|
||||
- ``erofs``
|
||||
|
||||
- ``ext2``
|
||||
|
||||
- ``ext3``
|
||||
|
||||
- ``ext4``
|
||||
|
||||
- ``squashfs``
|
||||
|
||||
- ``swap``
|
||||
|
||||
- ``vfat``
|
||||
|
||||
- ``--fsoptions``: Specifies a free-form string of options to be used
|
||||
when mounting the filesystem. This string is copied into the
|
||||
``/etc/fstab`` file of the installed system and should be enclosed in
|
||||
quotes. If not specified, the default string is "defaults".
|
||||
|
||||
- ``--label label``: Specifies the label to give to the filesystem to
|
||||
be made on the partition. If the given label is already in use by
|
||||
another filesystem, a new label is created for the partition.
|
||||
|
||||
- ``--active``: Marks the partition as active.
|
||||
|
||||
- ``--align (in KBytes)``: This option is a Wic-specific option that
|
||||
says to start partitions on boundaries given x KBytes.
|
||||
|
||||
- ``--offset``: This option is a Wic-specific option that
|
||||
says to place a partition at exactly the specified offset. If the
|
||||
partition cannot be placed at the specified offset, the image build
|
||||
will fail. Specify as an integer value optionally followed by one of
|
||||
the units "s" / "S" for 512 byte sector, "k" / "K" for kibibyte, "M"
|
||||
for mebibyte and "G" for gibibyte. The default unit if none is given
|
||||
is "k".
|
||||
|
||||
- ``--no-table``: This option is a Wic-specific option. Using the
|
||||
option reserves space for the partition and causes it to become
|
||||
populated. However, the partition is not added to the partition
|
||||
table.
|
||||
|
||||
- ``--exclude-path``: This option is a Wic-specific option that
|
||||
excludes the given relative path from the resulting image. This
|
||||
option is only effective with the rootfs source plugin.
|
||||
|
||||
- ``--extra-space``: This option is a Wic-specific option that adds
|
||||
extra space after the space filled by the content of the partition.
|
||||
The final size can exceed the size specified by the ``--size``
|
||||
option. The default value is 10M. Specify as an integer value
|
||||
optionally followed by one of the units "k" / "K" for kibibyte, "M"
|
||||
for mebibyte and "G" for gibibyte. The default unit if none is given
|
||||
is "M".
|
||||
|
||||
- ``--overhead-factor``: This option is a Wic-specific option that
|
||||
multiplies the size of the partition by the option's value. You must
|
||||
supply a value greater than or equal to "1". The default value is
|
||||
"1.3".
|
||||
|
||||
- ``--part-name``: This option is a Wic-specific option that
|
||||
specifies a name for GPT partitions.
|
||||
|
||||
- ``--part-type``: This option is a Wic-specific option that
|
||||
specifies the partition type globally unique identifier (GUID) for
|
||||
GPT partitions. You can find the list of partition type GUIDs at
|
||||
:wikipedia:`GUID_Partition_Table#Partition_type_GUIDs`.
|
||||
|
||||
- ``--use-uuid``: This option is a Wic-specific option that causes
|
||||
Wic to generate a random GUID for the partition. The generated
|
||||
identifier is used in the bootloader configuration to specify the
|
||||
root partition.
|
||||
|
||||
- ``--uuid``: This option is a Wic-specific option that specifies the
|
||||
partition UUID.
|
||||
|
||||
- ``--fsuuid``: This option is a Wic-specific option that specifies
|
||||
the filesystem UUID. You can generate or modify
|
||||
:term:`WKS_FILE` with this option if a preconfigured
|
||||
filesystem UUID is added to the kernel command line in the bootloader
|
||||
configuration before you run Wic.
|
||||
|
||||
- ``--system-id``: This option is a Wic-specific option that
|
||||
specifies the partition system ID, which is a one byte long,
|
||||
hexadecimal parameter with or without the 0x prefix.
|
||||
|
||||
- ``--mkfs-extraopts``: This option specifies additional options to
|
||||
pass to the ``mkfs`` utility. Some default options for certain
|
||||
filesystems do not take effect. See Wic's help on kickstart (i.e.
|
||||
``wic help kickstart``).
|
||||
|
||||
Command: bootloader
|
||||
===================
|
||||
|
||||
This command specifies how the bootloader should be configured and
|
||||
supports the following options:
|
||||
|
||||
.. note::
|
||||
|
||||
Bootloader functionality and boot partitions are implemented by the
|
||||
various source plugins that implement bootloader functionality. The bootloader
|
||||
command essentially provides a means of modifying bootloader
|
||||
configuration.
|
||||
|
||||
- ``--append``: Specifies kernel parameters. These parameters will be
|
||||
added to the syslinux :term:`APPEND` or ``grub`` kernel command line.
|
||||
|
||||
- ``--configfile``: Specifies a user-defined configuration file for
|
||||
the bootloader. You can provide a full pathname for the file or a
|
||||
file located in the ``canned-wks`` folder. This option overrides
|
||||
all other bootloader options.
|
||||
|
||||
- ``--ptable``: Specifies the partition table format. Valid values are:
|
||||
|
||||
- ``msdos``
|
||||
|
||||
- ``gpt``
|
||||
|
||||
- ``--timeout``: Specifies the number of seconds before the
|
||||
bootloader times out and boots the default option.
|
||||
|
||||
823
sources/poky/documentation/ref-manual/qa-checks.rst
Normal file
823
sources/poky/documentation/ref-manual/qa-checks.rst
Normal file
@@ -0,0 +1,823 @@
|
||||
.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
|
||||
|
||||
*****************************
|
||||
QA Error and Warning Messages
|
||||
*****************************
|
||||
|
||||
.. _qa-introduction:
|
||||
|
||||
Introduction
|
||||
============
|
||||
|
||||
When building a recipe, the OpenEmbedded build system performs various
|
||||
QA checks on the output to ensure that common issues are detected and
|
||||
reported. Sometimes when you create a new recipe to build new software,
|
||||
it will build with no problems. When this is not the case, or when you
|
||||
have QA issues building any software, it could take a little time to
|
||||
resolve them.
|
||||
|
||||
While it is tempting to ignore a QA message or even to disable QA
|
||||
checks, it is best to try and resolve any reported QA issues. This
|
||||
chapter provides a list of the QA messages and brief explanations of the
|
||||
issues you could encounter so that you can properly resolve problems.
|
||||
|
||||
The next section provides a list of all QA error and warning messages
|
||||
based on a default configuration. Each entry provides the message or
|
||||
error form along with an explanation.
|
||||
|
||||
.. note::
|
||||
|
||||
- At the end of each message, the name of the associated QA test (as
|
||||
listed in the ":ref:`ref-classes-insane`"
|
||||
section) appears within square brackets.
|
||||
|
||||
- As mentioned, this list of error and warning messages is for QA
|
||||
checks only. The list does not cover all possible build errors or
|
||||
warnings you could encounter.
|
||||
|
||||
- Because some QA checks are disabled by default, this list does not
|
||||
include all possible QA check errors and warnings.
|
||||
|
||||
.. _qa-errors-and-warnings:
|
||||
|
||||
Errors and Warnings
|
||||
===================
|
||||
|
||||
.. _qa-check-libexec:
|
||||
|
||||
- ``<packagename>: <path> is using libexec please relocate to <libexecdir> [libexec]``
|
||||
|
||||
The specified package contains files in ``/usr/libexec`` when the
|
||||
distro configuration uses a different path for ``<libexecdir>`` By
|
||||
default, ``<libexecdir>`` is ``$prefix/libexec``. However, this
|
||||
default can be changed (e.g. ``${libdir}``).
|
||||
|
||||
|
||||
.. _qa-check-rpaths:
|
||||
|
||||
- ``package <packagename> contains bad RPATH <rpath> in file <file> [rpaths]``
|
||||
|
||||
The specified binary produced by the recipe contains dynamic library
|
||||
load paths (rpaths) that contain build system paths such as
|
||||
:term:`TMPDIR`, which are incorrect for the target and
|
||||
could potentially be a security issue. Check for bad ``-rpath``
|
||||
options being passed to the linker in your
|
||||
:ref:`ref-tasks-compile` log. Depending on the build
|
||||
system used by the software being built, there might be a configure
|
||||
option to disable rpath usage completely within the build of the
|
||||
software.
|
||||
|
||||
|
||||
.. _qa-check-useless-rpaths:
|
||||
|
||||
- ``<packagename>: <file> contains probably-redundant RPATH <rpath> [useless-rpaths]``
|
||||
|
||||
The specified binary produced by the recipe contains dynamic library
|
||||
load paths (rpaths) that on a standard system are searched by default
|
||||
by the linker (e.g. ``/lib`` and ``/usr/lib``). While these paths
|
||||
will not cause any breakage, they do waste space and are unnecessary.
|
||||
Depending on the build system used by the software being built, there
|
||||
might be a configure option to disable rpath usage completely within
|
||||
the build of the software.
|
||||
|
||||
|
||||
.. _qa-check-file-rdeps:
|
||||
|
||||
- ``<packagename> requires <files>, but no providers in its RDEPENDS [file-rdeps]``
|
||||
|
||||
A file-level dependency has been identified from the specified
|
||||
package on the specified files, but there is no explicit
|
||||
corresponding entry in :term:`RDEPENDS`. If
|
||||
particular files are required at runtime then :term:`RDEPENDS` should be
|
||||
declared in the recipe to ensure the packages providing them are
|
||||
built.
|
||||
|
||||
|
||||
.. _qa-check-build-deps:
|
||||
|
||||
- ``<packagename1> rdepends on <packagename2>, but it isn't a build dependency? [build-deps]``
|
||||
|
||||
There is a runtime dependency between the two specified packages, but
|
||||
there is nothing explicit within the recipe to enable the
|
||||
OpenEmbedded build system to ensure that dependency is satisfied.
|
||||
This condition is usually triggered by an
|
||||
:term:`RDEPENDS` value being added at the packaging
|
||||
stage rather than up front, which is usually automatic based on the
|
||||
contents of the package. In most cases, you should change the recipe
|
||||
to add an explicit :term:`RDEPENDS` for the dependency.
|
||||
|
||||
|
||||
.. _qa-check-dev-so:
|
||||
|
||||
- ``non -dev/-dbg/nativesdk- package contains symlink .so: <packagename> path '<path>' [dev-so]``
|
||||
|
||||
Symlink ``.so`` files are for development only, and should therefore
|
||||
go into the ``-dev`` package. This situation might occur if you add
|
||||
``*.so*`` rather than ``*.so.*`` to a non-dev package. Change
|
||||
:term:`FILES` (and possibly
|
||||
:term:`PACKAGES`) such that the specified ``.so``
|
||||
file goes into an appropriate ``-dev`` package.
|
||||
|
||||
|
||||
.. _qa-check-staticdev:
|
||||
|
||||
- ``non -staticdev package contains static .a library: <packagename> path '<path>' [staticdev]``
|
||||
|
||||
Static ``.a`` library files should go into a ``-staticdev`` package.
|
||||
Change :term:`FILES` (and possibly
|
||||
:term:`PACKAGES`) such that the specified ``.a`` file
|
||||
goes into an appropriate ``-staticdev`` package.
|
||||
|
||||
|
||||
.. _qa-check-libdir:
|
||||
|
||||
- ``<packagename>: found library in wrong location [libdir]``
|
||||
|
||||
The specified file may have been installed into an incorrect
|
||||
(possibly hardcoded) installation path. For example, this test will
|
||||
catch recipes that install ``/lib/bar.so`` when ``${base_libdir}`` is
|
||||
"lib32". Another example is when recipes install
|
||||
``/usr/lib64/foo.so`` when ``${libdir}`` is "/usr/lib". False
|
||||
positives occasionally exist. For these cases add "libdir" to
|
||||
:term:`INSANE_SKIP` for the package.
|
||||
|
||||
|
||||
.. _qa-check-debug-files:
|
||||
|
||||
- ``non debug package contains .debug directory: <packagename> path <path> [debug-files]``
|
||||
|
||||
The specified package contains a ``.debug`` directory, which should
|
||||
not appear in anything but the ``-dbg`` package. This situation might
|
||||
occur if you add a path which contains a ``.debug`` directory and do
|
||||
not explicitly add the ``.debug`` directory to the ``-dbg`` package.
|
||||
If this is the case, add the ``.debug`` directory explicitly to
|
||||
``FILES:${PN}-dbg``. See :term:`FILES` for additional
|
||||
information on :term:`FILES`.
|
||||
|
||||
.. _qa-check-empty-dirs:
|
||||
|
||||
- ``<packagename> installs files in <path>, but it is expected to be empty [empty-dirs]``
|
||||
|
||||
The specified package is installing files into a directory that is
|
||||
normally expected to be empty (such as ``/tmp``). These files may
|
||||
be more appropriately installed to a different location, or
|
||||
perhaps alternatively not installed at all, usually by updating the
|
||||
:ref:`ref-tasks-install` task/function.
|
||||
|
||||
.. _qa-check-arch:
|
||||
|
||||
- ``Architecture did not match (<file_arch>, expected <machine_arch>) in <file> [arch]``
|
||||
|
||||
By default, the OpenEmbedded build system checks the Executable and
|
||||
Linkable Format (ELF) type, bit size, and endianness of any binaries
|
||||
to ensure they match the target architecture. This test fails if any
|
||||
binaries do not match the type since there would be an
|
||||
incompatibility. The test could indicate that the wrong compiler or
|
||||
compiler options have been used. Sometimes software, like
|
||||
bootloaders, might need to bypass this check. If the file you receive
|
||||
the error for is firmware that is not intended to be executed within
|
||||
the target operating system or is intended to run on a separate
|
||||
processor within the device, you can add "arch" to
|
||||
:term:`INSANE_SKIP` for the package. Another
|
||||
option is to check the :ref:`ref-tasks-compile` log
|
||||
and verify that the compiler options being used are correct.
|
||||
|
||||
|
||||
|
||||
- ``Bit size did not match (<file_bits>, expected <machine_bits>) in <file> [arch]``
|
||||
|
||||
By default, the OpenEmbedded build system checks the Executable and
|
||||
Linkable Format (ELF) type, bit size, and endianness of any binaries
|
||||
to ensure they match the target architecture. This test fails if any
|
||||
binaries do not match the type since there would be an
|
||||
incompatibility. The test could indicate that the wrong compiler or
|
||||
compiler options have been used. Sometimes software, like
|
||||
bootloaders, might need to bypass this check. If the file you receive
|
||||
the error for is firmware that is not intended to be executed within
|
||||
the target operating system or is intended to run on a separate
|
||||
processor within the device, you can add "arch" to
|
||||
:term:`INSANE_SKIP` for the package. Another
|
||||
option is to check the :ref:`ref-tasks-compile` log
|
||||
and verify that the compiler options being used are correct.
|
||||
|
||||
|
||||
|
||||
- ``Endianness did not match (<file_endianness>, expected <machine_endianness>) in <file> [arch]``
|
||||
|
||||
By default, the OpenEmbedded build system checks the Executable and
|
||||
Linkable Format (ELF) type, bit size, and endianness of any binaries
|
||||
to ensure they match the target architecture. This test fails if any
|
||||
binaries do not match the type since there would be an
|
||||
incompatibility. The test could indicate that the wrong compiler or
|
||||
compiler options have been used. Sometimes software, like
|
||||
bootloaders, might need to bypass this check. If the file you receive
|
||||
the error for is firmware that is not intended to be executed within
|
||||
the target operating system or is intended to run on a separate
|
||||
processor within the device, you can add "arch" to
|
||||
:term:`INSANE_SKIP` for the package. Another
|
||||
option is to check the :ref:`ref-tasks-compile` log
|
||||
and verify that the compiler options being used are correct.
|
||||
|
||||
|
||||
.. _qa-check-textrel:
|
||||
|
||||
- ``ELF binary '<file>' has relocations in .text [textrel]``
|
||||
|
||||
The specified ELF binary contains relocations in its ``.text``
|
||||
sections. This situation can result in a performance impact at
|
||||
runtime.
|
||||
|
||||
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::
|
||||
|
||||
CFLAGS:append = " -fPIC "
|
||||
|
||||
For more information on text relocations at runtime, see
|
||||
https://www.akkadia.org/drepper/textrelocs.html.
|
||||
|
||||
|
||||
.. _qa-check-ldflags:
|
||||
|
||||
- ``File '<file>' in package '<package>' doesn't have GNU_HASH (didn't pass LDFLAGS?) [ldflags]``
|
||||
|
||||
This indicates that binaries produced when building the recipe have
|
||||
not been linked with the :term:`LDFLAGS` options
|
||||
provided by the build system. Check to be sure that the :term:`LDFLAGS`
|
||||
variable is being passed to the linker command. A common workaround
|
||||
for this situation is to pass in :term:`LDFLAGS` using
|
||||
:term:`TARGET_CC_ARCH` within the recipe as
|
||||
follows::
|
||||
|
||||
TARGET_CC_ARCH += "${LDFLAGS}"
|
||||
|
||||
|
||||
.. _qa-check-xorg-driver-abi:
|
||||
|
||||
- ``Package <packagename> contains Xorg driver (<driver>) but no xorg-abi- dependencies [xorg-driver-abi]``
|
||||
|
||||
The specified package contains an Xorg driver, but does not have a
|
||||
corresponding ABI package dependency. The xserver-xorg recipe
|
||||
provides driver ABI names. All drivers should depend on the ABI
|
||||
versions that they have been built against. Driver recipes that
|
||||
include ``xorg-driver-input.inc`` or ``xorg-driver-video.inc`` will
|
||||
automatically get these versions. Consequently, you should only need
|
||||
to explicitly add dependencies to binary driver recipes.
|
||||
|
||||
|
||||
.. _qa-check-infodir:
|
||||
|
||||
- ``The /usr/share/info/dir file is not meant to be shipped in a particular package. [infodir]``
|
||||
|
||||
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::
|
||||
|
||||
rm ${D}${infodir}/dir
|
||||
|
||||
|
||||
.. _qa-check-symlink-to-sysroot:
|
||||
|
||||
- ``Symlink <path> in <packagename> points to TMPDIR [symlink-to-sysroot]``
|
||||
|
||||
The specified symlink points into :term:`TMPDIR` on the
|
||||
host. Such symlinks will work on the host. However, they are clearly
|
||||
invalid when running on the target. You should either correct the
|
||||
symlink to use a relative path or remove the symlink.
|
||||
|
||||
|
||||
.. _qa-check-la:
|
||||
|
||||
- ``<file> failed sanity test (workdir) in path <path> [la]``
|
||||
|
||||
The specified ``.la`` file contains :term:`TMPDIR`
|
||||
paths. Any ``.la`` file containing these paths is incorrect since
|
||||
``libtool`` adds the correct sysroot prefix when using the files
|
||||
automatically itself.
|
||||
|
||||
|
||||
.. _qa-check-pkgconfig:
|
||||
|
||||
- ``<file> failed sanity test (tmpdir) in path <path> [pkgconfig]``
|
||||
|
||||
The specified ``.pc`` file contains
|
||||
:term:`TMPDIR`\ ``/``\ :term:`WORKDIR`
|
||||
paths. Any ``.pc`` file containing these paths is incorrect since
|
||||
``pkg-config`` itself adds the correct sysroot prefix when the files
|
||||
are accessed.
|
||||
|
||||
|
||||
.. _qa-check-debug-deps:
|
||||
|
||||
- ``<packagename> rdepends on <debug_packagename> [debug-deps]``
|
||||
|
||||
There is a dependency between the specified non-dbg package (i.e. a
|
||||
package whose name does not end in ``-dbg``) and a package that is a
|
||||
``dbg`` package. The ``dbg`` packages contain debug symbols and are
|
||||
brought in using several different methods:
|
||||
|
||||
- Using the ``dbg-pkgs``
|
||||
:term:`IMAGE_FEATURES` value.
|
||||
|
||||
- Using :term:`IMAGE_INSTALL`.
|
||||
|
||||
- As a dependency of another ``dbg`` package that was brought in
|
||||
using one of the above methods.
|
||||
|
||||
The dependency might have been automatically added because the
|
||||
``dbg`` package erroneously contains files that it should not contain
|
||||
(e.g. a non-symlink ``.so`` file) or it might have been added
|
||||
manually (e.g. by adding to :term:`RDEPENDS`).
|
||||
|
||||
|
||||
.. _qa-check-dev-deps:
|
||||
|
||||
- ``<packagename> rdepends on <dev_packagename> [dev-deps]``
|
||||
|
||||
There is a dependency between the specified non-dev package (a package
|
||||
whose name does not end in ``-dev``) and a package that is a ``dev``
|
||||
package. The ``dev`` packages contain development headers and are
|
||||
usually brought in using several different methods:
|
||||
|
||||
- Using the ``dev-pkgs``
|
||||
:term:`IMAGE_FEATURES` value.
|
||||
|
||||
- Using :term:`IMAGE_INSTALL`.
|
||||
|
||||
- As a dependency of another ``dev`` package that was brought in
|
||||
using one of the above methods.
|
||||
|
||||
The dependency might have been automatically added (because the
|
||||
``dev`` package erroneously contains files that it should not have
|
||||
(e.g. a non-symlink ``.so`` file) or it might have been added
|
||||
manually (e.g. by adding to :term:`RDEPENDS`).
|
||||
|
||||
|
||||
.. _qa-check-dep-cmp:
|
||||
|
||||
- ``<var>:<packagename> is invalid: <comparison> (<value>) only comparisons <, =, >, <=, and >= are allowed [dep-cmp]``
|
||||
|
||||
If you are adding a versioned dependency relationship to one of the
|
||||
dependency variables (:term:`RDEPENDS`,
|
||||
:term:`RRECOMMENDS`,
|
||||
:term:`RSUGGESTS`,
|
||||
:term:`RPROVIDES`,
|
||||
:term:`RREPLACES`, or
|
||||
:term:`RCONFLICTS`), you must only use the named
|
||||
comparison operators. Change the versioned dependency values you are
|
||||
adding to match those listed in the message.
|
||||
|
||||
|
||||
.. _qa-check-compile-host-path:
|
||||
|
||||
- ``<recipename>: The compile log indicates that host include and/or library paths were used. Please check the log '<logfile>' for more information. [compile-host-path]``
|
||||
|
||||
The log for the :ref:`ref-tasks-compile` task
|
||||
indicates that paths on the host were searched for files, which is
|
||||
not appropriate when cross-compiling. Look for "is unsafe for
|
||||
cross-compilation" or "CROSS COMPILE Badness" in the specified log
|
||||
file.
|
||||
|
||||
|
||||
.. _qa-check-install-host-path:
|
||||
|
||||
- ``<recipename>: The install log indicates that host include and/or library paths were used. Please check the log '<logfile>' for more information. [install-host-path]``
|
||||
|
||||
The log for the :ref:`ref-tasks-install` task
|
||||
indicates that paths on the host were searched for files, which is
|
||||
not appropriate when cross-compiling. Look for "is unsafe for
|
||||
cross-compilation" or "CROSS COMPILE Badness" in the specified log
|
||||
file.
|
||||
|
||||
|
||||
.. _qa-check-configure-unsafe:
|
||||
|
||||
- ``This autoconf log indicates errors, it looked at host include and/or library paths while determining system capabilities. Rerun configure task after fixing this. [configure-unsafe]``
|
||||
|
||||
The log for the :ref:`ref-tasks-configure` task
|
||||
indicates that paths on the host were searched for files, which is
|
||||
not appropriate when cross-compiling. Look for "is unsafe for
|
||||
cross-compilation" or "CROSS COMPILE Badness" in the specified log
|
||||
file.
|
||||
|
||||
|
||||
.. _qa-check-pkgname:
|
||||
|
||||
- ``<packagename> doesn't match the [a-z0-9.+-]+ regex [pkgname]``
|
||||
|
||||
The convention within the OpenEmbedded build system (sometimes
|
||||
enforced by the package manager itself) is to require that package
|
||||
names are all lower case and to allow a restricted set of characters.
|
||||
If your recipe name does not match this, or you add packages to
|
||||
:term:`PACKAGES` that do not conform to the
|
||||
convention, then you will receive this error. Rename your recipe. Or,
|
||||
if you have added a non-conforming package name to :term:`PACKAGES`,
|
||||
change the package name appropriately.
|
||||
|
||||
|
||||
.. _qa-check-unknown-configure-option:
|
||||
|
||||
- ``<recipe>: configure was passed unrecognized options: <options> [unknown-configure-option]``
|
||||
|
||||
The configure script is reporting that the specified options are
|
||||
unrecognized. This situation could be because the options were
|
||||
previously valid but have been removed from the configure script. Or,
|
||||
there was a mistake when the options were added and there is another
|
||||
option that should be used instead. If you are unsure, consult the
|
||||
upstream build documentation, the ``./configure --help`` output, and
|
||||
the upstream change log or release notes. Once you have worked out
|
||||
what the appropriate change is, you can update
|
||||
:term:`EXTRA_OECONF`,
|
||||
:term:`PACKAGECONFIG_CONFARGS`, or the
|
||||
individual :term:`PACKAGECONFIG` option values
|
||||
accordingly.
|
||||
|
||||
|
||||
.. _qa-check-pn-overrides:
|
||||
|
||||
- ``Recipe <recipefile> has PN of "<recipename>" which is in OVERRIDES, this can result in unexpected behavior. [pn-overrides]``
|
||||
|
||||
The specified recipe has a name (:term:`PN`) value that
|
||||
appears in :term:`OVERRIDES`. If a recipe is named
|
||||
such that its :term:`PN` value matches something already in :term:`OVERRIDES`
|
||||
(e.g. :term:`PN` happens to be the same as :term:`MACHINE`
|
||||
or :term:`DISTRO`), it can have unexpected
|
||||
consequences. For example, assignments such as
|
||||
``FILES:${PN} = "xyz"`` effectively turn into ``FILES = "xyz"``.
|
||||
Rename your recipe (or if :term:`PN` is being set explicitly, change the
|
||||
:term:`PN` value) so that the conflict does not occur. See
|
||||
:term:`FILES` for additional information.
|
||||
|
||||
|
||||
.. _qa-check-pkgvarcheck:
|
||||
|
||||
- ``<recipefile>: Variable <variable> is set as not being package specific, please fix this. [pkgvarcheck]``
|
||||
|
||||
Certain variables (:term:`RDEPENDS`,
|
||||
:term:`RRECOMMENDS`,
|
||||
:term:`RSUGGESTS`,
|
||||
:term:`RCONFLICTS`,
|
||||
:term:`RPROVIDES`,
|
||||
:term:`RREPLACES`, :term:`FILES`,
|
||||
``pkg_preinst``, ``pkg_postinst``, ``pkg_prerm``, ``pkg_postrm``, and
|
||||
:term:`ALLOW_EMPTY`) should always be set specific
|
||||
to a package (i.e. they should be set with a package name override
|
||||
such as ``RDEPENDS:${PN} = "value"`` rather than
|
||||
``RDEPENDS = "value"``). If you receive this error, correct any
|
||||
assignments to these variables within your recipe.
|
||||
|
||||
|
||||
- ``recipe uses DEPENDS:${PN}, should use DEPENDS [pkgvarcheck]``
|
||||
|
||||
This check looks for instances of setting ``DEPENDS:${PN}``
|
||||
which is erroneous (:term:`DEPENDS` is a recipe-wide variable and thus
|
||||
it is not correct to specify it for a particular package, nor will such
|
||||
an assignment actually work.) Set :term:`DEPENDS` instead.
|
||||
|
||||
|
||||
.. _qa-check-already-stripped:
|
||||
|
||||
- ``File '<file>' from <recipename> was already stripped, this will prevent future debugging! [already-stripped]``
|
||||
|
||||
Produced binaries have already been stripped prior to the build
|
||||
system extracting debug symbols. It is common for upstream software
|
||||
projects to default to stripping debug symbols for output binaries.
|
||||
In order for debugging to work on the target using ``-dbg`` packages,
|
||||
this stripping must be disabled.
|
||||
|
||||
Depending on the build system used by the software being built,
|
||||
disabling this stripping could be as easy as specifying an additional
|
||||
configure option. If not, disabling stripping might involve patching
|
||||
the build scripts. In the latter case, look for references to "strip"
|
||||
or "STRIP", or the "-s" or "-S" command-line options being specified
|
||||
on the linker command line (possibly through the compiler command
|
||||
line if preceded with "-Wl,").
|
||||
|
||||
.. note::
|
||||
|
||||
Disabling stripping here does not mean that the final packaged
|
||||
binaries will be unstripped. Once the OpenEmbedded build system
|
||||
splits out debug symbols to the ``-dbg`` package, it will then
|
||||
strip the symbols from the binaries.
|
||||
|
||||
|
||||
.. _qa-check-packages-list:
|
||||
|
||||
- ``<packagename> is listed in PACKAGES multiple times, this leads to packaging errors. [packages-list]``
|
||||
|
||||
Package names must appear only once in the
|
||||
:term:`PACKAGES` variable. You might receive this
|
||||
error if you are attempting to add a package to :term:`PACKAGES` that is
|
||||
already in the variable's value.
|
||||
|
||||
|
||||
.. _qa-check-files-invalid:
|
||||
|
||||
- ``FILES variable for package <packagename> contains '//' which is invalid. Attempting to fix this but you should correct the metadata. [files-invalid]``
|
||||
|
||||
The string "//" is invalid in a Unix path. Correct all occurrences
|
||||
where this string appears in a :term:`FILES` variable so
|
||||
that there is only a single "/".
|
||||
|
||||
|
||||
.. _qa-check-installed-vs-shipped:
|
||||
|
||||
- ``<recipename>: Files/directories were installed but not shipped in any package [installed-vs-shipped]``
|
||||
|
||||
Files have been installed within the
|
||||
:ref:`ref-tasks-install` task but have not been
|
||||
included in any package by way of the :term:`FILES`
|
||||
variable. Files that do not appear in any package cannot be present
|
||||
in an image later on in the build process. You need to do one of the
|
||||
following:
|
||||
|
||||
- Add the files to :term:`FILES` for the package you want them to appear
|
||||
in (e.g. ``FILES:${``\ :term:`PN`\ ``}`` for the main
|
||||
package).
|
||||
|
||||
- Delete the files at the end of the :ref:`ref-tasks-install` task if the
|
||||
files are not needed in any package.
|
||||
|
||||
|
||||
|
||||
- ``<oldpackage>-<oldpkgversion> was registered as shlib provider for <library>, changing it to <newpackage>-<newpkgversion> because it was built later``
|
||||
|
||||
This message means that both ``<oldpackage>`` and ``<newpackage>``
|
||||
provide the specified shared library. You can expect this message
|
||||
when a recipe has been renamed. However, if that is not the case, the
|
||||
message might indicate that a private version of a library is being
|
||||
erroneously picked up as the provider for a common library. If that
|
||||
is the case, you should add the library's ``.so`` filename to
|
||||
:term:`PRIVATE_LIBS` in the recipe that provides
|
||||
the private version of the library.
|
||||
|
||||
|
||||
.. _qa-check-unlisted-pkg-lics:
|
||||
|
||||
- ``LICENSE:<packagename> includes licenses (<licenses>) that are not listed in LICENSE [unlisted-pkg-lics]``
|
||||
|
||||
The :term:`LICENSE` of the recipe should be a superset
|
||||
of all the licenses of all packages produced by this recipe. In other
|
||||
words, any license in ``LICENSE:*`` should also appear in
|
||||
:term:`LICENSE`.
|
||||
|
||||
|
||||
.. _qa-check-configure-gettext:
|
||||
|
||||
- ``AM_GNU_GETTEXT used but no inherit gettext [configure-gettext]``
|
||||
|
||||
If a recipe is building something that uses automake and the automake
|
||||
files contain an ``AM_GNU_GETTEXT`` directive then this check will fail
|
||||
if there is no ``inherit gettext`` statement in the recipe to ensure
|
||||
that gettext is available during the build. Add ``inherit gettext`` to
|
||||
remove the warning.
|
||||
|
||||
|
||||
.. _qa-check-mime:
|
||||
|
||||
- ``package contains mime types but does not inherit mime: <packagename> path '<file>' [mime]``
|
||||
|
||||
The specified package contains mime type files (``.xml`` files in
|
||||
``${datadir}/mime/packages``) and yet does not inherit the
|
||||
:ref:`ref-classes-mime` class which will ensure that these get
|
||||
properly installed. Either add ``inherit mime`` to the recipe or remove the
|
||||
files at the :ref:`ref-tasks-install` step if they are not needed.
|
||||
|
||||
|
||||
.. _qa-check-mime-xdg:
|
||||
|
||||
- ``package contains desktop file with key 'MimeType' but does not inhert mime-xdg: <packagename> path '<file>' [mime-xdg]``
|
||||
|
||||
The specified package contains a .desktop file with a 'MimeType' key
|
||||
present, but does not inherit the :ref:`ref-classes-mime-xdg`
|
||||
class that is required in order for that to be activated. Either add
|
||||
``inherit mime`` to the recipe or remove the files at the
|
||||
:ref:`ref-tasks-install` step if they are not needed.
|
||||
|
||||
|
||||
.. _qa-check-src-uri-bad:
|
||||
|
||||
- ``<recipename>: SRC_URI uses unstable GitHub archives [src-uri-bad]``
|
||||
|
||||
GitHub provides "archive" tarballs, however these can be re-generated
|
||||
on the fly and thus the file's signature will not necessarily match that
|
||||
in the :term:`SRC_URI` checksums in future leading to build failures. It is
|
||||
recommended that you use an official release tarball or switch to
|
||||
pulling the corresponding revision in the actual git repository instead.
|
||||
|
||||
|
||||
- ``SRC_URI uses PN not BPN [src-uri-bad]``
|
||||
|
||||
If some part of :term:`SRC_URI` needs to reference the recipe name, it should do
|
||||
so using ${:term:`BPN`} rather than ${:term:`PN`} as the latter will change
|
||||
for different variants of the same recipe e.g. when :term:`BBCLASSEXTEND`
|
||||
or multilib are being used. This check will fail if a reference to ``${PN}``
|
||||
is found within the :term:`SRC_URI` value --- change it to ``${BPN}`` instead.
|
||||
|
||||
|
||||
.. _qa-check-unhandled-features-check:
|
||||
|
||||
- ``<recipename>: recipe doesn't inherit features_check [unhandled-features-check]``
|
||||
|
||||
This check ensures that if one of the variables that the
|
||||
:ref:`ref-classes-features_check` class supports (e.g.
|
||||
:term:`REQUIRED_DISTRO_FEATURES`) is used, then the recipe
|
||||
inherits :ref:`ref-classes-features_check` in order for
|
||||
the requirement to actually work. If you are seeing this message, either
|
||||
add ``inherit features_check`` to your recipe or remove the reference to
|
||||
the variable if it is not needed.
|
||||
|
||||
|
||||
.. _qa-check-missing-update-alternatives:
|
||||
|
||||
- ``<recipename>: recipe defines ALTERNATIVE:<packagename> but doesn't inherit update-alternatives. This might fail during do_rootfs later! [missing-update-alternatives]``
|
||||
|
||||
This check ensures that if a recipe sets the :term:`ALTERNATIVE` variable that the
|
||||
recipe also inherits :ref:`ref-classes-update-alternatives` such
|
||||
that the alternative will be correctly set up. If you are seeing this message, either
|
||||
add ``inherit update-alternatives`` to your recipe or remove the reference to the variable
|
||||
if it is not needed.
|
||||
|
||||
|
||||
.. _qa-check-shebang-size:
|
||||
|
||||
- ``<packagename>: <file> maximum shebang size exceeded, the maximum size is 128. [shebang-size]``
|
||||
|
||||
This check ensures that the shebang line (``#!`` in the first line) for a script
|
||||
is not longer than 128 characters, which can cause an error at runtime depending
|
||||
on the operating system. If you are seeing this message then the specified script
|
||||
may need to be patched to have a shorter in order to avoid runtime problems.
|
||||
|
||||
|
||||
.. _qa-check-perllocalpod:
|
||||
|
||||
- ``<packagename> contains perllocal.pod (<files>), should not be installed [perllocalpod]``
|
||||
|
||||
``perllocal.pod`` is an index file of locally installed modules and so shouldn't be
|
||||
installed by any distribution packages. The :ref:`ref-classes-cpan` class
|
||||
already sets ``NO_PERLLOCAL`` to stop this file being generated by most Perl recipes,
|
||||
but if a recipe is using ``MakeMaker`` directly then they might not be doing this
|
||||
correctly. This check ensures that perllocal.pod is not in any package in order to
|
||||
avoid multiple packages shipping this file and thus their packages conflicting
|
||||
if installed together.
|
||||
|
||||
|
||||
.. _qa-check-usrmerge:
|
||||
|
||||
- ``<packagename> package is not obeying usrmerge distro feature. /<path> should be relocated to /usr. [usrmerge]``
|
||||
|
||||
If ``usrmerge`` is in :term:`DISTRO_FEATURES`, this check will ensure that no package
|
||||
installs files to root (``/bin``, ``/sbin``, ``/lib``, ``/lib64``) directories. If you are seeing this
|
||||
message, it indicates that the :ref:`ref-tasks-install` step (or perhaps the build process that
|
||||
:ref:`ref-tasks-install` is calling into, e.g. ``make install`` is using hardcoded paths instead
|
||||
of the variables set up for this (``bindir``, ``sbindir``, etc.), and should be
|
||||
changed so that it does.
|
||||
|
||||
|
||||
.. _qa-check-patch-fuzz:
|
||||
|
||||
- ``Fuzz detected: <patch output> [patch-fuzz]``
|
||||
|
||||
This check looks for evidence of "fuzz" when applying patches within the :ref:`ref-tasks-patch`
|
||||
task. Patch fuzz is a situation when the ``patch`` tool ignores some of the context
|
||||
lines in order to apply the patch. Consider this example:
|
||||
|
||||
Patch to be applied::
|
||||
|
||||
--- filename
|
||||
+++ filename
|
||||
context line 1
|
||||
context line 2
|
||||
context line 3
|
||||
+newly added line
|
||||
context line 4
|
||||
context line 5
|
||||
context line 6
|
||||
|
||||
Original source code::
|
||||
|
||||
different context line 1
|
||||
different context line 2
|
||||
context line 3
|
||||
context line 4
|
||||
different context line 5
|
||||
different context line 6
|
||||
|
||||
Outcome (after applying patch with fuzz)::
|
||||
|
||||
different context line 1
|
||||
different context line 2
|
||||
context line 3
|
||||
newly added line
|
||||
context line 4
|
||||
different context line 5
|
||||
different context line 6
|
||||
|
||||
Chances are, the newly added line was actually added in a completely
|
||||
wrong location, or it was already in the original source and was added
|
||||
for the second time. This is especially possible if the context line 3
|
||||
and 4 are blank or have only generic things in them, such as ``#endif`` or ``}``.
|
||||
Depending on the patched code, it is entirely possible for an incorrectly
|
||||
patched file to still compile without errors.
|
||||
|
||||
*How to eliminate patch fuzz warnings*
|
||||
|
||||
Use the ``devtool`` command as explained by the warning. First, unpack the
|
||||
source into devtool workspace::
|
||||
|
||||
devtool modify <recipe>
|
||||
|
||||
This will apply all of the patches, and create new commits out of them in
|
||||
the workspace --- with the patch context updated.
|
||||
|
||||
Then, replace the patches in the recipe layer::
|
||||
|
||||
devtool finish --force-patch-refresh <recipe> <layer_path>
|
||||
|
||||
The patch updates then need be reviewed (preferably with a side-by-side diff
|
||||
tool) to ensure they are indeed doing the right thing i.e.:
|
||||
|
||||
#. they are applied in the correct location within the file;
|
||||
#. they do not introduce duplicate lines, or otherwise do things that
|
||||
are no longer necessary.
|
||||
|
||||
To confirm these things, you can also review the patched source code in
|
||||
devtool's workspace, typically in ``<build_dir>/workspace/sources/<recipe>/``
|
||||
|
||||
Once the review is done, you can create and publish a layer commit with
|
||||
the patch updates that modify the context. Devtool may also refresh
|
||||
other things in the patches, those can be discarded.
|
||||
|
||||
|
||||
.. _qa-check-patch-status:
|
||||
|
||||
- ``Missing Upstream-Status in patch <patchfile> Please add according to <url> [patch-status]``
|
||||
|
||||
The ``Upstream-Status`` value is missing in the specified patch file's header.
|
||||
This value is intended to track whether or not the patch has been sent
|
||||
upstream, whether or not it has been merged, etc.
|
||||
|
||||
For more information, see the
|
||||
":ref:`contributor-guide/recipe-style-guide:patch upstream status`"
|
||||
section in the Yocto Project and OpenEmbedded Contributor Guide.
|
||||
|
||||
- ``Malformed Upstream-Status in patch <patchfile> Please correct according to <url> [patch-status]``
|
||||
|
||||
The ``Upstream-Status`` value in the specified patch file's header is invalid -
|
||||
it must be a specific format. See the "Missing Upstream-Status" entry above
|
||||
for more information.
|
||||
|
||||
|
||||
.. _qa-check-buildpaths:
|
||||
|
||||
- ``File <filename> in package <packagename> contains reference to TMPDIR [buildpaths]``
|
||||
|
||||
This check ensures that build system paths (including :term:`TMPDIR`) do not
|
||||
appear in output files, which not only leaks build system configuration into
|
||||
the target, but also hinders binary reproducibility as the output will change
|
||||
if the build system configuration changes.
|
||||
|
||||
Typically these paths will enter the output through some mechanism in the
|
||||
configuration or compilation of the software being built by the recipe. To
|
||||
resolve this issue you will need to determine how the detected path is
|
||||
entering the output. Sometimes it may require adjusting scripts or code to
|
||||
use a relative path rather than an absolute one, or to pick up the path from
|
||||
runtime configuration or environment variables.
|
||||
|
||||
.. _qa-check-unimplemented-ptest:
|
||||
|
||||
- ``<tool> tests detected [unimplemented-ptest]``
|
||||
|
||||
This check will detect if the source of the package contains some
|
||||
upstream-provided tests and, if so, that ptests are implemented for this
|
||||
recipe. See the ":ref:`test-manual/ptest:testing packages with ptest`"
|
||||
section in the Yocto Project Development Tasks Manual. See also the
|
||||
":ref:`ref-classes-ptest`" section.
|
||||
|
||||
.. _qa-check-virtual-slash:
|
||||
|
||||
- ``<variable> is set to <value> but the substring 'virtual/' holds no meaning in this context. It only works for build time dependencies, not runtime ones. It is suggested to use 'VIRTUAL-RUNTIME_' variables instead.``
|
||||
|
||||
``virtual/`` is a convention intended for use in the build context
|
||||
(i.e. :term:`PROVIDES` and :term:`DEPENDS`) rather than the runtime
|
||||
context (i.e. :term:`RPROVIDES` and :term:`RDEPENDS`). Use
|
||||
:term:`VIRTUAL-RUNTIME` variables instead for the latter.
|
||||
|
||||
|
||||
Configuring and Disabling QA Checks
|
||||
===================================
|
||||
|
||||
You can configure the QA checks globally so that specific check failures
|
||||
either raise a warning or an error message, using the
|
||||
:term:`WARN_QA` and :term:`ERROR_QA`
|
||||
variables, respectively. You can also disable checks within a particular
|
||||
recipe using :term:`INSANE_SKIP`. For information on
|
||||
how to work with the QA checks, see the
|
||||
":ref:`ref-classes-insane`" section.
|
||||
|
||||
.. note::
|
||||
|
||||
Please keep in mind that the QA checks are meant to detect real
|
||||
or potential problems in the packaged output. So exercise caution
|
||||
when disabling these checks.
|
||||
224
sources/poky/documentation/ref-manual/release-process.rst
Normal file
224
sources/poky/documentation/ref-manual/release-process.rst
Normal file
@@ -0,0 +1,224 @@
|
||||
.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
|
||||
|
||||
*****************************************************
|
||||
Yocto Project Releases and the Stable Release Process
|
||||
*****************************************************
|
||||
|
||||
The Yocto Project release process is predictable and consists of both
|
||||
major and minor (point) releases. This brief chapter provides
|
||||
information on how releases are named, their life cycle, and their
|
||||
stability.
|
||||
|
||||
Major and Minor Release Cadence
|
||||
===============================
|
||||
|
||||
The Yocto Project delivers major releases (e.g. &DISTRO;) using a six
|
||||
month cadence roughly timed each April and October of the year.
|
||||
Here are examples of some major YP releases with their codenames
|
||||
also shown. See the ":ref:`ref-manual/release-process:major release codenames`"
|
||||
section for information on codenames used with major releases.
|
||||
|
||||
- 4.1 ("Langdale")
|
||||
- 4.0 ("Kirkstone")
|
||||
- 3.4 ("Honister")
|
||||
|
||||
While the cadence is never perfect, this timescale facilitates
|
||||
regular releases that have strong QA cycles while not overwhelming users
|
||||
with too many new releases. The cadence is predictable and avoids many
|
||||
major holidays in various geographies.
|
||||
|
||||
The Yocto project delivers minor (point) releases on an unscheduled
|
||||
basis and are usually driven by the accumulation of enough significant
|
||||
fixes or enhancements to the associated major release.
|
||||
Some example past point releases are:
|
||||
|
||||
- 4.1.3
|
||||
- 4.0.8
|
||||
- 3.4.4
|
||||
|
||||
The point release
|
||||
indicates a point in the major release branch where a full QA cycle and
|
||||
release process validates the content of the new branch.
|
||||
|
||||
.. note::
|
||||
|
||||
Realize that there can be patches merged onto the stable release
|
||||
branches as and when they become available.
|
||||
|
||||
Major Release Codenames
|
||||
=======================
|
||||
|
||||
Each major release receives a codename that identifies the release in
|
||||
the :ref:`overview-manual/development-environment:yocto project source repositories`.
|
||||
The concept is that branches of :term:`Metadata` with the same
|
||||
codename are likely to be compatible and thus work together.
|
||||
|
||||
.. note::
|
||||
|
||||
Codenames are associated with major releases because a Yocto Project
|
||||
release number (e.g. &DISTRO;) could conflict with a given layer or
|
||||
company versioning scheme. Codenames are unique, interesting, and
|
||||
easily identifiable.
|
||||
|
||||
Releases are given a nominal release version as well but the codename is
|
||||
used in repositories for this reason. You can find information on Yocto
|
||||
Project releases and codenames at :yocto_wiki:`/Releases`.
|
||||
|
||||
Our :doc:`/migration-guides/index` detail how to migrate from one release of
|
||||
the Yocto Project to the next.
|
||||
|
||||
Stable Release Process
|
||||
======================
|
||||
|
||||
Once released, the release enters the stable release process at which
|
||||
time a person is assigned as the maintainer for that stable release.
|
||||
This maintainer monitors activity for the release by investigating and
|
||||
handling nominated patches and backport activity. Only fixes and
|
||||
enhancements that have first been applied on the "master" branch (i.e.
|
||||
the current, in-development branch) are considered for backporting to a
|
||||
stable release.
|
||||
|
||||
.. note::
|
||||
|
||||
The current Yocto Project policy regarding backporting is to consider
|
||||
bug fixes and security fixes only. Policy dictates that features are
|
||||
not backported to a stable release. This policy means generic recipe
|
||||
version upgrades are unlikely to be accepted for backporting. The
|
||||
exception to this policy occurs when there is a strong reason such as
|
||||
the fix happens to also be the preferred upstream approach.
|
||||
|
||||
.. _ref-long-term-support-releases:
|
||||
|
||||
Long Term Support Releases
|
||||
==========================
|
||||
|
||||
While stable releases are supported for a duration of seven months,
|
||||
some specific ones are now supported for a longer period by the Yocto
|
||||
Project, and are called Long Term Support (:term:`LTS`) releases.
|
||||
|
||||
When significant issues are found, :term:`LTS` releases allow to publish
|
||||
fixes not only for the current stable release, but also to the
|
||||
:term:`LTS` releases that are still supported. Older stable releases which
|
||||
have reached their End of Life (EOL) won't receive such updates.
|
||||
|
||||
This started with version 3.1 ("Dunfell"), released in April 2020, which
|
||||
the project initially committed to supporting for two years, but this duration
|
||||
was later extended to four years.
|
||||
|
||||
A new :term:`LTS` release is made every two years and is supported for four
|
||||
years. This offers more stability to project users and leaves more time to
|
||||
upgrade to the following :term:`LTS` release.
|
||||
|
||||
The currently supported :term:`LTS` releases are:
|
||||
|
||||
- Version 5.0 ("Scarthgap"), released in April 2024 and supported until April 2028.
|
||||
- Version 4.0 ("Kirkstone"), released in May 2022 and supported until May 2026.
|
||||
|
||||
See :yocto_wiki:`/Stable_Release_and_LTS` for details about the management
|
||||
of stable and :term:`LTS` releases.
|
||||
|
||||
This documentation was built for the &DISTRO_NAME; release.
|
||||
|
||||
.. image:: svg/releases.*
|
||||
:width: 100%
|
||||
|
||||
.. note::
|
||||
|
||||
In some circumstances, a layer can be created by the community in order to
|
||||
add a specific feature or support a new version of some package for an :term:`LTS`
|
||||
release. This is called a :term:`Mixin` layer. These are thin and specific
|
||||
purpose layers which can be stacked with an :term:`LTS` release to "mix" a specific
|
||||
feature into that build. These are created on an as-needed basis and
|
||||
maintained by the people who need them.
|
||||
|
||||
Policies on testing these layers depend on how widespread their usage is and
|
||||
determined on a case-by-case basis. You can find some :term:`Mixin` layers in the
|
||||
:yocto_git:`meta-lts-mixins </meta-lts-mixins>` repository. While the Yocto
|
||||
Project provides hosting for those repositories, it does not provides
|
||||
testing on them. Other :term:`Mixin` layers may be released elsewhere by the wider
|
||||
community.
|
||||
|
||||
Testing and Quality Assurance
|
||||
=============================
|
||||
|
||||
Part of the Yocto Project development and release process is quality
|
||||
assurance through the execution of test strategies. Test strategies
|
||||
provide the Yocto Project team a way to ensure a release is validated.
|
||||
Additionally, because the test strategies are visible to you as a
|
||||
developer, you can validate your projects. This section overviews the
|
||||
available test infrastructure used in the Yocto Project. For information
|
||||
on how to run available tests on your projects, see the
|
||||
":ref:`test-manual/runtime-testing:performing automated runtime testing`"
|
||||
section in the Yocto Project Test Environment Manual.
|
||||
|
||||
The QA/testing infrastructure is woven into the project to the point
|
||||
where core developers take some of it for granted. The infrastructure
|
||||
consists of the following pieces:
|
||||
|
||||
- ``bitbake-selftest``: A standalone command that runs unit tests on
|
||||
key pieces of BitBake and its fetchers.
|
||||
|
||||
- :ref:`ref-classes-sanity`: This automatically
|
||||
included class checks the build environment for missing tools (e.g.
|
||||
``gcc``) or common misconfigurations such as
|
||||
:term:`MACHINE` set incorrectly.
|
||||
|
||||
- :ref:`ref-classes-insane`: This class checks the
|
||||
generated output from builds for sanity. For example, if building for
|
||||
an ARM target, did the build produce ARM binaries. If, for example,
|
||||
the build produced PPC binaries then there is a problem.
|
||||
|
||||
- :ref:`ref-classes-testimage`: This class
|
||||
performs runtime testing of images after they are built. The tests
|
||||
are usually used with :doc:`QEMU </dev-manual/qemu>`
|
||||
to boot the images and check the combined runtime result boot
|
||||
operation and functions. However, the test can also use the IP
|
||||
address of a machine to test.
|
||||
|
||||
- :ref:`ptest <test-manual/ptest:testing packages with ptest>`:
|
||||
Runs tests against packages produced during the build for a given
|
||||
piece of software. The test allows the packages to be run within a
|
||||
target image.
|
||||
|
||||
- ``oe-selftest``: Tests combinations of BitBake invocations. These tests
|
||||
operate outside the OpenEmbedded build system itself. The
|
||||
``oe-selftest`` can run all tests by default or can run selected
|
||||
tests or test suites.
|
||||
|
||||
Originally, much of this testing was done manually. However, significant
|
||||
effort has been made to automate the tests so that more people can use
|
||||
them and the Yocto Project development team can run them faster and more
|
||||
efficiently.
|
||||
|
||||
The Yocto Project's main :yocto_ab:`Autobuilder <>` publicly tests each Yocto
|
||||
Project release's code in the :oe_git:`openembedded-core </openembedded-core>`,
|
||||
:yocto_git:`poky </poky>` and :oe_git:`bitbake </bitbake>` repositories. The
|
||||
testing occurs for both the current state of the "master" branch and also for
|
||||
submitted patches. Testing for submitted patches usually occurs in the
|
||||
in the "master-next" branch in the :yocto_git:`poky </poky>` repository.
|
||||
|
||||
.. note::
|
||||
|
||||
You can find all these branches in the
|
||||
:ref:`overview-manual/development-environment:yocto project source repositories`.
|
||||
|
||||
Testing within these public branches ensures in a publicly visible way
|
||||
that all of the main supposed architectures and recipes in OE-Core
|
||||
successfully build and behave properly.
|
||||
|
||||
Various features such as ``multilib``, sub architectures (e.g. ``x32``,
|
||||
``poky-tiny``, ``musl``, ``no-x11`` and and so forth),
|
||||
``bitbake-selftest``, and ``oe-selftest`` are tested as part of the QA
|
||||
process of a release. Complete testing and validation for a release
|
||||
takes the Autobuilder workers several hours.
|
||||
|
||||
.. note::
|
||||
|
||||
The Autobuilder workers are non-homogeneous, which means regular
|
||||
testing across a variety of Linux distributions occurs. The
|
||||
Autobuilder is limited to only testing QEMU-based setups and not real
|
||||
hardware.
|
||||
|
||||
Finally, in addition to the Autobuilder's tests, the Yocto Project QA
|
||||
team also performs testing on a variety of platforms, which includes
|
||||
actual hardware, to ensure expected results.
|
||||
203
sources/poky/documentation/ref-manual/resources.rst
Normal file
203
sources/poky/documentation/ref-manual/resources.rst
Normal file
@@ -0,0 +1,203 @@
|
||||
.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
|
||||
|
||||
****************************************
|
||||
Contributions and Additional Information
|
||||
****************************************
|
||||
|
||||
.. _resources-intro:
|
||||
|
||||
Introduction
|
||||
============
|
||||
|
||||
The Yocto Project team is happy for people to experiment with the Yocto
|
||||
Project. There is a number of places where you can find help if you run into
|
||||
difficulties or find bugs. This presents information about contributing
|
||||
and participating in the Yocto Project.
|
||||
|
||||
.. _resources-contributions:
|
||||
|
||||
Contributions
|
||||
=============
|
||||
|
||||
The Yocto Project gladly accepts contributions. You can submit changes
|
||||
to the project either by creating and sending pull requests, or by
|
||||
submitting patches through email. For information on how to do both as
|
||||
well as information on how to identify the maintainer for each area of
|
||||
code, see the :doc:`../contributor-guide/index`.
|
||||
|
||||
.. _resources-bugtracker:
|
||||
|
||||
Yocto Project Bugzilla
|
||||
======================
|
||||
|
||||
The Yocto Project uses its own implementation of
|
||||
:yocto_bugs:`Bugzilla <>` to track defects (bugs).
|
||||
Implementations of Bugzilla work well for group development because they
|
||||
track bugs and code changes, can be used to communicate changes and
|
||||
problems with developers, can be used to submit and review patches, and
|
||||
can be used to manage quality assurance.
|
||||
|
||||
Sometimes it is helpful to submit, investigate, or track a bug against
|
||||
the Yocto Project itself (e.g. when discovering an issue with some
|
||||
component of the build system that acts contrary to the documentation or
|
||||
your expectations).
|
||||
|
||||
For a general procedure and guidelines on how to use Bugzilla to submit a bug
|
||||
against the Yocto Project, see the following:
|
||||
|
||||
- The ":doc:`../contributor-guide/report-defect`"
|
||||
section in the Yocto Project and OpenEmbedded Contributor Guide.
|
||||
|
||||
- The Yocto Project :yocto_wiki:`Bugzilla wiki page </Bugzilla_Configuration_and_Bug_Tracking>`
|
||||
|
||||
For information on Bugzilla in general, see https://www.bugzilla.org/about/.
|
||||
|
||||
.. _resources-mailinglist:
|
||||
|
||||
Mailing lists
|
||||
=============
|
||||
|
||||
There are multiple mailing lists maintained by the Yocto Project as well
|
||||
as related OpenEmbedded mailing lists for discussion, patch submission
|
||||
and announcements. To subscribe to one of the following mailing lists,
|
||||
click on the appropriate URL in the following list and follow the
|
||||
instructions:
|
||||
|
||||
- :yocto_lists:`/g/yocto` --- general Yocto Project
|
||||
discussion mailing list.
|
||||
|
||||
- :yocto_lists:`/g/yocto-patches` --- patch contribution mailing list for Yocto
|
||||
Project-related layers which do not have their own mailing list.
|
||||
|
||||
- :oe_lists:`/g/openembedded-core` --- discussion mailing
|
||||
list about OpenEmbedded-Core (the core metadata).
|
||||
|
||||
- :oe_lists:`/g/openembedded-devel` --- discussion
|
||||
mailing list about OpenEmbedded.
|
||||
|
||||
- :oe_lists:`/g/bitbake-devel` --- discussion mailing
|
||||
list about the :term:`BitBake` build tool.
|
||||
|
||||
- :yocto_lists:`/g/poky` --- discussion mailing list
|
||||
about :term:`Poky`.
|
||||
|
||||
- :yocto_lists:`/g/yocto-announce` --- mailing list to
|
||||
receive official Yocto Project release and milestone announcements.
|
||||
|
||||
- :yocto_lists:`/g/docs` --- discussion mailing list about the Yocto Project
|
||||
documentation.
|
||||
|
||||
See also :yocto_home:`the description of all mailing lists </community/mailing-lists/>`.
|
||||
|
||||
.. _resources-irc:
|
||||
|
||||
Internet Relay Chat (IRC)
|
||||
=========================
|
||||
|
||||
Two IRC channels on `Libera Chat <https://libera.chat/>`__
|
||||
are available for the Yocto Project and OpenEmbedded discussions:
|
||||
|
||||
- ``#yocto``
|
||||
|
||||
- ``#oe``
|
||||
|
||||
.. _resources-links-and-related-documentation:
|
||||
|
||||
Links and Related Documentation
|
||||
===============================
|
||||
|
||||
Here is a list of resources you might find helpful:
|
||||
|
||||
- :yocto_home:`The Yocto Project Website <>`: The home site
|
||||
for the Yocto Project.
|
||||
|
||||
- :yocto_wiki:`The Yocto Project Main Wiki Page <>`: The main wiki page for
|
||||
the Yocto Project. This page contains information about project
|
||||
planning, release engineering, QA & automation, a reference site map,
|
||||
and other resources related to the Yocto Project.
|
||||
|
||||
- :oe_home:`OpenEmbedded <>`: The build system used by the
|
||||
Yocto Project. This project is the upstream, generic, embedded
|
||||
distribution from which the Yocto Project derives its build system
|
||||
(Poky) and to which it contributes.
|
||||
|
||||
- :oe_wiki:`BitBake </BitBake>`: The tool used to process metadata.
|
||||
|
||||
- :doc:`BitBake User Manual <bitbake:index>`: A comprehensive
|
||||
guide to the BitBake tool. If you want information on BitBake, see
|
||||
this manual.
|
||||
|
||||
- :doc:`/brief-yoctoprojectqs/index`: This
|
||||
short document lets you experience building an image using the Yocto
|
||||
Project without having to understand any concepts or details.
|
||||
|
||||
- :doc:`/overview-manual/index`: This manual provides overview
|
||||
and conceptual information about the Yocto Project.
|
||||
|
||||
- :doc:`/dev-manual/index`: This manual is a "how-to" guide
|
||||
that presents procedures useful to both application and system
|
||||
developers who use the Yocto Project.
|
||||
|
||||
- :doc:`/sdk-manual/index` manual: This
|
||||
guide provides information that lets you get going with the standard
|
||||
or extensible SDK. An SDK, with its cross-development toolchains,
|
||||
allows you to develop projects inside or outside of the Yocto Project
|
||||
environment.
|
||||
|
||||
- :doc:`/bsp-guide/bsp`: This guide defines the structure
|
||||
for BSP components. Having a commonly understood structure encourages
|
||||
standardization.
|
||||
|
||||
- :doc:`/kernel-dev/index`: This manual describes
|
||||
how to work with Linux Yocto kernels as well as provides a bit of
|
||||
conceptual information on the construction of the Yocto Linux kernel
|
||||
tree.
|
||||
|
||||
- :doc:`/ref-manual/index`: This
|
||||
manual provides reference material such as variable, task, and class
|
||||
descriptions.
|
||||
|
||||
- :yocto_docs:`Yocto Project Mega-Manual </singleindex.html>`: This manual
|
||||
is simply a single HTML file comprised of the bulk of the Yocto
|
||||
Project manuals. It makes it easy to search for phrases and terms used
|
||||
in the Yocto Project documentation set.
|
||||
|
||||
- :doc:`/profile-manual/index`: This manual presents a set of
|
||||
common and generally useful tracing and profiling schemes along with
|
||||
their applications (as appropriate) to each tool.
|
||||
|
||||
- :doc:`/toaster-manual/index`: This manual
|
||||
introduces and describes how to set up and use Toaster. Toaster is an
|
||||
Application Programming Interface (API) and web-based interface to
|
||||
the :term:`OpenEmbedded Build System`, which uses
|
||||
BitBake, that reports build information.
|
||||
|
||||
- `Yocto Project BitBake extension for VSCode
|
||||
<https://marketplace.visualstudio.com/items?itemName=yocto-project.yocto-bitbake>`__:
|
||||
This extension provides a rich feature set when working with BitBake recipes
|
||||
within the Visual Studio Code IDE.
|
||||
|
||||
- :yocto_wiki:`FAQ </FAQ>`: A list of commonly asked
|
||||
questions and their answers.
|
||||
|
||||
- :doc:`Release Information </migration-guides/index>`:
|
||||
Migration guides, release notes, new features, updates and known issues
|
||||
for the current and past releases of the Yocto Project.
|
||||
|
||||
- :yocto_bugs:`Bugzilla <>`: The bug tracking application
|
||||
the Yocto Project uses. If you find problems with the Yocto Project,
|
||||
you should report them using this application.
|
||||
|
||||
- :yocto_wiki:`Bugzilla Configuration and Bug Tracking Wiki Page
|
||||
</Bugzilla_Configuration_and_Bug_Tracking>`:
|
||||
Information on how to get set up and use the Yocto Project
|
||||
implementation of Bugzilla for logging and tracking Yocto Project
|
||||
defects.
|
||||
|
||||
- Internet Relay Chat (IRC): Two IRC channels on
|
||||
`Libera Chat <https://libera.chat/>`__ are
|
||||
available for Yocto Project and OpenEmbeddded discussions: ``#yocto`` and
|
||||
``#oe``, respectively.
|
||||
|
||||
- `Quick EMUlator (QEMU) <https://wiki.qemu.org/Index.html>`__: An
|
||||
open-source machine emulator and virtualizer.
|
||||
911
sources/poky/documentation/ref-manual/structure.rst
Normal file
911
sources/poky/documentation/ref-manual/structure.rst
Normal file
@@ -0,0 +1,911 @@
|
||||
.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
|
||||
|
||||
**************************
|
||||
Source Directory Structure
|
||||
**************************
|
||||
|
||||
The :term:`Source Directory` consists of numerous files,
|
||||
directories and subdirectories; understanding their locations and
|
||||
contents is key to using the Yocto Project effectively. This chapter
|
||||
describes the Source Directory and gives information about those files
|
||||
and directories.
|
||||
|
||||
For information on how to establish a local Source Directory on your
|
||||
development system, see the
|
||||
":ref:`dev-manual/start:locating yocto project source files`"
|
||||
section in the Yocto Project Development Tasks Manual.
|
||||
|
||||
.. note::
|
||||
|
||||
The OpenEmbedded build system does not support file or directory
|
||||
names that contain spaces. Be sure that the Source Directory you use
|
||||
does not contain these types of names.
|
||||
|
||||
.. _structure-core:
|
||||
|
||||
Top-Level Core Components
|
||||
=========================
|
||||
|
||||
This section describes the top-level components of the :term:`Source Directory`.
|
||||
|
||||
.. _structure-core-bitbake:
|
||||
|
||||
``bitbake/``
|
||||
------------
|
||||
|
||||
This directory includes a copy of BitBake for ease of use. The copy
|
||||
usually matches the current stable BitBake release from the BitBake
|
||||
project. BitBake, a :term:`Metadata` interpreter, reads the
|
||||
Yocto Project Metadata and runs the tasks defined by that data. Failures
|
||||
are usually caused by errors in your Metadata and not from BitBake
|
||||
itself.
|
||||
|
||||
When you run the ``bitbake`` command, the main BitBake executable (which
|
||||
resides in the ``bitbake/bin/`` directory) starts. Sourcing the
|
||||
environment setup script (i.e. :ref:`structure-core-script`) places
|
||||
the ``scripts/`` and ``bitbake/bin/`` directories (in that order) into
|
||||
the shell's ``PATH`` environment variable.
|
||||
|
||||
For more information on BitBake, see the :doc:`BitBake User Manual
|
||||
<bitbake:index>`.
|
||||
|
||||
.. _structure-core-build:
|
||||
|
||||
``build/``
|
||||
----------
|
||||
|
||||
This directory contains user configuration files and the output
|
||||
generated by the OpenEmbedded build system in its standard configuration
|
||||
where the source tree is combined with the output. The :term:`Build Directory`
|
||||
is created initially when you ``source`` the OpenEmbedded build environment
|
||||
setup script (i.e. :ref:`structure-core-script`).
|
||||
|
||||
It is also possible to place output and configuration files in a
|
||||
directory separate from the :term:`Source Directory` by
|
||||
providing a directory name when you ``source`` the setup script. For
|
||||
information on separating output from your local Source Directory files
|
||||
(commonly described as an "out of tree" build), see the
|
||||
":ref:`structure-core-script`" section.
|
||||
|
||||
See the ":ref:`The Build Directory --- build/ <structure-build>`" section for details
|
||||
about the contents of the :term:`Build Directory`.
|
||||
|
||||
.. _handbook:
|
||||
|
||||
``documentation/``
|
||||
------------------
|
||||
|
||||
This directory holds the source for the Yocto Project documentation as
|
||||
well as templates and tools that allow you to generate PDF and HTML
|
||||
versions of the manuals. Each manual is contained in its own sub-folder;
|
||||
for example, the files for this reference manual reside in the
|
||||
``ref-manual/`` directory.
|
||||
|
||||
.. _structure-core-meta:
|
||||
|
||||
``meta/``
|
||||
---------
|
||||
|
||||
This directory contains the minimal, underlying OpenEmbedded-Core
|
||||
metadata. The directory holds recipes, common classes, and machine
|
||||
configuration for strictly emulated targets (``qemux86``, ``qemuarm``,
|
||||
and so forth.)
|
||||
|
||||
.. _structure-core-meta-poky:
|
||||
|
||||
``meta-poky/``
|
||||
--------------
|
||||
|
||||
Designed above the ``meta/`` content, this directory adds just enough
|
||||
metadata to define the Poky reference distribution.
|
||||
|
||||
.. _structure-core-meta-yocto-bsp:
|
||||
|
||||
``meta-yocto-bsp/``
|
||||
-------------------
|
||||
|
||||
This directory contains the Yocto Project reference hardware Board
|
||||
Support Packages (BSPs). For more information on BSPs, see the
|
||||
:doc:`/bsp-guide/index`.
|
||||
|
||||
.. _structure-meta-selftest:
|
||||
|
||||
``meta-selftest/``
|
||||
------------------
|
||||
|
||||
This directory adds additional recipes and append files used by the
|
||||
OpenEmbedded selftests to verify the behavior of the build system. You
|
||||
do not have to add this layer to your ``bblayers.conf`` file unless you
|
||||
want to run the selftests.
|
||||
|
||||
.. _structure-meta-skeleton:
|
||||
|
||||
``meta-skeleton/``
|
||||
------------------
|
||||
|
||||
This directory contains template recipes for BSP and kernel development.
|
||||
|
||||
.. _structure-core-scripts:
|
||||
|
||||
``scripts/``
|
||||
------------
|
||||
|
||||
This directory contains various integration scripts that implement extra
|
||||
functionality in the Yocto Project environment (e.g. QEMU scripts). The
|
||||
:ref:`structure-core-script` script prepends this directory to the
|
||||
shell's ``PATH`` environment variable.
|
||||
|
||||
The ``scripts`` directory has useful scripts that assist in contributing
|
||||
back to the Yocto Project, such as ``create-pull-request`` and
|
||||
``send-pull-request``.
|
||||
|
||||
.. _structure-core-script:
|
||||
|
||||
``oe-init-build-env``
|
||||
---------------------
|
||||
|
||||
This script sets up the OpenEmbedded build environment. Running this
|
||||
script with the ``source`` command in a shell makes changes to ``PATH``
|
||||
and sets other core BitBake variables based on the current working
|
||||
directory. You need to run an environment setup script before running
|
||||
BitBake commands. The script uses other scripts within the ``scripts``
|
||||
directory to do the bulk of the work.
|
||||
|
||||
When you run this script, your Yocto Project environment is set up, a
|
||||
:term:`Build Directory` is created, your working directory becomes the
|
||||
:term:`Build Directory`, and you are presented with some simple
|
||||
suggestions as to what to do next, including a list of some possible
|
||||
targets to build. Here is an example::
|
||||
|
||||
$ source oe-init-build-env
|
||||
|
||||
### Shell environment set up for builds. ###
|
||||
|
||||
You can now run 'bitbake <target>'
|
||||
|
||||
Common targets are:
|
||||
core-image-minimal
|
||||
core-image-sato
|
||||
meta-toolchain
|
||||
meta-ide-support
|
||||
|
||||
You can also run generated QEMU images with a command like 'runqemu qemux86-64'
|
||||
|
||||
The default output of the ``oe-init-build-env`` script is from the
|
||||
``conf-summary.txt`` and ``conf-notes.txt`` files, which are found in the ``meta-poky`` directory
|
||||
within the :term:`Source Directory`. If you design a
|
||||
custom distribution, you can include your own versions of these
|
||||
configuration files where you can provide a brief summary and detailed usage
|
||||
notes, such as a list of the targets defined by your distribution.
|
||||
See the
|
||||
":ref:`dev-manual/custom-template-configuration-directory:creating a custom template configuration directory`"
|
||||
section in the Yocto Project Development Tasks Manual for more
|
||||
information.
|
||||
|
||||
By default, running this script without a :term:`Build Directory` argument
|
||||
creates the ``build/`` directory in your current working directory. If
|
||||
you provide a :term:`Build Directory` argument when you ``source`` the script,
|
||||
you direct the OpenEmbedded build system to create a :term:`Build Directory` of
|
||||
your choice. For example, the following command creates a
|
||||
:term:`Build Directory` named ``mybuilds/`` that is outside of the
|
||||
:term:`Source Directory`::
|
||||
|
||||
$ source oe-init-build-env ~/mybuilds
|
||||
|
||||
The OpenEmbedded build system uses the template configuration files, which
|
||||
are found by default in the ``meta-poky/conf/templates/default`` directory in the Source
|
||||
Directory. See the
|
||||
":ref:`dev-manual/custom-template-configuration-directory:creating a custom template configuration directory`"
|
||||
section in the Yocto Project Development Tasks Manual for more
|
||||
information.
|
||||
|
||||
.. note::
|
||||
|
||||
The OpenEmbedded build system does not support file or directory
|
||||
names that contain spaces. If you attempt to run the ``oe-init-build-env``
|
||||
script from a Source Directory that contains spaces in either the
|
||||
filenames or directory names, the script returns an error indicating
|
||||
no such file or directory. Be sure to use a Source Directory free of
|
||||
names containing spaces.
|
||||
|
||||
.. _structure-basic-top-level:
|
||||
|
||||
``LICENSE, README, and README.hardware``
|
||||
----------------------------------------
|
||||
|
||||
These files are standard top-level files.
|
||||
|
||||
.. _structure-build:
|
||||
|
||||
The Build Directory --- ``build/``
|
||||
==================================
|
||||
|
||||
The OpenEmbedded build system creates the :term:`Build Directory` when you run
|
||||
the build environment setup script :ref:`structure-core-script`. If you do not
|
||||
give the :term:`Build Directory` a specific name when you run the setup script,
|
||||
the name defaults to ``build/``.
|
||||
|
||||
For subsequent parsing and processing, the name of the Build directory
|
||||
is available via the :term:`TOPDIR` variable.
|
||||
|
||||
.. _structure-build-buildhistory:
|
||||
|
||||
``build/buildhistory/``
|
||||
-----------------------
|
||||
|
||||
The OpenEmbedded build system creates this directory when you enable
|
||||
build history via the :ref:`ref-classes-buildhistory` class file. The directory
|
||||
organizes build information into image, packages, and SDK
|
||||
subdirectories. For information on the build history feature, see the
|
||||
":ref:`dev-manual/build-quality:maintaining build output quality`"
|
||||
section in the Yocto Project Development Tasks Manual.
|
||||
|
||||
.. _structure-build-cache:
|
||||
|
||||
``build/cache/``
|
||||
----------------
|
||||
|
||||
This directory contains several internal files used by the OpenEmbedded
|
||||
build system.
|
||||
|
||||
It also contains ``sanity_info``, a text file keeping track of important
|
||||
build information such as the values of :term:`TMPDIR`, :term:`SSTATE_DIR`,
|
||||
as well as the name and version of the host distribution.
|
||||
|
||||
.. _structure-build-conf-local.conf:
|
||||
|
||||
``build/conf/local.conf``
|
||||
-------------------------
|
||||
|
||||
This configuration file contains all the local user configurations for
|
||||
your build environment. The ``local.conf`` file contains documentation
|
||||
on the various configuration options. Any variable set here overrides
|
||||
any variable set elsewhere within the environment unless that variable
|
||||
is hard-coded within a file (e.g. by using '=' instead of '?='). Some
|
||||
variables are hard-coded for various reasons but such variables are
|
||||
relatively rare.
|
||||
|
||||
At a minimum, you would normally edit this file to select the target
|
||||
:term:`MACHINE`, which package types you wish to use
|
||||
(:term:`PACKAGE_CLASSES`), and the location from
|
||||
which you want to access downloaded files (:term:`DL_DIR`).
|
||||
|
||||
If ``local.conf`` is not present when you start the build, the
|
||||
OpenEmbedded build system creates it from ``local.conf.sample`` when you
|
||||
``source`` the top-level build environment setup script
|
||||
:ref:`structure-core-script`.
|
||||
|
||||
The source ``local.conf.sample`` file used depends on the
|
||||
:term:`TEMPLATECONF` script variable, which defaults to ``meta-poky/conf/templates/default``
|
||||
when you are building from the Yocto Project development environment,
|
||||
and to ``meta/conf/templates/default`` 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::
|
||||
|
||||
TEMPLATECONF=your_layer/conf/templates/your_template_name
|
||||
|
||||
Once the build process gets the sample
|
||||
file, it uses ``sed`` to substitute final
|
||||
``${``\ :term:`OEROOT`\ ``}`` values for all
|
||||
``##OEROOT##`` values.
|
||||
|
||||
.. note::
|
||||
|
||||
You can see how the :term:`TEMPLATECONF` variable is used by looking at the
|
||||
``scripts/oe-setup-builddir`` script in the :term:`Source Directory`.
|
||||
You can find the Yocto Project version of the ``local.conf.sample`` file in
|
||||
the ``meta-poky/conf/templates/default`` directory.
|
||||
|
||||
.. _structure-build-conf-bblayers.conf:
|
||||
|
||||
``build/conf/bblayers.conf``
|
||||
----------------------------
|
||||
|
||||
This configuration file defines
|
||||
:ref:`layers <dev-manual/layers:understanding and creating layers>`,
|
||||
which are directory trees, traversed (or walked) by BitBake. The
|
||||
``bblayers.conf`` file uses the :term:`BBLAYERS`
|
||||
variable to list the layers BitBake tries to find.
|
||||
|
||||
If ``bblayers.conf`` is not present when you start the build, the
|
||||
OpenEmbedded build system creates it from ``bblayers.conf.sample`` when
|
||||
you ``source`` the top-level build environment setup script (i.e.
|
||||
:ref:`structure-core-script`).
|
||||
|
||||
As with the ``local.conf`` file, the source ``bblayers.conf.sample``
|
||||
file used depends on the :term:`TEMPLATECONF` script variable, which
|
||||
defaults to ``meta-poky/conf/templates/default`` when you are building from the Yocto
|
||||
Project development environment, and to ``meta/conf/templates/default`` 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::
|
||||
|
||||
TEMPLATECONF=your_layer/conf/templates/your_template_name
|
||||
|
||||
Once the build process gets the sample file, it uses ``sed`` to substitute final
|
||||
``${``\ :term:`OEROOT`\ ``}`` values for all ``##OEROOT##`` values.
|
||||
|
||||
.. note::
|
||||
|
||||
You can see how the :term:`TEMPLATECONF` variable is defined by the ``scripts/oe-setup-builddir``
|
||||
script in the :term:`Source Directory`. You can find the Yocto Project
|
||||
version of the ``bblayers.conf.sample`` file in the ``meta-poky/conf/templates/default``
|
||||
directory.
|
||||
|
||||
.. _structure-build-conf-bblock.conf:
|
||||
|
||||
``build/conf/bblock.conf``
|
||||
--------------------------
|
||||
|
||||
This configuration file is generated by :doc:`bblock </dev-manual/bblock>` and
|
||||
contains the signatures locked by ``bblock``. By default, it does not exist
|
||||
and will be created upon the first invocation of ``bblock``.
|
||||
|
||||
.. _structure-build-downloads:
|
||||
|
||||
``build/downloads/``
|
||||
--------------------
|
||||
|
||||
This directory contains downloaded upstream source tarballs. You can
|
||||
reuse the directory for multiple builds or move the directory to another
|
||||
location. You can control the location of this directory through the
|
||||
:term:`DL_DIR` variable.
|
||||
|
||||
.. _structure-build-sstate-cache:
|
||||
|
||||
``build/sstate-cache/``
|
||||
-----------------------
|
||||
|
||||
This directory contains the shared state cache. You can reuse the
|
||||
directory for multiple builds or move the directory to another location.
|
||||
You can control the location of this directory through the
|
||||
:term:`SSTATE_DIR` variable.
|
||||
|
||||
.. _structure-build-tmp:
|
||||
|
||||
``build/tmp/``
|
||||
--------------
|
||||
|
||||
The OpenEmbedded build system creates and uses this directory for all
|
||||
the build system's output. The :term:`TMPDIR` variable
|
||||
points to this directory.
|
||||
|
||||
BitBake creates this directory if it does not exist. As a last resort,
|
||||
to clean up a build and start it from scratch (other than the
|
||||
downloads), you can remove everything in the ``tmp`` directory or get
|
||||
rid of the directory completely. If you do, you should also completely
|
||||
remove the ``build/sstate-cache`` directory.
|
||||
|
||||
.. _structure-build-tmp-buildstats:
|
||||
|
||||
``build/tmp/buildstats/``
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
This directory stores the build statistics as generated by the
|
||||
:ref:`ref-classes-buildstats` class.
|
||||
|
||||
.. _structure-build-tmp-cache:
|
||||
|
||||
``build/tmp/cache/``
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
When BitBake parses the metadata (recipes and configuration files), it
|
||||
caches the results in ``build/tmp/cache/`` to speed up future builds.
|
||||
The results are stored on a per-machine basis.
|
||||
|
||||
During subsequent builds, BitBake checks each recipe (together with, for
|
||||
example, any files included or appended to it) to see if they have been
|
||||
modified. Changes can be detected, for example, through file
|
||||
modification time (mtime) changes and hashing of file contents. If no
|
||||
changes to the file are detected, then the parsed result stored in the
|
||||
cache is reused. If the file has changed, it is reparsed.
|
||||
|
||||
.. _structure-build-tmp-deploy:
|
||||
|
||||
``build/tmp/deploy/``
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
This directory contains any "end result" output from the OpenEmbedded
|
||||
build process. The :term:`DEPLOY_DIR` variable points
|
||||
to this directory. For more detail on the contents of the ``deploy``
|
||||
directory, see the
|
||||
":ref:`overview-manual/concepts:images`" and
|
||||
":ref:`overview-manual/concepts:application development sdk`" sections in the Yocto
|
||||
Project Overview and Concepts Manual.
|
||||
|
||||
.. _structure-build-tmp-deploy-deb:
|
||||
|
||||
``build/tmp/deploy/deb/``
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
This directory receives any ``.deb`` packages produced by the build
|
||||
process. The packages are sorted into feeds for different architecture
|
||||
types.
|
||||
|
||||
.. _structure-build-tmp-deploy-rpm:
|
||||
|
||||
``build/tmp/deploy/rpm/``
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
This directory receives any ``.rpm`` packages produced by the build
|
||||
process. The packages are sorted into feeds for different architecture
|
||||
types.
|
||||
|
||||
.. _structure-build-tmp-deploy-ipk:
|
||||
|
||||
``build/tmp/deploy/ipk/``
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
This directory receives ``.ipk`` packages produced by the build process.
|
||||
|
||||
.. _structure-build-tmp-deploy-licenses:
|
||||
|
||||
``build/tmp/deploy/licenses/``
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
This directory receives package licensing information. For example, the
|
||||
directory contains sub-directories for ``bash``, ``busybox``, and
|
||||
``glibc`` (among others) that in turn contain appropriate ``COPYING``
|
||||
license files with other licensing information. For information on
|
||||
licensing, see the
|
||||
":ref:`dev-manual/licenses:maintaining open source license compliance during your product's lifecycle`"
|
||||
section in the Yocto Project Development Tasks Manual.
|
||||
|
||||
.. _structure-build-tmp-deploy-images:
|
||||
|
||||
``build/tmp/deploy/images/``
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
This directory is populated with the basic output objects of the build
|
||||
(think of them as the "generated artifacts" of the build process),
|
||||
including things like the boot loader image, kernel, root filesystem and
|
||||
more. If you want to flash the resulting image from a build onto a
|
||||
device, look here for the necessary components.
|
||||
|
||||
Be careful when deleting files in this directory. You can safely delete
|
||||
old images from this directory (e.g. ``core-image-*``). However, the
|
||||
kernel (``*zImage*``, ``*uImage*``, etc.), bootloader and other
|
||||
supplementary files might be deployed here prior to building an image.
|
||||
Because these files are not directly produced from the image, if you
|
||||
delete them they will not be automatically re-created when you build the
|
||||
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::
|
||||
|
||||
$ bitbake -c clean virtual/kernel
|
||||
$ bitbake virtual/kernel
|
||||
|
||||
.. _structure-build-tmp-deploy-sdk:
|
||||
|
||||
``build/tmp/deploy/sdk/``
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The OpenEmbedded build system creates this directory to hold toolchain
|
||||
installer scripts which, when executed, install the sysroot that matches
|
||||
your target hardware. You can find out more about these installers in
|
||||
the ":ref:`sdk-manual/appendix-obtain:building an sdk installer`"
|
||||
section in the Yocto Project Application Development and the Extensible
|
||||
Software Development Kit (eSDK) manual.
|
||||
|
||||
.. _structure-build-tmp-hosttools:
|
||||
|
||||
``build/tmp/hosttools/``
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The OpenEmbedded build system uses this directory to create symbolic links to
|
||||
some of the host components that are allowed to be called within tasks. These
|
||||
are basic components listed in the :ref:`ref-manual/system-requirements:required
|
||||
packages for the build host` section. These components are also listed in the
|
||||
:term:`HOSTTOOLS` variable and are limited to this list to prevent host
|
||||
contamination.
|
||||
|
||||
.. _structure-build-tmp-pkgdata:
|
||||
|
||||
``build/tmp/pkgdata/``
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The OpenEmbedded build system uses this directory to store package metadata
|
||||
generated during the :ref:`ref-tasks-packagedata` task. The files stored in this
|
||||
directory contain information about each output package produced by the
|
||||
OpenEmbedded build system, and are used in different ways by the build system
|
||||
such as ":ref:`dev-manual/debugging:viewing package information with
|
||||
``oe-pkgdata-util```".
|
||||
|
||||
.. _structure-build-tmp-sstate-control:
|
||||
|
||||
``build/tmp/sstate-control/``
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The OpenEmbedded build system uses this directory for the shared state
|
||||
manifest files. The shared state code uses these files to record the
|
||||
files installed by each sstate task so that the files can be removed
|
||||
when cleaning the recipe or when a newer version is about to be
|
||||
installed. The build system also uses the manifests to detect and
|
||||
produce a warning when files from one task are overwriting those from
|
||||
another.
|
||||
|
||||
.. _structure-build-tmp-sysroots-components:
|
||||
|
||||
``build/tmp/sysroots-components/``
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
This directory is the location of the sysroot contents that the task
|
||||
:ref:`ref-tasks-prepare_recipe_sysroot`
|
||||
links or copies into the recipe-specific sysroot for each recipe listed
|
||||
in :term:`DEPENDS`. Population of this directory is
|
||||
handled through shared state, while the path is specified by the
|
||||
:term:`COMPONENTS_DIR` variable. Apart from a few
|
||||
unusual circumstances, handling of the ``sysroots-components`` directory
|
||||
should be automatic, and recipes should not directly reference
|
||||
``build/tmp/sysroots-components``.
|
||||
|
||||
.. _structure-build-tmp-sysroots:
|
||||
|
||||
``build/tmp/sysroots/``
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Previous versions of the OpenEmbedded build system used to create a
|
||||
global shared sysroot per machine along with a native sysroot. Since
|
||||
the 2.3 version of the Yocto Project, there are sysroots in
|
||||
recipe-specific :term:`WORKDIR` directories. Thus, the
|
||||
``build/tmp/sysroots/`` directory is unused.
|
||||
|
||||
.. note::
|
||||
|
||||
The ``build/tmp/sysroots/`` directory can still be populated using the
|
||||
``bitbake build-sysroots`` command and can be used for compatibility in some
|
||||
cases. However, in general it is not recommended to populate this directory.
|
||||
Individual recipe-specific sysroots should be used.
|
||||
|
||||
.. _structure-build-tmp-stamps:
|
||||
|
||||
``build/tmp/stamps/``
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
This directory holds information that BitBake uses for accounting
|
||||
purposes to track what tasks have run and when they have run. The
|
||||
directory is sub-divided by architecture, package name, and version.
|
||||
Here is an example::
|
||||
|
||||
stamps/all-poky-linux/distcc-config/1.0-r0.do_build-2fdd....2do
|
||||
|
||||
Although the files in the directory are empty of data, BitBake uses the filenames
|
||||
and timestamps for tracking purposes.
|
||||
|
||||
For information on how BitBake uses stamp files to determine if a task
|
||||
should be rerun, see the
|
||||
":ref:`overview-manual/concepts:stamp files and the rerunning of tasks`"
|
||||
section in the Yocto Project Overview and Concepts Manual.
|
||||
|
||||
.. _structure-build-tmp-log:
|
||||
|
||||
``build/tmp/log/``
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
This directory contains general logs that are not otherwise placed using
|
||||
the package's :term:`WORKDIR`. Examples of logs are the output from the
|
||||
``do_check_pkg`` or ``do_distro_check`` tasks. Running a build does not
|
||||
necessarily mean this directory is created.
|
||||
|
||||
.. _structure-build-tmp-work:
|
||||
|
||||
``build/tmp/work/``
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
This directory contains architecture-specific work sub-directories for
|
||||
packages built by BitBake. All tasks execute from the appropriate work
|
||||
directory. For example, the source for a particular package is unpacked,
|
||||
patched, configured and compiled all within its own work directory.
|
||||
Within the work directory, organization is based on the package group
|
||||
and version for which the source is being compiled as defined by the
|
||||
:term:`WORKDIR`.
|
||||
|
||||
It is worth considering the structure of a typical work directory. As an
|
||||
example, consider ``linux-yocto-kernel-3.0`` on the machine ``qemux86``
|
||||
built within the Yocto Project. For this package, a work directory of
|
||||
``tmp/work/qemux86-poky-linux/linux-yocto/3.0+git1+<.....>``, referred
|
||||
to as the :term:`WORKDIR`, is created. Within this directory, the source is
|
||||
unpacked to ``linux-qemux86-standard-build`` and then patched by Quilt.
|
||||
(See the ":ref:`dev-manual/quilt:using quilt in your workflow`" section in
|
||||
the Yocto Project Development Tasks Manual for more information.) Within
|
||||
the ``linux-qemux86-standard-build`` directory, standard Quilt
|
||||
directories ``linux-3.0/patches`` and ``linux-3.0/.pc`` are created, and
|
||||
standard Quilt commands can be used.
|
||||
|
||||
There are other directories generated within :term:`WORKDIR`. The most
|
||||
important directory is ``WORKDIR/temp/``, which has log files for each
|
||||
task (``log.do_*.pid``) and contains the scripts BitBake runs for each
|
||||
task (``run.do_*.pid``). The ``WORKDIR/image/`` directory is where "make
|
||||
install" places its output that is then split into sub-packages within
|
||||
``WORKDIR/packages-split/``.
|
||||
|
||||
.. _structure-build-tmp-work-tunearch-recipename-version:
|
||||
|
||||
``build/tmp/work/tunearch/recipename/version/``
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The recipe work directory --- ``${WORKDIR}``.
|
||||
|
||||
As described earlier in the
|
||||
":ref:`structure-build-tmp-sysroots`" section,
|
||||
beginning with the 2.3 release of the Yocto Project, the OpenEmbedded
|
||||
build system builds each recipe in its own work directory (i.e.
|
||||
:term:`WORKDIR`). The path to the work directory is
|
||||
constructed using the architecture of the given build (e.g.
|
||||
:term:`TUNE_PKGARCH`, :term:`MACHINE_ARCH`, or "allarch"), the recipe
|
||||
name, and the version of the recipe (i.e.
|
||||
:term:`PE`\ ``:``\ :term:`PV`\ ``-``\ :term:`PR`).
|
||||
|
||||
Here are key subdirectories within each recipe work directory:
|
||||
|
||||
- ``${WORKDIR}/temp``: Contains the log files of each task executed for
|
||||
this recipe, the "run" files for each executed task, which contain
|
||||
the code run, and a ``log.task_order`` file, which lists the order in
|
||||
which tasks were executed.
|
||||
|
||||
- ``${WORKDIR}/image``: Contains the output of the
|
||||
:ref:`ref-tasks-install` task, which corresponds to
|
||||
the ``${``\ :term:`D`\ ``}`` variable in that task.
|
||||
|
||||
- ``${WORKDIR}/pseudo``: Contains the pseudo database and log for any
|
||||
tasks executed under pseudo for the recipe.
|
||||
|
||||
- ``${WORKDIR}/sysroot-destdir``: Contains the output of the
|
||||
:ref:`ref-tasks-populate_sysroot` task.
|
||||
|
||||
- ``${WORKDIR}/package``: Contains the output of the
|
||||
:ref:`ref-tasks-package` task before the output is
|
||||
split into individual packages.
|
||||
|
||||
- ``${WORKDIR}/packages-split``: Contains the output of the
|
||||
:ref:`ref-tasks-package` task after the output has been split into individual
|
||||
packages. There are subdirectories for each individual package created by
|
||||
the recipe.
|
||||
|
||||
- ``${WORKDIR}/recipe-sysroot``: A directory populated with the target
|
||||
dependencies of the recipe. This directory looks like the target
|
||||
filesystem and contains libraries that the recipe might need to link
|
||||
against (e.g. the C library).
|
||||
|
||||
- ``${WORKDIR}/recipe-sysroot-native``: A directory populated with the
|
||||
native dependencies of the recipe. This directory contains the tools
|
||||
the recipe needs to build (e.g. the compiler, Autoconf, libtool, and
|
||||
so forth).
|
||||
|
||||
- ``${WORKDIR}/build``: This subdirectory applies only to recipes that
|
||||
support builds where the source is separate from the build artifacts.
|
||||
The OpenEmbedded build system uses this directory as a separate build
|
||||
directory (i.e. ``${``\ :term:`B`\ ``}``).
|
||||
|
||||
.. _structure-build-work-shared:
|
||||
|
||||
``build/tmp/work-shared/``
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
For efficiency, the OpenEmbedded build system creates and uses this
|
||||
directory to hold recipes that share a work directory with other
|
||||
recipes. This is for example used for ``gcc`` and its variants (e.g.
|
||||
``gcc-cross``, ``libgcc``, ``gcc-runtime``, and so forth), or by the
|
||||
:ref:`ref-classes-kernel` class to make the kernel source code and kernel build
|
||||
artifacts available to out-of-tree kernel modules or other kernel-dependent
|
||||
recipes.
|
||||
|
||||
In practice, only a few recipes make use of the ``work-shared`` directory. This
|
||||
directory is especially useful for recipes that would induce a lot of storage
|
||||
space if they were to be shared with the standard :term:`Sysroot` mechanism.
|
||||
|
||||
.. _structure-meta:
|
||||
|
||||
The Metadata --- ``meta/``
|
||||
==========================
|
||||
|
||||
As mentioned previously, :term:`Metadata` is the core of the
|
||||
Yocto Project. Metadata has several important subdivisions:
|
||||
|
||||
.. _structure-meta-classes:
|
||||
|
||||
``meta/classes*/``
|
||||
------------------
|
||||
|
||||
These directories contain the ``*.bbclass`` files. Class files are used to
|
||||
abstract common code so it can be reused by multiple packages. Every
|
||||
package inherits the :ref:`ref-classes-base` file. Examples of other important
|
||||
classes are :ref:`ref-classes-autotools`, which in theory allows any
|
||||
Autotool-enabled package to work with the Yocto Project with minimal
|
||||
effort. Another example is :ref:`ref-classes-kernel` that contains common code
|
||||
and functions for working with the Linux kernel. Functions like image
|
||||
generation or packaging also have their specific class files such as
|
||||
:ref:`ref-classes-image`, :ref:`ref-classes-rootfs*` and
|
||||
:ref:`package*.bbclass <ref-classes-package>`.
|
||||
|
||||
For reference information on classes, see the
|
||||
":doc:`/ref-manual/classes`" chapter.
|
||||
|
||||
.. _structure-meta-conf:
|
||||
|
||||
``meta/conf/``
|
||||
--------------
|
||||
|
||||
This directory contains the core set of configuration files that start
|
||||
from ``bitbake.conf`` and from which all other configuration files are
|
||||
included. See the include statements at the end of the ``bitbake.conf``
|
||||
file and you will note that even ``local.conf`` is loaded from there.
|
||||
While ``bitbake.conf`` sets up the defaults, you can often override
|
||||
these by using the (``local.conf``) file, machine file or the
|
||||
distribution configuration file.
|
||||
|
||||
.. _structure-meta-conf-machine:
|
||||
|
||||
``meta/conf/machine/``
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
This directory contains all the machine configuration files. If you set
|
||||
``MACHINE = "qemux86"``, the OpenEmbedded build system looks for a
|
||||
``qemux86.conf`` file in this directory. The ``include`` directory
|
||||
contains various data common to multiple machines. If you want to add
|
||||
support for a new machine to the Yocto Project, look in this directory.
|
||||
|
||||
.. _structure-meta-conf-distro:
|
||||
|
||||
``meta/conf/distro/``
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The contents of this directory controls any distribution-specific
|
||||
configurations. For the Yocto Project, the ``defaultsetup.conf`` is the
|
||||
main file here. This directory includes the versions and the :term:`SRCDATE`
|
||||
definitions for applications that are configured here. An example of an
|
||||
alternative configuration might be ``poky-bleeding.conf``. Although this
|
||||
file mainly inherits its configuration from Poky.
|
||||
|
||||
.. _structure-meta-conf-machine-sdk:
|
||||
|
||||
``meta/conf/machine-sdk/``
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The OpenEmbedded build system searches this directory for configuration
|
||||
files that correspond to the value of
|
||||
:term:`SDKMACHINE`. By default, 32-bit and 64-bit x86
|
||||
files ship with the Yocto Project that support some SDK hosts. However,
|
||||
it is possible to extend that support to other SDK hosts by adding
|
||||
additional configuration files in this subdirectory within another
|
||||
layer.
|
||||
|
||||
.. _structure-meta-files:
|
||||
|
||||
``meta/files/``
|
||||
---------------
|
||||
|
||||
This directory contains common license files and several text files used
|
||||
by the build system. The text files contain minimal device information
|
||||
and lists of files and directories with known permissions.
|
||||
|
||||
.. _structure-meta-lib:
|
||||
|
||||
``meta/lib/``
|
||||
-------------
|
||||
|
||||
This directory contains OpenEmbedded Python library code used during the
|
||||
build process. It is enabled via the ``addpylib`` directive in
|
||||
``meta/conf/local.conf``. For more information, see
|
||||
:ref:`bitbake-user-manual/bitbake-user-manual-metadata:extending python library code`.
|
||||
|
||||
.. _structure-meta-recipes-bsp:
|
||||
|
||||
``meta/recipes-bsp/``
|
||||
---------------------
|
||||
|
||||
This directory contains anything linking to specific hardware or
|
||||
hardware configuration information such as "u-boot" and "grub".
|
||||
|
||||
.. _structure-meta-recipes-connectivity:
|
||||
|
||||
``meta/recipes-connectivity/``
|
||||
------------------------------
|
||||
|
||||
This directory contains libraries and applications related to
|
||||
communication with other devices.
|
||||
|
||||
.. _structure-meta-recipes-core:
|
||||
|
||||
``meta/recipes-core/``
|
||||
----------------------
|
||||
|
||||
This directory contains what is needed to build a basic working Linux
|
||||
image including commonly used dependencies.
|
||||
|
||||
.. _structure-meta-recipes-devtools:
|
||||
|
||||
``meta/recipes-devtools/``
|
||||
--------------------------
|
||||
|
||||
This directory contains tools that are primarily used by the build
|
||||
system. The tools, however, can also be used on targets.
|
||||
|
||||
.. _structure-meta-recipes-extended:
|
||||
|
||||
``meta/recipes-extended/``
|
||||
--------------------------
|
||||
|
||||
This directory contains non-essential applications that add features
|
||||
compared to the alternatives in core. You might need this directory for
|
||||
full tool functionality.
|
||||
|
||||
.. _structure-meta-recipes-gnome:
|
||||
|
||||
``meta/recipes-gnome/``
|
||||
-----------------------
|
||||
|
||||
This directory contains all things related to the GTK+ application
|
||||
framework.
|
||||
|
||||
.. _structure-meta-recipes-graphics:
|
||||
|
||||
``meta/recipes-graphics/``
|
||||
--------------------------
|
||||
|
||||
This directory contains X and other graphically related system
|
||||
libraries.
|
||||
|
||||
.. _structure-meta-recipes-kernel:
|
||||
|
||||
``meta/recipes-kernel/``
|
||||
------------------------
|
||||
|
||||
This directory contains the kernel and generic applications and
|
||||
libraries that have strong kernel dependencies.
|
||||
|
||||
.. _structure-meta-recipes-multimedia:
|
||||
|
||||
``meta/recipes-multimedia/``
|
||||
----------------------------
|
||||
|
||||
This directory contains codecs and support utilities for audio, images
|
||||
and video.
|
||||
|
||||
.. _structure-meta-recipes-rt:
|
||||
|
||||
``meta/recipes-rt/``
|
||||
--------------------
|
||||
|
||||
This directory contains package and image recipes for using and testing
|
||||
the ``PREEMPT_RT`` kernel.
|
||||
|
||||
.. _structure-meta-recipes-sato:
|
||||
|
||||
``meta/recipes-sato/``
|
||||
----------------------
|
||||
|
||||
This directory contains the Sato demo/reference UI/UX and its associated
|
||||
applications and configuration data.
|
||||
|
||||
.. _structure-meta-recipes-support:
|
||||
|
||||
``meta/recipes-support/``
|
||||
-------------------------
|
||||
|
||||
This directory contains recipes used by other recipes, but that are not
|
||||
directly included in images (i.e. dependencies of other recipes).
|
||||
|
||||
.. _structure-meta-site:
|
||||
|
||||
``meta/site/``
|
||||
--------------
|
||||
|
||||
This directory contains a list of cached results for various
|
||||
architectures. Because certain "autoconf" test results cannot be
|
||||
determined when cross-compiling due to the tests not able to run on a
|
||||
live system, the information in this directory is passed to "autoconf"
|
||||
for the various architectures.
|
||||
|
||||
.. _structure-meta-recipes-txt:
|
||||
|
||||
``meta/recipes.txt``
|
||||
--------------------
|
||||
|
||||
This file is a description of the contents of ``recipes-*``.
|
||||
1898
sources/poky/documentation/ref-manual/svg/releases.svg
Normal file
1898
sources/poky/documentation/ref-manual/svg/releases.svg
Normal file
File diff suppressed because it is too large
Load Diff
|
After Width: | Height: | Size: 117 KiB |
477
sources/poky/documentation/ref-manual/system-requirements.rst
Normal file
477
sources/poky/documentation/ref-manual/system-requirements.rst
Normal file
@@ -0,0 +1,477 @@
|
||||
.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
|
||||
|
||||
*******************
|
||||
System Requirements
|
||||
*******************
|
||||
|
||||
Welcome to the Yocto Project Reference Manual. This manual provides
|
||||
reference information for the current release of the Yocto Project, and
|
||||
is most effectively used after you have an understanding of the basics
|
||||
of the Yocto Project. The manual is neither meant to be read as a
|
||||
starting point to the Yocto Project, nor read from start to finish.
|
||||
Rather, use this manual to find variable definitions, class
|
||||
descriptions, and so forth as needed during the course of using the
|
||||
Yocto Project.
|
||||
|
||||
For introductory information on the Yocto Project, see the
|
||||
:yocto_home:`Yocto Project Website <>` and the
|
||||
":ref:`overview-manual/development-environment:the yocto project development environment`"
|
||||
chapter in the Yocto Project Overview and Concepts Manual.
|
||||
|
||||
If you want to use the Yocto Project to quickly build an image without
|
||||
having to understand concepts, work through the
|
||||
:doc:`/brief-yoctoprojectqs/index` document. You can find "how-to"
|
||||
information in the :doc:`/dev-manual/index`. You can find Yocto Project overview
|
||||
and conceptual information in the :doc:`/overview-manual/index`.
|
||||
|
||||
.. note::
|
||||
|
||||
For more information about the Yocto Project Documentation set, see
|
||||
the :ref:`ref-manual/resources:links and related documentation` section.
|
||||
|
||||
Minimum Free Disk Space
|
||||
=======================
|
||||
|
||||
To build an image such as ``core-image-sato`` for the ``qemux86-64`` machine,
|
||||
you need a system with at least &MIN_DISK_SPACE; Gbytes of free disk space.
|
||||
However, much more disk space will be necessary to build more complex images,
|
||||
to run multiple builds and to cache build artifacts, improving build efficiency.
|
||||
|
||||
If you have a shortage of disk space, see the ":doc:`/dev-manual/disk-space`"
|
||||
section of the Development Tasks Manual.
|
||||
|
||||
.. _system-requirements-minimum-ram:
|
||||
|
||||
Minimum System RAM
|
||||
==================
|
||||
|
||||
You will manage to build an image such as ``core-image-sato`` for the
|
||||
``qemux86-64`` machine with as little as &MIN_RAM; Gbytes of RAM on an old
|
||||
system with 4 CPU cores, but your builds will be much faster on a system with
|
||||
as much RAM and as many CPU cores as possible.
|
||||
|
||||
.. _system-requirements-supported-distros:
|
||||
|
||||
Supported Linux Distributions
|
||||
=============================
|
||||
|
||||
Currently, the &DISTRO; release ("&DISTRO_NAME;") of the Yocto Project is
|
||||
supported on the following distributions:
|
||||
|
||||
- Ubuntu 20.04 (LTS)
|
||||
|
||||
- Ubuntu 22.04 (LTS)
|
||||
|
||||
- Ubuntu 23.04
|
||||
|
||||
- Fedora 38
|
||||
|
||||
- Fedora 39
|
||||
|
||||
- CentOS Stream 8
|
||||
|
||||
- Debian GNU/Linux 11 (Bullseye)
|
||||
|
||||
- Debian GNU/Linux 12 (Bookworm)
|
||||
|
||||
- OpenSUSE Leap 15.4
|
||||
|
||||
- AlmaLinux 8
|
||||
|
||||
- AlmaLinux 9
|
||||
|
||||
- Rocky 9
|
||||
|
||||
The following distribution versions are still tested, even though the
|
||||
organizations publishing them no longer make updates publicly available:
|
||||
|
||||
- Ubuntu 18.04 (LTS)
|
||||
|
||||
- Ubuntu 23.04
|
||||
|
||||
Note that the Yocto Project doesn't have access to private updates
|
||||
that some of these versions may have. Therefore, our testing has
|
||||
limited value if you have access to such updates.
|
||||
|
||||
Finally, here are the distribution versions which were previously
|
||||
tested on former revisions of "&DISTRO_NAME;", but no longer are:
|
||||
|
||||
*This list is currently empty*
|
||||
|
||||
.. note::
|
||||
|
||||
- While the Yocto Project Team attempts to ensure all Yocto Project
|
||||
releases are one hundred percent compatible with each officially
|
||||
supported Linux distribution, you may still encounter problems
|
||||
that happen only with a specific distribution.
|
||||
|
||||
- Yocto Project releases are tested against the stable Linux
|
||||
distributions in the above list. The Yocto Project should work
|
||||
on other distributions but validation is not performed against
|
||||
them.
|
||||
|
||||
- In particular, the Yocto Project does not support and currently
|
||||
has no plans to support rolling-releases or development
|
||||
distributions due to their constantly changing nature. We welcome
|
||||
patches and bug reports, but keep in mind that our priority is on
|
||||
the supported platforms listed above.
|
||||
|
||||
- If your Linux distribution is not in the above list, we recommend to
|
||||
get the :term:`buildtools` or :term:`buildtools-extended` tarballs
|
||||
containing the host tools required by your Yocto Project release,
|
||||
typically by running ``scripts/install-buildtools`` as explained in
|
||||
the ":ref:`system-requirements-buildtools`" section.
|
||||
|
||||
- You may use Windows Subsystem For Linux v2 to set up a build host
|
||||
using Windows 10 or later, or Windows Server 2019 or later, but validation
|
||||
is not performed against build hosts using WSL 2.
|
||||
|
||||
See the
|
||||
:ref:`dev-manual/start:setting up to use windows subsystem for linux (wsl 2)`
|
||||
section in the Yocto Project Development Tasks Manual for more information.
|
||||
|
||||
- If you encounter problems, please go to :yocto_bugs:`Yocto Project
|
||||
Bugzilla <>` and submit a bug. We are
|
||||
interested in hearing about your experience. For information on
|
||||
how to submit a bug, see the Yocto Project
|
||||
:yocto_wiki:`Bugzilla wiki page </Bugzilla_Configuration_and_Bug_Tracking>`
|
||||
and the ":doc:`../contributor-guide/report-defect`"
|
||||
section in the Yocto Project and OpenEmbedded Contributor Guide.
|
||||
|
||||
Required Packages for the Build Host
|
||||
====================================
|
||||
|
||||
The list of packages you need on the host development system can be
|
||||
large when covering all build scenarios using the Yocto Project. This
|
||||
section describes required packages according to Linux distribution and
|
||||
function.
|
||||
|
||||
.. _ubuntu-packages:
|
||||
|
||||
Ubuntu and Debian
|
||||
-----------------
|
||||
|
||||
Here are the packages needed to build an image on a headless system
|
||||
with a supported Ubuntu or Debian Linux distribution::
|
||||
|
||||
$ sudo apt install &UBUNTU_DEBIAN_HOST_PACKAGES_ESSENTIAL;
|
||||
|
||||
You also need to ensure you have the ``en_US.UTF-8`` locale enabled::
|
||||
|
||||
$ locale --all-locales | grep en_US.utf8
|
||||
|
||||
If this is not the case, you can reconfigure the ``locales`` package to add it
|
||||
(requires an interactive shell)::
|
||||
|
||||
$ sudo dpkg-reconfigure locales
|
||||
|
||||
.. note::
|
||||
|
||||
- If you are not in an interactive shell, ``dpkg-reconfigure`` will
|
||||
not work as expected. To add the locale you will need to edit
|
||||
``/etc/locale.gen`` file to add/uncomment the ``en_US.UTF-8`` locale.
|
||||
A naive way to do this as root is::
|
||||
|
||||
$ echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
|
||||
$ locale-gen
|
||||
|
||||
- If your build system has the ``oss4-dev`` package installed, you
|
||||
might experience QEMU build failures due to the package installing
|
||||
its own custom ``/usr/include/linux/soundcard.h`` on the Debian
|
||||
system. If you run into this situation, try either of these solutions::
|
||||
|
||||
$ sudo apt build-dep qemu
|
||||
$ sudo apt remove oss4-dev
|
||||
|
||||
Here are the packages needed to build Project documentation manuals::
|
||||
|
||||
$ sudo apt install &UBUNTU_DEBIAN_HOST_PACKAGES_DOC;
|
||||
|
||||
In addition to the previous packages, here are the packages needed to build the
|
||||
documentation in PDF format::
|
||||
|
||||
$ sudo apt install &UBUNTU_DEBIAN_HOST_PACKAGES_DOC_PDF;
|
||||
|
||||
Fedora Packages
|
||||
---------------
|
||||
|
||||
Here are the packages needed to build an image on a headless system
|
||||
with a supported Fedora Linux distribution::
|
||||
|
||||
$ sudo dnf install &FEDORA_HOST_PACKAGES_ESSENTIAL;
|
||||
|
||||
Here are the packages needed to build Project documentation manuals::
|
||||
|
||||
$ sudo dnf install &FEDORA_HOST_PACKAGES_DOC;
|
||||
$ sudo pip3 install &PIP3_HOST_PACKAGES_DOC;
|
||||
|
||||
In addition to the previous packages, here are the packages needed to build the
|
||||
documentation in PDF format::
|
||||
|
||||
$ sudo dnf install &FEDORA_HOST_PACKAGES_DOC_PDF;
|
||||
|
||||
openSUSE Packages
|
||||
-----------------
|
||||
|
||||
Here are the packages needed to build an image on a headless system
|
||||
with a supported openSUSE distribution::
|
||||
|
||||
$ sudo zypper install &OPENSUSE_HOST_PACKAGES_ESSENTIAL;
|
||||
$ sudo pip3 install &OPENSUSE_PIP3_HOST_PACKAGES_ESSENTIAL;
|
||||
|
||||
Here are the packages needed to build Project documentation manuals::
|
||||
|
||||
$ sudo zypper install &OPENSUSE_HOST_PACKAGES_DOC;
|
||||
$ sudo pip3 install &PIP3_HOST_PACKAGES_DOC;
|
||||
|
||||
In addition to the previous packages, here are the packages needed to build the
|
||||
documentation in PDF format::
|
||||
|
||||
$ sudo zypper install &OPENSUSE_HOST_PACKAGES_DOC_PDF;
|
||||
|
||||
|
||||
AlmaLinux Packages
|
||||
------------------
|
||||
|
||||
Here are the packages needed to build an image on a headless system
|
||||
with a supported AlmaLinux distribution::
|
||||
|
||||
$ sudo dnf install -y epel-release
|
||||
$ sudo yum install dnf-plugins-core
|
||||
$ sudo dnf config-manager --set-enabled crb
|
||||
$ sudo dnf makecache
|
||||
$ sudo dnf install &ALMALINUX_HOST_PACKAGES_ESSENTIAL;
|
||||
|
||||
.. note::
|
||||
|
||||
- Extra Packages for Enterprise Linux (i.e. ``epel-release``) is
|
||||
a collection of packages from Fedora built on RHEL/CentOS for
|
||||
easy installation of packages not included in enterprise Linux
|
||||
by default. You need to install these packages separately.
|
||||
|
||||
- The ``PowerTools/CRB`` repo provides additional packages such as
|
||||
``rpcgen`` and ``texinfo``.
|
||||
|
||||
- The ``makecache`` command consumes additional Metadata from
|
||||
``epel-release``.
|
||||
|
||||
Here are the packages needed to build Project documentation manuals::
|
||||
|
||||
$ sudo dnf install &ALMALINUX_HOST_PACKAGES_DOC;
|
||||
$ sudo pip3 install &PIP3_HOST_PACKAGES_DOC;
|
||||
|
||||
In addition to the previous packages, here are the packages needed to build the
|
||||
documentation in PDF format::
|
||||
|
||||
$ sudo dnf install &ALMALINUX_HOST_PACKAGES_DOC_PDF;
|
||||
|
||||
.. warning::
|
||||
|
||||
Unlike Fedora or OpenSUSE, AlmaLinux does not provide the packages
|
||||
``texlive-collection-fontsextra``, ``texlive-collection-lang*`` and
|
||||
``texlive-collection-latexextra``, so you may run into issues. These may be
|
||||
installed using `tlmgr <https://tug.org/texlive/tlmgr.html>`_.
|
||||
|
||||
.. _system-requirements-buildtools:
|
||||
|
||||
Required Git, tar, Python, make and gcc Versions
|
||||
================================================
|
||||
|
||||
In order to use the build system, your host development system must meet
|
||||
the following version requirements for Git, tar, and Python:
|
||||
|
||||
- Git &MIN_GIT_VERSION; or greater
|
||||
|
||||
- tar &MIN_TAR_VERSION; or greater
|
||||
|
||||
- Python &MIN_PYTHON_VERSION; or greater
|
||||
|
||||
- GNU make &MIN_MAKE_VERSION; or greater
|
||||
|
||||
If your host development system does not meet all these requirements,
|
||||
you can resolve this by installing a :term:`buildtools` tarball that
|
||||
contains these tools. You can either download a pre-built tarball or
|
||||
use BitBake to build one.
|
||||
|
||||
In addition, your host development system must meet the following
|
||||
version requirement for gcc:
|
||||
|
||||
- gcc &MIN_GCC_VERSION; or greater
|
||||
|
||||
If your host development system does not meet this requirement, you can
|
||||
resolve this by installing a :term:`buildtools-extended` tarball that
|
||||
contains additional tools, the equivalent of the Debian/Ubuntu ``build-essential``
|
||||
package.
|
||||
|
||||
For systems with a broken make version (e.g. make 4.2.1 without patches) but
|
||||
where the rest of the host tools are usable, you can use the :term:`buildtools-make`
|
||||
tarball instead.
|
||||
|
||||
In the sections that follow, three different methods will be described for
|
||||
installing the :term:`buildtools`, :term:`buildtools-extended` or :term:`buildtools-make`
|
||||
toolset.
|
||||
|
||||
Installing a Pre-Built ``buildtools`` Tarball with ``install-buildtools`` script
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
The ``install-buildtools`` script is the easiest of the three methods by
|
||||
which you can get these tools. It downloads a pre-built :term:`buildtools`
|
||||
installer and automatically installs the tools for you:
|
||||
|
||||
#. Execute the ``install-buildtools`` script. Here is an example::
|
||||
|
||||
$ cd poky
|
||||
$ scripts/install-buildtools \
|
||||
--without-extended-buildtools \
|
||||
--base-url &YOCTO_DL_URL;/releases/yocto \
|
||||
--release yocto-&DISTRO; \
|
||||
--installer-version &DISTRO;
|
||||
|
||||
During execution, the :term:`buildtools` tarball will be downloaded, the
|
||||
checksum of the download will be verified, the installer will be run
|
||||
for you, and some basic checks will be run to make sure the
|
||||
installation is functional.
|
||||
|
||||
To avoid the need of ``sudo`` privileges, the ``install-buildtools``
|
||||
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 :term:`buildtools-extended` tarball, you can instead execute the
|
||||
``install-buildtools`` script with the default parameters::
|
||||
|
||||
$ cd poky
|
||||
$ scripts/install-buildtools
|
||||
|
||||
Alternatively if your host development system has a broken ``make``
|
||||
version such that you only need a known good version of ``make``,
|
||||
you can use the ``--make-only`` option::
|
||||
|
||||
$ cd poky
|
||||
$ scripts/install-buildtools --make-only
|
||||
|
||||
#. Source the tools environment setup script by using a command like the
|
||||
following::
|
||||
|
||||
$ source /path/to/poky/buildtools/environment-setup-x86_64-pokysdk-linux
|
||||
|
||||
After you have sourced the setup script, the tools are added to
|
||||
``PATH`` and any other environment variables required to run the
|
||||
tools are initialized. The results are working versions versions of
|
||||
Git, tar, Python and ``chrpath``. And in the case of the
|
||||
:term:`buildtools-extended` tarball, additional working versions of tools
|
||||
including ``gcc``, ``make`` and the other tools included in
|
||||
``packagegroup-core-buildessential``.
|
||||
|
||||
Downloading a Pre-Built ``buildtools`` Tarball
|
||||
----------------------------------------------
|
||||
|
||||
If you would prefer not to use the ``install-buildtools`` script, you can instead
|
||||
download and run a pre-built :term:`buildtools` installer yourself with the following
|
||||
steps:
|
||||
|
||||
#. Go to :yocto_dl:`/releases/yocto/&DISTRO_REL_LATEST_TAG;/buildtools/`, locate and
|
||||
download the ``.sh`` file corresponding to your host architecture
|
||||
and to :term:`buildtools`, :term:`buildtools-extended` or :term:`buildtools-make`.
|
||||
|
||||
#. Execute the installation script. Here is an example for the
|
||||
traditional installer::
|
||||
|
||||
$ sh ~/Downloads/x86_64-buildtools-nativesdk-standalone-&DISTRO;.sh
|
||||
|
||||
Here is an example for the extended installer::
|
||||
|
||||
$ sh ~/Downloads/x86_64-buildtools-extended-nativesdk-standalone-&DISTRO;.sh
|
||||
|
||||
An example for the make-only installer::
|
||||
|
||||
$ sh ~/Downloads/x86_64-buildtools-make-nativesdk-standalone-&DISTRO;.sh
|
||||
|
||||
During execution, a prompt appears that allows you to choose the
|
||||
installation directory. For example, you could choose the following:
|
||||
``/home/your-username/buildtools``
|
||||
|
||||
#. As instructed by the installer script, you will have to source the tools
|
||||
environment setup script::
|
||||
|
||||
$ source /home/your_username/buildtools/environment-setup-x86_64-pokysdk-linux
|
||||
|
||||
After you have sourced the setup script, the tools are added to
|
||||
``PATH`` and any other environment variables required to run the
|
||||
tools are initialized. The results are working versions versions of
|
||||
Git, tar, Python and ``chrpath``. And in the case of the
|
||||
:term:`buildtools-extended` tarball, additional working versions of tools
|
||||
including ``gcc``, ``make`` and the other tools included in
|
||||
``packagegroup-core-buildessential``.
|
||||
|
||||
Building Your Own ``buildtools`` Tarball
|
||||
----------------------------------------
|
||||
|
||||
Building and running your own :term:`buildtools` installer applies only when you
|
||||
have a build host that can already run BitBake. In this case, you use
|
||||
that machine to build the ``.sh`` file and then take steps to transfer
|
||||
and run it on a machine that does not meet the minimal Git, tar, and
|
||||
Python (or gcc) requirements.
|
||||
|
||||
Here are the steps to take to build and run your own :term:`buildtools`
|
||||
installer:
|
||||
|
||||
#. On the machine that is able to run BitBake, be sure you have set up
|
||||
your build environment with the setup script
|
||||
(:ref:`structure-core-script`).
|
||||
|
||||
#. Run the BitBake command to build the tarball::
|
||||
|
||||
$ bitbake buildtools-tarball
|
||||
|
||||
or to build the extended tarball::
|
||||
|
||||
$ bitbake buildtools-extended-tarball
|
||||
|
||||
or to build the make-only tarball::
|
||||
|
||||
$ bitbake buildtools-make-tarball
|
||||
|
||||
.. note::
|
||||
|
||||
The :term:`SDKMACHINE` variable in your ``local.conf`` file determines
|
||||
whether you build tools for a 32-bit or 64-bit system.
|
||||
|
||||
Once the build completes, you can find the ``.sh`` file that installs
|
||||
the tools in the ``tmp/deploy/sdk`` subdirectory of the
|
||||
:term:`Build Directory`. The installer file has the string
|
||||
"buildtools" or "buildtools-extended" in the name.
|
||||
|
||||
#. Transfer the ``.sh`` file from the build host to the machine that
|
||||
does not meet the Git, tar, or Python (or gcc) requirements.
|
||||
|
||||
#. On this machine, run the ``.sh`` file to install the tools. Here is an
|
||||
example for the traditional installer::
|
||||
|
||||
$ sh ~/Downloads/x86_64-buildtools-nativesdk-standalone-&DISTRO;.sh
|
||||
|
||||
For the extended installer::
|
||||
|
||||
$ sh ~/Downloads/x86_64-buildtools-extended-nativesdk-standalone-&DISTRO;.sh
|
||||
|
||||
And for the make-only installer::
|
||||
|
||||
$ sh ~/Downloads/x86_64-buildtools-make-nativesdk-standalone-&DISTRO;.sh
|
||||
|
||||
During execution, a prompt appears that allows you to choose the
|
||||
installation directory. For example, you could choose the following:
|
||||
``/home/your_username/buildtools``
|
||||
|
||||
#. Source the tools environment setup script by using a command like the
|
||||
following::
|
||||
|
||||
$ source /home/your_username/buildtools/environment-setup-x86_64-poky-linux
|
||||
|
||||
After you have sourced the setup script, the tools are added to
|
||||
``PATH`` and any other environment variables required to run the
|
||||
tools are initialized. The results are working versions versions of
|
||||
Git, tar, Python and ``chrpath``. And in the case of the
|
||||
:term:`buildtools-extended` tarball, additional working versions of tools
|
||||
including ``gcc``, ``make`` and the other tools included in
|
||||
``packagegroup-core-buildessential``.
|
||||
813
sources/poky/documentation/ref-manual/tasks.rst
Normal file
813
sources/poky/documentation/ref-manual/tasks.rst
Normal file
@@ -0,0 +1,813 @@
|
||||
.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
|
||||
|
||||
*****
|
||||
Tasks
|
||||
*****
|
||||
|
||||
Tasks are units of execution for BitBake. Recipes (``.bb`` files) use
|
||||
tasks to complete configuring, compiling, and packaging software. This
|
||||
chapter provides a reference of the tasks defined in the OpenEmbedded
|
||||
build system.
|
||||
|
||||
Normal Recipe Build Tasks
|
||||
=========================
|
||||
|
||||
The following sections describe normal tasks associated with building a
|
||||
recipe. For more information on tasks and dependencies, see the
|
||||
":ref:`bitbake-user-manual/bitbake-user-manual-metadata:tasks`" and
|
||||
":ref:`bitbake-user-manual/bitbake-user-manual-execution:dependencies`" sections in the
|
||||
BitBake User Manual.
|
||||
|
||||
.. _ref-tasks-build:
|
||||
|
||||
``do_build``
|
||||
------------
|
||||
|
||||
The default task for all recipes. This task depends on all other normal
|
||||
tasks required to build a recipe.
|
||||
|
||||
.. _ref-tasks-compile:
|
||||
|
||||
``do_compile``
|
||||
--------------
|
||||
|
||||
Compiles the source code. This task runs with the current working
|
||||
directory set to ``${``\ :term:`B`\ ``}``.
|
||||
|
||||
The default behavior of this task is to run the ``oe_runmake`` function
|
||||
if a makefile (``Makefile``, ``makefile``, or ``GNUmakefile``) is found.
|
||||
If no such file is found, the :ref:`ref-tasks-compile` task does nothing.
|
||||
|
||||
.. _ref-tasks-compile_ptest_base:
|
||||
|
||||
``do_compile_ptest_base``
|
||||
-------------------------
|
||||
|
||||
Compiles the runtime test suite included in the software being built.
|
||||
|
||||
.. _ref-tasks-configure:
|
||||
|
||||
``do_configure``
|
||||
----------------
|
||||
|
||||
Configures the source by enabling and disabling any build-time and
|
||||
configuration options for the software being built. The task runs with
|
||||
the current working directory set to ``${``\ :term:`B`\ ``}``.
|
||||
|
||||
The default behavior of this task is to run ``oe_runmake clean`` if a
|
||||
makefile (``Makefile``, ``makefile``, or ``GNUmakefile``) is found and
|
||||
:term:`CLEANBROKEN` is not set to "1". If no such
|
||||
file is found or the :term:`CLEANBROKEN` variable is set to "1", the
|
||||
:ref:`ref-tasks-configure` task does nothing.
|
||||
|
||||
.. _ref-tasks-configure_ptest_base:
|
||||
|
||||
``do_configure_ptest_base``
|
||||
---------------------------
|
||||
|
||||
Configures the runtime test suite included in the software being built.
|
||||
|
||||
.. _ref-tasks-deploy:
|
||||
|
||||
``do_deploy``
|
||||
-------------
|
||||
|
||||
Writes output files that are to be deployed to
|
||||
``${``\ :term:`DEPLOY_DIR_IMAGE`\ ``}``. The
|
||||
task runs with the current working directory set to
|
||||
``${``\ :term:`B`\ ``}``.
|
||||
|
||||
Recipes implementing this task should inherit the
|
||||
:ref:`ref-classes-deploy` class and should write the output
|
||||
to ``${``\ :term:`DEPLOYDIR`\ ``}``, which is not to be
|
||||
confused with ``${DEPLOY_DIR}``. The :ref:`ref-classes-deploy` class sets up
|
||||
:ref:`ref-tasks-deploy` as a shared state (sstate) task that can be accelerated
|
||||
through sstate use. The sstate mechanism takes care of copying the
|
||||
output from ``${DEPLOYDIR}`` to ``${DEPLOY_DIR_IMAGE}``.
|
||||
|
||||
.. note::
|
||||
|
||||
Do not write the output directly to ``${DEPLOY_DIR_IMAGE}``, as this causes
|
||||
the sstate mechanism to malfunction.
|
||||
|
||||
The :ref:`ref-tasks-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::
|
||||
|
||||
addtask deploy after do_compile
|
||||
|
||||
Adding :ref:`ref-tasks-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 :ref:`ref-classes-base` class contains the following::
|
||||
|
||||
do_build[recrdeptask] += "do_deploy"
|
||||
|
||||
|
||||
See the ":ref:`bitbake-user-manual/bitbake-user-manual-execution:dependencies`"
|
||||
section in the BitBake User Manual for more information.
|
||||
|
||||
If the :ref:`ref-tasks-deploy` task re-executes, any previous output is removed
|
||||
(i.e. "cleaned").
|
||||
|
||||
.. _ref-tasks-fetch:
|
||||
|
||||
``do_fetch``
|
||||
------------
|
||||
|
||||
Fetches the source code. This task uses the :term:`SRC_URI` variable and the
|
||||
argument's prefix to determine the correct
|
||||
:ref:`fetcher <bitbake-user-manual/bitbake-user-manual-fetching:fetchers>`
|
||||
module.
|
||||
|
||||
.. _ref-tasks-image:
|
||||
|
||||
``do_image``
|
||||
------------
|
||||
|
||||
Starts the image generation process. The :ref:`ref-tasks-image` task runs after
|
||||
the OpenEmbedded build system has run the
|
||||
:ref:`ref-tasks-rootfs` task during which packages are
|
||||
identified for installation into the image and the root filesystem is
|
||||
created, complete with post-processing.
|
||||
|
||||
The :ref:`ref-tasks-image` task performs pre-processing on the image through the
|
||||
:term:`IMAGE_PREPROCESS_COMMAND` and
|
||||
dynamically generates supporting :ref:`do_image_* <ref-tasks-image>` tasks as needed.
|
||||
|
||||
For more information on image creation, see the ":ref:`overview-manual/concepts:image generation`"
|
||||
section in the Yocto Project Overview and Concepts Manual.
|
||||
|
||||
.. _ref-tasks-image-complete:
|
||||
|
||||
``do_image_complete``
|
||||
---------------------
|
||||
|
||||
Completes the image generation process. The :ref:`do_image_complete <ref-tasks-image-complete>` task
|
||||
runs after the OpenEmbedded build system has run the
|
||||
:ref:`ref-tasks-image` task during which image
|
||||
pre-processing occurs and through dynamically generated :ref:`do_image_* <ref-tasks-image>`
|
||||
tasks the image is constructed.
|
||||
|
||||
The :ref:`do_image_complete <ref-tasks-image-complete>` task performs post-processing on the image
|
||||
through the
|
||||
:term:`IMAGE_POSTPROCESS_COMMAND`.
|
||||
|
||||
For more information on image creation, see the
|
||||
":ref:`overview-manual/concepts:image generation`"
|
||||
section in the Yocto Project Overview and Concepts Manual.
|
||||
|
||||
.. _ref-tasks-install:
|
||||
|
||||
``do_install``
|
||||
--------------
|
||||
|
||||
Copies files that are to be packaged into the holding area
|
||||
``${``\ :term:`D`\ ``}``. This task runs with the current
|
||||
working directory set to ``${``\ :term:`B`\ ``}``, which is the
|
||||
compilation directory. The :ref:`ref-tasks-install` task, as well as other tasks
|
||||
that either directly or indirectly depend on the installed files (e.g.
|
||||
:ref:`ref-tasks-package`, :ref:`do_package_write_* <ref-tasks-package_write_deb>`, and
|
||||
:ref:`ref-tasks-rootfs`), run under
|
||||
:ref:`fakeroot <overview-manual/concepts:fakeroot and pseudo>`.
|
||||
|
||||
.. note::
|
||||
|
||||
When installing files, be careful not to set the owner and group IDs
|
||||
of the installed files to unintended values. Some methods of copying
|
||||
files, notably when using the recursive ``cp`` command, can preserve
|
||||
the UID and/or GID of the original file, which is usually not what
|
||||
you want. The ``host-user-contaminated`` QA check checks for files
|
||||
that probably have the wrong ownership.
|
||||
|
||||
Safe methods for installing files include the following:
|
||||
|
||||
- The ``install`` utility. This utility is the preferred method.
|
||||
|
||||
- The ``cp`` command with the ``--no-preserve=ownership`` option.
|
||||
|
||||
- The ``tar`` command with the ``--no-same-owner`` option. See the
|
||||
``bin_package.bbclass`` file in the ``meta/classes-recipe``
|
||||
subdirectory of the :term:`Source Directory` for an example.
|
||||
|
||||
.. _ref-tasks-install_ptest_base:
|
||||
|
||||
``do_install_ptest_base``
|
||||
-------------------------
|
||||
|
||||
Copies the runtime test suite files from the compilation directory to a
|
||||
holding area.
|
||||
|
||||
.. _ref-tasks-package:
|
||||
|
||||
``do_package``
|
||||
--------------
|
||||
|
||||
Analyzes the content of the holding area
|
||||
``${``\ :term:`D`\ ``}`` and splits the content into subsets
|
||||
based on available packages and files. This task makes use of the
|
||||
:term:`PACKAGES` and :term:`FILES`
|
||||
variables.
|
||||
|
||||
The :ref:`ref-tasks-package` task, in conjunction with the
|
||||
:ref:`ref-tasks-packagedata` task, also saves some
|
||||
important package metadata. For additional information, see the
|
||||
:term:`PKGDESTWORK` variable and the
|
||||
":ref:`overview-manual/concepts:automatically added runtime dependencies`"
|
||||
section in the Yocto Project Overview and Concepts Manual.
|
||||
|
||||
.. _ref-tasks-package_qa:
|
||||
|
||||
``do_package_qa``
|
||||
-----------------
|
||||
|
||||
Runs QA checks on packaged files. For more information on these checks,
|
||||
see the :ref:`ref-classes-insane` class.
|
||||
|
||||
.. _ref-tasks-package_write_deb:
|
||||
|
||||
``do_package_write_deb``
|
||||
------------------------
|
||||
|
||||
Creates Debian packages (i.e. ``*.deb`` files) and places them in the
|
||||
``${``\ :term:`DEPLOY_DIR_DEB`\ ``}`` directory in
|
||||
the package feeds area. For more information, see the
|
||||
":ref:`overview-manual/concepts:package feeds`" section in
|
||||
the Yocto Project Overview and Concepts Manual.
|
||||
|
||||
.. _ref-tasks-package_write_ipk:
|
||||
|
||||
``do_package_write_ipk``
|
||||
------------------------
|
||||
|
||||
Creates IPK packages (i.e. ``*.ipk`` files) and places them in the
|
||||
``${``\ :term:`DEPLOY_DIR_IPK`\ ``}`` directory in
|
||||
the package feeds area. For more information, see the
|
||||
":ref:`overview-manual/concepts:package feeds`" section in
|
||||
the Yocto Project Overview and Concepts Manual.
|
||||
|
||||
.. _ref-tasks-package_write_rpm:
|
||||
|
||||
``do_package_write_rpm``
|
||||
------------------------
|
||||
|
||||
Creates RPM packages (i.e. ``*.rpm`` files) and places them in the
|
||||
``${``\ :term:`DEPLOY_DIR_RPM`\ ``}`` directory in
|
||||
the package feeds area. For more information, see the
|
||||
":ref:`overview-manual/concepts:package feeds`" section in
|
||||
the Yocto Project Overview and Concepts Manual.
|
||||
|
||||
.. _ref-tasks-packagedata:
|
||||
|
||||
``do_packagedata``
|
||||
------------------
|
||||
|
||||
Saves package metadata generated by the
|
||||
:ref:`ref-tasks-package` task in
|
||||
:term:`PKGDATA_DIR` to make it available globally.
|
||||
|
||||
.. _ref-tasks-patch:
|
||||
|
||||
``do_patch``
|
||||
------------
|
||||
|
||||
Locates patch files and applies them to the source code.
|
||||
|
||||
After fetching and unpacking source files, the build system uses the
|
||||
recipe's :term:`SRC_URI` statements
|
||||
to locate and apply patch files to the source code.
|
||||
|
||||
.. note::
|
||||
|
||||
The build system uses the :term:`FILESPATH` variable to determine the
|
||||
default set of directories when searching for patches.
|
||||
|
||||
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``)::
|
||||
|
||||
poky/meta/recipes-connectivity/bluez5
|
||||
|
||||
This recipe has two patch files located here::
|
||||
|
||||
poky/meta/recipes-connectivity/bluez5/bluez5
|
||||
|
||||
In the ``bluez5`` recipe, the :term:`SRC_URI` statements point to the source
|
||||
and patch files needed to build the package.
|
||||
|
||||
.. note::
|
||||
|
||||
In the case for the ``bluez5_5.48.bb`` recipe, the :term:`SRC_URI` statements
|
||||
are from an include file ``bluez5.inc``.
|
||||
|
||||
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 :term:`SRC_URI` statement to indicate any
|
||||
file as a patch file::
|
||||
|
||||
SRC_URI = " \
|
||||
git://path_to_repo/some_package \
|
||||
file://file;apply=yes \
|
||||
"
|
||||
|
||||
Conversely, if you have a file whose file type is ``.patch`` or ``.diff``
|
||||
and you want to exclude it so that the :ref:`ref-tasks-patch` task does not apply
|
||||
it during the patch phase, you can use the "apply=no" parameter with the
|
||||
:term:`SRC_URI` statement::
|
||||
|
||||
SRC_URI = " \
|
||||
git://path_to_repo/some_package \
|
||||
file://file1.patch \
|
||||
file://file2.patch;apply=no \
|
||||
"
|
||||
|
||||
In the previous example ``file1.patch`` would be applied as a patch by default
|
||||
while ``file2.patch`` would not be applied.
|
||||
|
||||
You can find out more about the patching process in the
|
||||
":ref:`overview-manual/concepts:patching`" section in
|
||||
the Yocto Project Overview and Concepts Manual and the
|
||||
":ref:`dev-manual/new-recipe:patching code`" section in the
|
||||
Yocto Project Development Tasks Manual.
|
||||
|
||||
.. _ref-tasks-populate_lic:
|
||||
|
||||
``do_populate_lic``
|
||||
-------------------
|
||||
|
||||
Writes license information for the recipe that is collected later when
|
||||
the image is constructed.
|
||||
|
||||
.. _ref-tasks-populate_sdk:
|
||||
|
||||
``do_populate_sdk``
|
||||
-------------------
|
||||
|
||||
Creates the file and directory structure for an installable SDK. See the
|
||||
":ref:`overview-manual/concepts:sdk generation`"
|
||||
section in the Yocto Project Overview and Concepts Manual for more
|
||||
information.
|
||||
|
||||
.. _ref-tasks-populate_sdk_ext:
|
||||
|
||||
``do_populate_sdk_ext``
|
||||
-----------------------
|
||||
|
||||
Creates the file and directory structure for an installable extensible
|
||||
SDK (eSDK). See the ":ref:`overview-manual/concepts:sdk generation`"
|
||||
section in the Yocto Project Overview and Concepts Manual for more
|
||||
information.
|
||||
|
||||
|
||||
.. _ref-tasks-populate_sysroot:
|
||||
|
||||
``do_populate_sysroot``
|
||||
-----------------------
|
||||
|
||||
Stages (copies) a subset of the files installed by the
|
||||
:ref:`ref-tasks-install` task into the appropriate
|
||||
sysroot. For information on how to access these files from other
|
||||
recipes, see the :term:`STAGING_DIR* <STAGING_DIR_HOST>` variables.
|
||||
Directories that would typically not be needed by other recipes at build
|
||||
time (e.g. ``/etc``) are not copied by default.
|
||||
|
||||
For information on what directories are copied by default, see the
|
||||
:term:`SYSROOT_DIRS* <SYSROOT_DIRS>` variables. You can change
|
||||
these variables inside your recipe if you need to make additional (or
|
||||
fewer) directories available to other recipes at build time.
|
||||
|
||||
The :ref:`ref-tasks-populate_sysroot` task is a shared state (sstate) task, which
|
||||
means that the task can be accelerated through sstate use. Realize also
|
||||
that if the task is re-executed, any previous output is removed (i.e.
|
||||
"cleaned").
|
||||
|
||||
.. _ref-tasks-prepare_recipe_sysroot:
|
||||
|
||||
``do_prepare_recipe_sysroot``
|
||||
-----------------------------
|
||||
|
||||
Installs the files into the individual recipe specific sysroots (i.e.
|
||||
``recipe-sysroot`` and ``recipe-sysroot-native`` under
|
||||
``${``\ :term:`WORKDIR`\ ``}`` based upon the
|
||||
dependencies specified by :term:`DEPENDS`). See the
|
||||
":ref:`ref-classes-staging`" class for more information.
|
||||
|
||||
.. _ref-tasks-rm_work:
|
||||
|
||||
``do_rm_work``
|
||||
--------------
|
||||
|
||||
Removes work files after the OpenEmbedded build system has finished with
|
||||
them. You can learn more by looking at the
|
||||
":ref:`ref-classes-rm-work`" section.
|
||||
|
||||
.. _ref-tasks-unpack:
|
||||
|
||||
``do_unpack``
|
||||
-------------
|
||||
|
||||
Unpacks the source code into a working directory pointed to by
|
||||
``${``\ :term:`WORKDIR`\ ``}``. The :term:`S`
|
||||
variable also plays a role in where unpacked source files ultimately
|
||||
reside. For more information on how source files are unpacked, see the
|
||||
":ref:`overview-manual/concepts:source fetching`"
|
||||
section in the Yocto Project Overview and Concepts Manual and also see
|
||||
the :term:`WORKDIR` and :term:`S` variable descriptions.
|
||||
|
||||
Manually Called Tasks
|
||||
=====================
|
||||
|
||||
These tasks are typically manually triggered (e.g. by using the
|
||||
``bitbake -c`` command-line option):
|
||||
|
||||
``do_checkuri``
|
||||
---------------
|
||||
|
||||
Validates the :term:`SRC_URI` value.
|
||||
|
||||
.. _ref-tasks-clean:
|
||||
|
||||
``do_clean``
|
||||
------------
|
||||
|
||||
Removes all output files for a target from the
|
||||
:ref:`ref-tasks-unpack` task forward (i.e. :ref:`ref-tasks-unpack`,
|
||||
:ref:`ref-tasks-configure`,
|
||||
:ref:`ref-tasks-compile`,
|
||||
:ref:`ref-tasks-install`, and
|
||||
:ref:`ref-tasks-package`).
|
||||
|
||||
You can run this task using BitBake as follows::
|
||||
|
||||
$ bitbake -c clean recipe
|
||||
|
||||
Running this task does not remove the
|
||||
:ref:`sstate <overview-manual/concepts:shared state cache>` cache files.
|
||||
Consequently, if no changes have been made and the recipe is rebuilt
|
||||
after cleaning, output files are simply restored from the sstate cache.
|
||||
If you want to remove the sstate cache files for the recipe, you need to
|
||||
use the :ref:`ref-tasks-cleansstate` task instead
|
||||
(i.e. ``bitbake -c cleansstate`` recipe).
|
||||
|
||||
.. _ref-tasks-cleanall:
|
||||
|
||||
``do_cleanall``
|
||||
---------------
|
||||
|
||||
Removes all output files, shared state
|
||||
(:ref:`sstate <overview-manual/concepts:shared state cache>`) cache, and
|
||||
downloaded source files for a target (i.e. the contents of
|
||||
:term:`DL_DIR`). Essentially, the :ref:`ref-tasks-cleanall` task is
|
||||
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::
|
||||
|
||||
$ bitbake -c cleanall recipe
|
||||
|
||||
You should never use the :ref:`ref-tasks-cleanall` task in a normal
|
||||
scenario. If you want to start fresh with the :ref:`ref-tasks-fetch` task,
|
||||
use instead::
|
||||
|
||||
$ bitbake -f -c fetch recipe
|
||||
|
||||
.. note::
|
||||
|
||||
The reason to prefer ``bitbake -f -c fetch`` is that the
|
||||
:ref:`ref-tasks-cleanall` task would break in some cases, such as::
|
||||
|
||||
$ bitbake -c fetch recipe
|
||||
$ bitbake -c cleanall recipe-native
|
||||
$ bitbake -c unpack recipe
|
||||
|
||||
because after step 1 there is a stamp file for the
|
||||
:ref:`ref-tasks-fetch` task of ``recipe``, and it won't be removed at
|
||||
step 2 because step 2 uses a different work directory. So the unpack task
|
||||
at step 3 will try to extract the downloaded archive and fail as it has
|
||||
been deleted in step 2.
|
||||
|
||||
Note that this also applies to BitBake from concurrent processes when a
|
||||
shared download directory (:term:`DL_DIR`) is setup.
|
||||
|
||||
.. _ref-tasks-cleansstate:
|
||||
|
||||
``do_cleansstate``
|
||||
------------------
|
||||
|
||||
Removes all output files and shared state
|
||||
(:ref:`sstate <overview-manual/concepts:shared state cache>`) cache for a
|
||||
target. Essentially, the :ref:`ref-tasks-cleansstate` task is identical to the
|
||||
:ref:`ref-tasks-clean` task with the added removal of
|
||||
shared state (:ref:`sstate <overview-manual/concepts:shared state cache>`)
|
||||
cache.
|
||||
|
||||
You can run this task using BitBake as follows::
|
||||
|
||||
$ bitbake -c cleansstate recipe
|
||||
|
||||
When you run the :ref:`ref-tasks-cleansstate` task, the OpenEmbedded build system
|
||||
no longer uses any sstate. Consequently, building the recipe from
|
||||
scratch is guaranteed.
|
||||
|
||||
.. note::
|
||||
|
||||
Using :ref:`ref-tasks-cleansstate` with a shared :term:`SSTATE_DIR` is
|
||||
not recommended because it could trigger an error during the build of a
|
||||
separate BitBake instance. This is because the builds check sstate "up
|
||||
front" but download the files later, so it if is deleted in the
|
||||
meantime, it will cause an error but not a total failure as it will
|
||||
rebuild it.
|
||||
|
||||
The reliable and preferred way to force a new build is to use ``bitbake
|
||||
-f`` instead.
|
||||
|
||||
.. note::
|
||||
|
||||
The :ref:`ref-tasks-cleansstate` task cannot remove sstate from a remote sstate
|
||||
mirror. If you need to build a target from scratch using remote mirrors, use
|
||||
the "-f" option as follows::
|
||||
|
||||
$ bitbake -f -c do_cleansstate target
|
||||
|
||||
|
||||
.. _ref-tasks-pydevshell:
|
||||
|
||||
``do_pydevshell``
|
||||
-----------------
|
||||
|
||||
Starts a shell in which an interactive Python interpreter allows you to
|
||||
interact with the BitBake build environment. From within this shell, you
|
||||
can directly examine and set bits from the data store and execute
|
||||
functions as if within the BitBake environment. See the ":ref:`dev-manual/python-development-shell:using a Python development shell`" section in
|
||||
the Yocto Project Development Tasks Manual for more information about
|
||||
using ``pydevshell``.
|
||||
|
||||
.. _ref-tasks-devshell:
|
||||
|
||||
``do_devshell``
|
||||
---------------
|
||||
|
||||
Starts a shell whose environment is set up for development, debugging,
|
||||
or both. See the ":ref:`dev-manual/development-shell:using a development shell`" section in the
|
||||
Yocto Project Development Tasks Manual for more information about using
|
||||
``devshell``.
|
||||
|
||||
.. _ref-tasks-listtasks:
|
||||
|
||||
``do_listtasks``
|
||||
----------------
|
||||
|
||||
Lists all defined tasks for a target.
|
||||
|
||||
.. _ref-tasks-package_index:
|
||||
|
||||
``do_package_index``
|
||||
--------------------
|
||||
|
||||
Creates or updates the index in the :ref:`overview-manual/concepts:package feeds` area.
|
||||
|
||||
.. note::
|
||||
|
||||
This task is not triggered with the ``bitbake -c`` command-line option as
|
||||
are the other tasks in this section. Because this task is specifically for
|
||||
the ``package-index`` recipe, you run it using ``bitbake package-index``.
|
||||
|
||||
Image-Related Tasks
|
||||
===================
|
||||
|
||||
The following tasks are applicable to image recipes.
|
||||
|
||||
.. _ref-tasks-bootimg:
|
||||
|
||||
``do_bootimg``
|
||||
--------------
|
||||
|
||||
Creates a bootable live image. See the
|
||||
:term:`IMAGE_FSTYPES` variable for additional
|
||||
information on live image types.
|
||||
|
||||
.. _ref-tasks-bundle_initramfs:
|
||||
|
||||
``do_bundle_initramfs``
|
||||
-----------------------
|
||||
|
||||
Combines an :term:`Initramfs` image and kernel together to
|
||||
form a single image.
|
||||
|
||||
.. _ref-tasks-rootfs:
|
||||
|
||||
``do_rootfs``
|
||||
-------------
|
||||
|
||||
Creates the root filesystem (file and directory structure) for an image.
|
||||
See the ":ref:`overview-manual/concepts:image generation`"
|
||||
section in the Yocto Project Overview and Concepts Manual for more
|
||||
information on how the root filesystem is created.
|
||||
|
||||
.. _ref-tasks-testimage:
|
||||
|
||||
``do_testimage``
|
||||
----------------
|
||||
|
||||
Boots an image and performs runtime tests within the image. For
|
||||
information on automatically testing images, see the
|
||||
":ref:`test-manual/runtime-testing:performing automated runtime testing`"
|
||||
section in the Yocto Project Test Environment Manual.
|
||||
|
||||
.. _ref-tasks-testimage_auto:
|
||||
|
||||
``do_testimage_auto``
|
||||
---------------------
|
||||
|
||||
Boots an image and performs runtime tests within the image immediately
|
||||
after it has been built. This task is enabled when you set
|
||||
:term:`TESTIMAGE_AUTO` equal to "1".
|
||||
|
||||
For information on automatically testing images, see the
|
||||
":ref:`test-manual/runtime-testing:performing automated runtime testing`"
|
||||
section in the Yocto Project Test Environment Manual.
|
||||
|
||||
Kernel-Related Tasks
|
||||
====================
|
||||
|
||||
The following tasks are applicable to kernel recipes. Some of these
|
||||
tasks (e.g. the :ref:`ref-tasks-menuconfig` task) are
|
||||
also applicable to recipes that use Linux kernel style configuration
|
||||
such as the BusyBox recipe.
|
||||
|
||||
.. _ref-tasks-compile_kernelmodules:
|
||||
|
||||
``do_compile_kernelmodules``
|
||||
----------------------------
|
||||
|
||||
Runs the step that builds the kernel modules (if needed). Building a
|
||||
kernel consists of two steps: 1) the kernel (``vmlinux``) is built, and
|
||||
2) the modules are built (i.e. ``make modules``).
|
||||
|
||||
.. _ref-tasks-diffconfig:
|
||||
|
||||
``do_diffconfig``
|
||||
-----------------
|
||||
|
||||
When invoked by the user, this task creates a file containing the
|
||||
differences between the original config as produced by
|
||||
:ref:`ref-tasks-kernel_configme` task and the
|
||||
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::
|
||||
|
||||
$ bitbake linux-yocto -c diffconfig
|
||||
|
||||
For more information, see the
|
||||
":ref:`kernel-dev/common:creating configuration fragments`"
|
||||
section in the Yocto Project Linux Kernel Development Manual.
|
||||
|
||||
.. _ref-tasks-kernel_checkout:
|
||||
|
||||
``do_kernel_checkout``
|
||||
----------------------
|
||||
|
||||
Converts the newly unpacked kernel source into a form with which the
|
||||
OpenEmbedded build system can work. Because the kernel source can be
|
||||
fetched in several different ways, the :ref:`ref-tasks-kernel_checkout` task makes
|
||||
sure that subsequent tasks are given a clean working tree copy of the
|
||||
kernel with the correct branches checked out.
|
||||
|
||||
.. _ref-tasks-kernel_configcheck:
|
||||
|
||||
``do_kernel_configcheck``
|
||||
-------------------------
|
||||
|
||||
Validates the configuration produced by the
|
||||
:ref:`ref-tasks-kernel_menuconfig` task. The
|
||||
:ref:`ref-tasks-kernel_configcheck` task produces warnings when a requested
|
||||
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::
|
||||
|
||||
$ bitbake linux-yocto -c kernel_configcheck -f
|
||||
|
||||
For more information, see the
|
||||
":ref:`kernel-dev/common:validating configuration`"
|
||||
section in the Yocto Project Linux Kernel Development Manual.
|
||||
|
||||
.. _ref-tasks-kernel_configme:
|
||||
|
||||
``do_kernel_configme``
|
||||
----------------------
|
||||
|
||||
After the kernel is patched by the :ref:`ref-tasks-patch`
|
||||
task, the :ref:`ref-tasks-kernel_configme` task assembles and merges all the
|
||||
kernel config fragments into a merged configuration that can then be
|
||||
passed to the kernel configuration phase proper. This is also the time
|
||||
during which user-specified defconfigs are applied if present, and where
|
||||
configuration modes such as ``--allnoconfig`` are applied.
|
||||
|
||||
.. _ref-tasks-kernel_menuconfig:
|
||||
|
||||
``do_kernel_menuconfig``
|
||||
------------------------
|
||||
|
||||
Invoked by the user to manipulate the ``.config`` file used to build a
|
||||
linux-yocto recipe. This task starts the Linux kernel configuration
|
||||
tool, which you then use to modify the kernel configuration.
|
||||
|
||||
.. note::
|
||||
|
||||
You can also invoke this tool from the command line as follows::
|
||||
|
||||
$ bitbake linux-yocto -c menuconfig
|
||||
|
||||
|
||||
See the ":ref:`kernel-dev/common:using ``menuconfig```"
|
||||
section in the Yocto Project Linux Kernel Development Manual for more
|
||||
information on this configuration tool.
|
||||
|
||||
.. _ref-tasks-kernel_metadata:
|
||||
|
||||
``do_kernel_metadata``
|
||||
----------------------
|
||||
|
||||
Collects all the features required for a given kernel build, whether the
|
||||
features come from :term:`SRC_URI` or from Git
|
||||
repositories. After collection, the :ref:`ref-tasks-kernel_metadata` task
|
||||
processes the features into a series of config fragments and patches,
|
||||
which can then be applied by subsequent tasks such as
|
||||
:ref:`ref-tasks-patch` and
|
||||
:ref:`ref-tasks-kernel_configme`.
|
||||
|
||||
.. _ref-tasks-menuconfig:
|
||||
|
||||
``do_menuconfig``
|
||||
-----------------
|
||||
|
||||
Runs ``make menuconfig`` for the kernel. For information on
|
||||
``menuconfig``, see the
|
||||
":ref:`kernel-dev/common:using ``menuconfig```"
|
||||
section in the Yocto Project Linux Kernel Development Manual.
|
||||
|
||||
.. _ref-tasks-savedefconfig:
|
||||
|
||||
``do_savedefconfig``
|
||||
--------------------
|
||||
|
||||
When invoked by the user, creates a defconfig file that can be used
|
||||
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::
|
||||
|
||||
$ bitbake linux-yocto -c savedefconfig
|
||||
|
||||
.. _ref-tasks-shared_workdir:
|
||||
|
||||
``do_shared_workdir``
|
||||
---------------------
|
||||
|
||||
After the kernel has been compiled but before the kernel modules have
|
||||
been compiled, this task copies files required for module builds and
|
||||
which are generated from the kernel build into the shared work
|
||||
directory. With these copies successfully copied, the
|
||||
:ref:`ref-tasks-compile_kernelmodules` task
|
||||
can successfully build the kernel modules in the next step of the build.
|
||||
|
||||
.. _ref-tasks-sizecheck:
|
||||
|
||||
``do_sizecheck``
|
||||
----------------
|
||||
|
||||
After the kernel has been built, this task checks the size of the
|
||||
stripped kernel image against
|
||||
:term:`KERNEL_IMAGE_MAXSIZE`. If that
|
||||
variable was set and the size of the stripped kernel exceeds that size,
|
||||
the kernel build produces a warning to that effect.
|
||||
|
||||
.. _ref-tasks-strip:
|
||||
|
||||
``do_strip``
|
||||
------------
|
||||
|
||||
If ``KERNEL_IMAGE_STRIP_EXTRA_SECTIONS`` is defined, this task strips
|
||||
the sections named in that variable from ``vmlinux``. This stripping is
|
||||
typically used to remove nonessential sections such as ``.comment``
|
||||
sections from a size-sensitive configuration.
|
||||
|
||||
.. _ref-tasks-validate_branches:
|
||||
|
||||
``do_validate_branches``
|
||||
------------------------
|
||||
|
||||
After the kernel is unpacked but before it is patched, this task makes
|
||||
sure that the machine and metadata branches as specified by the
|
||||
:term:`SRCREV` variables actually exist on the specified
|
||||
branches. Otherwise, if :term:`AUTOREV` is not being used, the
|
||||
:ref:`ref-tasks-validate_branches` task fails during the build.
|
||||
537
sources/poky/documentation/ref-manual/terms.rst
Normal file
537
sources/poky/documentation/ref-manual/terms.rst
Normal file
@@ -0,0 +1,537 @@
|
||||
.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
|
||||
|
||||
*******************
|
||||
Yocto Project Terms
|
||||
*******************
|
||||
|
||||
Here is a list of terms and definitions users new to the Yocto Project
|
||||
development environment might find helpful. While some of these terms are
|
||||
universal, the list includes them just in case:
|
||||
|
||||
.. glossary::
|
||||
|
||||
:term:`Append Files`
|
||||
Files that append build information to a recipe file. Append files are
|
||||
known as BitBake append files and ``.bbappend`` files. The OpenEmbedded
|
||||
build system expects every append file to have a corresponding recipe
|
||||
(``.bb``) file. Furthermore, the append file and corresponding recipe file
|
||||
must use the same root filename. The filenames can differ only in the
|
||||
file type suffix used (e.g. ``formfactor_0.0.bb`` and
|
||||
``formfactor_0.0.bbappend``).
|
||||
|
||||
Information in append files extends or overrides the information in the
|
||||
similarly-named recipe file. For an example of an append file in use, see
|
||||
the ":ref:`dev-manual/layers:appending other layers metadata with your layer`"
|
||||
section in the Yocto Project Development Tasks Manual.
|
||||
|
||||
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::
|
||||
|
||||
busybox_1.21.%.bbappend
|
||||
|
||||
That append file
|
||||
would match any ``busybox_1.21.x.bb`` version of the recipe. So,
|
||||
the append file would match any of the following recipe names:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
busybox_1.21.1.bb
|
||||
busybox_1.21.2.bb
|
||||
busybox_1.21.3.bb
|
||||
busybox_1.21.10.bb
|
||||
busybox_1.21.25.bb
|
||||
|
||||
.. note::
|
||||
|
||||
The use of the "%" character is limited in that it only works
|
||||
directly in front of the .bbappend portion of the append file's
|
||||
name. You cannot use the wildcard character in any other location of
|
||||
the name.
|
||||
|
||||
:term:`BitBake`
|
||||
The task executor and scheduler used by the OpenEmbedded build system to
|
||||
build images. For more information on BitBake, see the :doc:`BitBake User
|
||||
Manual <bitbake:index>`.
|
||||
|
||||
:term:`Board Support Package (BSP)`
|
||||
A group of drivers, definitions, and other components that provide support
|
||||
for a specific hardware configuration. For more information on BSPs, see
|
||||
the :doc:`/bsp-guide/index`.
|
||||
|
||||
:term:`Build Directory`
|
||||
This term refers to the area used by the OpenEmbedded build system for
|
||||
builds. The area is created when you ``source`` the setup environment
|
||||
script that is found in the Source Directory
|
||||
(i.e. :ref:`ref-manual/structure:``oe-init-build-env```). The
|
||||
:term:`TOPDIR` variable points to the :term:`Build Directory`.
|
||||
|
||||
You have a lot of flexibility when creating the :term:`Build Directory`.
|
||||
Here are some examples that show how to create the directory. The
|
||||
examples assume your :term:`Source Directory` is named ``poky``:
|
||||
|
||||
- Create the :term:`Build Directory` inside your Source Directory and let
|
||||
the name of the :term:`Build Directory` default to ``build``:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
$ cd poky
|
||||
$ source oe-init-build-env
|
||||
|
||||
- Create the :term:`Build Directory` inside your home directory and
|
||||
specifically name it ``test-builds``:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
$ source poky/oe-init-build-env test-builds
|
||||
|
||||
- Provide a directory path and specifically name the
|
||||
:term:`Build Directory`. Any intermediate folders in the pathname
|
||||
must exist. This next example creates a :term:`Build Directory`
|
||||
named ``YP-&DISTRO;`` within the existing directory ``mybuilds``:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
$ source poky/oe-init-build-env mybuilds/YP-&DISTRO;
|
||||
|
||||
.. note::
|
||||
|
||||
By default, the :term:`Build Directory` contains :term:`TMPDIR`, which is a
|
||||
temporary directory the build system uses for its work. :term:`TMPDIR` cannot
|
||||
be under NFS. Thus, by default, the :term:`Build Directory` cannot be under
|
||||
NFS. However, if you need the :term:`Build Directory` to be under NFS, you can
|
||||
set this up by setting :term:`TMPDIR` in your ``local.conf`` file to use a local
|
||||
drive. Doing so effectively separates :term:`TMPDIR` from :term:`TOPDIR`, which is the
|
||||
:term:`Build Directory`.
|
||||
|
||||
:term:`Build Host`
|
||||
The system used to build images in a Yocto Project Development
|
||||
environment. The build system is sometimes referred to as the development
|
||||
host.
|
||||
|
||||
:term:`buildtools`
|
||||
Build tools in binary form, providing required versions of development
|
||||
tools (such as Git, GCC, Python and make), to run the OpenEmbedded build
|
||||
system on a development host without such minimum versions.
|
||||
|
||||
See the ":ref:`system-requirements-buildtools`" paragraph in the
|
||||
Reference Manual for details about downloading or building an archive
|
||||
of such tools.
|
||||
|
||||
:term:`buildtools-extended`
|
||||
A set of :term:`buildtools` binaries extended with additional development
|
||||
tools, such as a required version of the GCC compiler to run the
|
||||
OpenEmbedded build system.
|
||||
|
||||
See the ":ref:`system-requirements-buildtools`" paragraph in the
|
||||
Reference Manual for details about downloading or building an archive
|
||||
of such tools.
|
||||
|
||||
:term:`buildtools-make`
|
||||
A variant of :term:`buildtools`, just providing the required
|
||||
version of ``make`` to run the OpenEmbedded build system.
|
||||
|
||||
:term:`Classes`
|
||||
Files that provide for logic encapsulation and inheritance so that
|
||||
commonly used patterns can be defined once and then easily used in
|
||||
multiple recipes. For reference information on the Yocto Project classes,
|
||||
see the ":ref:`ref-manual/classes:Classes`" chapter. Class files end with the
|
||||
``.bbclass`` filename extension.
|
||||
|
||||
:term:`Configuration File`
|
||||
Files that hold global definitions of variables, user-defined variables,
|
||||
and hardware configuration information. These files tell the OpenEmbedded
|
||||
build system what to build and what to put into the image to support a
|
||||
particular platform.
|
||||
|
||||
Configuration files end with a ``.conf`` filename extension. The
|
||||
:file:`conf/local.conf` configuration file in the :term:`Build Directory`
|
||||
contains user-defined variables that affect every build. The
|
||||
:file:`meta-poky/conf/distro/poky.conf` configuration file defines Yocto
|
||||
"distro" configuration variables used only when building with this
|
||||
policy. Machine configuration files, which are located throughout the
|
||||
:term:`Source Directory`, define variables for specific hardware and are
|
||||
only used when building for that target (e.g. the
|
||||
:file:`machine/beaglebone.conf` configuration file defines variables for
|
||||
the Texas Instruments ARM Cortex-A8 development board).
|
||||
|
||||
:term:`Container Layer`
|
||||
A flexible definition that typically refers to a single Git checkout
|
||||
which contains multiple (and typically related) sub-layers which can
|
||||
be included independently in your project's ``bblayers.conf`` file.
|
||||
|
||||
In some cases, such as with OpenEmbedded's :oe_git:`meta-openembedded </meta-openembedded>`
|
||||
layer, the top level ``meta-openembedded/`` directory is not itself an actual layer,
|
||||
so you would never explicitly include it in a ``bblayers.conf`` file;
|
||||
rather, you would include any number of its layer subdirectories, such as
|
||||
:oe_git:`meta-oe </meta-openembedded/tree/meta-oe>`, :oe_git:`meta-python
|
||||
</meta-openembedded/tree/meta-python>` and so on.
|
||||
|
||||
On the other hand, some container layers (such as
|
||||
:yocto_git:`meta-security </meta-security>`)
|
||||
have a top-level directory that is itself an actual layer, as well as
|
||||
a variety of sub-layers, both of which could be included in your
|
||||
``bblayers.conf`` file.
|
||||
|
||||
In either case, the phrase "container layer" is simply used to describe
|
||||
a directory structure which contains multiple valid OpenEmbedded layers.
|
||||
|
||||
:term:`Cross-Development Toolchain`
|
||||
In general, a cross-development toolchain is a collection of software
|
||||
development tools and utilities that run on one architecture and allow you
|
||||
to develop software for a different, or targeted, architecture. These
|
||||
toolchains contain cross-compilers, linkers, and debuggers that are
|
||||
specific to the target architecture.
|
||||
|
||||
The Yocto Project supports two different cross-development toolchains:
|
||||
|
||||
- A toolchain only used by and within BitBake when building an image for a
|
||||
target architecture.
|
||||
|
||||
- A relocatable toolchain used outside of BitBake by developers when
|
||||
developing applications that will run on a targeted device.
|
||||
|
||||
Creation of these toolchains is simple and automated. For information on
|
||||
toolchain concepts as they apply to the Yocto Project, see the
|
||||
":ref:`overview-manual/concepts:Cross-Development
|
||||
Toolchain Generation`" section in the Yocto Project Overview and Concepts
|
||||
Manual. You can also find more information on using the relocatable
|
||||
toolchain in the :doc:`/sdk-manual/index` manual.
|
||||
|
||||
:term:`Extensible Software Development Kit (eSDK)`
|
||||
A custom SDK for application developers. This eSDK allows developers to
|
||||
incorporate their library and programming changes back into the image to
|
||||
make their code available to other application developers.
|
||||
|
||||
For information on the eSDK, see the :doc:`/sdk-manual/index` manual.
|
||||
|
||||
:term:`Image`
|
||||
An image is an artifact of the BitBake build process given a collection of
|
||||
recipes and related Metadata. Images are the binary output that run on
|
||||
specific hardware or QEMU and are used for specific use-cases. For a list
|
||||
of the supported image types that the Yocto Project provides, see the
|
||||
":ref:`ref-manual/images:Images`" chapter.
|
||||
|
||||
:term:`Initramfs`
|
||||
An Initial RAM Filesystem (:term:`Initramfs`) is an optionally compressed
|
||||
:wikipedia:`cpio <Cpio>` archive which is extracted
|
||||
by the Linux kernel into RAM in a special :wikipedia:`tmpfs <Tmpfs>`
|
||||
instance, used as the initial root filesystem.
|
||||
|
||||
This is a replacement for the legacy init RAM disk ("initrd")
|
||||
technique, booting on an emulated block device in RAM, but being less
|
||||
efficient because of the overhead of going through a filesystem and
|
||||
having to duplicate accessed file contents in the file cache in RAM,
|
||||
as for any block device.
|
||||
|
||||
.. note::
|
||||
|
||||
As far as bootloaders are concerned, :term:`Initramfs` and "initrd"
|
||||
images are still copied to RAM in the same way. That's why most
|
||||
most bootloaders refer to :term:`Initramfs` images as "initrd"
|
||||
or "init RAM disk".
|
||||
|
||||
This kind of mechanism is typically used for two reasons:
|
||||
|
||||
- For booting the same kernel binary on multiple systems requiring
|
||||
different device drivers. The :term:`Initramfs` image is then customized
|
||||
for each type of system, to include the specific kernel modules
|
||||
necessary to access the final root filesystem. This technique
|
||||
is used on all GNU / Linux distributions for desktops and servers.
|
||||
|
||||
- For booting faster. As the root filesystem is extracted into RAM,
|
||||
accessing the first user-space applications is very fast, compared
|
||||
to having to initialize a block device, to access multiple blocks
|
||||
from it, and to go through a filesystem having its own overhead.
|
||||
For example, this allows to display a splashscreen very early,
|
||||
and to later take care of mounting the final root filesystem and
|
||||
loading less time-critical kernel drivers.
|
||||
|
||||
This cpio archive can either be loaded to RAM by the bootloader,
|
||||
or be included in the kernel binary.
|
||||
|
||||
For information on creating and using an :term:`Initramfs`, see the
|
||||
":ref:`dev-manual/building:building an initial ram filesystem (Initramfs) image`"
|
||||
section in the Yocto Project Development Tasks Manual.
|
||||
|
||||
:term:`Layer`
|
||||
A collection of related recipes. Layers allow you to consolidate related
|
||||
metadata to customize your build. Layers also isolate information used
|
||||
when building for multiple architectures. Layers are hierarchical in
|
||||
their ability to override previous specifications. You can include any
|
||||
number of available layers from the Yocto Project and customize the build
|
||||
by adding your layers after them. You can search the Layer Index for
|
||||
layers used within Yocto Project.
|
||||
|
||||
For introductory information on layers, see the
|
||||
":ref:`overview-manual/yp-intro:The Yocto Project Layer
|
||||
Model`" section in the Yocto Project Overview and Concepts Manual. For
|
||||
more detailed information on layers, see the
|
||||
":ref:`dev-manual/layers:Understanding and Creating
|
||||
Layers`" section in the Yocto Project Development Tasks Manual. For a
|
||||
discussion specifically on BSP Layers, see the ":ref:`bsp-guide/bsp:BSP
|
||||
Layers`" section in the Yocto Project Board Support Packages (BSP)
|
||||
Developer's Guide.
|
||||
|
||||
:term:`LTS`
|
||||
This term means "Long Term Support", and in the context of the Yocto
|
||||
Project, it corresponds to selected stable releases for which bug and
|
||||
security fixes are provided for at least four years. See
|
||||
the :ref:`ref-long-term-support-releases` section for details.
|
||||
|
||||
:term:`Metadata`
|
||||
A key element of the Yocto Project is the Metadata that
|
||||
is used to construct a Linux distribution and is contained in the
|
||||
files that the :term:`OpenEmbedded Build System`
|
||||
parses when building an image. In general, Metadata includes recipes,
|
||||
configuration files, and other information that refers to the build
|
||||
instructions themselves, as well as the data used to control what
|
||||
things get built and the effects of the build. Metadata also includes
|
||||
commands and data used to indicate what versions of software are
|
||||
used, from where they are obtained, and changes or additions to the
|
||||
software itself (patches or auxiliary files) that are used to fix
|
||||
bugs or customize the software for use in a particular situation.
|
||||
OpenEmbedded-Core is an important set of validated metadata.
|
||||
|
||||
In the context of the kernel ("kernel Metadata"), the term refers to
|
||||
the kernel config fragments and features contained in the
|
||||
:yocto_git:`yocto-kernel-cache </yocto-kernel-cache>`
|
||||
Git repository.
|
||||
|
||||
:term:`Mixin`
|
||||
A :term:`Mixin` layer is a layer which can be created by the community to
|
||||
add a specific feature or support a new version of some package for an
|
||||
:term:`LTS` release. See the :ref:`ref-long-term-support-releases`
|
||||
section for details.
|
||||
|
||||
:term:`OpenEmbedded-Core (OE-Core)`
|
||||
OE-Core is metadata comprised of
|
||||
foundational recipes, classes, and associated files that are meant to
|
||||
be common among many different OpenEmbedded-derived systems,
|
||||
including the Yocto Project. OE-Core is a curated subset of an
|
||||
original repository developed by the OpenEmbedded community that has
|
||||
been pared down into a smaller, core set of continuously validated
|
||||
recipes. The result is a tightly controlled and an quality-assured
|
||||
core set of recipes.
|
||||
|
||||
You can see the Metadata in the ``meta`` directory of the Yocto
|
||||
Project :yocto_git:`Source Repositories </poky>`.
|
||||
|
||||
:term:`OpenEmbedded Build System`
|
||||
The build system specific to the Yocto
|
||||
Project. The OpenEmbedded build system is based on another project
|
||||
known as "Poky", which uses :term:`BitBake` as the task
|
||||
executor. Throughout the Yocto Project documentation set, the
|
||||
OpenEmbedded build system is sometimes referred to simply as "the
|
||||
build system". If other build systems, such as a host or target build
|
||||
system are referenced, the documentation clearly states the
|
||||
difference.
|
||||
|
||||
.. note::
|
||||
|
||||
For some historical information about Poky, see the :term:`Poky` term.
|
||||
|
||||
:term:`Package`
|
||||
In the context of the Yocto Project, this term refers to a
|
||||
recipe's packaged output produced by BitBake (i.e. a "baked recipe").
|
||||
A package is generally the compiled binaries produced from the
|
||||
recipe's sources. You "bake" something by running it through BitBake.
|
||||
|
||||
It is worth noting that the term "package" can, in general, have
|
||||
subtle meanings. For example, the packages referred to in the
|
||||
":ref:`ref-manual/system-requirements:required packages for the build host`"
|
||||
section are compiled binaries that, when installed, add functionality to
|
||||
your Linux distribution.
|
||||
|
||||
Another point worth noting is that historically within the Yocto
|
||||
Project, recipes were referred to as packages --- thus, the existence
|
||||
of several BitBake variables that are seemingly mis-named, (e.g.
|
||||
:term:`PR`, :term:`PV`, and
|
||||
:term:`PE`).
|
||||
|
||||
:term:`Package Groups`
|
||||
Arbitrary groups of software Recipes. You use
|
||||
package groups to hold recipes that, when built, usually accomplish a
|
||||
single task. For example, a package group could contain the recipes
|
||||
for a company's proprietary or value-add software. Or, the package
|
||||
group could contain the recipes that enable graphics. A package group
|
||||
is really just another recipe. Because package group files are
|
||||
recipes, they end with the ``.bb`` filename extension.
|
||||
|
||||
:term:`Poky`
|
||||
Poky, which is pronounced *Pock*-ee, is a reference embedded
|
||||
distribution and a reference test configuration. Poky provides the
|
||||
following:
|
||||
|
||||
- A base-level functional distro used to illustrate how to customize
|
||||
a distribution.
|
||||
|
||||
- A means by which to test the Yocto Project components (i.e. Poky
|
||||
is used to validate the Yocto Project).
|
||||
|
||||
- A vehicle through which you can download the Yocto Project.
|
||||
|
||||
Poky is not a product level distro. Rather, it is a good starting
|
||||
point for customization.
|
||||
|
||||
.. note::
|
||||
|
||||
Poky began as an open-source project initially developed by
|
||||
OpenedHand. OpenedHand developed Poky from the existing
|
||||
OpenEmbedded build system to create a commercially supportable
|
||||
build system for embedded Linux. After Intel Corporation acquired
|
||||
OpenedHand, the poky project became the basis for the Yocto
|
||||
Project's build system.
|
||||
|
||||
:term:`Recipe`
|
||||
A set of instructions for building packages. A recipe
|
||||
describes where you get source code, which patches to apply, how to
|
||||
configure the source, how to compile it and so on. Recipes also
|
||||
describe dependencies for libraries or for other recipes. Recipes
|
||||
represent the logical unit of execution, the software to build, the
|
||||
images to build, and use the ``.bb`` file extension.
|
||||
|
||||
:term:`Reference Kit`
|
||||
A working example of a system, which includes a
|
||||
:term:`BSP<Board Support Package (BSP)>` as well as a
|
||||
:term:`build host<Build Host>` and other components, that can
|
||||
work on specific hardware.
|
||||
|
||||
:term:`SBOM`
|
||||
This term means *Software Bill of Materials*. When you distribute
|
||||
software, it offers a description of all the components you used,
|
||||
their corresponding licenses, their dependencies, the changes that were
|
||||
applied and the known vulnerabilities that were fixed.
|
||||
|
||||
This can be used by the recipients of the software to assess
|
||||
their exposure to license compliance and security vulnerability issues.
|
||||
|
||||
See the :wikipedia:`Software Supply Chain <Software_supply_chain>`
|
||||
article on Wikipedia for more details.
|
||||
|
||||
The OpenEmbedded Build System can generate such documentation for your
|
||||
project, in :term:`SPDX` format, based on all the metadata it used to
|
||||
build the software images. See the ":ref:`dev-manual/sbom:creating
|
||||
a software bill of materials`" section of the Development Tasks manual.
|
||||
|
||||
:term:`Source Directory`
|
||||
This term refers to the directory structure
|
||||
created as a result of creating a local copy of the ``poky`` Git
|
||||
repository ``git://git.yoctoproject.org/poky`` or expanding a
|
||||
released ``poky`` tarball.
|
||||
|
||||
.. note::
|
||||
|
||||
Creating a local copy of the
|
||||
poky
|
||||
Git repository is the recommended method for setting up your
|
||||
Source Directory.
|
||||
|
||||
Sometimes you might hear the term "poky directory" used to refer to
|
||||
this directory structure.
|
||||
|
||||
.. note::
|
||||
|
||||
The OpenEmbedded build system does not support file or directory
|
||||
names that contain spaces. Be sure that the Source Directory you
|
||||
use does not contain these types of names.
|
||||
|
||||
The Source Directory contains BitBake, Documentation, Metadata and
|
||||
other files that all support the Yocto Project. Consequently, you
|
||||
must have the Source Directory in place on your development system in
|
||||
order to do any development using the Yocto Project.
|
||||
|
||||
When you create a local copy of the Git repository, you can name the
|
||||
repository anything you like. Throughout much of the documentation,
|
||||
"poky" is used as the name of the top-level folder of the local copy
|
||||
of the poky Git repository. So, for example, cloning the ``poky`` Git
|
||||
repository results in a local Git repository whose top-level folder
|
||||
is also named "poky".
|
||||
|
||||
While it is not recommended that you use tarball extraction to set up
|
||||
the Source Directory, if you do, the top-level directory name of the
|
||||
Source Directory is derived from the Yocto Project release tarball.
|
||||
For example, downloading and unpacking poky tarballs from
|
||||
:yocto_dl:`/releases/yocto/&DISTRO_REL_LATEST_TAG;/`
|
||||
results in a Source Directory whose root folder is named poky.
|
||||
|
||||
|
||||
It is important to understand the differences between the Source
|
||||
Directory created by unpacking a released tarball as compared to
|
||||
cloning ``git://git.yoctoproject.org/poky``. When you unpack a
|
||||
tarball, you have an exact copy of the files based on the time of
|
||||
release --- a fixed release point. Any changes you make to your local
|
||||
files in the Source Directory are on top of the release and will
|
||||
remain local only. On the other hand, when you clone the ``poky`` Git
|
||||
repository, you have an active development repository with access to
|
||||
the upstream repository's branches and tags. In this case, any local
|
||||
changes you make to the local Source Directory can be later applied
|
||||
to active development branches of the upstream ``poky`` Git
|
||||
repository.
|
||||
|
||||
For more information on concepts related to Git repositories,
|
||||
branches, and tags, see the
|
||||
":ref:`overview-manual/development-environment:repositories, tags, and branches`"
|
||||
section in the Yocto Project Overview and Concepts Manual.
|
||||
|
||||
:term:`SPDX`
|
||||
This term means *Software Package Data Exchange*, and is used as an open
|
||||
standard for providing a *Software Bill of Materials* (:term:`SBOM`).
|
||||
This standard is developed through a `Linux Foundation project
|
||||
<https://spdx.dev/>`__ and is used by the OpenEmbedded Build System to
|
||||
provide an :term:`SBOM` associated to each software image.
|
||||
|
||||
For details, see Wikipedia's :wikipedia:`SPDX page <Software_Package_Data_Exchange>`
|
||||
and the ":ref:`dev-manual/sbom:creating a software bill of materials`"
|
||||
section of the Development Tasks manual.
|
||||
|
||||
:term:`Sysroot`
|
||||
When cross-compiling, the target file system may be differently laid
|
||||
out and contain different things compared to the host system. The concept
|
||||
of a *sysroot* is directory which looks like the target filesystem and
|
||||
can be used to cross-compile against.
|
||||
|
||||
In the context of cross-compiling toolchains, a *sysroot*
|
||||
typically contains C library and kernel headers, plus the
|
||||
compiled binaries for the C library. A *multilib toolchain*
|
||||
can contain multiple variants of the C library binaries,
|
||||
each compiled for a target instruction set (such as ``armv5``,
|
||||
``armv7`` and ``armv8``), and possibly optimized for a specific CPU core.
|
||||
|
||||
In the more specific context of the OpenEmbedded build System and
|
||||
of the Yocto Project, each recipe has two sysroots:
|
||||
|
||||
- A *target sysroot* contains all the **target** libraries and headers
|
||||
needed to build the recipe.
|
||||
|
||||
- A *native sysroot* contains all the **host** files and executables
|
||||
needed to build the recipe.
|
||||
|
||||
See the :term:`SYSROOT_* <SYSROOT_DESTDIR>` variables controlling
|
||||
how sysroots are created and stored.
|
||||
|
||||
:term:`Task`
|
||||
A per-recipe unit of execution for BitBake (e.g.
|
||||
:ref:`ref-tasks-compile`,
|
||||
:ref:`ref-tasks-fetch`,
|
||||
:ref:`ref-tasks-patch`, and so forth).
|
||||
One of the major benefits of the build system is that, since each
|
||||
recipe will typically spawn the execution of numerous tasks,
|
||||
it is entirely possible that many tasks can execute in parallel,
|
||||
either tasks from separate recipes or independent tasks within
|
||||
the same recipe, potentially up to the parallelism of your
|
||||
build system.
|
||||
|
||||
:term:`Toaster`
|
||||
A web interface to the Yocto Project's :term:`OpenEmbedded Build System`.
|
||||
The interface enables you to
|
||||
configure and run your builds. Information about builds is collected
|
||||
and stored in a database. For information on Toaster, see the
|
||||
:doc:`/toaster-manual/index`.
|
||||
|
||||
:term:`Upstream`
|
||||
A reference to source code or repositories that are not
|
||||
local to the development system but located in a remote area that is
|
||||
controlled by the maintainer of the source code. For example, in
|
||||
order for a developer to work on a particular piece of code, they
|
||||
need to first get a copy of it from an "upstream" source.
|
||||
10608
sources/poky/documentation/ref-manual/variables.rst
Normal file
10608
sources/poky/documentation/ref-manual/variables.rst
Normal file
File diff suppressed because it is too large
Load Diff
166
sources/poky/documentation/ref-manual/varlocality.rst
Normal file
166
sources/poky/documentation/ref-manual/varlocality.rst
Normal file
@@ -0,0 +1,166 @@
|
||||
.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
|
||||
|
||||
****************
|
||||
Variable Context
|
||||
****************
|
||||
|
||||
While you can use most variables in almost any context such as
|
||||
``.conf``, ``.bbclass``, ``.inc``, and ``.bb`` files, some variables are
|
||||
often associated with a particular locality or context. This chapter
|
||||
describes some common associations.
|
||||
|
||||
.. _ref-varlocality-configuration:
|
||||
|
||||
Configuration
|
||||
=============
|
||||
|
||||
The following subsections provide lists of variables whose context is
|
||||
configuration: distribution, machine, and local.
|
||||
|
||||
.. _ref-varlocality-config-distro:
|
||||
|
||||
Distribution (Distro)
|
||||
---------------------
|
||||
|
||||
This section lists variables whose configuration context is the
|
||||
distribution, or distro.
|
||||
|
||||
- :term:`DISTRO`
|
||||
|
||||
- :term:`DISTRO_NAME`
|
||||
|
||||
- :term:`DISTRO_VERSION`
|
||||
|
||||
- :term:`MAINTAINER`
|
||||
|
||||
- :term:`PACKAGE_CLASSES`
|
||||
|
||||
- :term:`TARGET_OS`
|
||||
|
||||
- :term:`TARGET_FPU`
|
||||
|
||||
- :term:`TCMODE`
|
||||
|
||||
- :term:`TCLIBC`
|
||||
|
||||
.. _ref-varlocality-config-machine:
|
||||
|
||||
Machine
|
||||
-------
|
||||
|
||||
This section lists variables whose configuration context is the machine.
|
||||
|
||||
- :term:`TARGET_ARCH`
|
||||
|
||||
- :term:`SERIAL_CONSOLES`
|
||||
|
||||
- :term:`PACKAGE_EXTRA_ARCHS`
|
||||
|
||||
- :term:`IMAGE_FSTYPES`
|
||||
|
||||
- :term:`MACHINE_FEATURES`
|
||||
|
||||
- :term:`MACHINE_EXTRA_RDEPENDS`
|
||||
|
||||
- :term:`MACHINE_EXTRA_RRECOMMENDS`
|
||||
|
||||
- :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS`
|
||||
|
||||
- :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS`
|
||||
|
||||
.. _ref-varlocality-config-local:
|
||||
|
||||
Local
|
||||
-----
|
||||
|
||||
This section lists variables whose configuration context is the local
|
||||
configuration through the ``local.conf`` file.
|
||||
|
||||
- :term:`DISTRO`
|
||||
|
||||
- :term:`MACHINE`
|
||||
|
||||
- :term:`DL_DIR`
|
||||
|
||||
- :term:`BBFILES`
|
||||
|
||||
- :term:`EXTRA_IMAGE_FEATURES`
|
||||
|
||||
- :term:`PACKAGE_CLASSES`
|
||||
|
||||
- :term:`BB_NUMBER_THREADS`
|
||||
|
||||
- :term:`BBINCLUDELOGS`
|
||||
|
||||
- :term:`ENABLE_BINARY_LOCALE_GENERATION`
|
||||
|
||||
.. _ref-varlocality-recipes:
|
||||
|
||||
Recipes
|
||||
=======
|
||||
|
||||
The following subsections provide lists of variables whose context is
|
||||
recipes: required, dependencies, path, and extra build information.
|
||||
|
||||
.. _ref-varlocality-recipe-required:
|
||||
|
||||
Required
|
||||
--------
|
||||
|
||||
This section lists variables that are required for recipes.
|
||||
|
||||
- :term:`LICENSE`
|
||||
|
||||
- :term:`LIC_FILES_CHKSUM`
|
||||
|
||||
- :term:`SRC_URI` --- used in recipes that fetch local or remote files.
|
||||
|
||||
.. _ref-varlocality-recipe-dependencies:
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
This section lists variables that define recipe dependencies.
|
||||
|
||||
- :term:`DEPENDS`
|
||||
|
||||
- :term:`RDEPENDS`
|
||||
|
||||
- :term:`RRECOMMENDS`
|
||||
|
||||
- :term:`RCONFLICTS`
|
||||
|
||||
- :term:`RREPLACES`
|
||||
|
||||
.. _ref-varlocality-recipe-paths:
|
||||
|
||||
Paths
|
||||
-----
|
||||
|
||||
This section lists variables that define recipe paths.
|
||||
|
||||
- :term:`WORKDIR`
|
||||
|
||||
- :term:`S`
|
||||
|
||||
- :term:`FILES`
|
||||
|
||||
.. _ref-varlocality-recipe-build:
|
||||
|
||||
Extra Build Information
|
||||
-----------------------
|
||||
|
||||
This section lists variables that define extra build information for
|
||||
recipes.
|
||||
|
||||
- :term:`DEFAULT_PREFERENCE`
|
||||
|
||||
- :term:`EXTRA_OECMAKE`
|
||||
|
||||
- :term:`EXTRA_OECONF`
|
||||
|
||||
- :term:`EXTRA_OEMAKE`
|
||||
|
||||
- :term:`PACKAGECONFIG_CONFARGS`
|
||||
|
||||
- :term:`PACKAGES`
|
||||
Reference in New Issue
Block a user