mirror of
https://git.yoctoproject.org/poky
synced 2026-04-29 00:32:14 +02:00
Update documentation for classes split
* Make reference to meta/classes* instead of just meta/classes * Update each reference to the path where the class has moved * Add a brief explanation to the classes reference explaining the split * Add a note to INHERIT, INHERIT_DISTRO, IMAGE_CLASSES and USER_CLASSES variable glossary entries mentioning where the specified classes must be located. I contemplated adding the same note to PACKAGE_CLASSES but decided against it, as it has a very specific usage and such a note might distract from the narrative of that entry. * Also trim the IMAGE_CLASSES entry which was quite outdated. * INHERIT += no longer works with testimage so drop the note about that (From yocto-docs rev: e76bed00b452d3049f6c22afbfb980b557a141bd) Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
c29eb10e31
commit
b1d1777865
@@ -973,7 +973,7 @@ a recipe and using :term:`EXTRA_IMAGE_FEATURES` from within your
|
||||
:term:`Build Directory`.
|
||||
|
||||
To understand how these features work, the best reference is
|
||||
:ref:`meta/classes/image.bbclass <ref-classes-image>`.
|
||||
:ref:`meta/classes-recipe/image.bbclass <ref-classes-image>`.
|
||||
This class lists out the available
|
||||
:term:`IMAGE_FEATURES` of which most map to package groups while some, such
|
||||
as ``debug-tweaks`` and ``read-only-rootfs``, resolve as general
|
||||
@@ -6889,7 +6889,7 @@ multiple times if you have more than one set of modules to package.
|
||||
For more examples that show how to use ``do_split_packages``, see the
|
||||
``connman.inc`` file in the ``meta/recipes-connectivity/connman/``
|
||||
directory of the ``poky`` :ref:`source repository <overview-manual/development-environment:yocto project source repositories>`. You can
|
||||
also find examples in ``meta/classes/kernel.bbclass``.
|
||||
also find examples in ``meta/classes-recipe/kernel.bbclass``.
|
||||
|
||||
Following is a reference that shows ``do_split_packages`` mandatory and
|
||||
optional arguments::
|
||||
|
||||
@@ -853,7 +853,7 @@ This step in the build process consists of the following tasks:
|
||||
variables. For information on how this variable works within that
|
||||
class, see the
|
||||
:ref:`autotools <ref-classes-autotools>` class
|
||||
:yocto_git:`here </poky/tree/meta/classes/autotools.bbclass>`.
|
||||
:yocto_git:`here </poky/tree/meta/classes-recipe/autotools.bbclass>`.
|
||||
|
||||
- *do_compile*: Once a configuration task has been satisfied,
|
||||
BitBake compiles the source using the
|
||||
@@ -931,7 +931,7 @@ The :term:`FILES` variable defines the
|
||||
files that go into each package in
|
||||
:term:`PACKAGES`. If you want
|
||||
details on how this is accomplished, you can look at
|
||||
:yocto_git:`package.bbclass </poky/tree/meta/classes/package.bbclass>`.
|
||||
:yocto_git:`package.bbclass </poky/tree/meta/classes-global/package.bbclass>`.
|
||||
|
||||
Depending on the type of packages being created (RPM, DEB, or IPK), the
|
||||
:ref:`do_package_write_* <ref-tasks-package_write_deb>`
|
||||
|
||||
@@ -13,8 +13,14 @@ some default behavior.
|
||||
|
||||
Any :term:`Metadata` usually found in a recipe can also be
|
||||
placed in a class file. Class files are identified by the extension
|
||||
``.bbclass`` and are usually placed in a ``classes/`` directory beneath
|
||||
the ``meta*/`` directory found in the :term:`Source Directory`.
|
||||
``.bbclass`` and are usually placed in one of a set of subdirectories
|
||||
beneath the ``meta*/`` directory found in the :term:`Source Directory`:
|
||||
|
||||
- ``classes-recipe/`` - classes intended to be inherited by recipes
|
||||
individually
|
||||
- ``classes-global/`` - classes intended to be inherited globally
|
||||
- ``classes/`` - classes whose usage context is not clearly defined
|
||||
|
||||
Class files can also be pointed to by
|
||||
:term:`BUILDDIR` (e.g. ``build/``) in the same way as
|
||||
``.conf`` files in the ``conf`` directory. Class files are searched for
|
||||
@@ -22,7 +28,7 @@ in :term:`BBPATH` using the same method by which ``.conf``
|
||||
files are searched.
|
||||
|
||||
This chapter discusses only the most useful and important classes. Other
|
||||
classes do exist within the ``meta/classes`` directory in the Source
|
||||
classes do exist within the ``meta/classes*`` directories in the Source
|
||||
Directory. You can reference the ``.bbclass`` files directly for more
|
||||
information.
|
||||
|
||||
@@ -2778,11 +2784,9 @@ images using QEMU and on actual hardware. The classes handle loading the
|
||||
tests and starting the image. To use the classes, you need to perform
|
||||
steps to set up the environment.
|
||||
|
||||
.. note::
|
||||
To enable this class, add the following to your configuration::
|
||||
|
||||
Best practices include using :term:`IMAGE_CLASSES` rather than
|
||||
:term:`INHERIT` to inherit the ``testimage`` class for automated image
|
||||
testing.
|
||||
IMAGE_CLASSES += "testimage"
|
||||
|
||||
The tests are commands that run on the target system over ``ssh``. Each
|
||||
test is written in Python and makes use of the ``unittest`` module.
|
||||
@@ -2937,7 +2941,7 @@ To use this class, you need to define a number of variables:
|
||||
These variables list alternative commands needed by a package, provide
|
||||
pathnames for links, default links for targets, and so forth. For
|
||||
details on how to use this class, see the comments in the
|
||||
:yocto_git:`update-alternatives.bbclass </poky/tree/meta/classes/update-alternatives.bbclass>`
|
||||
:yocto_git:`update-alternatives.bbclass </poky/tree/meta/classes-recipe/update-alternatives.bbclass>`
|
||||
file.
|
||||
|
||||
.. note::
|
||||
|
||||
@@ -109,7 +109,7 @@ I prevent this?
|
||||
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/base.bbclass`` file.
|
||||
``meta/classes-global/base.bbclass`` file.
|
||||
|
||||
**Q:** I'm behind a firewall and need to use a proxy server. How do I do
|
||||
that?
|
||||
|
||||
@@ -669,10 +669,10 @@ Yocto Project. Metadata has several important subdivisions:
|
||||
|
||||
.. _structure-meta-classes:
|
||||
|
||||
``meta/classes/``
|
||||
-----------------
|
||||
``meta/classes*/``
|
||||
------------------
|
||||
|
||||
This directory contains the ``*.bbclass`` files. Class files are used to
|
||||
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
|
||||
|
||||
@@ -190,8 +190,8 @@ that either directly or indirectly depend on the installed files (e.g.
|
||||
- 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`` directory of
|
||||
the :term:`Source Directory` for an example.
|
||||
``bin_package.bbclass`` file in the ``meta/classes-recipe``
|
||||
subdirectory of the :term:`Source Directory` for an example.
|
||||
|
||||
.. _ref-tasks-install_ptest_base:
|
||||
|
||||
|
||||
@@ -773,7 +773,7 @@ system and gives an overview of their function and contents.
|
||||
and `glob <https://docs.python.org/3/library/glob.html>`__.
|
||||
|
||||
For more information on how this variable works, see
|
||||
``meta/classes/binconfig.bbclass`` in the :term:`Source Directory`.
|
||||
``meta/classes-recipe/binconfig.bbclass`` in the :term:`Source Directory`.
|
||||
You can also find general
|
||||
information on the class in the
|
||||
":ref:`ref-classes-binconfig`" section.
|
||||
@@ -2062,7 +2062,7 @@ system and gives an overview of their function and contents.
|
||||
available are xz and bz2.
|
||||
|
||||
For information on policies and on how to use this variable, see the
|
||||
comments in the ``meta/classes/compress_doc.bbclass`` file.
|
||||
comments in the ``meta/classes-recipe/compress_doc.bbclass`` file.
|
||||
|
||||
:term:`EFI_PROVIDER`
|
||||
When building bootable images (i.e. where ``hddimg``, ``iso``, or
|
||||
@@ -2230,7 +2230,7 @@ system and gives an overview of their function and contents.
|
||||
variable tells the OpenEmbedded build system to prefer the installed
|
||||
external tools. See the
|
||||
:ref:`kernel-yocto <ref-classes-kernel-yocto>` class in
|
||||
``meta/classes`` to see how the variable is used.
|
||||
``meta/classes-recipe`` to see how the variable is used.
|
||||
|
||||
:term:`EXTERNALSRC`
|
||||
When inheriting the :ref:`externalsrc <ref-classes-externalsrc>`
|
||||
@@ -2607,7 +2607,7 @@ system and gives an overview of their function and contents.
|
||||
:term:`SRC_URI` statements.
|
||||
|
||||
The default value for the :term:`FILESPATH` variable is defined in the
|
||||
:ref:`ref-classes-base` class found in ``meta/classes`` in the
|
||||
:ref:`ref-classes-base` class found in ``meta/classes-global`` in the
|
||||
:term:`Source Directory`::
|
||||
|
||||
FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${BP}", \
|
||||
@@ -3097,16 +3097,11 @@ system and gives an overview of their function and contents.
|
||||
":term:`DISTRO` :term:`DISTRO_VERSION`".
|
||||
|
||||
:term:`IMAGE_CLASSES`
|
||||
A list of classes that all images should inherit. You typically use
|
||||
this variable to specify the list of classes that register the
|
||||
different types of images the OpenEmbedded build system creates.
|
||||
A list of classes that all images should inherit. This is typically used
|
||||
to enable functionality across all image recipes.
|
||||
|
||||
The default value for :term:`IMAGE_CLASSES` is ``image_types``. You can
|
||||
set this variable in your ``local.conf`` or in a distribution
|
||||
configuration file.
|
||||
|
||||
For more information, see ``meta/classes/image_types.bbclass`` in the
|
||||
:term:`Source Directory`.
|
||||
Classes specified in :term:`IMAGE_CLASSES` must be located in the
|
||||
``classes-recipe/`` or ``classes/`` subdirectories.
|
||||
|
||||
:term:`IMAGE_CMD`
|
||||
Specifies the command to create the image file for a specific image
|
||||
@@ -3122,7 +3117,7 @@ system and gives an overview of their function and contents.
|
||||
You typically do not need to set this variable unless you are adding
|
||||
support for a new image type. For more examples on how to set this
|
||||
variable, see the :ref:`image_types <ref-classes-image_types>`
|
||||
class file, which is ``meta/classes/image_types.bbclass``.
|
||||
class file, which is ``meta/classes-recipe/image_types.bbclass``.
|
||||
|
||||
:term:`IMAGE_DEVICE_TABLES`
|
||||
Specifies one or more files that contain custom device tables that
|
||||
@@ -3518,7 +3513,7 @@ system and gives an overview of their function and contents.
|
||||
- wic.lzma
|
||||
|
||||
For more information about these types of images, see
|
||||
``meta/classes/image_types*.bbclass`` in the :term:`Source Directory`.
|
||||
``meta/classes-recipe/image_types*.bbclass`` in the :term:`Source Directory`.
|
||||
|
||||
:term:`IMAGE_VERSION_SUFFIX`
|
||||
Version suffix that is part of the default :term:`IMAGE_NAME` and
|
||||
@@ -3617,6 +3612,8 @@ system and gives an overview of their function and contents.
|
||||
functions in the class or classes are not executed for the base
|
||||
configuration and in each individual recipe. The OpenEmbedded build
|
||||
system ignores changes to :term:`INHERIT` in individual recipes.
|
||||
Classes inherited using :term:`INHERIT` must be located in the
|
||||
``classes-global/`` or ``classes/`` subdirectories.
|
||||
|
||||
For more information on :term:`INHERIT`, see the
|
||||
:ref:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata:\`\`inherit\`\` configuration directive`"
|
||||
@@ -3626,6 +3623,9 @@ system and gives an overview of their function and contents.
|
||||
Lists classes that will be inherited at the distribution level. It is
|
||||
unlikely that you want to edit this variable.
|
||||
|
||||
Classes specified in :term:`INHERIT_DISTRO` must be located in the
|
||||
``classes-global/`` or ``classes/`` subdirectories.
|
||||
|
||||
The default value of the variable is set as follows in the
|
||||
``meta/conf/distro/defaultsetup.conf`` file::
|
||||
|
||||
@@ -3841,7 +3841,7 @@ system and gives an overview of their function and contents.
|
||||
|
||||
:term:`INITRAMFS_LINK_NAME`
|
||||
The link name of the initial RAM filesystem image. This variable is
|
||||
set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
|
||||
set in the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as
|
||||
follows::
|
||||
|
||||
INITRAMFS_LINK_NAME ?= "initramfs-${KERNEL_ARTIFACT_LINK_NAME}"
|
||||
@@ -3867,7 +3867,7 @@ system and gives an overview of their function and contents.
|
||||
|
||||
:term:`INITRAMFS_NAME`
|
||||
The base name of the initial RAM filesystem image. This variable is
|
||||
set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
|
||||
set in the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as
|
||||
follows::
|
||||
|
||||
INITRAMFS_NAME ?= "initramfs-${KERNEL_ARTIFACT_NAME}"
|
||||
@@ -4077,7 +4077,7 @@ system and gives an overview of their function and contents.
|
||||
variable.
|
||||
|
||||
The value of :term:`KERNEL_ARTIFACT_NAME`, which is set in the
|
||||
``meta/classes/kernel-artifact-names.bbclass`` file, has the
|
||||
``meta/classes-recipe/kernel-artifact-names.bbclass`` file, has the
|
||||
following default value::
|
||||
|
||||
KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
|
||||
@@ -4090,7 +4090,7 @@ system and gives an overview of their function and contents.
|
||||
:ref:`kernel <ref-classes-kernel>` class should inherit. You
|
||||
typically append this variable to enable extended image types. An
|
||||
example is the "kernel-fitimage", which enables fitImage support and
|
||||
resides in ``meta/classes/kernel-fitimage.bbclass``. You can register
|
||||
resides in ``meta/classes-recipe/kernel-fitimage.bbclass``. You can register
|
||||
custom kernel image types with the :ref:`kernel <ref-classes-kernel>` class using this
|
||||
variable.
|
||||
|
||||
@@ -4120,7 +4120,7 @@ system and gives an overview of their function and contents.
|
||||
|
||||
:term:`KERNEL_DTB_LINK_NAME`
|
||||
The link name of the kernel device tree binary (DTB). This variable
|
||||
is set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
|
||||
is set in the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as
|
||||
follows::
|
||||
|
||||
KERNEL_DTB_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
|
||||
@@ -4136,7 +4136,7 @@ system and gives an overview of their function and contents.
|
||||
|
||||
:term:`KERNEL_DTB_NAME`
|
||||
The base name of the kernel device tree binary (DTB). This variable
|
||||
is set in the ``meta/classes/kernel-artifact-names.bbclass`` file as
|
||||
is set in the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as
|
||||
follows::
|
||||
|
||||
KERNEL_DTB_NAME ?= "${KERNEL_ARTIFACT_NAME}"
|
||||
@@ -4187,7 +4187,7 @@ system and gives an overview of their function and contents.
|
||||
|
||||
:term:`KERNEL_FIT_LINK_NAME`
|
||||
The link name of the kernel flattened image tree (FIT) image. This
|
||||
variable is set in the ``meta/classes/kernel-artifact-names.bbclass``
|
||||
variable is set in the ``meta/classes-recipe/kernel-artifact-names.bbclass``
|
||||
file as follows::
|
||||
|
||||
KERNEL_FIT_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
|
||||
@@ -4203,7 +4203,7 @@ system and gives an overview of their function and contents.
|
||||
|
||||
:term:`KERNEL_FIT_NAME`
|
||||
The base name of the kernel flattened image tree (FIT) image. This
|
||||
variable is set in the ``meta/classes/kernel-artifact-names.bbclass``
|
||||
variable is set in the ``meta/classes-recipe/kernel-artifact-names.bbclass``
|
||||
file as follows::
|
||||
|
||||
KERNEL_FIT_NAME ?= "${KERNEL_ARTIFACT_NAME}"
|
||||
@@ -4215,7 +4215,7 @@ system and gives an overview of their function and contents.
|
||||
|
||||
:term:`KERNEL_IMAGE_LINK_NAME`
|
||||
The link name for the kernel image. This variable is set in the
|
||||
``meta/classes/kernel-artifact-names.bbclass`` file as follows::
|
||||
``meta/classes-recipe/kernel-artifact-names.bbclass`` file as follows::
|
||||
|
||||
KERNEL_IMAGE_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
|
||||
|
||||
@@ -4243,7 +4243,7 @@ system and gives an overview of their function and contents.
|
||||
|
||||
:term:`KERNEL_IMAGE_NAME`
|
||||
The base name of the kernel image. This variable is set in the
|
||||
``meta/classes/kernel-artifact-names.bbclass`` file as follows::
|
||||
``meta/classes-recipe/kernel-artifact-names.bbclass`` file as follows::
|
||||
|
||||
KERNEL_IMAGE_NAME ?= "${KERNEL_ARTIFACT_NAME}"
|
||||
|
||||
@@ -4978,7 +4978,7 @@ system and gives an overview of their function and contents.
|
||||
|
||||
:term:`MODULE_TARBALL_LINK_NAME`
|
||||
The link name of the kernel module tarball. This variable is set in
|
||||
the ``meta/classes/kernel-artifact-names.bbclass`` file as follows::
|
||||
the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as follows::
|
||||
|
||||
MODULE_TARBALL_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
|
||||
|
||||
@@ -4992,7 +4992,7 @@ system and gives an overview of their function and contents.
|
||||
|
||||
:term:`MODULE_TARBALL_NAME`
|
||||
The base name of the kernel module tarball. This variable is set in
|
||||
the ``meta/classes/kernel-artifact-names.bbclass`` file as follows::
|
||||
the ``meta/classes-recipe/kernel-artifact-names.bbclass`` file as follows::
|
||||
|
||||
MODULE_TARBALL_NAME ?= "${KERNEL_ARTIFACT_NAME}"
|
||||
|
||||
@@ -5127,7 +5127,7 @@ system and gives an overview of their function and contents.
|
||||
``sysroots/`` directory so that all builds that use the script will
|
||||
use the correct directories for the cross compiling layout.
|
||||
|
||||
See the ``meta/classes/binconfig.bbclass`` in the
|
||||
See the ``meta/classes-recipe/binconfig.bbclass`` in the
|
||||
:term:`Source Directory` for details on how this class
|
||||
applies these additional sed command arguments.
|
||||
|
||||
@@ -8783,6 +8783,9 @@ system and gives an overview of their function and contents.
|
||||
A list of classes to globally inherit. These classes are used by the
|
||||
OpenEmbedded build system to enable extra features.
|
||||
|
||||
Classes inherited using :term:`USER_CLASSES` must be located in the
|
||||
``classes-global/`` or ``classes/`` subdirectories.
|
||||
|
||||
The default list is set in your ``local.conf`` file::
|
||||
|
||||
USER_CLASSES ?= "buildstats"
|
||||
|
||||
Reference in New Issue
Block a user