mirror of
https://git.yoctoproject.org/poky
synced 2026-05-08 05:09:24 +00:00
Documentation: poky-ref-manual - Removed all trailing whitespace.
(From yocto-docs rev: 564a28c2501034ea7e2eb16afc43dfaf931b6f6f) Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
acb3f72afa
commit
73ffb8298b
@@ -19,11 +19,11 @@
|
||||
and BitBake.
|
||||
Thus, the generic term used here for the build system is
|
||||
the "OpenEmbedded build system."
|
||||
Development in the Yocto Project using Poky is closely tied to OpenEmbedded, with
|
||||
Development in the Yocto Project using Poky is closely tied to OpenEmbedded, with
|
||||
changes always being merged to OE-Core or BitBake first before being pulled back
|
||||
into Poky.
|
||||
This practice benefits both projects immediately.
|
||||
For a fuller description of the term "Poky", see the
|
||||
For a fuller description of the term "Poky", see the
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#poky'>poky</ulink> term in the Yocto Project
|
||||
Development Manual.
|
||||
</para>
|
||||
@@ -47,9 +47,9 @@
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>
|
||||
These tarballs are self-contained with all required libraries and should work
|
||||
on most Linux systems.
|
||||
To use the tarballs extract them into the root
|
||||
These tarballs are self-contained with all required libraries and should work
|
||||
on most Linux systems.
|
||||
To use the tarballs extract them into the root
|
||||
directory and run the appropriate command:
|
||||
<literallayout class='monospaced'>
|
||||
$ export PATH=/opt/poky/sysroots/i586-pokysdk-linux/usr/bin/:$PATH
|
||||
@@ -72,12 +72,12 @@
|
||||
<para>
|
||||
There are three areas that help with stability;
|
||||
<itemizedlist>
|
||||
<listitem><para>The Yocto Project team keeps
|
||||
<listitem><para>The Yocto Project team keeps
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#oe-core'>OE-Core</ulink> small
|
||||
and focused, containing around 830 recipes as opposed to the thousands
|
||||
available in other OpenEmbedded community layers.
|
||||
Keeping it small makes it easy to test and maintain.</para></listitem>
|
||||
<listitem><para>The Yocto Project team runs manual and automated tests
|
||||
<listitem><para>The Yocto Project team runs manual and automated tests
|
||||
using a small, fixed set of reference hardware as well as emulated
|
||||
targets.</para></listitem>
|
||||
<listitem><para>The Yocto Project uses an an autobuilder,
|
||||
@@ -100,7 +100,7 @@
|
||||
<ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>.
|
||||
</para>
|
||||
<para>
|
||||
Usually, if the board is not completely exotic, adding support in
|
||||
Usually, if the board is not completely exotic, adding support in
|
||||
the Yocto Project is fairly straightforward.
|
||||
</para>
|
||||
</answer>
|
||||
@@ -115,10 +115,10 @@
|
||||
<answer>
|
||||
<para>
|
||||
The software running on the <ulink url='http://vernier.com/labquest/'>Vernier LabQuest</ulink>
|
||||
is built using the OpenEmbedded build system.
|
||||
is built using the OpenEmbedded build system.
|
||||
See the <ulink url='http://www.vernier.com/products/interfaces/labq/'>Vernier LabQuest</ulink>
|
||||
website for more information.
|
||||
There are a number of pre-production devices using the OpenEmbedded build system
|
||||
There are a number of pre-production devices using the OpenEmbedded build system
|
||||
and the Yocto Project team
|
||||
announces them as soon as they are released.
|
||||
</para>
|
||||
@@ -133,8 +133,8 @@
|
||||
</question>
|
||||
<answer>
|
||||
<para>
|
||||
Because the same set of recipes can be used to create output of various formats, the
|
||||
output of an OpenEmbedded build depends on how it was started.
|
||||
Because the same set of recipes can be used to create output of various formats, the
|
||||
output of an OpenEmbedded build depends on how it was started.
|
||||
Usually, the output is a flashable image ready for the target device.
|
||||
</para>
|
||||
</answer>
|
||||
@@ -150,7 +150,7 @@
|
||||
<para>
|
||||
To add a package, you need to create a BitBake recipe.
|
||||
For information on how to add a package, see the section
|
||||
"<ulink url='&YOCTO_DOCS_DEV_URL;#usingpoky-extend-addpkg'>Adding a Package</ulink>"
|
||||
"<ulink url='&YOCTO_DOCS_DEV_URL;#usingpoky-extend-addpkg'>Adding a Package</ulink>"
|
||||
in the Yocto Project Development Manual.
|
||||
</para>
|
||||
</answer>
|
||||
@@ -159,16 +159,16 @@
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
Do I have to reflash my entire board with a new Yocto Project image when recompiling
|
||||
Do I have to reflash my entire board with a new Yocto Project image when recompiling
|
||||
a package?
|
||||
</para>
|
||||
</question>
|
||||
<answer>
|
||||
<para>
|
||||
The OpenEmbedded build system can build packages in various formats such as
|
||||
<filename>ipk</filename> for <filename>opkg</filename>,
|
||||
Debian package (<filename>.deb</filename>), or RPM.
|
||||
The packages can then be upgraded using the package tools on the device, much like
|
||||
<filename>ipk</filename> for <filename>opkg</filename>,
|
||||
Debian package (<filename>.deb</filename>), or RPM.
|
||||
The packages can then be upgraded using the package tools on the device, much like
|
||||
on a desktop distribution such as Ubuntu or Fedora.
|
||||
</para>
|
||||
</answer>
|
||||
@@ -182,11 +182,11 @@
|
||||
</question>
|
||||
<answer>
|
||||
<para>
|
||||
GNOME Mobile is a subset of the <ulink url='http://www.gnome.org'>GNOME</ulink>
|
||||
platform targeted at mobile and embedded devices.
|
||||
The the main difference between GNOME Mobile and standard GNOME is that
|
||||
desktop-orientated libraries have been removed, along with deprecated libraries,
|
||||
creating a much smaller footprint.
|
||||
GNOME Mobile is a subset of the <ulink url='http://www.gnome.org'>GNOME</ulink>
|
||||
platform targeted at mobile and embedded devices.
|
||||
The the main difference between GNOME Mobile and standard GNOME is that
|
||||
desktop-orientated libraries have been removed, along with deprecated libraries,
|
||||
creating a much smaller footprint.
|
||||
</para>
|
||||
</answer>
|
||||
</qandaentry>
|
||||
@@ -200,7 +200,7 @@
|
||||
</question>
|
||||
<answer>
|
||||
<para>
|
||||
You are probably running the build on an NTFS filesystem.
|
||||
You are probably running the build on an NTFS filesystem.
|
||||
Use <filename>ext2</filename>, <filename>ext3</filename>, or <filename>ext4</filename> instead.
|
||||
</para>
|
||||
</answer>
|
||||
@@ -214,8 +214,8 @@
|
||||
</question>
|
||||
<answer>
|
||||
<para>
|
||||
To get the Yocto Project working under RHEL/CentOS 5.1 you need to first
|
||||
install some required packages.
|
||||
To get the Yocto Project working under RHEL/CentOS 5.1 you need to first
|
||||
install some required packages.
|
||||
The standard CentOS packages needed are:
|
||||
<itemizedlist>
|
||||
<listitem><para>"Development tools" (selected during installation)</para></listitem>
|
||||
@@ -224,19 +224,19 @@
|
||||
</itemizedlist>
|
||||
On top of these, you need the following external packages:
|
||||
<itemizedlist>
|
||||
<listitem><para><filename>python-sqlite2</filename> from
|
||||
<listitem><para><filename>python-sqlite2</filename> from
|
||||
<ulink url='http://dag.wieers.com/rpm/packages/python-sqlite2/'>DAG repository</ulink>
|
||||
</para></listitem>
|
||||
<listitem><para><filename>help2man</filename> from
|
||||
<listitem><para><filename>help2man</filename> from
|
||||
<ulink url='http://centos.karan.org/el4/extras/stable/x86_64/RPMS/repodata/repoview/help2man-0-1.33.1-2.html'>Karan repository</ulink></para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Once these packages are installed, the OpenEmbedded build system will be able
|
||||
Once these packages are installed, the OpenEmbedded build system will be able
|
||||
to build standard images.
|
||||
However, there might be a problem with the QEMU emulator segfaulting.
|
||||
You can either disable the generation of binary locales by setting
|
||||
However, there might be a problem with the QEMU emulator segfaulting.
|
||||
You can either disable the generation of binary locales by setting
|
||||
<filename><link linkend='var-ENABLE_BINARY_LOCALE_GENERATION'>ENABLE_BINARY_LOCALE_GENERATION</link>
|
||||
</filename> to "0" or by removing the <filename>linux-2.6-execshield.patch</filename>
|
||||
from the kernel and rebuilding it since that is the patch that causes the problems with QEMU.
|
||||
@@ -247,22 +247,22 @@
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
I see lots of 404 responses for files on
|
||||
I see lots of 404 responses for files on
|
||||
<filename>http://www.yoctoproject.org/sources/*</filename>. Is something wrong?
|
||||
</para>
|
||||
</question>
|
||||
<answer>
|
||||
<para>
|
||||
Nothing is wrong.
|
||||
The OpenEmbedded build system checks any configured source mirrors before downloading
|
||||
from the upstream sources.
|
||||
The build system does this searching for both source archives and
|
||||
pre-checked out versions of SCM managed software.
|
||||
These checks help in large installations because it can reduce load on the SCM servers
|
||||
themselves.
|
||||
The address above is one of the default mirrors configured into the
|
||||
The OpenEmbedded build system checks any configured source mirrors before downloading
|
||||
from the upstream sources.
|
||||
The build system does this searching for both source archives and
|
||||
pre-checked out versions of SCM managed software.
|
||||
These checks help in large installations because it can reduce load on the SCM servers
|
||||
themselves.
|
||||
The address above is one of the default mirrors configured into the
|
||||
build system.
|
||||
Consequently, if an upstream source disappears, the team
|
||||
Consequently, if an upstream source disappears, the team
|
||||
can place sources there so builds continue to work.
|
||||
</para>
|
||||
</answer>
|
||||
@@ -271,16 +271,16 @@
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para>
|
||||
I have machine-specific data in a package for one machine only but the package is
|
||||
I have machine-specific data in a package for one machine only but the package is
|
||||
being marked as machine-specific in all cases, how do I prevent this?
|
||||
</para>
|
||||
</question>
|
||||
<answer>
|
||||
<para>
|
||||
Set <filename><link linkend='var-SRC_URI_OVERRIDES_PACKAGE_ARCH'>SRC_URI_OVERRIDES_PACKAGE_ARCH</link>
|
||||
</filename> = "0" in the <filename>.bb</filename> file but make sure the package is
|
||||
manually marked as
|
||||
machine-specific in the case that needs it.
|
||||
</filename> = "0" in the <filename>.bb</filename> file but make sure the package is
|
||||
manually marked as
|
||||
machine-specific in the case that needs it.
|
||||
The code that handles <filename>SRC_URI_OVERRIDES_PACKAGE_ARCH</filename> is in <filename>base.bbclass</filename>.
|
||||
</para>
|
||||
</answer>
|
||||
@@ -295,9 +295,9 @@
|
||||
<answer>
|
||||
<para>
|
||||
Most source fetching by the OpenEmbedded build system is done by <filename>wget</filename>
|
||||
and you therefore need to specify the proxy settings in a
|
||||
<filename>.wgetrc</filename> file in your home directory.
|
||||
Example settings in that file would be
|
||||
and you therefore need to specify the proxy settings in a
|
||||
<filename>.wgetrc</filename> file in your home directory.
|
||||
Example settings in that file would be
|
||||
<literallayout class='monospaced'>
|
||||
http_proxy = http://proxy.yoyodyne.com:18023/
|
||||
ftp_proxy = http://proxy.yoyodyne.com:18023/
|
||||
@@ -317,10 +317,10 @@
|
||||
</question>
|
||||
<answer>
|
||||
<para>
|
||||
The <filename>*-native</filename> targets are designed to run on the system
|
||||
The <filename>*-native</filename> targets are designed to run on the system
|
||||
being used for the build.
|
||||
These are usually tools that are needed to assist the build in some way such as
|
||||
<filename>quilt-native</filename>, which is used to apply patches.
|
||||
These are usually tools that are needed to assist the build in some way such as
|
||||
<filename>quilt-native</filename>, which is used to apply patches.
|
||||
The non-native version is the one that runs on the target device.
|
||||
</para>
|
||||
</answer>
|
||||
@@ -335,11 +335,11 @@
|
||||
<answer>
|
||||
<para>
|
||||
If the same build is failing in totally different and random ways,
|
||||
the most likely explanation is that either the hardware you're running the
|
||||
build on has some problem, or, if you are running the build under virtualisation,
|
||||
the virtualisation probably has bugs.
|
||||
The OpenEmbedded build system processes a massive amount of data causing lots of network, disk and
|
||||
CPU activity and is sensitive to even single bit failures in any of these areas.
|
||||
the most likely explanation is that either the hardware you're running the
|
||||
build on has some problem, or, if you are running the build under virtualisation,
|
||||
the virtualisation probably has bugs.
|
||||
The OpenEmbedded build system processes a massive amount of data causing lots of network, disk and
|
||||
CPU activity and is sensitive to even single bit failures in any of these areas.
|
||||
True random failures have always been traced back to hardware or virtualisation issues.
|
||||
</para>
|
||||
</answer>
|
||||
@@ -356,8 +356,8 @@
|
||||
This is a difficult question and you need to consult your lawyer for the answer
|
||||
for your specific case.
|
||||
It is worth bearing in mind that for GPL compliance there needs to be enough
|
||||
information shipped to allow someone else to rebuild the same end result
|
||||
you are shipping.
|
||||
information shipped to allow someone else to rebuild the same end result
|
||||
you are shipping.
|
||||
This means sharing the source code, any patches applied to it, and also any
|
||||
configuration information about how that package was configured and built.
|
||||
</para>
|
||||
@@ -390,9 +390,9 @@
|
||||
</question>
|
||||
<answer>
|
||||
<para>
|
||||
The default interfaces file provided by the netbase recipe does not
|
||||
automatically bring up network interfaces.
|
||||
Therefore, you will need to add a BSP-specific netbase that includes an interfaces
|
||||
The default interfaces file provided by the netbase recipe does not
|
||||
automatically bring up network interfaces.
|
||||
Therefore, you will need to add a BSP-specific netbase that includes an interfaces
|
||||
file.
|
||||
See the "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-filelayout-misc-recipes'>Miscellaneous Recipe Files</ulink>"
|
||||
section for information on creating these types of miscellaneous recipe files.
|
||||
@@ -415,11 +415,11 @@
|
||||
</question>
|
||||
<answer>
|
||||
<para>
|
||||
Images are created to be 1.2 times the size of the populated root filesystem.
|
||||
To modify this ratio so that there is more free space available, you need to
|
||||
set the configuration value <filename>IMAGE_OVERHEAD_FACTOR</filename>.
|
||||
For example, setting <filename>IMAGE_OVERHEAD_FACTOR</filename> to 1.5 sets
|
||||
the image size ratio to one and a half times the size of the populated
|
||||
Images are created to be 1.2 times the size of the populated root filesystem.
|
||||
To modify this ratio so that there is more free space available, you need to
|
||||
set the configuration value <filename>IMAGE_OVERHEAD_FACTOR</filename>.
|
||||
For example, setting <filename>IMAGE_OVERHEAD_FACTOR</filename> to 1.5 sets
|
||||
the image size ratio to one and a half times the size of the populated
|
||||
root filesystem.
|
||||
<literallayout class='monospaced'>
|
||||
IMAGE_OVERHEAD_FACTOR = "1.5"
|
||||
@@ -436,9 +436,9 @@
|
||||
</question>
|
||||
<answer>
|
||||
<para>
|
||||
The Yocto Project team has tried to do this before but too many of the tools
|
||||
the OpenEmbedded build system depends on such as <filename>autoconf</filename>
|
||||
break when they find spaces in pathnames.
|
||||
The Yocto Project team has tried to do this before but too many of the tools
|
||||
the OpenEmbedded build system depends on such as <filename>autoconf</filename>
|
||||
break when they find spaces in pathnames.
|
||||
Until that situation changes, the team will not support spaces in pathnames.
|
||||
</para>
|
||||
</answer>
|
||||
@@ -453,10 +453,10 @@
|
||||
<answer>
|
||||
<para>
|
||||
The toolchain configuration is very flexible and customizable.
|
||||
It is primarily controlled with the
|
||||
It is primarily controlled with the
|
||||
<filename><link linkend='var-TCMODE'>TCMODE</link></filename> variable.
|
||||
This variable controls which <filename>tcmode-*.inc</filename> file to include
|
||||
from the <filename>meta/conf/distro/include</filename> directory within the
|
||||
This variable controls which <filename>tcmode-*.inc</filename> file to include
|
||||
from the <filename>meta/conf/distro/include</filename> directory within the
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>source directory</ulink>.
|
||||
</para>
|
||||
|
||||
@@ -466,15 +466,15 @@
|
||||
However, other patterns are accepted.
|
||||
In particular, "external-*" refers to external toolchains of which there are some
|
||||
basic examples included in the OpenEmbedded Core (<filename>meta</filename>).
|
||||
You can use your own custom toolchain definition in your own layer
|
||||
(or as defined in the <filename>local.conf</filename> file) at the location
|
||||
You can use your own custom toolchain definition in your own layer
|
||||
(or as defined in the <filename>local.conf</filename> file) at the location
|
||||
<filename>conf/distro/include/tcmode-*.inc</filename>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In addition to the toolchain configuration, you also need a corresponding toolchain recipe file.
|
||||
This recipe file needs to package up any pre-built objects in the toolchain such as
|
||||
<filename>libgcc</filename>, <filename>libstdcc++</filename>,
|
||||
This recipe file needs to package up any pre-built objects in the toolchain such as
|
||||
<filename>libgcc</filename>, <filename>libstdcc++</filename>,
|
||||
any locales, and <filename>libc</filename>.
|
||||
An example is the <filename>external-sourcery-toolchain.bb</filename>, which is located
|
||||
in <filename>meta/recipes-core/meta/</filename> within the source directory.
|
||||
@@ -485,7 +485,7 @@
|
||||
<qandaentry>
|
||||
<question>
|
||||
<para id='how-does-the-yocto-project-obtain-source-code-and-will-it-work-behind-my-firewall-or-proxy-server'>
|
||||
How does the OpenEmbedded build system obtain source code and will it work behind my
|
||||
How does the OpenEmbedded build system obtain source code and will it work behind my
|
||||
firewall or proxy server?
|
||||
</para>
|
||||
</question>
|
||||
@@ -497,13 +497,13 @@
|
||||
</para>
|
||||
<para>
|
||||
When the build system searches for source code, it first tries the local download directory.
|
||||
If that location fails, Poky tries PREMIRRORS, the upstream source,
|
||||
If that location fails, Poky tries PREMIRRORS, the upstream source,
|
||||
and then MIRRORS in that order.
|
||||
</para>
|
||||
<para>
|
||||
By default, the OpenEmbedded build system uses the Yocto Project source PREMIRRORS
|
||||
for SCM-based sources,
|
||||
upstreams for normal tarballs, and then falls back to a number of other mirrors
|
||||
By default, the OpenEmbedded build system uses the Yocto Project source PREMIRRORS
|
||||
for SCM-based sources,
|
||||
upstreams for normal tarballs, and then falls back to a number of other mirrors
|
||||
including the Yocto Project source mirror if those fail.
|
||||
</para>
|
||||
<para>
|
||||
@@ -521,7 +521,7 @@
|
||||
<para>
|
||||
These changes cause Poky to intercept Git, FTP, HTTP, and HTTPS
|
||||
requests and direct them to the <filename>http://</filename> sources mirror.
|
||||
You can use <filename>file://</filename> URLs to point to local directories
|
||||
You can use <filename>file://</filename> URLs to point to local directories
|
||||
or network shares as well.
|
||||
</para>
|
||||
<para>
|
||||
@@ -529,7 +529,7 @@
|
||||
<literallayout class='monospaced'>
|
||||
BB_NO_NETWORK = "1"
|
||||
</literallayout>
|
||||
This statement tells BitBake to throw an error instead of trying to access the
|
||||
This statement tells BitBake to throw an error instead of trying to access the
|
||||
Internet.
|
||||
This technique is useful if you want to ensure code builds only from local sources.
|
||||
</para>
|
||||
@@ -559,14 +559,14 @@
|
||||
ftp://.*/.* http://www.yoctoproject.org/sources/ \n \
|
||||
http://.*/.* http://www.yoctoproject.org/sources/ \n \
|
||||
https://.*/.* http://www.yoctoproject.org/sources/ \n"
|
||||
BB_FETCH_PREMIRRORONLY = "1"
|
||||
BB_FETCH_PREMIRRORONLY = "1"
|
||||
</literallayout>
|
||||
These changes would cause Poky to successfully fetch source over HTTP and
|
||||
These changes would cause Poky to successfully fetch source over HTTP and
|
||||
any network accesses to anything other than the PREMIRROR would fail.
|
||||
</para>
|
||||
<para>
|
||||
The build system also honors the standard shell environment variables
|
||||
<filename>http_proxy</filename>, <filename>ftp_proxy</filename>,
|
||||
The build system also honors the standard shell environment variables
|
||||
<filename>http_proxy</filename>, <filename>ftp_proxy</filename>,
|
||||
<filename>https_proxy</filename>, and <filename>all_proxy</filename>
|
||||
to redirect requests through proxy servers.
|
||||
</para>
|
||||
@@ -582,16 +582,16 @@
|
||||
<answer>
|
||||
<para>
|
||||
Yes - you can easily do this.
|
||||
When you use BitBake to build an image, all the build output goes into the
|
||||
When you use BitBake to build an image, all the build output goes into the
|
||||
directory created when you source the <filename>oe-init-build-env</filename>
|
||||
setup file.
|
||||
By default, this <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>build directory</ulink>
|
||||
By default, this <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>build directory</ulink>
|
||||
is named <filename>build</filename> but can be named
|
||||
anything you want.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Within the build directory is the <filename>tmp</filename> directory.
|
||||
Within the build directory is the <filename>tmp</filename> directory.
|
||||
To remove all the build output yet preserve any source code or downloaded files
|
||||
from previous builds, simply remove the <filename>tmp</filename> directory.
|
||||
</para>
|
||||
@@ -601,7 +601,6 @@
|
||||
|
||||
</qandaset>
|
||||
</chapter>
|
||||
<!--
|
||||
vim: expandtab tw=80 ts=4
|
||||
<!--
|
||||
vim: expandtab tw=80 ts=4
|
||||
-->
|
||||
|
||||
|
||||
@@ -12,14 +12,14 @@
|
||||
This manual provides reference information for the current release of the Yocto Project.
|
||||
The Yocto Project is an open-source collaboration project focused on embedded Linux
|
||||
developers.
|
||||
Amongst other things, the Yocto Project uses the OpenEmbedded build system, which
|
||||
Amongst other things, the Yocto Project uses the OpenEmbedded build system, which
|
||||
is based on the Poky project, to construct complete Linux images.
|
||||
You can find complete introductory and getting started information on the Yocto Project
|
||||
by reading the
|
||||
by reading the
|
||||
<ulink url='&YOCTO_DOCS_QS_URL;'>Yocto Project Quick Start</ulink>.
|
||||
For task-based information using the Yocto Project, see the
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;'>Yocto Project Development Manual</ulink>.
|
||||
You can also find lots of information on the Yocto Project on the
|
||||
You can also find lots of information on the Yocto Project on the
|
||||
<ulink url="&YOCTO_HOME_URL;">Yocto Project website</ulink>.
|
||||
</para>
|
||||
</section>
|
||||
@@ -31,53 +31,53 @@
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>
|
||||
<link linkend='usingpoky'>Using the Yocto Project</link>:</emphasis> This chapter
|
||||
provides an overview of the components that make up the Yocto Project
|
||||
provides an overview of the components that make up the Yocto Project
|
||||
followed by information about debugging images created in the Yocto Project.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>
|
||||
<link linkend='technical-details'>Technical Details</link>:</emphasis>
|
||||
<link linkend='technical-details'>Technical Details</link>:</emphasis>
|
||||
This chapter describes fundamental Yocto Project components as well as an explanation
|
||||
behind how the Yocto Project uses shared state (sstate) cache to speed build time.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>
|
||||
<link linkend='ref-structure'>Directory Structure</link>:</emphasis>
|
||||
This chapter describes the
|
||||
<link linkend='ref-structure'>Directory Structure</link>:</emphasis>
|
||||
This chapter describes the
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>source directory</ulink> created
|
||||
either by unpacking a released Yocto Project tarball on your host development system,
|
||||
or by cloning the upstream
|
||||
either by unpacking a released Yocto Project tarball on your host development system,
|
||||
or by cloning the upstream
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#poky'>Poky</ulink> Git repository.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>
|
||||
<link linkend='ref-bitbake'>BitBake</link>:</emphasis>
|
||||
This chapter provides an overview of the BitBake tool and its role within
|
||||
<link linkend='ref-bitbake'>BitBake</link>:</emphasis>
|
||||
This chapter provides an overview of the BitBake tool and its role within
|
||||
the Yocto Project.</para></listitem>
|
||||
<listitem><para><emphasis>
|
||||
<link linkend='ref-classes'>Classes</link>:</emphasis>
|
||||
<link linkend='ref-classes'>Classes</link>:</emphasis>
|
||||
This chapter describes the classes used in the Yocto Project.</para></listitem>
|
||||
<listitem><para><emphasis>
|
||||
<link linkend='ref-images'>Images</link>:</emphasis>
|
||||
<link linkend='ref-images'>Images</link>:</emphasis>
|
||||
This chapter describes the standard images that the Yocto Project supports.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>
|
||||
<link linkend='ref-features'>Features</link>:</emphasis>
|
||||
This chapter describes mechanisms for creating distribution, machine, and image
|
||||
<link linkend='ref-features'>Features</link>:</emphasis>
|
||||
This chapter describes mechanisms for creating distribution, machine, and image
|
||||
features during the build process using the OpenEmbedded build system.</para></listitem>
|
||||
<listitem><para><emphasis>
|
||||
<link linkend='ref-variables-glos'>Variables Glossary</link>:</emphasis>
|
||||
<link linkend='ref-variables-glos'>Variables Glossary</link>:</emphasis>
|
||||
This chapter presents most variables used by the OpenEmbedded build system, which
|
||||
using BitBake.
|
||||
Entries describe the function of the variable and how to apply them.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>
|
||||
<link linkend='ref-varlocality'>Variable Context</link>:</emphasis>
|
||||
<link linkend='ref-varlocality'>Variable Context</link>:</emphasis>
|
||||
This chapter provides variable locality or context.</para></listitem>
|
||||
<listitem><para><emphasis>
|
||||
<link linkend='faq'>FAQ</link>:</emphasis>
|
||||
<link linkend='faq'>FAQ</link>:</emphasis>
|
||||
This chapter provides answers for commonly asked questions in the Yocto Project
|
||||
development environment.</para></listitem>
|
||||
<listitem><para><emphasis>
|
||||
<link linkend='resources'>Contributing to the Yocto Project</link>:</emphasis>
|
||||
This chapter provides guidance on how you can contribute back to the Yocto
|
||||
<link linkend='resources'>Contributing to the Yocto Project</link>:</emphasis>
|
||||
This chapter provides guidance on how you can contribute back to the Yocto
|
||||
Project.</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
@@ -88,7 +88,7 @@
|
||||
<title>System Requirements</title>
|
||||
<para>
|
||||
For general Yocto Project system requirements, see the
|
||||
"<ulink url='&YOCTO_DOCS_QS_URL;#yp-resources'>What You Need and How You Get It</ulink>" section
|
||||
"<ulink url='&YOCTO_DOCS_QS_URL;#yp-resources'>What You Need and How You Get It</ulink>" section
|
||||
in the Yocto Project Quick Start.
|
||||
The remainder of this section provides details on system requirements
|
||||
not covered in the Yocto Project Quick Start.
|
||||
@@ -120,8 +120,8 @@
|
||||
</para>
|
||||
|
||||
<note>
|
||||
For additional information on distributions that support the
|
||||
Yocto Project, see the
|
||||
For additional information on distributions that support the
|
||||
Yocto Project, see the
|
||||
<ulink url='&YOCTO_WIKI_URL;/wiki/Distribution_Support'>Distribution Support</ulink> wiki page.
|
||||
</note>
|
||||
</section>
|
||||
@@ -130,9 +130,9 @@
|
||||
<title>Required Packages for the Host Development System</title>
|
||||
|
||||
<para>
|
||||
The list of packages you need on the host development system can
|
||||
be large when covering all build scenarios using the Yocto Project.
|
||||
This section provides required packages by Linux distribution and
|
||||
The list of packages you need on the host development system can
|
||||
be large when covering all build scenarios using the Yocto Project.
|
||||
This section provides required packages by Linux distribution and
|
||||
further categorized by function.
|
||||
</para>
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
given a supported Ubuntu Linux distribution:
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>Essentials:</emphasis>
|
||||
Packages needed to build an image on a headless
|
||||
Packages needed to build an image on a headless
|
||||
system:
|
||||
<literallayout class='monospaced'>
|
||||
$ sudo apt-get install &UBUNTU_HOST_PACKAGES_ESSENTIAL;
|
||||
@@ -155,13 +155,13 @@
|
||||
$ sudo apt-get install libsdl1.2-dev xterm
|
||||
</literallayout></para></listitem>
|
||||
<listitem><para><emphasis>Documentation:</emphasis>
|
||||
Packages needed if you are going to build out the
|
||||
Packages needed if you are going to build out the
|
||||
Yocto Project documentation manuals:
|
||||
<literallayout class='monospaced'>
|
||||
$ sudo apt-get install make xsltproc docbook-utils fop
|
||||
</literallayout></para></listitem>
|
||||
<listitem><para><emphasis>ADT Installer Extras:</emphasis>
|
||||
Packages needed if you are going to be using the
|
||||
Packages needed if you are going to be using the
|
||||
<ulink url='&YOCTO_DOCS_ADT_URL;#using-the-adt-installer'>Application Development Toolkit (ADT) Installer</ulink>:
|
||||
<literallayout class='monospaced'>
|
||||
$ sudo apt-get install autoconf automake libtool libglib2.0-dev
|
||||
@@ -178,7 +178,7 @@
|
||||
given a supported Fedora Linux distribution:
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>Essentials:</emphasis>
|
||||
Packages needed to build an image for a headless
|
||||
Packages needed to build an image for a headless
|
||||
system:
|
||||
<literallayout class='monospaced'>
|
||||
$ sudo yum install &FEDORA_HOST_PACKAGES_ESSENTIAL;
|
||||
@@ -189,14 +189,14 @@
|
||||
$ sudo yum install SDL-devel xterm
|
||||
</literallayout></para></listitem>
|
||||
<listitem><para><emphasis>Documentation:</emphasis>
|
||||
Packages needed if you are going to build out the
|
||||
Packages needed if you are going to build out the
|
||||
Yocto Project documentation manuals:
|
||||
<literallayout class='monospaced'>
|
||||
$ sudo yum install make docbook-style-dsssl docbook-style-xsl \
|
||||
docbook-dtds docbook-utils fop libxslt
|
||||
</literallayout></para></listitem>
|
||||
<listitem><para><emphasis>ADT Installer Extras:</emphasis>
|
||||
Packages needed if you are going to be using the
|
||||
Packages needed if you are going to be using the
|
||||
<ulink url='&YOCTO_DOCS_ADT_URL;#using-the-adt-installer'>Application Development Toolkit (ADT) Installer</ulink>:
|
||||
<literallayout class='monospaced'>
|
||||
$ sudo yum install autoconf automake libtool glib2-devel
|
||||
@@ -213,7 +213,7 @@
|
||||
given a supported OpenSUSE Linux distribution:
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>Essentials:</emphasis>
|
||||
Packages needed to build an image for a headless
|
||||
Packages needed to build an image for a headless
|
||||
system:
|
||||
<literallayout class='monospaced'>
|
||||
$ sudo zypper install &OPENSUSE_HOST_PACKAGES_ESSENTIAL;
|
||||
@@ -224,13 +224,13 @@
|
||||
$ sudo zypper install libSDL-devel xterm
|
||||
</literallayout></para></listitem>
|
||||
<listitem><para><emphasis>Documentation:</emphasis>
|
||||
Packages needed if you are going to build out the
|
||||
Packages needed if you are going to build out the
|
||||
Yocto Project documentation manuals:
|
||||
<literallayout class='monospaced'>
|
||||
$ sudo zypper install make fop xsltproc
|
||||
</literallayout></para></listitem>
|
||||
<listitem><para><emphasis>ADT Installer Extras:</emphasis>
|
||||
Packages needed if you are going to be using the
|
||||
Packages needed if you are going to be using the
|
||||
<ulink url='&YOCTO_DOCS_ADT_URL;#using-the-adt-installer'>Application Development Toolkit (ADT) Installer</ulink>:
|
||||
<literallayout class='monospaced'>
|
||||
$ sudo zypper install autoconf automake libtool glib2-devel
|
||||
@@ -247,7 +247,7 @@
|
||||
given a supported CentOS Linux distribution:
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>Essentials:</emphasis>
|
||||
Packages needed to build an image for a headless
|
||||
Packages needed to build an image for a headless
|
||||
system:
|
||||
<literallayout class='monospaced'>
|
||||
$ sudo yum -y install &CENTOS_HOST_PACKAGES_ESSENTIAL;
|
||||
@@ -258,22 +258,22 @@
|
||||
$ sudo yum -y install SDL-devel xterm
|
||||
</literallayout></para></listitem>
|
||||
<listitem><para><emphasis>Documentation:</emphasis>
|
||||
Packages needed if you are going to build out the
|
||||
Packages needed if you are going to build out the
|
||||
Yocto Project documentation manuals:
|
||||
<literallayout class='monospaced'>
|
||||
$ sudo yum -y install make docbook-style-dsssl docbook-style-xsl \
|
||||
docbook-dtds docbook-utils fop libxslt
|
||||
</literallayout></para></listitem>
|
||||
<listitem><para><emphasis>ADT Installer Extras:</emphasis>
|
||||
Packages needed if you are going to be using the
|
||||
Packages needed if you are going to be using the
|
||||
<ulink url='&YOCTO_DOCS_ADT_URL;#using-the-adt-installer'>Application Development Toolkit (ADT) Installer</ulink>:
|
||||
<literallayout class='monospaced'>
|
||||
$ sudo yum -y install autoconf automake libtool glib2-devel
|
||||
</literallayout></para></listitem>
|
||||
</itemizedlist>
|
||||
<note>Depending on the CentOS version you are using, other requirements
|
||||
and dependencies might exist.
|
||||
For details, you should look at the CentOS sections on the
|
||||
<note>Depending on the CentOS version you are using, other requirements
|
||||
and dependencies might exist.
|
||||
For details, you should look at the CentOS sections on the
|
||||
<ulink url='https://wiki.yoctoproject.org/wiki/Poky/GettingStarted/Dependencies'>Poky/GettingStarted/Dependencies</ulink>
|
||||
wiki page.</note>
|
||||
</para>
|
||||
@@ -284,19 +284,19 @@
|
||||
<section id='intro-getit'>
|
||||
<title>Obtaining the Yocto Project</title>
|
||||
<para>
|
||||
The Yocto Project development team makes the Yocto Project available through a number
|
||||
The Yocto Project development team makes the Yocto Project available through a number
|
||||
of methods:
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>Releases:</emphasis> Stable, tested releases are available through
|
||||
<listitem><para><emphasis>Releases:</emphasis> Stable, tested releases are available through
|
||||
<ulink url='&YOCTO_DL_URL;/releases/yocto/'/>.</para></listitem>
|
||||
<listitem><para><emphasis>Nightly Builds:</emphasis> These releases are available at
|
||||
<ulink url='http://autobuilder.yoctoproject.org/nightly'/>.
|
||||
These builds include Yocto Project releases, meta-toolchain tarball installation scripts, and
|
||||
<ulink url='http://autobuilder.yoctoproject.org/nightly'/>.
|
||||
These builds include Yocto Project releases, meta-toolchain tarball installation scripts, and
|
||||
experimental builds.</para></listitem>
|
||||
<listitem><para><emphasis>Yocto Project Website:</emphasis> You can find releases
|
||||
of the Yocto Project and supported BSPs at the
|
||||
<ulink url='&YOCTO_HOME_URL;'>Yocto Project website</ulink>.
|
||||
Along with these downloads, you can find lots of other information at this site.
|
||||
Along with these downloads, you can find lots of other information at this site.
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
@@ -305,13 +305,13 @@
|
||||
<section id='intro-getit-dev'>
|
||||
<title>Development Checkouts</title>
|
||||
<para>
|
||||
Development using the Yocto Project requires a local
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
|
||||
You can set up the source directory by downloading a Yocto Project release tarball and unpacking it,
|
||||
Development using the Yocto Project requires a local
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
|
||||
You can set up the source directory by downloading a Yocto Project release tarball and unpacking it,
|
||||
or by cloning a copy of the upstream
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#poky'>Poky</ulink> Git repository.
|
||||
For information on both these methods, see the
|
||||
"<ulink url='&YOCTO_DOCS_DEV_URL;#getting-setup'>Getting Setup</ulink>"
|
||||
"<ulink url='&YOCTO_DOCS_DEV_URL;#getting-setup'>Getting Setup</ulink>"
|
||||
section in the Yocto Project Development Manual.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<title>Migrating to a Newer Yocto Project Release</title>
|
||||
|
||||
<para>
|
||||
This chapter provides information you can use to migrate work to a
|
||||
newer Yocto Project release. You can find the same information in the
|
||||
This chapter provides information you can use to migrate work to a
|
||||
newer Yocto Project release. You can find the same information in the
|
||||
release notes for a given release.
|
||||
</para>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<title>Moving to the Yocto Project 1.3 Release</title>
|
||||
|
||||
<para>
|
||||
This section provides migration information for moving to the
|
||||
This section provides migration information for moving to the
|
||||
Yocto Project 1.3 Release.
|
||||
</para>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<title>Local Configuration</title>
|
||||
|
||||
<para>
|
||||
Differences include changes for
|
||||
Differences include changes for
|
||||
<link linkend='var-SSTATE_MIRRORS'><filename>SSTATE_MIRRORS</filename></link>
|
||||
and <filename>bblayers.conf</filename>.
|
||||
</para>
|
||||
@@ -32,18 +32,18 @@
|
||||
<title>SSTATE_MIRRORS</title>
|
||||
|
||||
<para>
|
||||
The shared state cache (sstate-cache) as pointed to by
|
||||
<link linkend='var-SSTATE_DIR'><filename>SSTATE_DIR</filename></link> by default
|
||||
now has two-character subdirectories to prevent there being an issue with too
|
||||
The shared state cache (sstate-cache) as pointed to by
|
||||
<link linkend='var-SSTATE_DIR'><filename>SSTATE_DIR</filename></link> by default
|
||||
now has two-character subdirectories to prevent there being an issue with too
|
||||
many files in the same directory.
|
||||
Also, native sstate-cache packages will go into a subdirectory named using
|
||||
the distro ID string.
|
||||
If you copy the newly structured sstate-cache to a mirror location
|
||||
(either local or remote) and then point to it in
|
||||
Also, native sstate-cache packages will go into a subdirectory named using
|
||||
the distro ID string.
|
||||
If you copy the newly structured sstate-cache to a mirror location
|
||||
(either local or remote) and then point to it in
|
||||
<link linkend='var-SSTATE_MIRRORS'><filename>SSTATE_MIRRORS</filename></link>,
|
||||
you need to append "PATH" to the end of the mirror URL so that
|
||||
the path used by BitBake before the mirror substitution is
|
||||
appended to the path used to access the mirror.
|
||||
you need to append "PATH" to the end of the mirror URL so that
|
||||
the path used by BitBake before the mirror substitution is
|
||||
appended to the path used to access the mirror.
|
||||
Here is an example:
|
||||
<literallayout class='monospaced'>
|
||||
SSTATE_MIRRORS = "file://.* http://someserver.tld/share/sstate/PATH"
|
||||
@@ -55,14 +55,14 @@
|
||||
<title>bblayers.conf</title>
|
||||
|
||||
<para>
|
||||
The <filename>meta-yocto</filename> layer has been split into
|
||||
two parts: <filename>meta-yocto</filename> and
|
||||
<filename>meta-yocto-bsp</filename>, corresponding to the
|
||||
The <filename>meta-yocto</filename> layer has been split into
|
||||
two parts: <filename>meta-yocto</filename> and
|
||||
<filename>meta-yocto-bsp</filename>, corresponding to the
|
||||
Poky reference distro configuration and the reference
|
||||
hardware Board Support Packages (BSPs), respectively.
|
||||
When running BitBake or Hob for the first time after upgrading,
|
||||
your <filename>conf/bblayers.conf</filename> file will be
|
||||
updated to handle this change and you will be asked to
|
||||
hardware Board Support Packages (BSPs), respectively.
|
||||
When running BitBake or Hob for the first time after upgrading,
|
||||
your <filename>conf/bblayers.conf</filename> file will be
|
||||
updated to handle this change and you will be asked to
|
||||
re-run/restart for the changes to take effect.
|
||||
</para>
|
||||
</section>
|
||||
@@ -87,16 +87,16 @@
|
||||
<title>Python Function Whitespace</title>
|
||||
|
||||
<para>
|
||||
All Python functions must now use four spaces for indentation.
|
||||
All Python functions must now use four spaces for indentation.
|
||||
Previously, an inconsistent mix of spaces and tabs existed,
|
||||
which made extending these functions using
|
||||
which made extending these functions using
|
||||
<filename>_append</filename> or <filename>_prepend</filename>
|
||||
complicated given that Python treats whitespace as
|
||||
syntactically significant.
|
||||
complicated given that Python treats whitespace as
|
||||
syntactically significant.
|
||||
If you are defining or extending any Python functions (e.g.
|
||||
<filename>populate_packages</filename>, <filename>do_unpack</filename>,
|
||||
<filename>do_patch</filename> and so forth) in custom recipes
|
||||
or classes, you need to ensure you are using consistent
|
||||
or classes, you need to ensure you are using consistent
|
||||
four-space indentation.
|
||||
</para>
|
||||
</section>
|
||||
@@ -105,7 +105,7 @@
|
||||
<title>proto= in SRC_URI</title>
|
||||
|
||||
<para>
|
||||
Any use of <filename>proto=</filename> in
|
||||
Any use of <filename>proto=</filename> in
|
||||
<link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
|
||||
needs to be changed to <filename>protocol=</filename>.
|
||||
In particular, this applies to the following URIs:
|
||||
@@ -125,11 +125,11 @@
|
||||
|
||||
<para>
|
||||
The suffix <filename>nativesdk</filename> is now implemented
|
||||
as a prefix, which simplifies a lot of the packaging code for
|
||||
<filename>nativesdk</filename> recipes.
|
||||
All custom <filename>nativesdk</filename> recipes and any
|
||||
references need to be updated to use
|
||||
<filename>nativesdk-*</filename> instead of
|
||||
as a prefix, which simplifies a lot of the packaging code for
|
||||
<filename>nativesdk</filename> recipes.
|
||||
All custom <filename>nativesdk</filename> recipes and any
|
||||
references need to be updated to use
|
||||
<filename>nativesdk-*</filename> instead of
|
||||
<filename>*-nativesdk</filename>.
|
||||
</para>
|
||||
</section>
|
||||
@@ -138,25 +138,25 @@
|
||||
<title>Task Recipes</title>
|
||||
|
||||
<para>
|
||||
"Task" recipes are now known as "Package groups" and have
|
||||
been renamed from <filename>task-*.bb</filename> to
|
||||
<filename>packagegroup-*.bb</filename>.
|
||||
"Task" recipes are now known as "Package groups" and have
|
||||
been renamed from <filename>task-*.bb</filename> to
|
||||
<filename>packagegroup-*.bb</filename>.
|
||||
Existing references to the previous <filename>task-*</filename>
|
||||
names should work in most cases as there is an automatic
|
||||
names should work in most cases as there is an automatic
|
||||
upgrade path for most packages.
|
||||
However, you should update references in your own recipes and
|
||||
configurations as they could be removed in future releases.
|
||||
However, you should update references in your own recipes and
|
||||
configurations as they could be removed in future releases.
|
||||
You should also rename any custom <filename>task-*</filename>
|
||||
recipes to <filename>packagegroup-*</filename>, and change
|
||||
them to inherit <filename>packagegroup</filename> instead of
|
||||
<filename>task</filename>, as well as taking the opportunity
|
||||
to remove anything now handled by
|
||||
recipes to <filename>packagegroup-*</filename>, and change
|
||||
them to inherit <filename>packagegroup</filename> instead of
|
||||
<filename>task</filename>, as well as taking the opportunity
|
||||
to remove anything now handled by
|
||||
<filename>packagegroup.bbclass</filename>, such as providing
|
||||
<filename>-dev</filename> and <filename>-dbg</filename>
|
||||
packages, setting
|
||||
<link linkend='var-LIC_FILES_CHKSUM'><filename>LIC_FILES_CHKSUM</filename></link>,
|
||||
packages, setting
|
||||
<link linkend='var-LIC_FILES_CHKSUM'><filename>LIC_FILES_CHKSUM</filename></link>,
|
||||
and so forth.
|
||||
See the
|
||||
See the
|
||||
"<link linkend='ref-classes-packagegroup'>Package Groups - packagegroup.bbclass</link>"
|
||||
section for further details.
|
||||
</para>
|
||||
@@ -166,13 +166,13 @@
|
||||
<title>IMAGE_FEATURES</title>
|
||||
|
||||
<para>
|
||||
Image recipes that previously included "apps-console-core"
|
||||
Image recipes that previously included "apps-console-core"
|
||||
in <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>
|
||||
should now include "splash" instead to enable the boot-up
|
||||
should now include "splash" instead to enable the boot-up
|
||||
splash screen.
|
||||
Retaining "apps-console-core" will still include the splash
|
||||
Retaining "apps-console-core" will still include the splash
|
||||
screen generates a warning.
|
||||
The "apps-x11-core" and "apps-x11-games"
|
||||
The "apps-x11-core" and "apps-x11-games"
|
||||
<filename>IMAGE_FEATURES</filename> features have been removed.
|
||||
</para>
|
||||
</section>
|
||||
@@ -181,55 +181,55 @@
|
||||
<title>Removed Recipes</title>
|
||||
|
||||
<para>
|
||||
The following recipes have been removed.
|
||||
For most of them, it is unlikely that you would have any
|
||||
The following recipes have been removed.
|
||||
For most of them, it is unlikely that you would have any
|
||||
references to them in your own metadata.
|
||||
However, you should check your metadata against this list to be sure:
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis><filename>libx11-trim</filename></emphasis>:
|
||||
Replaced by <filename>libx11</filename>, which has a negligible
|
||||
<listitem><para><emphasis><filename>libx11-trim</filename></emphasis>:
|
||||
Replaced by <filename>libx11</filename>, which has a negligible
|
||||
size difference with modern Xorg.</para></listitem>
|
||||
<listitem><para><emphasis><filename>xserver-xorg-lite</filename></emphasis>:
|
||||
Use <filename>xserver-xorg</filename>, which has a negligible
|
||||
<listitem><para><emphasis><filename>xserver-xorg-lite</filename></emphasis>:
|
||||
Use <filename>xserver-xorg</filename>, which has a negligible
|
||||
size difference when DRI and GLX modules are not installed.</para></listitem>
|
||||
<listitem><para><emphasis><filename>xserver-kdrive</filename></emphasis>:
|
||||
<listitem><para><emphasis><filename>xserver-kdrive</filename></emphasis>:
|
||||
Effectively unmaintained for many years.</para></listitem>
|
||||
<listitem><para><emphasis><filename>mesa-xlib</filename></emphasis>:
|
||||
<listitem><para><emphasis><filename>mesa-xlib</filename></emphasis>:
|
||||
No longer serves any purpose.</para></listitem>
|
||||
<listitem><para><emphasis><filename>galago</filename></emphasis>:
|
||||
<listitem><para><emphasis><filename>galago</filename></emphasis>:
|
||||
Replaced by telepathy.</para></listitem>
|
||||
<listitem><para><emphasis><filename>gail</filename></emphasis>:
|
||||
<listitem><para><emphasis><filename>gail</filename></emphasis>:
|
||||
Functionality was integrated into GTK+ 2.13.</para></listitem>
|
||||
<listitem><para><emphasis><filename>eggdbus</filename></emphasis>:
|
||||
<listitem><para><emphasis><filename>eggdbus</filename></emphasis>:
|
||||
No longer needed.</para></listitem>
|
||||
<listitem><para><emphasis><filename>gcc-*-intermediate</filename></emphasis>:
|
||||
The build has been restructured to avoid the need for
|
||||
<listitem><para><emphasis><filename>gcc-*-intermediate</filename></emphasis>:
|
||||
The build has been restructured to avoid the need for
|
||||
this step.</para></listitem>
|
||||
<listitem><para><emphasis><filename>libgsmd</filename></emphasis>:
|
||||
<listitem><para><emphasis><filename>libgsmd</filename></emphasis>:
|
||||
Unmaintained for many years.
|
||||
Functionality now provided by
|
||||
Functionality now provided by
|
||||
<filename>ofono</filename> instead.</para></listitem>
|
||||
<listitem><para><emphasis>contacts, dates, tasks, eds-tools</emphasis>:
|
||||
<listitem><para><emphasis>contacts, dates, tasks, eds-tools</emphasis>:
|
||||
Largely unmaintained PIM application suite.
|
||||
It has been moved to <filename>meta-gnome</filename>
|
||||
in <filename>meta-openembedded</filename>.</para></listitem>
|
||||
</itemizedlist>
|
||||
In addition to the previously listed changes, the
|
||||
In addition to the previously listed changes, the
|
||||
<filename>meta-demoapps</filename> directory has also been removed
|
||||
because the recipes in it were not being maintained and many
|
||||
because the recipes in it were not being maintained and many
|
||||
had become obsolete or broken.
|
||||
Additionally, these recipes were not parsed in the default configuration.
|
||||
Many of these recipes are already provided in an updated and
|
||||
maintained form within OpenEmbedded community layers such as
|
||||
Many of these recipes are already provided in an updated and
|
||||
maintained form within OpenEmbedded community layers such as
|
||||
<filename>meta-oe</filename> and <filename>meta-gnome</filename>.
|
||||
For the remainder, you can now find them in the
|
||||
<filename>meta-extras</filename> repository, which is in the
|
||||
For the remainder, you can now find them in the
|
||||
<filename>meta-extras</filename> repository, which is in the
|
||||
Yocto Project source repositories.
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
</chapter>
|
||||
<!--
|
||||
vim: expandtab tw=80 ts=4
|
||||
<!--
|
||||
vim: expandtab tw=80 ts=4
|
||||
-->
|
||||
|
||||
@@ -2,18 +2,18 @@
|
||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
|
||||
[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
|
||||
|
||||
<book id='poky-ref-manual' lang='en'
|
||||
<book id='poky-ref-manual' lang='en'
|
||||
xmlns:xi="http://www.w3.org/2003/XInclude"
|
||||
xmlns="http://docbook.org/ns/docbook"
|
||||
>
|
||||
<bookinfo>
|
||||
|
||||
|
||||
<mediaobject>
|
||||
<imageobject>
|
||||
<imagedata fileref='figures/poky-title.png'
|
||||
format='SVG'
|
||||
<imagedata fileref='figures/poky-title.png'
|
||||
format='SVG'
|
||||
align='left' scalefit='1' width='100%'/>
|
||||
</imageobject>
|
||||
</imageobject>
|
||||
</mediaobject>
|
||||
|
||||
<title></title>
|
||||
@@ -74,7 +74,7 @@
|
||||
|
||||
<legalnotice>
|
||||
<para>
|
||||
Permission is granted to copy, distribute and/or modify this document under
|
||||
Permission is granted to copy, distribute and/or modify this document under
|
||||
the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-sa/2.0/uk/">Creative Commons Attribution-Share Alike 2.0 UK: England & Wales</ulink> as published by Creative Commons.
|
||||
</para>
|
||||
<note>
|
||||
@@ -116,10 +116,10 @@
|
||||
|
||||
<!-- <index id='index'>
|
||||
<title>Index</title>
|
||||
</index>
|
||||
</index>
|
||||
-->
|
||||
|
||||
</book>
|
||||
<!--
|
||||
vim: expandtab tw=80 ts=4
|
||||
<!--
|
||||
vim: expandtab tw=80 ts=4
|
||||
-->
|
||||
|
||||
@@ -14,15 +14,15 @@
|
||||
$ bitbake core-image-sato
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
|
||||
<para>
|
||||
This chapter provides an overview of what happens behind the scenes from BitBake's perspective.
|
||||
</para>
|
||||
|
||||
<note>
|
||||
BitBake strives to be a generic "task" executor that is capable of handling complex dependency relationships.
|
||||
As such, it has no real knowledge of what the tasks being executed actually do.
|
||||
BitBake just considers a list of tasks with dependencies and handles metadata
|
||||
BitBake strives to be a generic "task" executor that is capable of handling complex dependency relationships.
|
||||
As such, it has no real knowledge of what the tasks being executed actually do.
|
||||
BitBake just considers a list of tasks with dependencies and handles metadata
|
||||
that consists of variables in a certain format that get passed to the tasks.
|
||||
</note>
|
||||
|
||||
@@ -30,85 +30,85 @@
|
||||
<title>Parsing</title>
|
||||
|
||||
<para>
|
||||
BitBake parses configuration files, classes, and <filename>.bb</filename> files.
|
||||
BitBake parses configuration files, classes, and <filename>.bb</filename> files.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The first thing BitBake does is look for the <filename>bitbake.conf</filename> file.
|
||||
This file resides in the
|
||||
This file resides in the
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
|
||||
within the <filename>meta/conf/</filename> directory.
|
||||
BitBake finds it by examining its
|
||||
<link linkend='var-BBPATH'><filename>BBPATH</filename></link> environment
|
||||
variable and looking for the <filename>meta/conf/</filename>
|
||||
BitBake finds it by examining its
|
||||
<link linkend='var-BBPATH'><filename>BBPATH</filename></link> environment
|
||||
variable and looking for the <filename>meta/conf/</filename>
|
||||
directory.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The <filename>bitbake.conf</filename> file lists other configuration
|
||||
files to include from a <filename>conf/</filename>
|
||||
directory below the directories listed in <filename>BBPATH</filename>.
|
||||
In general, the most important configuration file from a user's perspective
|
||||
is <filename>local.conf</filename>, which contains a user's customized
|
||||
settings for the OpenEmbedded build environment.
|
||||
Other notable configuration files are the distribution
|
||||
configuration file (set by the
|
||||
<filename><link linkend='var-DISTRO'>DISTRO</link></filename> variable)
|
||||
and the machine configuration file
|
||||
(set by the
|
||||
<filename><link linkend='var-MACHINE'>MACHINE</link></filename> variable).
|
||||
The <filename>DISTRO</filename> and <filename>MACHINE</filename> BitBake environment
|
||||
variables are both usually set in
|
||||
the <filename>local.conf</filename> file.
|
||||
Valid distribution
|
||||
configuration files are available in the <filename>meta/conf/distro/</filename> directory
|
||||
and valid machine configuration
|
||||
files in the <filename>meta/conf/machine/</filename> directory.
|
||||
Within the <filename>meta/conf/machine/include/</filename>
|
||||
directory are various <filename>tune-*.inc</filename> configuration files that provide common
|
||||
The <filename>bitbake.conf</filename> file lists other configuration
|
||||
files to include from a <filename>conf/</filename>
|
||||
directory below the directories listed in <filename>BBPATH</filename>.
|
||||
In general, the most important configuration file from a user's perspective
|
||||
is <filename>local.conf</filename>, which contains a user's customized
|
||||
settings for the OpenEmbedded build environment.
|
||||
Other notable configuration files are the distribution
|
||||
configuration file (set by the
|
||||
<filename><link linkend='var-DISTRO'>DISTRO</link></filename> variable)
|
||||
and the machine configuration file
|
||||
(set by the
|
||||
<filename><link linkend='var-MACHINE'>MACHINE</link></filename> variable).
|
||||
The <filename>DISTRO</filename> and <filename>MACHINE</filename> BitBake environment
|
||||
variables are both usually set in
|
||||
the <filename>local.conf</filename> file.
|
||||
Valid distribution
|
||||
configuration files are available in the <filename>meta/conf/distro/</filename> directory
|
||||
and valid machine configuration
|
||||
files in the <filename>meta/conf/machine/</filename> directory.
|
||||
Within the <filename>meta/conf/machine/include/</filename>
|
||||
directory are various <filename>tune-*.inc</filename> configuration files that provide common
|
||||
"tuning" settings specific to and shared between particular architectures and machines.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
After the parsing of the configuration files, some standard classes are included.
|
||||
After the parsing of the configuration files, some standard classes are included.
|
||||
The <filename>base.bbclass</filename> file is always included.
|
||||
Other classes that are specified in the configuration using the
|
||||
Other classes that are specified in the configuration using the
|
||||
<filename><link linkend='var-INHERIT'>INHERIT</link></filename>
|
||||
variable are also included.
|
||||
Class files are searched for in a <filename>classes</filename> subdirectory
|
||||
variable are also included.
|
||||
Class files are searched for in a <filename>classes</filename> subdirectory
|
||||
under the paths in <filename>BBPATH</filename> in the same way as
|
||||
configuration files.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
After classes are included, the variable
|
||||
<filename><link linkend='var-BBFILES'>BBFILES</link></filename>
|
||||
After classes are included, the variable
|
||||
<filename><link linkend='var-BBFILES'>BBFILES</link></filename>
|
||||
is set, usually in
|
||||
<filename>local.conf</filename>, and defines the list of places to search for
|
||||
<filename>.bb</filename> files.
|
||||
By default, the <filename>BBFILES</filename> variable specifies the
|
||||
<filename>meta/recipes-*/</filename> directory within Poky.
|
||||
Adding extra content to <filename>BBFILES</filename> is best achieved through the use of
|
||||
BitBake layers as described in the
|
||||
"<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and
|
||||
<filename>local.conf</filename>, and defines the list of places to search for
|
||||
<filename>.bb</filename> files.
|
||||
By default, the <filename>BBFILES</filename> variable specifies the
|
||||
<filename>meta/recipes-*/</filename> directory within Poky.
|
||||
Adding extra content to <filename>BBFILES</filename> is best achieved through the use of
|
||||
BitBake layers as described in the
|
||||
"<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and
|
||||
Creating Layers</ulink>" section of the Yocto Project Development Manual.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
BitBake parses each <filename>.bb</filename> file in <filename>BBFILES</filename> and
|
||||
stores the values of various variables.
|
||||
In summary, for each <filename>.bb</filename>
|
||||
file the configuration plus the base class of variables are set, followed
|
||||
by the data in the <filename>.bb</filename> file
|
||||
BitBake parses each <filename>.bb</filename> file in <filename>BBFILES</filename> and
|
||||
stores the values of various variables.
|
||||
In summary, for each <filename>.bb</filename>
|
||||
file the configuration plus the base class of variables are set, followed
|
||||
by the data in the <filename>.bb</filename> file
|
||||
itself, followed by any inherit commands that
|
||||
<filename>.bb</filename> file might contain.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Because parsing <filename>.bb</filename> files is a time
|
||||
consuming process, a cache is kept to speed up subsequent parsing.
|
||||
This cache is invalid if the timestamp of the <filename>.bb</filename>
|
||||
file itself changes, or if the timestamps of any of the include,
|
||||
Because parsing <filename>.bb</filename> files is a time
|
||||
consuming process, a cache is kept to speed up subsequent parsing.
|
||||
This cache is invalid if the timestamp of the <filename>.bb</filename>
|
||||
file itself changes, or if the timestamps of any of the include,
|
||||
configuration or class files the <filename>.bb</filename>
|
||||
file depends on changes.
|
||||
</para>
|
||||
@@ -118,22 +118,22 @@
|
||||
<title>Preferences and Providers</title>
|
||||
|
||||
<para>
|
||||
Once all the <filename>.bb</filename> files have been
|
||||
Once all the <filename>.bb</filename> files have been
|
||||
parsed, BitBake starts to build the target (<filename>core-image-sato</filename>
|
||||
in the previous section's example) and looks for providers of that target.
|
||||
Once a provider is selected, BitBake resolves all the dependencies for
|
||||
the target.
|
||||
In the case of <filename>core-image-sato</filename>, it would lead to
|
||||
<filename>packagegroup-core-x11-sato</filename>,
|
||||
which in turn leads to recipes like <filename>matchbox-terminal</filename>,
|
||||
Once a provider is selected, BitBake resolves all the dependencies for
|
||||
the target.
|
||||
In the case of <filename>core-image-sato</filename>, it would lead to
|
||||
<filename>packagegroup-core-x11-sato</filename>,
|
||||
which in turn leads to recipes like <filename>matchbox-terminal</filename>,
|
||||
<filename>pcmanfm</filename> and <filename>gthumb</filename>.
|
||||
These recipes in turn depend on <filename>eglibc</filename> and the toolchain.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Sometimes a target might have multiple providers.
|
||||
A common example is "virtual/kernel", which is provided by each kernel package.
|
||||
Each machine often selects the best kernel provider by using a line similar to the
|
||||
A common example is "virtual/kernel", which is provided by each kernel package.
|
||||
Each machine often selects the best kernel provider by using a line similar to the
|
||||
following in the machine configuration file:
|
||||
</para>
|
||||
|
||||
@@ -142,25 +142,25 @@
|
||||
</literallayout>
|
||||
|
||||
<para>
|
||||
The default <filename><link linkend='var-PREFERRED_PROVIDER'>PREFERRED_PROVIDER</link></filename>
|
||||
The default <filename><link linkend='var-PREFERRED_PROVIDER'>PREFERRED_PROVIDER</link></filename>
|
||||
is the provider with the same name as the target.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Understanding how providers are chosen is made complicated by the fact
|
||||
that multiple versions might exist.
|
||||
that multiple versions might exist.
|
||||
BitBake defaults to the highest version of a provider.
|
||||
Version comparisons are made using the same method as Debian.
|
||||
Version comparisons are made using the same method as Debian.
|
||||
You can use the
|
||||
<filename><link linkend='var-PREFERRED_VERSION'>PREFERRED_VERSION</link></filename>
|
||||
variable to specify a particular version (usually in the distro configuration).
|
||||
You can influence the order by using the
|
||||
<filename><link linkend='var-DEFAULT_PREFERENCE'>DEFAULT_PREFERENCE</link></filename>
|
||||
variable.
|
||||
By default, files have a preference of "0".
|
||||
Setting the <filename>DEFAULT_PREFERENCE</filename> to "-1" makes the
|
||||
You can influence the order by using the
|
||||
<filename><link linkend='var-DEFAULT_PREFERENCE'>DEFAULT_PREFERENCE</link></filename>
|
||||
variable.
|
||||
By default, files have a preference of "0".
|
||||
Setting the <filename>DEFAULT_PREFERENCE</filename> to "-1" makes the
|
||||
package unlikely to be used unless it is explicitly referenced.
|
||||
Setting the <filename>DEFAULT_PREFERENCE</filename> to "1" makes it likely the package is used.
|
||||
Setting the <filename>DEFAULT_PREFERENCE</filename> to "1" makes it likely the package is used.
|
||||
<filename>PREFERRED_VERSION</filename> overrides any <filename>DEFAULT_PREFERENCE</filename> setting.
|
||||
<filename>DEFAULT_PREFERENCE</filename> is often used to mark newer and more experimental package
|
||||
versions until they have undergone sufficient testing to be considered stable.
|
||||
@@ -175,23 +175,23 @@
|
||||
<title>Dependencies</title>
|
||||
|
||||
<para>
|
||||
Each target BitBake builds consists of multiple tasks such as
|
||||
<filename>fetch</filename>, <filename>unpack</filename>,
|
||||
<filename>patch</filename>, <filename>configure</filename>,
|
||||
and <filename>compile</filename>.
|
||||
For best performance on multi-core systems, BitBake considers each task as an independent
|
||||
entity with its own set of dependencies.
|
||||
Each target BitBake builds consists of multiple tasks such as
|
||||
<filename>fetch</filename>, <filename>unpack</filename>,
|
||||
<filename>patch</filename>, <filename>configure</filename>,
|
||||
and <filename>compile</filename>.
|
||||
For best performance on multi-core systems, BitBake considers each task as an independent
|
||||
entity with its own set of dependencies.
|
||||
</para>
|
||||
|
||||
|
||||
<para>
|
||||
Dependencies are defined through several variables.
|
||||
You can find information about variables BitBake uses in the BitBake documentation,
|
||||
which is found in the <filename>bitbake/doc/manual</filename> directory within the
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
|
||||
At a basic level, it is sufficient to know that BitBake uses the
|
||||
<filename><link linkend='var-DEPENDS'>DEPENDS</link></filename> and
|
||||
<filename><link linkend='var-RDEPENDS'>RDEPENDS</link></filename> variables when
|
||||
calculating dependencies.
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
|
||||
At a basic level, it is sufficient to know that BitBake uses the
|
||||
<filename><link linkend='var-DEPENDS'>DEPENDS</link></filename> and
|
||||
<filename><link linkend='var-RDEPENDS'>RDEPENDS</link></filename> variables when
|
||||
calculating dependencies.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@@ -199,40 +199,40 @@
|
||||
<title>The Task List</title>
|
||||
|
||||
<para>
|
||||
Based on the generated list of providers and the dependency information,
|
||||
BitBake can now calculate exactly what tasks it needs to run and in what
|
||||
order it needs to run them.
|
||||
The build now starts with BitBake forking off threads up to the limit set in the
|
||||
Based on the generated list of providers and the dependency information,
|
||||
BitBake can now calculate exactly what tasks it needs to run and in what
|
||||
order it needs to run them.
|
||||
The build now starts with BitBake forking off threads up to the limit set in the
|
||||
<filename><link linkend='var-BB_NUMBER_THREADS'>BB_NUMBER_THREADS</link></filename> variable.
|
||||
BitBake continues to fork threads as long as there are tasks ready to run,
|
||||
those tasks have all their dependencies met, and the thread threshold has not been
|
||||
those tasks have all their dependencies met, and the thread threshold has not been
|
||||
exceeded.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
It is worth noting that you can greatly speed up the build time by properly setting
|
||||
the <filename>BB_NUMBER_THREADS</filename> variable.
|
||||
It is worth noting that you can greatly speed up the build time by properly setting
|
||||
the <filename>BB_NUMBER_THREADS</filename> variable.
|
||||
See the
|
||||
"<ulink url='&YOCTO_DOCS_QS_URL;#building-image'>Building an Image</ulink>"
|
||||
section in the Yocto Project Quick Start for more information.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
As each task completes, a timestamp is written to the directory specified by the
|
||||
As each task completes, a timestamp is written to the directory specified by the
|
||||
<filename><link linkend='var-STAMP'>STAMP</link></filename> variable (usually
|
||||
<filename>build/tmp/stamps/*/</filename>).
|
||||
<filename>build/tmp/stamps/*/</filename>).
|
||||
On subsequent runs, BitBake looks at the <filename>/build/tmp/stamps</filename>
|
||||
directory and does not rerun
|
||||
tasks that are already completed unless a timestamp is found to be invalid.
|
||||
Currently, invalid timestamps are only considered on a per
|
||||
tasks that are already completed unless a timestamp is found to be invalid.
|
||||
Currently, invalid timestamps are only considered on a per
|
||||
<filename>.bb</filename> file basis.
|
||||
So, for example, if the configure stamp has a timestamp greater than the
|
||||
So, for example, if the configure stamp has a timestamp greater than the
|
||||
compile timestamp for a given target, then the compile task would rerun.
|
||||
Running the compile task again, however, has no effect on other providers
|
||||
that depend on that target.
|
||||
This behavior could change or become configurable in future versions of BitBake.
|
||||
Running the compile task again, however, has no effect on other providers
|
||||
that depend on that target.
|
||||
This behavior could change or become configurable in future versions of BitBake.
|
||||
</para>
|
||||
|
||||
|
||||
<note>
|
||||
Some tasks are marked as "nostamp" tasks.
|
||||
No timestamp file is created when these tasks are run.
|
||||
@@ -245,52 +245,52 @@
|
||||
|
||||
<para>
|
||||
Tasks can either be a shell task or a Python task.
|
||||
For shell tasks, BitBake writes a shell script to
|
||||
<filename>${WORKDIR}/temp/run.do_taskname.pid</filename> and then executes the script.
|
||||
The generated shell script contains all the exported variables, and the shell functions
|
||||
with all variables expanded.
|
||||
For shell tasks, BitBake writes a shell script to
|
||||
<filename>${WORKDIR}/temp/run.do_taskname.pid</filename> and then executes the script.
|
||||
The generated shell script contains all the exported variables, and the shell functions
|
||||
with all variables expanded.
|
||||
Output from the shell script goes to the file <filename>${WORKDIR}/temp/log.do_taskname.pid</filename>.
|
||||
Looking at the expanded shell functions in the run file and the output in the log files
|
||||
Looking at the expanded shell functions in the run file and the output in the log files
|
||||
is a useful debugging technique.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For Python tasks, BitBake executes the task internally and logs information to the
|
||||
controlling terminal.
|
||||
Future versions of BitBake will write the functions to files similar to the way
|
||||
For Python tasks, BitBake executes the task internally and logs information to the
|
||||
controlling terminal.
|
||||
Future versions of BitBake will write the functions to files similar to the way
|
||||
shell tasks are handled.
|
||||
Logging will be handled in way similar to shell tasks as well.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Once all the tasks have been completed BitBake exits.
|
||||
</para>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
When running a task, BitBake tightly controls the execution environment
|
||||
When running a task, BitBake tightly controls the execution environment
|
||||
of the build tasks to make sure unwanted contamination from the build machine
|
||||
cannot influence the build.
|
||||
Consequently, if you do want something to get passed into the build
|
||||
cannot influence the build.
|
||||
Consequently, if you do want something to get passed into the build
|
||||
task's environment, you must take a few steps:
|
||||
<orderedlist>
|
||||
<listitem><para>Tell BitBake to load what you want from the environment
|
||||
into the data store.
|
||||
into the data store.
|
||||
You can do so through the <filename>BB_ENV_EXTRAWHITE</filename>
|
||||
variable.
|
||||
For example, assume you want to prevent the build system from
|
||||
For example, assume you want to prevent the build system from
|
||||
accessing your <filename>$HOME/.ccache</filename> directory.
|
||||
The following command tells BitBake to load
|
||||
The following command tells BitBake to load
|
||||
<filename>CCACHE_DIR</filename> from the environment into the data
|
||||
store:
|
||||
<literallayout class='monospaced'>
|
||||
export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE CCACHE_DIR"
|
||||
export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE CCACHE_DIR"
|
||||
</literallayout></para></listitem>
|
||||
<listitem><para>Tell BitBake to export what you have loaded into the
|
||||
<listitem><para>Tell BitBake to export what you have loaded into the
|
||||
environment store to the task environment of every running task.
|
||||
Loading something from the environment into the data store
|
||||
(previous step) only makes it available in the datastore.
|
||||
(previous step) only makes it available in the datastore.
|
||||
To export it to the task environment of every running task,
|
||||
use a command similar to the following in your
|
||||
use a command similar to the following in your
|
||||
<filename>local.conf</filename> or distro configuration file:
|
||||
<literallayout class='monospaced'>
|
||||
export CCACHE_DIR
|
||||
@@ -301,8 +301,8 @@
|
||||
<note>
|
||||
A side effect of the previous steps is that BitBake records the variable
|
||||
as a dependency of the build process in things like the shared state
|
||||
checksums.
|
||||
If doing so results in unnecessary rebuilds of tasks, you can whitelist the
|
||||
checksums.
|
||||
If doing so results in unnecessary rebuilds of tasks, you can whitelist the
|
||||
variable so that the shared state code ignores the dependency when it creates
|
||||
checksums.
|
||||
For information on this process, see the <filename>BB_HASHBASE_WHITELIST</filename>
|
||||
@@ -383,38 +383,38 @@ Options:
|
||||
<title>Fetchers</title>
|
||||
|
||||
<para>
|
||||
BitBake also contains a set of "fetcher" modules that allow
|
||||
retrieval of source code from various types of sources.
|
||||
For example, BitBake can get source code from a disk with the metadata, from websites,
|
||||
from remote shell accounts or from Source Code Management (SCM) systems
|
||||
like <filename>cvs/subversion/git</filename>.
|
||||
BitBake also contains a set of "fetcher" modules that allow
|
||||
retrieval of source code from various types of sources.
|
||||
For example, BitBake can get source code from a disk with the metadata, from websites,
|
||||
from remote shell accounts or from Source Code Management (SCM) systems
|
||||
like <filename>cvs/subversion/git</filename>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Fetchers are usually triggered by entries in
|
||||
<filename><link linkend='var-SRC_URI'>SRC_URI</link></filename>.
|
||||
You can find information about the options and formats of entries for specific
|
||||
fetchers in the BitBake manual located in the
|
||||
<filename>bitbake/doc/manual</filename> directory of the
|
||||
Fetchers are usually triggered by entries in
|
||||
<filename><link linkend='var-SRC_URI'>SRC_URI</link></filename>.
|
||||
You can find information about the options and formats of entries for specific
|
||||
fetchers in the BitBake manual located in the
|
||||
<filename>bitbake/doc/manual</filename> directory of the
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
One useful feature for certain Source Code Manager (SCM) fetchers is the ability to
|
||||
"auto-update" when the upstream SCM changes version.
|
||||
One useful feature for certain Source Code Manager (SCM) fetchers is the ability to
|
||||
"auto-update" when the upstream SCM changes version.
|
||||
Since this ability requires certain functionality from the SCM, not all
|
||||
systems support it.
|
||||
Currently Subversion, Bazaar and to a limited extent, Git support the ability to "auto-update".
|
||||
This feature works using the <filename><link linkend='var-SRCREV'>SRCREV</link></filename>
|
||||
variable.
|
||||
See the
|
||||
"<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-appdev-srcrev'>Using an External SCM</ulink>" section
|
||||
Currently Subversion, Bazaar and to a limited extent, Git support the ability to "auto-update".
|
||||
This feature works using the <filename><link linkend='var-SRCREV'>SRCREV</link></filename>
|
||||
variable.
|
||||
See the
|
||||
"<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-appdev-srcrev'>Using an External SCM</ulink>" section
|
||||
in the Yocto Project Development Manual for more information.
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
</chapter>
|
||||
<!--
|
||||
<!--
|
||||
vim: expandtab tw=80 ts=4 spell spelllang=en_gb
|
||||
-->
|
||||
|
||||
@@ -6,23 +6,23 @@
|
||||
<title>Classes</title>
|
||||
|
||||
<para>
|
||||
Class files are used to abstract common functionality and share it amongst multiple
|
||||
<filename>.bb</filename> files.
|
||||
Any metadata usually found in a <filename>.bb</filename> file 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
|
||||
Class files are used to abstract common functionality and share it amongst multiple
|
||||
<filename>.bb</filename> files.
|
||||
Any metadata usually found in a <filename>.bb</filename> file 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 BUILDDIR (e.g. <filename>build/</filename>)in the same way as
|
||||
<filename>.conf</filename> files in the <filename>conf</filename> directory.
|
||||
<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>
|
||||
In most cases inheriting the class is enough to enable its features, although
|
||||
for some classes you might need to set variables or override some of the
|
||||
In most cases inheriting the class is enough to enable its features, although
|
||||
for some classes you might need to set variables or override some of the
|
||||
default behaviour.
|
||||
</para>
|
||||
|
||||
@@ -30,14 +30,14 @@
|
||||
<title>The base class - <filename>base.bbclass</filename></title>
|
||||
|
||||
<para>
|
||||
The base class is special in that every <filename>.bb</filename>
|
||||
file inherits it automatically.
|
||||
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 <filename>autotools.bbclass</filename> or <filename>package.bbclass</filename>.
|
||||
The base class is special in that every <filename>.bb</filename>
|
||||
file inherits it automatically.
|
||||
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 <filename>autotools.bbclass</filename> or <filename>package.bbclass</filename>.
|
||||
The class also contains some commonly used functions such as <filename>oe_runmake</filename>.
|
||||
</para>
|
||||
</section>
|
||||
@@ -46,14 +46,14 @@
|
||||
<title>Autotooled Packages - <filename>autotools.bbclass</filename></title>
|
||||
|
||||
<para>
|
||||
Autotools (<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
|
||||
Autotools (<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
|
||||
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>
|
||||
@@ -62,19 +62,19 @@
|
||||
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
|
||||
<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
|
||||
<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 a DESTDIR option, which takes its value from the standard
|
||||
<listitem><para><filename>do_install</filename> ‐ runs <filename>make install</filename>
|
||||
and passes a DESTDIR option, which takes its value from the standard
|
||||
<filename><link linkend='var-DESTDIR'>DESTDIR</link></filename> variable.
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
@@ -85,28 +85,28 @@
|
||||
<title>Alternatives - <filename>update-alternatives.bbclass</filename></title>
|
||||
|
||||
<para>
|
||||
Several programs can fulfill the same or similar function and be 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.
|
||||
Several programs can fulfill the same or similar function and be 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
|
||||
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>
|
||||
Four variables control this class:
|
||||
<itemizedlist>
|
||||
<listitem><para><filename>ALTERNATIVE_NAME</filename> ‐ The name of the
|
||||
<listitem><para><filename>ALTERNATIVE_NAME</filename> ‐ The name of the
|
||||
binary that is replaced (<filename>ar</filename> in this example).</para></listitem>
|
||||
<listitem><para><filename>ALTERNATIVE_LINK</filename> ‐ The path to
|
||||
<listitem><para><filename>ALTERNATIVE_LINK</filename> ‐ The path to
|
||||
the resulting binary (<filename>/bin/ar</filename> in this example).</para></listitem>
|
||||
<listitem><para><filename>ALTERNATIVE_PATH</filename> ‐ The path to the
|
||||
<listitem><para><filename>ALTERNATIVE_PATH</filename> ‐ The path to the
|
||||
real binary (<filename>/usr/bin/ar.binutils</filename> in this example).</para></listitem>
|
||||
<listitem><para><filename>ALTERNATIVE_PRIORITY</filename> ‐ The priority of
|
||||
the binary.
|
||||
<listitem><para><filename>ALTERNATIVE_PRIORITY</filename> ‐ The priority of
|
||||
the binary.
|
||||
The version with the most features should have the highest priority.</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
@@ -120,12 +120,12 @@
|
||||
<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>,
|
||||
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.
|
||||
@@ -137,16 +137,16 @@
|
||||
|
||||
<para>
|
||||
Before <filename>pkg-config</filename> had become widespread, libraries shipped shell
|
||||
scripts to give information about the libraries and include paths needed
|
||||
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, BitBake installs such scripts into the
|
||||
<filename>sysroots/</filename> directory.
|
||||
<filename>sysroots/</filename> directory.
|
||||
BitBake also changes all paths to point into the <filename>sysroots/</filename>
|
||||
directory so all builds that use the script will use the correct
|
||||
directory so all builds that use the script will use the correct
|
||||
directories for the cross compiling layout.
|
||||
</para>
|
||||
</section>
|
||||
@@ -171,7 +171,7 @@
|
||||
|
||||
<para>
|
||||
During staging, BitBake installs <filename>pkg-config</filename> data into the
|
||||
<filename>sysroots/</filename> directory.
|
||||
<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>
|
||||
@@ -183,14 +183,14 @@
|
||||
<para>
|
||||
Many software licenses require that source files be provided along with the binaries.
|
||||
To simplify this process, two classes were created:
|
||||
<filename>src_distribute.bbclass</filename> and
|
||||
<filename>src_distribute.bbclass</filename> and
|
||||
<filename>src_distribute_local.bbclass</filename>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The results of these classes are <filename>tmp/deploy/source/</filename>
|
||||
subdirs with sources sorted by
|
||||
<filename><link linkend='var-LICENSE'>LICENSE</link></filename> field.
|
||||
The results of these classes are <filename>tmp/deploy/source/</filename>
|
||||
subdirs with sources sorted by
|
||||
<filename><link linkend='var-LICENSE'>LICENSE</link></filename> field.
|
||||
If recipes list few licenses (or have entries like "Bitstream Vera"),
|
||||
the source archive is placed in each license directory.
|
||||
</para>
|
||||
@@ -198,11 +198,11 @@
|
||||
<para>
|
||||
This class operates using three modes:
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>copy:</emphasis> Copies the files to the
|
||||
<listitem><para><emphasis>copy:</emphasis> Copies the files to the
|
||||
distribute directory.</para></listitem>
|
||||
<listitem><para><emphasis>symlink:</emphasis> Symlinks the files to the
|
||||
<listitem><para><emphasis>symlink:</emphasis> Symlinks the files to the
|
||||
distribute directory.</para></listitem>
|
||||
<listitem><para><emphasis>move+symlink:</emphasis> Moves the files into
|
||||
<listitem><para><emphasis>move+symlink:</emphasis> Moves the files into
|
||||
the distribute directory and then symlinks them back.</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
@@ -213,11 +213,11 @@
|
||||
|
||||
<para>
|
||||
Recipes for Perl modules are simple.
|
||||
These recipes usually only need to point to the source's archive and then inherit the
|
||||
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.
|
||||
</para>
|
||||
|
||||
|
||||
<para>
|
||||
Modules that use old <filename>Makefile.PL</filename>-based build system require
|
||||
<filename>cpan.bbclass</filename> in their recipes.
|
||||
@@ -240,12 +240,12 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Extensions that use an Autotools-based build system require Autotools and
|
||||
Extensions that use an Autotools-based build system require Autotools and
|
||||
<filename>distutils</filename>-based <filename>.bbclasse</filename> files in their recipes.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Extensions that use <filename>distutils</filename>-based build systems require
|
||||
Extensions that use <filename>distutils</filename>-based build systems require
|
||||
<filename>distutils.bbclass</filename> in their recipes.
|
||||
</para>
|
||||
</section>
|
||||
@@ -254,10 +254,10 @@
|
||||
<title>Developer Shell - <filename>devshell.bbclass</filename></title>
|
||||
|
||||
<para>
|
||||
This class adds the <filename>devshell</filename> task.
|
||||
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
|
||||
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>
|
||||
@@ -266,16 +266,16 @@
|
||||
<title>Package Groups - <filename>packagegroup.bbclass</filename></title>
|
||||
|
||||
<para>
|
||||
This class sets default values appropriate for package group recipes (such as
|
||||
<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.
|
||||
This class sets default values appropriate for package group recipes (such as
|
||||
<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 Tasks</ulink>"
|
||||
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 Tasks</ulink>"
|
||||
section in the Yocto Project Development Manual.
|
||||
</para>
|
||||
<para>
|
||||
@@ -289,41 +289,41 @@
|
||||
|
||||
<para>
|
||||
The packaging classes add support for generating packages from a build's
|
||||
output.
|
||||
output.
|
||||
The core generic functionality is in <filename>package.bbclass</filename>.
|
||||
The code specific to particular package types is contained in various sub-classes such as
|
||||
<filename>package_deb.bbclass</filename>, <filename>package_ipk.bbclass</filename>,
|
||||
and <filename>package_rpm.bbclass</filename>.
|
||||
and <filename>package_rpm.bbclass</filename>.
|
||||
Most users will want one or more of these classes.
|
||||
</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 the <filename>local.conf</filename> configuration file,
|
||||
which is located in the <filename>conf</filename> folder of the
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
|
||||
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 the <filename>local.conf</filename> configuration file,
|
||||
which is located in the <filename>conf</filename> folder of the
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
|
||||
When defining the variable, you can specify one or more package types.
|
||||
Since images are generated from packages, a packaging class is
|
||||
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.
|
||||
The first class listed in this variable is used for image generation.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The package class you choose can affect build-time performance and has space
|
||||
ramifications.
|
||||
In general, building a package with RPM takes about thirty percent more time as
|
||||
In general, building a package with RPM takes about thirty percent more time as
|
||||
compared to using IPK to build the same or similar package.
|
||||
This comparison takes into account a complete build of the package with all
|
||||
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
|
||||
The reason for this discrepancy is because the RPM package manager creates and
|
||||
processes more metadata 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>
|
||||
Keep in mind, however, that RPM starts to provide more abilities than IPK due to
|
||||
Keep in mind, however, that 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
|
||||
@@ -332,12 +332,12 @@
|
||||
|
||||
<para>
|
||||
Another consideration for packages built using the RPM package manager is space.
|
||||
For smaller systems, the extra space used for the Berkley Database and the amount
|
||||
For smaller systems, the extra space used for the Berkley Database and the amount
|
||||
of metadata can affect your ability to do on-device upgrades.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
You can find additional information on the effects of the package class at these
|
||||
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'>
|
||||
@@ -352,24 +352,24 @@
|
||||
<title>Building kernels - <filename>kernel.bbclass</filename></title>
|
||||
|
||||
<para>
|
||||
This class handles building Linux kernels.
|
||||
The class contains code to build all kernel trees.
|
||||
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.
|
||||
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
|
||||
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>,
|
||||
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>
|
||||
@@ -378,9 +378,9 @@
|
||||
<title>Creating images - <filename>image.bbclass</filename> and <filename>rootfs*.bbclass</filename></title>
|
||||
|
||||
<para>
|
||||
These classes add support for creating images in several formats.
|
||||
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>
|
||||
one of the <filename>rootfs_*.bbclass</filename>
|
||||
files (depending on the package format used) and then the image is created.
|
||||
</para>
|
||||
|
||||
@@ -389,7 +389,7 @@
|
||||
variable controls the types of images to generate.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<para>
|
||||
The <filename><link linkend='var-IMAGE_INSTALL'>IMAGE_INSTALL</link></filename>
|
||||
variable controls the list of packages to install into the image.
|
||||
</para>
|
||||
@@ -399,11 +399,11 @@
|
||||
<title>Host System sanity checks - <filename>sanity.bbclass</filename></title>
|
||||
|
||||
<para>
|
||||
This class checks to see if prerequisite software is present so that
|
||||
users can be notified of potential problems that might affect their build.
|
||||
The class also performs basic user configuration checks from
|
||||
This class checks to see if prerequisite software is present 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.
|
||||
prevent common mistakes that cause build failures.
|
||||
Distribution policy usually determines whether to include this class.
|
||||
</para>
|
||||
</section>
|
||||
@@ -420,14 +420,14 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
You can configure the sanity checks so that specific test failures either raise a warning or
|
||||
an error message.
|
||||
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
|
||||
Subsequent failures for the same test would then generate an error message
|
||||
once the metadata is in a known and good condition.
|
||||
You use the <filename>WARN_QA</filename> variable to specify tests for which you
|
||||
You use the <filename>WARN_QA</filename> variable to specify tests for which you
|
||||
want to generate a warning message on failure.
|
||||
You use the <filename>ERROR_QA</filename> variable to specify tests for which you
|
||||
You use the <filename>ERROR_QA</filename> variable to specify tests for which you
|
||||
want to generate an error message on failure.
|
||||
</para>
|
||||
|
||||
@@ -436,41 +436,41 @@
|
||||
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.
|
||||
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
|
||||
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
|
||||
<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
|
||||
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.
|
||||
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
|
||||
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.
|
||||
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 it matches the target architecture.
|
||||
This test fails if any binaries don't match the type since there would be an
|
||||
incompatibility.
|
||||
Checks the Executable and Linkable Format (ELF) type, bit size and endianness
|
||||
of any binaries to ensure it matches 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>
|
||||
@@ -478,24 +478,24 @@
|
||||
<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
|
||||
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
|
||||
<filename>TMPDIR/WORKDIR</filename> paths.
|
||||
Any <filename>.pc</filename> file containing these paths is incorrect
|
||||
since <filename>pkg-config</filename> itself adds the correct sysroot prefix
|
||||
Checks <filename>.pc</filename> files for any
|
||||
<filename>TMPDIR/WORKDIR</filename> 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>la:</filename></emphasis>
|
||||
Checks <filename>.la</filename> files for any <filename>TMPDIR</filename>
|
||||
paths.
|
||||
Any <filename>.la</filename> file continaing these paths is incorrect since
|
||||
<filename>libtool</filename> adds the correct sysroot prefix when using the
|
||||
paths.
|
||||
Any <filename>.la</filename> file continaing 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
|
||||
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>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
@@ -511,17 +511,17 @@
|
||||
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
|
||||
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>
|
||||
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>
|
||||
|
||||
@@ -534,14 +534,14 @@
|
||||
<title>Adding Users - <filename>useradd.bbclass</filename></title>
|
||||
|
||||
<para>
|
||||
If you have packages that install files that are owned by custom users or groups,
|
||||
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>
|
||||
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 exmample that shows how to add three
|
||||
provides a simple exmample 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
|
||||
See the <filename>useradd-example.bb</filename> for more information on how to
|
||||
use this class.
|
||||
</para>
|
||||
</section>
|
||||
@@ -550,33 +550,33 @@
|
||||
<title>Using External Source - <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.
|
||||
You can use this class to build software from source code that is external to the
|
||||
OpenEmbedded build system.
|
||||
In other words, your source code resides in an external tree outside of the Yocto Project.
|
||||
Building software from an external source tree means that the normal fetch, unpack, and
|
||||
Building software from an external source tree means that the normal fetch, unpack, and
|
||||
patch process is not used.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To use the class, you need to define the
|
||||
<link linkend='var-S'><filename>S</filename></link> variable to point to the directory that contains the source files.
|
||||
To use the class, you need to define the
|
||||
<link linkend='var-S'><filename>S</filename></link> variable to point to the directory that contains the source files.
|
||||
You also need to have your recipe inherit the <filename>externalsrc.bbclass</filename> class.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
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
|
||||
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
|
||||
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-WORKDIR'><filename>WORKDIR</filename></link>,
|
||||
<link linkend='var-BPN'><filename>BPN</filename></link>,
|
||||
<link linkend='var-PV'><filename>PV</filename></link>,
|
||||
<link linkend='var-S'><filename>S</filename></link>, and
|
||||
<link linkend='var-S'><filename>S</filename></link>, and
|
||||
<link linkend='var-B'><filename>B</filename></link> for more information.
|
||||
</para>
|
||||
|
||||
@@ -584,26 +584,26 @@
|
||||
You can build object files in the external tree by setting the
|
||||
<filename>B</filename> variable equal to <filename>"${S}"</filename>.
|
||||
However, this practice does not work well if you use the source for more than one variant
|
||||
(i.e., "natives" such as <filename>quilt-native</filename>,
|
||||
(i.e., "natives" such as <filename>quilt-native</filename>,
|
||||
or "crosses" such as <filename>gcc-cross</filename>).
|
||||
So, be sure there are no "native", "cross", or "multilib" variants of the recipe.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If you do want to build different variants of a recipe, you can use the
|
||||
<link linkend='var-BBCLASSEXTEND'><filename>BBCLASSEXTEND</filename></link> variable.
|
||||
When you do, the <link linkend='var-B'><filename>B</filename></link> variable must support the
|
||||
If you do want to build different variants of a recipe, you can use the
|
||||
<link linkend='var-BBCLASSEXTEND'><filename>BBCLASSEXTEND</filename></link> variable.
|
||||
When you do, the <link linkend='var-B'><filename>B</filename></link> variable must support the
|
||||
recipe's ability to build variants in different working directories.
|
||||
Most autotools-based recipes support separating these directories.
|
||||
The OpenEmbedded build system defaults to using separate directories for <filename>gcc</filename>
|
||||
and some kernel recipes.
|
||||
Alternatively, you can make sure that separate recipes exist that each
|
||||
Alternatively, you can make sure that separate recipes exist that each
|
||||
use the <filename>BBCLASSEXTEND</filename> variable to build each variant.
|
||||
The separate recipes can inherit a single target recipe.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For information on how to use this class, see the
|
||||
For information on how to use this class, 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>
|
||||
@@ -613,12 +613,12 @@
|
||||
<title>Other Classes</title>
|
||||
|
||||
<para>
|
||||
Thus far, this chapter has discussed only the most useful and important
|
||||
Thus far, this chapter has discussed only the most useful and important
|
||||
classes.
|
||||
However, other classes exist within the <filename>meta/classes</filename> directory
|
||||
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.
|
||||
You can examine the <filename>.bbclass</filename> files directly for more
|
||||
information.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@@ -715,6 +715,6 @@
|
||||
|
||||
|
||||
</chapter>
|
||||
<!--
|
||||
vim: expandtab tw=80 ts=4
|
||||
<!--
|
||||
vim: expandtab tw=80 ts=4
|
||||
-->
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<para>
|
||||
Features provide a mechanism for working out which packages
|
||||
should be included in the generated images.
|
||||
should be included in the generated images.
|
||||
Distributions can select which features they want to support through the
|
||||
<filename><link linkend='var-DISTRO_FEATURES'>DISTRO_FEATURES</link></filename>
|
||||
variable, which is set in the <filename>poky.conf</filename> distribution configuration file.
|
||||
@@ -19,16 +19,16 @@
|
||||
|
||||
<para>
|
||||
These two variables combine to work out which kernel modules,
|
||||
utilities, and other packages to include.
|
||||
utilities, and other packages to include.
|
||||
A given distribution can support a selected subset of features so some machine features might not
|
||||
be included if the distribution itself does not support them.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
One method you can use to determine which recipes are checking to see if a
|
||||
particular feature is contained or not is to <filename>grep</filename> through
|
||||
One method you can use to determine which recipes are checking to see if a
|
||||
particular feature is contained or not is to <filename>grep</filename> through
|
||||
the metadata for the feature.
|
||||
Here is an example that discovers the recipes whose build is potentially
|
||||
Here is an example that discovers the recipes whose build is potentially
|
||||
changed based on a given feature:
|
||||
<literallayout class='monospaced'>
|
||||
$ cd $HOME/poky
|
||||
@@ -38,21 +38,21 @@
|
||||
|
||||
<para>
|
||||
This chapter provides a reference of shipped machine and distro features
|
||||
you can include as part of the image, a reference on image types you can
|
||||
you can include as part of the image, a reference on image types you can
|
||||
build, and a reference on feature backfilling.
|
||||
</para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<section id='ref-features-distro'>
|
||||
<title>Distro</title>
|
||||
|
||||
<para>
|
||||
The items below are features you can use with
|
||||
The items below are features you can use with
|
||||
<link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>.
|
||||
Features do not have a one-to-one correspondence to packages, and they can
|
||||
go beyond simply controlling the installation of a package or packages.
|
||||
Features do not have a one-to-one correspondence to packages, and they can
|
||||
go beyond simply controlling the installation of a package or packages.
|
||||
Sometimes a feature can influence how certain recipes are built.
|
||||
For example, a feature might determine whether a particular configure option
|
||||
For example, a feature might determine whether a particular configure option
|
||||
is specified within <filename>do_configure</filename> for a particular
|
||||
recipe.
|
||||
</para>
|
||||
@@ -60,7 +60,7 @@
|
||||
<para>
|
||||
This list only represents features as shipped with the Yocto Project metadata:
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>alsa:</emphasis> ALSA support will be included (OSS compatibility
|
||||
<listitem><para><emphasis>alsa:</emphasis> ALSA support will be included (OSS compatibility
|
||||
kernel modules will be installed if available).</para></listitem>
|
||||
<listitem><para><emphasis>bluetooth:</emphasis> Include bluetooth support (integrated BT only)
|
||||
</para></listitem>
|
||||
@@ -69,7 +69,7 @@
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>irda:</emphasis> Include Irda support
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>keyboard:</emphasis> Include keyboard support (e.g. keymaps will be
|
||||
<listitem><para><emphasis>keyboard:</emphasis> Include keyboard support (e.g. keymaps will be
|
||||
loaded during boot).
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>pci:</emphasis> Include PCI bus support
|
||||
@@ -103,12 +103,12 @@
|
||||
<title>Machine</title>
|
||||
|
||||
<para>
|
||||
The items below are features you can use with
|
||||
The items below are features you can use with
|
||||
<link linkend='var-MACHINE_FEATURES'><filename>MACHINE_FEATURES</filename></link>.
|
||||
Features do not have a one-to-one correspondence to packages, and they can
|
||||
go beyond simply controlling the installation of a package or packages.
|
||||
Features do not have a one-to-one correspondence to packages, and they can
|
||||
go beyond simply controlling the installation of a package or packages.
|
||||
Sometimes a feature can influence how certain recipes are built.
|
||||
For example, a feature might determine whether a particular configure option
|
||||
For example, a feature might determine whether a particular configure option
|
||||
is specified within <filename>do_configure</filename> for a particular
|
||||
recipe.
|
||||
</para>
|
||||
@@ -154,7 +154,7 @@
|
||||
<title>Images</title>
|
||||
|
||||
<para>
|
||||
The contents of images generated by the OpenEmbedded build system can be controlled by the
|
||||
The contents of images generated by the OpenEmbedded build system can be controlled by the
|
||||
<filename><link linkend='var-IMAGE_FEATURES'>IMAGE_FEATURES</link></filename>
|
||||
and <filename><link linkend='var-EXTRA_IMAGE_FEATURES'>EXTRA_IMAGE_FEATURES</link></filename>
|
||||
variables that you typically configure in your image recipes.
|
||||
@@ -164,48 +164,48 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Current list of
|
||||
Current list of
|
||||
<filename>IMAGE_FEATURES</filename> contains the following:
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>splash:</emphasis> Enables showing a splash screen during boot.
|
||||
By default, this screen is provided by <filename>psplash</filename>, which does
|
||||
allow customization.
|
||||
If you prefer to use an alternative splash screen package, you can do so by
|
||||
<listitem><para><emphasis>splash:</emphasis> Enables showing a splash screen during boot.
|
||||
By default, this screen is provided by <filename>psplash</filename>, which does
|
||||
allow customization.
|
||||
If you prefer to use an alternative splash screen package, you can do so by
|
||||
setting the <filename>SPLASH</filename> variable
|
||||
to a different package name (or names) within the image recipe or at the distro
|
||||
configuration level.</para></listitem>
|
||||
<listitem><para><emphasis>ssh-server-dropbear:</emphasis> Installs the Dropbear minimal
|
||||
<listitem><para><emphasis>ssh-server-dropbear:</emphasis> Installs the Dropbear minimal
|
||||
SSH server.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>ssh-server-openssh:</emphasis> Installs the OpenSSH SSH server,
|
||||
which is more full-featured than Dropbear.
|
||||
which is more full-featured than Dropbear.
|
||||
Note that if both the OpenSSH SSH server and the Dropbear minimal SSH server
|
||||
are present in <filename>IMAGE_FEATURES</filename>, then OpenSSH will take
|
||||
precedence and Dropbear will not be installed.</para></listitem>
|
||||
<listitem><para><emphasis>x11:</emphasis> Installs the X server</para></listitem>
|
||||
<listitem><para><emphasis>x11-base:</emphasis> Installs the X server with a
|
||||
<listitem><para><emphasis>x11-base:</emphasis> Installs the X server with a
|
||||
minimal environment.</para></listitem>
|
||||
<listitem><para><emphasis>x11-sato:</emphasis> Installs the OpenedHand Sato environment.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>tools-sdk:</emphasis> Installs a full SDK that runs on the device.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>tools-debug:</emphasis> Installs debugging tools such as
|
||||
<listitem><para><emphasis>tools-debug:</emphasis> Installs debugging tools such as
|
||||
<filename>strace</filename> and <filename>gdb</filename>.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>tools-profile:</emphasis> Installs profiling tools such as
|
||||
<filename>oprofile</filename>, <filename>exmap</filename>, and
|
||||
<listitem><para><emphasis>tools-profile:</emphasis> Installs profiling tools such as
|
||||
<filename>oprofile</filename>, <filename>exmap</filename>, and
|
||||
<filename>LTTng</filename>.</para></listitem>
|
||||
<listitem><para><emphasis>tools-testapps:</emphasis> Installs device testing tools (e.g.
|
||||
touchscreen debugging).</para></listitem>
|
||||
<listitem><para><emphasis>nfs-server:</emphasis> Installs an NFS server.</para></listitem>
|
||||
<listitem><para><emphasis>dev-pkgs:</emphasis> Installs development packages (headers and
|
||||
<listitem><para><emphasis>dev-pkgs:</emphasis> Installs development packages (headers and
|
||||
extra library links) for all packages installed in a given image.</para></listitem>
|
||||
<listitem><para><emphasis>staticdev-pkgs:</emphasis> Installs static development
|
||||
packages (i.e. static libraries containing <filename>*.a</filename> files) for all
|
||||
<listitem><para><emphasis>staticdev-pkgs:</emphasis> Installs static development
|
||||
packages (i.e. static libraries containing <filename>*.a</filename> files) for all
|
||||
packages installed in a given image.</para></listitem>
|
||||
<listitem><para><emphasis>dbg-pkgs:</emphasis> Installs debug symbol packages for all packages
|
||||
<listitem><para><emphasis>dbg-pkgs:</emphasis> Installs debug symbol packages for all packages
|
||||
installed in a given image.</para></listitem>
|
||||
<listitem><para><emphasis>doc-pkgs:</emphasis> Installs documentation packages for all packages
|
||||
<listitem><para><emphasis>doc-pkgs:</emphasis> Installs documentation packages for all packages
|
||||
installed in a given image.</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
@@ -218,30 +218,30 @@
|
||||
Sometimes it is necessary in the OpenEmbedded build system to extend
|
||||
<link linkend='var-MACHINE_FEATURES'><filename>MACHINE_FEATURES</filename></link>
|
||||
or <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>
|
||||
to control functionality that was previously enabled and not able
|
||||
to be disabled.
|
||||
to control functionality that was previously enabled and not able
|
||||
to be disabled.
|
||||
For these cases, we need to add an
|
||||
additional feature item to appear in one of these variables,
|
||||
but we do not want to force developers who have existing values
|
||||
of the variables in their configuration to add the new feature
|
||||
in order to retain the same overall level of functionality.
|
||||
additional feature item to appear in one of these variables,
|
||||
but we do not want to force developers who have existing values
|
||||
of the variables in their configuration to add the new feature
|
||||
in order to retain the same overall level of functionality.
|
||||
Thus, the OpenEmbedded build system has a mechanism to
|
||||
automatically "backfill" these added features into existing
|
||||
distro or machine configurations.
|
||||
automatically "backfill" these added features into existing
|
||||
distro or machine configurations.
|
||||
You can see the list of features for which this is done by
|
||||
finding the
|
||||
finding the
|
||||
<link linkend='var-DISTRO_FEATURES_BACKFILL'><filename>DISTRO_FEATURES_BACKFILL</filename></link>
|
||||
and <link linkend='var-MACHINE_FEATURES_BACKFILL'><filename>MACHINE_FEATURES_BACKFILL</filename></link>
|
||||
variables in the <filename>meta/conf/bitbake.conf</filename> file.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Because such features are backfilled by default into all
|
||||
configurations as described in the previous paragraph, developers
|
||||
who wish to disable the new features need to be able to selectively
|
||||
Because such features are backfilled by default into all
|
||||
configurations as described in the previous paragraph, developers
|
||||
who wish to disable the new features need to be able to selectively
|
||||
prevent the backfilling from occurring.
|
||||
They can do this by adding the undesired feature or features to the
|
||||
<link linkend='var-DISTRO_FEATURES_BACKFILL_CONSIDERED'><filename>DISTRO_FEATURES_BACKFILL_CONSIDERED</filename></link>
|
||||
<link linkend='var-DISTRO_FEATURES_BACKFILL_CONSIDERED'><filename>DISTRO_FEATURES_BACKFILL_CONSIDERED</filename></link>
|
||||
or <link linkend='var-MACHINE_FEATURES_BACKFILL_CONSIDERED'><filename>MACHINE_FEATURES_BACKFILL_CONSIDERED</filename></link>
|
||||
variables for distro features and machine features respectively.
|
||||
</para>
|
||||
@@ -249,46 +249,46 @@
|
||||
<para>
|
||||
Here are two examples to help illustrate feature backfilling:
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>The "pulseaudio" distro feature option</emphasis>:
|
||||
Previously, PulseAudio support was enabled within the Qt and
|
||||
<listitem><para><emphasis>The "pulseaudio" distro feature option</emphasis>:
|
||||
Previously, PulseAudio support was enabled within the Qt and
|
||||
GStreamer frameworks.
|
||||
Because of this, the feature is backfilled and thus
|
||||
enabled for all distros through the
|
||||
Because of this, the feature is backfilled and thus
|
||||
enabled for all distros through the
|
||||
<filename>DISTRO_FEATURES_BACKFILL</filename>
|
||||
variable in the <filename>meta/conf/bitbake.conf</filename> file.
|
||||
However, your distro needs to disable the feature.
|
||||
You can disable the feature without affecting
|
||||
You can disable the feature without affecting
|
||||
other existing distro configurations that need PulseAudio support
|
||||
by adding "pulseaudio" to
|
||||
<filename>DISTRO_FEATURES_BACKFILL_CONSIDERED</filename>
|
||||
in your distro's <filename>.conf</filename> file.
|
||||
Adding the feature to this variable when it also
|
||||
exists in the <filename>DISTRO_FEATURES_BACKFILL</filename>
|
||||
variable prevents the build system from adding the feature to
|
||||
variable prevents the build system from adding the feature to
|
||||
your configuration's <filename>DISTRO_FEATURES</filename>, effectively disabling
|
||||
the feature for that particular distro.</para></listitem>
|
||||
<listitem><para><emphasis>The "rtc" machine feature option</emphasis>:
|
||||
Previously, real time clock (RTC) support was enabled for all
|
||||
<listitem><para><emphasis>The "rtc" machine feature option</emphasis>:
|
||||
Previously, real time clock (RTC) support was enabled for all
|
||||
target devices.
|
||||
Because of this, the feature is backfilled and thus enabled
|
||||
for all machines through the <filename>MACHINE_FEATURES_BACKFILL</filename>
|
||||
variable in the <filename>meta/conf/bitbake.conf</filename> file.
|
||||
However, your target device does not have this capability.
|
||||
You can disable RTC support for your device without
|
||||
affecting other machines that need RTC support
|
||||
by adding the feature to your machine's
|
||||
You can disable RTC support for your device without
|
||||
affecting other machines that need RTC support
|
||||
by adding the feature to your machine's
|
||||
<filename>MACHINE_FEATURES_BACKFILL_CONSIDERED</filename>
|
||||
list in the machine's <filename>.conf</filename> file.
|
||||
Adding the feature to this variable when it also
|
||||
exists in the <filename>MACHINE_FEATURES_BACKFILL</filename>
|
||||
variable prevents the build system from adding the feature to
|
||||
your configuration's <filename>MACHINE_FEATURES</filename>, effectively
|
||||
variable prevents the build system from adding the feature to
|
||||
your configuration's <filename>MACHINE_FEATURES</filename>, effectively
|
||||
disabling RTC support for that particular machine.</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
</chapter>
|
||||
|
||||
<!--
|
||||
<!--
|
||||
vim: expandtab tw=80 ts=4 spell spelllang=en_gb
|
||||
-->
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<title>Images</title>
|
||||
|
||||
<para>
|
||||
The OpenEmbedded build process supports several types of images to satisfy different needs.
|
||||
When you issue the <filename>bitbake</filename> command you provide a “top-level” recipe
|
||||
The OpenEmbedded build process supports several types of images to satisfy different needs.
|
||||
When you issue the <filename>bitbake</filename> command you provide a “top-level” recipe
|
||||
that essentially begins the build for the type of image you want.
|
||||
</para>
|
||||
|
||||
@@ -24,16 +24,16 @@
|
||||
</note>
|
||||
|
||||
<para>
|
||||
From within the <filename>poky</filename> Git repository, use the following command to list
|
||||
From within the <filename>poky</filename> Git repository, use the following command to list
|
||||
the supported images:
|
||||
<literallayout class='monospaced'>
|
||||
$ ls meta*/recipes*/images/*.bb
|
||||
</literallayout>
|
||||
These recipes reside in the <filename>meta/recipes-core/images</filename>,
|
||||
<filename>meta/recipes-extended/images</filename>,
|
||||
<filename>meta/recipes-graphics/images</filename>, and
|
||||
<filename>meta/recipes-sato/images</filename> directories
|
||||
within the <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>source directory</ulink>.
|
||||
<filename>meta/recipes-extended/images</filename>,
|
||||
<filename>meta/recipes-graphics/images</filename>, and
|
||||
<filename>meta/recipes-sato/images</filename> directories
|
||||
within the <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>source directory</ulink>.
|
||||
Although the recipe names are somewhat explanatory, here is a list that describes them:
|
||||
</para>
|
||||
|
||||
@@ -45,17 +45,17 @@
|
||||
<listitem><para><emphasis><filename>core-image-minimal-dev</filename>:</emphasis>
|
||||
A <filename>core-image-minimal</filename> image suitable for development work
|
||||
using the host.
|
||||
The image includes headers and libraries you can use in a host development
|
||||
The image includes headers and libraries you can use in a host development
|
||||
environment.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis><filename>core-image-minimal-initramfs</filename>:</emphasis>
|
||||
A <filename>core-image-minimal</filename> image that has the Minimal RAM-based
|
||||
Initial Root Filesystem (<filename>initramfs</filename>) as part of the kernel,
|
||||
A <filename>core-image-minimal</filename> image that has the Minimal RAM-based
|
||||
Initial Root Filesystem (<filename>initramfs</filename>) as part of the kernel,
|
||||
which allows the system to find the first “init” program more efficiently.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis><filename>core-image-minimal-mtdutils</filename>:</emphasis>
|
||||
A <filename>core-image-minimal</filename> image that has support
|
||||
for the Minimal MTD Utilities, which let the user interact with the
|
||||
A <filename>core-image-minimal</filename> image that has support
|
||||
for the Minimal MTD Utilities, which let the user interact with the
|
||||
MTD subsystem in the kernel to perform operations on flash devices.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis><filename>core-image-x11</filename>:</emphasis>
|
||||
@@ -69,64 +69,64 @@
|
||||
<listitem><para><emphasis><filename>core-image-lsb-dev</filename>:</emphasis>
|
||||
A <filename>core-image-lsb</filename> image that is suitable for development work
|
||||
using the host.
|
||||
The image includes headers and libraries you can use in a host development
|
||||
The image includes headers and libraries you can use in a host development
|
||||
environment.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis><filename>core-image-lsb-sdk</filename>:</emphasis>
|
||||
A <filename>core-image-lsb</filename> that includes everything in meta-toolchain
|
||||
A <filename>core-image-lsb</filename> that includes everything in meta-toolchain
|
||||
but also includes development headers and libraries to form a complete standalone SDK.
|
||||
This image is suitable for development using the target.</para></listitem>
|
||||
<listitem><para><emphasis><filename>core-image-clutter</filename>:</emphasis>
|
||||
An image with support for the Open GL-based toolkit Clutter, which enables development of
|
||||
An image with support for the Open GL-based toolkit Clutter, which enables development of
|
||||
rich and animated graphical user interfaces.</para></listitem>
|
||||
<listitem><para><emphasis><filename>core-image-sato</filename>:</emphasis>
|
||||
An image with Sato support, a mobile environment and visual style that works well
|
||||
An image with Sato support, a mobile environment and visual style that works well
|
||||
with mobile devices.
|
||||
The image supports X11 with a Sato theme and applications such as
|
||||
a terminal, editor, file manager, media player, and so forth.</para></listitem>
|
||||
<listitem><para><emphasis><filename>core-image-sato-dev</filename>:</emphasis>
|
||||
A <filename>core-image-sato</filename> image suitable for development
|
||||
A <filename>core-image-sato</filename> image suitable for development
|
||||
using the host.
|
||||
The image includes libraries needed to build applications on the device itself,
|
||||
testing and profiling tools, and debug symbols.
|
||||
The image includes libraries needed to build applications on the device itself,
|
||||
testing and profiling tools, and debug symbols.
|
||||
This image was formerly <filename>core-image-sdk</filename>.</para></listitem>
|
||||
<listitem><para><emphasis><filename>core-image-sato-sdk</filename>:</emphasis>
|
||||
A <filename>core-image-sato</filename> image that includes everything in meta-toolchain.
|
||||
A <filename>core-image-sato</filename> image that includes everything in meta-toolchain.
|
||||
The image also includes development headers and libraries to form a complete standalone SDK
|
||||
and is suitable for development using the target.</para></listitem>
|
||||
<listitem><para><emphasis><filename>core-image-rt</filename>:</emphasis>
|
||||
A <filename>core-image-minimal</filename> image plus a real-time test suite and
|
||||
A <filename>core-image-minimal</filename> image plus a real-time test suite and
|
||||
tools appropriate for real-time use.</para></listitem>
|
||||
<listitem><para><emphasis><filename>core-image-rt-sdk</filename>:</emphasis>
|
||||
A <filename>core-image-rt</filename> image that includes everything in
|
||||
<filename>meta-toolchain</filename>.
|
||||
The image also includes development headers and libraries to form a complete
|
||||
A <filename>core-image-rt</filename> image that includes everything in
|
||||
<filename>meta-toolchain</filename>.
|
||||
The image also includes development headers and libraries to form a complete
|
||||
stand-alone SDK and is suitable for development using the target.</para></listitem>
|
||||
<listitem><para><emphasis><filename>core-image-gtk-directfb</filename>:</emphasis>
|
||||
An image that uses <filename>gtk+</filename> over <filename>directfb</filename>
|
||||
instead of X11.
|
||||
In order to build, this image requires specific distro configuration that enables
|
||||
An image that uses <filename>gtk+</filename> over <filename>directfb</filename>
|
||||
instead of X11.
|
||||
In order to build, this image requires specific distro configuration that enables
|
||||
<filename>gtk</filename> over <filename>directfb</filename>.</para></listitem>
|
||||
<listitem><para><emphasis><filename>build-appliance-image</filename>:</emphasis>
|
||||
An image you can boot and run using either the
|
||||
<ulink url='http://www.vmware.com/products/player/overview.html'>VMware Player</ulink>
|
||||
or <ulink url='http://www.vmware.com/products/workstation/overview.html'>VMware Workstation</ulink>.
|
||||
For more information on this image, see the
|
||||
<ulink url='&YOCTO_HOME_URL;/documentation/build-appliance'>Build Appliance</ulink> page on
|
||||
<ulink url='&YOCTO_HOME_URL;/documentation/build-appliance'>Build Appliance</ulink> page on
|
||||
the Yocto Project website.</para></listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<tip>
|
||||
From the Yocto Project release 1.1 onwards, <filename>-live</filename> and
|
||||
From the Yocto Project release 1.1 onwards, <filename>-live</filename> and
|
||||
<filename>-directdisk</filename> images have been replaced by a "live"
|
||||
option in <filename>IMAGE_FSTYPES</filename> that will work with any image to produce an
|
||||
option in <filename>IMAGE_FSTYPES</filename> that will work with any image to produce an
|
||||
image file that can be
|
||||
copied directly to a CD or USB device and run as is.
|
||||
copied directly to a CD or USB device and run as is.
|
||||
To build a live image, simply add
|
||||
"live" to <filename>IMAGE_FSTYPES</filename> within the <filename>local.conf</filename>
|
||||
file or wherever appropriate and then build the desired image as normal.
|
||||
</tip>
|
||||
</chapter>
|
||||
<!--
|
||||
vim: expandtab tw=80 ts=4
|
||||
<!--
|
||||
vim: expandtab tw=80 ts=4
|
||||
-->
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<para>
|
||||
The <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink> consists of several components.
|
||||
Understanding them and knowing where they are located is key to using the Yocto Project well.
|
||||
This chapter describes the Source Directory and gives information about the various
|
||||
This chapter describes the Source Directory and gives information about the various
|
||||
files and directories.
|
||||
</para>
|
||||
|
||||
@@ -35,26 +35,26 @@
|
||||
<para>
|
||||
The <ulink url='source-directory'>Source Directory</ulink>
|
||||
includes a copy of BitBake for ease of use.
|
||||
The copy usually matches the current stable BitBake release from the BitBake project.
|
||||
BitBake, a metadata interpreter, reads the Yocto Project metadata and runs the tasks
|
||||
defined by that data.
|
||||
The copy usually matches the current stable BitBake release from the BitBake project.
|
||||
BitBake, a metadata interpreter, reads the Yocto Project metadata and runs the tasks
|
||||
defined by that data.
|
||||
Failures are usually from the metadata and not from BitBake itself.
|
||||
Consequently, most users do not need to worry about BitBake.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
When you run the <filename>bitbake</filename> command, the wrapper script in
|
||||
<filename>scripts/</filename> is executed to run the main BitBake executable,
|
||||
When you run the <filename>bitbake</filename> command, the wrapper script in
|
||||
<filename>scripts/</filename> is executed to run the main BitBake executable,
|
||||
which resides in the <filename>bitbake/bin/</filename> directory.
|
||||
Sourcing the <link linkend="structure-core-script">&OE_INIT_FILE;</link>
|
||||
Sourcing the <link linkend="structure-core-script">&OE_INIT_FILE;</link>
|
||||
script places the <filename>scripts</filename> and <filename>bitbake/bin</filename>
|
||||
directories (in that order) into the shell's <filename>PATH</filename> environment
|
||||
directories (in that order) into the shell's <filename>PATH</filename> environment
|
||||
variable.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For more information on BitBake, see the BitBake documentation
|
||||
inculded in the <filename>bitbake/doc/manual</filename> directory of the
|
||||
For more information on BitBake, see the BitBake documentation
|
||||
inculded in the <filename>bitbake/doc/manual</filename> directory of the
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
|
||||
</para>
|
||||
</section>
|
||||
@@ -63,21 +63,21 @@
|
||||
<title><filename>build/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory contains user configuration files and the output
|
||||
generated by the OpenEmbedded build system in its standard configuration where
|
||||
This directory contains user configuration files and the output
|
||||
generated by the OpenEmbedded build system in its standard configuration where
|
||||
the source tree is combined with the output.
|
||||
The <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
|
||||
is created initially when you <filename>source</filename>
|
||||
the OpenEmbedded build environment setup script <filename>&OE_INIT_FILE;</filename>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
It is also possible to place output and configuration
|
||||
files in a directory separate from the
|
||||
<para>
|
||||
It is also possible to place output and configuration
|
||||
files in a directory separate from the
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
|
||||
by providing a directory name when you <filename>source</filename>
|
||||
the setup script.
|
||||
For information on separating output from your local Source Directory files, see <link
|
||||
For information on separating output from your local Source Directory files, see <link
|
||||
linkend='structure-core-script'>&OE_INIT_FILE;</link>.
|
||||
</para>
|
||||
</section>
|
||||
@@ -88,9 +88,9 @@
|
||||
<para>
|
||||
This directory holds the source for the Yocto Project documentation
|
||||
as well as templates and tools that allow you to generate PDF and HTML
|
||||
versions of the manuals.
|
||||
Each manual is contained in a sub-folder.
|
||||
For example, the files for this manual reside in
|
||||
versions of the manuals.
|
||||
Each manual is contained in a sub-folder.
|
||||
For example, the files for this manual reside in
|
||||
<filename>poky-ref-manual</filename>.
|
||||
</para>
|
||||
</section>
|
||||
@@ -99,7 +99,7 @@
|
||||
<title><filename>meta/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory contains the OpenEmbedded Core metadata.
|
||||
This directory contains the OpenEmbedded Core metadata.
|
||||
The directory holds recipes, common classes, and machine
|
||||
configuration for emulated targets (qemux86, qemuarm,
|
||||
and so on.)
|
||||
@@ -138,7 +138,7 @@
|
||||
<title><filename>meta-skeleton/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory contains template recipes for BSP and kernel development.
|
||||
This directory contains template recipes for BSP and kernel development.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
<title><filename>scripts/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory contains various integration scripts that implement
|
||||
This directory contains various integration scripts that implement
|
||||
extra functionality in the Yocto Project environment (e.g. QEMU scripts).
|
||||
The <link linkend="structure-core-script">&OE_INIT_FILE;</link> script appends this
|
||||
directory to the shell's <filename>PATH</filename> environment variable.
|
||||
@@ -154,7 +154,7 @@
|
||||
|
||||
<para>
|
||||
The <filename>scripts</filename> directory has useful scripts that assist contributing
|
||||
back to the Yocto Project, such as <filename>create_pull_request</filename> and
|
||||
back to the Yocto Project, such as <filename>create_pull_request</filename> and
|
||||
<filename>send_pull_request</filename>.
|
||||
</para>
|
||||
</section>
|
||||
@@ -163,23 +163,23 @@
|
||||
<title><filename>&OE_INIT_FILE;</filename></title>
|
||||
|
||||
<para>
|
||||
This script sets up the OpenEmbedded build environment.
|
||||
This script sets up the OpenEmbedded build environment.
|
||||
Running this script with the <filename>source</filename> command in
|
||||
a shell makes changes to <filename>PATH</filename> and sets other core BitBake variables based on the
|
||||
current working directory.
|
||||
current working directory.
|
||||
You need to run this script before running BitBake commands.
|
||||
The script uses other scripts within the <filename>scripts</filename> directory to do
|
||||
The script uses other scripts within the <filename>scripts</filename> directory to do
|
||||
the bulk of the work.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
By default, running this script without a Build Directory argument creates the
|
||||
<filename>build</filename> directory.
|
||||
By default, running this script without a Build Directory argument creates the
|
||||
<filename>build</filename> directory.
|
||||
If you provide a Build Directory argument when you <filename>source</filename>
|
||||
the script, you direct OpenEmbedded build system to create a
|
||||
the script, you direct OpenEmbedded build system to create a
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink> of your choice.
|
||||
For example, the following command creates a Build Directory named
|
||||
<filename>mybuilds</filename> that is outside of the
|
||||
For example, the following command creates a Build Directory named
|
||||
<filename>mybuilds</filename> that is outside of the
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>:
|
||||
<literallayout class='monospaced'>
|
||||
$ source &OE_INIT_FILE; ~/mybuilds
|
||||
@@ -189,7 +189,7 @@
|
||||
contain spaces.
|
||||
If you attempt to run the <filename>&OE_INIT_FILE;</filename> script
|
||||
from a Source Directory that contains spaces in either the filenames
|
||||
or directory names, the script returns an error indicating no such
|
||||
or directory names, the script returns an error indicating no such
|
||||
file or directory.
|
||||
Be sure to use a Source Directory free of names containing spaces.
|
||||
</note>
|
||||
@@ -200,7 +200,7 @@
|
||||
<title><filename>LICENSE, README, and README.hardware</filename></title>
|
||||
|
||||
<para>
|
||||
These files are standard top-level files.
|
||||
These files are standard top-level files.
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
@@ -212,8 +212,8 @@
|
||||
<title><filename>build/pseudodone</filename></title>
|
||||
|
||||
<para>
|
||||
This tag file indicates that the initial pseudo binary was created.
|
||||
The file is built the first time BitBake is invoked.
|
||||
This tag file indicates that the initial pseudo binary was created.
|
||||
The file is built the first time BitBake is invoked.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@@ -221,24 +221,24 @@
|
||||
<title><filename>build/conf/local.conf</filename></title>
|
||||
|
||||
<para>
|
||||
This file contains all the local user configuration for your build environment.
|
||||
If there is no <filename>local.conf</filename> present, it is created from
|
||||
<filename>local.conf.sample</filename>.
|
||||
The <filename>local.conf</filename> file contains documentation on the various configuration options.
|
||||
Any variable set here overrides any variable set elsewhere within the environment unless
|
||||
that variable is hard-coded within a file (e.g. by using '=' instead of '?=').
|
||||
Some variables are hard-coded for various reasons but these variables are
|
||||
This file contains all the local user configuration for your build environment.
|
||||
If there is no <filename>local.conf</filename> present, it is created from
|
||||
<filename>local.conf.sample</filename>.
|
||||
The <filename>local.conf</filename> file contains documentation on the various configuration options.
|
||||
Any variable set here overrides any variable set elsewhere within the environment unless
|
||||
that variable is hard-coded within a file (e.g. by using '=' instead of '?=').
|
||||
Some variables are hard-coded for various reasons but these variables are
|
||||
relatively rare.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Edit this file to set the <filename><link linkend='var-MACHINE'>MACHINE</link></filename>
|
||||
for which you want to build, which package types you wish to use
|
||||
(<link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>),
|
||||
Edit this file to set the <filename><link linkend='var-MACHINE'>MACHINE</link></filename>
|
||||
for which you want to build, which package types you wish to use
|
||||
(<link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>),
|
||||
where you want to downloaded files
|
||||
(<filename><link linkend='var-DL_DIR'>DL_DIR</link></filename>),
|
||||
and how you want your host machine to use resources
|
||||
(<link linkend='var-BB_NUMBER_THREADS'><filename>BB_NUMBER_THREADS</filename></link> and
|
||||
(<filename><link linkend='var-DL_DIR'>DL_DIR</link></filename>),
|
||||
and how you want your host machine to use resources
|
||||
(<link linkend='var-BB_NUMBER_THREADS'><filename>BB_NUMBER_THREADS</filename></link> and
|
||||
<link linkend='var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></link>).
|
||||
</para>
|
||||
</section>
|
||||
@@ -248,8 +248,8 @@
|
||||
|
||||
<para>
|
||||
This file defines layers, which are directory trees, traversed (or walked) by BitBake.
|
||||
If <filename>bblayers.conf</filename>
|
||||
is not present, it is created from <filename>bblayers.conf.sample</filename> when
|
||||
If <filename>bblayers.conf</filename>
|
||||
is not present, it is created from <filename>bblayers.conf.sample</filename> when
|
||||
you <filename>source</filename> the environment setup script.
|
||||
</para>
|
||||
|
||||
@@ -276,7 +276,7 @@
|
||||
|
||||
<para>
|
||||
This directory is used for the upstream source tarballs.
|
||||
The directory can be reused by multiple builds or moved to another location.
|
||||
The directory can be reused by multiple builds or moved to another location.
|
||||
You can control the location of this directory through the
|
||||
<filename><link linkend='var-DL_DIR'>DL_DIR</link></filename> variable.
|
||||
</para>
|
||||
@@ -287,7 +287,7 @@
|
||||
|
||||
<para>
|
||||
This directory is used for the shared state cache.
|
||||
The directory can be reused by multiple builds or moved to another location.
|
||||
The directory can be reused by multiple builds or moved to another location.
|
||||
You can control the location of this directory through the
|
||||
<filename><link linkend='var-SSTATE_DIR'>SSTATE_DIR</link></filename> variable.
|
||||
</para>
|
||||
@@ -298,9 +298,9 @@
|
||||
|
||||
<para>
|
||||
This directory receives all the OpenEmbedded build system's output.
|
||||
BitBake creates this directory if it does not exist.
|
||||
As a last resort, to clean up a build and start it from scratch (other than the downloads),
|
||||
you can remove everything in the <filename>tmp</filename> directory or get rid of the
|
||||
BitBake creates this directory if it does not exist.
|
||||
As a last resort, to clean up a build and start it from scratch (other than the downloads),
|
||||
you can remove everything in the <filename>tmp</filename> directory or get rid of the
|
||||
directory completely.
|
||||
If you do, you should also completely remove the <filename>build/sstate-cache</filename>
|
||||
directory as well.
|
||||
@@ -320,7 +320,7 @@
|
||||
|
||||
<para>
|
||||
When BitBake parses the metadata, it creates a cache file of the result that can
|
||||
be used when subsequently running commands.
|
||||
be used when subsequently running commands.
|
||||
These results are stored here on a per-machine basis.
|
||||
</para>
|
||||
</section>
|
||||
@@ -337,7 +337,7 @@
|
||||
<title><filename>build/tmp/deploy/deb/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory receives any <filename>.deb</filename> packages produced by
|
||||
This directory receives any <filename>.deb</filename> packages produced by
|
||||
the build process.
|
||||
The packages are sorted into feeds for different architecture types.
|
||||
</para>
|
||||
@@ -347,8 +347,8 @@
|
||||
<title><filename>build/tmp/deploy/rpm/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory receives any <filename>.rpm</filename> packages produced by
|
||||
the build process.
|
||||
This directory receives any <filename>.rpm</filename> packages produced by
|
||||
the build process.
|
||||
The packages are sorted into feeds for different architecture types.
|
||||
</para>
|
||||
</section>
|
||||
@@ -368,16 +368,16 @@
|
||||
<title><filename>build/tmp/deploy/images/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory receives complete filesystem images.
|
||||
This directory receives complete filesystem images.
|
||||
If you want to flash the resulting image from a build onto a device, look here for the image.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Be careful when deleting files in this directory.
|
||||
You can safely delete old images from this directory (e.g.
|
||||
Be careful when deleting files in this directory.
|
||||
You can safely delete old images from this directory (e.g.
|
||||
<filename>core-image-*</filename>, <filename>hob-image-*</filename>,
|
||||
etc.).
|
||||
However, the kernel (<filename>*zImage*</filename>, <filename>*uImage*</filename>, etc.),
|
||||
etc.).
|
||||
However, the kernel (<filename>*zImage*</filename>, <filename>*uImage*</filename>, etc.),
|
||||
bootloader and other supplementary files might be deployed here prior to building an
|
||||
image.
|
||||
Because these files, however, are not directly produced from the image, if you
|
||||
@@ -385,8 +385,8 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If you do accidentally delete files here, you will need to force them to be
|
||||
re-created.
|
||||
If you do accidentally delete files here, you will need to force them to be
|
||||
re-created.
|
||||
In order to do that, you will need to know the target that produced them.
|
||||
For example, these commands rebuild and re-create the kernel files:
|
||||
<literallayout class='monospaced'>
|
||||
@@ -400,7 +400,7 @@
|
||||
<title><filename>build/tmp/deploy/ipk/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory receives <filename>.ipk</filename> packages produced by
|
||||
This directory receives <filename>.ipk</filename> packages produced by
|
||||
the build process.</para>
|
||||
</section>
|
||||
|
||||
@@ -408,9 +408,9 @@
|
||||
<title><filename>build/tmp/sysroots/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory contains shared header files and libraries as well as other shared
|
||||
data.
|
||||
Packages that need to share output with other packages do so within this directory.
|
||||
This directory contains shared header files and libraries as well as other shared
|
||||
data.
|
||||
Packages that need to share output with other packages do so within this directory.
|
||||
The directory is subdivided by architecture so multiple builds can run within
|
||||
the one Build Directory.
|
||||
</para>
|
||||
@@ -420,9 +420,9 @@
|
||||
<title><filename>build/tmp/stamps/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory holds information that that BitBake uses for accounting purposes
|
||||
This directory holds information that that BitBake uses for accounting purposes
|
||||
to track what tasks have run and when they have run.
|
||||
The directory is sub-divided by architecture.
|
||||
The directory is sub-divided by architecture.
|
||||
The files in the directory are empty of data.
|
||||
However, BitBake uses the filenames and timestamps for tracking purposes.
|
||||
</para>
|
||||
@@ -432,9 +432,9 @@
|
||||
<title><filename>build/tmp/log/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory contains general logs that are not otherwise placed using the
|
||||
This directory contains general logs that are not otherwise placed using the
|
||||
package's <filename><link linkend='var-WORKDIR'>WORKDIR</link></filename>.
|
||||
Examples of logs are the output from the <filename>check_pkg</filename> or
|
||||
Examples of logs are the output from the <filename>check_pkg</filename> or
|
||||
<filename>distro_check</filename> tasks.
|
||||
Running a build does not necessarily mean this directory is created.
|
||||
</para>
|
||||
@@ -444,7 +444,7 @@
|
||||
<title><filename>build/tmp/pkgdata/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory contains intermediate packaging data that is used later in the packaging process.
|
||||
This directory contains intermediate packaging data that is used later in the packaging process.
|
||||
For more information, see the "<link linkend='ref-classes-package'>Packaging - package*.bbclass</link>" section.
|
||||
</para>
|
||||
</section>
|
||||
@@ -453,7 +453,7 @@
|
||||
<title><filename>build/tmp/work/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory contains architecture-specific work sub-directories for packages built by BitBake.
|
||||
This directory contains architecture-specific work sub-directories for packages built by BitBake.
|
||||
All tasks execute from a work directory.
|
||||
For example, the source for a particular package is unpacked, patched, configured and compiled all
|
||||
within its own work directory.
|
||||
@@ -462,31 +462,31 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
It is worth considering the structure of a typical work directory.
|
||||
It is worth considering the structure of a typical work directory.
|
||||
As an example, consider the <filename>linux-yocto-kernel-3.0</filename>
|
||||
on the machine <filename>qemux86</filename>
|
||||
built within the Yocto Project.
|
||||
For this package, a work directory of
|
||||
<filename>tmp/work/qemux86-poky-linux/linux-yocto-3.0+git1+<.....></filename>,
|
||||
referred to as <filename><link linkend='var-WORKDIR'>WORKDIR</link></filename>, is created.
|
||||
Within this directory, the source is unpacked to
|
||||
<filename>linux-qemux86-standard-build</filename> and then patched by Quilt
|
||||
(see the
|
||||
"<ulink url='&YOCTO_DOCS_DEV_URL;#using-a-quilt-workflow'>Modifying Package
|
||||
Source Code with Quilt</ulink>" section in the Yocto Project Development Manual.
|
||||
Within the <filename>linux-qemux86-standard-build</filename> directory,
|
||||
on the machine <filename>qemux86</filename>
|
||||
built within the Yocto Project.
|
||||
For this package, a work directory of
|
||||
<filename>tmp/work/qemux86-poky-linux/linux-yocto-3.0+git1+<.....></filename>,
|
||||
referred to as <filename><link linkend='var-WORKDIR'>WORKDIR</link></filename>, is created.
|
||||
Within this directory, the source is unpacked to
|
||||
<filename>linux-qemux86-standard-build</filename> and then patched by Quilt
|
||||
(see the
|
||||
"<ulink url='&YOCTO_DOCS_DEV_URL;#using-a-quilt-workflow'>Modifying Package
|
||||
Source Code with Quilt</ulink>" section in the Yocto Project Development Manual.
|
||||
Within the <filename>linux-qemux86-standard-build</filename> directory,
|
||||
standard Quilt directories <filename>linux-3.0/patches</filename>
|
||||
and <filename>linux-3.0/.pc</filename> are created,
|
||||
and standard Quilt commands can be used.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
There are other directories generated within WORKDIR.
|
||||
The most important directory is WORKDIR<filename>/temp/</filename>, which has log files for each
|
||||
task (<filename>log.do_*.pid</filename>) and contains the scripts BitBake runs for
|
||||
each task (<filename>run.do_*.pid</filename>).
|
||||
The WORKDIR<filename>/image/</filename> directory is where "make
|
||||
install" places its output that is then split into sub-packages
|
||||
There are other directories generated within WORKDIR.
|
||||
The most important directory is WORKDIR<filename>/temp/</filename>, which has log files for each
|
||||
task (<filename>log.do_*.pid</filename>) and contains the scripts BitBake runs for
|
||||
each task (<filename>run.do_*.pid</filename>).
|
||||
The WORKDIR<filename>/image/</filename> directory is where "make
|
||||
install" places its output that is then split into sub-packages
|
||||
within WORKDIR<filename>/packages-split/</filename>.
|
||||
</para>
|
||||
</section>
|
||||
@@ -496,7 +496,7 @@
|
||||
<title>The Metadata - <filename>meta/</filename></title>
|
||||
|
||||
<para>
|
||||
As mentioned previously, metadata is the core of the Yocto Project.
|
||||
As mentioned previously, metadata is the core of the Yocto Project.
|
||||
Metadata has several important subdivisions:
|
||||
</para>
|
||||
|
||||
@@ -504,16 +504,16 @@
|
||||
<title><filename>meta/classes/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory contains the <filename>*.bbclass</filename> files.
|
||||
Class files are used to abstract common code so it can be reused by multiple
|
||||
packages.
|
||||
This directory contains the <filename>*.bbclass</filename> files.
|
||||
Class files are used to abstract common code so it can be reused by multiple
|
||||
packages.
|
||||
Every package inherits the <filename>base.bbclass</filename> file.
|
||||
Examples of other important classes are <filename>autotools.bbclass</filename>, which
|
||||
Examples of other important classes are <filename>autotools.bbclass</filename>, which
|
||||
in theory allows any Autotool-enabled package to work with the Yocto Project with minimal effort.
|
||||
Another example is <filename>kernel.bbclass</filename> that contains common code and functions
|
||||
for working with the Linux kernel.
|
||||
Functions like image generation or packaging also have their specific class files
|
||||
such as <filename>image.bbclass</filename>, <filename>rootfs_*.bbclass</filename> and
|
||||
Another example is <filename>kernel.bbclass</filename> that contains common code and functions
|
||||
for working with the Linux kernel.
|
||||
Functions like image generation or packaging also have their specific class files
|
||||
such as <filename>image.bbclass</filename>, <filename>rootfs_*.bbclass</filename> and
|
||||
<filename>package*.bbclass</filename>.
|
||||
</para>
|
||||
</section>
|
||||
@@ -522,13 +522,13 @@
|
||||
<title><filename>meta/conf/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory contains the core set of configuration files that start from
|
||||
<filename>bitbake.conf</filename> and from which all other configuration
|
||||
This directory contains the core set of configuration files that start from
|
||||
<filename>bitbake.conf</filename> and from which all other configuration
|
||||
files are included.
|
||||
See the include statements at the end of the file and you will note that even
|
||||
<filename>local.conf</filename> is loaded from there.
|
||||
While <filename>bitbake.conf</filename> sets up the defaults, you can often override
|
||||
these by using the (<filename>local.conf</filename>) file, machine file or
|
||||
See the include statements at the end of the file and you will note that even
|
||||
<filename>local.conf</filename> is loaded from there.
|
||||
While <filename>bitbake.conf</filename> sets up the defaults, you can often override
|
||||
these by using the (<filename>local.conf</filename>) file, machine file or
|
||||
the distribution configuration file.
|
||||
</para>
|
||||
</section>
|
||||
@@ -537,11 +537,11 @@
|
||||
<title><filename>meta/conf/machine/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory contains all the machine configuration files.
|
||||
If you set <filename>MACHINE="qemux86"</filename>,
|
||||
the OpenEmbedded build system looks for a <filename>qemux86.conf</filename> file in this
|
||||
directory.
|
||||
The <filename>include</filename> directory contains various data common to multiple machines.
|
||||
This directory contains all the machine configuration files.
|
||||
If you set <filename>MACHINE="qemux86"</filename>,
|
||||
the OpenEmbedded build system looks for a <filename>qemux86.conf</filename> file in this
|
||||
directory.
|
||||
The <filename>include</filename> directory contains various data common to multiple machines.
|
||||
If you want to add support for a new machine to the Yocto Project, look in this directory.
|
||||
</para>
|
||||
</section>
|
||||
@@ -550,10 +550,10 @@
|
||||
<title><filename>meta/conf/distro/</filename></title>
|
||||
|
||||
<para>
|
||||
Any distribution-specific configuration is controlled from this directory.
|
||||
For the Yocto Project, the <filename>defaultsetup.conf</filename> is the main file here.
|
||||
This directory includes the versions and the
|
||||
<filename>SRCDATE</filename> definitions for applications that are configured here.
|
||||
Any distribution-specific configuration is controlled from this directory.
|
||||
For the Yocto Project, the <filename>defaultsetup.conf</filename> is the main file here.
|
||||
This directory includes the versions and the
|
||||
<filename>SRCDATE</filename> definitions for applications that are configured here.
|
||||
An example of an alternative configuration might be <filename>poky-bleeding.conf</filename>.
|
||||
Although this file mainly inherits its configuration from Poky.
|
||||
</para>
|
||||
@@ -563,7 +563,7 @@
|
||||
<title><filename>meta/recipes-bsp/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory contains anything linking to specific hardware or hardware
|
||||
This directory contains anything linking to specific hardware or hardware
|
||||
configuration information such as "u-boot" and "grub".
|
||||
</para>
|
||||
</section>
|
||||
@@ -580,7 +580,7 @@
|
||||
<title><filename>meta/recipes-core/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory contains what is needed to build a basic working Linux image
|
||||
This directory contains what is needed to build a basic working Linux image
|
||||
including commonly used dependencies.
|
||||
</para>
|
||||
</section>
|
||||
@@ -598,8 +598,8 @@
|
||||
<title><filename>meta/recipes-extended/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory contains non-essential applications that add features compared to the
|
||||
alternatives in core.
|
||||
This directory contains non-essential applications that add features compared to the
|
||||
alternatives in core.
|
||||
You might need this directory for full tool functionality or for Linux Standard Base (LSB)
|
||||
compliance.
|
||||
</para>
|
||||
@@ -625,7 +625,7 @@
|
||||
<title><filename>meta/recipes-kernel/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory contains the kernel and generic applications and libraries that
|
||||
This directory contains the kernel and generic applications and libraries that
|
||||
have strong kernel dependencies.
|
||||
</para>
|
||||
</section>
|
||||
@@ -651,7 +651,7 @@
|
||||
|
||||
<para>
|
||||
This directory contains package and image recipes for using and testing
|
||||
the <filename>PREEMPT_RT</filename> kernel.
|
||||
the <filename>PREEMPT_RT</filename> kernel.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@@ -668,7 +668,7 @@
|
||||
<title><filename>meta/recipes-support/</filename></title>
|
||||
|
||||
<para>
|
||||
This directory contains recipes that used by other recipes, but that are not directly
|
||||
This directory contains recipes that used by other recipes, but that are not directly
|
||||
included in images (i.e. dependencies of other recipes).
|
||||
</para>
|
||||
</section>
|
||||
@@ -678,9 +678,9 @@
|
||||
|
||||
<para>
|
||||
This directory contains a list of cached results for various architectures.
|
||||
Because certain "autoconf" test results cannot be determined when cross-compiling due to
|
||||
the tests not able to run on a live system, the information in this directory is
|
||||
passed to "autoconf" for the various architectures.
|
||||
Because certain "autoconf" test results cannot be determined when cross-compiling due to
|
||||
the tests not able to run on a live system, the information in this directory is
|
||||
passed to "autoconf" for the various architectures.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@@ -694,6 +694,6 @@
|
||||
</section>
|
||||
|
||||
</chapter>
|
||||
<!--
|
||||
vim: expandtab tw=80 ts=4
|
||||
<!--
|
||||
vim: expandtab tw=80 ts=4
|
||||
-->
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -6,10 +6,10 @@
|
||||
<title>Variable Context</title>
|
||||
|
||||
<para>
|
||||
While most variables can be used in almost any context such as
|
||||
While most variables can be used in almost any context such as
|
||||
<filename>.conf</filename>, <filename>.bbclass</filename>,
|
||||
<filename>.inc</filename>, and <filename>.bb</filename> files,
|
||||
some variables are often associated with a particular locality or context.
|
||||
some variables are often associated with a particular locality or context.
|
||||
This chapter describes some common associations.
|
||||
</para>
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
<title>Local</title>
|
||||
|
||||
<para>
|
||||
This section lists variables whose context is the local configuration through the
|
||||
This section lists variables whose context is the local configuration through the
|
||||
<filename>local.conf</filename> file.
|
||||
<itemizedlist>
|
||||
<listitem><para><filename><link linkend='var-DISTRO'>DISTRO</link></filename>
|
||||
@@ -188,6 +188,6 @@
|
||||
</section>
|
||||
</section>
|
||||
</chapter>
|
||||
<!--
|
||||
<!--
|
||||
vim: expandtab tw=80 ts=4 spell spelllang=en_gb
|
||||
-->
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<title>Introduction</title>
|
||||
<para>
|
||||
The Yocto Project team is happy for people to experiment with the Yocto Project.
|
||||
A number of places exist to find help if you run into difficulties or find bugs.
|
||||
A number of places exist to find help if you run into difficulties or find bugs.
|
||||
To find out how to download source code,
|
||||
see the "<ulink url='&YOCTO_DOCS_DEV_URL;#local-yp-release'>Yocto Project Release</ulink>"
|
||||
list item in the Yocto Project Development Manual.
|
||||
@@ -20,7 +20,7 @@
|
||||
<title>Tracking Bugs</title>
|
||||
|
||||
<para>
|
||||
If you find problems with the Yocto Project, you should report them using the
|
||||
If you find problems with the Yocto Project, you should report them using the
|
||||
Bugzilla application at <ulink url='&YOCTO_BUGZILLA_URL;'></ulink>.
|
||||
</para>
|
||||
</section>
|
||||
@@ -75,18 +75,18 @@
|
||||
The company where the Yocto Project build system Poky was first developed.
|
||||
OpenedHand has since been acquired by Intel Corporation.</para></listitem> -->
|
||||
<listitem><para><emphasis><ulink url='http://www.intel.com/'>Intel Corporation</ulink>:</emphasis>
|
||||
The company who acquired OpenedHand in 2008 and began development on the
|
||||
The company who acquired OpenedHand in 2008 and began development on the
|
||||
Yocto Project.</para></listitem>
|
||||
<listitem><para><emphasis><ulink url='&OE_HOME_URL;'>OpenEmbedded</ulink>:</emphasis>
|
||||
The upstream, generic, embedded distribution used as the basis for the build system in the
|
||||
The upstream, generic, embedded distribution used as the basis for the build system in the
|
||||
Yocto Project.
|
||||
Poky derives from and contributes back to the OpenEmbedded project.</para></listitem>
|
||||
<listitem><para><emphasis><ulink url='http://developer.berlios.de/projects/bitbake/'>
|
||||
BitBake</ulink>:</emphasis> The tool used to process metadata.</para></listitem>
|
||||
<listitem><para><emphasis>BitBake User Manual:</emphasis>
|
||||
A comprehensive guide to the BitBake tool.
|
||||
You can find the BitBake User Manual in the <filename>bitbake/doc/manual</filename>
|
||||
directory, which is found in the
|
||||
You can find the BitBake User Manual in the <filename>bitbake/doc/manual</filename>
|
||||
directory, which is found in the
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis><ulink url='http://wiki.qemu.org/Index.html'>QEMU</ulink>:
|
||||
@@ -100,7 +100,7 @@
|
||||
|
||||
<para>
|
||||
The Yocto Project gladly accepts contributions.
|
||||
You can submit changes to the project either by creating and sending pull requests,
|
||||
You can submit changes to the project either by creating and sending pull requests,
|
||||
or by submitting patches through email.
|
||||
For information on how to do both, see the
|
||||
"<ulink url='&YOCTO_DOCS_DEV_URL;#how-to-submit-a-change'>How to Submit a Change</ulink>"
|
||||
@@ -109,6 +109,6 @@
|
||||
</section>
|
||||
|
||||
</chapter>
|
||||
<!--
|
||||
vim: expandtab tw=80 ts=4
|
||||
<!--
|
||||
vim: expandtab tw=80 ts=4
|
||||
-->
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<title>Technical Details</title>
|
||||
|
||||
<para>
|
||||
This chapter provides technical details for various parts of the Yocto Project.
|
||||
This chapter provides technical details for various parts of the Yocto Project.
|
||||
Currently, topics include Yocto Project components and shared state (sstate) cache.
|
||||
</para>
|
||||
|
||||
@@ -14,21 +14,21 @@
|
||||
<title>Yocto Project Components</title>
|
||||
|
||||
<para>
|
||||
The BitBake task executor together with various types of configuration files form the
|
||||
The BitBake task executor together with various types of configuration files form the
|
||||
OpenEmbedded Core.
|
||||
This section overviews the BitBake task executor and the
|
||||
configuration files by describing what they are used for and how they interact.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
BitBake handles the parsing and execution of the data files.
|
||||
|
||||
<para>
|
||||
BitBake handles the parsing and execution of the data files.
|
||||
The data itself is of various types:
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>Recipes:</emphasis> Provides details about particular
|
||||
<listitem><para><emphasis>Recipes:</emphasis> Provides details about particular
|
||||
pieces of software</para></listitem>
|
||||
<listitem><para><emphasis>Class Data:</emphasis> An abstraction of common build
|
||||
<listitem><para><emphasis>Class Data:</emphasis> An abstraction of common build
|
||||
information (e.g. how to build a Linux kernel).</para></listitem>
|
||||
<listitem><para><emphasis>Configuration Data:</emphasis> Defines machine-specific settings,
|
||||
<listitem><para><emphasis>Configuration Data:</emphasis> Defines machine-specific settings,
|
||||
policy decisions, etc.
|
||||
Configuration data acts as the glue to bind everything together.</para></listitem>
|
||||
</itemizedlist>
|
||||
@@ -37,17 +37,17 @@
|
||||
section in the Yocto Project Development Manual.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<para>
|
||||
BitBake knows how to combine multiple data sources together and refers to each data source
|
||||
as a layer.
|
||||
For information on layers, see the
|
||||
"<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and
|
||||
For information on layers, see the
|
||||
"<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and
|
||||
Creating Layers</ulink>" section of the Yocto Project Development Manual.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Following are some brief details on these core components.
|
||||
For more detailed information on these components see the
|
||||
For more detailed information on these components see the
|
||||
"<link linkend='ref-structure'>Directory Structure</link>" chapter.
|
||||
</para>
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
<para>
|
||||
BitBake is the tool at the heart of the OpenEmbedded build system and is responsible
|
||||
for parsing the metadata, generating a list of tasks from it,
|
||||
and then executing those tasks.
|
||||
and then executing those tasks.
|
||||
To see a list of the options BitBake supports, use the following help command:
|
||||
<literallayout class='monospaced'>
|
||||
$ bitbake --help
|
||||
@@ -66,8 +66,8 @@
|
||||
|
||||
<para>
|
||||
The most common usage for BitBake is <filename>bitbake <packagename></filename>, where
|
||||
<filename>packagename</filename> is the name of the package you want to build
|
||||
(referred to as the "target" in this manual).
|
||||
<filename>packagename</filename> is the name of the package you want to build
|
||||
(referred to as the "target" in this manual).
|
||||
The target often equates to the first part of a <filename>.bb</filename> filename.
|
||||
So, to run the <filename>matchbox-desktop_1.2.3.bb</filename> file, you
|
||||
might type the following:
|
||||
@@ -76,15 +76,15 @@
|
||||
</literallayout>
|
||||
Several different versions of <filename>matchbox-desktop</filename> might exist.
|
||||
BitBake chooses the one selected by the distribution configuration.
|
||||
You can get more details about how BitBake chooses between different
|
||||
target versions and providers in the
|
||||
You can get more details about how BitBake chooses between different
|
||||
target versions and providers in the
|
||||
"<link linkend='ref-bitbake-providers'>Preferences and Providers</link>" section.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
BitBake also tries to execute any dependent tasks first.
|
||||
So for example, before building <filename>matchbox-desktop</filename>, BitBake
|
||||
would build a cross compiler and <filename>eglibc</filename> if they had not already
|
||||
would build a cross compiler and <filename>eglibc</filename> if they had not already
|
||||
been built.
|
||||
<note>This release of the Yocto Project does not support the <filename>glibc</filename>
|
||||
GNU version of the Unix standard C library. By default, the OpenEmbedded build system
|
||||
@@ -92,12 +92,12 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
A useful BitBake option to consider is the <filename>-k</filename> or
|
||||
<filename>--continue</filename> option.
|
||||
This option instructs BitBake to try and continue processing the job as much
|
||||
as possible even after encountering an error.
|
||||
A useful BitBake option to consider is the <filename>-k</filename> or
|
||||
<filename>--continue</filename> option.
|
||||
This option instructs BitBake to try and continue processing the job as much
|
||||
as possible even after encountering an error.
|
||||
When an error occurs, the target that
|
||||
failed and those that depend on it cannot be remade.
|
||||
failed and those that depend on it cannot be remade.
|
||||
However, when you use this option other dependencies can still be processed.
|
||||
</para>
|
||||
</section>
|
||||
@@ -106,17 +106,17 @@
|
||||
<title>Metadata (Recipes)</title>
|
||||
|
||||
<para>
|
||||
The <filename>.bb</filename> files are usually referred to as "recipes."
|
||||
The <filename>.bb</filename> files are usually referred to as "recipes."
|
||||
In general, a recipe contains information about a single piece of software.
|
||||
The information includes the location from which to download the source patches
|
||||
(if any are needed), which special configuration options to apply,
|
||||
how to compile the source files, and how to package the compiled output.
|
||||
The information includes the location from which to download the source patches
|
||||
(if any are needed), which special configuration options to apply,
|
||||
how to compile the source files, and how to package the compiled output.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The term "package" can also be used to describe recipes.
|
||||
However, since the same word is used for the packaged output from the OpenEmbedded
|
||||
build system (i.e. <filename>.ipk</filename> or <filename>.deb</filename> files),
|
||||
However, since the same word is used for the packaged output from the OpenEmbedded
|
||||
build system (i.e. <filename>.ipk</filename> or <filename>.deb</filename> files),
|
||||
this document avoids using the term "package" when referring to recipes.
|
||||
</para>
|
||||
</section>
|
||||
@@ -126,7 +126,7 @@
|
||||
|
||||
<para>
|
||||
Class files (<filename>.bbclass</filename>) contain information that is useful to share
|
||||
between metadata files.
|
||||
between metadata files.
|
||||
An example is the Autotools class, which contains
|
||||
common settings for any application that Autotools uses.
|
||||
The "<link linkend='ref-classes'>Classes</link>" chapter provides details
|
||||
@@ -139,8 +139,8 @@
|
||||
|
||||
<para>
|
||||
The configuration files (<filename>.conf</filename>) define various configuration variables
|
||||
that govern the OpenEmbedded build process.
|
||||
These files fall into several areas that define machine configuration options,
|
||||
that govern the OpenEmbedded build process.
|
||||
These files fall into several areas that define machine configuration options,
|
||||
distribution configuration options, compiler tuning options, general common configuration
|
||||
options and user configuration options (<filename>local.conf</filename>, which is found
|
||||
in the <ulink url='build-directory'>Build Directory</ulink>).
|
||||
@@ -152,19 +152,19 @@
|
||||
<title>Shared State Cache</title>
|
||||
|
||||
<para>
|
||||
By design, the OpenEmbedded build system builds everything from scratch unless
|
||||
By design, the OpenEmbedded build system builds everything from scratch unless
|
||||
BitBake can determine that parts don't need to be rebuilt.
|
||||
Fundamentally, building from scratch is attractive as it means all parts are
|
||||
built fresh and there is no possibility of stale data causing problems.
|
||||
Fundamentally, building from scratch is attractive as it means all parts are
|
||||
built fresh and there is no possibility of stale data causing problems.
|
||||
When developers hit problems, they typically default back to building from scratch
|
||||
so they know the state of things from the start.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Building an image from scratch is both an advantage and a disadvantage to the process.
|
||||
As mentioned in the previous paragraph, building from scratch ensures that
|
||||
<para>
|
||||
Building an image from scratch is both an advantage and a disadvantage to the process.
|
||||
As mentioned in the previous paragraph, building from scratch ensures that
|
||||
everything is current and starts from a known state.
|
||||
However, building from scratch also takes much longer as it generally means
|
||||
However, building from scratch also takes much longer as it generally means
|
||||
rebuilding things that don't necessarily need rebuilt.
|
||||
</para>
|
||||
|
||||
@@ -181,15 +181,15 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For the first question, the build system detects changes in the "inputs" to a given task by
|
||||
creating a checksum (or signature) of the task's inputs.
|
||||
If the checksum changes, the system assumes the inputs have changed and the task needs to be
|
||||
For the first question, the build system detects changes in the "inputs" to a given task by
|
||||
creating a checksum (or signature) of the task's inputs.
|
||||
If the checksum changes, the system assumes the inputs have changed and the task needs to be
|
||||
rerun.
|
||||
For the second question, the shared state (sstate) code tracks which tasks add which output
|
||||
to the build process.
|
||||
to the build process.
|
||||
This means the output from a given task can be removed, upgraded or otherwise manipulated.
|
||||
The third question is partly addressed by the solution for the second question
|
||||
assuming the build system can fetch the sstate objects from remote locations and
|
||||
assuming the build system can fetch the sstate objects from remote locations and
|
||||
install them if they are deemed to be valid.
|
||||
</para>
|
||||
|
||||
@@ -202,18 +202,18 @@
|
||||
<title>Overall Architecture</title>
|
||||
|
||||
<para>
|
||||
When determining what parts of the system need to be built, BitBake
|
||||
When determining what parts of the system need to be built, BitBake
|
||||
uses a per-task basis and does not use a per-recipe basis.
|
||||
You might wonder why using a per-task basis is preferred over a per-recipe basis.
|
||||
To help explain, consider having the IPK packaging backend enabled and then switching to DEB.
|
||||
To help explain, consider having the IPK packaging backend enabled and then switching to DEB.
|
||||
In this case, <filename>do_install</filename> and <filename>do_package</filename>
|
||||
output are still valid.
|
||||
However, with a per-recipe approach, the build would not include the
|
||||
<filename>.deb</filename> files.
|
||||
Consequently, you would have to invalidate the whole build and rerun it.
|
||||
However, with a per-recipe approach, the build would not include the
|
||||
<filename>.deb</filename> files.
|
||||
Consequently, you would have to invalidate the whole build and rerun it.
|
||||
Rerunning everything is not the best situation.
|
||||
Also in this case, the core must be "taught" much about specific tasks.
|
||||
This methodology does not scale well and does not allow users to easily add new tasks
|
||||
Also in this case, the core must be "taught" much about specific tasks.
|
||||
This methodology does not scale well and does not allow users to easily add new tasks
|
||||
in layers or as external recipes without touching the packaged-staging core.
|
||||
</para>
|
||||
</section>
|
||||
@@ -222,37 +222,37 @@
|
||||
<title>Checksums (Signatures)</title>
|
||||
|
||||
<para>
|
||||
The shared state code uses a checksum, which is a unique signature of a task's
|
||||
inputs, to determine if a task needs to be run again.
|
||||
The shared state code uses a checksum, which is a unique signature of a task's
|
||||
inputs, to determine if a task needs to be run again.
|
||||
Because it is a change in a task's inputs that triggers a rerun, the process
|
||||
needs to detect all the inputs to a given task.
|
||||
needs to detect all the inputs to a given task.
|
||||
For shell tasks, this turns out to be fairly easy because
|
||||
the build process generates a "run" shell script for each task and
|
||||
it is possible to create a checksum that gives you a good idea of when
|
||||
the build process generates a "run" shell script for each task and
|
||||
it is possible to create a checksum that gives you a good idea of when
|
||||
the task's data changes.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To complicate the problem, there are things that should not be included in
|
||||
the checksum.
|
||||
First, there is the actual specific build path of a given task -
|
||||
the <filename>WORKDIR</filename>.
|
||||
It does not matter if the working directory changes because it should not
|
||||
To complicate the problem, there are things that should not be included in
|
||||
the checksum.
|
||||
First, there is the actual specific build path of a given task -
|
||||
the <filename>WORKDIR</filename>.
|
||||
It does not matter if the working directory changes because it should not
|
||||
affect the output for target packages.
|
||||
Also, the build process has the objective of making native/cross packages relocatable.
|
||||
Also, the build process has the objective of making native/cross packages relocatable.
|
||||
The checksum therefore needs to exclude <filename>WORKDIR</filename>.
|
||||
The simplistic approach for excluding the working directory is to set
|
||||
The simplistic approach for excluding the working directory is to set
|
||||
<filename>WORKDIR</filename> to some fixed value and create the checksum
|
||||
for the "run" script.
|
||||
for the "run" script.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Another problem results from the "run" scripts containing functions that
|
||||
might or might not get called.
|
||||
The incremental build solution contains code that figures out dependencies
|
||||
Another problem results from the "run" scripts containing functions that
|
||||
might or might not get called.
|
||||
The incremental build solution contains code that figures out dependencies
|
||||
between shell functions.
|
||||
This code is used to prune the "run" scripts down to the minimum set,
|
||||
thereby alleviating this problem and making the "run" scripts much more
|
||||
This code is used to prune the "run" scripts down to the minimum set,
|
||||
thereby alleviating this problem and making the "run" scripts much more
|
||||
readable as a bonus.
|
||||
</para>
|
||||
|
||||
@@ -260,62 +260,62 @@
|
||||
So far we have solutions for shell scripts.
|
||||
What about python tasks?
|
||||
The same approach applies even though these tasks are more difficult.
|
||||
The process needs to figure out what variables a python function accesses
|
||||
The process needs to figure out what variables a python function accesses
|
||||
and what functions it calls.
|
||||
Again, the incremental build solution contains code that first figures out
|
||||
the variable and function dependencies, and then creates a checksum for the data
|
||||
Again, the incremental build solution contains code that first figures out
|
||||
the variable and function dependencies, and then creates a checksum for the data
|
||||
used as the input to the task.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Like the <filename>WORKDIR</filename> case, situations exist where dependencies
|
||||
Like the <filename>WORKDIR</filename> case, situations exist where dependencies
|
||||
should be ignored.
|
||||
For these cases, you can instruct the build process to ignore a dependency
|
||||
by using a line like the following:
|
||||
<literallayout class='monospaced'>
|
||||
PACKAGE_ARCHS[vardepsexclude] = "MACHINE"
|
||||
</literallayout>
|
||||
This example ensures that the <filename>PACKAGE_ARCHS</filename> variable does not
|
||||
This example ensures that the <filename>PACKAGE_ARCHS</filename> variable does not
|
||||
depend on the value of <filename>MACHINE</filename>, even if it does reference it.
|
||||
</para>
|
||||
|
||||
|
||||
<para>
|
||||
Equally, there are cases where we need to add dependencies BitBake is not able to find.
|
||||
You can accomplish this by using a line like the following:
|
||||
<literallayout class='monospaced'>
|
||||
PACKAGE_ARCHS[vardeps] = "MACHINE"
|
||||
</literallayout>
|
||||
This example explicitly adds the <filename>MACHINE</filename> variable as a
|
||||
This example explicitly adds the <filename>MACHINE</filename> variable as a
|
||||
dependency for <filename>PACKAGE_ARCHS</filename>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<para>
|
||||
Consider a case with inline python, for example, where BitBake is not
|
||||
able to figure out dependencies.
|
||||
When running in debug mode (i.e. using <filename>-DDD</filename>), BitBake
|
||||
able to figure out dependencies.
|
||||
When running in debug mode (i.e. using <filename>-DDD</filename>), BitBake
|
||||
produces output when it discovers something for which it cannot figure out
|
||||
dependencies.
|
||||
The Yocto Project team has currently not managed to cover those dependencies
|
||||
dependencies.
|
||||
The Yocto Project team has currently not managed to cover those dependencies
|
||||
in detail and is aware of the need to fix this situation.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Thus far, this section has limited discussion to the direct inputs into a task.
|
||||
Information based on direct inputs is referred to as the "basehash" in the
|
||||
code.
|
||||
code.
|
||||
However, there is still the question of a task's indirect inputs - the
|
||||
things that were already built and present in the Build Directory.
|
||||
The checksum (or signature) for a particular task needs to add the hashes
|
||||
of all the tasks on which the particular task depends.
|
||||
Choosing which dependencies to add is a policy decision.
|
||||
However, the effect is to generate a master checksum that combines the basehash
|
||||
things that were already built and present in the Build Directory.
|
||||
The checksum (or signature) for a particular task needs to add the hashes
|
||||
of all the tasks on which the particular task depends.
|
||||
Choosing which dependencies to add is a policy decision.
|
||||
However, the effect is to generate a master checksum that combines the basehash
|
||||
and the hashes of the task's dependencies.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
At the code level, there are a variety of ways both the basehash and the
|
||||
dependent task hashes can be influenced.
|
||||
Within the BitBake configuration file, we can give BitBake some extra information
|
||||
dependent task hashes can be influenced.
|
||||
Within the BitBake configuration file, we can give BitBake some extra information
|
||||
to help it construct the basehash.
|
||||
The following statements effectively result in a list of global variable
|
||||
dependency excludes - variables never included in any checksum:
|
||||
@@ -325,42 +325,42 @@
|
||||
BB_HASHBASE_WHITELIST += "FILE_DIRNAME HOME LOGNAME SHELL TERM USER"
|
||||
BB_HASHBASE_WHITELIST += "FILESPATH USERNAME STAGING_DIR_HOST STAGING_DIR_TARGET"
|
||||
</literallayout>
|
||||
The previous example actually excludes
|
||||
The previous example actually excludes
|
||||
<link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>
|
||||
since it is actually constructed as a path within
|
||||
<link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>, which is on
|
||||
the whitelist.
|
||||
since it is actually constructed as a path within
|
||||
<link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>, which is on
|
||||
the whitelist.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The rules for deciding which hashes of dependent tasks to include through
|
||||
dependency chains are more complex and are generally accomplished with a
|
||||
python function.
|
||||
dependency chains are more complex and are generally accomplished with a
|
||||
python function.
|
||||
The code in <filename>meta/lib/oe/sstatesig.py</filename> shows two examples
|
||||
of this and also illustrates how you can insert your own policy into the system
|
||||
of this and also illustrates how you can insert your own policy into the system
|
||||
if so desired.
|
||||
This file defines the two basic signature generators <filename>OE-Core</filename>
|
||||
uses: "OEBasic" and "OEBasicHash".
|
||||
By default, there is a dummy "noop" signature handler enabled in BitBake.
|
||||
This means that behavior is unchanged from previous versions.
|
||||
uses: "OEBasic" and "OEBasicHash".
|
||||
By default, there is a dummy "noop" signature handler enabled in BitBake.
|
||||
This means that behavior is unchanged from previous versions.
|
||||
<filename>OE-Core</filename> uses the "OEBasic" signature handler by default
|
||||
through this setting in the <filename>bitbake.conf</filename> file:
|
||||
<literallayout class='monospaced'>
|
||||
BB_SIGNATURE_HANDLER ?= "OEBasic"
|
||||
</literallayout>
|
||||
The "OEBasicHash" <filename>BB_SIGNATURE_HANDLER</filename> is the same as the
|
||||
"OEBasic" version but adds the task hash to the stamp files.
|
||||
This results in any metadata change that changes the task hash, automatically
|
||||
causing the task to be run again.
|
||||
The "OEBasicHash" <filename>BB_SIGNATURE_HANDLER</filename> is the same as the
|
||||
"OEBasic" version but adds the task hash to the stamp files.
|
||||
This results in any metadata change that changes the task hash, automatically
|
||||
causing the task to be run again.
|
||||
This removes the need to bump <link linkend='var-PR'><filename>PR</filename></link>
|
||||
values and changes to metadata automatically ripple across the build.
|
||||
values and changes to metadata automatically ripple across the build.
|
||||
Currently, this behavior is not the default behavior for <filename>OE-Core</filename>
|
||||
but is the default in <filename>poky</filename>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
It is also worth noting that the end result of these signature generators is to
|
||||
make some dependency and hash information available to the build.
|
||||
make some dependency and hash information available to the build.
|
||||
This information includes:
|
||||
<literallayout class='monospaced'>
|
||||
BB_BASEHASH_task-<taskname> - the base hashes for each task in the recipe
|
||||
@@ -375,15 +375,15 @@
|
||||
<title>Shared State</title>
|
||||
|
||||
<para>
|
||||
Checksums and dependencies, as discussed in the previous section, solve half the
|
||||
Checksums and dependencies, as discussed in the previous section, solve half the
|
||||
problem.
|
||||
The other part of the problem is being able to use checksum information during the build
|
||||
and being able to reuse or rebuild specific components.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The shared state class (<filename>sstate.bbclass</filename>)
|
||||
is a relatively generic implementation of how to "capture" a snapshot of a given task.
|
||||
The shared state class (<filename>sstate.bbclass</filename>)
|
||||
is a relatively generic implementation of how to "capture" a snapshot of a given task.
|
||||
The idea is that the build process does not care about the source of a task's output.
|
||||
Output could be freshly built or it could be downloaded and unpacked from
|
||||
somewhere - the build process doesn't need to worry about its source.
|
||||
@@ -392,17 +392,17 @@
|
||||
<para>
|
||||
There are two types of output, one is just about creating a directory
|
||||
in <filename>WORKDIR</filename>.
|
||||
A good example is the output of either <filename>do_install</filename> or
|
||||
<filename>do_package</filename>.
|
||||
The other type of output occurs when a set of data is merged into a shared directory
|
||||
A good example is the output of either <filename>do_install</filename> or
|
||||
<filename>do_package</filename>.
|
||||
The other type of output occurs when a set of data is merged into a shared directory
|
||||
tree such as the sysroot.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The Yocto Project team has tried to keep the details of the implementation hidden in
|
||||
<filename>sstate.bbclass</filename>.
|
||||
The Yocto Project team has tried to keep the details of the implementation hidden in
|
||||
<filename>sstate.bbclass</filename>.
|
||||
From a user's perspective, adding shared state wrapping to a task
|
||||
is as simple as this <filename>do_deploy</filename> example taken from
|
||||
is as simple as this <filename>do_deploy</filename> example taken from
|
||||
<filename>do_deploy.bbclass</filename>:
|
||||
<literallayout class='monospaced'>
|
||||
DEPLOYDIR = "${WORKDIR}/deploy-${PN}"
|
||||
@@ -418,13 +418,13 @@
|
||||
</literallayout>
|
||||
In the example, we add some extra flags to the task, a name field ("deploy"), an
|
||||
input directory where the task sends data, and the output
|
||||
directory where the data from the task should eventually be copied.
|
||||
directory where the data from the task should eventually be copied.
|
||||
We also add a <filename>_setscene</filename> variant of the task and add the task
|
||||
name to the <filename>SSTATETASKS</filename> list.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If you have a directory whose contents you need to preserve, you can do this with
|
||||
If you have a directory whose contents you need to preserve, you can do this with
|
||||
a line like the following:
|
||||
<literallayout class='monospaced'>
|
||||
do_package[sstate-plaindirs] = "${PKGD} ${PKGDEST}"
|
||||
@@ -441,21 +441,21 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Behind the scenes, the shared state code works by looking in
|
||||
<link linkend='var-SSTATE_DIR'><filename>SSTATE_DIR</filename></link> and
|
||||
Behind the scenes, the shared state code works by looking in
|
||||
<link linkend='var-SSTATE_DIR'><filename>SSTATE_DIR</filename></link> and
|
||||
<link linkend='var-SSTATE_MIRRORS'><filename>SSTATE_MIRRORS</filename></link>
|
||||
for shared state files.
|
||||
for shared state files.
|
||||
Here is an example:
|
||||
<literallayout class='monospaced'>
|
||||
SSTATE_MIRRORS ?= "\
|
||||
file://.* http://someserver.tld/share/sstate/PATH \n \
|
||||
file://.* file:///some/local/dir/sstate/PATH"
|
||||
</literallayout>
|
||||
<note>
|
||||
The shared state directory (<filename>SSTATE_DIR</filename>) is
|
||||
organized into two-character subdirectories, where the subdirectory
|
||||
<note>
|
||||
The shared state directory (<filename>SSTATE_DIR</filename>) is
|
||||
organized into two-character subdirectories, where the subdirectory
|
||||
names are based on the first two characters of the hash.
|
||||
If the shared state directory structure for a mirror has the
|
||||
If the shared state directory structure for a mirror has the
|
||||
same structure as <filename>SSTATE_DIR</filename>, you must
|
||||
specify "PATH" as part of the URI to enable the build system
|
||||
to map to the appropriate subdirectory.
|
||||
@@ -465,8 +465,8 @@
|
||||
<para>
|
||||
The shared state package validity can be detected just by looking at the
|
||||
filename since the filename contains the task checksum (or signature) as
|
||||
described earlier in this section.
|
||||
If a valid shared state package is found, the build process downloads it
|
||||
described earlier in this section.
|
||||
If a valid shared state package is found, the build process downloads it
|
||||
and uses it to accelerate the task.
|
||||
</para>
|
||||
|
||||
@@ -474,19 +474,19 @@
|
||||
The build processes uses the <filename>*_setscene</filename> tasks
|
||||
for the task acceleration phase.
|
||||
BitBake goes through this phase before the main execution code and tries
|
||||
to accelerate any tasks for which it can find shared state packages.
|
||||
to accelerate any tasks for which it can find shared state packages.
|
||||
If a shared state package for a task is available, the shared state
|
||||
package is used.
|
||||
This means the task and any tasks on which it is dependent are not
|
||||
This means the task and any tasks on which it is dependent are not
|
||||
executed.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
As a real world example, the aim is when building an IPK-based image,
|
||||
only the <filename>do_package_write_ipk</filename> tasks would have their
|
||||
shared state packages fetched and extracted.
|
||||
Since the sysroot is not used, it would never get extracted.
|
||||
This is another reason why a task-based approach is preferred over a
|
||||
only the <filename>do_package_write_ipk</filename> tasks would have their
|
||||
shared state packages fetched and extracted.
|
||||
Since the sysroot is not used, it would never get extracted.
|
||||
This is another reason why a task-based approach is preferred over a
|
||||
recipe-based approach, which would have to install the output from every task.
|
||||
</para>
|
||||
</section>
|
||||
@@ -495,9 +495,9 @@
|
||||
<title>Tips and Tricks</title>
|
||||
|
||||
<para>
|
||||
The code in the build system that supports incremental builds is not
|
||||
The code in the build system that supports incremental builds is not
|
||||
simple code.
|
||||
This section presents some tips and tricks that help you work around
|
||||
This section presents some tips and tricks that help you work around
|
||||
issues related to shared state code.
|
||||
</para>
|
||||
|
||||
@@ -505,25 +505,25 @@
|
||||
<title>Debugging</title>
|
||||
|
||||
<para>
|
||||
When things go wrong, debugging needs to be straightforward.
|
||||
When things go wrong, debugging needs to be straightforward.
|
||||
Because of this, the Yocto Project team included strong debugging
|
||||
tools:
|
||||
<itemizedlist>
|
||||
<listitem><para>Whenever a shared state package is written out, so is a
|
||||
corresponding <filename>.siginfo</filename> file.
|
||||
corresponding <filename>.siginfo</filename> file.
|
||||
This practice results in a pickled python database of all
|
||||
the metadata that went into creating the hash for a given shared state
|
||||
package.</para></listitem>
|
||||
<listitem><para>If BitBake is run with the <filename>--dump-signatures</filename>
|
||||
(or <filename>-S</filename>) option, BitBake dumps out
|
||||
(or <filename>-S</filename>) option, BitBake dumps out
|
||||
<filename>.siginfo</filename> files in
|
||||
the stamp directory for every task it would have executed instead of
|
||||
building the specified target package.</para></listitem>
|
||||
<listitem><para>There is a <filename>bitbake-diffsigs</filename> command that
|
||||
can process these <filename>.siginfo</filename> files.
|
||||
can process these <filename>.siginfo</filename> files.
|
||||
If one file is specified, it will dump out the dependency
|
||||
information in the file.
|
||||
If two files are specified, it will compare the two files and dump out
|
||||
information in the file.
|
||||
If two files are specified, it will compare the two files and dump out
|
||||
the differences between the two.
|
||||
This allows the question of "What changed between X and Y?" to be
|
||||
answered easily.</para></listitem>
|
||||
@@ -538,41 +538,41 @@
|
||||
The shared state code uses checksums and shared state
|
||||
cache to avoid unnecessarily rebuilding tasks.
|
||||
As with all schemes, this one has some drawbacks.
|
||||
It is possible that you could make implicit changes that are not factored
|
||||
into the checksum calculation, but do affect a task's output.
|
||||
It is possible that you could make implicit changes that are not factored
|
||||
into the checksum calculation, but do affect a task's output.
|
||||
A good example is perhaps when a tool changes its output.
|
||||
Let's say that the output of <filename>rpmdeps</filename> needed to change.
|
||||
The result of the change should be that all the "package", "package_write_rpm",
|
||||
and "package_deploy-rpm" shared state cache items would become invalid.
|
||||
But, because this is a change that is external to the code and therefore implicit,
|
||||
the associated shared state cache items do not become invalidated.
|
||||
In this case, the build process would use the cached items rather than running the
|
||||
task again.
|
||||
In this case, the build process would use the cached items rather than running the
|
||||
task again.
|
||||
Obviously, these types of implicit changes can cause problems.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To avoid these problems during the build, you need to understand the effects of any
|
||||
change you make.
|
||||
Note that any changes you make directly to a function automatically are factored into
|
||||
Note that any changes you make directly to a function automatically are factored into
|
||||
the checksum calculation and thus, will invalidate the associated area of sstate cache.
|
||||
You need to be aware of any implicit changes that are not obvious changes to the
|
||||
code and could affect the output of a given task.
|
||||
Once you are aware of such a change, you can take steps to invalidate the cache
|
||||
and force the task to run.
|
||||
The step to take is as simple as changing a function's comments in the source code.
|
||||
You need to be aware of any implicit changes that are not obvious changes to the
|
||||
code and could affect the output of a given task.
|
||||
Once you are aware of such a change, you can take steps to invalidate the cache
|
||||
and force the task to run.
|
||||
The step to take is as simple as changing a function's comments in the source code.
|
||||
For example, to invalidate package shared state files, change the comment statements
|
||||
of <filename>do_package</filename> or the comments of one of the functions it calls.
|
||||
The change is purely cosmetic, but it causes the checksum to be recalculated and
|
||||
The change is purely cosmetic, but it causes the checksum to be recalculated and
|
||||
forces the task to be run again.
|
||||
</para>
|
||||
|
||||
<note>
|
||||
For an example of a commit that makes a cosmetic change to invalidate
|
||||
For an example of a commit that makes a cosmetic change to invalidate
|
||||
a shared state, see this
|
||||
<ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/commit/meta/classes/package.bbclass?id=737f8bbb4f27b4837047cb9b4fbfe01dfde36d54'>commit</ulink>.
|
||||
</note>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
@@ -580,24 +580,24 @@
|
||||
<title>x32</title>
|
||||
|
||||
<para>
|
||||
x32 is a new processor-specific Application Binary Interface (psABI) for x86_64.
|
||||
An ABI defines the calling conventions between functions in a processing environment.
|
||||
x32 is a new processor-specific Application Binary Interface (psABI) for x86_64.
|
||||
An ABI defines the calling conventions between functions in a processing environment.
|
||||
The interface determines what registers are used and what the sizes are for various C data types.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Some processing environments prefer using 32-bit applications even when running
|
||||
on Intel 64-bit platforms.
|
||||
Some processing environments prefer using 32-bit applications even when running
|
||||
on Intel 64-bit platforms.
|
||||
Consider the i386 psABI, which is a very old 32-bit ABI for Intel 64-bit platforms.
|
||||
The i386 psABI does not provide efficient use and access of the Intel 64-bit processor resources,
|
||||
leaving the system underutilized.
|
||||
leaving the system underutilized.
|
||||
Now consider the x86_64 psABI.
|
||||
This ABI is newer and uses 64-bits for data sizes and program pointers.
|
||||
The extra bits increase the footprint size of the programs, libraries,
|
||||
The extra bits increase the footprint size of the programs, libraries,
|
||||
and also increases the memory and file system size requirements.
|
||||
Executing under the x32 psABI enables user programs to utilize CPU and system resources
|
||||
Executing under the x32 psABI enables user programs to utilize CPU and system resources
|
||||
more efficiently while keeping the memory footprint of the applications low.
|
||||
Extra bits are used for registers but not for addressing mechanisms.
|
||||
Extra bits are used for registers but not for addressing mechanisms.
|
||||
</para>
|
||||
|
||||
<section id='support'>
|
||||
@@ -608,14 +608,14 @@
|
||||
release supports current development specifications of x32 psABI.
|
||||
As of this release of the Yocto Project, x32 psABI support exists as follows:
|
||||
<itemizedlist>
|
||||
<listitem><para>You can create packages and images in x32 psABI format on x86_64 architecture targets.
|
||||
<listitem><para>You can create packages and images in x32 psABI format on x86_64 architecture targets.
|
||||
</para></listitem>
|
||||
<listitem><para>You can use the x32 psABI support through the <filename>meta-x32</filename>
|
||||
layer on top of the OE-core/Yocto layer.</para></listitem>
|
||||
<listitem><para>The toolchain from the <filename>experimental/meta-x32</filename> layer
|
||||
<listitem><para>The toolchain from the <filename>experimental/meta-x32</filename> layer
|
||||
is used for building x32 psABI program binaries.</para></listitem>
|
||||
<listitem><para>You can successfully build many recipes with the x32 toolchain.</para></listitem>
|
||||
<listitem><para>You can create and boot <filename>core-image-minimal</filename> and
|
||||
<listitem><para>You can create and boot <filename>core-image-minimal</filename> and
|
||||
<filename>core-image-sato</filename> images.</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
@@ -625,18 +625,18 @@
|
||||
<title>Future Development and Limitations</title>
|
||||
|
||||
<para>
|
||||
As of this Yocto Project release, the x32 psABI kernel and library interfaces
|
||||
As of this Yocto Project release, the x32 psABI kernel and library interfaces
|
||||
specifications are not finalized.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Future Plans for the x32 psABI in the Yocto Project include the following:
|
||||
<itemizedlist>
|
||||
<listitem><para>Enhance and fix the few remaining recipes so they
|
||||
<listitem><para>Enhance and fix the few remaining recipes so they
|
||||
work with and support x32 toolchains.</para></listitem>
|
||||
<listitem><para>Enhance RPM Package Manager (RPM) support for x32 binaries.</para></listitem>
|
||||
<listitem><para>Support larger images.</para></listitem>
|
||||
<listitem><para>Integrate x32 recipes, toolchain, and kernel changes from
|
||||
<listitem><para>Integrate x32 recipes, toolchain, and kernel changes from
|
||||
<filename>experimental/meta-x32</filename> into OE-core.</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
@@ -650,7 +650,7 @@
|
||||
Yocto Project, you can follow these steps to use the x32 spABI:
|
||||
<itemizedlist>
|
||||
<listitem><para>Add the <filename>experimental/meta-x32</filename> layer to your local
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
|
||||
You can find the <filename>experimental/meta-x32</filename> source repository at
|
||||
<ulink url='&YOCTO_GIT_URL;'></ulink>.</para></listitem>
|
||||
<listitem><para>Edit your <filename>conf/bblayers.conf</filename> file so that it includes
|
||||
@@ -677,8 +677,8 @@
|
||||
or 'INVALID'), True) or 'lib'}"
|
||||
#MACHINE = "atom-pc"
|
||||
#DEFAULTTUNE = "core2-64-x32"
|
||||
</literallayout></para></listitem>
|
||||
<listitem><para>As usual, use BitBake to build an image that supports the x32 psABI.
|
||||
</literallayout></para></listitem>
|
||||
<listitem><para>As usual, use BitBake to build an image that supports the x32 psABI.
|
||||
Here is an example:
|
||||
<literallayout class='monospaced'>
|
||||
$ bitake core-image-sato
|
||||
@@ -696,15 +696,15 @@
|
||||
<title>Licenses</title>
|
||||
|
||||
<para>
|
||||
This section describes the mechanism by which the OpenEmbedded build system
|
||||
This section describes the mechanism by which the OpenEmbedded build system
|
||||
tracks changes to licensing text.
|
||||
The section also describes how to enable commercially licensed recipes,
|
||||
The section also describes how to enable commercially licensed recipes,
|
||||
which by default are disabled.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For information that can help you maintain compliance with various open
|
||||
source licensing during the lifecycle of the product, see the
|
||||
For information that can help you maintain compliance with various open
|
||||
source licensing during the lifecycle of the product, see the
|
||||
"<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle'>Maintaining Open Source License Compliance During Your Project's Lifecycle</ulink>" section
|
||||
in the Yocto Project Development Manual.
|
||||
</para>
|
||||
@@ -713,8 +713,8 @@
|
||||
<title>Tracking License Changes</title>
|
||||
|
||||
<para>
|
||||
The license of an upstream project might change in the future.
|
||||
In order to prevent these changes going unnoticed, the
|
||||
The license of an upstream project might change in the future.
|
||||
In order to prevent these changes going unnoticed, the
|
||||
<filename><link linkend='var-LIC_FILES_CHKSUM'>LIC_FILES_CHKSUM</link></filename>
|
||||
variable tracks changes to the license text. The checksums are validated at the end of the
|
||||
configure step, and if the checksums do not match, the build will fail.
|
||||
@@ -736,15 +736,15 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The build system uses the
|
||||
<filename><link linkend='var-S'>S</link></filename> variable as the
|
||||
default directory used when searching files listed in
|
||||
The build system uses the
|
||||
<filename><link linkend='var-S'>S</link></filename> variable as the
|
||||
default directory used when searching files listed in
|
||||
<filename>LIC_FILES_CHKSUM</filename>.
|
||||
The previous example employs the default directory.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
You can also use relative paths as shown in the following example:
|
||||
You can also use relative paths as shown in the following example:
|
||||
<literallayout class='monospaced'>
|
||||
LIC_FILES_CHKSUM = "file://src/ls.c;startline=5;endline=16;\
|
||||
md5=bb14ed3c4cda583abc85401304b5cd4e"
|
||||
@@ -753,14 +753,14 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In this example, the first line locates a file in
|
||||
<filename>${S}/src/ls.c</filename>.
|
||||
The second line refers to a file in
|
||||
In this example, the first line locates a file in
|
||||
<filename>${S}/src/ls.c</filename>.
|
||||
The second line refers to a file in
|
||||
<filename><link linkend='var-WORKDIR'>WORKDIR</link></filename>, which is the parent
|
||||
of <filename><link linkend='var-S'>S</link></filename>.
|
||||
</para>
|
||||
<para>
|
||||
Note that this variable is mandatory for all recipes, unless the
|
||||
Note that this variable is mandatory for all recipes, unless the
|
||||
<filename>LICENSE</filename> variable is set to "CLOSED".
|
||||
</para>
|
||||
</section>
|
||||
@@ -768,48 +768,48 @@
|
||||
<section id="usingpoky-LIC_FILES_CHKSUM-explanation-of-syntax">
|
||||
<title>Explanation of Syntax</title>
|
||||
<para>
|
||||
As mentioned in the previous section, the
|
||||
<filename>LIC_FILES_CHKSUM</filename> variable lists all the
|
||||
important files that contain the license text for the source code.
|
||||
As mentioned in the previous section, the
|
||||
<filename>LIC_FILES_CHKSUM</filename> variable lists all the
|
||||
important files that contain the license text for the source code.
|
||||
It is possible to specify a checksum for an entire file, or a specific section of a
|
||||
file (specified by beginning and ending line numbers with the "beginline" and "endline"
|
||||
parameters, respectively).
|
||||
parameters, respectively).
|
||||
The latter is useful for source files with a license notice header,
|
||||
README documents, and so forth.
|
||||
If you do not use the "beginline" parameter, then it is assumed that the text begins on the
|
||||
first line of the file.
|
||||
Similarly, if you do not use the "endline" parameter, it is assumed that the license text
|
||||
ends with the last line of the file.
|
||||
If you do not use the "beginline" parameter, then it is assumed that the text begins on the
|
||||
first line of the file.
|
||||
Similarly, if you do not use the "endline" parameter, it is assumed that the license text
|
||||
ends with the last line of the file.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The "md5" parameter stores the md5 checksum of the license text.
|
||||
The "md5" parameter stores the md5 checksum of the license text.
|
||||
If the license text changes in any way as compared to this parameter
|
||||
then a mismatch occurs.
|
||||
This mismatch triggers a build failure and notifies the developer.
|
||||
Notification allows the developer to review and address the license text changes.
|
||||
Also note that if a mismatch occurs during the build, the correct md5
|
||||
Also note that if a mismatch occurs during the build, the correct md5
|
||||
checksum is placed in the build log and can be easily copied to the recipe.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
There is no limit to how many files you can specify using the
|
||||
There is no limit to how many files you can specify using the
|
||||
<filename>LIC_FILES_CHKSUM</filename> variable.
|
||||
Generally, however, every project requires a few specifications for license tracking.
|
||||
Many projects have a "COPYING" file that stores the license information for all the source
|
||||
Generally, however, every project requires a few specifications for license tracking.
|
||||
Many projects have a "COPYING" file that stores the license information for all the source
|
||||
code files.
|
||||
This practice allows you to just track the "COPYING" file as long as it is kept up to date.
|
||||
This practice allows you to just track the "COPYING" file as long as it is kept up to date.
|
||||
</para>
|
||||
|
||||
<tip>
|
||||
If you specify an empty or invalid "md5" parameter, BitBake returns an md5 mis-match
|
||||
error and displays the correct "md5" parameter value during the build.
|
||||
The correct parameter is also captured in the build log.
|
||||
If you specify an empty or invalid "md5" parameter, BitBake returns an md5 mis-match
|
||||
error and displays the correct "md5" parameter value during the build.
|
||||
The correct parameter is also captured in the build log.
|
||||
</tip>
|
||||
|
||||
<tip>
|
||||
If the whole file contains only license text, you do not need to use the "beginline" and
|
||||
"endline" parameters.
|
||||
If the whole file contains only license text, you do not need to use the "beginline" and
|
||||
"endline" parameters.
|
||||
</tip>
|
||||
</section>
|
||||
</section>
|
||||
@@ -820,10 +820,10 @@
|
||||
<para>
|
||||
By default, the OpenEmbedded build system disables
|
||||
components that have commercial or other special licensing
|
||||
requirements.
|
||||
requirements.
|
||||
Such requirements are defined on a
|
||||
recipe-by-recipe basis through the <filename>LICENSE_FLAGS</filename> variable
|
||||
definition in the affected recipe.
|
||||
definition in the affected recipe.
|
||||
For instance, the
|
||||
<filename>$HOME/poky/meta/recipes-multimedia/gstreamer/gst-plugins-ugly</filename>
|
||||
recipe contains the following statement:
|
||||
@@ -839,7 +839,7 @@
|
||||
definition to be enabled and included in an image, it
|
||||
needs to have a matching entry in the global
|
||||
<filename>LICENSE_FLAGS_WHITELIST</filename> variable, which is a variable
|
||||
typically defined in your <filename>local.conf</filename> file.
|
||||
typically defined in your <filename>local.conf</filename> file.
|
||||
For example, to enable
|
||||
the <filename>$HOME/poky/meta/recipes-multimedia/gstreamer/gst-plugins-ugly</filename>
|
||||
package, you could add either the string
|
||||
@@ -867,7 +867,7 @@
|
||||
the initial underscore character or characters.
|
||||
A partial string will match
|
||||
any license that contains the given string as the first
|
||||
portion of its license.
|
||||
portion of its license.
|
||||
For example, the following
|
||||
whitelist string will also match both of the packages
|
||||
previously mentioned as well as any other packages that have
|
||||
@@ -879,7 +879,7 @@
|
||||
|
||||
<section id="license-flag-matching">
|
||||
<title>License Flag Matching</title>
|
||||
|
||||
|
||||
<para>
|
||||
The definition of 'matching' in reference to a
|
||||
recipe's <filename>LICENSE_FLAGS</filename> setting is simple.
|
||||
@@ -891,7 +891,7 @@
|
||||
Before a flag
|
||||
defined by a particular recipe is tested against the
|
||||
contents of the <filename>LICENSE_FLAGS_WHITELIST</filename> variable, the
|
||||
string <filename>_${PN}</filename> (with
|
||||
string <filename>_${PN}</filename> (with
|
||||
<link linkend='var-PN'><filename>PN</filename></link> expanded of course) is
|
||||
appended to the flag, thus automatically making each
|
||||
<filename>LICENSE_FLAGS</filename> value recipe-specific.
|
||||
@@ -907,7 +907,7 @@
|
||||
You can broaden the match by
|
||||
putting any "_"-separated beginning subset of a
|
||||
<filename>LICENSE_FLAGS</filename> flag in the whitelist, which will also
|
||||
match.
|
||||
match.
|
||||
For example, simply specifying "commercial" in
|
||||
the whitelist would match any expanded <filename>LICENSE_FLAGS</filename>
|
||||
definition starting with "commercial" such as
|
||||
@@ -923,7 +923,7 @@
|
||||
<para>
|
||||
Broadening the match allows for a range of specificity for the items
|
||||
in the whitelist, from more general to perfectly
|
||||
specific.
|
||||
specific.
|
||||
So you have the choice of exhaustively
|
||||
enumerating each license flag in the whitelist to
|
||||
allow only those specific recipes into the image, or
|
||||
@@ -935,7 +935,7 @@
|
||||
<para>
|
||||
This scheme works even if the flag already
|
||||
has <filename>_${PN}</filename> appended - the extra <filename>_${PN}</filename> is
|
||||
redundant, but does not affect the outcome.
|
||||
redundant, but does not affect the outcome.
|
||||
For example, a license flag of "commercial_1.2_foo" would
|
||||
turn into "commercial_1.2_foo_foo" and would match
|
||||
both the general "commercial" and the specific
|
||||
@@ -944,8 +944,8 @@
|
||||
"commercial_1.2_foo_foo" and "commercial_1.2", which
|
||||
does not make much sense regarding use in the whitelist.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
|
||||
<para>
|
||||
For a versioned string, you could instead specify
|
||||
"commercial_foo_1.2", which would turn into
|
||||
"commercial_foo_1.2_foo".
|
||||
@@ -993,8 +993,8 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Specifying audio and video plug-ins as part of the
|
||||
<filename>COMMERCIAL_AUDIO_PLUGINS</filename> and
|
||||
Specifying audio and video plug-ins as part of the
|
||||
<filename>COMMERCIAL_AUDIO_PLUGINS</filename> and
|
||||
<filename>COMMERCIAL_VIDEO_PLUGINS</filename> statements
|
||||
or commercial qt components as part of
|
||||
the <filename>COMMERCIAL_QT</filename> statement (along
|
||||
@@ -1006,6 +1006,6 @@
|
||||
</section>
|
||||
</section>
|
||||
</chapter>
|
||||
<!--
|
||||
vim: expandtab tw=80 ts=4
|
||||
<!--
|
||||
vim: expandtab tw=80 ts=4
|
||||
-->
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
<para>
|
||||
This section provides a summary of the build process and provides information
|
||||
for less obvious aspects of the build process.
|
||||
For general information on how to build an image using the OpenEmbedded build
|
||||
system, see the
|
||||
For general information on how to build an image using the OpenEmbedded build
|
||||
system, see the
|
||||
"<ulink url='&YOCTO_DOCS_QS_URL;#building-image'>Building an Image</ulink>"
|
||||
section of the Yocto Project Quick Start.
|
||||
</para>
|
||||
@@ -35,12 +35,12 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The <filename>build_dir</filename> is optional and specifies the directory the
|
||||
OpenEmbedded build system uses for the build -
|
||||
The <filename>build_dir</filename> is optional and specifies the directory the
|
||||
OpenEmbedded build system uses for the build -
|
||||
the <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
|
||||
If you do not specify a Build Directory it defaults to <filename>build</filename>
|
||||
in your current working directory.
|
||||
A common practice is to use a different Build Directory for different targets.
|
||||
A common practice is to use a different Build Directory for different targets.
|
||||
For example, <filename>~/build/x86</filename> for a <filename>qemux86</filename>
|
||||
target, and <filename>~/build/arm</filename> for a <filename>qemuarm</filename> target.
|
||||
See <link linkend="structure-core-script">&OE_INIT_FILE;</link>
|
||||
@@ -55,13 +55,13 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The <filename>target</filename> is the name of the recipe you want to build.
|
||||
The <filename>target</filename> is the name of the recipe you want to build.
|
||||
Common targets are the images in <filename>meta/recipes-core/images</filename>,
|
||||
<filename>/meta/recipes-sato/images</filename>, etc. all found in the
|
||||
<filename>/meta/recipes-sato/images</filename>, etc. all found in the
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
|
||||
Or, the target can be the name of a recipe for a specific piece of software such as
|
||||
<application>busybox</application>.
|
||||
For more details about the images the OpenEmbedded build system supports, see the
|
||||
Or, the target can be the name of a recipe for a specific piece of software such as
|
||||
<application>busybox</application>.
|
||||
For more details about the images the OpenEmbedded build system supports, see the
|
||||
"<link linkend="ref-images">Images</link>" chapter.
|
||||
</para>
|
||||
|
||||
@@ -76,9 +76,9 @@
|
||||
<title>Building an Image Using GPL Components</title>
|
||||
|
||||
<para>
|
||||
When building an image using GPL components, you need to maintain your original
|
||||
When building an image using GPL components, you need to maintain your original
|
||||
settings and not switch back and forth applying different versions of the GNU
|
||||
General Public License.
|
||||
General Public License.
|
||||
If you rebuild using different versions of GPL, dependency errors might occur
|
||||
due to some components not being rebuilt.
|
||||
</para>
|
||||
@@ -89,11 +89,11 @@
|
||||
<title>Installing and Using the Result</title>
|
||||
|
||||
<para>
|
||||
Once an image has been built, it often needs to be installed.
|
||||
The images and kernels built by the OpenEmbedded build system are placed in the
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink> in
|
||||
<filename class="directory">tmp/deploy/images</filename>.
|
||||
For information on how to run pre-built images such as <filename>qemux86</filename>
|
||||
Once an image has been built, it often needs to be installed.
|
||||
The images and kernels built by the OpenEmbedded build system are placed in the
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink> in
|
||||
<filename class="directory">tmp/deploy/images</filename>.
|
||||
For information on how to run pre-built images such as <filename>qemux86</filename>
|
||||
and <filename>qemuarm</filename>, see the
|
||||
"<ulink url='&YOCTO_DOCS_QS_URL;#using-pre-built'>Using Pre-Built Binaries and QEMU</ulink>"
|
||||
section in the Yocto Project Quick Start.
|
||||
@@ -106,25 +106,25 @@
|
||||
<title>Debugging Build Failures</title>
|
||||
|
||||
<para>
|
||||
The exact method for debugging build failures depends on the nature of the
|
||||
problem and on the system's area from which the bug originates.
|
||||
Standard debugging practices such as comparison against the last
|
||||
known working version with examination of the changes and the re-application of steps
|
||||
The exact method for debugging build failures depends on the nature of the
|
||||
problem and on the system's area from which the bug originates.
|
||||
Standard debugging practices such as comparison against the last
|
||||
known working version with examination of the changes and the re-application of steps
|
||||
to identify the one causing the problem are
|
||||
valid for the Yocto Project just as they are for any other system.
|
||||
Even though it is impossible to detail every possible potential failure,
|
||||
valid for the Yocto Project just as they are for any other system.
|
||||
Even though it is impossible to detail every possible potential failure,
|
||||
this section provides some general tips to aid in debugging.
|
||||
</para>
|
||||
|
||||
<section id='usingpoky-debugging-taskfailures'>
|
||||
<title>Task Failures</title>
|
||||
|
||||
<para>The log file for shell tasks is available in
|
||||
<filename>${WORKDIR}/temp/log.do_taskname.pid</filename>.
|
||||
<para>The log file for shell tasks is available in
|
||||
<filename>${WORKDIR}/temp/log.do_taskname.pid</filename>.
|
||||
For example, the <filename>compile</filename> task for the QEMU minimal image for the x86
|
||||
machine (<filename>qemux86</filename>) might be
|
||||
machine (<filename>qemux86</filename>) might be
|
||||
<filename>tmp/work/qemux86-poky-linux/core-image-minimal-1.0-r0/temp/log.do_compile.20830</filename>.
|
||||
To see what BitBake runs to generate that log, look at the corresponding
|
||||
To see what BitBake runs to generate that log, look at the corresponding
|
||||
<filename>run.do_taskname.pid</filename> file located in the same directory.
|
||||
</para>
|
||||
|
||||
@@ -137,17 +137,17 @@
|
||||
<title>Running Specific Tasks</title>
|
||||
|
||||
<para>
|
||||
Any given package consists of a set of tasks.
|
||||
The standard BitBake behavior in most cases is: <filename>fetch</filename>,
|
||||
<filename>unpack</filename>,
|
||||
Any given package consists of a set of tasks.
|
||||
The standard BitBake behavior in most cases is: <filename>fetch</filename>,
|
||||
<filename>unpack</filename>,
|
||||
<filename>patch</filename>, <filename>configure</filename>,
|
||||
<filename>compile</filename>, <filename>install</filename>, <filename>package</filename>,
|
||||
<filename>package_write</filename>, and <filename>build</filename>.
|
||||
The default task is <filename>build</filename> and any tasks on which it depends
|
||||
<filename>package_write</filename>, and <filename>build</filename>.
|
||||
The default task is <filename>build</filename> and any tasks on which it depends
|
||||
build first.
|
||||
Some tasks exist, such as <filename>devshell</filename>, that are not part of the
|
||||
default build chain.
|
||||
If you wish to run a task that is not part of the default build chain, you can use the
|
||||
default build chain.
|
||||
If you wish to run a task that is not part of the default build chain, you can use the
|
||||
<filename>-c</filename> option in BitBake as follows:
|
||||
<literallayout class='monospaced'>
|
||||
$ bitbake matchbox-desktop -c devshell
|
||||
@@ -155,8 +155,8 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If you wish to rerun a task, use the <filename>-f</filename> force option.
|
||||
For example, the following sequence forces recompilation after changing files in the
|
||||
If you wish to rerun a task, use the <filename>-f</filename> force option.
|
||||
For example, the following sequence forces recompilation after changing files in the
|
||||
working directory.
|
||||
<literallayout class='monospaced'>
|
||||
$ bitbake matchbox-desktop
|
||||
@@ -173,7 +173,7 @@
|
||||
<para>
|
||||
This sequence first builds <filename>matchbox-desktop</filename> and then recompiles it.
|
||||
The last command reruns all tasks (basically the packaging tasks) after the compile.
|
||||
BitBake recognizes that the <filename>compile</filename> task was rerun and therefore
|
||||
BitBake recognizes that the <filename>compile</filename> task was rerun and therefore
|
||||
understands that the other tasks also need to be run again.
|
||||
</para>
|
||||
|
||||
@@ -191,13 +191,13 @@
|
||||
<title>Dependency Graphs</title>
|
||||
|
||||
<para>
|
||||
Sometimes it can be hard to see why BitBake wants to build some other packages before a given
|
||||
Sometimes it can be hard to see why BitBake wants to build some other packages before a given
|
||||
package you have specified.
|
||||
The <filename>bitbake -g targetname</filename> command creates the
|
||||
The <filename>bitbake -g targetname</filename> command creates the
|
||||
<filename>depends.dot</filename>, <filename>package-depends.dot</filename>,
|
||||
and <filename>task-depends.dot</filename> files in the current directory.
|
||||
and <filename>task-depends.dot</filename> files in the current directory.
|
||||
These files show the package and task dependencies and are useful for debugging problems.
|
||||
You can use the <filename>bitbake -g -u depexp targetname</filename> command to
|
||||
You can use the <filename>bitbake -g -u depexp targetname</filename> command to
|
||||
display the results in a more human-readable form.
|
||||
</para>
|
||||
</section>
|
||||
@@ -208,7 +208,7 @@
|
||||
<para>
|
||||
You can see debug output from BitBake by using the <filename>-D</filename> option.
|
||||
The debug output gives more information about what BitBake
|
||||
is doing and the reason behind it.
|
||||
is doing and the reason behind it.
|
||||
Each <filename>-D</filename> option you use increases the logging level.
|
||||
The most common usage is <filename>-DDD</filename>.
|
||||
</para>
|
||||
@@ -217,7 +217,7 @@
|
||||
The output from <filename>bitbake -DDD -v targetname</filename> can reveal why
|
||||
BitBake chose a certain version of a package or why BitBake
|
||||
picked a certain provider.
|
||||
This command could also help you in a situation where you think BitBake did something
|
||||
This command could also help you in a situation where you think BitBake did something
|
||||
unexpected.
|
||||
</para>
|
||||
</section>
|
||||
@@ -226,9 +226,9 @@
|
||||
<title>Building with No Dependencies</title>
|
||||
<para>
|
||||
If you really want to build a specific <filename>.bb</filename> file, you can use
|
||||
the command form <filename>bitbake -b <somepath/somefile.bb></filename>.
|
||||
the command form <filename>bitbake -b <somepath/somefile.bb></filename>.
|
||||
This command form does not check for dependencies so you should use it
|
||||
only when you know its dependencies already exist.
|
||||
only when you know its dependencies already exist.
|
||||
You can also specify fragments of the filename.
|
||||
In this case, BitBake checks for a unique match.
|
||||
</para>
|
||||
@@ -243,31 +243,31 @@
|
||||
to show the environment from parsing a single recipe file only.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
|
||||
<section id='recipe-logging-mechanisms'>
|
||||
<title>Recipe Logging Mechanisms</title>
|
||||
<para>
|
||||
Best practices exist while writing recipes that both log build progress and
|
||||
act on build conditions such as warnings and errors.
|
||||
Best practices exist while writing recipes that both log build progress and
|
||||
act on build conditions such as warnings and errors.
|
||||
Both Python and Bash language bindings exist for the logging mechanism:
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>Python:</emphasis> For Python functions, BitBake
|
||||
supports several loglevels: <filename>bb.fatal</filename>,
|
||||
supports several loglevels: <filename>bb.fatal</filename>,
|
||||
<filename>bb.error</filename>, <filename>bb.warn</filename>,
|
||||
<filename>bb.note</filename>, <filename>bb.plain</filename>,
|
||||
and <filename>bb.debug</filename>.</para></listitem>
|
||||
<listitem><para><emphasis>Bash:</emphasis> For Bash functions, the same set
|
||||
<listitem><para><emphasis>Bash:</emphasis> For Bash functions, the same set
|
||||
of loglevels exist and are accessed with a similar syntax:
|
||||
<filename>bbfatal</filename>, <filename>bberror</filename>,
|
||||
<filename>bbwarn</filename>, <filename>bbnote</filename>,
|
||||
<filename>bbfatal</filename>, <filename>bberror</filename>,
|
||||
<filename>bbwarn</filename>, <filename>bbnote</filename>,
|
||||
<filename>bbplain</filename>, and <filename>bbdebug</filename>.</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For guidance on how logging is handled in both Python and Bash recipes, see the
|
||||
<filename>logging.bbclass</filename> file in the
|
||||
<filename>meta/classes</filename> folder of the
|
||||
For guidance on how logging is handled in both Python and Bash recipes, see the
|
||||
<filename>logging.bbclass</filename> file in the
|
||||
<filename>meta/classes</filename> folder of the
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
|
||||
</para>
|
||||
|
||||
@@ -275,14 +275,14 @@
|
||||
<title>Logging With Python</title>
|
||||
<para>
|
||||
When creating recipes using Python and inserting code that handles build logs
|
||||
keep in mind the goal is to have informative logs while keeping the console as
|
||||
"silent" as possible.
|
||||
keep in mind the goal is to have informative logs while keeping the console as
|
||||
"silent" as possible.
|
||||
Also, if you want status messages in the log use the "debug" loglevel.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Following is an example written in Python.
|
||||
The code handles logging for a function that determines the number of tasks
|
||||
The code handles logging for a function that determines the number of tasks
|
||||
needed to be run:
|
||||
<literallayout class='monospaced'>
|
||||
python do_listtasks() {
|
||||
@@ -307,8 +307,8 @@
|
||||
<title>Logging With Bash</title>
|
||||
<para>
|
||||
When creating recipes using Bash and inserting code that handles build
|
||||
logs you have the same goals - informative with minimal console output.
|
||||
The syntax you use for recipes written in Bash is similar to that of
|
||||
logs you have the same goals - informative with minimal console output.
|
||||
The syntax you use for recipes written in Bash is similar to that of
|
||||
recipes written in Python described in the previous section.
|
||||
</para>
|
||||
|
||||
@@ -337,22 +337,22 @@
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
<section id='usingpoky-debugging-others'>
|
||||
<title>Other Tips</title>
|
||||
|
||||
<para>
|
||||
Here are some other tips that you might find useful:
|
||||
<itemizedlist>
|
||||
<listitem><para>When adding new packages, it is worth watching for
|
||||
<listitem><para>When adding new packages, it is worth watching for
|
||||
undesirable items making their way into compiler command lines.
|
||||
For example, you do not want references to local system files like
|
||||
For example, you do not want references to local system files like
|
||||
<filename>/usr/lib/</filename> or <filename>/usr/include/</filename>.
|
||||
</para></listitem>
|
||||
<listitem><para>If you want to remove the psplash boot splashscreen,
|
||||
<listitem><para>If you want to remove the psplash boot splashscreen,
|
||||
add <filename>psplash=false</filename> to the kernel command line.
|
||||
Doing so prevents psplash from loading and thus allows you to see the console.
|
||||
It is also possible to switch out of the splashscreen by
|
||||
It is also possible to switch out of the splashscreen by
|
||||
switching the virtual console (e.g. Fn+Left or Fn+Right on a Zaurus).
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
@@ -365,25 +365,25 @@
|
||||
|
||||
<para>
|
||||
A build's quality can be influenced by many things.
|
||||
For example, if you upgrade a recipe to use a new version of an upstream software
|
||||
For example, if you upgrade a recipe to use a new version of an upstream software
|
||||
package or you experiment with some new configuration options, subtle changes
|
||||
can occur that you might not detect until later.
|
||||
can occur that you might not detect until later.
|
||||
Consider the case where your recipe is using a newer version of an upstream package.
|
||||
In this case, a new version of a piece of software might introduce an optional
|
||||
In this case, a new version of a piece of software might introduce an optional
|
||||
dependency on another library, which is auto-detected.
|
||||
If that library has already been built when the software is building,
|
||||
then the software will link to the built library and that library will be pulled
|
||||
into your image along with the new software even if you did not want the
|
||||
If that library has already been built when the software is building,
|
||||
then the software will link to the built library and that library will be pulled
|
||||
into your image along with the new software even if you did not want the
|
||||
library.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The <filename>buildhistory</filename> class exists to help you maintain
|
||||
the quality of your build output.
|
||||
You can use the class to highlight unexpected and possibly unwanted
|
||||
You can use the class to highlight unexpected and possibly unwanted
|
||||
changes in the build output.
|
||||
When you enable build history it records information about the contents of
|
||||
each package and image and then commits that information to a local Git
|
||||
When you enable build history it records information about the contents of
|
||||
each package and image and then commits that information to a local Git
|
||||
repository where you can examine the information.
|
||||
</para>
|
||||
|
||||
@@ -396,7 +396,7 @@
|
||||
</para></listitem>
|
||||
<listitem><para>How to limit the information used for build history
|
||||
</para></listitem>
|
||||
<listitem><para>How to examine the build history from both a
|
||||
<listitem><para>How to examine the build history from both a
|
||||
command-line and web interface</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
@@ -406,41 +406,41 @@
|
||||
|
||||
<para>
|
||||
Build history is disabled by default.
|
||||
To enable it, add the following statements to the end of your
|
||||
<filename>conf/local.conf</filename> file found in the
|
||||
To enable it, add the following statements to the end of your
|
||||
<filename>conf/local.conf</filename> file found in the
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>:
|
||||
<literallayout class='monospaced'>
|
||||
INHERIT += "buildhistory"
|
||||
BUILDHISTORY_COMMIT = "1"
|
||||
</literallayout>
|
||||
Enabling build history as previously described
|
||||
Enabling build history as previously described
|
||||
causes the build process to collect build
|
||||
output information and commit it to a local
|
||||
output information and commit it to a local
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#git'>Git</ulink> repository.
|
||||
<note>
|
||||
Enabling build history increases your build times slightly,
|
||||
Enabling build history increases your build times slightly,
|
||||
particularly for images, and increases the amount of disk
|
||||
space used during the build.
|
||||
</note>
|
||||
</note>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
You can disable build history by removing the previous statements
|
||||
from your <filename>conf/local.conf</filename> file.
|
||||
However, you should realize that enabling and disabling
|
||||
build history in this manner can change the
|
||||
<filename>do_package</filename> task checksums, which if you
|
||||
are using the OEBasicHash signature generator (the default
|
||||
However, you should realize that enabling and disabling
|
||||
build history in this manner can change the
|
||||
<filename>do_package</filename> task checksums, which if you
|
||||
are using the OEBasicHash signature generator (the default
|
||||
for many current distro configurations including
|
||||
<filename>DISTRO = "poky"</filename> and
|
||||
<filename>DISTRO = ""</filename>) will result in the packaging
|
||||
<filename>DISTRO = "poky"</filename> and
|
||||
<filename>DISTRO = ""</filename>) will result in the packaging
|
||||
tasks being re-run during the subsequent build.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To disable the build history functionality without causing the
|
||||
packaging tasks to be re-run, add just this statement to your
|
||||
<filename>conf/local.conf</filename> file:
|
||||
To disable the build history functionality without causing the
|
||||
packaging tasks to be re-run, add just this statement to your
|
||||
<filename>conf/local.conf</filename> file:
|
||||
<literallayout class='monospaced'>
|
||||
BUILDHISTORY_FEATURES = ""
|
||||
</literallayout>
|
||||
@@ -451,19 +451,19 @@
|
||||
<title>Understanding What the Build History Contains</title>
|
||||
|
||||
<para>
|
||||
Build history information is kept in
|
||||
Build history information is kept in
|
||||
<link linkend='var-TMPDIR'><filename>$TMPDIR</filename></link><filename>/buildhistory</filename>
|
||||
in the Build Directory.
|
||||
The following is an example abbreviated listing:
|
||||
<imagedata fileref="figures/buildhistory.png" align="center" width="6in" depth="4in" />
|
||||
</para>
|
||||
|
||||
|
||||
<section id='build-history-package-information'>
|
||||
<title>Build History Package Information</title>
|
||||
|
||||
<para>
|
||||
The history for each package contains a text file that has
|
||||
name-value pairs with information about the package.
|
||||
name-value pairs with information about the package.
|
||||
For example, <filename>buildhistory/packages/core2-poky-linux/busybox/busybox/latest</filename>
|
||||
contains the following:
|
||||
<literallayout class='monospaced'>
|
||||
@@ -474,21 +474,21 @@
|
||||
PKGSIZE = 564701
|
||||
FILES = /usr/bin/* /usr/sbin/* /usr/libexec/* /usr/lib/lib*.so.* \
|
||||
/etc /com /var /bin/* /sbin/* /lib/*.so.* /usr/share/busybox \
|
||||
/usr/lib/busybox/* /usr/share/pixmaps /usr/share/applications \
|
||||
/usr/lib/busybox/* /usr/share/pixmaps /usr/share/applications \
|
||||
/usr/share/idl /usr/share/omf /usr/share/sounds /usr/lib/bonobo/servers
|
||||
FILELIST = /etc/busybox.links /etc/init.d/hwclock.sh /bin/busybox /bin/sh
|
||||
</literallayout>
|
||||
Most of these name-value pairs corresponds to variables used
|
||||
Most of these name-value pairs corresponds to variables used
|
||||
to produce the package.
|
||||
The exceptions are <filename>FILELIST</filename>, which is the
|
||||
actual list of files in the package, and
|
||||
<filename>PKGSIZE</filename>, which is the total size of files
|
||||
The exceptions are <filename>FILELIST</filename>, which is the
|
||||
actual list of files in the package, and
|
||||
<filename>PKGSIZE</filename>, which is the total size of files
|
||||
in the package in bytes.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
There is also a file corresponding to the recipe from which the
|
||||
package came (e.g.
|
||||
There is also a file corresponding to the recipe from which the
|
||||
package came (e.g.
|
||||
<filename>buildhistory/packages/core2-poky-linux/busybox/latest</filename>):
|
||||
<literallayout class='monospaced'>
|
||||
PV = 1.19.3
|
||||
@@ -509,18 +509,18 @@
|
||||
The files produced for each image are as follows:
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>build-id:</emphasis>
|
||||
Human-readable information about the build configuration
|
||||
Human-readable information about the build configuration
|
||||
and metadata source revisions.</para></listitem>
|
||||
<listitem><para><emphasis>*.dot:</emphasis>
|
||||
Dependency graphs for the image that are
|
||||
Dependency graphs for the image that are
|
||||
compatible with <filename>graphviz</filename>.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>files-in-image.txt:</emphasis>
|
||||
A list of files in the image with permissions,
|
||||
A list of files in the image with permissions,
|
||||
owner, group, size, and symlink information.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>image-info.txt:</emphasis>
|
||||
A text file containing name-value pairs with information
|
||||
A text file containing name-value pairs with information
|
||||
about the image.
|
||||
See the following listing example for more information.
|
||||
</para></listitem>
|
||||
@@ -535,7 +535,7 @@
|
||||
</itemizedlist>
|
||||
<note>
|
||||
Installed package information is able to be gathered and
|
||||
produced even if package management is disabled for the final
|
||||
produced even if package management is disabled for the final
|
||||
image.
|
||||
</note>
|
||||
</para>
|
||||
@@ -551,15 +551,15 @@
|
||||
package-management ssh-server-dropbear package-management
|
||||
IMAGE_LINGUAS = en-us en-gb
|
||||
IMAGE_INSTALL = task-core-boot task-base-extended
|
||||
BAD_RECOMMENDATIONS =
|
||||
ROOTFS_POSTPROCESS_COMMAND = buildhistory_get_image_installed ; rootfs_update_timestamp ;
|
||||
IMAGE_POSTPROCESS_COMMAND = buildhistory_get_imageinfo ;
|
||||
BAD_RECOMMENDATIONS =
|
||||
ROOTFS_POSTPROCESS_COMMAND = buildhistory_get_image_installed ; rootfs_update_timestamp ;
|
||||
IMAGE_POSTPROCESS_COMMAND = buildhistory_get_imageinfo ;
|
||||
IMAGESIZE = 171816
|
||||
</literallayout>
|
||||
Other than <filename>IMAGESIZE</filename>, which is the
|
||||
total size of the files in the image in Kbytes, the
|
||||
name-value pairs are variables that may have influenced the
|
||||
content of the image.
|
||||
total size of the files in the image in Kbytes, the
|
||||
name-value pairs are variables that may have influenced the
|
||||
content of the image.
|
||||
This information is often useful when you are trying to determine
|
||||
why a change in the package or file listings has occurred.
|
||||
</para>
|
||||
@@ -568,15 +568,15 @@
|
||||
<section id='using-build-history-to-gather-image-information-only'>
|
||||
<title>Using Build History to Gather Image Information Only</title>
|
||||
|
||||
<para>
|
||||
As you can see, build history produces image information,
|
||||
<para>
|
||||
As you can see, build history produces image information,
|
||||
including dependency graphs, so you can see why something
|
||||
was pulled into the image.
|
||||
If you are just interested in this information and not
|
||||
interested in collecting history or any package information,
|
||||
you can enable writing only image information without
|
||||
any history by adding the following
|
||||
to your <filename>conf/local.conf</filename> file found in the
|
||||
was pulled into the image.
|
||||
If you are just interested in this information and not
|
||||
interested in collecting history or any package information,
|
||||
you can enable writing only image information without
|
||||
any history by adding the following
|
||||
to your <filename>conf/local.conf</filename> file found in the
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>:
|
||||
<literallayout class='monospaced'>
|
||||
INHERIT += "buildhistory"
|
||||
@@ -590,28 +590,28 @@
|
||||
<title>Examining Build History Information</title>
|
||||
|
||||
<para>
|
||||
You can examine build history output from the command line or
|
||||
You can examine build history output from the command line or
|
||||
from a web interface.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To see any changes that have occurred (assuming you have
|
||||
<filename>BUILDHISTORY_COMMIT = "1"</filename>), you can simply
|
||||
use any Git command that allows you to view the history of
|
||||
a repository.
|
||||
To see any changes that have occurred (assuming you have
|
||||
<filename>BUILDHISTORY_COMMIT = "1"</filename>), you can simply
|
||||
use any Git command that allows you to view the history of
|
||||
a repository.
|
||||
Here is one method:
|
||||
<literallayout class='monospaced'>
|
||||
$ git log -p
|
||||
$ git log -p
|
||||
</literallayout>
|
||||
You need to realize, however, that this method does show
|
||||
changes that are not significant (e.g. a package's size
|
||||
You need to realize, however, that this method does show
|
||||
changes that are not significant (e.g. a package's size
|
||||
changing by a few bytes).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
A command-line tool called <filename>buildhistory-diff</filename>
|
||||
does exist though that queries the Git repository and prints just
|
||||
the differences that might be significant in human-readable form.
|
||||
does exist though that queries the Git repository and prints just
|
||||
the differences that might be significant in human-readable form.
|
||||
Here is an example:
|
||||
<literallayout class='monospaced'>
|
||||
$ ~/poky/poky/scripts/buildhistory-diff . HEAD^
|
||||
@@ -632,7 +632,7 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To see changes to the build history using a web interface, follow
|
||||
To see changes to the build history using a web interface, follow
|
||||
the instruction in the <filename>README</filename> file here.
|
||||
<ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/buildhistory-web/'></ulink>.
|
||||
</para>
|
||||
@@ -646,6 +646,6 @@
|
||||
</section>
|
||||
|
||||
</chapter>
|
||||
<!--
|
||||
vim: expandtab tw=80 ts=4
|
||||
<!--
|
||||
vim: expandtab tw=80 ts=4
|
||||
-->
|
||||
|
||||
Reference in New Issue
Block a user