2975 lines
125 KiB
XML
2975 lines
125 KiB
XML
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
|
|
[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
|
|
|
|
<chapter id='ref-classes'>
|
|
<title>Classes</title>
|
|
|
|
<para>
|
|
Class files are used to abstract common functionality and share it amongst
|
|
multiple recipe (<filename>.bb</filename>) files.
|
|
To use a class file, you simply make sure the recipe inherits the class.
|
|
In most cases, when a recipe inherits a class it is enough to enable its
|
|
features.
|
|
There are cases, however, where in the recipe you might need to set
|
|
variables or override some default behavior.
|
|
</para>
|
|
|
|
<para>
|
|
Any <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink> usually
|
|
found in a recipe can also be placed in a class file.
|
|
Class files are identified by the extension <filename>.bbclass</filename>
|
|
and are usually placed in a <filename>classes/</filename> directory beneath
|
|
the <filename>meta*/</filename> directory found in the
|
|
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
|
|
Class files can also be pointed to by
|
|
<link linkend='var-BUILDDIR'><filename>BUILDDIR</filename></link>
|
|
(e.g. <filename>build/</filename>) in the same way as
|
|
<filename>.conf</filename> files in the <filename>conf</filename> directory.
|
|
Class files are searched for in
|
|
<link linkend='var-BBPATH'><filename>BBPATH</filename></link>
|
|
using the same method by which <filename>.conf</filename> files are
|
|
searched.
|
|
</para>
|
|
|
|
<para>
|
|
This chapter discusses only the most useful and important classes.
|
|
Other classes do exist within the <filename>meta/classes</filename>
|
|
directory in the
|
|
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
|
|
You can reference the <filename>.bbclass</filename> files directly
|
|
for more information.
|
|
</para>
|
|
|
|
<section id='ref-classes-allarch'>
|
|
<title><filename>allarch.bbclass</filename></title>
|
|
|
|
<para>
|
|
The all architecture (<filename>allarch</filename>) class is inherited
|
|
by recipes that do not produce architecture-specific output.
|
|
The class disables functionality that is normally needed for recipes
|
|
that produce executable binaries (such as building the cross-compiler
|
|
and a C library as pre-requisites, and splitting out of debug symbols
|
|
during packaging).
|
|
</para>
|
|
|
|
<para>
|
|
By default, all recipes inherit the
|
|
<link linkend='ref-classes-base'><filename>base</filename></link> and
|
|
<link linkend='ref-classes-package'><filename>package</filename></link>
|
|
classes, which enable functionality
|
|
needed for recipes that produce executable output.
|
|
If your recipe, for example, only produces packages that contain
|
|
configuration files, media files, or scripts (e.g. Python and Perl),
|
|
then it should inherit the <filename>allarch</filename> class.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-archiver'>
|
|
<title><filename>archive*.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>archive*</filename> set of classes support releasing
|
|
source code and other materials with the binaries.
|
|
This set of classes consists of the following:
|
|
<itemizedlist>
|
|
<listitem><filename>archive-original-sources.bbclass</filename></listitem>
|
|
<listitem><filename>archive-patched-sources.bbclass</filename></listitem>
|
|
<listitem><filename>archive-configured-sources.bbclass</filename></listitem>
|
|
<listitem><filename>archiver.bbclass</filename></listitem>
|
|
</itemizedlist>
|
|
</para>
|
|
|
|
<para>
|
|
For more details on the source archiver, see the
|
|
"<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle'>Maintaining Open Source License Compliance During Your Product's Lifecycle</ulink>"
|
|
section in the Yocto Project Development Manual.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-autotools'>
|
|
<title><filename>autotools.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>autotools</filename> class supports Autotooled
|
|
packages.
|
|
</para>
|
|
|
|
<para>
|
|
The <filename>autoconf</filename>, <filename>automake</filename>,
|
|
and <filename>libtool</filename> bring standardization.
|
|
This class defines a set of tasks (configure, compile etc.) that
|
|
work for all Autotooled packages.
|
|
It should usually be enough to define a few standard variables
|
|
and then simply <filename>inherit autotools</filename>.
|
|
This class can also work with software that emulates Autotools.
|
|
For more information, see the
|
|
"<ulink url='&YOCTO_DOCS_DEV_URL;#usingpoky-extend-addpkg-autotools'>Autotooled Package</ulink>"
|
|
section in the Yocto Project Development Manual.
|
|
</para>
|
|
|
|
<para>
|
|
It's useful to have some idea of how the tasks defined by this class work
|
|
and what they do behind the scenes.
|
|
<itemizedlist>
|
|
<listitem><para><filename>do_configure</filename> ‐ Regenerates the
|
|
configure script (using <filename>autoreconf</filename>) and then launches it
|
|
with a standard set of arguments used during cross-compilation.
|
|
You can pass additional parameters to <filename>configure</filename> through the
|
|
<filename><link linkend='var-EXTRA_OECONF'>EXTRA_OECONF</link></filename> variable.
|
|
</para></listitem>
|
|
<listitem><para><filename>do_compile</filename> ‐ Runs <filename>make</filename> with
|
|
arguments that specify the compiler and linker.
|
|
You can pass additional arguments through
|
|
the <filename><link linkend='var-EXTRA_OEMAKE'>EXTRA_OEMAKE</link></filename> variable.
|
|
</para></listitem>
|
|
<listitem><para><filename>do_install</filename> ‐ Runs <filename>make install</filename>
|
|
and passes in
|
|
<filename>${</filename><link linkend='var-D'><filename>D</filename></link><filename>}</filename>
|
|
as <filename>DESTDIR</filename>.
|
|
</para></listitem>
|
|
</itemizedlist>
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-base'>
|
|
<title><filename>base.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>base</filename> class is special in that every
|
|
<filename>.bb</filename> file automatically inherits the class.
|
|
This class contains definitions for standard basic
|
|
tasks such as fetching, unpacking, configuring (empty by default),
|
|
compiling (runs any <filename>Makefile</filename> present), installing
|
|
(empty by default) and packaging (empty by default).
|
|
These classes are often overridden or extended by other classes
|
|
such as the
|
|
<link linkend='ref-classes-autotools'><filename>autotools</filename></link>
|
|
class or the
|
|
<link linkend='ref-classes-package'><filename>package</filename></link>
|
|
class.
|
|
The class also contains some commonly used functions such as
|
|
<filename>oe_runmake</filename>.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-bin-package'>
|
|
<title><filename>bin_package.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>bin_package</filename> class is a
|
|
helper class for recipes that extract the contents of a binary package
|
|
(e.g. an RPM) and install those contents rather than building the
|
|
binary from source.
|
|
The binary package is extracted and new packages in the configured
|
|
output package format are created.
|
|
<note>
|
|
For RPMs and other packages that do not contain a subdirectory,
|
|
you should specify a "subdir" parameter.
|
|
Here is an example where <filename>${BP}</filename> matches the
|
|
subdirectory expected by the default value of
|
|
<link linkend='var-S'><filename>S</filename></link>:
|
|
<literallayout class='monospaced'>
|
|
SRC_URI = "http://example.com/downloads/somepackage.rpm;subdir=${BP}"
|
|
</literallayout>
|
|
</note>
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-binconfig'>
|
|
<title><filename>binconfig.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>binconfig</filename> class helps to correct paths in
|
|
shell scripts.
|
|
</para>
|
|
|
|
<para>
|
|
Before <filename>pkg-config</filename> had become widespread, libraries
|
|
shipped shell scripts to give information about the libraries and
|
|
include paths needed to build software (usually named
|
|
<filename>LIBNAME-config</filename>).
|
|
This class assists any recipe using such scripts.
|
|
</para>
|
|
|
|
<para>
|
|
During staging, the OpenEmbedded build system installs such scripts
|
|
into the <filename>sysroots/</filename> directory.
|
|
Inheriting this class results in all paths in these scripts being
|
|
changed to point into the <filename>sysroots/</filename> directory so
|
|
that all builds that use the script use the correct directories
|
|
for the cross compiling layout.
|
|
See the
|
|
<link linkend='var-BINCONFIG_GLOB'><filename>BINCONFIG_GLOB</filename></link>
|
|
variable for more information.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-blacklist'>
|
|
<title><filename>blacklist.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>blacklist</filename> class prevents
|
|
the OpenEmbedded build system from building specific recipes
|
|
(blacklists them).
|
|
To use this class, inherit the class globally and set
|
|
<link linkend='var-PNBLACKLIST'><filename>PNBLACKLIST</filename></link>
|
|
for each recipe you wish to blacklist.
|
|
Specify the <link linkend='var-PN'><filename>PN</filename></link>
|
|
value as a variable flag (varflag) and provide a reason, which is
|
|
reported, if the package is requested to be built as the value.
|
|
For example, if you want to blacklist a recipe called "exoticware",
|
|
you add the following to your <filename>local.conf</filename>
|
|
or distribution configuration:
|
|
<literallayout class='monospaced'>
|
|
INHERIT += "blacklist"
|
|
PNBLACKLIST[exoticware] = "Not supported by our organization."
|
|
</literallayout>
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-boot-directdisk'>
|
|
<title><filename>boot-directdisk.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>boot-directdisk</filename> class
|
|
creates an image that can be placed directly onto a hard disk using
|
|
<filename>dd</filename> and then booted.
|
|
The image uses SYSLINUX.
|
|
</para>
|
|
|
|
<para>
|
|
The end result is a 512 boot sector populated with a
|
|
Master Boot Record (MBR) and partition table followed by an MSDOS
|
|
FAT16 partition containing SYSLINUX and a Linux kernel completed by
|
|
the <filename>ext2</filename> and <filename>ext3</filename>
|
|
root filesystems.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-bootimg'>
|
|
<title><filename>bootimg.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>bootimg</filename> class creates a bootable
|
|
image using SYSLINUX, your kernel and an optional initial RAM disk
|
|
(<filename>initrd</filename>).
|
|
</para>
|
|
|
|
<para>
|
|
When you use this class, two things happen:
|
|
<itemizedlist>
|
|
<listitem><para>
|
|
A <filename>.hddimg</filename> file is created.
|
|
This file which is an MSDOS filesystem that contains SYSLINUX,
|
|
a kernel, an <filename>initrd</filename>, and a root filesystem
|
|
image.
|
|
All three of these can be written to hard drives directly and
|
|
also booted on a USB flash disks using <filename>dd</filename>.
|
|
</para></listitem>
|
|
<listitem><para>
|
|
A CD <filename>.iso</filename> image is created.
|
|
When this file is booted, the <filename>initrd</filename>
|
|
boots and processes the label selected in SYSLINUX.
|
|
Actions based on the label are then performed (e.g. installing
|
|
to a hard drive).</para></listitem>
|
|
</itemizedlist>
|
|
</para>
|
|
|
|
<para>
|
|
The <filename>bootimg</filename> class supports the
|
|
<link linkend='var-INITRD'><filename>INITRD</filename></link>,
|
|
<link linkend='var-NOISO'><filename>NOISO</filename></link>,
|
|
<link linkend='var-NOHDD'><filename>NOHDD</filename></link>, and
|
|
<link linkend='var-ROOTFS'><filename>ROOTFS</filename></link>
|
|
variables.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-bugzilla'>
|
|
<title><filename>bugzilla.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>bugzilla</filename> class, if enabled in
|
|
your instance of Bugzilla, automatically files bug reports to that
|
|
enabled instance in response to build failures.
|
|
This class uses Bugzilla's XML-RPC interface.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-buildhistory'>
|
|
<title><filename>buildhistory.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>buildhistory</filename> class records a
|
|
history of build output metadata, which can be used to detect possible
|
|
regressions as well as used for analysis of the build output.
|
|
For more information on using Build History, see the
|
|
"<link linkend='maintaining-build-output-quality'>Maintaining Build Output Quality</link>"
|
|
section.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-buildstats'>
|
|
<title><filename>buildstats.bbclass</filename></title>
|
|
|
|
<para>
|
|
The Build Stats (<filename>buildstats</filename>) class records
|
|
performance statistics about each task executed during the build
|
|
(e.g. elapsed time, CPU usage, and I/O usage).
|
|
</para>
|
|
|
|
<para>
|
|
When you use this class, the output goes into the
|
|
<link linkend='var-BUILDSTATS_BASE'><filename>BUILDSTATS_BASE</filename></link>
|
|
directory, which defaults to <filename>${TMPDIR}/buildstats/</filename>.
|
|
You can analyze the elapsed time using
|
|
<filename>scripts/pybootchartgui/pybootchartgui.py</filename>, which
|
|
produces a cascading chart of the entire build process and can be
|
|
useful for highlighting bottlenecks.
|
|
</para>
|
|
|
|
<para>
|
|
To enable this class, use the
|
|
<link linkend='var-USER_CLASSES'><filename>USER_CLASSES</filename></link>
|
|
variable from your <filename>local.conf</filename> file.
|
|
The <filename>meta-yocto/conf/local.conf.sample</filename> file
|
|
in the
|
|
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
|
|
enables this class by default.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-chrpath'>
|
|
<title><filename>chrpath.bbclass</filename></title>
|
|
|
|
<para>
|
|
The change runtime search path (<filename>chrpath</filename>) class
|
|
is a wrapper around the "chrpath" utility, which is used during the
|
|
build process for <filename>nativesdk</filename> recipes to change
|
|
<filename>RPATH</filename> records within binaries in order to make
|
|
them relocatable.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-ccache'>
|
|
<title><filename>ccache.bbclass</filename></title>
|
|
|
|
<para>
|
|
The C/C++ Compiler Cache (<filename>ccache</filename>) class enables
|
|
this cache for the build.
|
|
This class is used to give a minor performance boost during the build.
|
|
However, using the class can lead to unexpected side-effects.
|
|
Thus, it is recommended that you do not use this class.
|
|
See <ulink url='http://ccache.samba.org/'></ulink> for information on
|
|
the C/C++ Compiler Cache.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-clutter'>
|
|
<title><filename>clutter.bbclass</filename></title>
|
|
|
|
<para>
|
|
The Clutter (<filename>clutter</filename>) class consolidates the
|
|
major and minor version naming and other common items used by Clutter
|
|
and related recipes.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-cmake'>
|
|
<title><filename>cmake.bbclass</filename></title>
|
|
|
|
<para>
|
|
The CMake build system (<filename>cmake</filename>) class allows for
|
|
recipes that need to build software using the CMake build system.
|
|
You can use the
|
|
<link linkend='var-EXTRA_OECMAKE'><filename>EXTRA_OECMAKE</filename></link>
|
|
variable to specify additional configuration options to be passed on
|
|
the <filename>cmake</filename> command line.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-cml1'>
|
|
<title><filename>cml1.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>cml1</filename> class provides basic support for the
|
|
Linux kernel style build configuration system.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-copyleft_compliance'>
|
|
<title><filename>copyleft_compliance.bbclass</filename></title>
|
|
|
|
<para>
|
|
The Copyleft Compliance (<filename>copyleft_compliance</filename>) class
|
|
preserves source code for the purposes of license compliance.
|
|
This class is an alternative to the <filename>archive*</filename>
|
|
classes and is still used by some users even though it has been
|
|
deprecated in favor of the
|
|
<link linkend='ref-classes-archiver'><filename>archive*</filename></link>
|
|
classes.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-core-image'>
|
|
<title><filename>core-image.bbclass</filename></title>
|
|
|
|
<para>
|
|
The Core Image (<filename>core-image</filename>) class
|
|
provides common definitions for the
|
|
<filename>core-image-*</filename> image recipes, such as support for
|
|
additional
|
|
<link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-cross'>
|
|
<title><filename>cross.bbclass</filename></title>
|
|
|
|
<para>
|
|
The cross-compilation (<filename>cross</filename>) class
|
|
provides support for cross-compilation tools.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-cross-canadian'>
|
|
<title><filename>cross-canadian.bbclass</filename></title>
|
|
|
|
<para>
|
|
The Canadian Cross (<filename>cross-canadian</filename>) class
|
|
provides support for Canadian Cross compilation tools for SDKs.
|
|
See the
|
|
"<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
|
|
section for more discussion on these cross-compilation tools.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-crosssdk'>
|
|
<title><filename>crosssdk.bbclass</filename></title>
|
|
|
|
<para>
|
|
The Cross SDK (<filename>crosssdk</filename>) class
|
|
provides support for cross-compilation tools used for building
|
|
SDKs.
|
|
See the
|
|
"<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
|
|
section for more discussion on these cross-compilation tools.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-deploy'>
|
|
<title><filename>deploy.bbclass</filename></title>
|
|
|
|
<para>
|
|
The Deploy (<filename>deploy</filename>) class handles deploying files
|
|
to the
|
|
<link linkend='var-DEPLOY_DIR_IMAGE'><filename>DEPLOY_DIR_IMAGE</filename></link>
|
|
directory.
|
|
The main function of this class is to allow the deploy step to be
|
|
accelerated by shared state.
|
|
Recipes that inherit this class should define their own
|
|
<filename>do_deploy</filename> function to copy the files to be
|
|
deployed to
|
|
<link linkend='var-DEPLOY_DIR'><filename>DEPLOYDIR</filename></link>,
|
|
and use <filename>addtask</filename> to add the task at the appropriate
|
|
place, which is usually after <filename>do_compile</filename> or
|
|
<filename>do_install</filename>.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-distrodata'>
|
|
<title><filename>distrodata.bbclass</filename></title>
|
|
|
|
<para>
|
|
The Distribution Data (<filename>distrodata</filename>) class
|
|
provides for automatic checking for upstream recipe updates.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-distro_features_check'>
|
|
<title><filename>distro_features_check.bbclass</filename></title>
|
|
|
|
<para>
|
|
The Distribution Features Check (<filename>distro_features_check</filename>) class
|
|
allows individual recipes to check for required and conflicting
|
|
<link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>.
|
|
</para>
|
|
|
|
<para>
|
|
This class provides support for the
|
|
<link linkend='var-REQUIRED_DISTRO_FEATURES'><filename>REQUIRED_DISTRO_FEATURES</filename></link>
|
|
and
|
|
<link linkend='var-CONFLICT_DISTRO_FEATURES'><filename>CONFLICT_DISTRO_FEATURES</filename></link>
|
|
variables.
|
|
If any conditions specified in the recipe using the above variables are
|
|
not met, the recipe will be skipped.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-extrausers'>
|
|
<title><filename>extrausers.bbclass</filename></title>
|
|
|
|
<para>
|
|
The extra users (<filename>extrausers</filename>) class allows
|
|
additional user and group configuration to be applied at the image
|
|
level.
|
|
Inheriting this class either globally or from an image recipe allows
|
|
additional user and group operations to be performed using the
|
|
<link linkend='var-EXTRA_USERS_PARAMS'><filename>EXTRA_USERS_PARAMS</filename></link>
|
|
variable.
|
|
<note>
|
|
The user and group operations added using the
|
|
<filename>extrausers</filename> class are not tied to a specific
|
|
recipe but can be performed across the image as a whole.
|
|
See the
|
|
<link linkend='ref-classes-useradd'><filename>useradd</filename></link>
|
|
class for information on how to add user and group configuration
|
|
to a specific recipe.
|
|
</note>
|
|
</para>
|
|
|
|
<para>
|
|
Here is an example that uses this class in an image recipe:
|
|
<literallayout class='monospaced'>
|
|
inherit extrausers
|
|
EXTRA_USERS_PARAMS = "\
|
|
useradd -p '' tester; \
|
|
groupadd developers; \
|
|
userdel nobody; \
|
|
groupdel -g video; \
|
|
groupmod -g 1020 developers; \
|
|
usermod -s /bin/sh tester; \
|
|
"
|
|
</literallayout>
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-fontcache'>
|
|
<title><filename>fontcache.bbclass</filename></title>
|
|
|
|
<para>
|
|
The font cache (<filename>fontcache</filename>) class generates the
|
|
proper post-installation and post-remove (postinst and postrm)
|
|
scriptlets for font packages.
|
|
These scriptlets call <filename>fc-cache</filename> (part of
|
|
<filename>Fontconfig</filename>) to add the fonts to the font
|
|
information cache.
|
|
Since the cache files are architecture-specific,
|
|
<filename>fc-cache</filename> runs using QEMU if the postinst
|
|
scriptlets need to be run on the build host during image creation.
|
|
</para>
|
|
|
|
<para>
|
|
If the fonts being installed are in packages other than the main
|
|
package, set
|
|
<link linkend='var-FONT_PACKAGES'><filename>FONT_PACKAGES</filename></link>
|
|
to include the packages containing the fonts.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-debian'>
|
|
<title>Debian Renaming - <filename>debian.bbclass</filename></title>
|
|
|
|
<para>
|
|
This class renames packages so that they follow the Debian naming
|
|
policy (i.e. <filename>eglibc</filename> becomes <filename>libc6</filename>
|
|
and <filename>eglibc-devel</filename> becomes <filename>libc6-dev</filename>.)
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-gconf'>
|
|
<title><filename>gconf.bbclass</filename></title>
|
|
|
|
<para>
|
|
The GConf (<filename>gconf</filename>) class provides common
|
|
functionality for recipes that need to install GConf schemas.
|
|
The schemas will be put into a separate package
|
|
(<filename>${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}-gconf</filename>)
|
|
that is created automatically when this class is inherited.
|
|
This package uses the appropriate post-installation and post-remove
|
|
(postinst/postrm) scriptlets to register and unregister the schemas
|
|
in the target image.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-gettext'>
|
|
<title><filename>gettext.bbclass</filename></title>
|
|
|
|
<para>
|
|
The GText (<filename>gettext</filename>) class provides support for
|
|
building software that uses the GNU <filename>gettext</filename>
|
|
internationalization and localization system.
|
|
All recipes building software that use
|
|
<filename>gettext</filename> should inherit this class.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-gnome'>
|
|
<title><filename>gnome.bbclass</filename></title>
|
|
|
|
<para>
|
|
The GNOME (<filename>gnome</filename>) class supports recipes that
|
|
build software from the GNOME stack.
|
|
This class inherits the
|
|
<link linkend='ref-classes-gnomebase'><filename>gnomebase</filename></link>,
|
|
<link linkend='ref-classes-gtk-icon-cache'><filename>gtk-icon-cache</filename></link>,
|
|
<link linkend='ref-classes-gconf'><filename>gconf</filename></link> and
|
|
<link linkend='ref-classes-mime'><filename>mime</filename></link> classes.
|
|
The class also disables GLib Object System (Gobject) introspection
|
|
where applicable.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-gnomebase'>
|
|
<title><filename>gnomebase.bbclass</filename></title>
|
|
|
|
<para>
|
|
The GNOME base (<filename>gnomebase</filename>) class is the base
|
|
class for recipes that build software from the GNOME stack.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-grub-efi'>
|
|
<title><filename>grub-efi.bbclass</filename></title>
|
|
|
|
<para>
|
|
The GRUB Extensible Firmware Interface (<filename>grub-efi</filename>)
|
|
class provides <filename>grub-efi</filename>-specific functions for
|
|
building bootable images.
|
|
</para>
|
|
|
|
<para>
|
|
This class supports several variables:
|
|
<itemizedlist>
|
|
<listitem><para>
|
|
<link linkend='var-INITRD'><filename>INITRD</filename></link>:
|
|
Indicates a filesystem image to use as an initrd (optional).
|
|
</para></listitem>
|
|
<listitem><para>
|
|
<link linkend='var-ROOTFS'><filename>ROOTFS</filename></link>:
|
|
Indicates a filesystem image to include as the root filesystem
|
|
(optional).</para></listitem>
|
|
<listitem><para>
|
|
<link linkend='var-GRUB_GFXSERIAL'><filename>GRUB_GFXSERIAL</filename></link>:
|
|
Set this to "1" to have graphics and serial in the boot menu.
|
|
</para></listitem>
|
|
<listitem><para>
|
|
<link linkend='var-LABELS'><filename>LABELS</filename></link>:
|
|
A list of targets for the automatic configuration.
|
|
</para></listitem>
|
|
<listitem><para>
|
|
<link linkend='var-APPEND'><filename>APPEND</filename></link>:
|
|
An override list of append strings for each
|
|
<filename>LABEL</filename>.
|
|
</para></listitem>
|
|
<listitem><para>
|
|
<link linkend='var-GRUB_OPTS'><filename>GRUB_OPTS</filename></link>:
|
|
Additional options to add to the configuration (optional).
|
|
Options are delimited using semi-colon characters
|
|
(<filename>;</filename>).</para></listitem>
|
|
<listitem><para>
|
|
<link linkend='var-GRUB_TIMEOUT'><filename>GRUB_TIMEOUT</filename></link>:
|
|
Timeout before executing the default <filename>LABEL</filename>
|
|
(optional).
|
|
</para></listitem>
|
|
</itemizedlist>
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-gsettings'>
|
|
<title><filename>gsettings.bbclass</filename></title>
|
|
|
|
<para>
|
|
The GSettings (<filename>gsettings</filename>) class
|
|
provides common functionality for recipes that need to install
|
|
GSettings (glib) schemas.
|
|
The schemas are assumed to be part of the main package.
|
|
Appropriate post-installation and post-remove (postinst/postrm)
|
|
scriptlets are added to register and unregister the schemas in the
|
|
target image.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-gtk-doc'>
|
|
<title><filename>gtk-doc.bbclass</filename></title>
|
|
|
|
<para>
|
|
The GIMP Toolkit Documentation (<filename>gtk-doc</filename>) class
|
|
is a helper class to pull in the appropriate
|
|
<filename>gtk-doc</filename> dependencies and disable
|
|
<filename>gtk-doc</filename>.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-gtk-icon-cache'>
|
|
<title><filename>gtk-icon-cache.bbclass</filename></title>
|
|
|
|
<para>
|
|
The GIMP Toolkit icon cache (<filename>gtk-icon-cache</filename>) class
|
|
Generates the proper post-install and post-remove (postinst/postrm)
|
|
scriptlets for packages that use GTK+ and install icons.
|
|
These scriptlets call <filename>gtk-update-icon-cache</filename> to add
|
|
the fonts to GTK+'s icon cache.
|
|
Since the cache files are architecture-specific,
|
|
<filename>gtk-update-icon-cache</filename> is run using QEMU if the
|
|
postinst scriptlets need to be run on the build host during image
|
|
creation.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-gtk-immodules-cache'>
|
|
<title><filename>gtk-immodules-cache.bbclass</filename></title>
|
|
|
|
<para>
|
|
The GIMP Toolkit input method modules
|
|
(<filename>gtk-immodules-cache</filename>) class
|
|
generates the proper post-install and post-remove (postinst/postrm)
|
|
scriptlets for packages that install GTK+ input method modules for
|
|
virtual keyboards.
|
|
These scriptlets call <filename>gtk-update-icon-cache</filename> to add
|
|
the input method modules to the cache.
|
|
Since the cache files are architecture-specific,
|
|
<filename>gtk-update-icon-cache</filename> is run using QEMU if the
|
|
postinst scriptlets need to be run on the build host during image
|
|
creation.
|
|
</para>
|
|
|
|
<para>
|
|
If the input method modules being installed are in packages other than
|
|
the main package, set
|
|
<link linkend='var-GTKIMMODULES_PACKAGES'><filename>GTKIMMODULES_PACKAGES</filename></link>
|
|
to include the packages containing the modules.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-gzipnative'>
|
|
<title><filename>gzipnative.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>gzip</filename> native (<filename>gzipnative</filename>)
|
|
class enables the use of native versions of <filename>gzip</filename>
|
|
and <filename>pigz</filename> rather than the system versions.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-icecc'>
|
|
<title><filename>icecc.bbclass</filename></title>
|
|
|
|
<para>
|
|
The Icecream distributed compile support (<filename>icecc</filename>)
|
|
class stages directories with symlinks from
|
|
<filename>gcc</filename> and <filename>g++</filename> to
|
|
<filename>icecc</filename>, for both native and cross compilers.
|
|
Depending on each configure or compile, the OpenEmbedded build system
|
|
adds the directories at the head of the <filename>PATH</filename> list
|
|
and then sets
|
|
<link linkend='var-ICECC_CXX'><filename>ICECC_CXX</filename></link>
|
|
and
|
|
<link linkend='var-ICECC_CC'><filename>ICEC_CC</filename></link>.
|
|
</para>
|
|
|
|
<para>
|
|
For the cross compiler, the class creates a <filename>tar.gz</filename>
|
|
file that contains the Yocto Project toolchain and sets
|
|
<link linkend='var-ICECC_VERSION'><filename>ICECC_VERSION</filename></link>
|
|
accordingly.
|
|
</para>
|
|
|
|
<para>
|
|
The class handles all three different compile stages
|
|
(i.e native ,cross-kernel and target) and creates the necessary
|
|
environment <filename>tar.gz</filename> file to be used by the remote
|
|
machines.
|
|
The class also supports SDK generation.
|
|
</para>
|
|
|
|
<para>
|
|
If <link linkend='var-ICECC_PATH'><filename>ICECC_PATH</filename></link>
|
|
is not set in your <filename>local.conf</filename> file, then the
|
|
class tries to locate it using <filename>which</filename>.
|
|
|
|
If
|
|
<link linkend='var-ICECC_ENV_EXEC'><filename>ICECC_ENV_EXEC</filename></link>
|
|
is set in your <filename>local.conf</filename> file, the variable should
|
|
point to the <filename>icecc-create-env</filename> script provided by
|
|
the user.
|
|
If you do not point to a user-provided script, the build system
|
|
uses the default script provided by the recipe
|
|
<filename>icecc-create-env.bb</filename>.
|
|
<note>
|
|
This script is a modified version and not the one that comes with
|
|
<filename>icecc</filename>.
|
|
</note>
|
|
</para>
|
|
|
|
<para>
|
|
If you do not want the Icecream distributed compile support to apply
|
|
to specific packages or classes, you can effectively "blacklist" them
|
|
by listing the packages and classes using the
|
|
<link linkend='var-ICECC_USER_PACKAGE_BL'><filename>ICECC_USER_PACKAGE_BL</filename></link>
|
|
and
|
|
<link linkend='var-ICECC_USER_CLASS_BL'><filename>ICECC_USER_CLASS_BL</filename></link>,
|
|
variables, respectively, in your <filename>local.conf</filename> file.
|
|
Doing so causes the OpenEmbedded build system to handle these
|
|
compilations locally.
|
|
</para>
|
|
|
|
<para>
|
|
Additionally, you can list packages using the
|
|
<link linkend='var-ICECC_USER_PACKAGE_WL'><filename>ICECC_USER_PACKAGE_WL</filename></link>
|
|
variable in your <filename>local.conf</filename> file to force
|
|
<filename>icecc</filename> to be enabled for packages using an empty
|
|
<link linkend='var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></link>
|
|
variable.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-image-live'>
|
|
<title><filename>image-live.bbclass</filename></title>
|
|
|
|
<para>
|
|
The live image (<filename>image-live</filename>) class
|
|
supports building "live" images.
|
|
Normally, you do not use this class directly.
|
|
Instead, you add "live" to
|
|
<link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-image-vmdk'>
|
|
<title><filename>image-vmdk.bbclass</filename></title>
|
|
|
|
<para>
|
|
The Virtual Machine Disk image (<filename>image-vmdk</filename>) class
|
|
supports building VMware VMDK images.
|
|
Normally, you do not use this class directly.
|
|
Instead, you add "vmdk" to
|
|
<link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-image-mklibs'>
|
|
<title><filename>image-mklibs.bbclass</filename></title>
|
|
|
|
<para>
|
|
The make libraries (<filename>mklibs</filename>) class
|
|
enables the use of the <filename>mklibs</filename> utility during the
|
|
<filename>do_rootfs</filename> task, which optimizes the size of
|
|
libraries contained in the image.
|
|
</para>
|
|
|
|
<para>
|
|
The
|
|
<link linkend='var-USER_CLASSES'><filename>USER_CLASSES</filename></link>
|
|
variable enables this class.
|
|
By default, the class is enabled in the
|
|
<filename>local.conf.template</filename> in the
|
|
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
|
|
as follows:
|
|
<literallayout class='monospaced'>
|
|
USER_CLASSES ?= "buildstats image-mklibs image-prelink"
|
|
</literallayout>
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-image-prelink'>
|
|
<title><filename>image-prelink.bbclass</filename></title>
|
|
|
|
<para>
|
|
The image prelink (<filename>image-prelink</filename>) class
|
|
enables the use of the <filename>prelink</filename> utility during
|
|
the <filename>do_rootfs</filename> task, which optimizes the dynamic
|
|
linking of shared libraries to reduce executable startup time.
|
|
</para>
|
|
|
|
<para>
|
|
The
|
|
<link linkend='var-USER_CLASSES'><filename>USER_CLASSES</filename></link>
|
|
variable enables this class.
|
|
By default, the class is enabled in the
|
|
<filename>local.conf.template</filename> in the
|
|
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
|
|
as follows:
|
|
<literallayout class='monospaced'>
|
|
USER_CLASSES ?= "buildstats image-mklibs image-prelink"
|
|
</literallayout>
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-image-swab'>
|
|
<title><filename>image-swab.bbclass</filename></title>
|
|
|
|
<para>
|
|
The image Swabber (<filename>image-swab</filename>) class
|
|
enables the
|
|
<ulink url='&YOCTO_HOME_URL;/tools-resources/projects/swabber'>Swabber</ulink>
|
|
tool in order to detect and log accesses to the host system during
|
|
the OpenEmbedded build process.
|
|
<note>
|
|
This class is currently unmaintained.
|
|
</note>
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-image_types'>
|
|
<title><filename>image_types.bbclass</filename></title>
|
|
|
|
<para>
|
|
The image types (<filename>image_types</filename>) class defines all of
|
|
the standard image output types that you can enable through the
|
|
<link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
|
|
variable.
|
|
You can use this class as a reference on how to add support for custom
|
|
image output types.
|
|
</para>
|
|
|
|
<para>
|
|
By default, this class is enabled through the
|
|
<link linkend='var-IMAGE_CLASSES'><filename>IMAGE_CLASSES</filename></link>
|
|
variable in
|
|
<link linkend='ref-classes-image'><filename>image.bbclass</filename></link>.
|
|
If you define your own image types using a custom BitBake class and
|
|
then use <filename>IMAGE_CLASSES</filename> to enable it, the custom
|
|
class must either inherit <filename>image_types</filename> or
|
|
<filename>image_types</filename> must also appear in
|
|
<filename>IMAGE_CLASSES</filename>.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-image_types_uboot'>
|
|
<title><filename>image_types_uboot.bbclass</filename></title>
|
|
|
|
<para>
|
|
The U-Boot image types (<filename>image_types_uboot</filename>) class
|
|
defines additional image types specifically for the U-Boot bootloader.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-insserve'>
|
|
<title><filename>insserve.bbclass</filename></title>
|
|
|
|
<para>
|
|
The insserve (<filename>insserve</filename>) class
|
|
uses the <filename>insserv</filename> utility to update the order of
|
|
symbolic links in <filename>/etc/rc?.d/</filename> within an image
|
|
based on dependencies specified by LSB headers in the
|
|
<filename>init.d</filename> scripts themselves.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-kernel-arch'>
|
|
<title><filename>kernel-arch.bbclass</filename></title>
|
|
|
|
<para>
|
|
The kernel architecture (<filename>kernel-arch</filename>) class
|
|
sets the <filename>ARCH</filename> environment variable for Linux
|
|
kernel compilation (including modules).
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-kernel-module-split'>
|
|
<title><filename>kernel-module-split.bbclass</filename></title>
|
|
|
|
<para>
|
|
The kernel module split (<filename>kernel-module-split</filename>) class
|
|
provides common functionality for splitting Linux kernel modules into
|
|
separate packages.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-kernel-yocto'>
|
|
<title><filename>kernel-yocto.bbclass</filename></title>
|
|
|
|
<para>
|
|
The Yocto Project kernel (<filename>kernel-yocto</filename>) class
|
|
provides common functionality for building from linux-yocto style
|
|
kernel source repositories.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-lib_package'>
|
|
<title><filename>lib_package.bbclass</filename></title>
|
|
|
|
<para>
|
|
The library package (<filename>lib_package</filename>) class
|
|
supports recipes that build libraries and produce executable
|
|
binaries, where those binaries should not be installed by default
|
|
along with the library.
|
|
Instead, the binaries are added to a separate
|
|
<filename>${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}-bin</filename>
|
|
package to make their installation optional.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-linux-kernel-base'>
|
|
<title><filename>linux-kernel-base.bbclass</filename></title>
|
|
|
|
<para>
|
|
The Linux kernel base (<filename>linux-kernel-base</filename>) class
|
|
provides common functionality for recipes that build out of the Linux
|
|
kernel source tree.
|
|
These builds goes beyond the kernel itself.
|
|
For example, the Perf recipe also inherits this class.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-license'>
|
|
<title><filename>license.bbclass</filename></title>
|
|
|
|
<para>
|
|
The license (<filename>license</filename>) class provides license
|
|
manifest creation and license exclusion.
|
|
This class is enabled by default using the default value for the
|
|
<link linkend='var-INHERIT_DISTRO'><filename>INHERIT_DISTRO</filename></link>
|
|
variable.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-logging'>
|
|
<title><filename>logging.bbclass</filename></title>
|
|
|
|
<para>
|
|
The logging (<filename>logging</filename>) class provides the standard
|
|
shell functions used to log messages for various BitBake severity levels
|
|
(i.e. <filename>bbplain</filename>, <filename>bbnote</filename>,
|
|
<filename>bbwarn</filename>, <filename>bberror</filename>,
|
|
<filename>bbfatal</filename>, and <filename>bbdebug</filename>.
|
|
</para>
|
|
|
|
<para>
|
|
This class is enabled by default since it is inherited by
|
|
the <filename>base</filename> class.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-meta'>
|
|
<title><filename>meta.bbclass</filename></title>
|
|
|
|
<para>
|
|
The Metadata (<filename>meta</filename>) class is inherited by recipes
|
|
that do not build any output packages themselves, but act as a "meta"
|
|
target for building other recipes.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-metadata_scm'>
|
|
<title><filename>metadata_scm.bbclass</filename></title>
|
|
|
|
<para>
|
|
The Metadata Source Code Management (SCM) System
|
|
(<filename>metadata_scm</filename>) class provides functionality for
|
|
querying the branch and revision of an SCM repository.
|
|
</para>
|
|
|
|
<para>
|
|
The <link linkend='ref-classes-base'><filename>base</filename></link>
|
|
class uses this class to print the revisions of each layer before
|
|
starting every build.
|
|
The <filename>metadata_scm</filename> class is enabled by default
|
|
because it is inherited by the <filename>base</filename> class.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-mime'>
|
|
<title><filename>mime.bbclass</filename></title>
|
|
|
|
<para>
|
|
The Multipurpose Internet Mail Extension (MIME)
|
|
(<filename>mime</filename>) class generates the proper
|
|
post-install and post-remove (postinst/postrm) scriptlets for packages
|
|
that install MIME type files.
|
|
These scriptlets call <filename>update-mime-database</filename> to add
|
|
the MIME types to the shared database.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-mirrors'>
|
|
<title><filename>mirrors.bbclass</filename></title>
|
|
|
|
<para>
|
|
The mirrors (<filename>mirrors</filename>) class sets up some standard
|
|
<link linkend='var-MIRRORS'><filename>MIRRORS</filename></link> entries
|
|
for source code mirrors.
|
|
These mirrors provide a fall-back path in case the upstream source
|
|
specified in
|
|
<link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
|
|
within recipes is unavailable.
|
|
</para>
|
|
|
|
<para>
|
|
This class is enabled by default since it is inherited by the
|
|
<link linkend='ref-classes-base'><filename>base</filename></link> class.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-multilib*'>
|
|
<title><filename>multilib*.bbclass</filename></title>
|
|
|
|
<para>
|
|
The Multilib (<filename>multilib*</filename>) classes provide support
|
|
for building libraries with different target optimizations or target
|
|
architectures and installing them side-by-side in the same image.
|
|
</para>
|
|
|
|
<para>
|
|
For more information on using the Multilib feature, see the
|
|
"<ulink url='&YOCTO_DOCS_DEV_URL;#combining-multiple-versions-library-files-into-one-image'>Combining Multiple Versions of Library Files into One Image</ulink>"
|
|
section in the Yocto Project Development Manual.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-native'>
|
|
<title><filename>native.bbclass</filename></title>
|
|
|
|
<para>
|
|
The native (<filename>native</filename>) class provides common
|
|
functionality for recipes that wish to build tools to run on the build
|
|
host (i.e. tools that use the compiler or other tools from the
|
|
build host).
|
|
</para>
|
|
|
|
<para>
|
|
You can create a recipe that builds tools that run natively on the
|
|
host a couple different ways:
|
|
<itemizedlist>
|
|
<listitem><para>Create a <filename>myrecipe-native.bb</filename>
|
|
that inherits the <filename>native</filename> class.
|
|
</para></listitem>
|
|
<listitem><para>Create or modify a target recipe that has adds
|
|
the following:
|
|
<literallayout class='monospaced'>
|
|
<link linkend='var-BBCLASSEXTEND'><filename>BBCLASSEXTEND</filename></link> = "native"
|
|
</literallayout>
|
|
Inside the recipe, use <filename>_class-native</filename> and
|
|
<filename>_class-target</filename> overrides to specify any
|
|
functionality specific to the respective native or target
|
|
case.</para></listitem>
|
|
</itemizedlist>
|
|
</para>
|
|
|
|
<para>
|
|
Although applied differently, the <filename>native</filename> class is
|
|
used with both methods.
|
|
The advantage of the second method is that you do not need to have two
|
|
separate recipes (assuming you need both) for native and target.
|
|
All common parts of the recipe are automatically shared.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-nativesdk'>
|
|
<title><filename>nativesdk.bbclass</filename></title>
|
|
|
|
<para>
|
|
The native SDK (<filename>nativesdk</filename>) class provides common
|
|
functionality for recipes that wish to build tools to run as part of
|
|
an SDK (i.e. tools that run on
|
|
<link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>).
|
|
</para>
|
|
|
|
<para>
|
|
You can create a recipe that builds tools that run on the SDK machine
|
|
a couple different ways:
|
|
<itemizedlist>
|
|
<listitem><para>Create a <filename>myrecipe-native.bb</filename>
|
|
that inherits the <filename>nativesdk</filename> class.
|
|
</para></listitem>
|
|
<listitem><para>Create a <filename>nativesdk</filename> variant
|
|
of any recipe by adding the following:
|
|
<literallayout class='monospaced'>
|
|
<link linkend='var-BBCLASSEXTEND'><filename>BBCLASSEXTEND</filename></link> = "nativesdk"
|
|
</literallayout>
|
|
Inside the recipe, use <filename>_class-nativesdk</filename> and
|
|
<filename>_class-target</filename> overrides to specify any
|
|
functionality specific to the respective SDK machine or target
|
|
case.</para></listitem>
|
|
</itemizedlist>
|
|
</para>
|
|
|
|
<para>
|
|
Although applied differently, the <filename>nativesdk</filename> class
|
|
is used with both methods.
|
|
The advantage of the second method is that you do not need to have two
|
|
separate recipes (assuming you need both) for the SDK machine and the
|
|
target.
|
|
All common parts of the recipe are automatically shared.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-oelint'>
|
|
<title><filename>oelint.bbclass</filename></title>
|
|
|
|
<para>
|
|
The OpenEmbedded link (<filename>oelint</filename>) class is an
|
|
obsolete lint checking tool that exists in
|
|
<filename>meta/classes</filename> in the
|
|
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
|
|
</para>
|
|
|
|
<para>
|
|
A number of classes exist that are could be generally useful in
|
|
OE-Core but are never actually used within OE-Core itself.
|
|
The <filename>oelint</filename> class is one such example.
|
|
However, being aware of this class can reduce the proliferation of
|
|
different versions of similar classes across multiple layers.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-ownmirrors'>
|
|
<title><filename>ownmirrors.bbclass</filename></title>
|
|
|
|
<para>
|
|
The own mirrors (<filename>ownmirrors</filename>) class makes it
|
|
easier to set up your own
|
|
<link linkend='var-PREMIRRORS'><filename>PREMIRRORS</filename></link>
|
|
from which to first fetch source before attempting to fetch it from the
|
|
upstream specified in
|
|
<link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
|
|
within each recipe.
|
|
</para>
|
|
|
|
<para>
|
|
To use this class, inherit it globally and specify
|
|
<link linkend='var-SOURCE_MIRROR_URL'><filename>SOURCE_MIRROR_URL</filename></link>.
|
|
Here is an example:
|
|
<literallayout class='monospaced'>
|
|
INHERIT += "own-mirrors"
|
|
SOURCE_MIRROR_URL = "http://example.com/my-source-mirror"
|
|
</literallayout>
|
|
You can specify only a single URL in
|
|
<filename>SOURCE_MIRROR_URL</filename>.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-pkgconfig'>
|
|
<title>Pkg-config - <filename>pkgconfig.bbclass</filename></title>
|
|
|
|
<para>
|
|
<filename>pkg-config</filename> provides a standard way to get
|
|
header and library information.
|
|
This class aims to smooth integration of
|
|
<filename>pkg-config</filename> into libraries that use it.
|
|
</para>
|
|
|
|
<para>
|
|
During staging, BitBake installs <filename>pkg-config</filename> data into the
|
|
<filename>sysroots/</filename> directory.
|
|
By making use of sysroot functionality within <filename>pkg-config</filename>,
|
|
this class no longer has to manipulate the files.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-packagedata'>
|
|
<title><filename>packagedata.bbclass</filename></title>
|
|
|
|
<para>
|
|
The package data (<filename>packagedata</filename>) class provides
|
|
common functionality for reading <filename>pkgdata</filename> files
|
|
found in
|
|
<link linkend='var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></link>.
|
|
These files contain information about each output package produced by
|
|
the OpenEmbedded build system.
|
|
</para>
|
|
|
|
<para>
|
|
This class is enabled by default because it is inherited by the
|
|
<link linkend='ref-classes-package'><filename>package</filename></link>
|
|
class.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-packageinfo'>
|
|
<title><filename>packageinfo.bbclass</filename></title>
|
|
|
|
<para>
|
|
The package information (<filename>packageinfo</filename>) class
|
|
gives a BitBake user interface the ability to retrieve information
|
|
about output packages from the <filename>pkgdata</filename> files.
|
|
</para>
|
|
|
|
<para>
|
|
This class is enabled automatically when using the
|
|
<ulink url='&YOCTO_HOME_URL;/tools-resources/projects/hob'>Hob</ulink>
|
|
user interface.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-patch'>
|
|
<title><filename>patch.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>patch</filename> class provides all functionality for
|
|
applying patches during the <filename>do_patch</filename> task.
|
|
</para>
|
|
|
|
<para>
|
|
This class is enabled by default because it is inherited by the
|
|
<link linkend='ref-classes-base'><filename>base</filename></link>
|
|
class.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-perlnative'>
|
|
<title><filename>perlnative.bbclass</filename></title>
|
|
|
|
<para>
|
|
When inherited by a recipe, the <filename>perlnative</filename> class
|
|
supports using the native version of Perl built by the build system
|
|
rather than using the version provided by the build host.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-pixbufcache'>
|
|
<title><filename>pixbufcache.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>pixbufcache</filename> class generates the proper
|
|
post-install and post-remove (postinst/postrm) scriptlets for packages
|
|
that install pixbuf loaders, which are used with
|
|
<filename>gdk-pixbuf</filename>.
|
|
These scriptlets call <filename>update_pixbuf_cache</filename>
|
|
to add the input method modules to the cache.
|
|
Since the cache files are architecture-specific,
|
|
<filename>update_pixbuf_cache</filename> is run using QEMU if the
|
|
postinst scriptlets need to be run on the build host during image
|
|
creation.
|
|
</para>
|
|
|
|
<para>
|
|
If the pixbuf loaders modules being installed are in packages other
|
|
than the main package, set
|
|
<link linkend='var-PIXBUF_PACKAGES'><filename>PIXBUF_PACKAGES</filename></link>
|
|
to include the packages containing the modules.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-populate-sdk'>
|
|
<title><filename>populate_sdk.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>populate_sdk</filename> class facilitates compatibility
|
|
with SDK-only recipes.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-populate-sdk-*'>
|
|
<title><filename>populate_sdk_*.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>populate_sdk_*</filename> family of classes support
|
|
SDK creation.
|
|
This family of classes consists of the following:
|
|
<itemizedlist>
|
|
<listitem><para><emphasis><filename>populate_sdk_base</filename>:</emphasis>
|
|
The base class supporting SDK creation under all package
|
|
managers (i.e. DEB, RPM, and IPK).</para></listitem>
|
|
<listitem><para><emphasis><filename>populate_sdk_deb</filename>:</emphasis>
|
|
Supports creation of the SDK given the Debian package manager.
|
|
</para></listitem>
|
|
<listitem><para><emphasis><filename>populate_sdk_rpm</filename>:</emphasis>
|
|
Supports creation of the SDK given the RPM package manager.
|
|
</para></listitem>
|
|
<listitem><para><emphasis><filename>populate_sdk_ipk</filename>:</emphasis>
|
|
Supports creation of the SDK given the IPK package manager.
|
|
</para></listitem>
|
|
</itemizedlist>
|
|
</para>
|
|
|
|
<para>
|
|
The <filename>populate_sdk_base</filename> package inherits the
|
|
appropriate <filename>populate_sdk_*</filename> (i.e.
|
|
<filename>deb</filename>, <filename>rpm</filename>, and
|
|
<filename>ipk</filename>) based on
|
|
<link linkend='var-IMAGE_PKGTYPE'><filename>IMAGE_PKGTYPE</filename></link>.
|
|
</para>
|
|
|
|
<para>
|
|
The base class ensures all source and destination directories are
|
|
established and then populates the SDK.
|
|
After populating the SDK, the <filename>populate_sdk_base</filename>
|
|
class constructs two images:
|
|
<link linkend='var-SDK_ARCH'><filename>SDK_ARCH</filename></link><filename>-nativesdk</filename>,
|
|
which contains the cross-compiler and associated tooling, and the
|
|
target, which contains a target root filesystem that is configured for
|
|
the SDK usage.
|
|
These two images reside in
|
|
<link linkend='var-SDK_OUTPUT'><filename>SDK_OUTPUT</filename></link>,
|
|
which consists of the following:
|
|
<literallayout class='monospaced'>
|
|
${SDK_OUTPUT}/<sdk_arch-nativesdk pkgs>
|
|
${SDK_OUTPUT}/${SDKTARGETSYSROOT}/<target pkgs>
|
|
</literallayout>
|
|
</para>
|
|
|
|
<para>
|
|
Finally, the base populate SDK class creates the toolchain
|
|
environment setup script, the tarball of the SDK, and the installer.
|
|
</para>
|
|
|
|
<para>
|
|
The respective <filename>populate_sdk_deb</filename>,
|
|
<filename>populate_sdk_rpm</filename>, and
|
|
<filename>populate_sdk_ipk</filename> classes each support the
|
|
specific type of SDK.
|
|
These classes are inherited by and used with the
|
|
<filename>populate_sdk_base</filename> class.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-perl'>
|
|
<title>Perl Modules - <filename>cpan.bbclass</filename></title>
|
|
|
|
<para>
|
|
Recipes for Perl modules are simple.
|
|
These recipes usually only need to point to the source's archive and then inherit the
|
|
proper <filename>.bbclass</filename> file.
|
|
Building is split into two methods depending on which method the module authors used.
|
|
<itemizedlist>
|
|
<listitem><para>Modules that use old
|
|
<filename>Makefile.PL</filename>-based build system require
|
|
<filename>cpan.bbclass</filename> in their recipes.
|
|
</para></listitem>
|
|
<listitem><para>Modules that use
|
|
<filename>Build.PL</filename>-based build system require
|
|
using <filename>cpan_build.bbclass</filename> in their recipes.
|
|
</para></listitem>
|
|
</itemizedlist>
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-prexport'>
|
|
<title><filename>prexport.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>prexport</filename> class provides functionality for
|
|
exporting
|
|
<link linkend='var-PR'><filename>PR</filename></link> values.
|
|
<note>
|
|
This class is not intended to be used directly.
|
|
Rather, it is enabled when using
|
|
"<filename>bitbake-prserv-tool export</filename>".
|
|
</note>
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-primport'>
|
|
<title><filename>primport.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>primport</filename> class provides functionality for
|
|
importing
|
|
<link linkend='var-PR'><filename>PR</filename></link> values.
|
|
<note>
|
|
This class is not intended to be used directly.
|
|
Rather, it is enabled when using
|
|
"<filename>bitbake-prserv-tool import</filename>".
|
|
</note>
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-prserv'>
|
|
<title><filename>prserv.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>prserv</filename> class provides functionality for
|
|
using a
|
|
<ulink url='&YOCTO_DOCS_DEV_URL;#working-with-a-pr-service'>PR service</ulink>
|
|
in order to automatically manage the incrementing of the
|
|
<link linkend='var-PR'><filename>PR</filename></link> variable for
|
|
each recipe.
|
|
</para>
|
|
|
|
<para>
|
|
This class is enabled by default because it is inherited by the
|
|
<link linkend='ref-classes-package'><filename>package</filename></link>
|
|
class.
|
|
However, the OpenEmbedded build system will not use this variable
|
|
unless
|
|
<link linkend='var-PRSERV_HOST'><filename>PRSERV_HOST</filename></link>
|
|
has been set.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-ptest'>
|
|
<title><filename>ptest.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>ptest</filename> class provides functionality for
|
|
packaging and installing runtime tests for recipes that build software
|
|
that provides these tests.
|
|
</para>
|
|
|
|
<para>
|
|
This class is intended to be inherited by individual recipes.
|
|
However, the class' functionality is largely disabled unless "ptest"
|
|
appears in
|
|
<link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>.
|
|
See the
|
|
"<ulink url='&YOCTO_DOCS_DEV_URL;#testing-packages-with-ptest'>Testing Packages With ptest</ulink>"
|
|
section in the Yocto Project Development Manual for more information
|
|
on ptest.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-python-dir'>
|
|
<title><filename>python-dir.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>python-dir</filename> class provides the base version,
|
|
location, and site package location for Python.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-pythonnative'>
|
|
<title><filename>pythonnative.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>pythonnative</filename> causes the OpenEmbedded build
|
|
system to use the native version of Python, which is built by the
|
|
build system.
|
|
Normally, the OpenEmbedded build system uses the version of Python
|
|
that is built by the build host.
|
|
<note>
|
|
This class must be inherited by a recipe in order to be used.
|
|
</note>
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-qemu'>
|
|
<title><filename>qemu.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>qemu</filename> class provides functionality for recipes
|
|
that either need QEMU or test for the existence of QEMU.
|
|
Typically, this class is used to run programs for a target system on
|
|
the build host using QEMU's application emulation mode.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-qmake*'>
|
|
<title><filename>qmake*.bbclass</filename></title>
|
|
|
|
<para>
|
|
This family of classes consists of the following:
|
|
<itemizedlist>
|
|
<listitem><para><emphasis><filename>qmake_base</filename>:</emphasis>
|
|
Provides base functionality for all versions of
|
|
<filename>qmake</filename>.</para></listitem>
|
|
<listitem><para><emphasis><filename>qmake2</filename>:</emphasis>
|
|
Extends base functionality for <filename>qmake</filename> 2.x as
|
|
used by Qt 4.x.</para></listitem>
|
|
</itemizedlist>
|
|
</para>
|
|
|
|
<para>
|
|
The <filename>qmake*</filename> family of classes support recipes that
|
|
need to build software that uses Qt's <filename>qmake</filename>
|
|
build system.
|
|
</para>
|
|
|
|
<para>
|
|
If you need to set any configuration variables or pass any options to
|
|
<filename>qmake</filename>, you can add these to the
|
|
<link linkend='var-EXTRA_QMAKEVARS_PRE'><filename>EXTRA_QMAKEVARS_PRE</filename></link>
|
|
or
|
|
<link linkend='var-EXTRA_QMAKEVARS_POST'><filename>EXTRA_QMAKEVARS_POST</filename></link>
|
|
variables, depending on whether the arguments need to be before or
|
|
after the <filename>.pro</filename> file list on the command line,
|
|
respectively.
|
|
</para>
|
|
|
|
<para>
|
|
By default, all <filename>.pro</filename> files are built.
|
|
If you want to specify your own subset of <filename>.pro</filename>
|
|
files to be built, specify them in the
|
|
<link linkend='var-QMAKE_PROFILES'><filename>QMAKE_PROFILES</filename></link>
|
|
variable.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-qt4*'>
|
|
<title><filename>qt4*.bbclass</filename></title>
|
|
|
|
<para>
|
|
This family of classes consists of the following:
|
|
<itemizedlist>
|
|
<listitem><para><emphasis><filename>qt4e</filename>:</emphasis>
|
|
Supports building against Qt/Embedded, which uses the
|
|
framebuffer for graphical output.</para></listitem>
|
|
<listitem><para><emphasis><filename>qt4x11</filename>:</emphasis>
|
|
Supports building against Qt/X11.</para></listitem>
|
|
</itemizedlist>
|
|
</para>
|
|
|
|
<para>
|
|
These classes support recipes that need to build software that uses
|
|
the Qt development framework version 4.x.
|
|
The classes inherit the
|
|
<link linkend='ref-classes-qmake*'><filename>qmake2</filename></link>
|
|
class.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-relocatable'>
|
|
<title><filename>relocatable.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>relocatable</filename> class enables relocation of
|
|
binaries when they are installed into the sysroot.
|
|
</para>
|
|
|
|
<para>
|
|
This class makes use of the
|
|
<link linkend='ref-classes-chrpath'><filename>chrpath</filename></link>
|
|
class and is used by both the
|
|
<link linkend='ref-classes-cross'><filename>cross</filename></link>
|
|
and
|
|
<link linkend='ref-classes-native'><filename>native</filename></link>
|
|
classes.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-scons'>
|
|
<title><filename>scons.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>scons</filename> class supports recipes that need to
|
|
build software that uses the SCons build system.
|
|
You can use the
|
|
<link linkend='var-EXTRA_OESCONS'><filename>EXTRA_OESCONS</filename></link>
|
|
variable to specify additional configuration options you want to pass
|
|
SCons command line.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-sdl'>
|
|
<title><filename>sdl.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>sdl</filename> class supports recipes that need to build
|
|
software that uses the Simple DirectMedia Layer (SDL) library.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-setuptools'>
|
|
<title><filename>setuptools.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>setuptools</filename> class supports extensions that use
|
|
setuptools-based build systems.
|
|
If your recipe uses these build systems, the recipe needs to
|
|
inherit the <filename>setuptools</filename> class.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-distutils'>
|
|
<title>Python Extensions - <filename>distutils.bbclass</filename></title>
|
|
|
|
<para>
|
|
Recipes for Python extensions are simple.
|
|
These recipes usually only need to point to the source's archive and then inherit
|
|
the proper <filename>.bbclass</filename> file.
|
|
Building is split into two methods depending on which method the module authors used.
|
|
<itemizedlist>
|
|
<listitem><para>Extensions that use an Autotools-based build system
|
|
require Autotools and
|
|
<filename>distutils</filename>-based classes in their recipes.
|
|
</para></listitem>
|
|
<listitem><para>Extensions that use
|
|
<filename>distutils</filename>-based build systems require
|
|
the <filename>distutils</filename> class in their recipes.
|
|
</para></listitem>
|
|
<listitem><para>Extensions that use the setuptools-based build
|
|
systems require the
|
|
<link linkend='ref-classes-setuptools'><filename>setuptools</filename></link>
|
|
class in their recipes.
|
|
</para></listitem>
|
|
</itemizedlist>
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-devshell'>
|
|
<title>Developer Shell - <filename>devshell.bbclass</filename></title>
|
|
|
|
<para>
|
|
This class adds the <filename>devshell</filename> task.
|
|
Distribution policy dictates whether to include this class.
|
|
See the
|
|
"<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-appdev-devshell'>Using a Development Shell</ulink>" section
|
|
in the Yocto Project Development Manual for more information about using <filename>devshell</filename>.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-packagegroup'>
|
|
<title>Package Groups - <filename>packagegroup.bbclass</filename></title>
|
|
|
|
<para>
|
|
This class sets default values appropriate for package group recipes (e.g.
|
|
<filename><link linkend='var-PACKAGES'>PACKAGES</link></filename>,
|
|
<filename><link linkend='var-PACKAGE_ARCH'>PACKAGE_ARCH</link></filename>,
|
|
<filename><link linkend='var-ALLOW_EMPTY'>ALLOW_EMPTY</link></filename>,
|
|
and so forth).
|
|
It is highly recommended that all package group recipes inherit this class.
|
|
</para>
|
|
<para>
|
|
For information on how to use this class, see the
|
|
"<ulink url='&YOCTO_DOCS_DEV_URL;#usingpoky-extend-customimage-customtasks'>Customizing Images Using Custom Package Groups</ulink>"
|
|
section in the Yocto Project Development Manual.
|
|
</para>
|
|
<para>
|
|
Previously, this class was named <filename>task.bbclass</filename>.
|
|
</para>
|
|
</section>
|
|
|
|
|
|
<section id='ref-classes-package'>
|
|
<title><filename>package.bbclass</filename></title>
|
|
|
|
<para>
|
|
The packaging class (<filename>package</filename>) supports generating
|
|
packages from a build's output.
|
|
The core generic functionality is in the
|
|
<filename>package.bbclass</filename>.
|
|
The code specific to particular package types resides in these
|
|
package-specific classes:
|
|
<link linkend='ref-classes-package_deb'><filename>package_deb</filename></link>,
|
|
<link linkend='ref-classes-package_rpm'><filename>package_rpm</filename></link>,
|
|
<link linkend='ref-classes-package_ipk'><filename>package_ipk</filename></link>,
|
|
and
|
|
<link linkend='ref-classes-package_tar'><filename>package_tar</filename></link>.
|
|
</para>
|
|
|
|
<para>
|
|
You can control the list of resulting package formats by using the
|
|
<filename><link linkend='var-PACKAGE_CLASSES'>PACKAGE_CLASSES</link></filename>
|
|
variable defined in your <filename>conf/local.conf</filename>
|
|
configuration file, which is located in the
|
|
<ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
|
|
When defining the variable, you can specify one or more package types.
|
|
Since images are generated from packages, a packaging class is
|
|
needed to enable image generation.
|
|
The first class listed in this variable is used for image generation.
|
|
</para>
|
|
|
|
<para>
|
|
If you take the optional step to set up a repository (package feed)
|
|
on the development host that can be used by Smart, you can
|
|
install packages from the feed while you are running the image
|
|
on the target (i.e. runtime installation of packages).
|
|
For more information, see the
|
|
"<ulink url='&YOCTO_DOCS_DEV_URL;#using-runtime-package-management'>Using Runtime Package Management</ulink>"
|
|
section in the Yocto Project Development Manual.
|
|
</para>
|
|
|
|
<para>
|
|
The package-specific class you choose can affect build-time performance
|
|
and has space ramifications.
|
|
In general, building a package with IPK takes about thirty percent less
|
|
time as compared to using RPM to build the same or similar package.
|
|
This comparison takes into account a complete build of the package with
|
|
all dependencies previously built.
|
|
The reason for this discrepancy is because the RPM package manager
|
|
creates and processes more
|
|
<ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink> than the
|
|
IPK package manager.
|
|
Consequently, you might consider setting
|
|
<filename>PACKAGE_CLASSES</filename> to "package_ipk" if you are
|
|
building smaller systems.
|
|
</para>
|
|
|
|
<para>
|
|
Before making your package manager decision, however, you should
|
|
consider some further things about using RPM:
|
|
<itemizedlist>
|
|
<listitem><para>
|
|
RPM starts to provide more abilities than IPK due to
|
|
the fact that it processes more Metadata.
|
|
For example, this information includes individual file types,
|
|
file checksum generation and evaluation on install, sparse file
|
|
support, conflict detection and resolution for Multilib systems,
|
|
ACID style upgrade, and repackaging abilities for rollbacks.
|
|
</para></listitem>
|
|
<listitem><para>
|
|
For smaller systems, the extra space used for the Berkley
|
|
Database and the amount of metadata when using RPM can affect
|
|
your ability to perform on-device upgrades.
|
|
</para></listitem>
|
|
</itemizedlist>
|
|
</para>
|
|
|
|
<para>
|
|
You can find additional information on the effects of the package
|
|
class at these two Yocto Project mailing list links:
|
|
<itemizedlist>
|
|
<listitem><para><ulink url='&YOCTO_LISTS_URL;/pipermail/poky/2011-May/006362.html'>
|
|
https://lists.yoctoproject.org/pipermail/poky/2011-May/006362.html</ulink></para></listitem>
|
|
<listitem><para><ulink url='&YOCTO_LISTS_URL;/pipermail/poky/2011-May/006363.html'>
|
|
https://lists.yoctoproject.org/pipermail/poky/2011-May/006363.html</ulink></para></listitem>
|
|
</itemizedlist>
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-package_deb'>
|
|
<title><filename>package_deb.bbclass</filename></title>
|
|
|
|
<para>
|
|
The Debian package manager (<filename>package_deb</filename>) class
|
|
provides support for creating packages that use the
|
|
<filename>.deb</filename> file format.
|
|
The class ensures the packages are written out to the
|
|
<filename>${</filename><link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link><filename>}/deb</filename>
|
|
directory in a <filename>.deb</filename> file format.
|
|
<note>
|
|
This package inherits the
|
|
<link linkend='ref-classes-package'><filename>package</filename></link>
|
|
class.
|
|
</note>
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-package_rpm'>
|
|
<title><filename>package_rpm.bbclass</filename></title>
|
|
|
|
<para>
|
|
The RPM package manager (<filename>package_deb</filename>) class
|
|
provides support for creating packages that use the
|
|
<filename>.rpm</filename> file format.
|
|
The class ensures the packages are written out to the
|
|
<filename>${</filename><link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link><filename>}/rpm</filename>
|
|
directory in a <filename>.rpm</filename> file format.
|
|
<note>
|
|
This package inherits the
|
|
<link linkend='ref-classes-package'><filename>package</filename></link>
|
|
class.
|
|
</note>
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-package_ipk'>
|
|
<title><filename>package_ipk.bbclass</filename></title>
|
|
|
|
<para>
|
|
The Itsy package manager (<filename>package_ipk</filename>) class
|
|
provides support for creating packages that use the
|
|
<filename>.ipk</filename> file format.
|
|
The class ensures the packages are written out to the
|
|
<filename>${</filename><link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link><filename>}/ipk</filename>
|
|
directory in a <filename>.ipk</filename> file format.
|
|
<note>
|
|
This package inherits the
|
|
<link linkend='ref-classes-package'><filename>package</filename></link>
|
|
class.
|
|
</note>
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-sip'>
|
|
<title><filename>sip.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>sip</filename> class
|
|
supports recipes that build or package SIP-based Python bindings.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-siteconfig'>
|
|
<title><filename>siteconfig.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>siteconfig</filename> class
|
|
provides functionality for handling site configuration.
|
|
The class is used by the
|
|
<link linkend='ref-classes-autotools'><filename>autotools</filename></link>
|
|
class to accelerate the <filename>do_configure</filename> task.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-spdx'>
|
|
<title><filename>spdx.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>spdx</filename> class integrates real-time license
|
|
scanning, generation of SPDX standard output, and verification
|
|
of license information during the build.
|
|
<note>
|
|
This class is currently at the prototype stage in the 1.5
|
|
release.
|
|
</note>
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-sstate'>
|
|
<title><filename>sstate.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>sstate</filename> class provides support for Shared
|
|
State (sstate).
|
|
By default, the class is enabled through the
|
|
<link linkend='var-INHERIT_DISTRO'><filename>INHERIT_DISTRO</filename></link>
|
|
variable's default value.
|
|
</para>
|
|
|
|
<para>
|
|
For more information on sstate, see the
|
|
"<link linkend='shared-state-cache'>Shared State Cache</link>"
|
|
section.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-staging'>
|
|
<title><filename>staging.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>staging</filename> class provides support for staging
|
|
files into the sysroot during the
|
|
<filename>do_populate_sysroot</filename> task.
|
|
The class is enabled by default because it is inherited by the
|
|
<link linkend='ref-classes-base'><filename>base</filename></link>
|
|
class.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-syslinux'>
|
|
<title><filename>syslinux.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>syslinux</filename> class provides syslinux-specific
|
|
functions for building bootable images.
|
|
</para>
|
|
|
|
<para>
|
|
The class supports the following variables:
|
|
<itemizedlist>
|
|
<listitem><para><emphasis><link linkend='var-INITRD'><filename>INITRD</filename></link>:</emphasis>
|
|
Indicates a filesystem image to use as an initial RAM disk
|
|
(initrd).
|
|
This variable is optional.</para></listitem>
|
|
<listitem><para><emphasis><link linkend='var-ROOTFS'><filename>ROOTFS</filename></link>:</emphasis>
|
|
Indicates a filesystem image to include as the root filesystem.
|
|
This variable is optional.</para></listitem>
|
|
<listitem><para><emphasis><link linkend='var-AUTO_SYSLINUXMENU'><filename>AUTO_SYSLINUXMENU</filename></link>:</emphasis>
|
|
Enables creating an automatic menu when set to "1".
|
|
</para></listitem>
|
|
<listitem><para><emphasis><link linkend='var-LABELS'><filename>LABELS</filename></link>:</emphasis>
|
|
Lists targets for automatic configuration.
|
|
</para></listitem>
|
|
<listitem><para><emphasis><link linkend='var-APPEND'><filename>APPEND</filename></link>:</emphasis>
|
|
Lists append string overrides for each label.
|
|
</para></listitem>
|
|
<listitem><para><emphasis><link linkend='var-SYSLINUX_OPTS'><filename>SYSLINUX_OPTS</filename></link>:</emphasis>
|
|
Lists additional options to add to the syslinux file.
|
|
Semicolon characters separate multiple options.
|
|
</para></listitem>
|
|
<listitem><para><emphasis><link linkend='var-SYSLINUX_SPLASH'><filename>SYSLINUX_SPLASH</filename></link>:</emphasis>
|
|
Lists a background for the VGA boot menu when you are using the
|
|
boot menu.</para></listitem>
|
|
<listitem><para><emphasis><link linkend='var-SYSLINUX_DEFAULT_CONSOLE'><filename>SYSLINUX_DEFAULT_CONSOLE</filename></link>:</emphasis>
|
|
Set to "console=ttyX" to change kernel boot default console.
|
|
</para></listitem>
|
|
<listitem><para><emphasis><link linkend='var-SYSLINUX_SERIAL'><filename>SYSLINUX_SERIAL</filename></link>:</emphasis>
|
|
Sets an alternate serial port.
|
|
Or, turns off serial when the variable is set with an
|
|
empty string.</para></listitem>
|
|
<listitem><para><emphasis><link linkend='var-SYSLINUX_SERIAL_TTY'><filename>SYSLINUX_SERIAL_TTY</filename></link>:</emphasis>
|
|
Sets an alternate "console=tty..." kernel boot argument.
|
|
</para></listitem>
|
|
</itemizedlist>
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-systemd'>
|
|
<title><filename>systemd.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>systemd</filename> class provides support for recipes
|
|
that install <filename>systemd</filename> unit files.
|
|
</para>
|
|
|
|
<para>
|
|
The functionality for this class is disabled unless you have "systemd"
|
|
in
|
|
<link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>.
|
|
</para>
|
|
|
|
<para>
|
|
Under this class, unit files are installed into
|
|
<filename>${</filename><link linkend='var-D'><filename>D</filename></link><filename>}${systemd_unitdir}/system</filename>
|
|
during the <filename>do_install</filename> task.
|
|
If the unit files being installed go into packages other than the
|
|
main package, you need to set
|
|
<link linkend='var-SYSTEMD_PACKAGES'><filename>SYSTEMD_PACKAGES</filename></link>
|
|
in your recipe to identify the packages in which the files will be
|
|
installed.
|
|
</para>
|
|
|
|
<para>
|
|
You should set
|
|
<link linkend='var-SYSTEMD_SERVICE'><filename>SYSTEMD_SERVICE</filename></link>
|
|
to the name of the service file.
|
|
You should also use a package name override to indicate the package
|
|
to which the value applies.
|
|
If the value applies to the recipe's main package, use
|
|
<filename>${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}</filename>.
|
|
Here is an example from the connman recipe:
|
|
<literallayout class='monospaced'>
|
|
SYSTEMD_SERVICE_${PN} = "connman.service"
|
|
</literallayout>
|
|
Services are set up to start on boot automatically unless
|
|
you have set
|
|
<link linkend='var-SYSTEMD_AUTO_ENABLE'><filename>SYSTEMD_AUTO_ENABLE</filename></link>
|
|
to "disable".
|
|
</para>
|
|
|
|
<para>
|
|
For more information on <filename>systemd</filename>, see the
|
|
"<ulink url='&YOCTO_DOCS_DEV_URL;#selecting-an-initialization-manager'>Selecting an Initialization Manager</ulink>"
|
|
section in the Yocto Project Development Manual.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-package_tar'>
|
|
<title><filename>package_tar.bbclass</filename></title>
|
|
|
|
<para>
|
|
The consolidated Unix archive file (<filename>package_tar</filename>)
|
|
class provides support for creating packages that use the
|
|
<filename>.tar</filename> file format.
|
|
The class ensures the packages are written out to the
|
|
<filename>${</filename><link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link><filename>}/tar</filename>
|
|
directory in a <filename>.tar</filename> file format.
|
|
<note>
|
|
This package inherits the
|
|
<link linkend='ref-classes-package'><filename>package</filename></link>
|
|
class.
|
|
</note>
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-kernel'>
|
|
<title>Building Kernels - <filename>kernel.bbclass</filename></title>
|
|
|
|
<para>
|
|
This class handles building Linux kernels.
|
|
The class contains code to build all kernel trees.
|
|
All needed headers are staged into the
|
|
<filename><link linkend='var-STAGING_KERNEL_DIR'>STAGING_KERNEL_DIR</link></filename>
|
|
directory to allow out-of-tree module builds using <filename>module.bbclass</filename>.
|
|
</para>
|
|
|
|
<para>
|
|
This means that each built kernel module is packaged separately and inter-module
|
|
dependencies are created by parsing the <filename>modinfo</filename> output.
|
|
If all modules are required, then installing the <filename>kernel-modules</filename>
|
|
package installs all packages with modules and various other kernel packages
|
|
such as <filename>kernel-vmlinux</filename>.
|
|
</para>
|
|
|
|
<para>
|
|
Various other classes are used by the kernel and module classes internally including
|
|
<filename>kernel-arch.bbclass</filename>, <filename>module_strip.bbclass</filename>,
|
|
<filename>module-base.bbclass</filename>, and <filename>linux-kernel-base.bbclass</filename>.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-image'>
|
|
<title>Creating Images - <filename>image.bbclass</filename> and <filename>rootfs*.bbclass</filename></title>
|
|
|
|
<para>
|
|
These classes add support for creating images in several formats.
|
|
First, the root filesystem is created from packages using
|
|
one of the <filename>rootfs_*.bbclass</filename>
|
|
files (depending on the package format used) and then the image is created.
|
|
<itemizedlist>
|
|
<listitem><para>The
|
|
<filename><link linkend='var-IMAGE_FSTYPES'>IMAGE_FSTYPES</link></filename>
|
|
variable controls the types of images to generate.
|
|
</para></listitem>
|
|
<listitem><para>The
|
|
<filename><link linkend='var-IMAGE_INSTALL'>IMAGE_INSTALL</link></filename>
|
|
variable controls the list of packages to install into the
|
|
image.</para></listitem>
|
|
</itemizedlist>
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-sanity'>
|
|
<title>Host System Sanity Checks - <filename>sanity.bbclass</filename></title>
|
|
|
|
<para>
|
|
This class checks to see if prerequisite software is present on the host system
|
|
so that users can be notified of potential problems that might affect their build.
|
|
The class also performs basic user configuration checks from
|
|
the <filename>local.conf</filename> configuration file to
|
|
prevent common mistakes that cause build failures.
|
|
Distribution policy usually determines whether to include this class.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-insane'>
|
|
<title><filename>insane.bbclass</filename></title>
|
|
|
|
<para>
|
|
This class adds a step to the package generation process so that
|
|
output quality assurance checks are generated by the OpenEmbedded
|
|
build system.
|
|
A range of checks are performed that check the build's output
|
|
for common problems that show up during runtime.
|
|
Distribution policy usually dictates whether to include this class.
|
|
</para>
|
|
|
|
<para>
|
|
You can configure the sanity checks so that specific test failures
|
|
either raise a warning or an error message.
|
|
Typically, failures for new tests generate a warning.
|
|
Subsequent failures for the same test would then generate an error
|
|
message once the metadata is in a known and good condition.
|
|
</para>
|
|
|
|
<para>
|
|
Use the
|
|
<link linkend='var-WARN_QA'><filename>WARN_QA</filename></link> and
|
|
<link linkend='var-ERROR_QA'><filename>ERROR_QA</filename></link>
|
|
variables to control the behavior of
|
|
these checks at the global level (i.e. in your custom distro
|
|
configuration).
|
|
However, to skip one or more checks in recipes, you should use
|
|
<link linkend='var-INSANE_SKIP'><filename>INSANE_SKIP</filename></link>.
|
|
For example, to skip the check for symbolic link
|
|
<filename>.so</filename> files in the main package of a recipe,
|
|
add the following to the recipe.
|
|
You need to realize that the package name override, in this example
|
|
<filename>${PN}</filename>, must be used:
|
|
<literallayout class='monospaced'>
|
|
INSANE_SKIP_${PN} += "dev-so"
|
|
</literallayout>
|
|
Please keep in mind that the QA checks exist in order to detect real
|
|
or potential problems in the packaged output.
|
|
So exercise caution when disabling these checks.
|
|
</para>
|
|
|
|
<para>
|
|
The following list shows the tests you can list with the
|
|
<filename>WARN_QA</filename> and <filename>ERROR_QA</filename>
|
|
variables:
|
|
<itemizedlist>
|
|
<listitem><para><emphasis><filename>ldflags:</filename></emphasis>
|
|
Ensures that the binaries were linked with the
|
|
<filename>LDFLAGS</filename> options provided by the build system.
|
|
If this test fails, check that the <filename>LDFLAGS</filename> variable
|
|
is being passed to the linker command.</para></listitem>
|
|
<listitem><para><emphasis><filename>useless-rpaths:</filename></emphasis>
|
|
Checks for dynamic library load paths (rpaths) in the binaries that
|
|
by default on a standard system are searched by the linker (e.g.
|
|
<filename>/lib</filename> and <filename>/usr/lib</filename>).
|
|
While these paths will not cause any breakage, they do waste space and
|
|
are unnecessary.</para></listitem>
|
|
<listitem><para><emphasis><filename>rpaths:</filename></emphasis>
|
|
Checks for rpaths in the binaries that contain build system paths such
|
|
as <filename>TMPDIR</filename>.
|
|
If this test fails, bad <filename>-rpath</filename> options are being
|
|
passed to the linker commands and your binaries have potential security
|
|
issues.</para></listitem>
|
|
<listitem><para><emphasis><filename>dev-so:</filename></emphasis>
|
|
Checks that the <filename>.so</filename> symbolic links are in the
|
|
<filename>-dev</filename> package and not in any of the other packages.
|
|
In general, these symlinks are only useful for development purposes.
|
|
Thus, the <filename>-dev</filename> package is the correct location for
|
|
them.
|
|
Some very rare cases do exist for dynamically loaded modules where
|
|
these symlinks are needed instead in the main package.
|
|
</para></listitem>
|
|
<listitem><para><emphasis><filename>debug-files:</filename></emphasis>
|
|
Checks for <filename>.debug</filename> directories in anything but the
|
|
<filename>-dbg</filename> package.
|
|
The debug files should all be in the <filename>-dbg</filename> package.
|
|
Thus, anything packaged elsewhere is incorrect packaging.</para></listitem>
|
|
<listitem><para><emphasis><filename>arch:</filename></emphasis>
|
|
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 don't match the type since there would be an
|
|
incompatibility.
|
|
Sometimes software, like bootloaders, might need to bypass this check.
|
|
</para></listitem>
|
|
<listitem><para><emphasis><filename>debug-deps:</filename></emphasis>
|
|
Checks that <filename>-dbg</filename> packages only depend on other
|
|
<filename>-dbg</filename> packages and not on any other types of packages,
|
|
which would cause a packaging bug.</para></listitem>
|
|
<listitem><para><emphasis><filename>dev-deps:</filename></emphasis>
|
|
Checks that <filename>-dev</filename> packages only depend on other
|
|
<filename>-dev</filename> packages and not on any other types of packages,
|
|
which would be a packaging bug.</para></listitem>
|
|
<listitem><para><emphasis><filename>pkgconfig:</filename></emphasis>
|
|
Checks <filename>.pc</filename> files for any
|
|
<link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>/<link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>
|
|
paths.
|
|
Any <filename>.pc</filename> file containing these paths is incorrect
|
|
since <filename>pkg-config</filename> itself adds the correct sysroot prefix
|
|
when the files are accessed.</para></listitem>
|
|
<listitem><para><emphasis><filename>textrel:</filename></emphasis>
|
|
Checks for ELF binaries that contain relocations in their
|
|
<filename>.text</filename> sections, which can result in a
|
|
performance impact at runtime.</para></listitem>
|
|
<listitem><para><emphasis><filename>pkgvarcheck:</filename></emphasis>
|
|
Checks through the variables
|
|
<link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>,
|
|
<link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>,
|
|
<link linkend='var-RSUGGESTS'><filename>RSUGGESTS</filename></link>,
|
|
<link linkend='var-RCONFLICTS'><filename>RCONFLICTS</filename></link>,
|
|
<link linkend='var-RPROVIDES'><filename>RPROVIDES</filename></link>,
|
|
<link linkend='var-RREPLACES'><filename>RREPLACES</filename></link>,
|
|
<link linkend='var-FILES'><filename>FILES</filename></link>,
|
|
<link linkend='var-ALLOW_EMPTY'><filename>ALLOW_EMPTY</filename></link>,
|
|
<filename>pkg_preinst</filename>,
|
|
<filename>pkg_postinst</filename>,
|
|
<filename>pkg_prerm</filename>
|
|
and <filename>pkg_postrm</filename>, and reports if there are
|
|
variable sets that are not package-specific.
|
|
Using these variables without a package suffix is bad practice,
|
|
and might unnecessarily complicate dependencies of other packages
|
|
within the same recipe or have other unintended consequences.
|
|
</para></listitem>
|
|
<listitem><para><emphasis><filename>xorg-driver-abi:</filename></emphasis>
|
|
Checks that all packages containing Xorg drivers have ABI
|
|
dependencies.
|
|
The <filename>xserver-xorg</filename> recipe provides driver
|
|
ABI names.
|
|
All drivers should depend on the ABI versions that they have
|
|
been built against.
|
|
Driver recipes that include
|
|
<filename>xorg-driver-input.inc</filename>
|
|
or <filename>xorg-driver-video.inc</filename> will
|
|
automatically get these versions.
|
|
Consequently, you should only need to explicitly add
|
|
dependencies to binary driver recipes.
|
|
</para></listitem>
|
|
<listitem><para><emphasis><filename>libexec:</filename></emphasis>
|
|
Checks if a package contains files in
|
|
<filename>/usr/libexec</filename>.
|
|
This check is not performed if the
|
|
<filename>libexecdir</filename> variable has been set
|
|
explicitly to <filename>/usr/libexec</filename>.
|
|
</para></listitem>
|
|
<listitem><para><emphasis><filename>staticdev:</filename></emphasis>
|
|
Checks for static library files (<filename>*.a</filename>) in
|
|
non-<filename>staticdev</filename> packages.
|
|
</para></listitem>
|
|
<listitem><para><emphasis><filename>la:</filename></emphasis>
|
|
Checks <filename>.la</filename> files for any <filename>TMPDIR</filename>
|
|
paths.
|
|
Any <filename>.la</filename> file containing these paths is incorrect since
|
|
<filename>libtool</filename> adds the correct sysroot prefix when using the
|
|
files automatically itself.</para></listitem>
|
|
<listitem><para><emphasis><filename>desktop:</filename></emphasis>
|
|
Runs the <filename>desktop-file-validate</filename> program
|
|
against any <filename>.desktop</filename> files to validate
|
|
their contents against the specification for
|
|
<filename>.desktop</filename> files.</para></listitem>
|
|
<listitem><para><emphasis><filename>already-stripped:</filename></emphasis>
|
|
Checks that produced binaries have not 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
|
|
<filename>-dbg</filename> packages, this stripping must be
|
|
disabled.
|
|
</para></listitem>
|
|
<listitem><para><emphasis><filename>split-strip:</filename></emphasis>
|
|
Reports that splitting or stripping debug symbols from binaries
|
|
has failed.
|
|
</para></listitem>
|
|
<listitem><para><emphasis><filename>arch:</filename></emphasis>
|
|
Checks to ensure the architecture, bit size, and endianness
|
|
of all output binaries matches that of the target.
|
|
This test can detect when the wrong compiler or compiler options
|
|
have been used.
|
|
</para></listitem>
|
|
<listitem><para><emphasis><filename>installed-vs-shipped:</filename></emphasis>
|
|
Reports when files have been installed within
|
|
<filename>do_install</filename> but have not been included in
|
|
any package by way of the
|
|
<link linkend='var-FILES'><filename>FILES</filename></link>
|
|
variable.
|
|
Files that do not appear in any package cannot be present in
|
|
an image later on in the build process.
|
|
Ideally, all installed files should be packaged or not
|
|
installed at all.
|
|
These files can be deleted at the end of
|
|
<filename>do_install</filename> if the files are not
|
|
needed in any package.
|
|
</para></listitem>
|
|
<listitem><para><emphasis><filename>dep-cmp:</filename></emphasis>
|
|
Checks for invalid version comparison statements in runtime
|
|
dependency relationships between packages (i.e. in
|
|
<link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>,
|
|
<link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>,
|
|
<link linkend='var-RSUGGESTS'><filename>RSUGGESTS</filename></link>,
|
|
<link linkend='var-RPROVIDES'><filename>RPROVIDES</filename></link>,
|
|
<link linkend='var-RREPLACES'><filename>RREPLACES</filename></link>,
|
|
and
|
|
<link linkend='var-RCONFLICTS'><filename>RCONFLICTS</filename></link>
|
|
variable values).
|
|
Any invalid comparisons might trigger failures or undesirable
|
|
behavior when passed to the package manager.
|
|
</para></listitem>
|
|
<listitem><para><emphasis><filename>files-invalid:</filename></emphasis>
|
|
Checks for
|
|
<link linkend='var-FILES'><filename>FILES</filename></link>
|
|
variable values that contain "//", which is invalid.
|
|
</para></listitem>
|
|
<listitem><para><emphasis><filename>incompatible-license:</filename></emphasis>
|
|
Report when packages are excluded from being created due to
|
|
being marked with a license that is in
|
|
<link linkend='var-INCOMPATIBLE_LICENSE'><filename>INCOMPATIBLE_LICENSE</filename></link>.
|
|
</para></listitem>
|
|
<listitem><para><emphasis><filename>compile-host-path:</filename></emphasis>
|
|
Checks the <filename>do_compile</filename> log for indications
|
|
that paths to locations on the build host were used.
|
|
Using such paths might result in host contamination of the
|
|
build output.
|
|
</para></listitem>
|
|
<listitem><para><emphasis><filename>install-host-path:</filename></emphasis>
|
|
Checks the <filename>do_install</filename> log for indications
|
|
that paths to locations on the build host were used.
|
|
Using such paths might result in host contamination of the
|
|
build output.
|
|
</para></listitem>
|
|
<listitem><para><emphasis><filename>libdir:</filename></emphasis>
|
|
Checks for libraries being installed into incorrect
|
|
(possibly hardcoded) installation paths.
|
|
For example, this test will catch recipes that install
|
|
<filename>/lib/bar.so</filename> when
|
|
<filename>${base_libdir}</filename> is "lib32".
|
|
Another example is when recipes install
|
|
<filename>/usr/lib64/foo.so</filename> when
|
|
<filename>${libdir}</filename> is "/usr/lib".
|
|
</para></listitem>
|
|
<listitem><para><emphasis><filename>packages-list:</filename></emphasis>
|
|
Checks for the same package being listed multiple times through
|
|
the <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>
|
|
variable value.
|
|
Installing the package in this manner can cause errors during
|
|
packaging.
|
|
</para></listitem>
|
|
<listitem><para><emphasis><filename>perm-config:</filename></emphasis>
|
|
Reports lines in <filename>fs-perms.txt</filename> that have
|
|
an invalid format.
|
|
</para></listitem>
|
|
<listitem><para><emphasis><filename>perm-line:</filename></emphasis>
|
|
Reports lines in <filename>fs-perms.txt</filename> that have
|
|
an invalid format.
|
|
</para></listitem>
|
|
<listitem><para><emphasis><filename>perm-link:</filename></emphasis>
|
|
Reports lines in <filename>fs-perms.txt</filename> that
|
|
specify 'link' where the specified target already exists.
|
|
</para></listitem>
|
|
<listitem><para><emphasis><filename>pkgname:</filename></emphasis>
|
|
Checks that all packages in
|
|
<link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>
|
|
have names that do not contain invalid characters (i.e.
|
|
characters other than 0-9, a-z, ., +, and -).
|
|
</para></listitem>
|
|
<listitem><para><emphasis><filename>pn-overrides:</filename></emphasis>
|
|
Checks that a recipe does not have a name
|
|
(<link linkend='var-PN'><filename>PN</filename></link>) value
|
|
that appears in
|
|
<link linkend='var-OVERRIDES'><filename>OVERRIDES</filename></link>.
|
|
If a recipe is named such that its <filename>PN</filename>
|
|
value matches something already in
|
|
<filename>OVERRIDES</filename> (e.g. <filename>PN</filename>
|
|
happens to be the same as
|
|
<link linkend='var-MACHINE'><filename>MACHINE</filename></link>
|
|
or
|
|
<link linkend='var-DISTRO'><filename>DISTRO</filename></link>),
|
|
it can have unexpected consequences.
|
|
For example, assignments such as
|
|
<filename>FILES_${PN} = "xyz"</filename> effectively turn into
|
|
<filename>FILES = "xyz"</filename>.
|
|
</para></listitem>
|
|
<listitem><para><emphasis><filename>unsafe-references-in-binaries:</filename></emphasis>
|
|
Reports when a binary installed in
|
|
<filename>${base_libdir}</filename>,
|
|
<filename>${base_bindir}</filename>, or
|
|
<filename>${base_sbindir}</filename>, depends on another
|
|
binary installed under <filename>${exec_prefix}</filename>.
|
|
This dependency is a concern if you want the system to remain
|
|
basically operable if <filename>/usr</filename> is mounted
|
|
separately and is not mounted.
|
|
<note>
|
|
Defaults for binaries installed in
|
|
<filename>${base_libdir}</filename>,
|
|
<filename>${base_bindir}</filename>, and
|
|
<filename>${base_sbindir}</filename> are
|
|
<filename>/lib</filename>, <filename>/bin</filename>, and
|
|
<filename>/sbin</filename>, respectively.
|
|
The default for a binary installed
|
|
under <filename>${exec_prefix}</filename> is
|
|
<filename>/usr</filename>.
|
|
</note>
|
|
</para></listitem>
|
|
<listitem><para><emphasis><filename>unsafe-references-in-scripts:</filename></emphasis>
|
|
Reports when a script file installed in
|
|
<filename>${base_libdir}</filename>,
|
|
<filename>${base_bindir}</filename>, or
|
|
<filename>${base_sbindir}</filename>, depends on files
|
|
installed under <filename>${exec_prefix}</filename>.
|
|
This dependency is a concern if you want the system to remain
|
|
basically operable if <filename>/usr</filename> is mounted
|
|
separately and is not mounted.
|
|
<note>
|
|
Defaults for binaries installed in
|
|
<filename>${base_libdir}</filename>,
|
|
<filename>${base_bindir}</filename>, and
|
|
<filename>${base_sbindir}</filename> are
|
|
<filename>/lib</filename>, <filename>/bin</filename>, and
|
|
<filename>/sbin</filename>, respectively.
|
|
The default for a binary installed
|
|
under <filename>${exec_prefix}</filename> is
|
|
<filename>/usr</filename>.
|
|
</note>
|
|
</para></listitem>
|
|
<listitem><para><emphasis><filename>var-undefined:</filename></emphasis>
|
|
Reports when variables fundamental to packaging (i.e.
|
|
<link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>,
|
|
<link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link>,
|
|
<link linkend='var-D'><filename>D</filename></link>,
|
|
<link linkend='var-PN'><filename>PN</filename></link>, and
|
|
<link linkend='var-PKGD'><filename>PKGD</filename></link>) are
|
|
undefined during <filename>do_package</filename>.
|
|
</para></listitem>
|
|
<listitem><para><emphasis><filename>pkgv-undefined:</filename></emphasis>
|
|
Checks to see if the <filename>PKGV</filename> variable
|
|
is undefined during <filename>do_package</filename>.
|
|
</para></listitem>
|
|
<listitem><para><emphasis><filename>buildpaths:</filename></emphasis>
|
|
Checks for paths to locations on the build host inside the
|
|
output files.
|
|
Currently, this test triggers too many false positives and
|
|
thus is not normally enabled.
|
|
</para></listitem>
|
|
<listitem><para><emphasis><filename>perms:</filename></emphasis>
|
|
Currently, this check is unused but reserved.
|
|
</para></listitem>
|
|
<listitem><para><emphasis><filename>version-going-backwards:</filename></emphasis>
|
|
If Build History is enabled, reports when a package
|
|
being written out has a lower version than the previously
|
|
written package under the same name.
|
|
If you are placing output packages into a feed and
|
|
upgrading packages on a target system using that feed, the
|
|
version of a package going backwards can result in the target
|
|
system not correctly upgrading to the "new" version of the
|
|
package.
|
|
<note>
|
|
If you are not using runtime package management on your
|
|
target system, then you do not need to worry about
|
|
this situation.
|
|
</note>
|
|
</para></listitem>
|
|
</itemizedlist>
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-rm-work'>
|
|
<title>Removing Work Files During the Build - <filename>rm_work.bbclass</filename></title>
|
|
|
|
<para>
|
|
The OpenEmbedded build system can use a substantial amount of disk
|
|
space during the build process.
|
|
A portion of this space is the work files under the
|
|
<filename>${TMPDIR}/work</filename> directory for each recipe.
|
|
Once the build system generates the packages for a recipe, the work
|
|
files for that recipe are no longer needed.
|
|
However, by default, the build system preserves these files
|
|
for inspection and possible debugging purposes.
|
|
If you would rather have these files deleted to save disk space
|
|
as the build progresses, you can enable <filename>rm_work</filename>
|
|
by adding the following to your <filename>local.conf</filename> file,
|
|
which is found in the
|
|
<ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
|
|
<literallayout class='monospaced'>
|
|
INHERIT += "rm_work"
|
|
</literallayout>
|
|
If you are modifying and building source code out of the work directory
|
|
for a recipe, enabling <filename>rm_work</filename> will potentially
|
|
result in your changes to the source being lost.
|
|
To exclude some recipes from having their work directories deleted by
|
|
<filename>rm_work</filename>, you can add the names of the recipe or
|
|
recipes you are working on to the <filename>RM_WORK_EXCLUDE</filename>
|
|
variable, which can also be set in your <filename>local.conf</filename>
|
|
file.
|
|
Here is an example:
|
|
<literallayout class='monospaced'>
|
|
RM_WORK_EXCLUDE += "busybox eglibc"
|
|
</literallayout>
|
|
</para>
|
|
</section>
|
|
|
|
|
|
<section id='ref-classes-siteinfo'>
|
|
<title>Autotools Configuration Data Cache - <filename>siteinfo.bbclass</filename></title>
|
|
|
|
<para>
|
|
Autotools can require tests that must execute on the target hardware.
|
|
Since this is not possible in general when cross compiling, site information is
|
|
used to provide cached test results so these tests can be skipped over but
|
|
still make the correct values available.
|
|
The <filename><link linkend='structure-meta-site'>meta/site directory</link></filename>
|
|
contains test results sorted into different categories such as architecture, endianness, and
|
|
the <filename>libc</filename> used.
|
|
Site information provides a list of files containing data relevant to
|
|
the current build in the
|
|
<filename><link linkend='var-CONFIG_SITE'>CONFIG_SITE</link></filename> variable
|
|
that Autotools automatically picks up.
|
|
</para>
|
|
|
|
<para>
|
|
The class also provides variables like
|
|
<filename><link linkend='var-SITEINFO_ENDIANNESS'>SITEINFO_ENDIANNESS</link></filename>
|
|
and <filename><link linkend='var-SITEINFO_BITS'>SITEINFO_BITS</link></filename>
|
|
that can be used elsewhere in the metadata.
|
|
</para>
|
|
|
|
<para>
|
|
Because this class is included from <filename>base.bbclass</filename>, it is always active.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-terminal'>
|
|
<title><filename>terminal.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>terminal</filename> class provides support for starting
|
|
a terminal session.
|
|
The
|
|
<link linkend='var-OE_TERMINAL'><filename>OE_TERMINAL</filename></link>
|
|
variable controls which terminal emulator is used for the session.
|
|
</para>
|
|
|
|
<para>
|
|
You can use this class anywhere a separate terminal session needs to
|
|
be started.
|
|
To use the class, include the
|
|
<link linkend='ref-classes-patch'><filename>patch</filename></link>
|
|
class if
|
|
<link linkend='var-PATCHRESOLVE'><filename>PATCHRESOLVE</filename></link>
|
|
is set to "user", include the
|
|
<link linkend='ref-classes-cml1'><filename>cml1</filename></link>
|
|
class, and include the
|
|
<link linkend='ref-classes-devshell'><filename>devshell</filename></link>
|
|
class.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-tinderclient'>
|
|
<title><filename>tinderclient.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>tinderclient</filename> class submits build results to
|
|
an external Tinderbox instance.
|
|
<note>
|
|
This class is currently unmaintained.
|
|
</note>
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-toaster'>
|
|
<title><filename>toaster.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>toaster</filename> class collects information about
|
|
packages and images and sends them as events that the BitBake
|
|
user interface can receive.
|
|
The class is enabled when the Toaster user interface is running.
|
|
</para>
|
|
|
|
<para>
|
|
This class is not intended to be used directly.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-toolchain-scripts'>
|
|
<title><filename>toolchain-scripts.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>toolchain-scripts</filename> class provides the scripts
|
|
used for setting up the environment for installed SDKs.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-typecheck'>
|
|
<title><filename>typecheck.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>typecheck</filename> class provides support for
|
|
validating the values of variables set at the configuration level
|
|
against their defined types.
|
|
The OpenEmbedded build system allows you to define the type of a
|
|
variable using the "type" varflag.
|
|
Here is an example:
|
|
<literallayout class='monospaced'>
|
|
IMAGE_FEATURES[type] = "list"
|
|
</literallayout>
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-uboot-config'>
|
|
<title><filename>uboot-config.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>uboot-config</filename> class provides support for
|
|
U-Boot configuration for a machine.
|
|
Specify the machine in your recipe as follows:
|
|
<literallayout class='monospaced'>
|
|
UBOOT_CONFIG ??= <default>
|
|
UBOOT_CONFIG[foo] = "config,images"
|
|
</literallayout>
|
|
You can also specify the machine using this method:
|
|
<literallayout class='monospaced'>
|
|
UBOOT_MACHINE = "config"
|
|
</literallayout>
|
|
See the
|
|
<link linkend='var-UBOOT_CONFIG'><filename>UBOOT_CONFIG</filename></link>
|
|
and
|
|
<link linkend='var-UBOOT_MACHINE'><filename>UBOOT_MACHINE</filename></link>
|
|
variables for additional information.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-useradd'>
|
|
<title>Adding Users - <filename>useradd.bbclass</filename></title>
|
|
|
|
<para>
|
|
If you have packages that install files that are owned by custom users or groups,
|
|
you can use this class to specify those packages and associate the users and groups
|
|
with those packages.
|
|
The <filename>meta-skeleton/recipes-skeleton/useradd/useradd-example.bb</filename>
|
|
recipe in the <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
|
|
provides a simple example that shows how to add three
|
|
users and groups to two packages.
|
|
See the <filename>useradd-example.bb</filename> for more information on how to
|
|
use this class.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-utility-tasks'>
|
|
<title><filename>utility-tasks.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>utility-tasks</filename> class provides support for
|
|
various "utility" type tasks that are applicable to all recipes,
|
|
such as <filename>do_clean</filename> and
|
|
<filename>do_listtasks</filename>.
|
|
</para>
|
|
|
|
<para>
|
|
This class is enabled by default because it is inherited by
|
|
the
|
|
<link linkend='ref-classes-base'><filename>base</filename></link>
|
|
class.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-utils'>
|
|
<title><filename>utils.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>utils</filename> class provides some useful Python
|
|
functions that are typically used in inline Python expressions
|
|
(e.g. <filename>${@...}</filename>).
|
|
One example use is for <filename>base_contains()</filename>.
|
|
</para>
|
|
|
|
<para>
|
|
This class is enabled by default because it is inherited by the
|
|
<link linkend='ref-classes-base'><filename>base</filename></link>
|
|
class.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-vala'>
|
|
<title><filename>vala.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>vala</filename> class supports recipes that need to
|
|
build software written using the Vala programming language.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-waf'>
|
|
<title><filename>waf.bbclass</filename></title>
|
|
|
|
<para>
|
|
The <filename>waf</filename> class supports recipes that need to build
|
|
software that uses the Waf build system.
|
|
You can use the
|
|
<link linkend='var-EXTRA_OECONF'><filename>EXTRA_OECONF</filename></link>
|
|
variable to specify additional configuration options to be passed on
|
|
the Waf command line.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-externalsrc'>
|
|
<title><filename>externalsrc.bbclass</filename></title>
|
|
|
|
<para>
|
|
You can use this class to build software from source code that is
|
|
external to the OpenEmbedded build system.
|
|
Building software from an external source tree means that the build
|
|
system's normal fetch, unpack, and patch process is not used.
|
|
</para>
|
|
|
|
<para>
|
|
By default, the OpenEmbedded build system uses the
|
|
<link linkend='var-S'><filename>S</filename></link> and
|
|
<link linkend='var-B'><filename>B</filename></link> variables to
|
|
locate unpacked recipe source code and to build it, respectively.
|
|
When your recipe inherits <filename>externalsrc.bbclass</filename>,
|
|
you use the
|
|
<link linkend='var-EXTERNALSRC'><filename>EXTERNALSRC</filename></link>
|
|
and
|
|
<link linkend='var-EXTERNALSRC_BUILD'><filename>EXTERNALSRC_BUILD</filename></link>
|
|
variables to ultimately define <filename>S</filename> and
|
|
<filename>B</filename>.
|
|
</para>
|
|
|
|
<para>
|
|
By default, this class expects the source code to support recipe builds
|
|
that use the <link linkend='var-B'><filename>B</filename></link>
|
|
variable to point to the directory in which the OpenEmbedded build
|
|
system places the generated objects built from the recipes.
|
|
By default, the <filename>B</filename> directory is set to the
|
|
following, which is separate from the source directory
|
|
(<filename>S</filename>):
|
|
<literallayout class='monospaced'>
|
|
${WORKDIR}/${BPN}/{PV}/
|
|
</literallayout>
|
|
See the glossary entries for the
|
|
<link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>,
|
|
<link linkend='var-BPN'><filename>BPN</filename></link>,
|
|
<link linkend='var-PV'><filename>PV</filename></link>,
|
|
</para>
|
|
|
|
<para>
|
|
For more information on
|
|
<filename>externalsrc.bbclass</filename>, see the comments in
|
|
<filename>meta/classes/externalsrc.bbclass</filename> in the
|
|
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
|
|
For information on how to use <filename>externalsrc.bbclass</filename>,
|
|
see the
|
|
"<ulink url='&YOCTO_DOCS_DEV_URL;#building-software-from-an-external-source'>Building Software from an External Source</ulink>"
|
|
section in the Yocto Project Development Manual.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-testimage'>
|
|
<title><filename>testimage.bbclass</filename></title>
|
|
|
|
<para>
|
|
You can use this class to enable running a series of automated tests
|
|
for images.
|
|
The class handles loading the tests and starting the image.
|
|
<note>
|
|
Currently, there is only support for running these tests
|
|
under QEMU.
|
|
</note>
|
|
</para>
|
|
|
|
<para>
|
|
To use the class, you need to perform steps to set up the
|
|
environment.
|
|
The tests are commands that run on the target system over
|
|
<filename>ssh</filename>.
|
|
they are written in Python and make use of the
|
|
<filename>unittest</filename> module.
|
|
</para>
|
|
|
|
<para>
|
|
For information on how to enable, run, and create new tests, see the
|
|
"<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
|
|
section.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-update-alternatives'>
|
|
<title>Alternatives - <filename>update-alternatives.bbclass</filename></title>
|
|
|
|
<para>
|
|
This class helps the alternatives system when multiple sources provide
|
|
the same command.
|
|
This situation occurs when several programs that have the same or
|
|
similar function are installed with the same name.
|
|
For example, the <filename>ar</filename> command is available from the
|
|
<filename>busybox</filename>, <filename>binutils</filename> and
|
|
<filename>elfutils</filename> packages.
|
|
The <filename>update-alternatives.bbclass</filename> class handles
|
|
renaming the binaries so that multiple packages can be installed
|
|
without conflicts.
|
|
The <filename>ar</filename> command still works regardless of which
|
|
packages are installed or subsequently removed.
|
|
The class renames the conflicting binary in each package and symlinks
|
|
the highest priority binary during installation or removal of packages.
|
|
</para>
|
|
|
|
<para>
|
|
To use this class, you need to define a number of variables:
|
|
<itemizedlist>
|
|
<listitem><para><link linkend='var-ALTERNATIVE'><filename>ALTERNATIVE</filename></link>
|
|
</para></listitem>
|
|
<listitem><para><link linkend='var-ALTERNATIVE_LINK_NAME'><filename>ALTERNATIVE_LINK_NAME</filename></link>
|
|
</para></listitem>
|
|
<listitem><para><link linkend='var-ALTERNATIVE_TARGET'><filename>ALTERNATIVE_TARGET</filename></link>
|
|
</para></listitem>
|
|
<listitem><para><link linkend='var-ALTERNATIVE_PRIORITY'><filename>ALTERNATIVE_PRIORITY</filename></link>
|
|
</para></listitem>
|
|
</itemizedlist>
|
|
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
|
|
<ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta/classes/update-alternatives.bbclass'><filename>update-alternatives.bbclass</filename></ulink>.
|
|
</para>
|
|
|
|
<note>
|
|
You can use the <filename>update-alternatives</filename> command
|
|
directly in your recipes.
|
|
However, this class simplifies things in most cases.
|
|
</note>
|
|
</section>
|
|
|
|
<section id='ref-classes-update-rc.d'>
|
|
<title>Initscripts - <filename>update-rc.d.bbclass</filename></title>
|
|
|
|
<para>
|
|
This class uses <filename>update-rc.d</filename> to safely install an
|
|
initialization script on behalf of the package.
|
|
The OpenEmbedded build system takes care of details such as making sure the script is stopped before
|
|
a package is removed and started when the package is installed.
|
|
Three variables control this class:
|
|
<filename><link linkend='var-INITSCRIPT_PACKAGES'>INITSCRIPT_PACKAGES</link></filename>,
|
|
<filename><link linkend='var-INITSCRIPT_NAME'>INITSCRIPT_NAME</link></filename> and
|
|
<filename><link linkend='var-INITSCRIPT_PARAMS'>INITSCRIPT_PARAMS</link></filename>.
|
|
See the variable links for details.
|
|
</para>
|
|
</section>
|
|
|
|
<section id='ref-classes-others'>
|
|
<title>Other Classes</title>
|
|
|
|
<para>
|
|
Thus far, this chapter has discussed only the most useful and important
|
|
classes.
|
|
However, other classes exist within the <filename>meta/classes</filename> directory
|
|
in the <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
|
|
You can examine the <filename>.bbclass</filename> files directly for more
|
|
information.
|
|
</para>
|
|
</section>
|
|
|
|
<!-- Undocumented classes are:
|
|
allarch.bbclass
|
|
bin_package.bbclass
|
|
blacklist.bbclass
|
|
bootimg.bbclass
|
|
boot-directdisk.bbclass
|
|
bugzilla.bbclass
|
|
buildhistory.bbclass
|
|
buildstats.bbclass
|
|
ccache.bbclass
|
|
chrpath.bbclass
|
|
clutter.bbclass
|
|
cmake.bbclass
|
|
cml1.bbclass
|
|
copyleft_compliance.bbclass
|
|
core-image.bbclass
|
|
cross.bbclass
|
|
cross-canadian.bbclass
|
|
crosssdk.bbclass
|
|
deploy.bbclass
|
|
distrodata.bbclass
|
|
distro_features_check.bbclass
|
|
dummy.bbclass
|
|
extrausers.bbclass
|
|
fontcache.bbclass
|
|
gconf.bbclass
|
|
gettext.bbclass
|
|
gnomebase.bbclass
|
|
gnome.bbclass
|
|
grub-efi.bbclass
|
|
gsettings.bbclass
|
|
gtk-doc.bbclass
|
|
gtk-icon-cache.bbclass
|
|
gtk-immodules-cache.bbclass
|
|
gzipnative.bbclass
|
|
icecc.bbclass
|
|
image-empty.bbclass
|
|
image-live.bbclass
|
|
image-vmdk.bbclass
|
|
image-mklibs.bbclass
|
|
image-prelink.bbclass
|
|
image-swab.bbclass
|
|
image_types.bbclass
|
|
image_types_uboot.bbclass
|
|
insserv.bbclass
|
|
kernel-arch.bbclass
|
|
kernel-module-split.bbclass
|
|
kernel-yocto.bbclass
|
|
lib_package.bbclass
|
|
linux-kernel-base.bbclass
|
|
license.bbclass
|
|
logging.bbclass
|
|
meta.bbclass
|
|
metadata_scm.bbclass
|
|
migrate_localcount.bbclass
|
|
mime.bbclass
|
|
mirrors.bbclass
|
|
multilib*.bbclass
|
|
native.bbclass
|
|
nativesdk.bbclass
|
|
oelint.bbclass
|
|
own-mirrors.bbclass
|
|
packagedata.bbclass
|
|
packageinfo.bbclass
|
|
patch.bbclass
|
|
perlnative.bbclass
|
|
pixbufcache.bbclass
|
|
pkg_distribute.bbclass
|
|
pkg_metainfo.bbclass
|
|
populate_sdk*.bbclass
|
|
prexport.bbclass
|
|
primport.bbclass
|
|
prserv.bbclass
|
|
ptest.bbclass
|
|
python-dir.bbclass
|
|
pythonnative.bbclass
|
|
qemu.bbclass
|
|
qmake*.bbclass
|
|
qt4*.bbclass
|
|
recipe_sanity.bbclass
|
|
relocatable.bbclass
|
|
scons.bbclass
|
|
sdl.bbclass
|
|
setuptools.bbclass
|
|
sip.bbclass
|
|
siteconfig.bbclass
|
|
sourcepkg.bbclass
|
|
spdx.bbclass
|
|
sstate.bbclass
|
|
staging.bbclass
|
|
syslinux.bbclass
|
|
systemd.bbclass
|
|
terminal.bbclass
|
|
tinderclient.bbclass
|
|
toolchain-scripts.bbclass
|
|
typecheck.bbclass
|
|
uboot-config.bbclass
|
|
utility-tasks.bbclass
|
|
utils.bbclass
|
|
vala.bbclass
|
|
waf.bbclass
|
|
-->
|
|
|
|
|
|
</chapter>
|
|
<!--
|
|
vim: expandtab tw=80 ts=4
|
|
-->
|