summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
authorNicolas Dechesne <nicolas.dechesne@linaro.org>2020-10-05 16:30:32 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-10-06 13:56:17 +0100
commit43d07a285181e64c30d98d10ff93ef50391efe59 (patch)
tree78918fc94d55d44d35e1e3e61c7a6fccc28bca24 /documentation
parent1fd9c4b2c0ae927df29f7a0d34c3e595bcf48e89 (diff)
downloadpoky-43d07a285181e64c30d98d10ff93ef50391efe59.tar.gz
sphinx: remove DocBook files
The Yocto Project documentation was migrated to Sphinx. Let's remove the deprecated DocBook files. (From yocto-docs rev: 28fb0e63b2fbfd6426b00498bf2682bb53fdd862) Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
-rw-r--r--documentation/Makefile390
-rw-r--r--documentation/adt-manual/adt-command.xml266
-rw-r--r--documentation/adt-manual/adt-intro.xml181
-rw-r--r--documentation/adt-manual/adt-manual-customization.xsl28
-rw-r--r--documentation/adt-manual/adt-manual-eclipse-customization.xsl37
-rw-r--r--documentation/adt-manual/adt-manual-intro.xml34
-rw-r--r--documentation/adt-manual/adt-manual.xml141
-rw-r--r--documentation/adt-manual/adt-package.xml103
-rw-r--r--documentation/adt-manual/adt-prepare.xml1000
-rw-r--r--documentation/adt-manual/adt-style.css986
-rw-r--r--documentation/brief-yoctoprojectqs/brief-yoctoprojectqs-customization.xsl26
-rw-r--r--documentation/brief-yoctoprojectqs/brief-yoctoprojectqs-style.css992
-rw-r--r--documentation/brief-yoctoprojectqs/brief-yoctoprojectqs-titlepage.xsl3821
-rw-r--r--documentation/brief-yoctoprojectqs/brief-yoctoprojectqs.xml577
-rw-r--r--documentation/bsp-guide/bsp-guide-customization.xsl29
-rwxr-xr-xdocumentation/bsp-guide/bsp-guide.xml202
-rw-r--r--documentation/bsp-guide/bsp-style.css989
-rw-r--r--documentation/bsp-guide/bsp.xml2259
-rw-r--r--documentation/dev-manual/dev-manual-common-tasks.xml16081
-rw-r--r--documentation/dev-manual/dev-manual-customization.xsl29
-rw-r--r--documentation/dev-manual/dev-manual-intro.xml104
-rw-r--r--documentation/dev-manual/dev-manual-qemu.xml691
-rw-r--r--documentation/dev-manual/dev-manual-start.xml1288
-rwxr-xr-xdocumentation/dev-manual/dev-manual.xml195
-rw-r--r--documentation/dev-manual/dev-style.css991
-rw-r--r--documentation/kernel-dev/kernel-dev-advanced.xml1257
-rw-r--r--documentation/kernel-dev/kernel-dev-common.xml2730
-rw-r--r--documentation/kernel-dev/kernel-dev-concepts-appx.xml622
-rw-r--r--documentation/kernel-dev/kernel-dev-customization.xsl28
-rw-r--r--documentation/kernel-dev/kernel-dev-faq.xml143
-rw-r--r--documentation/kernel-dev/kernel-dev-intro.xml260
-rw-r--r--documentation/kernel-dev/kernel-dev-maint-appx.xml357
-rw-r--r--documentation/kernel-dev/kernel-dev-style.css991
-rwxr-xr-xdocumentation/kernel-dev/kernel-dev.xml187
-rw-r--r--documentation/mega-manual/figures/YP-flow-diagram.pngbin185562 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/add-variable.pngbin110712 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/analysis-for-package-splitting.pngbin68434 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/bash-oecore.pngbin138198 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/bb_multiconfig_files.pngbin19991 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/bitbake-build-flow.pngbin49242 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/bitbake-title.pngbin5086 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/bsp-dev-flow.pngbin52657 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/bsp-title.pngbin17388 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/build-workspace-directory.pngbin29627 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/buildhistory-web.pngbin49966 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/buildhistory.pngbin44900 -> 0 bytes
-rwxr-xr-xdocumentation/mega-manual/figures/building-an-image.pngbin14891 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/bypqs-title.pngbin14312 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/compatible-layers.pngbin163081 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/concepts-manual-title.pngbin11920 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/configuration-compile-autoreconf.pngbin70877 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/cross-development-toolchains.pngbin82633 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/cute-files-npm-example.pngbin26248 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/define-generic.pngbin623 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/dev-title.pngbin15950 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/git-workflow.pngbin26586 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/hosted-service.pngbin13552 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/image-generation.pngbin123348 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/images.pngbin32674 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/import-layer.pngbin139108 -> 0 bytes
-rwxr-xr-xdocumentation/mega-manual/figures/index-downloads.pngbin18142 -> 0 bytes
-rwxr-xr-xdocumentation/mega-manual/figures/kernel-architecture-overview.pngbin40748 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/kernel-dev-flow.pngbin53197 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/kernel-dev-title.pngbin13453 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/kernel-overview-1.pngbin35839 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/kernel-overview-2-generic.pngbin49230 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/kernel-title.pngbin13970 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/kernelshark-all.pngbin89316 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/kernelshark-choose-events.pngbin57372 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/kernelshark-i915-display.pngbin98765 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/kernelshark-output-display.pngbin204454 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/key-dev-elements.pngbin20424 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/layer-input.pngbin62330 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/mega-title.pngbin10536 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/multiconfig_files.pngbin18611 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/new-project.pngbin73760 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/oprofileui-busybox.pngbin98334 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/oprofileui-copy-to-user.pngbin105661 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/oprofileui-downloading.pngbin37301 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/oprofileui-processes.pngbin95741 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/overview-manual-title.pngbin17387 -> 0 bytes
-rwxr-xr-xdocumentation/mega-manual/figures/package-feeds.pngbin42239 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/patching.pngbin57414 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/perf-probe-do_fork-profile.pngbin59078 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/perf-report-cycles-u.pngbin171368 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/perf-systemwide-libc.pngbin136826 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/perf-systemwide.pngbin140616 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/perf-wget-busybox-annotate-menu.pngbin22364 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/perf-wget-busybox-annotate-udhcpc.pngbin171529 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/perf-wget-busybox-debuginfo.pngbin174971 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/perf-wget-busybox-dso-zoom-menu.pngbin23735 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/perf-wget-busybox-dso-zoom.pngbin101685 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/perf-wget-busybox-expanded-stripped.pngbin95140 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/perf-wget-flat-stripped.pngbin178919 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/perf-wget-g-copy-from-user-expanded-stripped.pngbin138550 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/perf-wget-g-copy-to-user-expanded-debuginfo.pngbin102790 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/perf-wget-g-copy-to-user-expanded-stripped-unresolved-hidden.pngbin110101 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/perf-wget-g-copy-to-user-expanded-stripped.pngbin102812 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/poky-reference-distribution.pngbin23784 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/poky-title.pngbin11592 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/profile-title.pngbin12799 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/pybootchartgui-linux-yocto.pngbin36366 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/pychart-linux-yocto-rpm-nostrip.pngbin98053 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/pychart-linux-yocto-rpm.pngbin81053 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/recipe-workflow.pngbin48276 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/sched-wakeup-profile.pngbin123810 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/sdk-autotools-flow.pngbin50443 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/sdk-devtool-add-flow.pngbin181699 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/sdk-devtool-modify-flow.pngbin171676 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/sdk-devtool-upgrade-flow.pngbin138917 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/sdk-environment.pngbin42098 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/sdk-generation.pngbin60574 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/sdk-installed-extensible-sdk-directory.pngbin66753 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/sdk-installed-standard-sdk-directory.pngbin39099 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/sdk-makefile-flow.pngbin47197 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/sdk-title.pngbin31039 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/sdk.pngbin49804 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/set-variable.pngbin111430 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/simple-configuration.pngbin10789 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/source-fetching.pngbin46896 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/source-input.pngbin51170 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/source-repos.pngbin167009 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/sysprof-callers.pngbin145043 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/sysprof-copy-from-user.pngbin132976 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/sysprof-copy-to-user.pngbin132074 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/toaster-title.pngbin9277 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/user-configuration.pngbin51171 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/using-a-pre-built-image.pngbin12733 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/variable-added.pngbin112163 -> 0 bytes
-rwxr-xr-xdocumentation/mega-manual/figures/yocto-project-transp.pngbin8626 -> 0 bytes
-rw-r--r--documentation/mega-manual/figures/yp-download.pngbin82939 -> 0 bytes
-rw-r--r--documentation/mega-manual/mega-manual-customization.xsl43
-rwxr-xr-xdocumentation/mega-manual/mega-manual.xml362
-rw-r--r--documentation/mega-manual/mega-style.css991
-rw-r--r--documentation/overview-manual/overview-manual-concepts.xml3235
-rw-r--r--documentation/overview-manual/overview-manual-customization.xsl29
-rw-r--r--documentation/overview-manual/overview-manual-development-environment.xml954
-rw-r--r--documentation/overview-manual/overview-manual-intro.xml113
-rw-r--r--documentation/overview-manual/overview-manual-style.css990
-rw-r--r--documentation/overview-manual/overview-manual-yp-intro.xml1333
-rwxr-xr-xdocumentation/overview-manual/overview-manual.xml130
-rwxr-xr-xdocumentation/poky.ent89
-rw-r--r--documentation/profile-manual/profile-manual-arch.xml46
-rw-r--r--documentation/profile-manual/profile-manual-customization.xsl29
-rw-r--r--documentation/profile-manual/profile-manual-examples.xml40
-rw-r--r--documentation/profile-manual/profile-manual-intro.xml107
-rw-r--r--documentation/profile-manual/profile-manual-style.css987
-rw-r--r--documentation/profile-manual/profile-manual-usage.xml2986
-rwxr-xr-xdocumentation/profile-manual/profile-manual.xml180
-rw-r--r--documentation/ref-manual/faq.xml836
-rw-r--r--documentation/ref-manual/migration.xml7301
-rw-r--r--documentation/ref-manual/ref-classes.xml3974
-rw-r--r--documentation/ref-manual/ref-devtool-reference.xml842
-rw-r--r--documentation/ref-manual/ref-features.xml461
-rw-r--r--documentation/ref-manual/ref-images.xml170
-rw-r--r--documentation/ref-manual/ref-kickstart.xml335
-rw-r--r--documentation/ref-manual/ref-manual-customization.xsl31
-rwxr-xr-xdocumentation/ref-manual/ref-manual.xml232
-rw-r--r--documentation/ref-manual/ref-qa-checks.xml1225
-rw-r--r--documentation/ref-manual/ref-release-process.xml256
-rw-r--r--documentation/ref-manual/ref-structure.xml1123
-rw-r--r--documentation/ref-manual/ref-style.css1035
-rw-r--r--documentation/ref-manual/ref-system-requirements.xml577
-rw-r--r--documentation/ref-manual/ref-tasks.xml1131
-rw-r--r--documentation/ref-manual/ref-terms.xml525
-rw-r--r--documentation/ref-manual/ref-variables.xml16877
-rw-r--r--documentation/ref-manual/ref-varlocality.xml199
-rw-r--r--documentation/ref-manual/resources.xml298
-rw-r--r--documentation/sdk-manual/sdk-appendix-customizing-standard.xml59
-rw-r--r--documentation/sdk-manual/sdk-appendix-customizing.xml515
-rw-r--r--documentation/sdk-manual/sdk-appendix-obtain.xml444
-rw-r--r--documentation/sdk-manual/sdk-extensible.xml1847
-rw-r--r--documentation/sdk-manual/sdk-intro.xml353
-rw-r--r--documentation/sdk-manual/sdk-manual-customization.xsl28
-rwxr-xr-xdocumentation/sdk-manual/sdk-manual.xml159
-rw-r--r--documentation/sdk-manual/sdk-style.css991
-rw-r--r--documentation/sdk-manual/sdk-using.xml201
-rw-r--r--documentation/sdk-manual/sdk-working-projects.xml511
-rw-r--r--documentation/template/Vera.xml1
-rw-r--r--documentation/template/VeraMoBd.xml1
-rw-r--r--documentation/template/VeraMono.xml1
-rw-r--r--documentation/template/component.title.xsl39
-rw-r--r--documentation/template/division.title.xsl24
-rw-r--r--documentation/template/embedded_video.xsl22
-rw-r--r--documentation/template/fop-config.xml58
-rw-r--r--documentation/template/formal.object.heading.xsl21
-rw-r--r--documentation/template/gloss-permalinks.xsl14
-rw-r--r--documentation/template/permalinks.xsl25
-rw-r--r--documentation/template/poky-db-pdf.xsl64
-rw-r--r--documentation/template/qa-code-permalinks.xsl23
-rw-r--r--documentation/template/section.title.xsl55
-rw-r--r--documentation/template/titlepage.templates.xml1227
-rw-r--r--documentation/test-manual/test-manual-customization.xsl29
-rw-r--r--documentation/test-manual/test-manual-intro.xml624
-rw-r--r--documentation/test-manual/test-manual-style.css991
-rw-r--r--documentation/test-manual/test-manual-test-process.xml110
-rw-r--r--documentation/test-manual/test-manual-understand-autobuilder.xml314
-rwxr-xr-xdocumentation/test-manual/test-manual.xml104
-rw-r--r--documentation/toaster-manual/toaster-manual-customization.xsl30
-rw-r--r--documentation/toaster-manual/toaster-manual-intro.xml165
-rw-r--r--documentation/toaster-manual/toaster-manual-reference.xml837
-rw-r--r--documentation/toaster-manual/toaster-manual-setup-and-use.xml844
-rw-r--r--documentation/toaster-manual/toaster-manual-start.xml116
-rw-r--r--documentation/toaster-manual/toaster-manual-style.css987
-rwxr-xr-xdocumentation/toaster-manual/toaster-manual.xml159
-rw-r--r--documentation/tools/eclipse-help.sed21
-rw-r--r--documentation/tools/mega-manual.sed39
-rwxr-xr-xdocumentation/tools/poky-docbook-to-pdf54
208 files changed, 0 insertions, 100194 deletions
diff --git a/documentation/Makefile b/documentation/Makefile
deleted file mode 100644
index 7d4058ae75..0000000000
--- a/documentation/Makefile
+++ /dev/null
@@ -1,390 +0,0 @@
1#
2# SPDX-License-Identifier: CC-BY-2.0-UK
3#
4# This is a single Makefile to handle all generated Yocto Project documents,
5# which includes the BitBake User Manual and the Toaster User Manual.
6# The Makefile needs to live in the documents directory and all figures used
7# in any manuals must be .PNG files and live in the individual book's figures
8# directory as well as in the figures directory for the mega-manual.
9#
10# Note that the figures for the Yocto Project Development Tasks Manual
11# differ depending on the BRANCH being built.
12#
13# The Makefile has these targets:
14# all: If you leave off the target then "all" is implied.
15# You will generate HTML and a tarball of files.
16#
17# pdf: generates a PDF version of a manual. Not valid for the
18# Quick Start or the mega-manual (single, large HTML file
19# comprised of all Yocto Project manuals).
20# html: generates an HTML version of a manual.
21# tarball: creates a tarball for the doc files.
22# validate: validates
23# publish: pushes generated files to the Yocto Project website
24# clean: removes files
25#
26# The Makefile can generate an HTML and PDF version of every document except the
27# Yocto Project Quick Start and the single, HTML mega-manual, which is comprised
28# of all the individual Yocto Project manuals. You can generate these two manuals
29# in HTML form only. The variable DOC indicates the folder name for a given manual.
30# The variable VER represents the distro version of the Yocto Release for which the
31# manuals are being generated. The variable BRANCH is used to indicate the
32# branch (edison or denzil) and is used only when DOC=dev-manual or
33# DOC=mega-manual. If you do not specify a BRANCH, the default branch used
34# will be for the latest Yocto Project release. If you build for either
35# edison or denzil, you must use BRANCH. You do not need to use BRANCH for
36# any release beyond denzil.
37#
38# To build a manual, you must invoke Makefile with the DOC argument. If you
39# are going to publish the manual, then you must invoke Makefile with both the
40# DOC and the VER argument. Furthermore, if you are building or publishing
41# the edison or denzil versions of the Yocto Project Development Tasks Manual or
42# the mega-manual, you must also use the BRANCH argument.
43#
44# Examples:
45#
46# make DOC=bsp-guide
47# make html DOC=brief-yoctoprojectqs
48# make pdf DOC=ref-manual
49# make DOC=dev-manual BRANCH=edison
50# make DOC=mega-manual BRANCH=denzil
51#
52# The first example generates the HTML version of the BSP Guide.
53# The second example generates the HTML version only of the Quick Start. Note
54# that the Quick Start only has an HTML version available. So, the
55# 'make DOC=brief-yoctoprojectqs' command would be equivalent. The third example
56# generates just the PDF version of the Yocto Project Reference Manual.
57# The fourth example generates the HTML 'edison' version of the YP Development
58# Tasks Manual. The last example
59# generates the HTML version of the mega-manual and uses the 'denzil'
60# branch when choosing figures for the tarball of figures. Any example that does
61# not use the BRANCH argument builds the current version of the manual set.
62#
63# The publish target pushes the generated manuals to the Yocto Project
64# website. Unless you are a developer on the YP team, you will not succeed in
65# pushing manuals to this server. All files needed for the manual's HTML form are
66# pushed.
67#
68# Examples:
69#
70# make publish DOC=bsp-guide VER=1.7
71# make publish DOC=adt-manual VER=1.6
72# make publish DOC=dev-manual VER=1.1.1 BRANCH=edison
73# make publish DOC=dev-manual VER=1.2 BRANCH=denzil
74#
75# The first example publishes the 1.7 version of both the PDF and HTML versions of
76# the BSP Guide. The second example publishes the 1.6 version of both the PDF and
77# HTML versions of the ADT Manual. The third example publishes the 1.1.1 version of
78# the PDF and HTML YP Development Tasks Manual for the 'edison' branch. The fourth
79# example publishes the 1.2 version of the PDF and HTML YP Development Tasks Manual
80# for the 'denzil' branch.
81#
82# IN MEMORIAM: This comment is to remember Scott Rifenbark (scottrif), whom we lost
83# in January, 2020. Scott was the primary technical writer for the Yocto Project for
84# over 9 years. In that time, he contributed many thousands of patches, built this
85# documentation tree, and enabled tens of thousands of developers to succeed with
86# embedded Linux. He ran this Makefile many thousands of times. Godspeed, Dude.
87
88ifeq ($(DOC),brief-yoctoprojectqs)
89XSLTOPTS = --stringparam html.stylesheet brief-yoctoprojectqs-style.css \
90 --stringparam chapter.autolabel 0 \
91 --stringparam section.autolabel 0 \
92 --stringparam section.label.includes.component.label 0 \
93 --xinclude
94ALLPREQ = html tarball
95TARFILES = brief-yoctoprojectqs-style.css brief-yoctoprojectqs.html figures/bypqs-title.png \
96 figures/yocto-project-transp.png
97MANUALS = $(DOC)/$(DOC).html
98FIGURES = figures
99STYLESHEET = $(DOC)/*.css
100
101endif
102
103ifeq ($(DOC),overview-manual)
104XSLTOPTS = --xinclude
105ALLPREQ = html tarball
106TARFILES = overview-manual-style.css overview-manual.html figures/overview-manual-title.png \
107 figures/git-workflow.png figures/source-repos.png figures/index-downloads.png \
108 figures/yp-download.png figures/YP-flow-diagram.png figures/key-dev-elements.png \
109 figures/poky-reference-distribution.png figures/cross-development-toolchains.png \
110 figures/user-configuration.png figures/layer-input.png figures/source-input.png \
111 figures/package-feeds.png figures/patching.png figures/source-fetching.png \
112 figures/configuration-compile-autoreconf.png figures/analysis-for-package-splitting.png \
113 figures/image-generation.png figures/sdk-generation.png figures/images.png \
114 figures/sdk.png
115MANUALS = $(DOC)/$(DOC).html
116FIGURES = figures
117STYLESHEET = $(DOC)/*.css
118
119endif
120
121ifeq ($(DOC),bsp-guide)
122XSLTOPTS = --xinclude
123ALLPREQ = html tarball
124TARFILES = bsp-style.css bsp-guide.html figures/bsp-title.png \
125 figures/bsp-dev-flow.png
126MANUALS = $(DOC)/$(DOC).html
127FIGURES = figures
128STYLESHEET = $(DOC)/*.css
129
130endif
131
132ifeq ($(DOC),dev-manual)
133XSLTOPTS = --xinclude
134ALLPREQ = html tarball
135#
136# Note that the tarfile might produce the "Cannot stat: No such file or
137# directory" error message for .PNG files that are not present when building
138# a particular branch. The list of files is all-inclusive for all branches.
139# Note, if you don't provide a BRANCH option, it defaults to the latest stuff.
140# This would be appropriate for "master" branch.
141#
142
143TARFILES = dev-style.css dev-manual.html figures/buildhistory-web.png \
144 figures/dev-title.png figures/buildhistory.png \
145 figures/recipe-workflow.png figures/bitbake-build-flow.png \
146 figures/multiconfig_files.png figures/cute-files-npm-example.png
147
148MANUALS = $(DOC)/$(DOC).html
149FIGURES = figures
150STYLESHEET = $(DOC)/*.css
151
152endif
153
154ifeq ($(DOC),mega-manual)
155XSLTOPTS = --stringparam html.stylesheet mega-style.css \
156 --stringparam chapter.autolabel 1 \
157 --stringparam section.autolabel 1 \
158 --stringparam section.label.includes.component.label 1 \
159 --xinclude
160ALLPREQ = html tarball
161
162TARFILES = mega-manual.html mega-style.css \
163 figures/YP-flow-diagram.png \
164 figures/using-a-pre-built-image.png \
165 figures/poky-title.png figures/buildhistory.png \
166 figures/buildhistory-web.png \
167 figures/sdk-title.png figures/bsp-title.png \
168 figures/kernel-dev-title.png figures/kernel-architecture-overview.png \
169 figures/bsp-dev-flow.png \
170 figures/dev-title.png \
171 figures/git-workflow.png figures/index-downloads.png \
172 figures/kernel-dev-flow.png \
173 figures/kernel-overview-2-generic.png \
174 figures/source-repos.png figures/yp-download.png \
175 figures/profile-title.png figures/kernelshark-all.png \
176 figures/kernelshark-choose-events.png \
177 figures/kernelshark-i915-display.png \
178 figures/kernelshark-output-display.png \
179 figures/oprofileui-busybox.png figures/oprofileui-copy-to-user.png \
180 figures/oprofileui-downloading.png figures/oprofileui-processes.png \
181 figures/perf-probe-do_fork-profile.png \
182 figures/perf-report-cycles-u.png \
183 figures/perf-systemwide.png figures/perf-systemwide-libc.png \
184 figures/perf-wget-busybox-annotate-menu.png \
185 figures/perf-wget-busybox-annotate-udhcpc.png \
186 figures/perf-wget-busybox-debuginfo.png \
187 figures/perf-wget-busybox-dso-zoom.png \
188 figures/perf-wget-busybox-dso-zoom-menu.png \
189 figures/perf-wget-busybox-expanded-stripped.png \
190 figures/perf-wget-flat-stripped.png \
191 figures/perf-wget-g-copy-from-user-expanded-stripped.png \
192 figures/perf-wget-g-copy-to-user-expanded-debuginfo.png \
193 figures/perf-wget-g-copy-to-user-expanded-stripped.png \
194 figures/perf-wget-g-copy-to-user-expanded-stripped-unresolved-hidden.png \
195 figures/pybootchartgui-linux-yocto.png \
196 figures/pychart-linux-yocto-rpm.png \
197 figures/pychart-linux-yocto-rpm-nostrip.png \
198 figures/sched-wakeup-profile.png figures/sysprof-callers.png \
199 figures/sysprof-copy-from-user.png figures/sysprof-copy-to-user.png \
200 figures/cross-development-toolchains.png \
201 figures/user-configuration.png \
202 figures/source-input.png figures/package-feeds.png \
203 figures/layer-input.png figures/images.png figures/sdk.png \
204 figures/source-fetching.png figures/patching.png \
205 figures/configuration-compile-autoreconf.png \
206 figures/analysis-for-package-splitting.png \
207 figures/image-generation.png figures/key-dev-elements.png\
208 figures/sdk-generation.png figures/recipe-workflow.png \
209 figures/build-workspace-directory.png figures/mega-title.png \
210 figures/toaster-title.png figures/hosted-service.png figures/multiconfig_files.png \
211 figures/simple-configuration.png figures/poky-reference-distribution.png \
212 figures/compatible-layers.png figures/import-layer.png figures/new-project.png \
213 figures/sdk-environment.png figures/sdk-installed-standard-sdk-directory.png \
214 figures/sdk-devtool-add-flow.png figures/sdk-installed-extensible-sdk-directory.png \
215 figures/sdk-devtool-modify-flow.png \
216 figures/sdk-devtool-upgrade-flow.png figures/bitbake-build-flow.png figures/bypqs-title.png \
217 figures/overview-manual-title.png figures/sdk-autotools-flow.png figures/sdk-makefile-flow.png \
218 figures/bb_multiconfig_files.png figures/bitbake-title.png figures/cute-files-npm-example.png
219
220MANUALS = $(DOC)/$(DOC).html
221FIGURES = figures
222STYLESHEET = $(DOC)/*.css
223
224endif
225
226ifeq ($(DOC),ref-manual)
227XSLTOPTS = --xinclude
228ALLPREQ = html tarball
229TARFILES = ref-manual.html ref-style.css figures/poky-title.png \
230 figures/build-workspace-directory.png
231MANUALS = $(DOC)/$(DOC).html
232FIGURES = figures
233STYLESHEET = $(DOC)/*.css
234endif
235
236ifeq ($(DOC),sdk-manual)
237XSLTOPTS = --xinclude
238ALLPREQ = html tarball
239TARFILES = sdk-manual.html sdk-style.css figures/sdk-title.png \
240 figures/sdk-environment.png figures/sdk-installed-standard-sdk-directory.png \
241 figures/sdk-installed-extensible-sdk-directory.png figures/sdk-devtool-add-flow.png \
242 figures/sdk-devtool-modify-flow.png \
243 figures/sdk-devtool-upgrade-flow.png figures/sdk-autotools-flow.png figures/sdk-makefile-flow.png
244MANUALS = $(DOC)/$(DOC).html
245FIGURES = figures
246STYLESHEET = $(DOC)/*.css
247endif
248
249ifeq ($(DOC),profile-manual)
250XSLTOPTS = --xinclude
251ALLPREQ = html tarball
252TARFILES = profile-manual.html profile-manual-style.css \
253 figures/profile-title.png figures/kernelshark-all.png \
254 figures/kernelshark-choose-events.png \
255 figures/kernelshark-i915-display.png \
256 figures/kernelshark-output-display.png \
257 figures/oprofileui-busybox.png figures/oprofileui-copy-to-user.png \
258 figures/oprofileui-downloading.png figures/oprofileui-processes.png \
259 figures/perf-probe-do_fork-profile.png \
260 figures/perf-report-cycles-u.png \
261 figures/perf-systemwide.png figures/perf-systemwide-libc.png \
262 figures/perf-wget-busybox-annotate-menu.png \
263 figures/perf-wget-busybox-annotate-udhcpc.png \
264 figures/perf-wget-busybox-debuginfo.png \
265 figures/perf-wget-busybox-dso-zoom.png \
266 figures/perf-wget-busybox-dso-zoom-menu.png \
267 figures/perf-wget-busybox-expanded-stripped.png \
268 figures/perf-wget-flat-stripped.png \
269 figures/perf-wget-g-copy-from-user-expanded-stripped.png \
270 figures/perf-wget-g-copy-to-user-expanded-debuginfo.png \
271 figures/perf-wget-g-copy-to-user-expanded-stripped.png \
272 figures/perf-wget-g-copy-to-user-expanded-stripped-unresolved-hidden.png \
273 figures/pybootchartgui-linux-yocto.png \
274 figures/pychart-linux-yocto-rpm.png \
275 figures/pychart-linux-yocto-rpm-nostrip.png \
276 figures/sched-wakeup-profile.png figures/sysprof-callers.png \
277 figures/sysprof-copy-from-user.png figures/sysprof-copy-to-user.png
278MANUALS = $(DOC)/$(DOC).html
279FIGURES = figures
280STYLESHEET = $(DOC)/*.css
281endif
282
283ifeq ($(DOC),kernel-dev)
284XSLTOPTS = --xinclude
285ALLPREQ = html tarball
286TARFILES = kernel-dev.html kernel-dev-style.css \
287 figures/kernel-dev-title.png figures/kernel-overview-2-generic.png \
288 figures/kernel-architecture-overview.png figures/kernel-dev-flow.png
289MANUALS = $(DOC)/$(DOC).html
290FIGURES = figures
291STYLESHEET = $(DOC)/*.css
292endif
293
294ifeq ($(DOC),toaster-manual)
295XSLTOPTS = --xinclude
296ALLPREQ = html tarball
297TARFILES = toaster-manual.html toaster-manual-style.css \
298 figures/toaster-title.png figures/simple-configuration.png \
299 figures/hosted-service.png \
300 figures/compatible-layers.png figures/import-layer.png figures/new-project.png
301MANUALS = $(DOC)/$(DOC).html
302FIGURES = figures
303STYLESHEET = $(DOC)/*.css
304endif
305
306
307ifeq ($(DOC),test-manual)
308XSLTOPTS = --xinclude
309ALLPREQ = html tarball
310TARFILES = test-manual.html test-manual-style.css \
311 figures/test-manual-title.png figures/ab-test-cluster.png
312MANUALS = $(DOC)/$(DOC).html
313FIGURES = figures
314STYLESHEET = $(DOC)/*.css
315endif
316
317##
318# These URI should be rewritten by your distribution's xml catalog to
319# match your locally installed XSL stylesheets.
320XSL_BASE_URI = http://docbook.sourceforge.net/release/xsl/1.76.1
321XSL_XHTML_URI = $(XSL_BASE_URI)/xhtml/docbook.xsl
322
323all: $(ALLPREQ)
324
325pdf:
326ifeq ($(DOC),brief-yoctoprojectqs)
327 @echo " "
328 @echo "ERROR: You cannot generate a PDF file for brief-yoctoprojectqs."
329 @echo " "
330
331else ifeq ($(DOC),mega-manual)
332 @echo " "
333 @echo "ERROR: You cannot generate a mega-manual PDF file."
334 @echo " "
335
336else
337
338 cd $(DOC); ../tools/poky-docbook-to-pdf $(DOC).xml ../template; cd ..
339endif
340
341html:
342ifeq ($(DOC),mega-manual)
343# See http://www.sagehill.net/docbookxsl/HtmlOutput.html
344 @echo " "
345 @echo "******** Building "$(DOC)
346 @echo " "
347 cd $(DOC); xsltproc $(XSLTOPTS) -o $(DOC).html $(DOC)-customization.xsl $(DOC).xml; cd ..
348 @echo " "
349 @echo "******** Using mega-manual.sed to process external links"
350 @echo " "
351 cd $(DOC); sed -f ../tools/mega-manual.sed < mega-manual.html > mega-output.html; cd ..
352 @echo " "
353 @echo "******** Cleaning up transient file mega-output.html"
354 @echo " "
355 cd $(DOC); rm mega-manual.html; mv mega-output.html mega-manual.html; cd ..
356else
357# See http://www.sagehill.net/docbookxsl/HtmlOutput.html
358 @echo " "
359 @echo "******** Building "$(DOC)
360 @echo " "
361 cd $(DOC); xsltproc $(XSLTOPTS) -o $(DOC).html $(DOC)-customization.xsl $(DOC).xml; cd ..
362endif
363
364
365tarball: html
366 @echo " "
367 @echo "******** Creating Tarball of document files"
368 @echo " "
369 cd $(DOC); tar -cvzf $(DOC).tgz $(TARFILES); cd ..
370
371validate:
372 cd $(DOC); xmllint --postvalid --xinclude --noout $(DOC).xml; cd ..
373
374
375publish:
376 @if test -f $(DOC)/$(DOC).html; \
377 then \
378 echo " "; \
379 echo "******** Publishing "$(DOC)".html"; \
380 echo " "; \
381 scp -r $(MANUALS) $(STYLESHEET) www.yoctoproject.org:/var/www/www.yoctoproject.org-docs/$(VER)/$(DOC); \
382 cd $(DOC); scp -r $(FIGURES) www.yoctoproject.org:/var/www/www.yoctoproject.org-docs/$(VER)/$(DOC); \
383 else \
384 echo " "; \
385 echo $(DOC)".html missing. Generate the file first then try again."; \
386 echo " "; \
387 fi
388
389clean:
390 rm -rf $(MANUALS); rm $(DOC)/$(DOC).tgz;
diff --git a/documentation/adt-manual/adt-command.xml b/documentation/adt-manual/adt-command.xml
deleted file mode 100644
index b88c0ac682..0000000000
--- a/documentation/adt-manual/adt-command.xml
+++ /dev/null
@@ -1,266 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='using-the-command-line'>
7<title>Using the Command Line</title>
8
9 <para>
10 Recall that earlier the manual discussed how to use an existing toolchain
11 tarball that had been installed into the default installation
12 directory, <filename>/opt/poky/&DISTRO;</filename>, which is outside of the
13 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
14 (see the section "<link linkend='using-an-existing-toolchain-tarball'>Using a Cross-Toolchain Tarball)</link>".
15 And, that sourcing your architecture-specific environment setup script
16 initializes a suitable cross-toolchain development environment.
17 </para>
18
19 <para>
20 During this setup, locations for the compiler, QEMU scripts, QEMU binary,
21 a special version of <filename>pkgconfig</filename> and other useful
22 utilities are added to the <filename>PATH</filename> variable.
23 Also, variables to assist
24 <filename>pkgconfig</filename> and <filename>autotools</filename>
25 are also defined so that, for example, <filename>configure.sh</filename>
26 can find pre-generated test results for tests that need target hardware
27 on which to run.
28 You can see the
29 "<link linkend='setting-up-the-cross-development-environment'>Setting Up the Cross-Development Environment</link>"
30 section for the list of cross-toolchain environment variables
31 established by the script.
32 </para>
33
34 <para>
35 Collectively, these conditions allow you to easily use the toolchain
36 outside of the OpenEmbedded build environment on both Autotools-based
37 projects and Makefile-based projects.
38 This chapter provides information for both these types of projects.
39 </para>
40
41
42<section id='autotools-based-projects'>
43<title>Autotools-Based Projects</title>
44
45 <para>
46 Once you have a suitable cross-toolchain installed, it is very easy to
47 develop a project outside of the OpenEmbedded build system.
48 This section presents a simple "Helloworld" example that shows how
49 to set up, compile, and run the project.
50 </para>
51
52 <section id='creating-and-running-a-project-based-on-gnu-autotools'>
53 <title>Creating and Running a Project Based on GNU Autotools</title>
54
55 <para>
56 Follow these steps to create a simple Autotools-based project:
57 <orderedlist>
58 <listitem><para><emphasis>Create your directory:</emphasis>
59 Create a clean directory for your project and then make
60 that directory your working location:
61 <literallayout class='monospaced'>
62 $ mkdir $HOME/helloworld
63 $ cd $HOME/helloworld
64 </literallayout></para></listitem>
65 <listitem><para><emphasis>Populate the directory:</emphasis>
66 Create <filename>hello.c</filename>, <filename>Makefile.am</filename>,
67 and <filename>configure.in</filename> files as follows:
68 <itemizedlist>
69 <listitem><para>For <filename>hello.c</filename>, include
70 these lines:
71 <literallayout class='monospaced'>
72 #include &lt;stdio.h&gt;
73
74 main()
75 {
76 printf("Hello World!\n");
77 }
78 </literallayout></para></listitem>
79 <listitem><para>For <filename>Makefile.am</filename>,
80 include these lines:
81 <literallayout class='monospaced'>
82 bin_PROGRAMS = hello
83 hello_SOURCES = hello.c
84 </literallayout></para></listitem>
85 <listitem><para>For <filename>configure.in</filename>,
86 include these lines:
87 <literallayout class='monospaced'>
88 AC_INIT(hello.c)
89 AM_INIT_AUTOMAKE(hello,0.1)
90 AC_PROG_CC
91 AC_PROG_INSTALL
92 AC_OUTPUT(Makefile)
93 </literallayout></para></listitem>
94 </itemizedlist></para></listitem>
95 <listitem><para><emphasis>Source the cross-toolchain
96 environment setup file:</emphasis>
97 Installation of the cross-toolchain creates a cross-toolchain
98 environment setup script in the directory that the ADT
99 was installed.
100 Before you can use the tools to develop your project, you must
101 source this setup script.
102 The script begins with the string "environment-setup" and contains
103 the machine architecture, which is followed by the string
104 "poky-linux".
105 Here is an example that sources a script from the
106 default ADT installation directory that uses the
107 32-bit Intel x86 Architecture and the
108 &DISTRO_NAME; Yocto Project release:
109 <literallayout class='monospaced'>
110 $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux
111 </literallayout></para></listitem>
112 <listitem><para><emphasis>Generate the local aclocal.m4
113 files and create the configure script:</emphasis>
114 The following GNU Autotools generate the local
115 <filename>aclocal.m4</filename> files and create the
116 configure script:
117 <literallayout class='monospaced'>
118 $ aclocal
119 $ autoconf
120 </literallayout></para></listitem>
121 <listitem><para><emphasis>Generate files needed by GNU
122 coding standards:</emphasis>
123 GNU coding standards require certain files in order for the
124 project to be compliant.
125 This command creates those files:
126 <literallayout class='monospaced'>
127 $ touch NEWS README AUTHORS ChangeLog
128 </literallayout></para></listitem>
129 <listitem><para><emphasis>Generate the configure
130 file:</emphasis>
131 This command generates the <filename>configure</filename>:
132 <literallayout class='monospaced'>
133 $ automake -a
134 </literallayout></para></listitem>
135 <listitem><para><emphasis>Cross-compile the project:</emphasis>
136 This command compiles the project using the cross-compiler.
137 The
138 <ulink url='&YOCTO_DOCS_REF_URL;#var-CONFIGURE_FLAGS'><filename>CONFIGURE_FLAGS</filename></ulink>
139 environment variable provides the minimal arguments for
140 GNU configure:
141 <literallayout class='monospaced'>
142 $ ./configure ${CONFIGURE_FLAGS}
143 </literallayout></para></listitem>
144 <listitem><para><emphasis>Make and install the project:</emphasis>
145 These two commands generate and install the project into the
146 destination directory:
147 <literallayout class='monospaced'>
148 $ make
149 $ make install DESTDIR=./tmp
150 </literallayout></para></listitem>
151 <listitem><para><emphasis>Verify the installation:</emphasis>
152 This command is a simple way to verify the installation
153 of your project.
154 Running the command prints the architecture on which
155 the binary file can run.
156 This architecture should be the same architecture that
157 the installed cross-toolchain supports.
158 <literallayout class='monospaced'>
159 $ file ./tmp/usr/local/bin/hello
160 </literallayout></para></listitem>
161 <listitem><para><emphasis>Execute your project:</emphasis>
162 To execute the project in the shell, simply enter the name.
163 You could also copy the binary to the actual target hardware
164 and run the project there as well:
165 <literallayout class='monospaced'>
166 $ ./hello
167 </literallayout>
168 As expected, the project displays the "Hello World!" message.
169 </para></listitem>
170 </orderedlist>
171 </para>
172 </section>
173
174 <section id='passing-host-options'>
175 <title>Passing Host Options</title>
176
177 <para>
178 For an Autotools-based project, you can use the cross-toolchain by just
179 passing the appropriate host option to <filename>configure.sh</filename>.
180 The host option you use is derived from the name of the environment setup
181 script found in the directory in which you installed the cross-toolchain.
182 For example, the host option for an ARM-based target that uses the GNU EABI
183 is <filename>armv5te-poky-linux-gnueabi</filename>.
184 You will notice that the name of the script is
185 <filename>environment-setup-armv5te-poky-linux-gnueabi</filename>.
186 Thus, the following command works to update your project and
187 rebuild it using the appropriate cross-toolchain tools:
188 <literallayout class='monospaced'>
189 $ ./configure --host=armv5te-poky-linux-gnueabi \
190 --with-libtool-sysroot=<replaceable>sysroot_dir</replaceable>
191 </literallayout>
192 <note>
193 If the <filename>configure</filename> script results in problems recognizing the
194 <filename>--with-libtool-sysroot=</filename><replaceable>sysroot-dir</replaceable> option,
195 regenerate the script to enable the support by doing the following and then
196 run the script again:
197 <literallayout class='monospaced'>
198 $ libtoolize --automake
199 $ aclocal -I ${OECORE_NATIVE_SYSROOT}/usr/share/aclocal \
200 [-I <replaceable>dir_containing_your_project-specific_m4_macros</replaceable>]
201 $ autoconf
202 $ autoheader
203 $ automake -a
204 </literallayout>
205 </note>
206 </para>
207 </section>
208</section>
209
210<section id='makefile-based-projects'>
211<title>Makefile-Based Projects</title>
212
213 <para>
214 For Makefile-based projects, the cross-toolchain environment variables
215 established by running the cross-toolchain environment setup script
216 are subject to general <filename>make</filename> rules.
217 </para>
218
219 <para>
220 To illustrate this, consider the following four cross-toolchain
221 environment variables:
222 <literallayout class='monospaced'>
223 <ulink url='&YOCTO_DOCS_REF_URL;#var-CC'>CC</ulink>=i586-poky-linux-gcc -m32 -march=i586 --sysroot=/opt/poky/1.8/sysroots/i586-poky-linux
224 <ulink url='&YOCTO_DOCS_REF_URL;#var-LD'>LD</ulink>=i586-poky-linux-ld --sysroot=/opt/poky/1.8/sysroots/i586-poky-linux
225 <ulink url='&YOCTO_DOCS_REF_URL;#var-CFLAGS'>CFLAGS</ulink>=-O2 -pipe -g -feliminate-unused-debug-types
226 <ulink url='&YOCTO_DOCS_REF_URL;#var-CXXFLAGS'>CXXFLAGS</ulink>=-O2 -pipe -g -feliminate-unused-debug-types
227 </literallayout>
228 Now, consider the following three cases:
229 <itemizedlist>
230 <listitem><para><emphasis>Case 1 - No Variables Set in the <filename>Makefile</filename>:</emphasis>
231 Because these variables are not specifically set in the
232 <filename>Makefile</filename>, the variables retain their
233 values based on the environment.
234 </para></listitem>
235 <listitem><para><emphasis>Case 2 - Variables Set in the <filename>Makefile</filename>:</emphasis>
236 Specifically setting variables in the
237 <filename>Makefile</filename> during the build results in the
238 environment settings of the variables being overwritten.
239 </para></listitem>
240 <listitem><para><emphasis>Case 3 - Variables Set when the <filename>Makefile</filename> is Executed from the Command Line:</emphasis>
241 Executing the <filename>Makefile</filename> from the command
242 line results in the variables being overwritten with
243 command-line content regardless of what is being set in the
244 <filename>Makefile</filename>.
245 In this case, environment variables are not considered unless
246 you use the "-e" flag during the build:
247 <literallayout class='monospaced'>
248 $ make -e <replaceable>file</replaceable>
249 </literallayout>
250 If you use this flag, then the environment values of the
251 variables override any variables specifically set in the
252 <filename>Makefile</filename>.
253 </para></listitem>
254 </itemizedlist>
255 <note>
256 For the list of variables set up by the cross-toolchain environment
257 setup script, see the
258 "<link linkend='setting-up-the-cross-development-environment'>Setting Up the Cross-Development Environment</link>"
259 section.
260 </note>
261 </para>
262</section>
263</chapter>
264<!--
265vim: expandtab tw=80 ts=4
266-->
diff --git a/documentation/adt-manual/adt-intro.xml b/documentation/adt-manual/adt-intro.xml
deleted file mode 100644
index eb75763db3..0000000000
--- a/documentation/adt-manual/adt-intro.xml
+++ /dev/null
@@ -1,181 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='adt-intro'>
7 <title>The Application Development Toolkit (ADT)</title>
8
9 <para>
10 Part of the Yocto Project development solution is an Application Development
11 Toolkit (ADT).
12 The ADT provides you with a custom-built, cross-development
13 platform suited for developing a user-targeted product application.
14 </para>
15
16 <para>
17 Fundamentally, the ADT consists of the following:
18 <itemizedlist>
19 <listitem><para>An architecture-specific cross-toolchain and matching
20 sysroot both built by the
21 <ulink url='&YOCTO_DOCS_DEV_URL;#build-system-term'>OpenEmbedded build system</ulink>.
22 The toolchain and sysroot are based on a
23 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
24 configuration and extensions,
25 which allows you to cross-develop on the host machine for the target hardware.
26 </para></listitem>
27 <listitem><para>The Eclipse IDE Yocto Plug-in.</para></listitem>
28 <listitem><para>The Quick EMUlator (QEMU), which lets you simulate target hardware.
29 </para></listitem>
30 <listitem><para>Various user-space tools that greatly enhance your application
31 development experience.</para></listitem>
32 </itemizedlist>
33 </para>
34
35 <section id='the-cross-development-toolchain'>
36 <title>The Cross-Development Toolchain</title>
37
38 <para>
39 The
40 <ulink url='&YOCTO_DOCS_DEV_URL;#cross-development-toolchain'>Cross-Development Toolchain</ulink>
41 consists of a cross-compiler, cross-linker, and cross-debugger
42 that are used to develop user-space applications for targeted
43 hardware.
44 This toolchain is created either by running the ADT Installer
45 script, a toolchain installer script, or through a
46 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
47 that is based on your Metadata configuration or extension for
48 your targeted device.
49 The cross-toolchain works with a matching target sysroot.
50 </para>
51 </section>
52
53 <section id='sysroot'>
54 <title>Sysroot</title>
55
56 <para>
57 The matching target sysroot contains needed headers and libraries for generating
58 binaries that run on the target architecture.
59 The sysroot is based on the target root filesystem image that is built by
60 the OpenEmbedded build system and uses the same Metadata configuration
61 used to build the cross-toolchain.
62 </para>
63 </section>
64
65 <section id='eclipse-overview'>
66 <title>Eclipse Yocto Plug-in</title>
67
68 <para>
69 The Eclipse IDE is a popular development environment and it fully supports
70 development using the Yocto Project.
71 When you install and configure the Eclipse Yocto Project Plug-in into
72 the Eclipse IDE, you maximize your Yocto Project experience.
73 Installing and configuring the Plug-in results in an environment that
74 has extensions specifically designed to let you more easily develop software.
75 These extensions allow for cross-compilation, deployment, and execution of
76 your output into a QEMU emulation session.
77 You can also perform cross-debugging and profiling.
78 The environment also supports a suite of tools that allows you to perform
79 remote profiling, tracing, collection of power data, collection of
80 latency data, and collection of performance data.
81 </para>
82
83 <para>
84 For information about the application development workflow that uses the Eclipse
85 IDE and for a detailed example of how to install and configure the Eclipse
86 Yocto Project Plug-in, see the
87 "<ulink url='&YOCTO_DOCS_DEV_URL;#adt-eclipse'>Working Within Eclipse</ulink>" section
88 of the Yocto Project Development Manual.
89 </para>
90 </section>
91
92 <section id='the-qemu-emulator'>
93 <title>The QEMU Emulator</title>
94
95 <para>
96 The QEMU emulator allows you to simulate your hardware while running your
97 application or image.
98 QEMU is made available a number of ways:
99 <itemizedlist>
100 <listitem><para>
101 If you use the ADT Installer script to install ADT, you can
102 specify whether or not to install QEMU.
103 </para></listitem>
104 <listitem><para>
105 If you have cloned the <filename>poky</filename> Git
106 repository to create a
107 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
108 and you have sourced the environment setup script, QEMU is
109 installed and automatically available.
110 </para></listitem>
111 <listitem><para>
112 If you have downloaded a Yocto Project release and unpacked
113 it to create a
114 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
115 and you have sourced the environment setup script, QEMU is
116 installed and automatically available.
117 </para></listitem>
118 <listitem><para>
119 If you have installed the cross-toolchain tarball and you
120 have sourced the toolchain's setup environment script, QEMU
121 is also installed and automatically available.
122 </para></listitem>
123 </itemizedlist>
124 </para>
125 </section>
126
127 <section id='user-space-tools'>
128 <title>User-Space Tools</title>
129
130 <para>
131 User-space tools are included as part of the Yocto Project.
132 You will find these tools helpful during development.
133 The tools include LatencyTOP, PowerTOP, OProfile, Perf, SystemTap, and Lttng-ust.
134 These tools are common development tools for the Linux platform.
135 <itemizedlist>
136 <listitem><para><emphasis>LatencyTOP:</emphasis> LatencyTOP focuses on latency
137 that causes skips in audio,
138 stutters in your desktop experience, or situations that overload your server
139 even when you have plenty of CPU power left.
140 </para></listitem>
141 <listitem><para><emphasis>PowerTOP:</emphasis> Helps you determine what
142 software is using the most power.
143 You can find out more about PowerTOP at
144 <ulink url='https://01.org/powertop/'></ulink>.</para></listitem>
145 <listitem><para><emphasis>OProfile:</emphasis> A system-wide profiler for Linux
146 systems that is capable of profiling all running code at low overhead.
147 You can find out more about OProfile at
148 <ulink url='http://oprofile.sourceforge.net/about/'></ulink>.
149 For examples on how to setup and use this tool, see the
150 "<ulink url='&YOCTO_DOCS_PROF_URL;#profile-manual-oprofile'>OProfile</ulink>"
151 section in the Yocto Project Profiling and Tracing Manual.
152 </para></listitem>
153 <listitem><para><emphasis>Perf:</emphasis> Performance counters for Linux used
154 to keep track of certain types of hardware and software events.
155 For more information on these types of counters see
156 <ulink url='https://perf.wiki.kernel.org/'></ulink>.
157 For examples on how to setup and use this tool, see the
158 "<ulink url='&YOCTO_DOCS_PROF_URL;#profile-manual-perf'>perf</ulink>"
159 section in the Yocto Project Profiling and Tracing Manual.
160 </para></listitem>
161 <listitem><para><emphasis>SystemTap:</emphasis> A free software infrastructure
162 that simplifies information gathering about a running Linux system.
163 This information helps you diagnose performance or functional problems.
164 SystemTap is not available as a user-space tool through the Eclipse IDE Yocto Plug-in.
165 See <ulink url='http://sourceware.org/systemtap'></ulink> for more information
166 on SystemTap.
167 For examples on how to setup and use this tool, see the
168 "<ulink url='&YOCTO_DOCS_PROF_URL;#profile-manual-systemtap'>SystemTap</ulink>"
169 section in the Yocto Project Profiling and Tracing Manual.</para></listitem>
170 <listitem><para><emphasis>Lttng-ust:</emphasis> A User-space Tracer designed to
171 provide detailed information on user-space activity.
172 See <ulink url='http://lttng.org/ust'></ulink> for more information on Lttng-ust.
173 </para></listitem>
174 </itemizedlist>
175 </para>
176 </section>
177
178</chapter>
179<!--
180vim: expandtab tw=80 ts=4
181-->
diff --git a/documentation/adt-manual/adt-manual-customization.xsl b/documentation/adt-manual/adt-manual-customization.xsl
deleted file mode 100644
index 551f7e9e94..0000000000
--- a/documentation/adt-manual/adt-manual-customization.xsl
+++ /dev/null
@@ -1,28 +0,0 @@
1<?xml version='1.0'?>
2<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
3<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
4
5 <xsl:import href="http://downloads.yoctoproject.org/mirror/docbook-mirror/docbook-xsl-1.76.1/xhtml/docbook.xsl" />
6
7<!--
8
9 <xsl:import href="../template/1.76.1/docbook-xsl-1.76.1/xhtml/docbook.xsl" />
10
11 <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.76.1/xhtml/docbook.xsl" />
12
13-->
14
15 <xsl:include href="../template/permalinks.xsl"/>
16 <xsl:include href="../template/section.title.xsl"/>
17 <xsl:include href="../template/component.title.xsl"/>
18 <xsl:include href="../template/division.title.xsl"/>
19 <xsl:include href="../template/formal.object.heading.xsl"/>
20
21 <xsl:param name="html.stylesheet" select="'adt-style.css'" />
22 <xsl:param name="chapter.autolabel" select="1" />
23 <xsl:param name="appendix.autolabel" select="A" />
24 <xsl:param name="section.autolabel" select="1" />
25 <xsl:param name="section.label.includes.component.label" select="1" />
26 <xsl:param name="generate.id.attributes" select="1" />
27
28</xsl:stylesheet>
diff --git a/documentation/adt-manual/adt-manual-eclipse-customization.xsl b/documentation/adt-manual/adt-manual-eclipse-customization.xsl
deleted file mode 100644
index 3d536d5473..0000000000
--- a/documentation/adt-manual/adt-manual-eclipse-customization.xsl
+++ /dev/null
@@ -1,37 +0,0 @@
1<?xml version='1.0'?>
2<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
3
4<xsl:stylesheet
5 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
6 xmlns="http://www.w3.org/1999/xhtml"
7 xmlns:fo="http://www.w3.org/1999/XSL/Format"
8 version="1.0">
9
10 <xsl:import href="http://downloads.yoctoproject.org/mirror/docbook-mirror/docbook-xsl-1.76.1/eclipse/eclipse3.xsl" />
11
12<!--
13
14 <xsl:import href="../template/1.76.1/docbook-xsl-1.76.1/eclipse/eclipse3.xsl" />
15
16 <xsl:import
17 href="http://docbook.sourceforge.net/release/xsl/1.76.1/eclipse/eclipse3.xsl" />
18
19-->
20
21 <xsl:param name="chunker.output.indent" select="'yes'"/>
22 <xsl:param name="chunk.quietly" select="1"/>
23 <xsl:param name="chunk.first.sections" select="1"/>
24 <xsl:param name="chunk.section.depth" select="10"/>
25 <xsl:param name="use.id.as.filename" select="1"/>
26 <xsl:param name="ulink.target" select="'_self'" />
27 <xsl:param name="base.dir" select="'html/adt-manual/'"/>
28 <xsl:param name="html.stylesheet" select="'../book.css'"/>
29 <xsl:param name="eclipse.manifest" select="0"/>
30 <xsl:param name="create.plugin.xml" select="0"/>
31 <xsl:param name="suppress.navigation" select="1"/>
32 <xsl:param name="generate.index" select="0"/>
33 <xsl:param name="chapter.autolabel" select="1" />
34 <xsl:param name="appendix.autolabel" select="1" />
35 <xsl:param name="section.autolabel" select="1" />
36 <xsl:param name="section.label.includes.component.label" select="1" />
37</xsl:stylesheet>
diff --git a/documentation/adt-manual/adt-manual-intro.xml b/documentation/adt-manual/adt-manual-intro.xml
deleted file mode 100644
index b7a25a54bd..0000000000
--- a/documentation/adt-manual/adt-manual-intro.xml
+++ /dev/null
@@ -1,34 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='adt-manual-intro'>
7<title>Introduction</title>
8
9 <para>
10 Welcome to the Yocto Project Application Developer's Guide.
11 This manual provides information that lets you begin developing applications
12 using the Yocto Project.
13 </para>
14
15 <para>
16 The Yocto Project provides an application development environment based on
17 an Application Development Toolkit (ADT) and the availability of stand-alone
18 cross-development toolchains and other tools.
19 This manual describes the ADT and how you can configure and install it,
20 how to access and use the cross-development toolchains, how to
21 customize the development packages installation,
22 how to use command-line development for both Autotools-based and
23 Makefile-based projects, and an introduction to the
24 <trademark class='trade'>Eclipse</trademark> IDE Yocto Plug-in.
25 <note>
26 The ADT is distribution-neutral and does not require the Yocto
27 Project reference distribution, which is called Poky.
28 This manual, however, uses examples that use the Poky distribution.
29 </note>
30 </para>
31</chapter>
32<!--
33vim: expandtab tw=80 ts=4
34-->
diff --git a/documentation/adt-manual/adt-manual.xml b/documentation/adt-manual/adt-manual.xml
deleted file mode 100644
index 13202cc0de..0000000000
--- a/documentation/adt-manual/adt-manual.xml
+++ /dev/null
@@ -1,141 +0,0 @@
1<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<book id='adt-manual' lang='en'
7 xmlns:xi="http://www.w3.org/2003/XInclude"
8 xmlns="http://docbook.org/ns/docbook"
9 >
10 <bookinfo>
11
12 <mediaobject>
13 <imageobject>
14 <imagedata fileref='figures/adt-title.png'
15 format='SVG'
16 align='left' scalefit='1' width='100%'/>
17 </imageobject>
18 </mediaobject>
19
20 <title>
21 Yocto Project Application Developer's Guide
22 </title>
23
24 <authorgroup>
25 <author>
26 <firstname>Jessica</firstname> <surname>Zhang</surname>
27 <affiliation>
28 <orgname>Intel Corporation</orgname>
29 </affiliation>
30 <email>jessica.zhang@intel.com</email>
31 </author>
32 </authorgroup>
33
34 <revhistory>
35 <revision>
36 <revnumber>1.0</revnumber>
37 <date>6 April 2011</date>
38 <revremark>Released with the Yocto Project 1.0 Release.</revremark>
39 </revision>
40 <revision>
41 <revnumber>1.0.1</revnumber>
42 <date>23 May 2011</date>
43 <revremark>Released with the Yocto Project 1.0.1 Release.</revremark>
44 </revision>
45 <revision>
46 <revnumber>1.1</revnumber>
47 <date>6 October 2011</date>
48 <revremark>Released with the Yocto Project 1.1 Release.</revremark>
49 </revision>
50 <revision>
51 <revnumber>1.2</revnumber>
52 <date>April 2012</date>
53 <revremark>Released with the Yocto Project 1.2 Release.</revremark>
54 </revision>
55 <revision>
56 <revnumber>1.3</revnumber>
57 <date>October 2012</date>
58 <revremark>Released with the Yocto Project 1.3 Release.</revremark>
59 </revision>
60 <revision>
61 <revnumber>1.4</revnumber>
62 <date>April 2013</date>
63 <revremark>Released with the Yocto Project 1.4 Release.</revremark>
64 </revision>
65 <revision>
66 <revnumber>1.5</revnumber>
67 <date>October 2013</date>
68 <revremark>Released with the Yocto Project 1.5 Release.</revremark>
69 </revision>
70 <revision>
71 <revnumber>1.5.1</revnumber>
72 <date>January 2014</date>
73 <revremark>Released with the Yocto Project 1.5.1 Release.</revremark>
74 </revision>
75 <revision>
76 <revnumber>1.6</revnumber>
77 <date>April 2014</date>
78 <revremark>Released with the Yocto Project 1.6 Release.</revremark>
79 </revision>
80 <revision>
81 <revnumber>1.7</revnumber>
82 <date>October 2014</date>
83 <revremark>Released with the Yocto Project 1.7 Release.</revremark>
84 </revision>
85 <revision>
86 <revnumber>1.8</revnumber>
87 <date>April 2015</date>
88 <revremark>Released with the Yocto Project 1.8 Release.</revremark>
89 </revision>
90 <revision>
91 <revnumber>2.0</revnumber>
92 <date>October 2015</date>
93 <revremark>Released with the Yocto Project 2.0 Release.</revremark>
94 </revision>
95 <revision>
96 <revnumber>2.1</revnumber>
97 <date>Sometime in 2016</date>
98 <revremark>Released with the future Yocto Project 2.1 Release.</revremark>
99 </revision>
100 </revhistory>
101
102 <copyright>
103 <year>&COPYRIGHT_YEAR;</year>
104 <holder>Linux Foundation</holder>
105 </copyright>
106
107 <legalnotice>
108 <para>
109 Permission is granted to copy, distribute and/or modify this document under
110 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 &amp; Wales</ulink> as published by Creative Commons.
111 </para>
112 <note>
113 For the latest version of this manual associated with this
114 Yocto Project release, see the
115 <ulink url='&YOCTO_DOCS_ADT_URL;'>Yocto Project Application Developer's Guide</ulink>
116 from the Yocto Project website.
117 </note>
118
119 </legalnotice>
120
121 </bookinfo>
122
123 <xi:include href="adt-manual-intro.xml"/>
124
125 <xi:include href="adt-intro.xml"/>
126
127 <xi:include href="adt-prepare.xml"/>
128
129 <xi:include href="adt-package.xml"/>
130
131 <xi:include href="adt-command.xml"/>
132
133<!-- <index id='index'>
134 <title>Index</title>
135 </index>
136-->
137
138</book>
139<!--
140vim: expandtab tw=80 ts=4
141-->
diff --git a/documentation/adt-manual/adt-package.xml b/documentation/adt-manual/adt-package.xml
deleted file mode 100644
index eaed0447b6..0000000000
--- a/documentation/adt-manual/adt-package.xml
+++ /dev/null
@@ -1,103 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='adt-package'>
7<title>Optionally Customizing the Development Packages Installation</title>
8
9 <para>
10 Because the Yocto Project is suited for embedded Linux development, it is
11 likely that you will need to customize your development packages installation.
12 For example, if you are developing a minimal image, then you might not need
13 certain packages (e.g. graphics support packages).
14 Thus, you would like to be able to remove those packages from your target sysroot.
15 </para>
16
17<section id='package-management-systems'>
18 <title>Package Management Systems</title>
19
20 <para>
21 The OpenEmbedded build system supports the generation of sysroot files using
22 three different Package Management Systems (PMS):
23 <itemizedlist>
24 <listitem><para><emphasis>OPKG:</emphasis> A less well known PMS whose use
25 originated in the OpenEmbedded and OpenWrt embedded Linux projects.
26 This PMS works with files packaged in an <filename>.ipk</filename> format.
27 See <ulink url='http://en.wikipedia.org/wiki/Opkg'></ulink> for more
28 information about OPKG.</para></listitem>
29 <listitem><para><emphasis>RPM:</emphasis> A more widely known PMS intended for GNU/Linux
30 distributions.
31 This PMS works with files packaged in an <filename>.rpm</filename> format.
32 The build system currently installs through this PMS by default.
33 See <ulink url='http://en.wikipedia.org/wiki/RPM_Package_Manager'></ulink>
34 for more information about RPM.</para></listitem>
35 <listitem><para><emphasis>Debian:</emphasis> The PMS for Debian-based systems
36 is built on many PMS tools.
37 The lower-level PMS tool <filename>dpkg</filename> forms the base of the Debian PMS.
38 For information on dpkg see
39 <ulink url='http://en.wikipedia.org/wiki/Dpkg'></ulink>.</para></listitem>
40 </itemizedlist>
41 </para>
42</section>
43
44<section id='configuring-the-pms'>
45 <title>Configuring the PMS</title>
46
47 <para>
48 Whichever PMS you are using, you need to be sure that the
49 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></ulink>
50 variable in the <filename>conf/local.conf</filename>
51 file is set to reflect that system.
52 The first value you choose for the variable specifies the package file format for the root
53 filesystem at sysroot.
54 Additional values specify additional formats for convenience or testing.
55 See the <filename>conf/local.conf</filename> configuration file for
56 details.
57 </para>
58
59 <note>
60 For build performance information related to the PMS, see the
61 "<ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-package'><filename>package.bbclass</filename></ulink>"
62 section in the Yocto Project Reference Manual.
63 </note>
64
65 <para>
66 As an example, consider a scenario where you are using OPKG and you want to add
67 the <filename>libglade</filename> package to the target sysroot.
68 </para>
69
70 <para>
71 First, you should generate the IPK file for the
72 <filename>libglade</filename> package and add it
73 into a working <filename>opkg</filename> repository.
74 Use these commands:
75 <literallayout class='monospaced'>
76 $ bitbake libglade
77 $ bitbake package-index
78 </literallayout>
79 </para>
80
81 <para>
82 Next, source the cross-toolchain environment setup script found in the
83 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
84 Follow that by setting up the installation destination to point to your
85 sysroot as <replaceable>sysroot_dir</replaceable>.
86 Finally, have an OPKG configuration file <replaceable>conf_file</replaceable>
87 that corresponds to the <filename>opkg</filename> repository you have just created.
88 The following command forms should now work:
89 <literallayout class='monospaced'>
90 $ opkg-cl –f <replaceable>conf_file</replaceable> -o <replaceable>sysroot_dir</replaceable> update
91 $ opkg-cl –f <replaceable>cconf_file</replaceable> -o <replaceable>sysroot_dir</replaceable> \
92 --force-overwrite install libglade
93 $ opkg-cl –f <replaceable>cconf_file</replaceable> -o <replaceable>sysroot_dir</replaceable> \
94 --force-overwrite install libglade-dbg
95 $ opkg-cl –f <replaceable>conf_file&gt; -o </replaceable>sysroot_dir&gt; \
96 --force-overwrite install libglade-dev
97 </literallayout>
98 </para>
99</section>
100</chapter>
101<!--
102vim: expandtab tw=80 ts=4
103-->
diff --git a/documentation/adt-manual/adt-prepare.xml b/documentation/adt-manual/adt-prepare.xml
deleted file mode 100644
index 2dc9843259..0000000000
--- a/documentation/adt-manual/adt-prepare.xml
+++ /dev/null
@@ -1,1000 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='adt-prepare'>
7
8<title>Preparing for Application Development</title>
9
10<para>
11 In order to develop applications, you need set up your host development system.
12 Several ways exist that allow you to install cross-development tools, QEMU, the
13 Eclipse Yocto Plug-in, and other tools.
14 This chapter describes how to prepare for application development.
15</para>
16
17<section id='installing-the-adt'>
18 <title>Installing the ADT and Toolchains</title>
19
20 <para>
21 The following list describes installation methods that set up varying
22 degrees of tool availability on your system.
23 Regardless of the installation method you choose,
24 you must <filename>source</filename> the cross-toolchain
25 environment setup script, which establishes several key
26 environment variables, before you use a toolchain.
27 See the
28 "<link linkend='setting-up-the-cross-development-environment'>Setting Up the Cross-Development Environment</link>"
29 section for more information.
30 </para>
31
32 <note>
33 <para>
34 Avoid mixing installation methods when installing toolchains for
35 different architectures.
36 For example, avoid using the ADT Installer to install some
37 toolchains and then hand-installing cross-development toolchains
38 by running the toolchain installer for different architectures.
39 Mixing installation methods can result in situations where the
40 ADT Installer becomes unreliable and might not install the
41 toolchain.
42 </para>
43
44 <para>
45 If you must mix installation methods, you might avoid problems by
46 deleting <filename>/var/lib/opkg</filename>, thus purging the
47 <filename>opkg</filename> package metadata.
48 </para>
49 </note>
50
51 <para>
52 <itemizedlist>
53 <listitem><para><emphasis>Use the ADT installer script:</emphasis>
54 This method is the recommended way to install the ADT because it
55 automates much of the process for you.
56 For example, you can configure the installation to install the QEMU emulator
57 and the user-space NFS, specify which root filesystem profiles to download,
58 and define the target sysroot location.</para></listitem>
59 <listitem><para><emphasis>Use an existing toolchain:</emphasis>
60 Using this method, you select and download an architecture-specific
61 toolchain installer and then run the script to hand-install the toolchain.
62 If you use this method, you just get the cross-toolchain and QEMU - you do not
63 get any of the other mentioned benefits had you run the ADT Installer script.</para></listitem>
64 <listitem><para><emphasis>Use the toolchain from within the Build Directory:</emphasis>
65 If you already have a
66 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>,
67 you can build the cross-toolchain within the directory.
68 However, like the previous method mentioned, you only get the cross-toolchain and QEMU - you
69 do not get any of the other benefits without taking separate steps.</para></listitem>
70 </itemizedlist>
71 </para>
72
73 <section id='using-the-adt-installer'>
74 <title>Using the ADT Installer</title>
75
76 <para>
77 To run the ADT Installer, you need to get the ADT Installer tarball, be sure
78 you have the necessary host development packages that support the ADT Installer,
79 and then run the ADT Installer Script.
80 </para>
81
82 <para>
83 For a list of the host packages needed to support ADT installation and use, see the
84 "ADT Installer Extras" lists in the
85 "<ulink url='&YOCTO_DOCS_REF_URL;#required-packages-for-the-host-development-system'>Required Packages for the Host Development System</ulink>" section
86 of the Yocto Project Reference Manual.
87 </para>
88
89 <section id='getting-the-adt-installer-tarball'>
90 <title>Getting the ADT Installer Tarball</title>
91
92 <para>
93 The ADT Installer is contained in the ADT Installer tarball.
94 You can get the tarball using either of these methods:
95 <itemizedlist>
96 <listitem><para><emphasis>Download the Tarball:</emphasis>
97 You can download the tarball from
98 <ulink url='&YOCTO_ADTINSTALLER_DL_URL;'></ulink> into
99 any directory.</para></listitem>
100 <listitem><para><emphasis>Build the Tarball:</emphasis>
101 You can use
102 <ulink url='&YOCTO_DOCS_DEV_URL;#bitbake-term'>BitBake</ulink>
103 to generate the tarball inside an existing
104 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
105 </para>
106 <para>If you use BitBake to generate the ADT Installer
107 tarball, you must <filename>source</filename> the
108 environment setup script
109 (<ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
110 or
111 <ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink>)
112 located in the Source Directory before running the
113 <filename>bitbake</filename> command that creates the
114 tarball.</para>
115 <para>The following example commands establish
116 the
117 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>,
118 check out the current release branch, set up the
119 build environment while also creating the default
120 Build Directory, and run the
121 <filename>bitbake</filename> command that results in the
122 tarball
123 <filename>poky/build/tmp/deploy/sdk/adt_installer.tar.bz2</filename>:
124 <note>
125 Before using BitBake to build the ADT tarball, be
126 sure to make sure your
127 <filename>local.conf</filename> file is properly
128 configured.
129 See the
130 "<ulink url='&YOCTO_DOCS_REF_URL;#user-configuration'>User Configuration</ulink>"
131 section in the Yocto Project Reference Manual for
132 general configuration information.
133 </note>
134 <literallayout class='monospaced'>
135 $ cd ~
136 $ git clone git://git.yoctoproject.org/poky
137 $ cd poky
138 $ git checkout -b &DISTRO_NAME; origin/&DISTRO_NAME;
139 $ source &OE_INIT_FILE;
140 $ bitbake adt-installer
141 </literallayout></para></listitem>
142 </itemizedlist>
143 </para>
144 </section>
145
146 <section id='configuring-and-running-the-adt-installer-script'>
147 <title>Configuring and Running the ADT Installer Script</title>
148
149 <para>
150 Before running the ADT Installer script, you need to unpack the tarball.
151 You can unpack the tarball in any directory you wish.
152 For example, this command copies the ADT Installer tarball from where
153 it was built into the home directory and then unpacks the tarball into
154 a top-level directory named <filename>adt-installer</filename>:
155 <literallayout class='monospaced'>
156 $ cd ~
157 $ cp poky/build/tmp/deploy/sdk/adt_installer.tar.bz2 $HOME
158 $ tar -xjf adt_installer.tar.bz2
159 </literallayout>
160 Unpacking it creates the directory <filename>adt-installer</filename>,
161 which contains the ADT Installer script (<filename>adt_installer</filename>)
162 and its configuration file (<filename>adt_installer.conf</filename>).
163 </para>
164
165 <para>
166 Before you run the script, however, you should examine the ADT Installer configuration
167 file and be sure you are going to get what you want.
168 Your configurations determine which kernel and filesystem image are downloaded.
169 </para>
170
171 <para>
172 The following list describes the configurations you can define for the ADT Installer.
173 For configuration values and restrictions, see the comments in
174 the <filename>adt-installer.conf</filename> file:
175
176 <itemizedlist>
177 <listitem><para><filename>YOCTOADT_REPO</filename>: This area
178 includes the IPKG-based packages and the root filesystem upon which
179 the installation is based.
180 If you want to set up your own IPKG repository pointed to by
181 <filename>YOCTOADT_REPO</filename>, you need to be sure that the
182 directory structure follows the same layout as the reference directory
183 set up at <ulink url='http://adtrepo.yoctoproject.org'></ulink>.
184 Also, your repository needs to be accessible through HTTP.</para></listitem>
185 <listitem><para><filename>YOCTOADT_TARGETS</filename>: The machine
186 target architectures for which you want to set up cross-development
187 environments.</para></listitem>
188 <listitem><para><filename>YOCTOADT_QEMU</filename>: Indicates whether
189 or not to install the emulator QEMU.</para></listitem>
190 <listitem><para><filename>YOCTOADT_NFS_UTIL</filename>: Indicates whether
191 or not to install user-mode NFS.
192 If you plan to use the Eclipse IDE Yocto plug-in against QEMU,
193 you should install NFS.
194 <note>To boot QEMU images using our userspace NFS server, you need
195 to be running <filename>portmap</filename> or <filename>rpcbind</filename>.
196 If you are running <filename>rpcbind</filename>, you will also need to add the
197 <filename>-i</filename> option when <filename>rpcbind</filename> starts up.
198 Please make sure you understand the security implications of doing this.
199 You might also have to modify your firewall settings to allow
200 NFS booting to work.</note></para></listitem>
201 <listitem><para><filename>YOCTOADT_ROOTFS_</filename><replaceable>arch</replaceable>: The root
202 filesystem images you want to download from the
203 <filename>YOCTOADT_IPKG_REPO</filename> repository.</para></listitem>
204 <listitem><para><filename>YOCTOADT_TARGET_SYSROOT_IMAGE_</filename><replaceable>arch</replaceable>: The
205 particular root filesystem used to extract and create the target sysroot.
206 The value of this variable must have been specified with
207 <filename>YOCTOADT_ROOTFS_</filename><replaceable>arch</replaceable>.
208 For example, if you downloaded both <filename>minimal</filename> and
209 <filename>sato-sdk</filename> images by setting
210 <filename>YOCTOADT_ROOTFS_</filename><replaceable>arch</replaceable>
211 to "minimal sato-sdk", then <filename>YOCTOADT_ROOTFS_</filename><replaceable>arch</replaceable>
212 must be set to either "minimal" or "sato-sdk".
213 </para></listitem>
214 <listitem><para><filename>YOCTOADT_TARGET_SYSROOT_LOC_</filename><replaceable>arch</replaceable>: The
215 location on the development host where the target sysroot is created.
216 </para></listitem>
217 </itemizedlist>
218 </para>
219
220 <para>
221 After you have configured the <filename>adt_installer.conf</filename> file,
222 run the installer using the following command:
223 <literallayout class='monospaced'>
224 $ cd adt-installer
225 $ ./adt_installer
226 </literallayout>
227 Once the installer begins to run, you are asked to enter the
228 location for cross-toolchain installation.
229 The default location is
230 <filename>/opt/poky/</filename><replaceable>release</replaceable>.
231 After either accepting the default location or selecting your
232 own location, you are prompted to run the installation script
233 interactively or in silent mode.
234 If you want to closely monitor the installation,
235 choose "I" for interactive mode rather than "S" for silent mode.
236 Follow the prompts from the script to complete the installation.
237 </para>
238
239 <para>
240 Once the installation completes, the ADT, which includes the
241 cross-toolchain, is installed in the selected installation
242 directory.
243 You will notice environment setup files for the cross-toolchain
244 in the installation directory, and image tarballs in the
245 <filename>adt-installer</filename> directory according to your
246 installer configurations, and the target sysroot located
247 according to the
248 <filename>YOCTOADT_TARGET_SYSROOT_LOC_</filename><replaceable>arch</replaceable>
249 variable also in your configuration file.
250 </para>
251 </section>
252 </section>
253
254 <section id='using-an-existing-toolchain-tarball'>
255 <title>Using a Cross-Toolchain Tarball</title>
256
257 <para>
258 If you want to simply install a cross-toolchain by hand, you can
259 do so by running the toolchain installer.
260 The installer includes the pre-built cross-toolchain, the
261 <filename>runqemu</filename> script, and support files.
262 If you use this method to install the cross-toolchain, you
263 might still need to install the target sysroot by installing and
264 extracting it separately.
265 For information on how to install the sysroot, see the
266 "<link linkend='extracting-the-root-filesystem'>Extracting the Root Filesystem</link>" section.
267 </para>
268
269 <para>
270 Follow these steps:
271 <orderedlist>
272 <listitem><para><emphasis>Get your toolchain installer using one of the following methods:</emphasis>
273 <itemizedlist>
274 <listitem><para>Go to
275 <ulink url='&YOCTO_TOOLCHAIN_DL_URL;'></ulink>
276 and find the folder that matches your host
277 development system (i.e. <filename>i686</filename>
278 for 32-bit machines or <filename>x86_64</filename>
279 for 64-bit machines).</para>
280 <para>Go into that folder and download the toolchain
281 installer whose name includes the appropriate target
282 architecture.
283 The toolchains provided by the Yocto Project
284 are based off of the
285 <filename>core-image-sato</filename> image and
286 contain libraries appropriate for developing
287 against that image.
288 For example, if your host development system is a
289 64-bit x86 system and you are going to use
290 your cross-toolchain for a 32-bit x86
291 target, go into the <filename>x86_64</filename>
292 folder and download the following installer:
293 <literallayout class='monospaced'>
294 poky-glibc-x86_64-core-image-sato-i586-toolchain-&DISTRO;.sh
295 </literallayout></para></listitem>
296 <listitem><para>Build your own toolchain installer.
297 For cases where you cannot use an installer
298 from the download area, you can build your own as
299 described in the
300 "<link linkend='optionally-building-a-toolchain-installer'>Optionally Building a Toolchain Installer</link>"
301 section.</para></listitem>
302 </itemizedlist></para></listitem>
303 <listitem><para><emphasis>Once you have the installer, run it to install the toolchain:</emphasis>
304 <note>
305 You must change the permissions on the toolchain
306 installer script so that it is executable.
307 </note></para>
308 <para>The following command shows how to run the installer
309 given a toolchain tarball for a 64-bit x86 development host
310 system and a 32-bit x86 target architecture.
311 The example assumes the toolchain installer is located
312 in <filename>~/Downloads/</filename>.
313 <literallayout class='monospaced'>
314 $ ~/Downloads/poky-glibc-x86_64-core-image-sato-i586-toolchain-&DISTRO;.sh
315 </literallayout>
316 The first thing the installer prompts you for is the
317 directory into which you want to install the toolchain.
318 The default directory used is
319 <filename>/opt/poky/&DISTRO;</filename>.
320 If you do not have write permissions for the directory
321 into which you are installing the toolchain, the
322 toolchain installer notifies you and exits.
323 Be sure you have write permissions in the directory and
324 run the installer again.</para>
325 <para>When the script finishes, the cross-toolchain is
326 installed.
327 You will notice environment setup files for the
328 cross-toolchain in the installation directory.
329 </para></listitem>
330 </orderedlist>
331 </para>
332 </section>
333
334 <section id='using-the-toolchain-from-within-the-build-tree'>
335 <title>Using BitBake and the Build Directory</title>
336
337 <para>
338 A final way of making the cross-toolchain available is to use BitBake
339 to generate the toolchain within an existing
340 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
341 This method does not install the toolchain into the default
342 <filename>/opt</filename> directory.
343 As with the previous method, if you need to install the target sysroot, you must
344 do that separately as well.
345 </para>
346
347 <para>
348 Follow these steps to generate the toolchain into the Build Directory:
349 <orderedlist>
350 <listitem><para><emphasis>Set up the Build Environment:</emphasis>
351 Source the OpenEmbedded build environment setup
352 script (i.e.
353 <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
354 or
355 <ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink>)
356 located in the
357 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
358 </para></listitem>
359 <listitem><para><emphasis>Check your Local Configuration File:</emphasis>
360 At this point, you should be sure that the
361 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink> variable
362 in the <filename>local.conf</filename> file found in the
363 <filename>conf</filename> directory of the Build Directory
364 is set for the target architecture.
365 Comments within the <filename>local.conf</filename> file
366 list the values you can use for the
367 <filename>MACHINE</filename> variable.
368 If you do not change the <filename>MACHINE</filename>
369 variable, the OpenEmbedded build system uses
370 <filename>qemux86</filename> as the default target
371 machine when building the cross-toolchain.
372 <note>
373 You can populate the Build Directory with the
374 cross-toolchains for more than a single architecture.
375 You just need to edit the <filename>MACHINE</filename>
376 variable in the <filename>local.conf</filename> file and
377 re-run the <filename>bitbake</filename> command.
378 </note></para></listitem>
379 <listitem><para><emphasis>Make Sure Your Layers are Enabled:</emphasis>
380 Examine the <filename>conf/bblayers.conf</filename> file
381 and make sure that you have enabled all the compatible
382 layers for your target machine.
383 The OpenEmbedded build system needs to be aware of each
384 layer you want included when building images and
385 cross-toolchains.
386 For information on how to enable a layer, see the
387 "<ulink url='&YOCTO_DOCS_DEV_URL;#enabling-your-layer'>Enabling Your Layer</ulink>"
388 section in the Yocto Project Development Manual.
389 </para></listitem>
390 <listitem><para><emphasis>Generate the Cross-Toolchain:</emphasis>
391 Run <filename>bitbake meta-ide-support</filename> to
392 complete the cross-toolchain generation.
393 Once the <filename>bitbake</filename> command finishes,
394 the cross-toolchain is
395 generated and populated within the Build Directory.
396 You will notice environment setup files for the
397 cross-toolchain that contain the string
398 "<filename>environment-setup</filename>" in the
399 Build Directory's <filename>tmp</filename> folder.</para>
400 <para>Be aware that when you use this method to install the
401 toolchain, you still need to separately extract and install
402 the sysroot filesystem.
403 For information on how to do this, see the
404 "<link linkend='extracting-the-root-filesystem'>Extracting the Root Filesystem</link>" section.
405 </para></listitem>
406 </orderedlist>
407 </para>
408 </section>
409</section>
410
411<section id='setting-up-the-cross-development-environment'>
412 <title>Setting Up the Cross-Development Environment</title>
413
414 <para>
415 Before you can develop using the cross-toolchain, you need to set up the
416 cross-development environment by sourcing the toolchain's environment setup script.
417 If you used the ADT Installer or hand-installed cross-toolchain,
418 then you can find this script in the directory you chose for installation.
419 For this release, the default installation directory is
420 <filename>&YOCTO_ADTPATH_DIR;</filename>.
421 If you installed the toolchain in the
422 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>,
423 you can find the environment setup
424 script for the toolchain in the Build Directory's <filename>tmp</filename> directory.
425 </para>
426
427 <para>
428 Be sure to run the environment setup script that matches the
429 architecture for which you are developing.
430 Environment setup scripts begin with the string
431 "<filename>environment-setup</filename>" and include as part of their
432 name the architecture.
433 For example, the toolchain environment setup script for a 64-bit
434 IA-based architecture installed in the default installation directory
435 would be the following:
436 <literallayout class='monospaced'>
437 &YOCTO_ADTPATH_DIR;/environment-setup-x86_64-poky-linux
438 </literallayout>
439 When you run the setup script, many environment variables are
440 defined:
441 <literallayout class='monospaced'>
442 <ulink url='&YOCTO_DOCS_REF_URL;#var-SDKTARGETSYSROOT'><filename>SDKTARGETSYSROOT</filename></ulink> - The path to the sysroot used for cross-compilation
443 <ulink url='&YOCTO_DOCS_REF_URL;#var-PKG_CONFIG_PATH'><filename>PKG_CONFIG_PATH</filename></ulink> - The path to the target pkg-config files
444 <ulink url='&YOCTO_DOCS_REF_URL;#var-CONFIG_SITE'><filename>CONFIG_SITE</filename></ulink> - A GNU autoconf site file preconfigured for the target
445 <ulink url='&YOCTO_DOCS_REF_URL;#var-CC'><filename>CC</filename></ulink> - The minimal command and arguments to run the C compiler
446 <ulink url='&YOCTO_DOCS_REF_URL;#var-CXX'><filename>CXX</filename></ulink> - The minimal command and arguments to run the C++ compiler
447 <ulink url='&YOCTO_DOCS_REF_URL;#var-CPP'><filename>CPP</filename></ulink> - The minimal command and arguments to run the C preprocessor
448 <ulink url='&YOCTO_DOCS_REF_URL;#var-AS'><filename>AS</filename></ulink> - The minimal command and arguments to run the assembler
449 <ulink url='&YOCTO_DOCS_REF_URL;#var-LD'><filename>LD</filename></ulink> - The minimal command and arguments to run the linker
450 <ulink url='&YOCTO_DOCS_REF_URL;#var-GDB'><filename>GDB</filename></ulink> - The minimal command and arguments to run the GNU Debugger
451 <ulink url='&YOCTO_DOCS_REF_URL;#var-STRIP'><filename>STRIP</filename></ulink> - The minimal command and arguments to run 'strip', which strips symbols
452 <ulink url='&YOCTO_DOCS_REF_URL;#var-RANLIB'><filename>RANLIB</filename></ulink> - The minimal command and arguments to run 'ranlib'
453 <ulink url='&YOCTO_DOCS_REF_URL;#var-OBJCOPY'><filename>OBJCOPY</filename></ulink> - The minimal command and arguments to run 'objcopy'
454 <ulink url='&YOCTO_DOCS_REF_URL;#var-OBJDUMP'><filename>OBJDUMP</filename></ulink> - The minimal command and arguments to run 'objdump'
455 <ulink url='&YOCTO_DOCS_REF_URL;#var-AR'><filename>AR</filename></ulink> - The minimal command and arguments to run 'ar'
456 <ulink url='&YOCTO_DOCS_REF_URL;#var-NM'><filename>NM</filename></ulink> - The minimal command and arguments to run 'nm'
457 <ulink url='&YOCTO_DOCS_REF_URL;#var-TARGET_PREFIX'><filename>TARGET_PREFIX</filename></ulink> - The toolchain binary prefix for the target tools
458 <ulink url='&YOCTO_DOCS_REF_URL;#var-CROSS_COMPILE'><filename>CROSS_COMPILE</filename></ulink> - The toolchain binary prefix for the target tools
459 <ulink url='&YOCTO_DOCS_REF_URL;#var-CONFIGURE_FLAGS'><filename>CONFIGURE_FLAGS</filename></ulink> - The minimal arguments for GNU configure
460 <ulink url='&YOCTO_DOCS_REF_URL;#var-CFLAGS'><filename>CFLAGS</filename></ulink> - Suggested C flags
461 <ulink url='&YOCTO_DOCS_REF_URL;#var-CXXFLAGS'><filename>CXXFLAGS</filename></ulink> - Suggested C++ flags
462 <ulink url='&YOCTO_DOCS_REF_URL;#var-LDFLAGS'><filename>LDFLAGS</filename></ulink> - Suggested linker flags when you use CC to link
463 <ulink url='&YOCTO_DOCS_REF_URL;#var-CPPFLAGS'><filename>CPPFLAGS</filename></ulink> - Suggested preprocessor flags
464 </literallayout>
465 </para>
466</section>
467
468<section id='securing-kernel-and-filesystem-images'>
469 <title>Securing Kernel and Filesystem Images</title>
470
471 <para>
472 You will need to have a kernel and filesystem image to boot using your
473 hardware or the QEMU emulator.
474 Furthermore, if you plan on booting your image using NFS or you want to use the root filesystem
475 as the target sysroot, you need to extract the root filesystem.
476 </para>
477
478 <section id='getting-the-images'>
479 <title>Getting the Images</title>
480
481 <para>
482 To get the kernel and filesystem images, you either have to build them or download
483 pre-built versions.
484 For an example of how to build these images, see the
485 "<ulink url='&YOCTO_DOCS_QS_URL;#qs-buiding-images'>Buiding Images</ulink>"
486 section of the Yocto Project Quick Start.
487 For an example of downloading pre-build versions, see the
488 "<link linkend='using-pre-built'>Example Using Pre-Built Binaries and QEMU</link>"
489 section.
490 </para>
491
492 <para>
493 The Yocto Project ships basic kernel and filesystem images for several
494 architectures (<filename>x86</filename>, <filename>x86-64</filename>,
495 <filename>mips</filename>, <filename>powerpc</filename>, and <filename>arm</filename>)
496 that you can use unaltered in the QEMU emulator.
497 These kernel images reside in the release
498 area - <ulink url='&YOCTO_MACHINES_DL_URL;'></ulink>
499 and are ideal for experimentation using Yocto Project.
500 For information on the image types you can build using the OpenEmbedded build system,
501 see the
502 "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>"
503 chapter in the Yocto Project Reference Manual.
504 </para>
505
506 <para>
507 If you are planning on developing against your image and you are not
508 building or using one of the Yocto Project development images
509 (e.g. <filename>core-image-*-dev</filename>), you must be sure to
510 include the development packages as part of your image recipe.
511 </para>
512
513 <para>
514 If you plan on remotely deploying and debugging your
515 application from within the Eclipse IDE, you must have an image
516 that contains the Yocto Target Communication Framework (TCF) agent
517 (<filename>tcf-agent</filename>).
518 You can do this by including the <filename>eclipse-debug</filename>
519 image feature.
520 <note>
521 See the
522 "<ulink url='&YOCTO_DOCS_REF_URL;#ref-features-image'>Image Features</ulink>"
523 section in the Yocto Project Reference Manual for information on
524 image features.
525 </note>
526 To include the <filename>eclipse-debug</filename> image feature,
527 modify your <filename>local.conf</filename> file in the
528 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
529 so that the
530 <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_IMAGE_FEATURES'><filename>EXTRA_IMAGE_FEATURES</filename></ulink>
531 variable includes the "eclipse-debug" feature.
532 After modifying the configuration file, you can rebuild the image.
533 Once the image is rebuilt, the <filename>tcf-agent</filename>
534 will be included in the image and is launched automatically after
535 the boot.
536 </para>
537 </section>
538
539 <section id='extracting-the-root-filesystem'>
540 <title>Extracting the Root Filesystem</title>
541
542 <para>
543 If you install your toolchain by hand or build it using BitBake and
544 you need a root filesystem, you need to extract it separately.
545 If you use the ADT Installer to install the ADT, the root
546 filesystem is automatically extracted and installed.
547 </para>
548
549 <para>
550 Here are some cases where you need to extract the root filesystem:
551 <itemizedlist>
552 <listitem><para>You want to boot the image using NFS.
553 </para></listitem>
554 <listitem><para>You want to use the root filesystem as the
555 target sysroot.
556 For example, the Eclipse IDE environment with the Eclipse
557 Yocto Plug-in installed allows you to use QEMU to boot
558 under NFS.</para></listitem>
559 <listitem><para>You want to develop your target application
560 using the root filesystem as the target sysroot.
561 </para></listitem>
562 </itemizedlist>
563 </para>
564
565 <para>
566 To extract the root filesystem, first <filename>source</filename>
567 the cross-development environment setup script to establish
568 necessary environment variables.
569 If you built the toolchain in the Build Directory, you will find
570 the toolchain environment script in the
571 <filename>tmp</filename> directory.
572 If you installed the toolchain by hand, the environment setup
573 script is located in <filename>/opt/poky/&DISTRO;</filename>.
574 </para>
575
576 <para>
577 After sourcing the environment script, use the
578 <filename>runqemu-extract-sdk</filename> command and provide the
579 filesystem image.
580 </para>
581
582 <para>
583 Following is an example.
584 The second command sets up the environment.
585 In this case, the setup script is located in the
586 <filename>/opt/poky/&DISTRO;</filename> directory.
587 The third command extracts the root filesystem from a previously
588 built filesystem that is located in the
589 <filename>~/Downloads</filename> directory.
590 Furthermore, this command extracts the root filesystem into the
591 <filename>qemux86-sato</filename> directory:
592 <literallayout class='monospaced'>
593 $ cd ~
594 $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux
595 $ runqemu-extract-sdk \
596 ~/Downloads/core-image-sato-sdk-qemux86-2011091411831.rootfs.tar.bz2 \
597 $HOME/qemux86-sato
598 </literallayout>
599 You could now point to the target sysroot at
600 <filename>qemux86-sato</filename>.
601 </para>
602 </section>
603</section>
604
605<section id='optionally-building-a-toolchain-installer'>
606 <title>Optionally Building a Toolchain Installer</title>
607
608 <para>
609 As an alternative to locating and downloading a toolchain installer,
610 you can build the toolchain installer if you have a
611 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
612 <note>
613 Although not the preferred method, it is also possible to use
614 <filename>bitbake meta-toolchain</filename> to build the toolchain
615 installer.
616 If you do use this method, you must separately install and extract
617 the target sysroot.
618 For information on how to install the sysroot, see the
619 "<link linkend='extracting-the-root-filesystem'>Extracting the Root Filesystem</link>"
620 section.
621 </note>
622 </para>
623
624 <para>
625 To build the toolchain installer and populate the SDK image, use the
626 following command:
627 <literallayout class='monospaced'>
628 $ bitbake <replaceable>image</replaceable> -c populate_sdk
629 </literallayout>
630 The command results in a toolchain installer that contains the sysroot
631 that matches your target root filesystem.
632 </para>
633
634 <para>
635 Another powerful feature is that the toolchain is completely
636 self-contained.
637 The binaries are linked against their own copy of
638 <filename>libc</filename>, which results in no dependencies
639 on the target system.
640 To achieve this, the pointer to the dynamic loader is
641 configured at install time since that path cannot be dynamically
642 altered.
643 This is the reason for a wrapper around the
644 <filename>populate_sdk</filename> archive.
645 </para>
646
647 <para>
648 Another feature is that only one set of cross-canadian toolchain
649 binaries are produced per architecture.
650 This feature takes advantage of the fact that the target hardware can
651 be passed to <filename>gcc</filename> as a set of compiler options.
652 Those options are set up by the environment script and contained in
653 variables such as
654 <ulink url='&YOCTO_DOCS_REF_URL;#var-CC'><filename>CC</filename></ulink>
655 and
656 <ulink url='&YOCTO_DOCS_REF_URL;#var-LD'><filename>LD</filename></ulink>.
657 This reduces the space needed for the tools.
658 Understand, however, that a sysroot is still needed for every target
659 since those binaries are target-specific.
660 </para>
661
662 <para>
663 Remember, before using any BitBake command, you
664 must source the build environment setup script
665 (i.e.
666 <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
667 or
668 <ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink>)
669 located in the Source Directory and you must make sure your
670 <filename>conf/local.conf</filename> variables are correct.
671 In particular, you need to be sure the
672 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
673 variable matches the architecture for which you are building and that
674 the
675 <ulink url='&YOCTO_DOCS_REF_URL;#var-SDKMACHINE'><filename>SDKMACHINE</filename></ulink>
676 variable is correctly set if you are building a toolchain designed to
677 run on an architecture that differs from your current development host
678 machine (i.e. the build machine).
679 </para>
680
681 <para>
682 When the <filename>bitbake</filename> command completes, the toolchain
683 installer will be in
684 <filename>tmp/deploy/sdk</filename> in the Build Directory.
685 <note>
686 By default, this toolchain does not build static binaries.
687 If you want to use the toolchain to build these types of libraries,
688 you need to be sure your image has the appropriate static
689 development libraries.
690 Use the
691 <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></ulink>
692 variable inside your <filename>local.conf</filename> file to
693 install the appropriate library packages.
694 Following is an example using <filename>glibc</filename> static
695 development libraries:
696 <literallayout class='monospaced'>
697 IMAGE_INSTALL_append = " glibc-staticdev"
698 </literallayout>
699 </note>
700 </para>
701</section>
702
703<section id='optionally-using-an-external-toolchain'>
704 <title>Optionally Using an External Toolchain</title>
705
706 <para>
707 You might want to use an external toolchain as part of your
708 development.
709 If this is the case, the fundamental steps you need to accomplish
710 are as follows:
711 <itemizedlist>
712 <listitem><para>
713 Understand where the installed toolchain resides.
714 For cases where you need to build the external toolchain, you
715 would need to take separate steps to build and install the
716 toolchain.
717 </para></listitem>
718 <listitem><para>
719 Make sure you add the layer that contains the toolchain to
720 your <filename>bblayers.conf</filename> file through the
721 <ulink url='&YOCTO_DOCS_REF_URL;#var-BBLAYERS'><filename>BBLAYERS</filename></ulink>
722 variable.
723 </para></listitem>
724 <listitem><para>
725 Set the
726 <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTERNAL_TOOLCHAIN'><filename>EXTERNAL_TOOLCHAIN</filename></ulink>
727 variable in your <filename>local.conf</filename> file
728 to the location in which you installed the toolchain.
729 </para></listitem>
730 </itemizedlist>
731 A good example of an external toolchain used with the Yocto Project
732 is <trademark class='registered'>Mentor Graphics</trademark>
733 Sourcery G++ Toolchain.
734 You can see information on how to use that particular layer in the
735 <filename>README</filename> file at
736 <ulink url='http://github.com/MentorEmbedded/meta-sourcery/'></ulink>.
737 You can find further information by reading about the
738 <ulink url='&YOCTO_DOCS_REF_URL;#var-TCMODE'><filename>TCMODE</filename></ulink>
739 variable in the Yocto Project Reference Manual's variable glossary.
740 </para>
741</section>
742
743 <section id='using-pre-built'>
744 <title>Example Using Pre-Built Binaries and QEMU</title>
745
746 <para>
747 If hardware, libraries and services are stable, you can get started by using a pre-built binary
748 of the filesystem image, kernel, and toolchain and run it using the QEMU emulator.
749 This scenario is useful for developing application software.
750 </para>
751
752 <mediaobject>
753 <imageobject>
754 <imagedata fileref="figures/using-a-pre-built-image.png" format="PNG" align='center' scalefit='1'/>
755 </imageobject>
756 <caption>
757 <para>Using a Pre-Built Image</para>
758 </caption>
759 </mediaobject>
760
761 <para>
762 For this scenario, you need to do several things:
763 </para>
764
765 <itemizedlist>
766 <listitem><para>Install the appropriate stand-alone toolchain tarball.</para></listitem>
767 <listitem><para>Download the pre-built image that will boot with QEMU.
768 You need to be sure to get the QEMU image that matches your target machine's
769 architecture (e.g. x86, ARM, etc.).</para></listitem>
770 <listitem><para>Download the filesystem image for your target machine's architecture.
771 </para></listitem>
772 <listitem><para>Set up the environment to emulate the hardware and then start the QEMU emulator.
773 </para></listitem>
774 </itemizedlist>
775
776 <section id='installing-the-toolchain'>
777 <title>Installing the Toolchain</title>
778
779 <para>
780 You can download a tarball installer, which includes the
781 pre-built toolchain, the <filename>runqemu</filename>
782 script, and support files from the appropriate directory under
783 <ulink url='&YOCTO_TOOLCHAIN_DL_URL;'></ulink>.
784 Toolchains are available for 32-bit and 64-bit x86 development
785 systems from the <filename>i686</filename> and
786 <filename>x86_64</filename> directories, respectively.
787 The toolchains the Yocto Project provides are based off the
788 <filename>core-image-sato</filename> image and contain
789 libraries appropriate for developing against that image.
790 Each type of development system supports five or more target
791 architectures.
792 </para>
793
794 <para>
795 The names of the tarball installer scripts are such that a
796 string representing the host system appears first in the
797 filename and then is immediately followed by a string
798 representing the target architecture.
799 </para>
800
801 <literallayout class='monospaced'>
802 poky-glibc-<replaceable>host_system</replaceable>-<replaceable>image_type</replaceable>-<replaceable>arch</replaceable>-toolchain-<replaceable>release_version</replaceable>.sh
803
804 Where:
805 <replaceable>host_system</replaceable> is a string representing your development system:
806
807 i686 or x86_64.
808
809 <replaceable>image_type</replaceable> is a string representing the image you wish to
810 develop a Software Development Toolkit (SDK) for use against.
811 The Yocto Project builds toolchain installers using the
812 following BitBake command:
813
814 bitbake core-image-sato -c populate_sdk
815
816 <replaceable>arch</replaceable> is a string representing the tuned target architecture:
817
818 i586, x86_64, powerpc, mips, armv7a or armv5te
819
820 <replaceable>release_version</replaceable> is a string representing the release number of the
821 Yocto Project:
822
823 &DISTRO;, &DISTRO;+snapshot
824 </literallayout>
825
826 <para>
827 For example, the following toolchain installer is for a 64-bit
828 development host system and a i586-tuned target architecture
829 based off the SDK for <filename>core-image-sato</filename>:
830 <literallayout class='monospaced'>
831 poky-glibc-x86_64-core-image-sato-i586-toolchain-&DISTRO;.sh
832 </literallayout>
833 </para>
834
835 <para>
836 Toolchains are self-contained and by default are installed into
837 <filename>/opt/poky</filename>.
838 However, when you run the toolchain installer, you can choose an
839 installation directory.
840 </para>
841
842 <para>
843 The following command shows how to run the installer given a toolchain tarball
844 for a 64-bit x86 development host system and a 32-bit x86 target architecture.
845 You must change the permissions on the toolchain
846 installer script so that it is executable.
847 </para>
848
849 <para>
850 The example assumes the toolchain installer is located in <filename>~/Downloads/</filename>.
851 <note>
852 If you do not have write permissions for the directory into which you are installing
853 the toolchain, the toolchain installer notifies you and exits.
854 Be sure you have write permissions in the directory and run the installer again.
855 </note>
856 </para>
857
858 <para>
859 <literallayout class='monospaced'>
860 $ ~/Downloads/poky-glibc-x86_64-core-image-sato-i586-toolchain-&DISTRO;.sh
861 </literallayout>
862 </para>
863
864 <para>
865 For more information on how to install tarballs, see the
866 "<ulink url='&YOCTO_DOCS_ADT_URL;#using-an-existing-toolchain-tarball'>Using a Cross-Toolchain Tarball</ulink>" and
867 "<ulink url='&YOCTO_DOCS_ADT_URL;#using-the-toolchain-from-within-the-build-tree'>Using BitBake and the Build Directory</ulink>" sections in the Yocto Project Application Developer's Guide.
868 </para>
869 </section>
870
871 <section id='downloading-the-pre-built-linux-kernel'>
872 <title>Downloading the Pre-Built Linux Kernel</title>
873
874 <para>
875 You can download the pre-built Linux kernel suitable for running in the QEMU emulator from
876 <ulink url='&YOCTO_QEMU_DL_URL;'></ulink>.
877 Be sure to use the kernel that matches the architecture you want to simulate.
878 Download areas exist for the five supported machine architectures:
879 <filename>qemuarm</filename>, <filename>qemumips</filename>, <filename>qemuppc</filename>,
880 <filename>qemux86</filename>, and <filename>qemux86-64</filename>.
881 </para>
882
883 <para>
884 Most kernel files have one of the following forms:
885 <literallayout class='monospaced'>
886 *zImage-qemu<replaceable>arch</replaceable>.bin
887 vmlinux-qemu<replaceable>arch</replaceable>.bin
888
889 Where:
890 <replaceable>arch</replaceable> is a string representing the target architecture:
891 x86, x86-64, ppc, mips, or arm.
892 </literallayout>
893 </para>
894
895 <para>
896 You can learn more about downloading a Yocto Project kernel in the
897 "<ulink url='&YOCTO_DOCS_DEV_URL;#local-kernel-files'>Yocto Project Kernel</ulink>"
898 bulleted item in the Yocto Project Development Manual.
899 </para>
900 </section>
901
902 <section id='downloading-the-filesystem'>
903 <title>Downloading the Filesystem</title>
904
905 <para>
906 You can also download the filesystem image suitable for your target architecture from
907 <ulink url='&YOCTO_QEMU_DL_URL;'></ulink>.
908 Again, be sure to use the filesystem that matches the architecture you want
909 to simulate.
910 </para>
911
912 <para>
913 The filesystem image has two tarball forms: <filename>ext3</filename> and
914 <filename>tar</filename>.
915 You must use the <filename>ext3</filename> form when booting an image using the
916 QEMU emulator.
917 The <filename>tar</filename> form can be flattened out in your host development system
918 and used for build purposes with the Yocto Project.
919 <literallayout class='monospaced'>
920 core-image-<replaceable>profile</replaceable>-qemu<replaceable>arch</replaceable>.ext3
921 core-image-<replaceable>profile</replaceable>-qemu<replaceable>arch</replaceable>.tar.bz2
922
923 Where:
924 <replaceable>profile</replaceable> is the filesystem image's profile:
925 lsb, lsb-dev, lsb-sdk, lsb-qt3, minimal, minimal-dev, sato,
926 sato-dev, or sato-sdk. For information on these types of image
927 profiles, see the "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>"
928 chapter in the Yocto Project Reference Manual.
929
930 <replaceable>arch</replaceable> is a string representing the target architecture:
931 x86, x86-64, ppc, mips, or arm.
932 </literallayout>
933 </para>
934 </section>
935
936 <section id='setting-up-the-environment-and-starting-the-qemu-emulator'>
937 <title>Setting Up the Environment and Starting the QEMU Emulator</title>
938
939 <para>
940 Before you start the QEMU emulator, you need to set up the emulation environment.
941 The following command form sets up the emulation environment.
942 <literallayout class='monospaced'>
943 $ source &YOCTO_ADTPATH_DIR;/environment-setup-<replaceable>arch</replaceable>-poky-linux-<replaceable>if</replaceable>
944
945 Where:
946 <replaceable>arch</replaceable> is a string representing the target architecture:
947 i586, x86_64, ppc603e, mips, or armv5te.
948
949 <replaceable>if</replaceable> is a string representing an embedded application binary interface.
950 Not all setup scripts include this string.
951 </literallayout>
952 </para>
953
954 <para>
955 Finally, this command form invokes the QEMU emulator
956 <literallayout class='monospaced'>
957 $ runqemu <replaceable>qemuarch</replaceable> <replaceable>kernel-image</replaceable> <replaceable>filesystem-image</replaceable>
958
959 Where:
960 <replaceable>qemuarch</replaceable> is a string representing the target architecture: qemux86, qemux86-64,
961 qemuppc, qemumips, or qemuarm.
962
963 <replaceable>kernel-image</replaceable> is the architecture-specific kernel image.
964
965 <replaceable>filesystem-image</replaceable> is the .ext3 filesystem image.
966
967 </literallayout>
968 </para>
969
970 <para>
971 Continuing with the example, the following two commands setup the emulation
972 environment and launch QEMU.
973 This example assumes the root filesystem (<filename>.ext3</filename> file) and
974 the pre-built kernel image file both reside in your home directory.
975 The kernel and filesystem are for a 32-bit target architecture.
976 <literallayout class='monospaced'>
977 $ cd $HOME
978 $ source &YOCTO_ADTPATH_DIR;/environment-setup-i586-poky-linux
979 $ runqemu qemux86 bzImage-qemux86.bin \
980 core-image-sato-qemux86.ext3
981 </literallayout>
982 </para>
983
984 <para>
985 The environment in which QEMU launches varies depending on the filesystem image and on the
986 target architecture.
987 For example, if you source the environment for the ARM target
988 architecture and then boot the minimal QEMU image, the emulator comes up in a new
989 shell in command-line mode.
990 However, if you boot the SDK image, QEMU comes up with a GUI.
991 <note>Booting the PPC image results in QEMU launching in the same shell in
992 command-line mode.</note>
993 </para>
994 </section>
995</section>
996
997</chapter>
998<!--
999vim: expandtab tw=80 ts=4
1000-->
diff --git a/documentation/adt-manual/adt-style.css b/documentation/adt-manual/adt-style.css
deleted file mode 100644
index 9d6221ae51..0000000000
--- a/documentation/adt-manual/adt-style.css
+++ /dev/null
@@ -1,986 +0,0 @@
1/*
2 SPDX-License-Identifier: CC-BY-2.0-UK
3
4 Generic XHTML / DocBook XHTML CSS Stylesheet.
5
6 Browser wrangling and typographic design by
7 Oyvind Kolas / pippin@gimp.org
8
9 Customised for Poky by
10 Matthew Allum / mallum@o-hand.com
11
12 Thanks to:
13 Liam R. E. Quin
14 William Skaggs
15 Jakub Steiner
16
17 Structure
18 ---------
19
20 The stylesheet is divided into the following sections:
21
22 Positioning
23 Margins, paddings, width, font-size, clearing.
24 Decorations
25 Borders, style
26 Colors
27 Colors
28 Graphics
29 Graphical backgrounds
30 Nasty IE tweaks
31 Workarounds needed to make it work in internet explorer,
32 currently makes the stylesheet non validating, but up until
33 this point it is validating.
34 Mozilla extensions
35 Transparency for footer
36 Rounded corners on boxes
37
38*/
39
40
41 /*************** /
42 / Positioning /
43/ ***************/
44
45body {
46 font-family: Verdana, Sans, sans-serif;
47
48 min-width: 640px;
49 width: 80%;
50 margin: 0em auto;
51 padding: 2em 5em 5em 5em;
52 color: #333;
53}
54
55h1,h2,h3,h4,h5,h6,h7 {
56 font-family: Arial, Sans;
57 color: #00557D;
58 clear: both;
59}
60
61h1 {
62 font-size: 2em;
63 text-align: left;
64 padding: 0em 0em 0em 0em;
65 margin: 2em 0em 0em 0em;
66}
67
68h2.subtitle {
69 margin: 0.10em 0em 3.0em 0em;
70 padding: 0em 0em 0em 0em;
71 font-size: 1.8em;
72 padding-left: 20%;
73 font-weight: normal;
74 font-style: italic;
75}
76
77h2 {
78 margin: 2em 0em 0.66em 0em;
79 padding: 0.5em 0em 0em 0em;
80 font-size: 1.5em;
81 font-weight: bold;
82}
83
84h3.subtitle {
85 margin: 0em 0em 1em 0em;
86 padding: 0em 0em 0em 0em;
87 font-size: 142.14%;
88 text-align: right;
89}
90
91h3 {
92 margin: 1em 0em 0.5em 0em;
93 padding: 1em 0em 0em 0em;
94 font-size: 140%;
95 font-weight: bold;
96}
97
98h4 {
99 margin: 1em 0em 0.5em 0em;
100 padding: 1em 0em 0em 0em;
101 font-size: 120%;
102 font-weight: bold;
103}
104
105h5 {
106 margin: 1em 0em 0.5em 0em;
107 padding: 1em 0em 0em 0em;
108 font-size: 110%;
109 font-weight: bold;
110}
111
112h6 {
113 margin: 1em 0em 0em 0em;
114 padding: 1em 0em 0em 0em;
115 font-size: 110%;
116 font-weight: bold;
117}
118
119.authorgroup {
120 background-color: transparent;
121 background-repeat: no-repeat;
122 padding-top: 256px;
123 background-image: url("figures/adt-title.png");
124 background-position: left top;
125 margin-top: -256px;
126 padding-right: 50px;
127 margin-left: 0px;
128 text-align: right;
129 width: 740px;
130}
131
132h3.author {
133 margin: 0em 0me 0em 0em;
134 padding: 0em 0em 0em 0em;
135 font-weight: normal;
136 font-size: 100%;
137 color: #333;
138 clear: both;
139}
140
141.author tt.email {
142 font-size: 66%;
143}
144
145.titlepage hr {
146 width: 0em;
147 clear: both;
148}
149
150.revhistory {
151 padding-top: 2em;
152 clear: both;
153}
154
155.toc,
156.list-of-tables,
157.list-of-examples,
158.list-of-figures {
159 padding: 1.33em 0em 2.5em 0em;
160 color: #00557D;
161}
162
163.toc p,
164.list-of-tables p,
165.list-of-figures p,
166.list-of-examples p {
167 padding: 0em 0em 0em 0em;
168 padding: 0em 0em 0.3em;
169 margin: 1.5em 0em 0em 0em;
170}
171
172.toc p b,
173.list-of-tables p b,
174.list-of-figures p b,
175.list-of-examples p b{
176 font-size: 100.0%;
177 font-weight: bold;
178}
179
180.toc dl,
181.list-of-tables dl,
182.list-of-figures dl,
183.list-of-examples dl {
184 margin: 0em 0em 0.5em 0em;
185 padding: 0em 0em 0em 0em;
186}
187
188.toc dt {
189 margin: 0em 0em 0em 0em;
190 padding: 0em 0em 0em 0em;
191}
192
193.toc dd {
194 margin: 0em 0em 0em 2.6em;
195 padding: 0em 0em 0em 0em;
196}
197
198div.glossary dl,
199div.variablelist dl {
200}
201
202.glossary dl dt,
203.variablelist dl dt,
204.variablelist dl dt span.term {
205 font-weight: normal;
206 width: 20em;
207 text-align: right;
208}
209
210.variablelist dl dt {
211 margin-top: 0.5em;
212}
213
214.glossary dl dd,
215.variablelist dl dd {
216 margin-top: -1em;
217 margin-left: 25.5em;
218}
219
220.glossary dd p,
221.variablelist dd p {
222 margin-top: 0em;
223 margin-bottom: 1em;
224}
225
226
227div.calloutlist table td {
228 padding: 0em 0em 0em 0em;
229 margin: 0em 0em 0em 0em;
230}
231
232div.calloutlist table td p {
233 margin-top: 0em;
234 margin-bottom: 1em;
235}
236
237div p.copyright {
238 text-align: left;
239}
240
241div.legalnotice p.legalnotice-title {
242 margin-bottom: 0em;
243}
244
245p {
246 line-height: 1.5em;
247 margin-top: 0em;
248
249}
250
251dl {
252 padding-top: 0em;
253}
254
255hr {
256 border: solid 1px;
257}
258
259
260.mediaobject,
261.mediaobjectco {
262 text-align: center;
263}
264
265img {
266 border: none;
267}
268
269ul {
270 padding: 0em 0em 0em 1.5em;
271}
272
273ul li {
274 padding: 0em 0em 0em 0em;
275}
276
277ul li p {
278 text-align: left;
279}
280
281table {
282 width :100%;
283}
284
285th {
286 padding: 0.25em;
287 text-align: left;
288 font-weight: normal;
289 vertical-align: top;
290}
291
292td {
293 padding: 0.25em;
294 vertical-align: top;
295}
296
297p a[id] {
298 margin: 0px;
299 padding: 0px;
300 display: inline;
301 background-image: none;
302}
303
304a {
305 text-decoration: underline;
306 color: #444;
307}
308
309pre {
310 overflow: auto;
311}
312
313a:hover {
314 text-decoration: underline;
315 /*font-weight: bold;*/
316}
317
318/* This style defines how the permalink character
319 appears by itself and when hovered over with
320 the mouse. */
321
322[alt='Permalink'] { color: #eee; }
323[alt='Permalink']:hover { color: black; }
324
325
326div.informalfigure,
327div.informalexample,
328div.informaltable,
329div.figure,
330div.table,
331div.example {
332 margin: 1em 0em;
333 padding: 1em;
334 page-break-inside: avoid;
335}
336
337
338div.informalfigure p.title b,
339div.informalexample p.title b,
340div.informaltable p.title b,
341div.figure p.title b,
342div.example p.title b,
343div.table p.title b{
344 padding-top: 0em;
345 margin-top: 0em;
346 font-size: 100%;
347 font-weight: normal;
348}
349
350.mediaobject .caption,
351.mediaobject .caption p {
352 text-align: center;
353 font-size: 80%;
354 padding-top: 0.5em;
355 padding-bottom: 0.5em;
356}
357
358.epigraph {
359 padding-left: 55%;
360 margin-bottom: 1em;
361}
362
363.epigraph p {
364 text-align: left;
365}
366
367.epigraph .quote {
368 font-style: italic;
369}
370.epigraph .attribution {
371 font-style: normal;
372 text-align: right;
373}
374
375span.application {
376 font-style: italic;
377}
378
379.programlisting {
380 font-family: monospace;
381 font-size: 80%;
382 white-space: pre;
383 margin: 1.33em 0em;
384 padding: 1.33em;
385}
386
387.tip,
388.warning,
389.caution,
390.note {
391 margin-top: 1em;
392 margin-bottom: 1em;
393
394}
395
396/* force full width of table within div */
397.tip table,
398.warning table,
399.caution table,
400.note table {
401 border: none;
402 width: 100%;
403}
404
405
406.tip table th,
407.warning table th,
408.caution table th,
409.note table th {
410 padding: 0.8em 0.0em 0.0em 0.0em;
411 margin : 0em 0em 0em 0em;
412}
413
414.tip p,
415.warning p,
416.caution p,
417.note p {
418 margin-top: 0.5em;
419 margin-bottom: 0.5em;
420 padding-right: 1em;
421 text-align: left;
422}
423
424.acronym {
425 text-transform: uppercase;
426}
427
428b.keycap,
429.keycap {
430 padding: 0.09em 0.3em;
431 margin: 0em;
432}
433
434.itemizedlist li {
435 clear: none;
436}
437
438.filename {
439 font-size: medium;
440 font-family: Courier, monospace;
441}
442
443
444div.navheader, div.heading{
445 position: absolute;
446 left: 0em;
447 top: 0em;
448 width: 100%;
449 background-color: #cdf;
450 width: 100%;
451}
452
453div.navfooter, div.footing{
454 position: fixed;
455 left: 0em;
456 bottom: 0em;
457 background-color: #eee;
458 width: 100%;
459}
460
461
462div.navheader td,
463div.navfooter td {
464 font-size: 66%;
465}
466
467div.navheader table th {
468 /*font-family: Georgia, Times, serif;*/
469 /*font-size: x-large;*/
470 font-size: 80%;
471}
472
473div.navheader table {
474 border-left: 0em;
475 border-right: 0em;
476 border-top: 0em;
477 width: 100%;
478}
479
480div.navfooter table {
481 border-left: 0em;
482 border-right: 0em;
483 border-bottom: 0em;
484 width: 100%;
485}
486
487div.navheader table td a,
488div.navfooter table td a {
489 color: #777;
490 text-decoration: none;
491}
492
493/* normal text in the footer */
494div.navfooter table td {
495 color: black;
496}
497
498div.navheader table td a:visited,
499div.navfooter table td a:visited {
500 color: #444;
501}
502
503
504/* links in header and footer */
505div.navheader table td a:hover,
506div.navfooter table td a:hover {
507 text-decoration: underline;
508 background-color: transparent;
509 color: #33a;
510}
511
512div.navheader hr,
513div.navfooter hr {
514 display: none;
515}
516
517
518.qandaset tr.question td p {
519 margin: 0em 0em 1em 0em;
520 padding: 0em 0em 0em 0em;
521}
522
523.qandaset tr.answer td p {
524 margin: 0em 0em 1em 0em;
525 padding: 0em 0em 0em 0em;
526}
527.answer td {
528 padding-bottom: 1.5em;
529}
530
531.emphasis {
532 font-weight: bold;
533}
534
535
536 /************* /
537 / decorations /
538/ *************/
539
540.titlepage {
541}
542
543.part .title {
544}
545
546.subtitle {
547 border: none;
548}
549
550/*
551h1 {
552 border: none;
553}
554
555h2 {
556 border-top: solid 0.2em;
557 border-bottom: solid 0.06em;
558}
559
560h3 {
561 border-top: 0em;
562 border-bottom: solid 0.06em;
563}
564
565h4 {
566 border: 0em;
567 border-bottom: solid 0.06em;
568}
569
570h5 {
571 border: 0em;
572}
573*/
574
575.programlisting {
576 border: solid 1px;
577}
578
579div.figure,
580div.table,
581div.informalfigure,
582div.informaltable,
583div.informalexample,
584div.example {
585 border: 1px solid;
586}
587
588
589
590.tip,
591.warning,
592.caution,
593.note {
594 border: 1px solid;
595}
596
597.tip table th,
598.warning table th,
599.caution table th,
600.note table th {
601 border-bottom: 1px solid;
602}
603
604.question td {
605 border-top: 1px solid black;
606}
607
608.answer {
609}
610
611
612b.keycap,
613.keycap {
614 border: 1px solid;
615}
616
617
618div.navheader, div.heading{
619 border-bottom: 1px solid;
620}
621
622
623div.navfooter, div.footing{
624 border-top: 1px solid;
625}
626
627 /********* /
628 / colors /
629/ *********/
630
631body {
632 color: #333;
633 background: white;
634}
635
636a {
637 background: transparent;
638}
639
640a:hover {
641 background-color: #dedede;
642}
643
644
645h1,
646h2,
647h3,
648h4,
649h5,
650h6,
651h7,
652h8 {
653 background-color: transparent;
654}
655
656hr {
657 border-color: #aaa;
658}
659
660
661.tip, .warning, .caution, .note {
662 border-color: #fff;
663}
664
665
666.tip table th,
667.warning table th,
668.caution table th,
669.note table th {
670 border-bottom-color: #fff;
671}
672
673
674.warning {
675 background-color: #f0f0f2;
676}
677
678.caution {
679 background-color: #f0f0f2;
680}
681
682.tip {
683 background-color: #f0f0f2;
684}
685
686.note {
687 background-color: #f0f0f2;
688}
689
690.glossary dl dt,
691.variablelist dl dt,
692.variablelist dl dt span.term {
693 color: #044;
694}
695
696div.figure,
697div.table,
698div.example,
699div.informalfigure,
700div.informaltable,
701div.informalexample {
702 border-color: #aaa;
703}
704
705pre.programlisting {
706 color: black;
707 background-color: #fff;
708 border-color: #aaa;
709 border-width: 2px;
710}
711
712.guimenu,
713.guilabel,
714.guimenuitem {
715 background-color: #eee;
716}
717
718
719b.keycap,
720.keycap {
721 background-color: #eee;
722 border-color: #999;
723}
724
725
726div.navheader {
727 border-color: black;
728}
729
730
731div.navfooter {
732 border-color: black;
733}
734
735
736 /*********** /
737 / graphics /
738/ ***********/
739
740/*
741body {
742 background-image: url("images/body_bg.jpg");
743 background-attachment: fixed;
744}
745
746.navheader,
747.note,
748.tip {
749 background-image: url("images/note_bg.jpg");
750 background-attachment: fixed;
751}
752
753.warning,
754.caution {
755 background-image: url("images/warning_bg.jpg");
756 background-attachment: fixed;
757}
758
759.figure,
760.informalfigure,
761.example,
762.informalexample,
763.table,
764.informaltable {
765 background-image: url("images/figure_bg.jpg");
766 background-attachment: fixed;
767}
768
769*/
770h1,
771h2,
772h3,
773h4,
774h5,
775h6,
776h7{
777}
778
779/*
780Example of how to stick an image as part of the title.
781
782div.article .titlepage .title
783{
784 background-image: url("figures/white-on-black.png");
785 background-position: center;
786 background-repeat: repeat-x;
787}
788*/
789
790div.preface .titlepage .title,
791div.colophon .title,
792div.chapter .titlepage .title,
793div.article .titlepage .title
794{
795}
796
797div.section div.section .titlepage .title,
798div.sect2 .titlepage .title {
799 background: none;
800}
801
802
803h1.title {
804 background-color: transparent;
805 background-repeat: no-repeat;
806 height: 256px;
807 text-indent: -9000px;
808 overflow:hidden;
809}
810
811h2.subtitle {
812 background-color: transparent;
813 text-indent: -9000px;
814 overflow:hidden;
815 width: 0px;
816 display: none;
817}
818
819 /*************************************** /
820 / pippin.gimp.org specific alterations /
821/ ***************************************/
822
823/*
824div.heading, div.navheader {
825 color: #777;
826 font-size: 80%;
827 padding: 0;
828 margin: 0;
829 text-align: left;
830 position: absolute;
831 top: 0px;
832 left: 0px;
833 width: 100%;
834 height: 50px;
835 background: url('/gfx/heading_bg.png') transparent;
836 background-repeat: repeat-x;
837 background-attachment: fixed;
838 border: none;
839}
840
841div.heading a {
842 color: #444;
843}
844
845div.footing, div.navfooter {
846 border: none;
847 color: #ddd;
848 font-size: 80%;
849 text-align:right;
850
851 width: 100%;
852 padding-top: 10px;
853 position: absolute;
854 bottom: 0px;
855 left: 0px;
856
857 background: url('/gfx/footing_bg.png') transparent;
858}
859*/
860
861
862
863 /****************** /
864 / nasty ie tweaks /
865/ ******************/
866
867/*
868div.heading, div.navheader {
869 width:expression(document.body.clientWidth + "px");
870}
871
872div.footing, div.navfooter {
873 width:expression(document.body.clientWidth + "px");
874 margin-left:expression("-5em");
875}
876body {
877 padding:expression("4em 5em 0em 5em");
878}
879*/
880
881 /**************************************** /
882 / mozilla vendor specific css extensions /
883/ ****************************************/
884/*
885div.navfooter, div.footing{
886 -moz-opacity: 0.8em;
887}
888
889div.figure,
890div.table,
891div.informalfigure,
892div.informaltable,
893div.informalexample,
894div.example,
895.tip,
896.warning,
897.caution,
898.note {
899 -moz-border-radius: 0.5em;
900}
901
902b.keycap,
903.keycap {
904 -moz-border-radius: 0.3em;
905}
906*/
907
908table tr td table tr td {
909 display: none;
910}
911
912
913hr {
914 display: none;
915}
916
917table {
918 border: 0em;
919}
920
921 .photo {
922 float: right;
923 margin-left: 1.5em;
924 margin-bottom: 1.5em;
925 margin-top: 0em;
926 max-width: 17em;
927 border: 1px solid gray;
928 padding: 3px;
929 background: white;
930}
931 .seperator {
932 padding-top: 2em;
933 clear: both;
934 }
935
936 #validators {
937 margin-top: 5em;
938 text-align: right;
939 color: #777;
940 }
941 @media print {
942 body {
943 font-size: 8pt;
944 }
945 .noprint {
946 display: none;
947 }
948 }
949
950
951.tip,
952.note {
953 background: #f0f0f2;
954 color: #333;
955 padding: 20px;
956 margin: 20px;
957}
958
959.tip h3,
960.note h3 {
961 padding: 0em;
962 margin: 0em;
963 font-size: 2em;
964 font-weight: bold;
965 color: #333;
966}
967
968.tip a,
969.note a {
970 color: #333;
971 text-decoration: underline;
972}
973
974.footnote {
975 font-size: small;
976 color: #333;
977}
978
979/* Changes the announcement text */
980.tip h3,
981.warning h3,
982.caution h3,
983.note h3 {
984 font-size:large;
985 color: #00557D;
986}
diff --git a/documentation/brief-yoctoprojectqs/brief-yoctoprojectqs-customization.xsl b/documentation/brief-yoctoprojectqs/brief-yoctoprojectqs-customization.xsl
deleted file mode 100644
index 012d86384a..0000000000
--- a/documentation/brief-yoctoprojectqs/brief-yoctoprojectqs-customization.xsl
+++ /dev/null
@@ -1,26 +0,0 @@
1<?xml version='1.0'?>
2<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
3
4<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
5
6 <xsl:import href="http://downloads.yoctoproject.org/mirror/docbook-mirror/docbook-xsl-1.76.1/xhtml/docbook.xsl" />
7
8<!--
9
10 <xsl:import href="../template/1.76.1/docbook-xsl-1.76.1/xhtml/docbook.xsl" />
11
12 <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.76.1/xhtml/docbook.xsl" />
13
14-->
15
16 <xsl:import href="brief-yoctoprojectqs-titlepage.xsl"/>
17
18 <xsl:include href="../template/permalinks.xsl"/>
19 <xsl:include href="../template/section.title.xsl"/>
20 <xsl:include href="../template/component.title.xsl"/>
21 <xsl:include href="../template/division.title.xsl"/>
22 <xsl:include href="../template/formal.object.heading.xsl"/>
23
24 <xsl:param name="generate.toc" select="'article nop'"></xsl:param>
25 <xsl:param name="html.stylesheet" select="'brief-yoctoprojectqs-style.css'" />
26</xsl:stylesheet>
diff --git a/documentation/brief-yoctoprojectqs/brief-yoctoprojectqs-style.css b/documentation/brief-yoctoprojectqs/brief-yoctoprojectqs-style.css
deleted file mode 100644
index e4e79d90ef..0000000000
--- a/documentation/brief-yoctoprojectqs/brief-yoctoprojectqs-style.css
+++ /dev/null
@@ -1,992 +0,0 @@
1/*
2
3 SPDX-License-Identifier: CC-BY-2.0-UK
4
5 Generic XHTML / DocBook XHTML CSS Stylesheet.
6
7 Browser wrangling and typographic design by
8 Oyvind Kolas / pippin@gimp.org
9
10 Customised for Poky by
11 Matthew Allum / mallum@o-hand.com
12
13 Thanks to:
14 Liam R. E. Quin
15 William Skaggs
16 Jakub Steiner
17
18 Structure
19 ---------
20
21 The stylesheet is divided into the following sections:
22
23 Positioning
24 Margins, paddings, width, font-size, clearing.
25 Decorations
26 Borders, style
27 Colors
28 Colors
29 Graphics
30 Graphical backgrounds
31 Nasty IE tweaks
32 Workarounds needed to make it work in internet explorer,
33 currently makes the stylesheet non validating, but up until
34 this point it is validating.
35 Mozilla extensions
36 Transparency for footer
37 Rounded corners on boxes
38
39*/
40
41
42 /*************** /
43 / Positioning /
44/ ***************/
45
46body {
47 font-family: Verdana, Sans, sans-serif;
48
49 min-width: 640px;
50 width: 80%;
51 margin: 0em auto;
52 padding: 2em 5em 5em 5em;
53 color: #333;
54}
55
56h1,h2,h3,h4,h5,h6,h7 {
57 font-family: Arial, Sans;
58 color: #00557D;
59 clear: both;
60}
61
62h1 {
63 font-size: 2em;
64 text-align: left;
65 padding: 0em 0em 0em 0em;
66 margin: 2em 0em 0em 0em;
67}
68
69h2.subtitle {
70 margin: 0.10em 0em 3.0em 0em;
71 padding: 0em 0em 0em 0em;
72 font-size: 1.8em;
73 padding-left: 20%;
74 font-weight: normal;
75 font-style: italic;
76}
77
78h2 {
79 margin: 2em 0em 0.66em 0em;
80 padding: 0.5em 0em 0em 0em;
81 font-size: 1.5em;
82 font-weight: bold;
83}
84
85h3.subtitle {
86 margin: 0em 0em 1em 0em;
87 padding: 0em 0em 0em 0em;
88 font-size: 142.14%;
89 text-align: right;
90}
91
92h3 {
93 margin: 1em 0em 0.5em 0em;
94 padding: 1em 0em 0em 0em;
95 font-size: 140%;
96 font-weight: bold;
97}
98
99h4 {
100 margin: 1em 0em 0.5em 0em;
101 padding: 1em 0em 0em 0em;
102 font-size: 120%;
103 font-weight: bold;
104}
105
106h5 {
107 margin: 1em 0em 0.5em 0em;
108 padding: 1em 0em 0em 0em;
109 font-size: 110%;
110 font-weight: bold;
111}
112
113h6 {
114 margin: 1em 0em 0em 0em;
115 padding: 1em 0em 0em 0em;
116 font-size: 110%;
117 font-weight: bold;
118}
119
120.authorgroup {
121 background-color: transparent;
122 background-repeat: no-repeat;
123 padding-top: 256px;
124 background-image: url("figures/bypqs-title.png");
125 background-position: left top;
126 margin-top: -256px;
127 padding-right: 50px;
128 margin-left: 0px;
129 text-align: right;
130 width: 740px;
131}
132
133h3.author {
134 margin: 0em 0me 0em 0em;
135 padding: 0em 0em 0em 0em;
136 font-weight: normal;
137 font-size: 100%;
138 color: #333;
139 clear: both;
140}
141
142.author tt.email {
143 font-size: 66%;
144}
145
146.titlepage hr {
147 width: 0em;
148 clear: both;
149}
150
151.revhistory {
152 padding-top: 2em;
153 clear: both;
154}
155
156.toc,
157.list-of-tables,
158.list-of-examples,
159.list-of-figures {
160 padding: 1.33em 0em 2.5em 0em;
161 color: #00557D;
162}
163
164.toc p,
165.list-of-tables p,
166.list-of-figures p,
167.list-of-examples p {
168 padding: 0em 0em 0em 0em;
169 padding: 0em 0em 0.3em;
170 margin: 1.5em 0em 0em 0em;
171}
172
173.toc p b,
174.list-of-tables p b,
175.list-of-figures p b,
176.list-of-examples p b{
177 font-size: 100.0%;
178 font-weight: bold;
179}
180
181.toc dl,
182.list-of-tables dl,
183.list-of-figures dl,
184.list-of-examples dl {
185 margin: 0em 0em 0.5em 0em;
186 padding: 0em 0em 0em 0em;
187}
188
189.toc dt {
190 margin: 0em 0em 0em 0em;
191 padding: 0em 0em 0em 0em;
192}
193
194.toc dd {
195 margin: 0em 0em 0em 2.6em;
196 padding: 0em 0em 0em 0em;
197}
198
199div.glossary dl,
200div.variablelist dl {
201}
202
203.glossary dl dt,
204.variablelist dl dt,
205.variablelist dl dt span.term {
206 font-weight: normal;
207 width: 20em;
208 text-align: right;
209}
210
211.variablelist dl dt {
212 margin-top: 0.5em;
213}
214
215.glossary dl dd,
216.variablelist dl dd {
217 margin-top: -1em;
218 margin-left: 25.5em;
219}
220
221.glossary dd p,
222.variablelist dd p {
223 margin-top: 0em;
224 margin-bottom: 1em;
225}
226
227
228div.calloutlist table td {
229 padding: 0em 0em 0em 0em;
230 margin: 0em 0em 0em 0em;
231}
232
233div.calloutlist table td p {
234 margin-top: 0em;
235 margin-bottom: 1em;
236}
237
238div p.copyright {
239 text-align: left;
240}
241
242div.legalnotice p.legalnotice-title {
243 margin-bottom: 0em;
244}
245
246p {
247 line-height: 1.5em;
248 margin-top: 0em;
249
250}
251
252dl {
253 padding-top: 0em;
254}
255
256hr {
257 border: solid 1px;
258}
259
260
261.mediaobject,
262.mediaobjectco {
263 text-align: center;
264}
265
266img {
267 border: none;
268}
269
270ul {
271 padding: 0em 0em 0em 1.5em;
272}
273
274ul li {
275 padding: 0em 0em 0em 0em;
276}
277
278ul li p {
279 text-align: left;
280}
281
282table {
283 width :100%;
284}
285
286th {
287 padding: 0.25em;
288 text-align: left;
289 font-weight: normal;
290 vertical-align: top;
291}
292
293td {
294 padding: 0.25em;
295 vertical-align: top;
296}
297
298p a[id] {
299 margin: 0px;
300 padding: 0px;
301 display: inline;
302 background-image: none;
303}
304
305a {
306 text-decoration: underline;
307 color: #444;
308}
309
310pre {
311 overflow: auto;
312}
313
314a:hover {
315 text-decoration: underline;
316 /*font-weight: bold;*/
317}
318
319/* This style defines how the permalink character
320 appears by itself and when hovered over with
321 the mouse. */
322
323[alt='Permalink'] { color: #eee; }
324[alt='Permalink']:hover { color: black; }
325
326
327div.informalfigure,
328div.informalexample,
329div.informaltable,
330div.figure,
331div.table,
332div.example {
333 margin: 1em 0em;
334 padding: 1em;
335 page-break-inside: avoid;
336}
337
338
339div.informalfigure p.title b,
340div.informalexample p.title b,
341div.informaltable p.title b,
342div.figure p.title b,
343div.example p.title b,
344div.table p.title b{
345 padding-top: 0em;
346 margin-top: 0em;
347 font-size: 100%;
348 font-weight: normal;
349}
350
351.mediaobject .caption,
352.mediaobject .caption p {
353 text-align: center;
354 font-size: 80%;
355 padding-top: 0.5em;
356 padding-bottom: 0.5em;
357}
358
359.epigraph {
360 padding-left: 55%;
361 margin-bottom: 1em;
362}
363
364.epigraph p {
365 text-align: left;
366}
367
368.epigraph .quote {
369 font-style: italic;
370}
371.epigraph .attribution {
372 font-style: normal;
373 text-align: right;
374}
375
376span.application {
377 font-style: italic;
378}
379
380.programlisting {
381 font-family: monospace;
382 font-size: 80%;
383 white-space: pre;
384 margin: 1.33em 0em;
385 padding: 1.33em;
386}
387
388.tip,
389.warning,
390.caution,
391.note {
392 margin-top: 1em;
393 margin-bottom: 1em;
394
395}
396
397/* force full width of table within div */
398.tip table,
399.warning table,
400.caution table,
401.note table {
402 border: none;
403 width: 100%;
404}
405
406
407.tip table th,
408.warning table th,
409.caution table th,
410.note table th {
411 padding: 0.8em 0.0em 0.0em 0.0em;
412 margin : 0em 0em 0em 0em;
413}
414
415.tip p,
416.warning p,
417.caution p,
418.note p {
419 margin-top: 0.5em;
420 margin-bottom: 0.5em;
421 padding-right: 1em;
422 text-align: left;
423}
424
425.acronym {
426 text-transform: uppercase;
427}
428
429b.keycap,
430.keycap {
431 padding: 0.09em 0.3em;
432 margin: 0em;
433}
434
435.itemizedlist li {
436 clear: none;
437}
438
439.filename {
440 font-size: medium;
441 font-family: Courier, monospace;
442}
443
444
445div.navheader, div.heading{
446 position: absolute;
447 left: 0em;
448 top: 0em;
449 width: 100%;
450 background-color: #cdf;
451 width: 100%;
452}
453
454div.navfooter, div.footing{
455 position: fixed;
456 left: 0em;
457 bottom: 0em;
458 background-color: #eee;
459 width: 100%;
460}
461
462
463div.navheader td,
464div.navfooter td {
465 font-size: 66%;
466}
467
468div.navheader table th {
469 /*font-family: Georgia, Times, serif;*/
470 /*font-size: x-large;*/
471 font-size: 80%;
472}
473
474div.navheader table {
475 border-left: 0em;
476 border-right: 0em;
477 border-top: 0em;
478 width: 100%;
479}
480
481div.navfooter table {
482 border-left: 0em;
483 border-right: 0em;
484 border-bottom: 0em;
485 width: 100%;
486}
487
488div.navheader table td a,
489div.navfooter table td a {
490 color: #777;
491 text-decoration: none;
492}
493
494/* normal text in the footer */
495div.navfooter table td {
496 color: black;
497}
498
499div.navheader table td a:visited,
500div.navfooter table td a:visited {
501 color: #444;
502}
503
504
505/* links in header and footer */
506div.navheader table td a:hover,
507div.navfooter table td a:hover {
508 text-decoration: underline;
509 background-color: transparent;
510 color: #33a;
511}
512
513div.navheader hr,
514div.navfooter hr {
515 display: none;
516}
517
518
519.qandaset tr.question td p {
520 margin: 0em 0em 1em 0em;
521 padding: 0em 0em 0em 0em;
522}
523
524.qandaset tr.answer td p {
525 margin: 0em 0em 1em 0em;
526 padding: 0em 0em 0em 0em;
527}
528.answer td {
529 padding-bottom: 1.5em;
530}
531
532.emphasis {
533 font-weight: bold;
534}
535
536
537 /************* /
538 / decorations /
539/ *************/
540
541.titlepage {
542}
543
544.part .title {
545}
546
547.subtitle {
548 border: none;
549}
550
551/*
552h1 {
553 border: none;
554}
555
556h2 {
557 border-top: solid 0.2em;
558 border-bottom: solid 0.06em;
559}
560
561h3 {
562 border-top: 0em;
563 border-bottom: solid 0.06em;
564}
565
566h4 {
567 border: 0em;
568 border-bottom: solid 0.06em;
569}
570
571h5 {
572 border: 0em;
573}
574*/
575
576.programlisting {
577 border: solid 1px;
578}
579
580div.figure,
581div.table,
582div.informalfigure,
583div.informaltable,
584div.informalexample,
585div.example {
586 border: 1px solid;
587}
588
589
590
591.tip,
592.warning,
593.caution,
594.note {
595 border: 1px solid;
596}
597
598.tip table th,
599.warning table th,
600.caution table th,
601.note table th {
602 border-bottom: 1px solid;
603}
604
605.question td {
606 border-top: 1px solid black;
607}
608
609.answer {
610}
611
612
613b.keycap,
614.keycap {
615 border: 1px solid;
616}
617
618
619div.navheader, div.heading{
620 border-bottom: 1px solid;
621}
622
623
624div.navfooter, div.footing{
625 border-top: 1px solid;
626}
627
628 /********* /
629 / colors /
630/ *********/
631
632body {
633 color: #333;
634 background: white;
635}
636
637a {
638 background: transparent;
639}
640
641a:hover {
642 background-color: #dedede;
643}
644
645
646h1,
647h2,
648h3,
649h4,
650h5,
651h6,
652h7,
653h8 {
654 background-color: transparent;
655}
656
657hr {
658 border-color: #aaa;
659}
660
661
662.tip, .warning, .caution, .note {
663 border-color: #fff;
664}
665
666
667.tip table th,
668.warning table th,
669.caution table th,
670.note table th {
671 border-bottom-color: #fff;
672}
673
674
675.warning {
676 background-color: #f0f0f2;
677}
678
679.caution {
680 background-color: #f0f0f2;
681}
682
683.tip {
684 background-color: #f0f0f2;
685}
686
687.note {
688 background-color: #f0f0f2;
689}
690
691.glossary dl dt,
692.variablelist dl dt,
693.variablelist dl dt span.term {
694 color: #044;
695}
696
697div.figure,
698div.table,
699div.example,
700div.informalfigure,
701div.informaltable,
702div.informalexample {
703 border-color: #aaa;
704}
705
706pre.programlisting {
707 color: black;
708 background-color: #fff;
709 border-color: #aaa;
710 border-width: 2px;
711}
712
713.guimenu,
714.guilabel,
715.guimenuitem {
716 background-color: #eee;
717}
718
719
720b.keycap,
721.keycap {
722 background-color: #eee;
723 border-color: #999;
724}
725
726
727div.navheader {
728 border-color: black;
729}
730
731
732div.navfooter {
733 border-color: black;
734}
735
736
737.writernotes {
738 color: red;
739}
740
741
742 /*********** /
743 / graphics /
744/ ***********/
745
746/*
747body {
748 background-image: url("images/body_bg.jpg");
749 background-attachment: fixed;
750}
751
752.navheader,
753.note,
754.tip {
755 background-image: url("images/note_bg.jpg");
756 background-attachment: fixed;
757}
758
759.warning,
760.caution {
761 background-image: url("images/warning_bg.jpg");
762 background-attachment: fixed;
763}
764
765.figure,
766.informalfigure,
767.example,
768.informalexample,
769.table,
770.informaltable {
771 background-image: url("images/figure_bg.jpg");
772 background-attachment: fixed;
773}
774
775*/
776h1,
777h2,
778h3,
779h4,
780h5,
781h6,
782h7{
783}
784
785/*
786Example of how to stick an image as part of the title.
787
788div.article .titlepage .title
789{
790 background-image: url("figures/white-on-black.png");
791 background-position: center;
792 background-repeat: repeat-x;
793}
794*/
795
796div.preface .titlepage .title,
797div.colophon .title,
798div.chapter .titlepage .title {
799 background-position: bottom;
800 background-repeat: repeat-x;
801}
802
803div.section div.section .titlepage .title,
804div.sect2 .titlepage .title {
805 background: none;
806}
807
808
809h1.title {
810 background-color: transparent;
811 background-repeat: no-repeat;
812 height: 256px;
813 text-indent: -9000px;
814 overflow:hidden;
815}
816
817h2.subtitle {
818 background-color: transparent;
819 text-indent: -9000px;
820 overflow:hidden;
821 width: 0px;
822 display: none;
823}
824
825 /*************************************** /
826 / pippin.gimp.org specific alterations /
827/ ***************************************/
828
829/*
830div.heading, div.navheader {
831 color: #777;
832 font-size: 80%;
833 padding: 0;
834 margin: 0;
835 text-align: left;
836 position: absolute;
837 top: 0px;
838 left: 0px;
839 width: 100%;
840 height: 50px;
841 background: url('/gfx/heading_bg.png') transparent;
842 background-repeat: repeat-x;
843 background-attachment: fixed;
844 border: none;
845}
846
847div.heading a {
848 color: #444;
849}
850
851div.footing, div.navfooter {
852 border: none;
853 color: #ddd;
854 font-size: 80%;
855 text-align:right;
856
857 width: 100%;
858 padding-top: 10px;
859 position: absolute;
860 bottom: 0px;
861 left: 0px;
862
863 background: url('/gfx/footing_bg.png') transparent;
864}
865*/
866
867
868
869 /****************** /
870 / nasty ie tweaks /
871/ ******************/
872
873/*
874div.heading, div.navheader {
875 width:expression(document.body.clientWidth + "px");
876}
877
878div.footing, div.navfooter {
879 width:expression(document.body.clientWidth + "px");
880 margin-left:expression("-5em");
881}
882body {
883 padding:expression("4em 5em 0em 5em");
884}
885*/
886
887 /**************************************** /
888 / mozilla vendor specific css extensions /
889/ ****************************************/
890/*
891div.navfooter, div.footing{
892 -moz-opacity: 0.8em;
893}
894
895div.figure,
896div.table,
897div.informalfigure,
898div.informaltable,
899div.informalexample,
900div.example,
901.tip,
902.warning,
903.caution,
904.note {
905 -moz-border-radius: 0.5em;
906}
907
908b.keycap,
909.keycap {
910 -moz-border-radius: 0.3em;
911}
912*/
913
914table tr td table tr td {
915 display: none;
916}
917
918
919hr {
920 display: none;
921}
922
923table {
924 border: 0em;
925}
926
927 .photo {
928 float: right;
929 margin-left: 1.5em;
930 margin-bottom: 1.5em;
931 margin-top: 0em;
932 max-width: 17em;
933 border: 1px solid gray;
934 padding: 3px;
935 background: white;
936}
937 .seperator {
938 padding-top: 2em;
939 clear: both;
940 }
941
942 #validators {
943 margin-top: 5em;
944 text-align: right;
945 color: #777;
946 }
947 @media print {
948 body {
949 font-size: 8pt;
950 }
951 .noprint {
952 display: none;
953 }
954 }
955
956
957.tip,
958.note {
959 background: #f0f0f2;
960 color: #333;
961 padding: 20px;
962 margin: 20px;
963}
964
965.tip h3,
966.note h3 {
967 padding: 0em;
968 margin: 0em;
969 font-size: 2em;
970 font-weight: bold;
971 color: #333;
972}
973
974.tip a,
975.note a {
976 color: #333;
977 text-decoration: underline;
978}
979
980.footnote {
981 font-size: small;
982 color: #333;
983}
984
985/* Changes the announcement text */
986.tip h3,
987.warning h3,
988.caution h3,
989.note h3 {
990 font-size:large;
991 color: #00557D;
992}
diff --git a/documentation/brief-yoctoprojectqs/brief-yoctoprojectqs-titlepage.xsl b/documentation/brief-yoctoprojectqs/brief-yoctoprojectqs-titlepage.xsl
deleted file mode 100644
index e74ac530dd..0000000000
--- a/documentation/brief-yoctoprojectqs/brief-yoctoprojectqs-titlepage.xsl
+++ /dev/null
@@ -1,3821 +0,0 @@
1<?xml version="1.0"?>
2<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
3
4<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" version="1.0" exclude-result-prefixes="exsl">
5
6<!-- This stylesheet was created by template/titlepage.xsl-->
7
8<xsl:template name="article.titlepage.recto">
9 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/abstract"/>
10 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/abstract"/>
11 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/abstract"/>
12 <xsl:choose>
13 <xsl:when test="articleinfo/title">
14 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/title"/>
15 </xsl:when>
16 <xsl:when test="artheader/title">
17 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/title"/>
18 </xsl:when>
19 <xsl:when test="info/title">
20 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/title"/>
21 </xsl:when>
22 <xsl:when test="title">
23 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="title"/>
24 </xsl:when>
25 </xsl:choose>
26
27 <xsl:choose>
28 <xsl:when test="articleinfo/subtitle">
29 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/subtitle"/>
30 </xsl:when>
31 <xsl:when test="artheader/subtitle">
32 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/subtitle"/>
33 </xsl:when>
34 <xsl:when test="info/subtitle">
35 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/subtitle"/>
36 </xsl:when>
37 <xsl:when test="subtitle">
38 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="subtitle"/>
39 </xsl:when>
40 </xsl:choose>
41
42 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/corpauthor"/>
43 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/corpauthor"/>
44 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/corpauthor"/>
45 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/authorgroup"/>
46 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/authorgroup"/>
47 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/authorgroup"/>
48 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/author"/>
49 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/author"/>
50 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/author"/>
51 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/othercredit"/>
52 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/othercredit"/>
53 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/othercredit"/>
54 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/releaseinfo"/>
55 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/releaseinfo"/>
56 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/releaseinfo"/>
57 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/copyright"/>
58 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/copyright"/>
59 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/copyright"/>
60 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/legalnotice"/>
61 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/legalnotice"/>
62 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/legalnotice"/>
63 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/pubdate"/>
64 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/pubdate"/>
65 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/pubdate"/>
66 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/revision"/>
67 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/revision"/>
68 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/revision"/>
69 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/revhistory"/>
70 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/revhistory"/>
71 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/revhistory"/>
72</xsl:template>
73
74<xsl:template name="article.titlepage.verso">
75</xsl:template>
76
77<xsl:template name="article.titlepage.separator"><hr/>
78</xsl:template>
79
80<xsl:template name="article.titlepage.before.recto">
81</xsl:template>
82
83<xsl:template name="article.titlepage.before.verso">
84</xsl:template>
85
86<xsl:template name="article.titlepage">
87 <div class="titlepage">
88 <xsl:variable name="recto.content">
89 <xsl:call-template name="article.titlepage.before.recto"/>
90 <xsl:call-template name="article.titlepage.recto"/>
91 </xsl:variable>
92 <xsl:variable name="recto.elements.count">
93 <xsl:choose>
94 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
95 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
96 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
97 <xsl:otherwise>1</xsl:otherwise>
98 </xsl:choose>
99 </xsl:variable>
100 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
101 <div><xsl:copy-of select="$recto.content"/></div>
102 </xsl:if>
103 <xsl:variable name="verso.content">
104 <xsl:call-template name="article.titlepage.before.verso"/>
105 <xsl:call-template name="article.titlepage.verso"/>
106 </xsl:variable>
107 <xsl:variable name="verso.elements.count">
108 <xsl:choose>
109 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
110 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
111 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
112 <xsl:otherwise>1</xsl:otherwise>
113 </xsl:choose>
114 </xsl:variable>
115 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
116 <div><xsl:copy-of select="$verso.content"/></div>
117 </xsl:if>
118 <xsl:call-template name="article.titlepage.separator"/>
119 </div>
120</xsl:template>
121
122<xsl:template match="*" mode="article.titlepage.recto.mode">
123 <!-- if an element isn't found in this mode, -->
124 <!-- try the generic titlepage.mode -->
125 <xsl:apply-templates select="." mode="titlepage.mode"/>
126</xsl:template>
127
128<xsl:template match="*" mode="article.titlepage.verso.mode">
129 <!-- if an element isn't found in this mode, -->
130 <!-- try the generic titlepage.mode -->
131 <xsl:apply-templates select="." mode="titlepage.mode"/>
132</xsl:template>
133
134<xsl:template match="abstract" mode="article.titlepage.recto.auto.mode">
135<div xsl:use-attribute-sets="article.titlepage.recto.style">
136 <xsl:call-template name="anchor"/>
137 <xsl:apply-templates/>
138<!-- orignally generated content -->
139<!-- <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/> -->
140</div>
141</xsl:template>
142
143<xsl:template match="title" mode="article.titlepage.recto.auto.mode">
144<div xsl:use-attribute-sets="article.titlepage.recto.style">
145<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
146</div>
147</xsl:template>
148
149<xsl:template match="subtitle" mode="article.titlepage.recto.auto.mode">
150<div xsl:use-attribute-sets="article.titlepage.recto.style">
151<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
152</div>
153</xsl:template>
154
155<xsl:template match="corpauthor" mode="article.titlepage.recto.auto.mode">
156<div xsl:use-attribute-sets="article.titlepage.recto.style">
157<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
158</div>
159</xsl:template>
160
161<xsl:template match="authorgroup" mode="article.titlepage.recto.auto.mode">
162<div xsl:use-attribute-sets="article.titlepage.recto.style">
163<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
164</div>
165</xsl:template>
166
167<xsl:template match="author" mode="article.titlepage.recto.auto.mode">
168<div xsl:use-attribute-sets="article.titlepage.recto.style">
169<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
170</div>
171</xsl:template>
172
173<xsl:template match="othercredit" mode="article.titlepage.recto.auto.mode">
174<div xsl:use-attribute-sets="article.titlepage.recto.style">
175<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
176</div>
177</xsl:template>
178
179<xsl:template match="releaseinfo" mode="article.titlepage.recto.auto.mode">
180<div xsl:use-attribute-sets="article.titlepage.recto.style">
181<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
182</div>
183</xsl:template>
184
185<xsl:template match="copyright" mode="article.titlepage.recto.auto.mode">
186<div xsl:use-attribute-sets="article.titlepage.recto.style">
187<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
188</div>
189</xsl:template>
190
191<xsl:template match="legalnotice" mode="article.titlepage.recto.auto.mode">
192<div xsl:use-attribute-sets="article.titlepage.recto.style">
193<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
194</div>
195</xsl:template>
196
197<xsl:template match="pubdate" mode="article.titlepage.recto.auto.mode">
198<div xsl:use-attribute-sets="article.titlepage.recto.style">
199<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
200</div>
201</xsl:template>
202
203<xsl:template match="revision" mode="article.titlepage.recto.auto.mode">
204<div xsl:use-attribute-sets="article.titlepage.recto.style">
205<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
206</div>
207</xsl:template>
208
209<xsl:template match="revhistory" mode="article.titlepage.recto.auto.mode">
210<div xsl:use-attribute-sets="article.titlepage.recto.style">
211<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
212</div>
213</xsl:template>
214
215<xsl:template name="set.titlepage.recto">
216 <xsl:choose>
217 <xsl:when test="setinfo/title">
218 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/title"/>
219 </xsl:when>
220 <xsl:when test="info/title">
221 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/title"/>
222 </xsl:when>
223 <xsl:when test="title">
224 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="title"/>
225 </xsl:when>
226 </xsl:choose>
227
228 <xsl:choose>
229 <xsl:when test="setinfo/subtitle">
230 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/subtitle"/>
231 </xsl:when>
232 <xsl:when test="info/subtitle">
233 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/subtitle"/>
234 </xsl:when>
235 <xsl:when test="subtitle">
236 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="subtitle"/>
237 </xsl:when>
238 </xsl:choose>
239
240 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/corpauthor"/>
241 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/corpauthor"/>
242 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/authorgroup"/>
243 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/authorgroup"/>
244 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/author"/>
245 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/author"/>
246 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/othercredit"/>
247 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/othercredit"/>
248 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/releaseinfo"/>
249 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/releaseinfo"/>
250 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/copyright"/>
251 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/copyright"/>
252 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/legalnotice"/>
253 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/legalnotice"/>
254 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/pubdate"/>
255 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/pubdate"/>
256 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/revision"/>
257 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/revision"/>
258 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/revhistory"/>
259 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/revhistory"/>
260 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/abstract"/>
261 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/abstract"/>
262</xsl:template>
263
264<xsl:template name="set.titlepage.verso">
265</xsl:template>
266
267<xsl:template name="set.titlepage.separator"><hr/>
268</xsl:template>
269
270<xsl:template name="set.titlepage.before.recto">
271</xsl:template>
272
273<xsl:template name="set.titlepage.before.verso">
274</xsl:template>
275
276<xsl:template name="set.titlepage">
277 <div class="titlepage">
278 <xsl:variable name="recto.content">
279 <xsl:call-template name="set.titlepage.before.recto"/>
280 <xsl:call-template name="set.titlepage.recto"/>
281 </xsl:variable>
282 <xsl:variable name="recto.elements.count">
283 <xsl:choose>
284 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
285 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
286 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
287 <xsl:otherwise>1</xsl:otherwise>
288 </xsl:choose>
289 </xsl:variable>
290 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
291 <div><xsl:copy-of select="$recto.content"/></div>
292 </xsl:if>
293 <xsl:variable name="verso.content">
294 <xsl:call-template name="set.titlepage.before.verso"/>
295 <xsl:call-template name="set.titlepage.verso"/>
296 </xsl:variable>
297 <xsl:variable name="verso.elements.count">
298 <xsl:choose>
299 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
300 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
301 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
302 <xsl:otherwise>1</xsl:otherwise>
303 </xsl:choose>
304 </xsl:variable>
305 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
306 <div><xsl:copy-of select="$verso.content"/></div>
307 </xsl:if>
308 <xsl:call-template name="set.titlepage.separator"/>
309 </div>
310</xsl:template>
311
312<xsl:template match="*" mode="set.titlepage.recto.mode">
313 <!-- if an element isn't found in this mode, -->
314 <!-- try the generic titlepage.mode -->
315 <xsl:apply-templates select="." mode="titlepage.mode"/>
316</xsl:template>
317
318<xsl:template match="*" mode="set.titlepage.verso.mode">
319 <!-- if an element isn't found in this mode, -->
320 <!-- try the generic titlepage.mode -->
321 <xsl:apply-templates select="." mode="titlepage.mode"/>
322</xsl:template>
323
324<xsl:template match="title" mode="set.titlepage.recto.auto.mode">
325<div xsl:use-attribute-sets="set.titlepage.recto.style">
326<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
327</div>
328</xsl:template>
329
330<xsl:template match="subtitle" mode="set.titlepage.recto.auto.mode">
331<div xsl:use-attribute-sets="set.titlepage.recto.style">
332<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
333</div>
334</xsl:template>
335
336<xsl:template match="corpauthor" mode="set.titlepage.recto.auto.mode">
337<div xsl:use-attribute-sets="set.titlepage.recto.style">
338<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
339</div>
340</xsl:template>
341
342<xsl:template match="authorgroup" mode="set.titlepage.recto.auto.mode">
343<div xsl:use-attribute-sets="set.titlepage.recto.style">
344<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
345</div>
346</xsl:template>
347
348<xsl:template match="author" mode="set.titlepage.recto.auto.mode">
349<div xsl:use-attribute-sets="set.titlepage.recto.style">
350<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
351</div>
352</xsl:template>
353
354<xsl:template match="othercredit" mode="set.titlepage.recto.auto.mode">
355<div xsl:use-attribute-sets="set.titlepage.recto.style">
356<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
357</div>
358</xsl:template>
359
360<xsl:template match="releaseinfo" mode="set.titlepage.recto.auto.mode">
361<div xsl:use-attribute-sets="set.titlepage.recto.style">
362<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
363</div>
364</xsl:template>
365
366<xsl:template match="copyright" mode="set.titlepage.recto.auto.mode">
367<div xsl:use-attribute-sets="set.titlepage.recto.style">
368<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
369</div>
370</xsl:template>
371
372<xsl:template match="legalnotice" mode="set.titlepage.recto.auto.mode">
373<div xsl:use-attribute-sets="set.titlepage.recto.style">
374<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
375</div>
376</xsl:template>
377
378<xsl:template match="pubdate" mode="set.titlepage.recto.auto.mode">
379<div xsl:use-attribute-sets="set.titlepage.recto.style">
380<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
381</div>
382</xsl:template>
383
384<xsl:template match="revision" mode="set.titlepage.recto.auto.mode">
385<div xsl:use-attribute-sets="set.titlepage.recto.style">
386<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
387</div>
388</xsl:template>
389
390<xsl:template match="revhistory" mode="set.titlepage.recto.auto.mode">
391<div xsl:use-attribute-sets="set.titlepage.recto.style">
392<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
393</div>
394</xsl:template>
395
396<xsl:template match="abstract" mode="set.titlepage.recto.auto.mode">
397<div xsl:use-attribute-sets="set.titlepage.recto.style">
398<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
399</div>
400</xsl:template>
401
402<xsl:template name="book.titlepage.recto">
403 <xsl:choose>
404 <xsl:when test="bookinfo/title">
405 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/title"/>
406 </xsl:when>
407 <xsl:when test="info/title">
408 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/title"/>
409 </xsl:when>
410 <xsl:when test="title">
411 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="title"/>
412 </xsl:when>
413 </xsl:choose>
414
415 <xsl:choose>
416 <xsl:when test="bookinfo/subtitle">
417 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/subtitle"/>
418 </xsl:when>
419 <xsl:when test="info/subtitle">
420 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/subtitle"/>
421 </xsl:when>
422 <xsl:when test="subtitle">
423 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="subtitle"/>
424 </xsl:when>
425 </xsl:choose>
426
427 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/corpauthor"/>
428 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/corpauthor"/>
429 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/authorgroup"/>
430 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/authorgroup"/>
431 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/author"/>
432 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/author"/>
433 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/othercredit"/>
434 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/othercredit"/>
435 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/releaseinfo"/>
436 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/releaseinfo"/>
437 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/copyright"/>
438 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/copyright"/>
439 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/legalnotice"/>
440 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/legalnotice"/>
441 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/pubdate"/>
442 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/pubdate"/>
443 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/revision"/>
444 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/revision"/>
445 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/revhistory"/>
446 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/revhistory"/>
447 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/abstract"/>
448 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/abstract"/>
449</xsl:template>
450
451<xsl:template name="book.titlepage.verso">
452</xsl:template>
453
454<xsl:template name="book.titlepage.separator"><hr/>
455</xsl:template>
456
457<xsl:template name="book.titlepage.before.recto">
458</xsl:template>
459
460<xsl:template name="book.titlepage.before.verso">
461</xsl:template>
462
463<xsl:template name="book.titlepage">
464 <div class="titlepage">
465 <xsl:variable name="recto.content">
466 <xsl:call-template name="book.titlepage.before.recto"/>
467 <xsl:call-template name="book.titlepage.recto"/>
468 </xsl:variable>
469 <xsl:variable name="recto.elements.count">
470 <xsl:choose>
471 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
472 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
473 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
474 <xsl:otherwise>1</xsl:otherwise>
475 </xsl:choose>
476 </xsl:variable>
477 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
478 <div><xsl:copy-of select="$recto.content"/></div>
479 </xsl:if>
480 <xsl:variable name="verso.content">
481 <xsl:call-template name="book.titlepage.before.verso"/>
482 <xsl:call-template name="book.titlepage.verso"/>
483 </xsl:variable>
484 <xsl:variable name="verso.elements.count">
485 <xsl:choose>
486 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
487 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
488 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
489 <xsl:otherwise>1</xsl:otherwise>
490 </xsl:choose>
491 </xsl:variable>
492 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
493 <div><xsl:copy-of select="$verso.content"/></div>
494 </xsl:if>
495 <xsl:call-template name="book.titlepage.separator"/>
496 </div>
497</xsl:template>
498
499<xsl:template match="*" mode="book.titlepage.recto.mode">
500 <!-- if an element isn't found in this mode, -->
501 <!-- try the generic titlepage.mode -->
502 <xsl:apply-templates select="." mode="titlepage.mode"/>
503</xsl:template>
504
505<xsl:template match="*" mode="book.titlepage.verso.mode">
506 <!-- if an element isn't found in this mode, -->
507 <!-- try the generic titlepage.mode -->
508 <xsl:apply-templates select="." mode="titlepage.mode"/>
509</xsl:template>
510
511<xsl:template match="title" mode="book.titlepage.recto.auto.mode">
512<div xsl:use-attribute-sets="book.titlepage.recto.style">
513<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
514</div>
515</xsl:template>
516
517<xsl:template match="subtitle" mode="book.titlepage.recto.auto.mode">
518<div xsl:use-attribute-sets="book.titlepage.recto.style">
519<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
520</div>
521</xsl:template>
522
523<xsl:template match="corpauthor" mode="book.titlepage.recto.auto.mode">
524<div xsl:use-attribute-sets="book.titlepage.recto.style">
525<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
526</div>
527</xsl:template>
528
529<xsl:template match="authorgroup" mode="book.titlepage.recto.auto.mode">
530<div xsl:use-attribute-sets="book.titlepage.recto.style">
531<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
532</div>
533</xsl:template>
534
535<xsl:template match="author" mode="book.titlepage.recto.auto.mode">
536<div xsl:use-attribute-sets="book.titlepage.recto.style">
537<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
538</div>
539</xsl:template>
540
541<xsl:template match="othercredit" mode="book.titlepage.recto.auto.mode">
542<div xsl:use-attribute-sets="book.titlepage.recto.style">
543<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
544</div>
545</xsl:template>
546
547<xsl:template match="releaseinfo" mode="book.titlepage.recto.auto.mode">
548<div xsl:use-attribute-sets="book.titlepage.recto.style">
549<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
550</div>
551</xsl:template>
552
553<xsl:template match="copyright" mode="book.titlepage.recto.auto.mode">
554<div xsl:use-attribute-sets="book.titlepage.recto.style">
555<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
556</div>
557</xsl:template>
558
559<xsl:template match="legalnotice" mode="book.titlepage.recto.auto.mode">
560<div xsl:use-attribute-sets="book.titlepage.recto.style">
561<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
562</div>
563</xsl:template>
564
565<xsl:template match="pubdate" mode="book.titlepage.recto.auto.mode">
566<div xsl:use-attribute-sets="book.titlepage.recto.style">
567<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
568</div>
569</xsl:template>
570
571<xsl:template match="revision" mode="book.titlepage.recto.auto.mode">
572<div xsl:use-attribute-sets="book.titlepage.recto.style">
573<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
574</div>
575</xsl:template>
576
577<xsl:template match="revhistory" mode="book.titlepage.recto.auto.mode">
578<div xsl:use-attribute-sets="book.titlepage.recto.style">
579<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
580</div>
581</xsl:template>
582
583<xsl:template match="abstract" mode="book.titlepage.recto.auto.mode">
584<div xsl:use-attribute-sets="book.titlepage.recto.style">
585<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
586</div>
587</xsl:template>
588
589<xsl:template name="part.titlepage.recto">
590 <div xsl:use-attribute-sets="part.titlepage.recto.style">
591<xsl:call-template name="division.title">
592<xsl:with-param name="node" select="ancestor-or-self::part[1]"/>
593</xsl:call-template></div>
594 <xsl:choose>
595 <xsl:when test="partinfo/subtitle">
596 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/subtitle"/>
597 </xsl:when>
598 <xsl:when test="docinfo/subtitle">
599 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
600 </xsl:when>
601 <xsl:when test="info/subtitle">
602 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/subtitle"/>
603 </xsl:when>
604 <xsl:when test="subtitle">
605 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="subtitle"/>
606 </xsl:when>
607 </xsl:choose>
608
609 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/corpauthor"/>
610 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
611 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/corpauthor"/>
612 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/authorgroup"/>
613 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
614 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/authorgroup"/>
615 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/author"/>
616 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/author"/>
617 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/author"/>
618 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/othercredit"/>
619 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
620 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/othercredit"/>
621 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/releaseinfo"/>
622 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
623 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/releaseinfo"/>
624 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/copyright"/>
625 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/copyright"/>
626 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/copyright"/>
627 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/legalnotice"/>
628 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
629 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/legalnotice"/>
630 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/pubdate"/>
631 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
632 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/pubdate"/>
633 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/revision"/>
634 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/revision"/>
635 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/revision"/>
636 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/revhistory"/>
637 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
638 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/revhistory"/>
639 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/abstract"/>
640 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/abstract"/>
641 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/abstract"/>
642</xsl:template>
643
644<xsl:template name="part.titlepage.verso">
645</xsl:template>
646
647<xsl:template name="part.titlepage.separator">
648</xsl:template>
649
650<xsl:template name="part.titlepage.before.recto">
651</xsl:template>
652
653<xsl:template name="part.titlepage.before.verso">
654</xsl:template>
655
656<xsl:template name="part.titlepage">
657 <div class="titlepage">
658 <xsl:variable name="recto.content">
659 <xsl:call-template name="part.titlepage.before.recto"/>
660 <xsl:call-template name="part.titlepage.recto"/>
661 </xsl:variable>
662 <xsl:variable name="recto.elements.count">
663 <xsl:choose>
664 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
665 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
666 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
667 <xsl:otherwise>1</xsl:otherwise>
668 </xsl:choose>
669 </xsl:variable>
670 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
671 <div><xsl:copy-of select="$recto.content"/></div>
672 </xsl:if>
673 <xsl:variable name="verso.content">
674 <xsl:call-template name="part.titlepage.before.verso"/>
675 <xsl:call-template name="part.titlepage.verso"/>
676 </xsl:variable>
677 <xsl:variable name="verso.elements.count">
678 <xsl:choose>
679 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
680 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
681 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
682 <xsl:otherwise>1</xsl:otherwise>
683 </xsl:choose>
684 </xsl:variable>
685 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
686 <div><xsl:copy-of select="$verso.content"/></div>
687 </xsl:if>
688 <xsl:call-template name="part.titlepage.separator"/>
689 </div>
690</xsl:template>
691
692<xsl:template match="*" mode="part.titlepage.recto.mode">
693 <!-- if an element isn't found in this mode, -->
694 <!-- try the generic titlepage.mode -->
695 <xsl:apply-templates select="." mode="titlepage.mode"/>
696</xsl:template>
697
698<xsl:template match="*" mode="part.titlepage.verso.mode">
699 <!-- if an element isn't found in this mode, -->
700 <!-- try the generic titlepage.mode -->
701 <xsl:apply-templates select="." mode="titlepage.mode"/>
702</xsl:template>
703
704<xsl:template match="subtitle" mode="part.titlepage.recto.auto.mode">
705<div xsl:use-attribute-sets="part.titlepage.recto.style">
706<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
707</div>
708</xsl:template>
709
710<xsl:template match="corpauthor" mode="part.titlepage.recto.auto.mode">
711<div xsl:use-attribute-sets="part.titlepage.recto.style">
712<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
713</div>
714</xsl:template>
715
716<xsl:template match="authorgroup" mode="part.titlepage.recto.auto.mode">
717<div xsl:use-attribute-sets="part.titlepage.recto.style">
718<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
719</div>
720</xsl:template>
721
722<xsl:template match="author" mode="part.titlepage.recto.auto.mode">
723<div xsl:use-attribute-sets="part.titlepage.recto.style">
724<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
725</div>
726</xsl:template>
727
728<xsl:template match="othercredit" mode="part.titlepage.recto.auto.mode">
729<div xsl:use-attribute-sets="part.titlepage.recto.style">
730<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
731</div>
732</xsl:template>
733
734<xsl:template match="releaseinfo" mode="part.titlepage.recto.auto.mode">
735<div xsl:use-attribute-sets="part.titlepage.recto.style">
736<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
737</div>
738</xsl:template>
739
740<xsl:template match="copyright" mode="part.titlepage.recto.auto.mode">
741<div xsl:use-attribute-sets="part.titlepage.recto.style">
742<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
743</div>
744</xsl:template>
745
746<xsl:template match="legalnotice" mode="part.titlepage.recto.auto.mode">
747<div xsl:use-attribute-sets="part.titlepage.recto.style">
748<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
749</div>
750</xsl:template>
751
752<xsl:template match="pubdate" mode="part.titlepage.recto.auto.mode">
753<div xsl:use-attribute-sets="part.titlepage.recto.style">
754<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
755</div>
756</xsl:template>
757
758<xsl:template match="revision" mode="part.titlepage.recto.auto.mode">
759<div xsl:use-attribute-sets="part.titlepage.recto.style">
760<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
761</div>
762</xsl:template>
763
764<xsl:template match="revhistory" mode="part.titlepage.recto.auto.mode">
765<div xsl:use-attribute-sets="part.titlepage.recto.style">
766<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
767</div>
768</xsl:template>
769
770<xsl:template match="abstract" mode="part.titlepage.recto.auto.mode">
771<div xsl:use-attribute-sets="part.titlepage.recto.style">
772<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
773</div>
774</xsl:template>
775
776<xsl:template name="partintro.titlepage.recto">
777 <xsl:choose>
778 <xsl:when test="partintroinfo/title">
779 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/title"/>
780 </xsl:when>
781 <xsl:when test="docinfo/title">
782 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/title"/>
783 </xsl:when>
784 <xsl:when test="info/title">
785 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/title"/>
786 </xsl:when>
787 <xsl:when test="title">
788 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="title"/>
789 </xsl:when>
790 </xsl:choose>
791
792 <xsl:choose>
793 <xsl:when test="partintroinfo/subtitle">
794 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/subtitle"/>
795 </xsl:when>
796 <xsl:when test="docinfo/subtitle">
797 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
798 </xsl:when>
799 <xsl:when test="info/subtitle">
800 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/subtitle"/>
801 </xsl:when>
802 <xsl:when test="subtitle">
803 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="subtitle"/>
804 </xsl:when>
805 </xsl:choose>
806
807 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/corpauthor"/>
808 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
809 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/corpauthor"/>
810 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/authorgroup"/>
811 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
812 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/authorgroup"/>
813 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/author"/>
814 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/author"/>
815 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/author"/>
816 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/othercredit"/>
817 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
818 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/othercredit"/>
819 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/releaseinfo"/>
820 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
821 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/releaseinfo"/>
822 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/copyright"/>
823 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/copyright"/>
824 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/copyright"/>
825 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/legalnotice"/>
826 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
827 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/legalnotice"/>
828 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/pubdate"/>
829 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
830 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/pubdate"/>
831 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/revision"/>
832 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/revision"/>
833 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/revision"/>
834 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/revhistory"/>
835 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
836 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/revhistory"/>
837 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/abstract"/>
838 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/abstract"/>
839 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/abstract"/>
840</xsl:template>
841
842<xsl:template name="partintro.titlepage.verso">
843</xsl:template>
844
845<xsl:template name="partintro.titlepage.separator">
846</xsl:template>
847
848<xsl:template name="partintro.titlepage.before.recto">
849</xsl:template>
850
851<xsl:template name="partintro.titlepage.before.verso">
852</xsl:template>
853
854<xsl:template name="partintro.titlepage">
855 <div>
856 <xsl:variable name="recto.content">
857 <xsl:call-template name="partintro.titlepage.before.recto"/>
858 <xsl:call-template name="partintro.titlepage.recto"/>
859 </xsl:variable>
860 <xsl:variable name="recto.elements.count">
861 <xsl:choose>
862 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
863 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
864 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
865 <xsl:otherwise>1</xsl:otherwise>
866 </xsl:choose>
867 </xsl:variable>
868 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
869 <div><xsl:copy-of select="$recto.content"/></div>
870 </xsl:if>
871 <xsl:variable name="verso.content">
872 <xsl:call-template name="partintro.titlepage.before.verso"/>
873 <xsl:call-template name="partintro.titlepage.verso"/>
874 </xsl:variable>
875 <xsl:variable name="verso.elements.count">
876 <xsl:choose>
877 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
878 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
879 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
880 <xsl:otherwise>1</xsl:otherwise>
881 </xsl:choose>
882 </xsl:variable>
883 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
884 <div><xsl:copy-of select="$verso.content"/></div>
885 </xsl:if>
886 <xsl:call-template name="partintro.titlepage.separator"/>
887 </div>
888</xsl:template>
889
890<xsl:template match="*" mode="partintro.titlepage.recto.mode">
891 <!-- if an element isn't found in this mode, -->
892 <!-- try the generic titlepage.mode -->
893 <xsl:apply-templates select="." mode="titlepage.mode"/>
894</xsl:template>
895
896<xsl:template match="*" mode="partintro.titlepage.verso.mode">
897 <!-- if an element isn't found in this mode, -->
898 <!-- try the generic titlepage.mode -->
899 <xsl:apply-templates select="." mode="titlepage.mode"/>
900</xsl:template>
901
902<xsl:template match="title" mode="partintro.titlepage.recto.auto.mode">
903<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
904<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
905</div>
906</xsl:template>
907
908<xsl:template match="subtitle" mode="partintro.titlepage.recto.auto.mode">
909<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
910<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
911</div>
912</xsl:template>
913
914<xsl:template match="corpauthor" mode="partintro.titlepage.recto.auto.mode">
915<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
916<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
917</div>
918</xsl:template>
919
920<xsl:template match="authorgroup" mode="partintro.titlepage.recto.auto.mode">
921<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
922<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
923</div>
924</xsl:template>
925
926<xsl:template match="author" mode="partintro.titlepage.recto.auto.mode">
927<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
928<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
929</div>
930</xsl:template>
931
932<xsl:template match="othercredit" mode="partintro.titlepage.recto.auto.mode">
933<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
934<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
935</div>
936</xsl:template>
937
938<xsl:template match="releaseinfo" mode="partintro.titlepage.recto.auto.mode">
939<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
940<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
941</div>
942</xsl:template>
943
944<xsl:template match="copyright" mode="partintro.titlepage.recto.auto.mode">
945<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
946<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
947</div>
948</xsl:template>
949
950<xsl:template match="legalnotice" mode="partintro.titlepage.recto.auto.mode">
951<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
952<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
953</div>
954</xsl:template>
955
956<xsl:template match="pubdate" mode="partintro.titlepage.recto.auto.mode">
957<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
958<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
959</div>
960</xsl:template>
961
962<xsl:template match="revision" mode="partintro.titlepage.recto.auto.mode">
963<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
964<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
965</div>
966</xsl:template>
967
968<xsl:template match="revhistory" mode="partintro.titlepage.recto.auto.mode">
969<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
970<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
971</div>
972</xsl:template>
973
974<xsl:template match="abstract" mode="partintro.titlepage.recto.auto.mode">
975<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
976<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
977</div>
978</xsl:template>
979
980<xsl:template name="reference.titlepage.recto">
981 <xsl:choose>
982 <xsl:when test="referenceinfo/title">
983 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/title"/>
984 </xsl:when>
985 <xsl:when test="docinfo/title">
986 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/title"/>
987 </xsl:when>
988 <xsl:when test="info/title">
989 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/title"/>
990 </xsl:when>
991 <xsl:when test="title">
992 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="title"/>
993 </xsl:when>
994 </xsl:choose>
995
996 <xsl:choose>
997 <xsl:when test="referenceinfo/subtitle">
998 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/subtitle"/>
999 </xsl:when>
1000 <xsl:when test="docinfo/subtitle">
1001 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
1002 </xsl:when>
1003 <xsl:when test="info/subtitle">
1004 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/subtitle"/>
1005 </xsl:when>
1006 <xsl:when test="subtitle">
1007 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="subtitle"/>
1008 </xsl:when>
1009 </xsl:choose>
1010
1011 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/corpauthor"/>
1012 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
1013 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/corpauthor"/>
1014 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/authorgroup"/>
1015 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
1016 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/authorgroup"/>
1017 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/author"/>
1018 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/author"/>
1019 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/author"/>
1020 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/othercredit"/>
1021 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
1022 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/othercredit"/>
1023 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/releaseinfo"/>
1024 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
1025 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/releaseinfo"/>
1026 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/copyright"/>
1027 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/copyright"/>
1028 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/copyright"/>
1029 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/legalnotice"/>
1030 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
1031 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/legalnotice"/>
1032 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/pubdate"/>
1033 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
1034 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/pubdate"/>
1035 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/revision"/>
1036 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/revision"/>
1037 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/revision"/>
1038 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/revhistory"/>
1039 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
1040 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/revhistory"/>
1041 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/abstract"/>
1042 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/abstract"/>
1043 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/abstract"/>
1044</xsl:template>
1045
1046<xsl:template name="reference.titlepage.verso">
1047</xsl:template>
1048
1049<xsl:template name="reference.titlepage.separator"><hr/>
1050</xsl:template>
1051
1052<xsl:template name="reference.titlepage.before.recto">
1053</xsl:template>
1054
1055<xsl:template name="reference.titlepage.before.verso">
1056</xsl:template>
1057
1058<xsl:template name="reference.titlepage">
1059 <div class="titlepage">
1060 <xsl:variable name="recto.content">
1061 <xsl:call-template name="reference.titlepage.before.recto"/>
1062 <xsl:call-template name="reference.titlepage.recto"/>
1063 </xsl:variable>
1064 <xsl:variable name="recto.elements.count">
1065 <xsl:choose>
1066 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1067 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1068 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1069 <xsl:otherwise>1</xsl:otherwise>
1070 </xsl:choose>
1071 </xsl:variable>
1072 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1073 <div><xsl:copy-of select="$recto.content"/></div>
1074 </xsl:if>
1075 <xsl:variable name="verso.content">
1076 <xsl:call-template name="reference.titlepage.before.verso"/>
1077 <xsl:call-template name="reference.titlepage.verso"/>
1078 </xsl:variable>
1079 <xsl:variable name="verso.elements.count">
1080 <xsl:choose>
1081 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1082 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1083 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1084 <xsl:otherwise>1</xsl:otherwise>
1085 </xsl:choose>
1086 </xsl:variable>
1087 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1088 <div><xsl:copy-of select="$verso.content"/></div>
1089 </xsl:if>
1090 <xsl:call-template name="reference.titlepage.separator"/>
1091 </div>
1092</xsl:template>
1093
1094<xsl:template match="*" mode="reference.titlepage.recto.mode">
1095 <!-- if an element isn't found in this mode, -->
1096 <!-- try the generic titlepage.mode -->
1097 <xsl:apply-templates select="." mode="titlepage.mode"/>
1098</xsl:template>
1099
1100<xsl:template match="*" mode="reference.titlepage.verso.mode">
1101 <!-- if an element isn't found in this mode, -->
1102 <!-- try the generic titlepage.mode -->
1103 <xsl:apply-templates select="." mode="titlepage.mode"/>
1104</xsl:template>
1105
1106<xsl:template match="title" mode="reference.titlepage.recto.auto.mode">
1107<div xsl:use-attribute-sets="reference.titlepage.recto.style">
1108<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1109</div>
1110</xsl:template>
1111
1112<xsl:template match="subtitle" mode="reference.titlepage.recto.auto.mode">
1113<div xsl:use-attribute-sets="reference.titlepage.recto.style">
1114<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1115</div>
1116</xsl:template>
1117
1118<xsl:template match="corpauthor" mode="reference.titlepage.recto.auto.mode">
1119<div xsl:use-attribute-sets="reference.titlepage.recto.style">
1120<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1121</div>
1122</xsl:template>
1123
1124<xsl:template match="authorgroup" mode="reference.titlepage.recto.auto.mode">
1125<div xsl:use-attribute-sets="reference.titlepage.recto.style">
1126<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1127</div>
1128</xsl:template>
1129
1130<xsl:template match="author" mode="reference.titlepage.recto.auto.mode">
1131<div xsl:use-attribute-sets="reference.titlepage.recto.style">
1132<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1133</div>
1134</xsl:template>
1135
1136<xsl:template match="othercredit" mode="reference.titlepage.recto.auto.mode">
1137<div xsl:use-attribute-sets="reference.titlepage.recto.style">
1138<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1139</div>
1140</xsl:template>
1141
1142<xsl:template match="releaseinfo" mode="reference.titlepage.recto.auto.mode">
1143<div xsl:use-attribute-sets="reference.titlepage.recto.style">
1144<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1145</div>
1146</xsl:template>
1147
1148<xsl:template match="copyright" mode="reference.titlepage.recto.auto.mode">
1149<div xsl:use-attribute-sets="reference.titlepage.recto.style">
1150<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1151</div>
1152</xsl:template>
1153
1154<xsl:template match="legalnotice" mode="reference.titlepage.recto.auto.mode">
1155<div xsl:use-attribute-sets="reference.titlepage.recto.style">
1156<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1157</div>
1158</xsl:template>
1159
1160<xsl:template match="pubdate" mode="reference.titlepage.recto.auto.mode">
1161<div xsl:use-attribute-sets="reference.titlepage.recto.style">
1162<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1163</div>
1164</xsl:template>
1165
1166<xsl:template match="revision" mode="reference.titlepage.recto.auto.mode">
1167<div xsl:use-attribute-sets="reference.titlepage.recto.style">
1168<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1169</div>
1170</xsl:template>
1171
1172<xsl:template match="revhistory" mode="reference.titlepage.recto.auto.mode">
1173<div xsl:use-attribute-sets="reference.titlepage.recto.style">
1174<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1175</div>
1176</xsl:template>
1177
1178<xsl:template match="abstract" mode="reference.titlepage.recto.auto.mode">
1179<div xsl:use-attribute-sets="reference.titlepage.recto.style">
1180<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1181</div>
1182</xsl:template>
1183
1184<xsl:template name="refentry.titlepage.recto">
1185</xsl:template>
1186
1187<xsl:template name="refentry.titlepage.verso">
1188</xsl:template>
1189
1190<xsl:template name="refentry.titlepage.separator">
1191</xsl:template>
1192
1193<xsl:template name="refentry.titlepage.before.recto">
1194</xsl:template>
1195
1196<xsl:template name="refentry.titlepage.before.verso">
1197</xsl:template>
1198
1199<xsl:template name="refentry.titlepage">
1200 <div class="titlepage">
1201 <xsl:variable name="recto.content">
1202 <xsl:call-template name="refentry.titlepage.before.recto"/>
1203 <xsl:call-template name="refentry.titlepage.recto"/>
1204 </xsl:variable>
1205 <xsl:variable name="recto.elements.count">
1206 <xsl:choose>
1207 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1208 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1209 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1210 <xsl:otherwise>1</xsl:otherwise>
1211 </xsl:choose>
1212 </xsl:variable>
1213 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1214 <div><xsl:copy-of select="$recto.content"/></div>
1215 </xsl:if>
1216 <xsl:variable name="verso.content">
1217 <xsl:call-template name="refentry.titlepage.before.verso"/>
1218 <xsl:call-template name="refentry.titlepage.verso"/>
1219 </xsl:variable>
1220 <xsl:variable name="verso.elements.count">
1221 <xsl:choose>
1222 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1223 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1224 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1225 <xsl:otherwise>1</xsl:otherwise>
1226 </xsl:choose>
1227 </xsl:variable>
1228 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1229 <div><xsl:copy-of select="$verso.content"/></div>
1230 </xsl:if>
1231 <xsl:call-template name="refentry.titlepage.separator"/>
1232 </div>
1233</xsl:template>
1234
1235<xsl:template match="*" mode="refentry.titlepage.recto.mode">
1236 <!-- if an element isn't found in this mode, -->
1237 <!-- try the generic titlepage.mode -->
1238 <xsl:apply-templates select="." mode="titlepage.mode"/>
1239</xsl:template>
1240
1241<xsl:template match="*" mode="refentry.titlepage.verso.mode">
1242 <!-- if an element isn't found in this mode, -->
1243 <!-- try the generic titlepage.mode -->
1244 <xsl:apply-templates select="." mode="titlepage.mode"/>
1245</xsl:template>
1246
1247<xsl:template name="dedication.titlepage.recto">
1248 <div xsl:use-attribute-sets="dedication.titlepage.recto.style">
1249<xsl:call-template name="component.title">
1250<xsl:with-param name="node" select="ancestor-or-self::dedication[1]"/>
1251</xsl:call-template></div>
1252 <xsl:choose>
1253 <xsl:when test="dedicationinfo/subtitle">
1254 <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="dedicationinfo/subtitle"/>
1255 </xsl:when>
1256 <xsl:when test="docinfo/subtitle">
1257 <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
1258 </xsl:when>
1259 <xsl:when test="info/subtitle">
1260 <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="info/subtitle"/>
1261 </xsl:when>
1262 <xsl:when test="subtitle">
1263 <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="subtitle"/>
1264 </xsl:when>
1265 </xsl:choose>
1266
1267</xsl:template>
1268
1269<xsl:template name="dedication.titlepage.verso">
1270</xsl:template>
1271
1272<xsl:template name="dedication.titlepage.separator">
1273</xsl:template>
1274
1275<xsl:template name="dedication.titlepage.before.recto">
1276</xsl:template>
1277
1278<xsl:template name="dedication.titlepage.before.verso">
1279</xsl:template>
1280
1281<xsl:template name="dedication.titlepage">
1282 <div class="titlepage">
1283 <xsl:variable name="recto.content">
1284 <xsl:call-template name="dedication.titlepage.before.recto"/>
1285 <xsl:call-template name="dedication.titlepage.recto"/>
1286 </xsl:variable>
1287 <xsl:variable name="recto.elements.count">
1288 <xsl:choose>
1289 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1290 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1291 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1292 <xsl:otherwise>1</xsl:otherwise>
1293 </xsl:choose>
1294 </xsl:variable>
1295 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1296 <div><xsl:copy-of select="$recto.content"/></div>
1297 </xsl:if>
1298 <xsl:variable name="verso.content">
1299 <xsl:call-template name="dedication.titlepage.before.verso"/>
1300 <xsl:call-template name="dedication.titlepage.verso"/>
1301 </xsl:variable>
1302 <xsl:variable name="verso.elements.count">
1303 <xsl:choose>
1304 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1305 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1306 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1307 <xsl:otherwise>1</xsl:otherwise>
1308 </xsl:choose>
1309 </xsl:variable>
1310 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1311 <div><xsl:copy-of select="$verso.content"/></div>
1312 </xsl:if>
1313 <xsl:call-template name="dedication.titlepage.separator"/>
1314 </div>
1315</xsl:template>
1316
1317<xsl:template match="*" mode="dedication.titlepage.recto.mode">
1318 <!-- if an element isn't found in this mode, -->
1319 <!-- try the generic titlepage.mode -->
1320 <xsl:apply-templates select="." mode="titlepage.mode"/>
1321</xsl:template>
1322
1323<xsl:template match="*" mode="dedication.titlepage.verso.mode">
1324 <!-- if an element isn't found in this mode, -->
1325 <!-- try the generic titlepage.mode -->
1326 <xsl:apply-templates select="." mode="titlepage.mode"/>
1327</xsl:template>
1328
1329<xsl:template match="subtitle" mode="dedication.titlepage.recto.auto.mode">
1330<div xsl:use-attribute-sets="dedication.titlepage.recto.style">
1331<xsl:apply-templates select="." mode="dedication.titlepage.recto.mode"/>
1332</div>
1333</xsl:template>
1334
1335<xsl:template name="acknowledgements.titlepage.recto">
1336 <div xsl:use-attribute-sets="acknowledgements.titlepage.recto.style">
1337<xsl:call-template name="component.title">
1338<xsl:with-param name="node" select="ancestor-or-self::acknowledgements[1]"/>
1339</xsl:call-template></div>
1340 <xsl:choose>
1341 <xsl:when test="acknowledgementsinfo/subtitle">
1342 <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="acknowledgementsinfo/subtitle"/>
1343 </xsl:when>
1344 <xsl:when test="docinfo/subtitle">
1345 <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
1346 </xsl:when>
1347 <xsl:when test="info/subtitle">
1348 <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="info/subtitle"/>
1349 </xsl:when>
1350 <xsl:when test="subtitle">
1351 <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="subtitle"/>
1352 </xsl:when>
1353 </xsl:choose>
1354
1355</xsl:template>
1356
1357<xsl:template name="acknowledgements.titlepage.verso">
1358</xsl:template>
1359
1360<xsl:template name="acknowledgements.titlepage.separator">
1361</xsl:template>
1362
1363<xsl:template name="acknowledgements.titlepage.before.recto">
1364</xsl:template>
1365
1366<xsl:template name="acknowledgements.titlepage.before.verso">
1367</xsl:template>
1368
1369<xsl:template name="acknowledgements.titlepage">
1370 <div class="titlepage">
1371 <xsl:variable name="recto.content">
1372 <xsl:call-template name="acknowledgements.titlepage.before.recto"/>
1373 <xsl:call-template name="acknowledgements.titlepage.recto"/>
1374 </xsl:variable>
1375 <xsl:variable name="recto.elements.count">
1376 <xsl:choose>
1377 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1378 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1379 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1380 <xsl:otherwise>1</xsl:otherwise>
1381 </xsl:choose>
1382 </xsl:variable>
1383 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1384 <div><xsl:copy-of select="$recto.content"/></div>
1385 </xsl:if>
1386 <xsl:variable name="verso.content">
1387 <xsl:call-template name="acknowledgements.titlepage.before.verso"/>
1388 <xsl:call-template name="acknowledgements.titlepage.verso"/>
1389 </xsl:variable>
1390 <xsl:variable name="verso.elements.count">
1391 <xsl:choose>
1392 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1393 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1394 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1395 <xsl:otherwise>1</xsl:otherwise>
1396 </xsl:choose>
1397 </xsl:variable>
1398 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1399 <div><xsl:copy-of select="$verso.content"/></div>
1400 </xsl:if>
1401 <xsl:call-template name="acknowledgements.titlepage.separator"/>
1402 </div>
1403</xsl:template>
1404
1405<xsl:template match="*" mode="acknowledgements.titlepage.recto.mode">
1406 <!-- if an element isn't found in this mode, -->
1407 <!-- try the generic titlepage.mode -->
1408 <xsl:apply-templates select="." mode="titlepage.mode"/>
1409</xsl:template>
1410
1411<xsl:template match="*" mode="acknowledgements.titlepage.verso.mode">
1412 <!-- if an element isn't found in this mode, -->
1413 <!-- try the generic titlepage.mode -->
1414 <xsl:apply-templates select="." mode="titlepage.mode"/>
1415</xsl:template>
1416
1417<xsl:template match="subtitle" mode="acknowledgements.titlepage.recto.auto.mode">
1418<div xsl:use-attribute-sets="acknowledgements.titlepage.recto.style">
1419<xsl:apply-templates select="." mode="acknowledgements.titlepage.recto.mode"/>
1420</div>
1421</xsl:template>
1422
1423<xsl:template name="preface.titlepage.recto">
1424 <xsl:choose>
1425 <xsl:when test="prefaceinfo/title">
1426 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/title"/>
1427 </xsl:when>
1428 <xsl:when test="docinfo/title">
1429 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/title"/>
1430 </xsl:when>
1431 <xsl:when test="info/title">
1432 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/title"/>
1433 </xsl:when>
1434 <xsl:when test="title">
1435 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="title"/>
1436 </xsl:when>
1437 </xsl:choose>
1438
1439 <xsl:choose>
1440 <xsl:when test="prefaceinfo/subtitle">
1441 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/subtitle"/>
1442 </xsl:when>
1443 <xsl:when test="docinfo/subtitle">
1444 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
1445 </xsl:when>
1446 <xsl:when test="info/subtitle">
1447 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/subtitle"/>
1448 </xsl:when>
1449 <xsl:when test="subtitle">
1450 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="subtitle"/>
1451 </xsl:when>
1452 </xsl:choose>
1453
1454 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/corpauthor"/>
1455 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
1456 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/corpauthor"/>
1457 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/authorgroup"/>
1458 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
1459 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/authorgroup"/>
1460 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/author"/>
1461 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/author"/>
1462 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/author"/>
1463 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/othercredit"/>
1464 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
1465 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/othercredit"/>
1466 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/releaseinfo"/>
1467 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
1468 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/releaseinfo"/>
1469 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/copyright"/>
1470 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/copyright"/>
1471 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/copyright"/>
1472 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/legalnotice"/>
1473 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
1474 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/legalnotice"/>
1475 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/pubdate"/>
1476 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
1477 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/pubdate"/>
1478 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/revision"/>
1479 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/revision"/>
1480 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/revision"/>
1481 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/revhistory"/>
1482 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
1483 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/revhistory"/>
1484 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/abstract"/>
1485 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/abstract"/>
1486 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/abstract"/>
1487</xsl:template>
1488
1489<xsl:template name="preface.titlepage.verso">
1490</xsl:template>
1491
1492<xsl:template name="preface.titlepage.separator">
1493</xsl:template>
1494
1495<xsl:template name="preface.titlepage.before.recto">
1496</xsl:template>
1497
1498<xsl:template name="preface.titlepage.before.verso">
1499</xsl:template>
1500
1501<xsl:template name="preface.titlepage">
1502 <div class="titlepage">
1503 <xsl:variable name="recto.content">
1504 <xsl:call-template name="preface.titlepage.before.recto"/>
1505 <xsl:call-template name="preface.titlepage.recto"/>
1506 </xsl:variable>
1507 <xsl:variable name="recto.elements.count">
1508 <xsl:choose>
1509 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1510 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1511 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1512 <xsl:otherwise>1</xsl:otherwise>
1513 </xsl:choose>
1514 </xsl:variable>
1515 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1516 <div><xsl:copy-of select="$recto.content"/></div>
1517 </xsl:if>
1518 <xsl:variable name="verso.content">
1519 <xsl:call-template name="preface.titlepage.before.verso"/>
1520 <xsl:call-template name="preface.titlepage.verso"/>
1521 </xsl:variable>
1522 <xsl:variable name="verso.elements.count">
1523 <xsl:choose>
1524 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1525 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1526 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1527 <xsl:otherwise>1</xsl:otherwise>
1528 </xsl:choose>
1529 </xsl:variable>
1530 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1531 <div><xsl:copy-of select="$verso.content"/></div>
1532 </xsl:if>
1533 <xsl:call-template name="preface.titlepage.separator"/>
1534 </div>
1535</xsl:template>
1536
1537<xsl:template match="*" mode="preface.titlepage.recto.mode">
1538 <!-- if an element isn't found in this mode, -->
1539 <!-- try the generic titlepage.mode -->
1540 <xsl:apply-templates select="." mode="titlepage.mode"/>
1541</xsl:template>
1542
1543<xsl:template match="*" mode="preface.titlepage.verso.mode">
1544 <!-- if an element isn't found in this mode, -->
1545 <!-- try the generic titlepage.mode -->
1546 <xsl:apply-templates select="." mode="titlepage.mode"/>
1547</xsl:template>
1548
1549<xsl:template match="title" mode="preface.titlepage.recto.auto.mode">
1550<div xsl:use-attribute-sets="preface.titlepage.recto.style">
1551<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1552</div>
1553</xsl:template>
1554
1555<xsl:template match="subtitle" mode="preface.titlepage.recto.auto.mode">
1556<div xsl:use-attribute-sets="preface.titlepage.recto.style">
1557<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1558</div>
1559</xsl:template>
1560
1561<xsl:template match="corpauthor" mode="preface.titlepage.recto.auto.mode">
1562<div xsl:use-attribute-sets="preface.titlepage.recto.style">
1563<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1564</div>
1565</xsl:template>
1566
1567<xsl:template match="authorgroup" mode="preface.titlepage.recto.auto.mode">
1568<div xsl:use-attribute-sets="preface.titlepage.recto.style">
1569<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1570</div>
1571</xsl:template>
1572
1573<xsl:template match="author" mode="preface.titlepage.recto.auto.mode">
1574<div xsl:use-attribute-sets="preface.titlepage.recto.style">
1575<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1576</div>
1577</xsl:template>
1578
1579<xsl:template match="othercredit" mode="preface.titlepage.recto.auto.mode">
1580<div xsl:use-attribute-sets="preface.titlepage.recto.style">
1581<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1582</div>
1583</xsl:template>
1584
1585<xsl:template match="releaseinfo" mode="preface.titlepage.recto.auto.mode">
1586<div xsl:use-attribute-sets="preface.titlepage.recto.style">
1587<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1588</div>
1589</xsl:template>
1590
1591<xsl:template match="copyright" mode="preface.titlepage.recto.auto.mode">
1592<div xsl:use-attribute-sets="preface.titlepage.recto.style">
1593<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1594</div>
1595</xsl:template>
1596
1597<xsl:template match="legalnotice" mode="preface.titlepage.recto.auto.mode">
1598<div xsl:use-attribute-sets="preface.titlepage.recto.style">
1599<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1600</div>
1601</xsl:template>
1602
1603<xsl:template match="pubdate" mode="preface.titlepage.recto.auto.mode">
1604<div xsl:use-attribute-sets="preface.titlepage.recto.style">
1605<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1606</div>
1607</xsl:template>
1608
1609<xsl:template match="revision" mode="preface.titlepage.recto.auto.mode">
1610<div xsl:use-attribute-sets="preface.titlepage.recto.style">
1611<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1612</div>
1613</xsl:template>
1614
1615<xsl:template match="revhistory" mode="preface.titlepage.recto.auto.mode">
1616<div xsl:use-attribute-sets="preface.titlepage.recto.style">
1617<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1618</div>
1619</xsl:template>
1620
1621<xsl:template match="abstract" mode="preface.titlepage.recto.auto.mode">
1622<div xsl:use-attribute-sets="preface.titlepage.recto.style">
1623<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1624</div>
1625</xsl:template>
1626
1627<xsl:template name="chapter.titlepage.recto">
1628 <xsl:choose>
1629 <xsl:when test="chapterinfo/title">
1630 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/title"/>
1631 </xsl:when>
1632 <xsl:when test="docinfo/title">
1633 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/title"/>
1634 </xsl:when>
1635 <xsl:when test="info/title">
1636 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/title"/>
1637 </xsl:when>
1638 <xsl:when test="title">
1639 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="title"/>
1640 </xsl:when>
1641 </xsl:choose>
1642
1643 <xsl:choose>
1644 <xsl:when test="chapterinfo/subtitle">
1645 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/subtitle"/>
1646 </xsl:when>
1647 <xsl:when test="docinfo/subtitle">
1648 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
1649 </xsl:when>
1650 <xsl:when test="info/subtitle">
1651 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/subtitle"/>
1652 </xsl:when>
1653 <xsl:when test="subtitle">
1654 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="subtitle"/>
1655 </xsl:when>
1656 </xsl:choose>
1657
1658 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/corpauthor"/>
1659 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
1660 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/corpauthor"/>
1661 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/authorgroup"/>
1662 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
1663 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/authorgroup"/>
1664 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/author"/>
1665 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/author"/>
1666 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/author"/>
1667 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/othercredit"/>
1668 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
1669 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/othercredit"/>
1670 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/releaseinfo"/>
1671 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
1672 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/releaseinfo"/>
1673 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/copyright"/>
1674 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/copyright"/>
1675 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/copyright"/>
1676 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/legalnotice"/>
1677 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
1678 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/legalnotice"/>
1679 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/pubdate"/>
1680 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
1681 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/pubdate"/>
1682 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/revision"/>
1683 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/revision"/>
1684 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/revision"/>
1685 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/revhistory"/>
1686 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
1687 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/revhistory"/>
1688 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/abstract"/>
1689 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/abstract"/>
1690 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/abstract"/>
1691</xsl:template>
1692
1693<xsl:template name="chapter.titlepage.verso">
1694</xsl:template>
1695
1696<xsl:template name="chapter.titlepage.separator">
1697</xsl:template>
1698
1699<xsl:template name="chapter.titlepage.before.recto">
1700</xsl:template>
1701
1702<xsl:template name="chapter.titlepage.before.verso">
1703</xsl:template>
1704
1705<xsl:template name="chapter.titlepage">
1706 <div class="titlepage">
1707 <xsl:variable name="recto.content">
1708 <xsl:call-template name="chapter.titlepage.before.recto"/>
1709 <xsl:call-template name="chapter.titlepage.recto"/>
1710 </xsl:variable>
1711 <xsl:variable name="recto.elements.count">
1712 <xsl:choose>
1713 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1714 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1715 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1716 <xsl:otherwise>1</xsl:otherwise>
1717 </xsl:choose>
1718 </xsl:variable>
1719 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1720 <div><xsl:copy-of select="$recto.content"/></div>
1721 </xsl:if>
1722 <xsl:variable name="verso.content">
1723 <xsl:call-template name="chapter.titlepage.before.verso"/>
1724 <xsl:call-template name="chapter.titlepage.verso"/>
1725 </xsl:variable>
1726 <xsl:variable name="verso.elements.count">
1727 <xsl:choose>
1728 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1729 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1730 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1731 <xsl:otherwise>1</xsl:otherwise>
1732 </xsl:choose>
1733 </xsl:variable>
1734 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1735 <div><xsl:copy-of select="$verso.content"/></div>
1736 </xsl:if>
1737 <xsl:call-template name="chapter.titlepage.separator"/>
1738 </div>
1739</xsl:template>
1740
1741<xsl:template match="*" mode="chapter.titlepage.recto.mode">
1742 <!-- if an element isn't found in this mode, -->
1743 <!-- try the generic titlepage.mode -->
1744 <xsl:apply-templates select="." mode="titlepage.mode"/>
1745</xsl:template>
1746
1747<xsl:template match="*" mode="chapter.titlepage.verso.mode">
1748 <!-- if an element isn't found in this mode, -->
1749 <!-- try the generic titlepage.mode -->
1750 <xsl:apply-templates select="." mode="titlepage.mode"/>
1751</xsl:template>
1752
1753<xsl:template match="title" mode="chapter.titlepage.recto.auto.mode">
1754<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
1755<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
1756</div>
1757</xsl:template>
1758
1759<xsl:template match="subtitle" mode="chapter.titlepage.recto.auto.mode">
1760<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
1761<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
1762</div>
1763</xsl:template>
1764
1765<xsl:template match="corpauthor" mode="chapter.titlepage.recto.auto.mode">
1766<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
1767<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
1768</div>
1769</xsl:template>
1770
1771<xsl:template match="authorgroup" mode="chapter.titlepage.recto.auto.mode">
1772<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
1773<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
1774</div>
1775</xsl:template>
1776
1777<xsl:template match="author" mode="chapter.titlepage.recto.auto.mode">
1778<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
1779<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
1780</div>
1781</xsl:template>
1782
1783<xsl:template match="othercredit" mode="chapter.titlepage.recto.auto.mode">
1784<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
1785<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
1786</div>
1787</xsl:template>
1788
1789<xsl:template match="releaseinfo" mode="chapter.titlepage.recto.auto.mode">
1790<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
1791<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
1792</div>
1793</xsl:template>
1794
1795<xsl:template match="copyright" mode="chapter.titlepage.recto.auto.mode">
1796<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
1797<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
1798</div>
1799</xsl:template>
1800
1801<xsl:template match="legalnotice" mode="chapter.titlepage.recto.auto.mode">
1802<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
1803<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
1804</div>
1805</xsl:template>
1806
1807<xsl:template match="pubdate" mode="chapter.titlepage.recto.auto.mode">
1808<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
1809<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
1810</div>
1811</xsl:template>
1812
1813<xsl:template match="revision" mode="chapter.titlepage.recto.auto.mode">
1814<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
1815<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
1816</div>
1817</xsl:template>
1818
1819<xsl:template match="revhistory" mode="chapter.titlepage.recto.auto.mode">
1820<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
1821<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
1822</div>
1823</xsl:template>
1824
1825<xsl:template match="abstract" mode="chapter.titlepage.recto.auto.mode">
1826<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
1827<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
1828</div>
1829</xsl:template>
1830
1831<xsl:template name="appendix.titlepage.recto">
1832 <xsl:choose>
1833 <xsl:when test="appendixinfo/title">
1834 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/title"/>
1835 </xsl:when>
1836 <xsl:when test="docinfo/title">
1837 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/title"/>
1838 </xsl:when>
1839 <xsl:when test="info/title">
1840 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/title"/>
1841 </xsl:when>
1842 <xsl:when test="title">
1843 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="title"/>
1844 </xsl:when>
1845 </xsl:choose>
1846
1847 <xsl:choose>
1848 <xsl:when test="appendixinfo/subtitle">
1849 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/subtitle"/>
1850 </xsl:when>
1851 <xsl:when test="docinfo/subtitle">
1852 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
1853 </xsl:when>
1854 <xsl:when test="info/subtitle">
1855 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/subtitle"/>
1856 </xsl:when>
1857 <xsl:when test="subtitle">
1858 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="subtitle"/>
1859 </xsl:when>
1860 </xsl:choose>
1861
1862 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/corpauthor"/>
1863 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
1864 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/corpauthor"/>
1865 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/authorgroup"/>
1866 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
1867 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/authorgroup"/>
1868 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/author"/>
1869 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/author"/>
1870 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/author"/>
1871 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/othercredit"/>
1872 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
1873 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/othercredit"/>
1874 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/releaseinfo"/>
1875 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
1876 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/releaseinfo"/>
1877 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/copyright"/>
1878 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/copyright"/>
1879 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/copyright"/>
1880 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/legalnotice"/>
1881 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
1882 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/legalnotice"/>
1883 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/pubdate"/>
1884 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
1885 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/pubdate"/>
1886 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/revision"/>
1887 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/revision"/>
1888 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/revision"/>
1889 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/revhistory"/>
1890 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
1891 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/revhistory"/>
1892 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/abstract"/>
1893 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/abstract"/>
1894 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/abstract"/>
1895</xsl:template>
1896
1897<xsl:template name="appendix.titlepage.verso">
1898</xsl:template>
1899
1900<xsl:template name="appendix.titlepage.separator">
1901</xsl:template>
1902
1903<xsl:template name="appendix.titlepage.before.recto">
1904</xsl:template>
1905
1906<xsl:template name="appendix.titlepage.before.verso">
1907</xsl:template>
1908
1909<xsl:template name="appendix.titlepage">
1910 <div class="titlepage">
1911 <xsl:variable name="recto.content">
1912 <xsl:call-template name="appendix.titlepage.before.recto"/>
1913 <xsl:call-template name="appendix.titlepage.recto"/>
1914 </xsl:variable>
1915 <xsl:variable name="recto.elements.count">
1916 <xsl:choose>
1917 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1918 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1919 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1920 <xsl:otherwise>1</xsl:otherwise>
1921 </xsl:choose>
1922 </xsl:variable>
1923 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1924 <div><xsl:copy-of select="$recto.content"/></div>
1925 </xsl:if>
1926 <xsl:variable name="verso.content">
1927 <xsl:call-template name="appendix.titlepage.before.verso"/>
1928 <xsl:call-template name="appendix.titlepage.verso"/>
1929 </xsl:variable>
1930 <xsl:variable name="verso.elements.count">
1931 <xsl:choose>
1932 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1933 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1934 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1935 <xsl:otherwise>1</xsl:otherwise>
1936 </xsl:choose>
1937 </xsl:variable>
1938 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1939 <div><xsl:copy-of select="$verso.content"/></div>
1940 </xsl:if>
1941 <xsl:call-template name="appendix.titlepage.separator"/>
1942 </div>
1943</xsl:template>
1944
1945<xsl:template match="*" mode="appendix.titlepage.recto.mode">
1946 <!-- if an element isn't found in this mode, -->
1947 <!-- try the generic titlepage.mode -->
1948 <xsl:apply-templates select="." mode="titlepage.mode"/>
1949</xsl:template>
1950
1951<xsl:template match="*" mode="appendix.titlepage.verso.mode">
1952 <!-- if an element isn't found in this mode, -->
1953 <!-- try the generic titlepage.mode -->
1954 <xsl:apply-templates select="." mode="titlepage.mode"/>
1955</xsl:template>
1956
1957<xsl:template match="title" mode="appendix.titlepage.recto.auto.mode">
1958<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
1959<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
1960</div>
1961</xsl:template>
1962
1963<xsl:template match="subtitle" mode="appendix.titlepage.recto.auto.mode">
1964<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
1965<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
1966</div>
1967</xsl:template>
1968
1969<xsl:template match="corpauthor" mode="appendix.titlepage.recto.auto.mode">
1970<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
1971<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
1972</div>
1973</xsl:template>
1974
1975<xsl:template match="authorgroup" mode="appendix.titlepage.recto.auto.mode">
1976<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
1977<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
1978</div>
1979</xsl:template>
1980
1981<xsl:template match="author" mode="appendix.titlepage.recto.auto.mode">
1982<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
1983<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
1984</div>
1985</xsl:template>
1986
1987<xsl:template match="othercredit" mode="appendix.titlepage.recto.auto.mode">
1988<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
1989<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
1990</div>
1991</xsl:template>
1992
1993<xsl:template match="releaseinfo" mode="appendix.titlepage.recto.auto.mode">
1994<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
1995<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
1996</div>
1997</xsl:template>
1998
1999<xsl:template match="copyright" mode="appendix.titlepage.recto.auto.mode">
2000<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
2001<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2002</div>
2003</xsl:template>
2004
2005<xsl:template match="legalnotice" mode="appendix.titlepage.recto.auto.mode">
2006<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
2007<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2008</div>
2009</xsl:template>
2010
2011<xsl:template match="pubdate" mode="appendix.titlepage.recto.auto.mode">
2012<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
2013<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2014</div>
2015</xsl:template>
2016
2017<xsl:template match="revision" mode="appendix.titlepage.recto.auto.mode">
2018<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
2019<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2020</div>
2021</xsl:template>
2022
2023<xsl:template match="revhistory" mode="appendix.titlepage.recto.auto.mode">
2024<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
2025<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2026</div>
2027</xsl:template>
2028
2029<xsl:template match="abstract" mode="appendix.titlepage.recto.auto.mode">
2030<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
2031<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2032</div>
2033</xsl:template>
2034
2035<xsl:template name="section.titlepage.recto">
2036 <xsl:choose>
2037 <xsl:when test="sectioninfo/title">
2038 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/title"/>
2039 </xsl:when>
2040 <xsl:when test="info/title">
2041 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/title"/>
2042 </xsl:when>
2043 <xsl:when test="title">
2044 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="title"/>
2045 </xsl:when>
2046 </xsl:choose>
2047
2048 <xsl:choose>
2049 <xsl:when test="sectioninfo/subtitle">
2050 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/subtitle"/>
2051 </xsl:when>
2052 <xsl:when test="info/subtitle">
2053 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/subtitle"/>
2054 </xsl:when>
2055 <xsl:when test="subtitle">
2056 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="subtitle"/>
2057 </xsl:when>
2058 </xsl:choose>
2059
2060 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/corpauthor"/>
2061 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/corpauthor"/>
2062 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/authorgroup"/>
2063 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/authorgroup"/>
2064 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/author"/>
2065 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/author"/>
2066 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/othercredit"/>
2067 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/othercredit"/>
2068 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/releaseinfo"/>
2069 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/releaseinfo"/>
2070 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/copyright"/>
2071 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/copyright"/>
2072 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/legalnotice"/>
2073 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/legalnotice"/>
2074 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/pubdate"/>
2075 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/pubdate"/>
2076 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/revision"/>
2077 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/revision"/>
2078 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/revhistory"/>
2079 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/revhistory"/>
2080 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/abstract"/>
2081 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/abstract"/>
2082</xsl:template>
2083
2084<xsl:template name="section.titlepage.verso">
2085</xsl:template>
2086
2087<xsl:template name="section.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
2088</xsl:template>
2089
2090<xsl:template name="section.titlepage.before.recto">
2091</xsl:template>
2092
2093<xsl:template name="section.titlepage.before.verso">
2094</xsl:template>
2095
2096<xsl:template name="section.titlepage">
2097 <div class="titlepage">
2098 <xsl:variable name="recto.content">
2099 <xsl:call-template name="section.titlepage.before.recto"/>
2100 <xsl:call-template name="section.titlepage.recto"/>
2101 </xsl:variable>
2102 <xsl:variable name="recto.elements.count">
2103 <xsl:choose>
2104 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2105 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2106 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2107 <xsl:otherwise>1</xsl:otherwise>
2108 </xsl:choose>
2109 </xsl:variable>
2110 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
2111 <div><xsl:copy-of select="$recto.content"/></div>
2112 </xsl:if>
2113 <xsl:variable name="verso.content">
2114 <xsl:call-template name="section.titlepage.before.verso"/>
2115 <xsl:call-template name="section.titlepage.verso"/>
2116 </xsl:variable>
2117 <xsl:variable name="verso.elements.count">
2118 <xsl:choose>
2119 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2120 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2121 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2122 <xsl:otherwise>1</xsl:otherwise>
2123 </xsl:choose>
2124 </xsl:variable>
2125 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
2126 <div><xsl:copy-of select="$verso.content"/></div>
2127 </xsl:if>
2128 <xsl:call-template name="section.titlepage.separator"/>
2129 </div>
2130</xsl:template>
2131
2132<xsl:template match="*" mode="section.titlepage.recto.mode">
2133 <!-- if an element isn't found in this mode, -->
2134 <!-- try the generic titlepage.mode -->
2135 <xsl:apply-templates select="." mode="titlepage.mode"/>
2136</xsl:template>
2137
2138<xsl:template match="*" mode="section.titlepage.verso.mode">
2139 <!-- if an element isn't found in this mode, -->
2140 <!-- try the generic titlepage.mode -->
2141 <xsl:apply-templates select="." mode="titlepage.mode"/>
2142</xsl:template>
2143
2144<xsl:template match="title" mode="section.titlepage.recto.auto.mode">
2145<div xsl:use-attribute-sets="section.titlepage.recto.style">
2146<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2147</div>
2148</xsl:template>
2149
2150<xsl:template match="subtitle" mode="section.titlepage.recto.auto.mode">
2151<div xsl:use-attribute-sets="section.titlepage.recto.style">
2152<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2153</div>
2154</xsl:template>
2155
2156<xsl:template match="corpauthor" mode="section.titlepage.recto.auto.mode">
2157<div xsl:use-attribute-sets="section.titlepage.recto.style">
2158<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2159</div>
2160</xsl:template>
2161
2162<xsl:template match="authorgroup" mode="section.titlepage.recto.auto.mode">
2163<div xsl:use-attribute-sets="section.titlepage.recto.style">
2164<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2165</div>
2166</xsl:template>
2167
2168<xsl:template match="author" mode="section.titlepage.recto.auto.mode">
2169<div xsl:use-attribute-sets="section.titlepage.recto.style">
2170<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2171</div>
2172</xsl:template>
2173
2174<xsl:template match="othercredit" mode="section.titlepage.recto.auto.mode">
2175<div xsl:use-attribute-sets="section.titlepage.recto.style">
2176<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2177</div>
2178</xsl:template>
2179
2180<xsl:template match="releaseinfo" mode="section.titlepage.recto.auto.mode">
2181<div xsl:use-attribute-sets="section.titlepage.recto.style">
2182<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2183</div>
2184</xsl:template>
2185
2186<xsl:template match="copyright" mode="section.titlepage.recto.auto.mode">
2187<div xsl:use-attribute-sets="section.titlepage.recto.style">
2188<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2189</div>
2190</xsl:template>
2191
2192<xsl:template match="legalnotice" mode="section.titlepage.recto.auto.mode">
2193<div xsl:use-attribute-sets="section.titlepage.recto.style">
2194<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2195</div>
2196</xsl:template>
2197
2198<xsl:template match="pubdate" mode="section.titlepage.recto.auto.mode">
2199<div xsl:use-attribute-sets="section.titlepage.recto.style">
2200<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2201</div>
2202</xsl:template>
2203
2204<xsl:template match="revision" mode="section.titlepage.recto.auto.mode">
2205<div xsl:use-attribute-sets="section.titlepage.recto.style">
2206<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2207</div>
2208</xsl:template>
2209
2210<xsl:template match="revhistory" mode="section.titlepage.recto.auto.mode">
2211<div xsl:use-attribute-sets="section.titlepage.recto.style">
2212<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2213</div>
2214</xsl:template>
2215
2216<xsl:template match="abstract" mode="section.titlepage.recto.auto.mode">
2217<div xsl:use-attribute-sets="section.titlepage.recto.style">
2218<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2219</div>
2220</xsl:template>
2221
2222<xsl:template name="sect1.titlepage.recto">
2223 <xsl:choose>
2224 <xsl:when test="sect1info/title">
2225 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/title"/>
2226 </xsl:when>
2227 <xsl:when test="info/title">
2228 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/title"/>
2229 </xsl:when>
2230 <xsl:when test="title">
2231 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="title"/>
2232 </xsl:when>
2233 </xsl:choose>
2234
2235 <xsl:choose>
2236 <xsl:when test="sect1info/subtitle">
2237 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/subtitle"/>
2238 </xsl:when>
2239 <xsl:when test="info/subtitle">
2240 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/subtitle"/>
2241 </xsl:when>
2242 <xsl:when test="subtitle">
2243 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="subtitle"/>
2244 </xsl:when>
2245 </xsl:choose>
2246
2247 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/corpauthor"/>
2248 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/corpauthor"/>
2249 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/authorgroup"/>
2250 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/authorgroup"/>
2251 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/author"/>
2252 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/author"/>
2253 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/othercredit"/>
2254 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/othercredit"/>
2255 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/releaseinfo"/>
2256 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/releaseinfo"/>
2257 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/copyright"/>
2258 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/copyright"/>
2259 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/legalnotice"/>
2260 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/legalnotice"/>
2261 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/pubdate"/>
2262 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/pubdate"/>
2263 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/revision"/>
2264 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/revision"/>
2265 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/revhistory"/>
2266 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/revhistory"/>
2267 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/abstract"/>
2268 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/abstract"/>
2269</xsl:template>
2270
2271<xsl:template name="sect1.titlepage.verso">
2272</xsl:template>
2273
2274<xsl:template name="sect1.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
2275</xsl:template>
2276
2277<xsl:template name="sect1.titlepage.before.recto">
2278</xsl:template>
2279
2280<xsl:template name="sect1.titlepage.before.verso">
2281</xsl:template>
2282
2283<xsl:template name="sect1.titlepage">
2284 <div class="titlepage">
2285 <xsl:variable name="recto.content">
2286 <xsl:call-template name="sect1.titlepage.before.recto"/>
2287 <xsl:call-template name="sect1.titlepage.recto"/>
2288 </xsl:variable>
2289 <xsl:variable name="recto.elements.count">
2290 <xsl:choose>
2291 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2292 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2293 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2294 <xsl:otherwise>1</xsl:otherwise>
2295 </xsl:choose>
2296 </xsl:variable>
2297 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
2298 <div><xsl:copy-of select="$recto.content"/></div>
2299 </xsl:if>
2300 <xsl:variable name="verso.content">
2301 <xsl:call-template name="sect1.titlepage.before.verso"/>
2302 <xsl:call-template name="sect1.titlepage.verso"/>
2303 </xsl:variable>
2304 <xsl:variable name="verso.elements.count">
2305 <xsl:choose>
2306 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2307 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2308 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2309 <xsl:otherwise>1</xsl:otherwise>
2310 </xsl:choose>
2311 </xsl:variable>
2312 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
2313 <div><xsl:copy-of select="$verso.content"/></div>
2314 </xsl:if>
2315 <xsl:call-template name="sect1.titlepage.separator"/>
2316 </div>
2317</xsl:template>
2318
2319<xsl:template match="*" mode="sect1.titlepage.recto.mode">
2320 <!-- if an element isn't found in this mode, -->
2321 <!-- try the generic titlepage.mode -->
2322 <xsl:apply-templates select="." mode="titlepage.mode"/>
2323</xsl:template>
2324
2325<xsl:template match="*" mode="sect1.titlepage.verso.mode">
2326 <!-- if an element isn't found in this mode, -->
2327 <!-- try the generic titlepage.mode -->
2328 <xsl:apply-templates select="." mode="titlepage.mode"/>
2329</xsl:template>
2330
2331<xsl:template match="title" mode="sect1.titlepage.recto.auto.mode">
2332<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
2333<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2334</div>
2335</xsl:template>
2336
2337<xsl:template match="subtitle" mode="sect1.titlepage.recto.auto.mode">
2338<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
2339<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2340</div>
2341</xsl:template>
2342
2343<xsl:template match="corpauthor" mode="sect1.titlepage.recto.auto.mode">
2344<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
2345<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2346</div>
2347</xsl:template>
2348
2349<xsl:template match="authorgroup" mode="sect1.titlepage.recto.auto.mode">
2350<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
2351<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2352</div>
2353</xsl:template>
2354
2355<xsl:template match="author" mode="sect1.titlepage.recto.auto.mode">
2356<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
2357<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2358</div>
2359</xsl:template>
2360
2361<xsl:template match="othercredit" mode="sect1.titlepage.recto.auto.mode">
2362<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
2363<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2364</div>
2365</xsl:template>
2366
2367<xsl:template match="releaseinfo" mode="sect1.titlepage.recto.auto.mode">
2368<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
2369<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2370</div>
2371</xsl:template>
2372
2373<xsl:template match="copyright" mode="sect1.titlepage.recto.auto.mode">
2374<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
2375<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2376</div>
2377</xsl:template>
2378
2379<xsl:template match="legalnotice" mode="sect1.titlepage.recto.auto.mode">
2380<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
2381<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2382</div>
2383</xsl:template>
2384
2385<xsl:template match="pubdate" mode="sect1.titlepage.recto.auto.mode">
2386<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
2387<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2388</div>
2389</xsl:template>
2390
2391<xsl:template match="revision" mode="sect1.titlepage.recto.auto.mode">
2392<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
2393<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2394</div>
2395</xsl:template>
2396
2397<xsl:template match="revhistory" mode="sect1.titlepage.recto.auto.mode">
2398<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
2399<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2400</div>
2401</xsl:template>
2402
2403<xsl:template match="abstract" mode="sect1.titlepage.recto.auto.mode">
2404<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
2405<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2406</div>
2407</xsl:template>
2408
2409<xsl:template name="sect2.titlepage.recto">
2410 <xsl:choose>
2411 <xsl:when test="sect2info/title">
2412 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/title"/>
2413 </xsl:when>
2414 <xsl:when test="info/title">
2415 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/title"/>
2416 </xsl:when>
2417 <xsl:when test="title">
2418 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="title"/>
2419 </xsl:when>
2420 </xsl:choose>
2421
2422 <xsl:choose>
2423 <xsl:when test="sect2info/subtitle">
2424 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/subtitle"/>
2425 </xsl:when>
2426 <xsl:when test="info/subtitle">
2427 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/subtitle"/>
2428 </xsl:when>
2429 <xsl:when test="subtitle">
2430 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="subtitle"/>
2431 </xsl:when>
2432 </xsl:choose>
2433
2434 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/corpauthor"/>
2435 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/corpauthor"/>
2436 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/authorgroup"/>
2437 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/authorgroup"/>
2438 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/author"/>
2439 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/author"/>
2440 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/othercredit"/>
2441 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/othercredit"/>
2442 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/releaseinfo"/>
2443 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/releaseinfo"/>
2444 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/copyright"/>
2445 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/copyright"/>
2446 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/legalnotice"/>
2447 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/legalnotice"/>
2448 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/pubdate"/>
2449 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/pubdate"/>
2450 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/revision"/>
2451 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/revision"/>
2452 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/revhistory"/>
2453 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/revhistory"/>
2454 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/abstract"/>
2455 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/abstract"/>
2456</xsl:template>
2457
2458<xsl:template name="sect2.titlepage.verso">
2459</xsl:template>
2460
2461<xsl:template name="sect2.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
2462</xsl:template>
2463
2464<xsl:template name="sect2.titlepage.before.recto">
2465</xsl:template>
2466
2467<xsl:template name="sect2.titlepage.before.verso">
2468</xsl:template>
2469
2470<xsl:template name="sect2.titlepage">
2471 <div class="titlepage">
2472 <xsl:variable name="recto.content">
2473 <xsl:call-template name="sect2.titlepage.before.recto"/>
2474 <xsl:call-template name="sect2.titlepage.recto"/>
2475 </xsl:variable>
2476 <xsl:variable name="recto.elements.count">
2477 <xsl:choose>
2478 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2479 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2480 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2481 <xsl:otherwise>1</xsl:otherwise>
2482 </xsl:choose>
2483 </xsl:variable>
2484 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
2485 <div><xsl:copy-of select="$recto.content"/></div>
2486 </xsl:if>
2487 <xsl:variable name="verso.content">
2488 <xsl:call-template name="sect2.titlepage.before.verso"/>
2489 <xsl:call-template name="sect2.titlepage.verso"/>
2490 </xsl:variable>
2491 <xsl:variable name="verso.elements.count">
2492 <xsl:choose>
2493 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2494 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2495 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2496 <xsl:otherwise>1</xsl:otherwise>
2497 </xsl:choose>
2498 </xsl:variable>
2499 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
2500 <div><xsl:copy-of select="$verso.content"/></div>
2501 </xsl:if>
2502 <xsl:call-template name="sect2.titlepage.separator"/>
2503 </div>
2504</xsl:template>
2505
2506<xsl:template match="*" mode="sect2.titlepage.recto.mode">
2507 <!-- if an element isn't found in this mode, -->
2508 <!-- try the generic titlepage.mode -->
2509 <xsl:apply-templates select="." mode="titlepage.mode"/>
2510</xsl:template>
2511
2512<xsl:template match="*" mode="sect2.titlepage.verso.mode">
2513 <!-- if an element isn't found in this mode, -->
2514 <!-- try the generic titlepage.mode -->
2515 <xsl:apply-templates select="." mode="titlepage.mode"/>
2516</xsl:template>
2517
2518<xsl:template match="title" mode="sect2.titlepage.recto.auto.mode">
2519<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
2520<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2521</div>
2522</xsl:template>
2523
2524<xsl:template match="subtitle" mode="sect2.titlepage.recto.auto.mode">
2525<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
2526<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2527</div>
2528</xsl:template>
2529
2530<xsl:template match="corpauthor" mode="sect2.titlepage.recto.auto.mode">
2531<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
2532<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2533</div>
2534</xsl:template>
2535
2536<xsl:template match="authorgroup" mode="sect2.titlepage.recto.auto.mode">
2537<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
2538<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2539</div>
2540</xsl:template>
2541
2542<xsl:template match="author" mode="sect2.titlepage.recto.auto.mode">
2543<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
2544<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2545</div>
2546</xsl:template>
2547
2548<xsl:template match="othercredit" mode="sect2.titlepage.recto.auto.mode">
2549<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
2550<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2551</div>
2552</xsl:template>
2553
2554<xsl:template match="releaseinfo" mode="sect2.titlepage.recto.auto.mode">
2555<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
2556<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2557</div>
2558</xsl:template>
2559
2560<xsl:template match="copyright" mode="sect2.titlepage.recto.auto.mode">
2561<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
2562<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2563</div>
2564</xsl:template>
2565
2566<xsl:template match="legalnotice" mode="sect2.titlepage.recto.auto.mode">
2567<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
2568<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2569</div>
2570</xsl:template>
2571
2572<xsl:template match="pubdate" mode="sect2.titlepage.recto.auto.mode">
2573<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
2574<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2575</div>
2576</xsl:template>
2577
2578<xsl:template match="revision" mode="sect2.titlepage.recto.auto.mode">
2579<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
2580<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2581</div>
2582</xsl:template>
2583
2584<xsl:template match="revhistory" mode="sect2.titlepage.recto.auto.mode">
2585<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
2586<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2587</div>
2588</xsl:template>
2589
2590<xsl:template match="abstract" mode="sect2.titlepage.recto.auto.mode">
2591<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
2592<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2593</div>
2594</xsl:template>
2595
2596<xsl:template name="sect3.titlepage.recto">
2597 <xsl:choose>
2598 <xsl:when test="sect3info/title">
2599 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/title"/>
2600 </xsl:when>
2601 <xsl:when test="info/title">
2602 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/title"/>
2603 </xsl:when>
2604 <xsl:when test="title">
2605 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="title"/>
2606 </xsl:when>
2607 </xsl:choose>
2608
2609 <xsl:choose>
2610 <xsl:when test="sect3info/subtitle">
2611 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/subtitle"/>
2612 </xsl:when>
2613 <xsl:when test="info/subtitle">
2614 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/subtitle"/>
2615 </xsl:when>
2616 <xsl:when test="subtitle">
2617 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="subtitle"/>
2618 </xsl:when>
2619 </xsl:choose>
2620
2621 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/corpauthor"/>
2622 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/corpauthor"/>
2623 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/authorgroup"/>
2624 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/authorgroup"/>
2625 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/author"/>
2626 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/author"/>
2627 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/othercredit"/>
2628 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/othercredit"/>
2629 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/releaseinfo"/>
2630 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/releaseinfo"/>
2631 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/copyright"/>
2632 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/copyright"/>
2633 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/legalnotice"/>
2634 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/legalnotice"/>
2635 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/pubdate"/>
2636 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/pubdate"/>
2637 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/revision"/>
2638 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/revision"/>
2639 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/revhistory"/>
2640 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/revhistory"/>
2641 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/abstract"/>
2642 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/abstract"/>
2643</xsl:template>
2644
2645<xsl:template name="sect3.titlepage.verso">
2646</xsl:template>
2647
2648<xsl:template name="sect3.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
2649</xsl:template>
2650
2651<xsl:template name="sect3.titlepage.before.recto">
2652</xsl:template>
2653
2654<xsl:template name="sect3.titlepage.before.verso">
2655</xsl:template>
2656
2657<xsl:template name="sect3.titlepage">
2658 <div class="titlepage">
2659 <xsl:variable name="recto.content">
2660 <xsl:call-template name="sect3.titlepage.before.recto"/>
2661 <xsl:call-template name="sect3.titlepage.recto"/>
2662 </xsl:variable>
2663 <xsl:variable name="recto.elements.count">
2664 <xsl:choose>
2665 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2666 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2667 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2668 <xsl:otherwise>1</xsl:otherwise>
2669 </xsl:choose>
2670 </xsl:variable>
2671 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
2672 <div><xsl:copy-of select="$recto.content"/></div>
2673 </xsl:if>
2674 <xsl:variable name="verso.content">
2675 <xsl:call-template name="sect3.titlepage.before.verso"/>
2676 <xsl:call-template name="sect3.titlepage.verso"/>
2677 </xsl:variable>
2678 <xsl:variable name="verso.elements.count">
2679 <xsl:choose>
2680 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2681 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2682 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2683 <xsl:otherwise>1</xsl:otherwise>
2684 </xsl:choose>
2685 </xsl:variable>
2686 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
2687 <div><xsl:copy-of select="$verso.content"/></div>
2688 </xsl:if>
2689 <xsl:call-template name="sect3.titlepage.separator"/>
2690 </div>
2691</xsl:template>
2692
2693<xsl:template match="*" mode="sect3.titlepage.recto.mode">
2694 <!-- if an element isn't found in this mode, -->
2695 <!-- try the generic titlepage.mode -->
2696 <xsl:apply-templates select="." mode="titlepage.mode"/>
2697</xsl:template>
2698
2699<xsl:template match="*" mode="sect3.titlepage.verso.mode">
2700 <!-- if an element isn't found in this mode, -->
2701 <!-- try the generic titlepage.mode -->
2702 <xsl:apply-templates select="." mode="titlepage.mode"/>
2703</xsl:template>
2704
2705<xsl:template match="title" mode="sect3.titlepage.recto.auto.mode">
2706<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
2707<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2708</div>
2709</xsl:template>
2710
2711<xsl:template match="subtitle" mode="sect3.titlepage.recto.auto.mode">
2712<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
2713<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2714</div>
2715</xsl:template>
2716
2717<xsl:template match="corpauthor" mode="sect3.titlepage.recto.auto.mode">
2718<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
2719<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2720</div>
2721</xsl:template>
2722
2723<xsl:template match="authorgroup" mode="sect3.titlepage.recto.auto.mode">
2724<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
2725<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2726</div>
2727</xsl:template>
2728
2729<xsl:template match="author" mode="sect3.titlepage.recto.auto.mode">
2730<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
2731<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2732</div>
2733</xsl:template>
2734
2735<xsl:template match="othercredit" mode="sect3.titlepage.recto.auto.mode">
2736<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
2737<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2738</div>
2739</xsl:template>
2740
2741<xsl:template match="releaseinfo" mode="sect3.titlepage.recto.auto.mode">
2742<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
2743<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2744</div>
2745</xsl:template>
2746
2747<xsl:template match="copyright" mode="sect3.titlepage.recto.auto.mode">
2748<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
2749<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2750</div>
2751</xsl:template>
2752
2753<xsl:template match="legalnotice" mode="sect3.titlepage.recto.auto.mode">
2754<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
2755<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2756</div>
2757</xsl:template>
2758
2759<xsl:template match="pubdate" mode="sect3.titlepage.recto.auto.mode">
2760<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
2761<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2762</div>
2763</xsl:template>
2764
2765<xsl:template match="revision" mode="sect3.titlepage.recto.auto.mode">
2766<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
2767<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2768</div>
2769</xsl:template>
2770
2771<xsl:template match="revhistory" mode="sect3.titlepage.recto.auto.mode">
2772<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
2773<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2774</div>
2775</xsl:template>
2776
2777<xsl:template match="abstract" mode="sect3.titlepage.recto.auto.mode">
2778<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
2779<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2780</div>
2781</xsl:template>
2782
2783<xsl:template name="sect4.titlepage.recto">
2784 <xsl:choose>
2785 <xsl:when test="sect4info/title">
2786 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/title"/>
2787 </xsl:when>
2788 <xsl:when test="info/title">
2789 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/title"/>
2790 </xsl:when>
2791 <xsl:when test="title">
2792 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="title"/>
2793 </xsl:when>
2794 </xsl:choose>
2795
2796 <xsl:choose>
2797 <xsl:when test="sect4info/subtitle">
2798 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/subtitle"/>
2799 </xsl:when>
2800 <xsl:when test="info/subtitle">
2801 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/subtitle"/>
2802 </xsl:when>
2803 <xsl:when test="subtitle">
2804 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="subtitle"/>
2805 </xsl:when>
2806 </xsl:choose>
2807
2808 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/corpauthor"/>
2809 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/corpauthor"/>
2810 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/authorgroup"/>
2811 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/authorgroup"/>
2812 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/author"/>
2813 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/author"/>
2814 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/othercredit"/>
2815 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/othercredit"/>
2816 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/releaseinfo"/>
2817 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/releaseinfo"/>
2818 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/copyright"/>
2819 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/copyright"/>
2820 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/legalnotice"/>
2821 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/legalnotice"/>
2822 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/pubdate"/>
2823 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/pubdate"/>
2824 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/revision"/>
2825 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/revision"/>
2826 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/revhistory"/>
2827 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/revhistory"/>
2828 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/abstract"/>
2829 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/abstract"/>
2830</xsl:template>
2831
2832<xsl:template name="sect4.titlepage.verso">
2833</xsl:template>
2834
2835<xsl:template name="sect4.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
2836</xsl:template>
2837
2838<xsl:template name="sect4.titlepage.before.recto">
2839</xsl:template>
2840
2841<xsl:template name="sect4.titlepage.before.verso">
2842</xsl:template>
2843
2844<xsl:template name="sect4.titlepage">
2845 <div class="titlepage">
2846 <xsl:variable name="recto.content">
2847 <xsl:call-template name="sect4.titlepage.before.recto"/>
2848 <xsl:call-template name="sect4.titlepage.recto"/>
2849 </xsl:variable>
2850 <xsl:variable name="recto.elements.count">
2851 <xsl:choose>
2852 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2853 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2854 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2855 <xsl:otherwise>1</xsl:otherwise>
2856 </xsl:choose>
2857 </xsl:variable>
2858 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
2859 <div><xsl:copy-of select="$recto.content"/></div>
2860 </xsl:if>
2861 <xsl:variable name="verso.content">
2862 <xsl:call-template name="sect4.titlepage.before.verso"/>
2863 <xsl:call-template name="sect4.titlepage.verso"/>
2864 </xsl:variable>
2865 <xsl:variable name="verso.elements.count">
2866 <xsl:choose>
2867 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2868 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2869 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2870 <xsl:otherwise>1</xsl:otherwise>
2871 </xsl:choose>
2872 </xsl:variable>
2873 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
2874 <div><xsl:copy-of select="$verso.content"/></div>
2875 </xsl:if>
2876 <xsl:call-template name="sect4.titlepage.separator"/>
2877 </div>
2878</xsl:template>
2879
2880<xsl:template match="*" mode="sect4.titlepage.recto.mode">
2881 <!-- if an element isn't found in this mode, -->
2882 <!-- try the generic titlepage.mode -->
2883 <xsl:apply-templates select="." mode="titlepage.mode"/>
2884</xsl:template>
2885
2886<xsl:template match="*" mode="sect4.titlepage.verso.mode">
2887 <!-- if an element isn't found in this mode, -->
2888 <!-- try the generic titlepage.mode -->
2889 <xsl:apply-templates select="." mode="titlepage.mode"/>
2890</xsl:template>
2891
2892<xsl:template match="title" mode="sect4.titlepage.recto.auto.mode">
2893<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
2894<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
2895</div>
2896</xsl:template>
2897
2898<xsl:template match="subtitle" mode="sect4.titlepage.recto.auto.mode">
2899<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
2900<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
2901</div>
2902</xsl:template>
2903
2904<xsl:template match="corpauthor" mode="sect4.titlepage.recto.auto.mode">
2905<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
2906<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
2907</div>
2908</xsl:template>
2909
2910<xsl:template match="authorgroup" mode="sect4.titlepage.recto.auto.mode">
2911<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
2912<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
2913</div>
2914</xsl:template>
2915
2916<xsl:template match="author" mode="sect4.titlepage.recto.auto.mode">
2917<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
2918<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
2919</div>
2920</xsl:template>
2921
2922<xsl:template match="othercredit" mode="sect4.titlepage.recto.auto.mode">
2923<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
2924<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
2925</div>
2926</xsl:template>
2927
2928<xsl:template match="releaseinfo" mode="sect4.titlepage.recto.auto.mode">
2929<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
2930<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
2931</div>
2932</xsl:template>
2933
2934<xsl:template match="copyright" mode="sect4.titlepage.recto.auto.mode">
2935<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
2936<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
2937</div>
2938</xsl:template>
2939
2940<xsl:template match="legalnotice" mode="sect4.titlepage.recto.auto.mode">
2941<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
2942<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
2943</div>
2944</xsl:template>
2945
2946<xsl:template match="pubdate" mode="sect4.titlepage.recto.auto.mode">
2947<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
2948<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
2949</div>
2950</xsl:template>
2951
2952<xsl:template match="revision" mode="sect4.titlepage.recto.auto.mode">
2953<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
2954<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
2955</div>
2956</xsl:template>
2957
2958<xsl:template match="revhistory" mode="sect4.titlepage.recto.auto.mode">
2959<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
2960<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
2961</div>
2962</xsl:template>
2963
2964<xsl:template match="abstract" mode="sect4.titlepage.recto.auto.mode">
2965<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
2966<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
2967</div>
2968</xsl:template>
2969
2970<xsl:template name="sect5.titlepage.recto">
2971 <xsl:choose>
2972 <xsl:when test="sect5info/title">
2973 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/title"/>
2974 </xsl:when>
2975 <xsl:when test="info/title">
2976 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/title"/>
2977 </xsl:when>
2978 <xsl:when test="title">
2979 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="title"/>
2980 </xsl:when>
2981 </xsl:choose>
2982
2983 <xsl:choose>
2984 <xsl:when test="sect5info/subtitle">
2985 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/subtitle"/>
2986 </xsl:when>
2987 <xsl:when test="info/subtitle">
2988 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/subtitle"/>
2989 </xsl:when>
2990 <xsl:when test="subtitle">
2991 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="subtitle"/>
2992 </xsl:when>
2993 </xsl:choose>
2994
2995 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/corpauthor"/>
2996 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/corpauthor"/>
2997 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/authorgroup"/>
2998 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/authorgroup"/>
2999 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/author"/>
3000 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/author"/>
3001 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/othercredit"/>
3002 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/othercredit"/>
3003 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/releaseinfo"/>
3004 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/releaseinfo"/>
3005 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/copyright"/>
3006 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/copyright"/>
3007 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/legalnotice"/>
3008 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/legalnotice"/>
3009 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/pubdate"/>
3010 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/pubdate"/>
3011 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/revision"/>
3012 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/revision"/>
3013 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/revhistory"/>
3014 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/revhistory"/>
3015 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/abstract"/>
3016 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/abstract"/>
3017</xsl:template>
3018
3019<xsl:template name="sect5.titlepage.verso">
3020</xsl:template>
3021
3022<xsl:template name="sect5.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
3023</xsl:template>
3024
3025<xsl:template name="sect5.titlepage.before.recto">
3026</xsl:template>
3027
3028<xsl:template name="sect5.titlepage.before.verso">
3029</xsl:template>
3030
3031<xsl:template name="sect5.titlepage">
3032 <div class="titlepage">
3033 <xsl:variable name="recto.content">
3034 <xsl:call-template name="sect5.titlepage.before.recto"/>
3035 <xsl:call-template name="sect5.titlepage.recto"/>
3036 </xsl:variable>
3037 <xsl:variable name="recto.elements.count">
3038 <xsl:choose>
3039 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3040 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3041 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3042 <xsl:otherwise>1</xsl:otherwise>
3043 </xsl:choose>
3044 </xsl:variable>
3045 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3046 <div><xsl:copy-of select="$recto.content"/></div>
3047 </xsl:if>
3048 <xsl:variable name="verso.content">
3049 <xsl:call-template name="sect5.titlepage.before.verso"/>
3050 <xsl:call-template name="sect5.titlepage.verso"/>
3051 </xsl:variable>
3052 <xsl:variable name="verso.elements.count">
3053 <xsl:choose>
3054 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3055 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3056 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3057 <xsl:otherwise>1</xsl:otherwise>
3058 </xsl:choose>
3059 </xsl:variable>
3060 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3061 <div><xsl:copy-of select="$verso.content"/></div>
3062 </xsl:if>
3063 <xsl:call-template name="sect5.titlepage.separator"/>
3064 </div>
3065</xsl:template>
3066
3067<xsl:template match="*" mode="sect5.titlepage.recto.mode">
3068 <!-- if an element isn't found in this mode, -->
3069 <!-- try the generic titlepage.mode -->
3070 <xsl:apply-templates select="." mode="titlepage.mode"/>
3071</xsl:template>
3072
3073<xsl:template match="*" mode="sect5.titlepage.verso.mode">
3074 <!-- if an element isn't found in this mode, -->
3075 <!-- try the generic titlepage.mode -->
3076 <xsl:apply-templates select="." mode="titlepage.mode"/>
3077</xsl:template>
3078
3079<xsl:template match="title" mode="sect5.titlepage.recto.auto.mode">
3080<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
3081<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3082</div>
3083</xsl:template>
3084
3085<xsl:template match="subtitle" mode="sect5.titlepage.recto.auto.mode">
3086<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
3087<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3088</div>
3089</xsl:template>
3090
3091<xsl:template match="corpauthor" mode="sect5.titlepage.recto.auto.mode">
3092<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
3093<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3094</div>
3095</xsl:template>
3096
3097<xsl:template match="authorgroup" mode="sect5.titlepage.recto.auto.mode">
3098<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
3099<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3100</div>
3101</xsl:template>
3102
3103<xsl:template match="author" mode="sect5.titlepage.recto.auto.mode">
3104<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
3105<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3106</div>
3107</xsl:template>
3108
3109<xsl:template match="othercredit" mode="sect5.titlepage.recto.auto.mode">
3110<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
3111<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3112</div>
3113</xsl:template>
3114
3115<xsl:template match="releaseinfo" mode="sect5.titlepage.recto.auto.mode">
3116<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
3117<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3118</div>
3119</xsl:template>
3120
3121<xsl:template match="copyright" mode="sect5.titlepage.recto.auto.mode">
3122<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
3123<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3124</div>
3125</xsl:template>
3126
3127<xsl:template match="legalnotice" mode="sect5.titlepage.recto.auto.mode">
3128<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
3129<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3130</div>
3131</xsl:template>
3132
3133<xsl:template match="pubdate" mode="sect5.titlepage.recto.auto.mode">
3134<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
3135<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3136</div>
3137</xsl:template>
3138
3139<xsl:template match="revision" mode="sect5.titlepage.recto.auto.mode">
3140<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
3141<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3142</div>
3143</xsl:template>
3144
3145<xsl:template match="revhistory" mode="sect5.titlepage.recto.auto.mode">
3146<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
3147<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3148</div>
3149</xsl:template>
3150
3151<xsl:template match="abstract" mode="sect5.titlepage.recto.auto.mode">
3152<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
3153<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3154</div>
3155</xsl:template>
3156
3157<xsl:template name="simplesect.titlepage.recto">
3158 <xsl:choose>
3159 <xsl:when test="simplesectinfo/title">
3160 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/title"/>
3161 </xsl:when>
3162 <xsl:when test="docinfo/title">
3163 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/title"/>
3164 </xsl:when>
3165 <xsl:when test="info/title">
3166 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/title"/>
3167 </xsl:when>
3168 <xsl:when test="title">
3169 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="title"/>
3170 </xsl:when>
3171 </xsl:choose>
3172
3173 <xsl:choose>
3174 <xsl:when test="simplesectinfo/subtitle">
3175 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/subtitle"/>
3176 </xsl:when>
3177 <xsl:when test="docinfo/subtitle">
3178 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
3179 </xsl:when>
3180 <xsl:when test="info/subtitle">
3181 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/subtitle"/>
3182 </xsl:when>
3183 <xsl:when test="subtitle">
3184 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="subtitle"/>
3185 </xsl:when>
3186 </xsl:choose>
3187
3188 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/corpauthor"/>
3189 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
3190 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/corpauthor"/>
3191 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/authorgroup"/>
3192 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
3193 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/authorgroup"/>
3194 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/author"/>
3195 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/author"/>
3196 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/author"/>
3197 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/othercredit"/>
3198 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
3199 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/othercredit"/>
3200 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/releaseinfo"/>
3201 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
3202 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/releaseinfo"/>
3203 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/copyright"/>
3204 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/copyright"/>
3205 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/copyright"/>
3206 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/legalnotice"/>
3207 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
3208 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/legalnotice"/>
3209 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/pubdate"/>
3210 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
3211 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/pubdate"/>
3212 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/revision"/>
3213 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/revision"/>
3214 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/revision"/>
3215 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/revhistory"/>
3216 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
3217 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/revhistory"/>
3218 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/abstract"/>
3219 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/abstract"/>
3220 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/abstract"/>
3221</xsl:template>
3222
3223<xsl:template name="simplesect.titlepage.verso">
3224</xsl:template>
3225
3226<xsl:template name="simplesect.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
3227</xsl:template>
3228
3229<xsl:template name="simplesect.titlepage.before.recto">
3230</xsl:template>
3231
3232<xsl:template name="simplesect.titlepage.before.verso">
3233</xsl:template>
3234
3235<xsl:template name="simplesect.titlepage">
3236 <div class="titlepage">
3237 <xsl:variable name="recto.content">
3238 <xsl:call-template name="simplesect.titlepage.before.recto"/>
3239 <xsl:call-template name="simplesect.titlepage.recto"/>
3240 </xsl:variable>
3241 <xsl:variable name="recto.elements.count">
3242 <xsl:choose>
3243 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3244 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3245 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3246 <xsl:otherwise>1</xsl:otherwise>
3247 </xsl:choose>
3248 </xsl:variable>
3249 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3250 <div><xsl:copy-of select="$recto.content"/></div>
3251 </xsl:if>
3252 <xsl:variable name="verso.content">
3253 <xsl:call-template name="simplesect.titlepage.before.verso"/>
3254 <xsl:call-template name="simplesect.titlepage.verso"/>
3255 </xsl:variable>
3256 <xsl:variable name="verso.elements.count">
3257 <xsl:choose>
3258 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3259 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3260 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3261 <xsl:otherwise>1</xsl:otherwise>
3262 </xsl:choose>
3263 </xsl:variable>
3264 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3265 <div><xsl:copy-of select="$verso.content"/></div>
3266 </xsl:if>
3267 <xsl:call-template name="simplesect.titlepage.separator"/>
3268 </div>
3269</xsl:template>
3270
3271<xsl:template match="*" mode="simplesect.titlepage.recto.mode">
3272 <!-- if an element isn't found in this mode, -->
3273 <!-- try the generic titlepage.mode -->
3274 <xsl:apply-templates select="." mode="titlepage.mode"/>
3275</xsl:template>
3276
3277<xsl:template match="*" mode="simplesect.titlepage.verso.mode">
3278 <!-- if an element isn't found in this mode, -->
3279 <!-- try the generic titlepage.mode -->
3280 <xsl:apply-templates select="." mode="titlepage.mode"/>
3281</xsl:template>
3282
3283<xsl:template match="title" mode="simplesect.titlepage.recto.auto.mode">
3284<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3285<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3286</div>
3287</xsl:template>
3288
3289<xsl:template match="subtitle" mode="simplesect.titlepage.recto.auto.mode">
3290<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3291<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3292</div>
3293</xsl:template>
3294
3295<xsl:template match="corpauthor" mode="simplesect.titlepage.recto.auto.mode">
3296<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3297<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3298</div>
3299</xsl:template>
3300
3301<xsl:template match="authorgroup" mode="simplesect.titlepage.recto.auto.mode">
3302<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3303<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3304</div>
3305</xsl:template>
3306
3307<xsl:template match="author" mode="simplesect.titlepage.recto.auto.mode">
3308<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3309<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3310</div>
3311</xsl:template>
3312
3313<xsl:template match="othercredit" mode="simplesect.titlepage.recto.auto.mode">
3314<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3315<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3316</div>
3317</xsl:template>
3318
3319<xsl:template match="releaseinfo" mode="simplesect.titlepage.recto.auto.mode">
3320<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3321<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3322</div>
3323</xsl:template>
3324
3325<xsl:template match="copyright" mode="simplesect.titlepage.recto.auto.mode">
3326<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3327<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3328</div>
3329</xsl:template>
3330
3331<xsl:template match="legalnotice" mode="simplesect.titlepage.recto.auto.mode">
3332<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3333<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3334</div>
3335</xsl:template>
3336
3337<xsl:template match="pubdate" mode="simplesect.titlepage.recto.auto.mode">
3338<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3339<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3340</div>
3341</xsl:template>
3342
3343<xsl:template match="revision" mode="simplesect.titlepage.recto.auto.mode">
3344<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3345<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3346</div>
3347</xsl:template>
3348
3349<xsl:template match="revhistory" mode="simplesect.titlepage.recto.auto.mode">
3350<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3351<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3352</div>
3353</xsl:template>
3354
3355<xsl:template match="abstract" mode="simplesect.titlepage.recto.auto.mode">
3356<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3357<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3358</div>
3359</xsl:template>
3360
3361<xsl:template name="bibliography.titlepage.recto">
3362 <div xsl:use-attribute-sets="bibliography.titlepage.recto.style">
3363<xsl:call-template name="component.title">
3364<xsl:with-param name="node" select="ancestor-or-self::bibliography[1]"/>
3365</xsl:call-template></div>
3366 <xsl:choose>
3367 <xsl:when test="bibliographyinfo/subtitle">
3368 <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="bibliographyinfo/subtitle"/>
3369 </xsl:when>
3370 <xsl:when test="docinfo/subtitle">
3371 <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
3372 </xsl:when>
3373 <xsl:when test="info/subtitle">
3374 <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="info/subtitle"/>
3375 </xsl:when>
3376 <xsl:when test="subtitle">
3377 <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="subtitle"/>
3378 </xsl:when>
3379 </xsl:choose>
3380
3381</xsl:template>
3382
3383<xsl:template name="bibliography.titlepage.verso">
3384</xsl:template>
3385
3386<xsl:template name="bibliography.titlepage.separator">
3387</xsl:template>
3388
3389<xsl:template name="bibliography.titlepage.before.recto">
3390</xsl:template>
3391
3392<xsl:template name="bibliography.titlepage.before.verso">
3393</xsl:template>
3394
3395<xsl:template name="bibliography.titlepage">
3396 <div class="titlepage">
3397 <xsl:variable name="recto.content">
3398 <xsl:call-template name="bibliography.titlepage.before.recto"/>
3399 <xsl:call-template name="bibliography.titlepage.recto"/>
3400 </xsl:variable>
3401 <xsl:variable name="recto.elements.count">
3402 <xsl:choose>
3403 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3404 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3405 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3406 <xsl:otherwise>1</xsl:otherwise>
3407 </xsl:choose>
3408 </xsl:variable>
3409 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3410 <div><xsl:copy-of select="$recto.content"/></div>
3411 </xsl:if>
3412 <xsl:variable name="verso.content">
3413 <xsl:call-template name="bibliography.titlepage.before.verso"/>
3414 <xsl:call-template name="bibliography.titlepage.verso"/>
3415 </xsl:variable>
3416 <xsl:variable name="verso.elements.count">
3417 <xsl:choose>
3418 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3419 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3420 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3421 <xsl:otherwise>1</xsl:otherwise>
3422 </xsl:choose>
3423 </xsl:variable>
3424 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3425 <div><xsl:copy-of select="$verso.content"/></div>
3426 </xsl:if>
3427 <xsl:call-template name="bibliography.titlepage.separator"/>
3428 </div>
3429</xsl:template>
3430
3431<xsl:template match="*" mode="bibliography.titlepage.recto.mode">
3432 <!-- if an element isn't found in this mode, -->
3433 <!-- try the generic titlepage.mode -->
3434 <xsl:apply-templates select="." mode="titlepage.mode"/>
3435</xsl:template>
3436
3437<xsl:template match="*" mode="bibliography.titlepage.verso.mode">
3438 <!-- if an element isn't found in this mode, -->
3439 <!-- try the generic titlepage.mode -->
3440 <xsl:apply-templates select="." mode="titlepage.mode"/>
3441</xsl:template>
3442
3443<xsl:template match="subtitle" mode="bibliography.titlepage.recto.auto.mode">
3444<div xsl:use-attribute-sets="bibliography.titlepage.recto.style">
3445<xsl:apply-templates select="." mode="bibliography.titlepage.recto.mode"/>
3446</div>
3447</xsl:template>
3448
3449<xsl:template name="glossary.titlepage.recto">
3450 <div xsl:use-attribute-sets="glossary.titlepage.recto.style">
3451<xsl:call-template name="component.title">
3452<xsl:with-param name="node" select="ancestor-or-self::glossary[1]"/>
3453</xsl:call-template></div>
3454 <xsl:choose>
3455 <xsl:when test="glossaryinfo/subtitle">
3456 <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="glossaryinfo/subtitle"/>
3457 </xsl:when>
3458 <xsl:when test="docinfo/subtitle">
3459 <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
3460 </xsl:when>
3461 <xsl:when test="info/subtitle">
3462 <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="info/subtitle"/>
3463 </xsl:when>
3464 <xsl:when test="subtitle">
3465 <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="subtitle"/>
3466 </xsl:when>
3467 </xsl:choose>
3468
3469</xsl:template>
3470
3471<xsl:template name="glossary.titlepage.verso">
3472</xsl:template>
3473
3474<xsl:template name="glossary.titlepage.separator">
3475</xsl:template>
3476
3477<xsl:template name="glossary.titlepage.before.recto">
3478</xsl:template>
3479
3480<xsl:template name="glossary.titlepage.before.verso">
3481</xsl:template>
3482
3483<xsl:template name="glossary.titlepage">
3484 <div class="titlepage">
3485 <xsl:variable name="recto.content">
3486 <xsl:call-template name="glossary.titlepage.before.recto"/>
3487 <xsl:call-template name="glossary.titlepage.recto"/>
3488 </xsl:variable>
3489 <xsl:variable name="recto.elements.count">
3490 <xsl:choose>
3491 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3492 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3493 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3494 <xsl:otherwise>1</xsl:otherwise>
3495 </xsl:choose>
3496 </xsl:variable>
3497 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3498 <div><xsl:copy-of select="$recto.content"/></div>
3499 </xsl:if>
3500 <xsl:variable name="verso.content">
3501 <xsl:call-template name="glossary.titlepage.before.verso"/>
3502 <xsl:call-template name="glossary.titlepage.verso"/>
3503 </xsl:variable>
3504 <xsl:variable name="verso.elements.count">
3505 <xsl:choose>
3506 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3507 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3508 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3509 <xsl:otherwise>1</xsl:otherwise>
3510 </xsl:choose>
3511 </xsl:variable>
3512 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3513 <div><xsl:copy-of select="$verso.content"/></div>
3514 </xsl:if>
3515 <xsl:call-template name="glossary.titlepage.separator"/>
3516 </div>
3517</xsl:template>
3518
3519<xsl:template match="*" mode="glossary.titlepage.recto.mode">
3520 <!-- if an element isn't found in this mode, -->
3521 <!-- try the generic titlepage.mode -->
3522 <xsl:apply-templates select="." mode="titlepage.mode"/>
3523</xsl:template>
3524
3525<xsl:template match="*" mode="glossary.titlepage.verso.mode">
3526 <!-- if an element isn't found in this mode, -->
3527 <!-- try the generic titlepage.mode -->
3528 <xsl:apply-templates select="." mode="titlepage.mode"/>
3529</xsl:template>
3530
3531<xsl:template match="subtitle" mode="glossary.titlepage.recto.auto.mode">
3532<div xsl:use-attribute-sets="glossary.titlepage.recto.style">
3533<xsl:apply-templates select="." mode="glossary.titlepage.recto.mode"/>
3534</div>
3535</xsl:template>
3536
3537<xsl:template name="index.titlepage.recto">
3538 <div xsl:use-attribute-sets="index.titlepage.recto.style">
3539<xsl:call-template name="component.title">
3540<xsl:with-param name="node" select="ancestor-or-self::index[1]"/>
3541</xsl:call-template></div>
3542 <xsl:choose>
3543 <xsl:when test="indexinfo/subtitle">
3544 <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="indexinfo/subtitle"/>
3545 </xsl:when>
3546 <xsl:when test="docinfo/subtitle">
3547 <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
3548 </xsl:when>
3549 <xsl:when test="info/subtitle">
3550 <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="info/subtitle"/>
3551 </xsl:when>
3552 <xsl:when test="subtitle">
3553 <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="subtitle"/>
3554 </xsl:when>
3555 </xsl:choose>
3556
3557</xsl:template>
3558
3559<xsl:template name="index.titlepage.verso">
3560</xsl:template>
3561
3562<xsl:template name="index.titlepage.separator">
3563</xsl:template>
3564
3565<xsl:template name="index.titlepage.before.recto">
3566</xsl:template>
3567
3568<xsl:template name="index.titlepage.before.verso">
3569</xsl:template>
3570
3571<xsl:template name="index.titlepage">
3572 <div class="titlepage">
3573 <xsl:variable name="recto.content">
3574 <xsl:call-template name="index.titlepage.before.recto"/>
3575 <xsl:call-template name="index.titlepage.recto"/>
3576 </xsl:variable>
3577 <xsl:variable name="recto.elements.count">
3578 <xsl:choose>
3579 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3580 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3581 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3582 <xsl:otherwise>1</xsl:otherwise>
3583 </xsl:choose>
3584 </xsl:variable>
3585 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3586 <div><xsl:copy-of select="$recto.content"/></div>
3587 </xsl:if>
3588 <xsl:variable name="verso.content">
3589 <xsl:call-template name="index.titlepage.before.verso"/>
3590 <xsl:call-template name="index.titlepage.verso"/>
3591 </xsl:variable>
3592 <xsl:variable name="verso.elements.count">
3593 <xsl:choose>
3594 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3595 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3596 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3597 <xsl:otherwise>1</xsl:otherwise>
3598 </xsl:choose>
3599 </xsl:variable>
3600 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3601 <div><xsl:copy-of select="$verso.content"/></div>
3602 </xsl:if>
3603 <xsl:call-template name="index.titlepage.separator"/>
3604 </div>
3605</xsl:template>
3606
3607<xsl:template match="*" mode="index.titlepage.recto.mode">
3608 <!-- if an element isn't found in this mode, -->
3609 <!-- try the generic titlepage.mode -->
3610 <xsl:apply-templates select="." mode="titlepage.mode"/>
3611</xsl:template>
3612
3613<xsl:template match="*" mode="index.titlepage.verso.mode">
3614 <!-- if an element isn't found in this mode, -->
3615 <!-- try the generic titlepage.mode -->
3616 <xsl:apply-templates select="." mode="titlepage.mode"/>
3617</xsl:template>
3618
3619<xsl:template match="subtitle" mode="index.titlepage.recto.auto.mode">
3620<div xsl:use-attribute-sets="index.titlepage.recto.style">
3621<xsl:apply-templates select="." mode="index.titlepage.recto.mode"/>
3622</div>
3623</xsl:template>
3624
3625<xsl:template name="setindex.titlepage.recto">
3626 <div xsl:use-attribute-sets="setindex.titlepage.recto.style">
3627<xsl:call-template name="component.title">
3628<xsl:with-param name="node" select="ancestor-or-self::setindex[1]"/>
3629</xsl:call-template></div>
3630 <xsl:choose>
3631 <xsl:when test="setindexinfo/subtitle">
3632 <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="setindexinfo/subtitle"/>
3633 </xsl:when>
3634 <xsl:when test="docinfo/subtitle">
3635 <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
3636 </xsl:when>
3637 <xsl:when test="info/subtitle">
3638 <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="info/subtitle"/>
3639 </xsl:when>
3640 <xsl:when test="subtitle">
3641 <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="subtitle"/>
3642 </xsl:when>
3643 </xsl:choose>
3644
3645</xsl:template>
3646
3647<xsl:template name="setindex.titlepage.verso">
3648</xsl:template>
3649
3650<xsl:template name="setindex.titlepage.separator">
3651</xsl:template>
3652
3653<xsl:template name="setindex.titlepage.before.recto">
3654</xsl:template>
3655
3656<xsl:template name="setindex.titlepage.before.verso">
3657</xsl:template>
3658
3659<xsl:template name="setindex.titlepage">
3660 <div class="titlepage">
3661 <xsl:variable name="recto.content">
3662 <xsl:call-template name="setindex.titlepage.before.recto"/>
3663 <xsl:call-template name="setindex.titlepage.recto"/>
3664 </xsl:variable>
3665 <xsl:variable name="recto.elements.count">
3666 <xsl:choose>
3667 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3668 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3669 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3670 <xsl:otherwise>1</xsl:otherwise>
3671 </xsl:choose>
3672 </xsl:variable>
3673 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3674 <div><xsl:copy-of select="$recto.content"/></div>
3675 </xsl:if>
3676 <xsl:variable name="verso.content">
3677 <xsl:call-template name="setindex.titlepage.before.verso"/>
3678 <xsl:call-template name="setindex.titlepage.verso"/>
3679 </xsl:variable>
3680 <xsl:variable name="verso.elements.count">
3681 <xsl:choose>
3682 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3683 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3684 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3685 <xsl:otherwise>1</xsl:otherwise>
3686 </xsl:choose>
3687 </xsl:variable>
3688 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3689 <div><xsl:copy-of select="$verso.content"/></div>
3690 </xsl:if>
3691 <xsl:call-template name="setindex.titlepage.separator"/>
3692 </div>
3693</xsl:template>
3694
3695<xsl:template match="*" mode="setindex.titlepage.recto.mode">
3696 <!-- if an element isn't found in this mode, -->
3697 <!-- try the generic titlepage.mode -->
3698 <xsl:apply-templates select="." mode="titlepage.mode"/>
3699</xsl:template>
3700
3701<xsl:template match="*" mode="setindex.titlepage.verso.mode">
3702 <!-- if an element isn't found in this mode, -->
3703 <!-- try the generic titlepage.mode -->
3704 <xsl:apply-templates select="." mode="titlepage.mode"/>
3705</xsl:template>
3706
3707<xsl:template match="subtitle" mode="setindex.titlepage.recto.auto.mode">
3708<div xsl:use-attribute-sets="setindex.titlepage.recto.style">
3709<xsl:apply-templates select="." mode="setindex.titlepage.recto.mode"/>
3710</div>
3711</xsl:template>
3712
3713<xsl:template name="sidebar.titlepage.recto">
3714 <xsl:choose>
3715 <xsl:when test="sidebarinfo/title">
3716 <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="sidebarinfo/title"/>
3717 </xsl:when>
3718 <xsl:when test="docinfo/title">
3719 <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="docinfo/title"/>
3720 </xsl:when>
3721 <xsl:when test="info/title">
3722 <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="info/title"/>
3723 </xsl:when>
3724 <xsl:when test="title">
3725 <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="title"/>
3726 </xsl:when>
3727 </xsl:choose>
3728
3729 <xsl:choose>
3730 <xsl:when test="sidebarinfo/subtitle">
3731 <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="sidebarinfo/subtitle"/>
3732 </xsl:when>
3733 <xsl:when test="docinfo/subtitle">
3734 <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
3735 </xsl:when>
3736 <xsl:when test="info/subtitle">
3737 <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="info/subtitle"/>
3738 </xsl:when>
3739 <xsl:when test="subtitle">
3740 <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="subtitle"/>
3741 </xsl:when>
3742 </xsl:choose>
3743
3744</xsl:template>
3745
3746<xsl:template name="sidebar.titlepage.verso">
3747</xsl:template>
3748
3749<xsl:template name="sidebar.titlepage.separator">
3750</xsl:template>
3751
3752<xsl:template name="sidebar.titlepage.before.recto">
3753</xsl:template>
3754
3755<xsl:template name="sidebar.titlepage.before.verso">
3756</xsl:template>
3757
3758<xsl:template name="sidebar.titlepage">
3759 <div class="titlepage">
3760 <xsl:variable name="recto.content">
3761 <xsl:call-template name="sidebar.titlepage.before.recto"/>
3762 <xsl:call-template name="sidebar.titlepage.recto"/>
3763 </xsl:variable>
3764 <xsl:variable name="recto.elements.count">
3765 <xsl:choose>
3766 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3767 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3768 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3769 <xsl:otherwise>1</xsl:otherwise>
3770 </xsl:choose>
3771 </xsl:variable>
3772 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3773 <div><xsl:copy-of select="$recto.content"/></div>
3774 </xsl:if>
3775 <xsl:variable name="verso.content">
3776 <xsl:call-template name="sidebar.titlepage.before.verso"/>
3777 <xsl:call-template name="sidebar.titlepage.verso"/>
3778 </xsl:variable>
3779 <xsl:variable name="verso.elements.count">
3780 <xsl:choose>
3781 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3782 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3783 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3784 <xsl:otherwise>1</xsl:otherwise>
3785 </xsl:choose>
3786 </xsl:variable>
3787 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3788 <div><xsl:copy-of select="$verso.content"/></div>
3789 </xsl:if>
3790 <xsl:call-template name="sidebar.titlepage.separator"/>
3791 </div>
3792</xsl:template>
3793
3794<xsl:template match="*" mode="sidebar.titlepage.recto.mode">
3795 <!-- if an element isn't found in this mode, -->
3796 <!-- try the generic titlepage.mode -->
3797 <xsl:apply-templates select="." mode="titlepage.mode"/>
3798</xsl:template>
3799
3800<xsl:template match="*" mode="sidebar.titlepage.verso.mode">
3801 <!-- if an element isn't found in this mode, -->
3802 <!-- try the generic titlepage.mode -->
3803 <xsl:apply-templates select="." mode="titlepage.mode"/>
3804</xsl:template>
3805
3806<xsl:template match="title" mode="sidebar.titlepage.recto.auto.mode">
3807<div xsl:use-attribute-sets="sidebar.titlepage.recto.style">
3808<xsl:call-template name="formal.object.heading">
3809<xsl:with-param name="object" select="ancestor-or-self::sidebar[1]"/>
3810</xsl:call-template>
3811</div>
3812</xsl:template>
3813
3814<xsl:template match="subtitle" mode="sidebar.titlepage.recto.auto.mode">
3815<div xsl:use-attribute-sets="sidebar.titlepage.recto.style">
3816<xsl:apply-templates select="." mode="sidebar.titlepage.recto.mode"/>
3817</div>
3818</xsl:template>
3819
3820</xsl:stylesheet>
3821
diff --git a/documentation/brief-yoctoprojectqs/brief-yoctoprojectqs.xml b/documentation/brief-yoctoprojectqs/brief-yoctoprojectqs.xml
deleted file mode 100644
index 198c7b9689..0000000000
--- a/documentation/brief-yoctoprojectqs/brief-yoctoprojectqs.xml
+++ /dev/null
@@ -1,577 +0,0 @@
1<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<article id='brief-yocto-project-qs-intro'>
7 <articleinfo>
8 <title>Yocto Project Quick Build</title>
9
10 <copyright>
11 <year>&COPYRIGHT_YEAR;</year>
12 <holder>Linux Foundation</holder>
13 </copyright>
14
15 <legalnotice>
16 <para>
17 Permission is granted to copy, distribute and/or modify this document under
18 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 &amp; Wales</ulink> as published by Creative Commons.
19 </para>
20 </legalnotice>
21
22
23 <abstract>
24 <imagedata fileref="figures/yocto-project-transp.png"
25 width="6in" depth="1in"
26 align="right" scale="25" />
27 </abstract>
28 </articleinfo>
29
30 <section id='brief-welcome'>
31 <title>Welcome!</title>
32
33 <para>
34 Welcome!
35 This short document steps you through the process for a typical
36 image build using the Yocto Project.
37 The document also introduces how to configure a build for specific
38 hardware.
39 You will use Yocto Project to build a reference embedded OS
40 called Poky.
41 <note><title>Notes</title>
42 <itemizedlist>
43 <listitem><para>
44 The examples in this paper assume you are using a
45 native Linux system running a recent Ubuntu Linux
46 distribution.
47 If the machine you want to use Yocto Project on to
48 build an image
49 (<ulink url='&YOCTO_DOCS_REF_URL;#hardware-build-system-term'>build host</ulink>)
50 is not a native Linux system, you can
51 still perform these steps by using CROss PlatformS
52 (CROPS) and setting up a Poky container.
53 See the
54 <ulink url='&YOCTO_DOCS_DEV_URL;#setting-up-to-use-crops'>Setting Up to Use CROss PlatformS (CROPS)</ulink>"
55 section in the Yocto Project Development Tasks Manual for more
56 information.
57 </para></listitem>
58 <listitem><para>
59 You may use Windows Subsystem For Linux v2 to set up a build
60 host using Windows 10.
61 <note>
62 The Yocto Project is not compatible with WSLv1, it is
63 compatible but not officially supported nor validated
64 with WSLv2, if you still decide to use WSL please upgrade
65 to WSLv2.
66 </note>
67 See the
68 <ulink url='&YOCTO_DOCS_DEV_URL;#setting-up-to-use-wsl'>Setting Up to Use Windows Subsystem For Linux</ulink>"
69 section in the Yocto Project Development Tasks Manual for more
70 information.
71 </para></listitem>
72 </itemizedlist>
73 </note>
74 </para>
75
76 <para>
77 If you want more conceptual or background information on the
78 Yocto Project, see the
79 <ulink url='&YOCTO_DOCS_OM_URL;'>Yocto Project Overview and Concepts Manual</ulink>.
80 </para>
81 </section>
82
83 <section id='brief-compatible-distro'>
84 <title>Compatible Linux Distribution</title>
85
86 <para>
87 Make sure your
88 <ulink url='&YOCTO_DOCS_REF_URL;#hardware-build-system-term'>build host</ulink>
89 meets the following requirements:
90 <itemizedlist>
91 <listitem><para>
92 50 Gbytes of free disk space
93 </para></listitem>
94 <listitem><para>
95 Runs a supported Linux distribution (i.e. recent releases of
96 Fedora, openSUSE, CentOS, Debian, or Ubuntu). For a list of
97 Linux distributions that support the Yocto Project, see the
98 "<ulink url='&YOCTO_DOCS_REF_URL;#detailed-supported-distros'>Supported Linux Distributions</ulink>"
99 section in the Yocto Project Reference Manual.
100 For detailed information on preparing your build host, see
101 the
102 "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-preparing-the-build-host'>Preparing the Build Host</ulink>"
103 section in the Yocto Project Development Tasks Manual.
104 </para></listitem>
105 <listitem><para>
106 <itemizedlist>
107 <listitem><para>
108 Git 1.8.3.1 or greater
109 </para></listitem>
110 <listitem><para>
111 tar 1.28 or greater
112 </para></listitem>
113 <listitem><para>
114 Python 3.5.0 or greater.
115 </para></listitem>
116 <listitem><para>
117 gcc 5.0 or greater.
118 </para></listitem>
119 </itemizedlist>
120 If your build host does not meet any of these three listed
121 version requirements, you can take steps to prepare the
122 system so that you can still use the Yocto Project.
123 See the
124 "<ulink url='&YOCTO_DOCS_REF_URL;#required-git-tar-python-and-gcc-versions'>Required Git, tar, Python and gcc Versions</ulink>"
125 section in the Yocto Project Reference Manual for information.
126 </para></listitem>
127 </itemizedlist>
128 </para>
129 </section>
130
131 <section id='brief-build-system-packages'>
132 <title>Build Host Packages</title>
133
134 <para>
135 You must install essential host packages on your
136 build host.
137 The following command installs the host packages based on an
138 Ubuntu distribution:
139 <note>
140 For host package requirements on all supported Linux
141 distributions, see the
142 "<ulink url='&YOCTO_DOCS_REF_URL;#required-packages-for-the-build-host'>Required Packages for the Build Host</ulink>"
143 section in the Yocto Project Reference Manual.
144 </note>
145 <literallayout class='monospaced'>
146 $ sudo apt-get install &UBUNTU_HOST_PACKAGES_ESSENTIAL;
147 </literallayout>
148 </para>
149 </section>
150
151 <section id='brief-use-git-to-clone-poky'>
152 <title>Use Git to Clone Poky</title>
153
154 <para>
155 Once you complete the setup instructions for your machine,
156 you need to get a copy of the Poky repository on your build
157 host.
158 Use the following commands to clone the Poky
159 repository.
160 <literallayout class='monospaced'>
161 $ git clone git://git.yoctoproject.org/poky
162 Cloning into 'poky'...
163 remote: Counting objects: 432160, done.
164 remote: Compressing objects: 100% (102056/102056), done.
165 remote: Total 432160 (delta 323116), reused 432037 (delta 323000)
166 Receiving objects: 100% (432160/432160), 153.81 MiB | 8.54 MiB/s, done.
167 Resolving deltas: 100% (323116/323116), done.
168 Checking connectivity... done.
169 </literallayout>
170 Move to the <filename>poky</filename> directory and take a look
171 at the tags:
172 <literallayout class='monospaced'>
173 $ cd poky
174 $ git fetch --tags
175 $ git tag
176 1.1_M1.final
177 1.1_M1.rc1
178 1.1_M1.rc2
179 1.1_M2.final
180 1.1_M2.rc1
181 .
182 .
183 .
184 yocto-2.5
185 yocto-2.5.1
186 yocto-2.5.2
187 yocto-2.6
188 yocto-2.6.1
189 yocto-2.6.2
190 yocto-2.7
191 yocto_1.5_M5.rc8
192 </literallayout>
193 For this example, check out the branch based on the
194 &DISTRO_REL_TAG; release:
195 <literallayout class='monospaced'>
196 $ git checkout tags/&DISTRO_REL_TAG; -b my-&DISTRO_REL_TAG;
197 Switched to a new branch 'my-&DISTRO_REL_TAG;'
198 </literallayout>
199 The previous Git checkout command creates a local branch
200 named my-&DISTRO_REL_TAG;. The files available to you in that
201 branch exactly match the repository's files in the
202 "&DISTRO_NAME_NO_CAP;" development branch at the time of the
203 Yocto Project &DISTRO_REL_TAG; release.
204 </para>
205
206 <para>
207 For more options and information about accessing Yocto
208 Project related repositories, see the
209 "<ulink url='&YOCTO_DOCS_DEV_URL;#locating-yocto-project-source-files'>Locating Yocto Project Source Files</ulink>"
210 section in the Yocto Project Development Tasks Manual.
211 </para>
212 </section>
213
214 <section id='brief-building-your-image'>
215 <title>Building Your Image</title>
216
217 <para>
218 Use the following steps to build your image.
219 The build process creates an entire Linux distribution, including
220 the toolchain, from source.
221 <note>
222 <itemizedlist>
223 <listitem><para>
224 If you are working behind a firewall and your build
225 host is not set up for proxies, you could encounter
226 problems with the build process when fetching source
227 code (e.g. fetcher failures or Git failures).
228 </para></listitem>
229 <listitem><para>
230 If you do not know your proxy settings, consult your
231 local network infrastructure resources and get that
232 information.
233 A good starting point could also be to check your
234 web browser settings.
235 Finally, you can find more information on the
236 "<ulink url='https://wiki.yoctoproject.org/wiki/Working_Behind_a_Network_Proxy'>Working Behind a Network Proxy</ulink>"
237 page of the Yocto Project Wiki.
238 </para></listitem>
239 </itemizedlist>
240 </note>
241 </para>
242
243 <para>
244 <orderedlist>
245 <listitem><para>
246 <emphasis>Initialize the Build Environment:</emphasis>
247 From within the <filename>poky</filename> directory, run the
248 <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
249 environment setup script to define Yocto Project's
250 build environment on your build host.
251 <literallayout class='monospaced'>
252 $ cd ~/poky
253 $ source &OE_INIT_FILE;
254 You had no conf/local.conf file. This configuration file has therefore been
255 created for you with some default values. You may wish to edit it to, for
256 example, select a different MACHINE (target hardware). See conf/local.conf
257 for more information as common configuration options are commented.
258
259 You had no conf/bblayers.conf file. This configuration file has therefore been
260 created for you with some default values. To add additional metadata layers
261 into your configuration please add entries to conf/bblayers.conf.
262
263 The Yocto Project has extensive documentation about OE including a reference
264 manual which can be found at:
265 http://yoctoproject.org/documentation
266
267 For more information about OpenEmbedded see their website:
268 http://www.openembedded.org/
269
270
271 ### Shell environment set up for builds. ###
272
273 You can now run 'bitbake &lt;target&gt;'
274
275 Common targets are:
276 core-image-minimal
277 core-image-sato
278 meta-toolchain
279 meta-ide-support
280
281 You can also run generated qemu images with a command like 'runqemu qemux86-64'
282 </literallayout>
283 Among other things, the script creates the
284 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>,
285 which is <filename>build</filename> in this case
286 and is located in the
287 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
288 After the script runs, your current working directory
289 is set to the Build Directory.
290 Later, when the build completes, the Build Directory
291 contains all the files created during the build.
292 </para></listitem>
293 <listitem><para id='conf-file-step'>
294 <emphasis>Examine Your Local Configuration File:</emphasis>
295 When you set up the build environment, a local
296 configuration file named
297 <filename>local.conf</filename> becomes available in
298 a <filename>conf</filename> subdirectory of the
299 Build Directory.
300 For this example, the defaults are set to build
301 for a <filename>qemux86</filename> target, which is
302 suitable for emulation.
303 The package manager used is set to the RPM package
304 manager.
305 <tip>
306 You can significantly speed up your build and guard
307 against fetcher failures by using mirrors.
308 To use mirrors, add these lines to your
309 <filename>local.conf</filename> file in the Build
310 directory:
311 <literallayout class='monospaced'>
312 SSTATE_MIRRORS = "\
313 file://.* http://sstate.yoctoproject.org/dev/PATH;downloadfilename=PATH \n \
314 file://.* http://sstate.yoctoproject.org/&YOCTO_DOC_VERSION_MINUS_ONE;/PATH;downloadfilename=PATH \n \
315 file://.* http://sstate.yoctoproject.org/&YOCTO_DOC_VERSION;/PATH;downloadfilename=PATH \n \
316 "
317 </literallayout>
318 The previous examples showed how to add sstate
319 paths for Yocto Project &YOCTO_DOC_VERSION_MINUS_ONE;,
320 &YOCTO_DOC_VERSION;, and a development area.
321 For a complete index of sstate locations, see
322 <ulink url='http://sstate.yoctoproject.org/'></ulink>.
323 </tip>
324 </para></listitem>
325 <listitem><para>
326 <emphasis>Start the Build:</emphasis>
327 Continue with the following command to build an OS image
328 for the target, which is
329 <filename>core-image-sato</filename> in this example:
330 <literallayout class='monospaced'>
331 $ bitbake core-image-sato
332 </literallayout>
333 For information on using the
334 <filename>bitbake</filename> command, see the
335 "<ulink url='&YOCTO_DOCS_OM_URL;#usingpoky-components-bitbake'>BitBake</ulink>"
336 section in the Yocto Project Overview and Concepts Manual,
337 or see the
338 "<ulink url='&YOCTO_DOCS_BB_URL;#bitbake-user-manual-command'>BitBake Command</ulink>"
339 section in the BitBake User Manual.
340 </para></listitem>
341 <listitem><para>
342 <emphasis>Simulate Your Image Using QEMU:</emphasis>
343 Once this particular image is built, you can start
344 QEMU, which is a Quick EMUlator that ships with
345 the Yocto Project:
346 <literallayout class='monospaced'>
347 $ runqemu qemux86-64
348 </literallayout>
349 If you want to learn more about running QEMU, see the
350 "<ulink url="&YOCTO_DOCS_DEV_URL;#dev-manual-qemu">Using the Quick EMUlator (QEMU)</ulink>"
351 chapter in the Yocto Project Development Tasks Manual.
352 </para></listitem>
353 <listitem><para>
354 <emphasis>Exit QEMU:</emphasis>
355 Exit QEMU by either clicking on the shutdown icon or by
356 typing <filename>Ctrl-C</filename> in the QEMU
357 transcript window from which you evoked QEMU.
358 </para></listitem>
359 </orderedlist>
360 </para>
361 </section>
362
363 <section id='customizing-your-build-for-specific-hardware'>
364 <title>Customizing Your Build for Specific Hardware</title>
365
366 <para>
367 So far, all you have done is quickly built an image suitable
368 for emulation only.
369 This section shows you how to customize your build for specific
370 hardware by adding a hardware layer into the Yocto Project
371 development environment.
372 </para>
373
374 <para>
375 In general, layers are repositories that contain related sets of
376 instructions and configurations that tell the Yocto Project what
377 to do.
378 Isolating related metadata into functionally specific layers
379 facilitates modular development and makes it easier to reuse the
380 layer metadata.
381 <note>
382 By convention, layer names start with the string "meta-".
383 </note>
384 </para>
385
386 <para>
387 Follow these steps to add a hardware layer:
388 <orderedlist>
389 <listitem><para>
390 <emphasis>Find a Layer:</emphasis>
391 Lots of hardware layers exist.
392 The Yocto Project
393 <ulink url='&YOCTO_GIT_URL;'>Source Repositories</ulink>
394 has many hardware layers.
395 This example adds the
396 <ulink url='https://github.com/kraj/meta-altera'>meta-altera</ulink>
397 hardware layer.
398 </para></listitem>
399 <listitem><para>
400 <emphasis>Clone the Layer</emphasis>
401 Use Git to make a local copy of the layer on your machine.
402 You can put the copy in the top level of the copy of the
403 Poky repository created earlier:
404 <literallayout class='monospaced'>
405 $ cd ~/poky
406 $ git clone https://github.com/kraj/meta-altera.git
407 Cloning into 'meta-altera'...
408 remote: Counting objects: 25170, done.
409 remote: Compressing objects: 100% (350/350), done.
410 remote: Total 25170 (delta 645), reused 719 (delta 538), pack-reused 24219
411 Receiving objects: 100% (25170/25170), 41.02 MiB | 1.64 MiB/s, done.
412 Resolving deltas: 100% (13385/13385), done.
413 Checking connectivity... done.
414 </literallayout>
415 The hardware layer now exists with other layers inside
416 the Poky reference repository on your build host as
417 <filename>meta-altera</filename> and contains all the
418 metadata needed to support hardware from Altera, which
419 is owned by Intel.
420 </para></listitem>
421 <listitem><para>
422 <emphasis>Change the Configuration to Build for a Specific Machine:</emphasis>
423 The
424 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
425 variable in the <filename>local.conf</filename> file
426 specifies the machine for the build.
427 For this example, set the <filename>MACHINE</filename>
428 variable to "cyclone5".
429 These configurations are used:
430 <ulink url='https://github.com/kraj/meta-altera/blob/master/conf/machine/cyclone5.conf'></ulink>.
431 <note>
432 See the
433 "<link linkend='conf-file-step'>Examine Your Local Configuration File</link>"
434 step earlier for more information on configuring the
435 build.
436 </note>
437 </para></listitem>
438 <listitem><para>
439 <emphasis>Add Your Layer to the Layer Configuration File:</emphasis>
440 Before you can use a layer during a build, you must add it
441 to your <filename>bblayers.conf</filename> file, which
442 is found in the
443 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory's</ulink>
444 <filename>conf</filename> directory.</para>
445
446 <para>Use the <filename>bitbake-layers add-layer</filename>
447 command to add the layer to the configuration file:
448 <literallayout class='monospaced'>
449 $ cd ~/poky/build
450 $ bitbake-layers add-layer ../meta-altera
451 NOTE: Starting bitbake server...
452 Parsing recipes: 100% |##################################################################| Time: 0:00:32
453 Parsing of 918 .bb files complete (0 cached, 918 parsed). 1401 targets, 123 skipped, 0 masked, 0 errors.
454 </literallayout>
455 You can find more information on adding layers in the
456 "<ulink url='&YOCTO_DOCS_DEV_URL;#adding-a-layer-using-the-bitbake-layers-script'>Adding a Layer Using the <filename>bitbake-layers</filename> Script</ulink>"
457 section.
458 </para></listitem>
459 </orderedlist>
460 Completing these steps has added the
461 <filename>meta-altera</filename> layer to your Yocto Project
462 development environment and configured it to build for the
463 "cyclone5" machine.
464 <note>
465 The previous steps are for demonstration purposes only.
466 If you were to attempt to build an image for the
467 "cyclone5" build, you should read the Altera
468 <filename>README</filename>.
469 </note>
470 </para>
471 </section>
472
473 <section id='creating-your-own-general-layer'>
474 <title>Creating Your Own General Layer</title>
475
476 <para>
477 Maybe you have an application or specific set of behaviors you
478 need to isolate.
479 You can create your own general layer using the
480 <filename>bitbake-layers create-layer</filename> command.
481 The tool automates layer creation by setting up a
482 subdirectory with a <filename>layer.conf</filename>
483 configuration file, a <filename>recipes-example</filename>
484 subdirectory that contains an <filename>example.bb</filename>
485 recipe, a licensing file, and a <filename>README</filename>.
486 </para>
487
488 <para>
489 The following commands run the tool to create a layer named
490 <filename>meta-mylayer</filename> in the
491 <filename>poky</filename> directory:
492 <literallayout class='monospaced'>
493 $ cd ~/poky
494 $ bitbake-layers create-layer meta-mylayer
495 NOTE: Starting bitbake server...
496 Add your new layer with 'bitbake-layers add-layer meta-mylayer'
497 </literallayout>
498 For more information on layers and how to create them, see the
499 "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-general-layer-using-the-bitbake-layers-script'>Creating a General Layer Using the <filename>bitbake-layers</filename> Script</ulink>"
500 section in the Yocto Project Development Tasks Manual.
501 </para>
502 </section>
503
504 <section id='brief-where-to-go-next'>
505 <title>Where To Go Next</title>
506
507 <para>
508 Now that you have experienced using the Yocto Project, you might
509 be asking yourself "What now?"
510 The Yocto Project has many sources of information including
511 the website, wiki pages, and user manuals:
512 <itemizedlist>
513 <listitem><para>
514 <emphasis>Website:</emphasis>
515 The
516 <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink>
517 provides background information, the latest builds,
518 breaking news, full development documentation, and
519 access to a rich Yocto Project Development Community
520 into which you can tap.
521 </para></listitem>
522 <listitem><para>
523 <emphasis>Developer Screencast:</emphasis>
524 The
525 <ulink url='http://vimeo.com/36450321'>Getting Started with the Yocto Project - New Developer Screencast Tutorial</ulink>
526 provides a 30-minute video created for users unfamiliar
527 with the Yocto Project but familiar with Linux build
528 hosts.
529 While this screencast is somewhat dated, the
530 introductory and fundamental concepts are useful for
531 the beginner.
532 </para></listitem>
533 <listitem><para>
534 <emphasis>Yocto Project Overview and Concepts Manual:</emphasis>
535 The
536 <ulink url='&YOCTO_DOCS_OM_URL;'>Yocto Project Overview and Concepts Manual</ulink>
537 is a great place to start to learn about the
538 Yocto Project.
539 This manual introduces you to the Yocto Project and its
540 development environment.
541 The manual also provides conceptual information for
542 various aspects of the Yocto Project.
543 </para></listitem>
544 <listitem><para>
545 <emphasis>Yocto Project Wiki:</emphasis>
546 The
547 <ulink url='&YOCTO_WIKI_URL;'>Yocto Project Wiki</ulink>
548 provides additional information on where to go next
549 when ramping up with the Yocto Project, release
550 information, project planning, and QA information.
551 </para></listitem>
552 <listitem><para>
553 <emphasis>Yocto Project Mailing Lists:</emphasis>
554 Related mailing lists provide a forum for discussion,
555 patch submission and announcements.
556 Several mailing lists exist and are grouped according
557 to areas of concern.
558 See the
559 "<ulink url='&YOCTO_DOCS_REF_URL;#resources-mailinglist'>Mailing lists</ulink>"
560 section in the Yocto Project Reference Manual for a
561 complete list of Yocto Project mailing lists.
562 </para></listitem>
563 <listitem><para>
564 <emphasis>Comprehensive List of Links and Other Documentation:</emphasis>
565 The
566 "<ulink url='&YOCTO_DOCS_REF_URL;#resources-links-and-related-documentation'>Links and Related Documentation</ulink>"
567 section in the Yocto Project Reference Manual provides a
568 comprehensive list of all related links and other
569 user documentation.
570 </para></listitem>
571 </itemizedlist>
572 </para>
573 </section>
574</article>
575<!--
576vim: expandtab tw=80 ts=4
577-->
diff --git a/documentation/bsp-guide/bsp-guide-customization.xsl b/documentation/bsp-guide/bsp-guide-customization.xsl
deleted file mode 100644
index 37fcbcd208..0000000000
--- a/documentation/bsp-guide/bsp-guide-customization.xsl
+++ /dev/null
@@ -1,29 +0,0 @@
1<?xml version='1.0'?>
2<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
3
4<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
5
6 <xsl:import href="http://downloads.yoctoproject.org/mirror/docbook-mirror/docbook-xsl-1.76.1/xhtml/docbook.xsl" />
7
8<!--
9
10 <xsl:import href="../template/1.76.1/docbook-xsl-1.76.1/xhtml/docbook.xsl" />
11
12 <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.76.1/xhtml/docbook.xsl" />
13
14-->
15
16 <xsl:include href="../template/permalinks.xsl"/>
17 <xsl:include href="../template/section.title.xsl"/>
18 <xsl:include href="../template/component.title.xsl"/>
19 <xsl:include href="../template/division.title.xsl"/>
20 <xsl:include href="../template/formal.object.heading.xsl"/>
21
22 <xsl:param name="html.stylesheet" select="'bsp-style.css'" />
23 <xsl:param name="chapter.autolabel" select="1" />
24 <xsl:param name="appendix.autolabel" select="A" />
25 <xsl:param name="section.autolabel" select="1" />
26 <xsl:param name="section.label.includes.component.label" select="1" />
27 <xsl:param name="generate.id.attributes" select="1" />
28
29</xsl:stylesheet>
diff --git a/documentation/bsp-guide/bsp-guide.xml b/documentation/bsp-guide/bsp-guide.xml
deleted file mode 100755
index 93ba1e7fec..0000000000
--- a/documentation/bsp-guide/bsp-guide.xml
+++ /dev/null
@@ -1,202 +0,0 @@
1<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<book id='bsp-guide' lang='en'
7 xmlns:xi="http://www.w3.org/2003/XInclude"
8 xmlns="http://docbook.org/ns/docbook"
9 >
10 <bookinfo>
11
12 <mediaobject>
13 <imageobject>
14 <imagedata fileref='figures/bsp-title.png'
15 format='SVG'
16 align='center' scalefit='1' width='100%'/>
17 </imageobject>
18 </mediaobject>
19
20 <title>
21 Yocto Project Board Support Package Developer's Guide
22 </title>
23
24 <authorgroup>
25 <author>
26 <affiliation>
27 <orgname>&ORGNAME;</orgname>
28 </affiliation>
29 <email>&ORGEMAIL;</email>
30 </author>
31 </authorgroup>
32
33 <revhistory>
34 <revision>
35 <revnumber>0.9</revnumber>
36 <date>November 2010</date>
37 <revremark>The initial document released with the Yocto Project 0.9 Release.</revremark>
38 </revision>
39 <revision>
40 <revnumber>1.0</revnumber>
41 <date>April 2011</date>
42 <revremark>Released with the Yocto Project 1.0 Release.</revremark>
43 </revision>
44 <revision>
45 <revnumber>1.1</revnumber>
46 <date>October 2011</date>
47 <revremark>Released with the Yocto Project 1.1 Release.</revremark>
48 </revision>
49 <revision>
50 <revnumber>1.2</revnumber>
51 <date>April 2012</date>
52 <revremark>Released with the Yocto Project 1.2 Release.</revremark>
53 </revision>
54 <revision>
55 <revnumber>1.3</revnumber>
56 <date>October 2012</date>
57 <revremark>Released with the Yocto Project 1.3 Release.</revremark>
58 </revision>
59 <revision>
60 <revnumber>1.4</revnumber>
61 <date>April 2013</date>
62 <revremark>Released with the Yocto Project 1.4 Release.</revremark>
63 </revision>
64 <revision>
65 <revnumber>1.5</revnumber>
66 <date>October 2013</date>
67 <revremark>Released with the Yocto Project 1.5 Release.</revremark>
68 </revision>
69 <revision>
70 <revnumber>1.6</revnumber>
71 <date>April 2014</date>
72 <revremark>Released with the Yocto Project 1.6 Release.</revremark>
73 </revision>
74 <revision>
75 <revnumber>1.7</revnumber>
76 <date>October 2014</date>
77 <revremark>Released with the Yocto Project 1.7 Release.</revremark>
78 </revision>
79 <revision>
80 <revnumber>1.8</revnumber>
81 <date>April 2015</date>
82 <revremark>Released with the Yocto Project 1.8 Release.</revremark>
83 </revision>
84 <revision>
85 <revnumber>2.0</revnumber>
86 <date>October 2015</date>
87 <revremark>Released with the Yocto Project 2.0 Release.</revremark>
88 </revision>
89 <revision>
90 <revnumber>2.1</revnumber>
91 <date>April 2016</date>
92 <revremark>Released with the Yocto Project 2.1 Release.</revremark>
93 </revision>
94 <revision>
95 <revnumber>2.2</revnumber>
96 <date>October 2016</date>
97 <revremark>Released with the Yocto Project 2.2 Release.</revremark>
98 </revision>
99 <revision>
100 <revnumber>2.3</revnumber>
101 <date>May 2017</date>
102 <revremark>Released with the Yocto Project 2.3 Release.</revremark>
103 </revision>
104 <revision>
105 <revnumber>2.4</revnumber>
106 <date>October 2017</date>
107 <revremark>Released with the Yocto Project 2.4 Release.</revremark>
108 </revision>
109 <revision>
110 <revnumber>2.5</revnumber>
111 <date>May 2018</date>
112 <revremark>Released with the Yocto Project 2.5 Release.</revremark>
113 </revision>
114 <revision>
115 <revnumber>2.6</revnumber>
116 <date>November 2018</date>
117 <revremark>Released with the Yocto Project 2.6 Release.</revremark>
118 </revision>
119 <revision>
120 <revnumber>2.7</revnumber>
121 <date>May 2019</date>
122 <revremark>Released with the Yocto Project 2.7 Release.</revremark>
123 </revision>
124 <revision>
125 <revnumber>3.0</revnumber>
126 <date>October 2019</date>
127 <revremark>Released with the Yocto Project 3.0 Release.</revremark>
128 </revision>
129 <revision>
130 <revnumber>3.1</revnumber>
131 <date>&REL_MONTH_YEAR;</date>
132 <revremark>Released with the Yocto Project 3.1 Release.</revremark>
133 </revision>
134 </revhistory>
135
136 <copyright>
137 <year>&COPYRIGHT_YEAR;</year>
138 <holder>Linux Foundation</holder>
139 </copyright>
140
141 <legalnotice>
142 <para>
143 Permission is granted to copy, distribute and/or modify this document under
144 the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/">Creative Commons Attribution-Share Alike 2.0 UK: England &amp; Wales</ulink> as published by Creative Commons.
145 </para>
146 <note><title>Manual Notes</title>
147 <itemizedlist>
148 <listitem><para>
149 This version of the
150 <emphasis>Yocto Project Board Support Package (BSP) Developer's Guide</emphasis>
151 is for the &YOCTO_DOC_VERSION; release of the
152 Yocto Project.
153 To be sure you have the latest version of the manual
154 for this release, go to the
155 <ulink url='&YOCTO_DOCS_URL;'>Yocto Project documentation page</ulink>
156 and select the manual from that site.
157 Manuals from the site are more up-to-date than manuals
158 derived from the Yocto Project released TAR files.
159 </para></listitem>
160 <listitem><para>
161 If you located this manual through a web search, the
162 version of the manual might not be the one you want
163 (e.g. the search might have returned a manual much
164 older than the Yocto Project version with which you
165 are working).
166 You can see all Yocto Project major releases by
167 visiting the
168 <ulink url='&YOCTO_WIKI_URL;/wiki/Releases'>Releases</ulink>
169 page.
170 If you need a version of this manual for a different
171 Yocto Project release, visit the
172 <ulink url='&YOCTO_DOCS_URL;'>Yocto Project documentation page</ulink>
173 and select the manual set by using the
174 "ACTIVE RELEASES DOCUMENTATION" or "DOCUMENTS ARCHIVE"
175 pull-down menus.
176 </para></listitem>
177 <listitem>
178 <para>
179 To report any inaccuracies or problems with this
180 (or any other Yocto Project) manual, send an email to
181 the Yocto Project documentation mailing list at
182 <filename>docs@lists.yoctoproject.org</filename> or
183 log into the freenode <filename>#yocto</filename> channel.
184 </para>
185 </listitem>
186 </itemizedlist>
187 </note>
188 </legalnotice>
189
190 </bookinfo>
191
192 <xi:include href="bsp.xml"/>
193
194<!-- <index id='index'>
195 <title>Index</title>
196 </index>
197-->
198
199</book>
200<!--
201vim: expandtab tw=80 ts=4
202-->
diff --git a/documentation/bsp-guide/bsp-style.css b/documentation/bsp-guide/bsp-style.css
deleted file mode 100644
index 4ccf5d8aef..0000000000
--- a/documentation/bsp-guide/bsp-style.css
+++ /dev/null
@@ -1,989 +0,0 @@
1/*
2 SPDX-License-Identifier: CC-BY-2.0-UK
3
4 Generic XHTML / DocBook XHTML CSS Stylesheet.
5
6 Browser wrangling and typographic design by
7 Oyvind Kolas / pippin@gimp.org
8
9 Customised for Poky by
10 Matthew Allum / mallum@o-hand.com
11
12 Thanks to:
13 Liam R. E. Quin
14 William Skaggs
15 Jakub Steiner
16
17 Structure
18 ---------
19
20 The stylesheet is divided into the following sections:
21
22 Positioning
23 Margins, paddings, width, font-size, clearing.
24 Decorations
25 Borders, style
26 Colors
27 Colors
28 Graphics
29 Graphical backgrounds
30 Nasty IE tweaks
31 Workarounds needed to make it work in internet explorer,
32 currently makes the stylesheet non validating, but up until
33 this point it is validating.
34 Mozilla extensions
35 Transparency for footer
36 Rounded corners on boxes
37
38*/
39
40
41 /*************** /
42 / Positioning /
43/ ***************/
44
45body {
46 font-family: Verdana, Sans, sans-serif;
47
48 min-width: 640px;
49 width: 80%;
50 margin: 0em auto;
51 padding: 2em 5em 5em 5em;
52 color: #333;
53}
54
55h1,h2,h3,h4,h5,h6,h7 {
56 font-family: Arial, Sans;
57 color: #00557D;
58 clear: both;
59}
60
61h1 {
62 font-size: 2em;
63 text-align: left;
64 padding: 0em 0em 0em 0em;
65 margin: 2em 0em 0em 0em;
66}
67
68h2.subtitle {
69 margin: 0.10em 0em 3.0em 0em;
70 padding: 0em 0em 0em 0em;
71 font-size: 1.8em;
72 padding-left: 20%;
73 font-weight: normal;
74 font-style: italic;
75}
76
77h2 {
78 margin: 2em 0em 0.66em 0em;
79 padding: 0.5em 0em 0em 0em;
80 font-size: 1.5em;
81 font-weight: bold;
82}
83
84h3.subtitle {
85 margin: 0em 0em 1em 0em;
86 padding: 0em 0em 0em 0em;
87 font-size: 142.14%;
88 text-align: right;
89}
90
91h3 {
92 margin: 1em 0em 0.5em 0em;
93 padding: 1em 0em 0em 0em;
94 font-size: 140%;
95 font-weight: bold;
96}
97
98h4 {
99 margin: 1em 0em 0.5em 0em;
100 padding: 1em 0em 0em 0em;
101 font-size: 120%;
102 font-weight: bold;
103}
104
105h5 {
106 margin: 1em 0em 0.5em 0em;
107 padding: 1em 0em 0em 0em;
108 font-size: 110%;
109 font-weight: bold;
110}
111
112h6 {
113 margin: 1em 0em 0em 0em;
114 padding: 1em 0em 0em 0em;
115 font-size: 110%;
116 font-weight: bold;
117}
118
119.authorgroup {
120 background-color: transparent;
121 background-repeat: no-repeat;
122 padding-top: 256px;
123 background-image: url("figures/bsp-title.png");
124 background-position: left top;
125 margin-top: -256px;
126 padding-right: 50px;
127 margin-left: 0px;
128 text-align: right;
129 width: 740px;
130}
131
132h3.author {
133 margin: 0em 0me 0em 0em;
134 padding: 0em 0em 0em 0em;
135 font-weight: normal;
136 font-size: 100%;
137 color: #333;
138 clear: both;
139}
140
141.author tt.email {
142 font-size: 66%;
143}
144
145.titlepage hr {
146 width: 0em;
147 clear: both;
148}
149
150.revhistory {
151 padding-top: 2em;
152 clear: both;
153}
154
155.toc,
156.list-of-tables,
157.list-of-examples,
158.list-of-figures {
159 padding: 1.33em 0em 2.5em 0em;
160 color: #00557D;
161}
162
163.toc p,
164.list-of-tables p,
165.list-of-figures p,
166.list-of-examples p {
167 padding: 0em 0em 0em 0em;
168 padding: 0em 0em 0.3em;
169 margin: 1.5em 0em 0em 0em;
170}
171
172.toc p b,
173.list-of-tables p b,
174.list-of-figures p b,
175.list-of-examples p b{
176 font-size: 100.0%;
177 font-weight: bold;
178}
179
180.toc dl,
181.list-of-tables dl,
182.list-of-figures dl,
183.list-of-examples dl {
184 margin: 0em 0em 0.5em 0em;
185 padding: 0em 0em 0em 0em;
186}
187
188.toc dt {
189 margin: 0em 0em 0em 0em;
190 padding: 0em 0em 0em 0em;
191}
192
193.toc dd {
194 margin: 0em 0em 0em 2.6em;
195 padding: 0em 0em 0em 0em;
196}
197
198div.glossary dl,
199div.variablelist dl {
200}
201
202.glossary dl dt,
203.variablelist dl dt,
204.variablelist dl dt span.term {
205 font-weight: normal;
206 width: 20em;
207 text-align: right;
208}
209
210.variablelist dl dt {
211 margin-top: 0.5em;
212}
213
214.glossary dl dd,
215.variablelist dl dd {
216 margin-top: -1em;
217 margin-left: 25.5em;
218}
219
220.glossary dd p,
221.variablelist dd p {
222 margin-top: 0em;
223 margin-bottom: 1em;
224}
225
226
227div.calloutlist table td {
228 padding: 0em 0em 0em 0em;
229 margin: 0em 0em 0em 0em;
230}
231
232div.calloutlist table td p {
233 margin-top: 0em;
234 margin-bottom: 1em;
235}
236
237div p.copyright {
238 text-align: left;
239}
240
241div.legalnotice p.legalnotice-title {
242 margin-bottom: 0em;
243}
244
245p {
246 line-height: 1.5em;
247 margin-top: 0em;
248
249}
250
251dl {
252 padding-top: 0em;
253}
254
255hr {
256 border: solid 1px;
257}
258
259
260.mediaobject,
261.mediaobjectco {
262 text-align: center;
263}
264
265img {
266 border: none;
267}
268
269ul {
270 padding: 0em 0em 0em 1.5em;
271}
272
273ul li {
274 padding: 0em 0em 0em 0em;
275}
276
277ul li p {
278 text-align: left;
279}
280
281table {
282 width :100%;
283}
284
285th {
286 padding: 0.25em;
287 text-align: left;
288 font-weight: normal;
289 vertical-align: top;
290}
291
292td {
293 padding: 0.25em;
294 vertical-align: top;
295}
296
297p a[id] {
298 margin: 0px;
299 padding: 0px;
300 display: inline;
301 background-image: none;
302}
303
304a {
305 text-decoration: underline;
306 color: #444;
307}
308
309pre {
310 overflow: auto;
311}
312
313a:hover {
314 text-decoration: underline;
315 /*font-weight: bold;*/
316}
317
318/* This style defines how the permalink character
319 appears by itself and when hovered over with
320 the mouse. */
321
322[alt='Permalink'] { color: #eee; }
323[alt='Permalink']:hover { color: black; }
324
325
326div.informalfigure,
327div.informalexample,
328div.informaltable,
329div.figure,
330div.table,
331div.example {
332 margin: 1em 0em;
333 padding: 1em;
334 page-break-inside: avoid;
335}
336
337
338div.informalfigure p.title b,
339div.informalexample p.title b,
340div.informaltable p.title b,
341div.figure p.title b,
342div.example p.title b,
343div.table p.title b{
344 padding-top: 0em;
345 margin-top: 0em;
346 font-size: 100%;
347 font-weight: normal;
348}
349
350.mediaobject .caption,
351.mediaobject .caption p {
352 text-align: center;
353 font-size: 80%;
354 padding-top: 0.5em;
355 padding-bottom: 0.5em;
356}
357
358.epigraph {
359 padding-left: 55%;
360 margin-bottom: 1em;
361}
362
363.epigraph p {
364 text-align: left;
365}
366
367.epigraph .quote {
368 font-style: italic;
369}
370.epigraph .attribution {
371 font-style: normal;
372 text-align: right;
373}
374
375span.application {
376 font-style: italic;
377}
378
379.programlisting {
380 font-family: monospace;
381 font-size: 80%;
382 white-space: pre;
383 margin: 1.33em 0em;
384 padding: 1.33em;
385}
386
387.tip,
388.warning,
389.caution,
390.note {
391 margin-top: 1em;
392 margin-bottom: 1em;
393
394}
395
396/* force full width of table within div */
397.tip table,
398.warning table,
399.caution table,
400.note table {
401 border: none;
402 width: 100%;
403}
404
405
406.tip table th,
407.warning table th,
408.caution table th,
409.note table th {
410 padding: 0.8em 0.0em 0.0em 0.0em;
411 margin : 0em 0em 0em 0em;
412}
413
414.tip p,
415.warning p,
416.caution p,
417.note p {
418 margin-top: 0.5em;
419 margin-bottom: 0.5em;
420 padding-right: 1em;
421 text-align: left;
422}
423
424.acronym {
425 text-transform: uppercase;
426}
427
428b.keycap,
429.keycap {
430 padding: 0.09em 0.3em;
431 margin: 0em;
432}
433
434.itemizedlist li {
435 clear: none;
436}
437
438.filename {
439 font-size: medium;
440 font-family: Courier, monospace;
441}
442
443
444div.navheader, div.heading{
445 position: absolute;
446 left: 0em;
447 top: 0em;
448 width: 100%;
449 background-color: #cdf;
450 width: 100%;
451}
452
453div.navfooter, div.footing{
454 position: fixed;
455 left: 0em;
456 bottom: 0em;
457 background-color: #eee;
458 width: 100%;
459}
460
461
462div.navheader td,
463div.navfooter td {
464 font-size: 66%;
465}
466
467div.navheader table th {
468 /*font-family: Georgia, Times, serif;*/
469 /*font-size: x-large;*/
470 font-size: 80%;
471}
472
473div.navheader table {
474 border-left: 0em;
475 border-right: 0em;
476 border-top: 0em;
477 width: 100%;
478}
479
480div.navfooter table {
481 border-left: 0em;
482 border-right: 0em;
483 border-bottom: 0em;
484 width: 100%;
485}
486
487div.navheader table td a,
488div.navfooter table td a {
489 color: #777;
490 text-decoration: none;
491}
492
493/* normal text in the footer */
494div.navfooter table td {
495 color: black;
496}
497
498div.navheader table td a:visited,
499div.navfooter table td a:visited {
500 color: #444;
501}
502
503
504/* links in header and footer */
505div.navheader table td a:hover,
506div.navfooter table td a:hover {
507 text-decoration: underline;
508 background-color: transparent;
509 color: #33a;
510}
511
512div.navheader hr,
513div.navfooter hr {
514 display: none;
515}
516
517
518.qandaset tr.question td p {
519 margin: 0em 0em 1em 0em;
520 padding: 0em 0em 0em 0em;
521}
522
523.qandaset tr.answer td p {
524 margin: 0em 0em 1em 0em;
525 padding: 0em 0em 0em 0em;
526}
527.answer td {
528 padding-bottom: 1.5em;
529}
530
531.emphasis {
532 font-weight: bold;
533}
534
535
536 /************* /
537 / decorations /
538/ *************/
539
540.titlepage {
541}
542
543.part .title {
544}
545
546.subtitle {
547 border: none;
548}
549
550/*
551h1 {
552 border: none;
553}
554
555h2 {
556 border-top: solid 0.2em;
557 border-bottom: solid 0.06em;
558}
559
560h3 {
561 border-top: 0em;
562 border-bottom: solid 0.06em;
563}
564
565h4 {
566 border: 0em;
567 border-bottom: solid 0.06em;
568}
569
570h5 {
571 border: 0em;
572}
573*/
574
575.programlisting {
576 border: solid 1px;
577}
578
579div.figure,
580div.table,
581div.informalfigure,
582div.informaltable,
583div.informalexample,
584div.example {
585 border: 1px solid;
586}
587
588
589
590.tip,
591.warning,
592.caution,
593.note {
594 border: 1px solid;
595}
596
597.tip table th,
598.warning table th,
599.caution table th,
600.note table th {
601 border-bottom: 1px solid;
602}
603
604.question td {
605 border-top: 1px solid black;
606}
607
608.answer {
609}
610
611
612b.keycap,
613.keycap {
614 border: 1px solid;
615}
616
617
618div.navheader, div.heading{
619 border-bottom: 1px solid;
620}
621
622
623div.navfooter, div.footing{
624 border-top: 1px solid;
625}
626
627 /********* /
628 / colors /
629/ *********/
630
631body {
632 color: #333;
633 background: white;
634}
635
636a {
637 background: transparent;
638}
639
640a:hover {
641 background-color: #dedede;
642}
643
644
645h1,
646h2,
647h3,
648h4,
649h5,
650h6,
651h7,
652h8 {
653 background-color: transparent;
654}
655
656hr {
657 border-color: #aaa;
658}
659
660
661.tip, .warning, .caution, .note {
662 border-color: #fff;
663}
664
665
666.tip table th,
667.warning table th,
668.caution table th,
669.note table th {
670 border-bottom-color: #fff;
671}
672
673
674.warning {
675 background-color: #f0f0f2;
676}
677
678.caution {
679 background-color: #f0f0f2;
680}
681
682.tip {
683 background-color: #f0f0f2;
684}
685
686.note {
687 background-color: #f0f0f2;
688}
689
690.glossary dl dt,
691.variablelist dl dt,
692.variablelist dl dt span.term {
693 color: #044;
694}
695
696div.figure,
697div.table,
698div.example,
699div.informalfigure,
700div.informaltable,
701div.informalexample {
702 border-color: #aaa;
703}
704
705pre.programlisting {
706 color: black;
707 background-color: #fff;
708 border-color: #aaa;
709 border-width: 2px;
710}
711
712.guimenu,
713.guilabel,
714.guimenuitem {
715 background-color: #eee;
716}
717
718
719b.keycap,
720.keycap {
721 background-color: #eee;
722 border-color: #999;
723}
724
725
726div.navheader {
727 border-color: black;
728}
729
730
731div.navfooter {
732 border-color: black;
733}
734
735.writernotes {
736 color: red;
737}
738
739 /*********** /
740 / graphics /
741/ ***********/
742
743/*
744body {
745 background-image: url("images/body_bg.jpg");
746 background-attachment: fixed;
747}
748
749.navheader,
750.note,
751.tip {
752 background-image: url("images/note_bg.jpg");
753 background-attachment: fixed;
754}
755
756.warning,
757.caution {
758 background-image: url("images/warning_bg.jpg");
759 background-attachment: fixed;
760}
761
762.figure,
763.informalfigure,
764.example,
765.informalexample,
766.table,
767.informaltable {
768 background-image: url("images/figure_bg.jpg");
769 background-attachment: fixed;
770}
771
772*/
773h1,
774h2,
775h3,
776h4,
777h5,
778h6,
779h7{
780}
781
782/*
783Example of how to stick an image as part of the title.
784
785div.article .titlepage .title
786{
787 background-image: url("figures/white-on-black.png");
788 background-position: center;
789 background-repeat: repeat-x;
790}
791*/
792
793div.preface .titlepage .title,
794div.colophon .title,
795div.chapter .titlepage .title {
796 background-position: bottom;
797 background-repeat: repeat-x;
798}
799
800div.section div.section .titlepage .title,
801div.sect2 .titlepage .title {
802 background: none;
803}
804
805
806h1.title {
807 background-color: transparent;
808 background-repeat: no-repeat;
809 height: 256px;
810 text-indent: -9000px;
811 overflow:hidden;
812}
813
814h2.subtitle {
815 background-color: transparent;
816 text-indent: -9000px;
817 overflow:hidden;
818 width: 0px;
819 display: none;
820}
821
822 /*************************************** /
823 / pippin.gimp.org specific alterations /
824/ ***************************************/
825
826/*
827div.heading, div.navheader {
828 color: #777;
829 font-size: 80%;
830 padding: 0;
831 margin: 0;
832 text-align: left;
833 position: absolute;
834 top: 0px;
835 left: 0px;
836 width: 100%;
837 height: 50px;
838 background: url('/gfx/heading_bg.png') transparent;
839 background-repeat: repeat-x;
840 background-attachment: fixed;
841 border: none;
842}
843
844div.heading a {
845 color: #444;
846}
847
848div.footing, div.navfooter {
849 border: none;
850 color: #ddd;
851 font-size: 80%;
852 text-align:right;
853
854 width: 100%;
855 padding-top: 10px;
856 position: absolute;
857 bottom: 0px;
858 left: 0px;
859
860 background: url('/gfx/footing_bg.png') transparent;
861}
862*/
863
864
865
866 /****************** /
867 / nasty ie tweaks /
868/ ******************/
869
870/*
871div.heading, div.navheader {
872 width:expression(document.body.clientWidth + "px");
873}
874
875div.footing, div.navfooter {
876 width:expression(document.body.clientWidth + "px");
877 margin-left:expression("-5em");
878}
879body {
880 padding:expression("4em 5em 0em 5em");
881}
882*/
883
884 /**************************************** /
885 / mozilla vendor specific css extensions /
886/ ****************************************/
887/*
888div.navfooter, div.footing{
889 -moz-opacity: 0.8em;
890}
891
892div.figure,
893div.table,
894div.informalfigure,
895div.informaltable,
896div.informalexample,
897div.example,
898.tip,
899.warning,
900.caution,
901.note {
902 -moz-border-radius: 0.5em;
903}
904
905b.keycap,
906.keycap {
907 -moz-border-radius: 0.3em;
908}
909*/
910
911table tr td table tr td {
912 display: none;
913}
914
915
916hr {
917 display: none;
918}
919
920table {
921 border: 0em;
922}
923
924 .photo {
925 float: right;
926 margin-left: 1.5em;
927 margin-bottom: 1.5em;
928 margin-top: 0em;
929 max-width: 17em;
930 border: 1px solid gray;
931 padding: 3px;
932 background: white;
933}
934 .seperator {
935 padding-top: 2em;
936 clear: both;
937 }
938
939 #validators {
940 margin-top: 5em;
941 text-align: right;
942 color: #777;
943 }
944 @media print {
945 body {
946 font-size: 8pt;
947 }
948 .noprint {
949 display: none;
950 }
951 }
952
953
954.tip,
955.note {
956 background: #f0f0f2;
957 color: #333;
958 padding: 20px;
959 margin: 20px;
960}
961
962.tip h3,
963.note h3 {
964 padding: 0em;
965 margin: 0em;
966 font-size: 2em;
967 font-weight: bold;
968 color: #333;
969}
970
971.tip a,
972.note a {
973 color: #333;
974 text-decoration: underline;
975}
976
977.footnote {
978 font-size: small;
979 color: #333;
980}
981
982/* Changes the announcement text */
983.tip h3,
984.warning h3,
985.caution h3,
986.note h3 {
987 font-size:large;
988 color: #00557D;
989}
diff --git a/documentation/bsp-guide/bsp.xml b/documentation/bsp-guide/bsp.xml
deleted file mode 100644
index f5c3f31faf..0000000000
--- a/documentation/bsp-guide/bsp.xml
+++ /dev/null
@@ -1,2259 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='bsp'>
7
8<title>Board Support Packages (BSP) - Developer's Guide</title>
9
10<para>
11 A Board Support Package (BSP) is a collection of information that
12 defines how to support a particular hardware device, set of devices, or
13 hardware platform.
14 The BSP includes information about the hardware features
15 present on the device and kernel configuration information along with any
16 additional hardware drivers required.
17 The BSP also lists any additional software
18 components required in addition to a generic Linux software stack for both
19 essential and optional platform features.
20</para>
21
22<para>
23 This guide presents information about BSP layers, defines a structure for components
24 so that BSPs follow a commonly understood layout, discusses how to customize
25 a recipe for a BSP, addresses BSP licensing, and provides information that
26 shows you how to create a
27 <link linkend='bsp-layers'>BSP Layer</link> using the
28 <link linkend='creating-a-new-bsp-layer-using-the-bitbake-layers-script'><filename>bitbake-layers</filename></link>
29 tool.
30</para>
31
32<section id='bsp-layers'>
33 <title>BSP Layers</title>
34
35 <para>
36 A BSP consists of a file structure inside a base directory.
37 Collectively, you can think of the base directory, its file structure,
38 and the contents as a <firstterm>BSP layer</firstterm>.
39 Although not a strict requirement, BSP layers in the Yocto Project
40 use the following well-established naming convention:
41 <literallayout class='monospaced'>
42 meta-<replaceable>bsp_root_name</replaceable>
43 </literallayout>
44 The string "meta-" is prepended to the machine or platform name, which is
45 <replaceable>bsp_root_name</replaceable> in the above form.
46 <note><title>Tip</title>
47 Because the BSP layer naming convention is well-established,
48 it is advisable to follow it when creating layers.
49 Technically speaking, a BSP layer name does not need to
50 start with <filename>meta-</filename>.
51 However, various scripts and tools in the Yocto Project
52 development environment assume this convention.
53 </note>
54 </para>
55
56 <para>
57 To help understand the BSP layer concept, consider the BSPs that the
58 Yocto Project supports and provides with each release.
59 You can see the layers in the
60 <ulink url='&YOCTO_DOCS_OM_URL;#yocto-project-repositories'>Yocto Project Source Repositories</ulink>
61 through a web interface at
62 <ulink url='&YOCTO_GIT_URL;'></ulink>.
63 If you go to that interface, you will find a list of repositories
64 under "Yocto Metadata Layers".
65 <note>
66 Layers that are no longer actively supported as part of the
67 Yocto Project appear under the heading "Yocto Metadata Layer
68 Archive."
69 </note>
70 Each repository is a BSP layer supported by the Yocto Project
71 (e.g. <filename>meta-raspberrypi</filename> and
72 <filename>meta-intel</filename>).
73 Each of these layers is a repository unto itself and clicking on
74 the layer name displays two URLs from which you can
75 clone the layer's repository to your local system.
76 Here is an example that clones the Raspberry Pi BSP layer:
77 <literallayout class='monospaced'>
78 $ git clone git://git.yoctoproject.org/meta-raspberrypi
79 </literallayout>
80 </para>
81
82 <para>
83 In addition to BSP layers, the
84 <filename>meta-yocto-bsp</filename> layer is part of the
85 shipped <filename>poky</filename> repository.
86 The <filename>meta-yocto-bsp</filename> layer maintains several
87 "reference" BSPs including the ARM-based Beaglebone, MIPS-based
88 EdgeRouter, and generic versions of
89 both 32-bit and 64-bit IA machines.
90 </para>
91
92 <para>
93 For information on typical BSP development workflow, see the
94 "<link linkend='developing-a-board-support-package-bsp'>Developing a Board Support Package (BSP)</link>"
95 section.
96 For more information on how to set up a local copy of source files
97 from a Git repository, see the
98 "<ulink url='&YOCTO_DOCS_DEV_URL;#locating-yocto-project-source-files'>Locating Yocto Project Source Files</ulink>"
99 section in the Yocto Project Development Tasks Manual.
100 </para>
101
102 <para>
103 The BSP layer's base directory
104 (<filename>meta-<replaceable>bsp_root_name</replaceable></filename>)
105 is the root directory of that Layer.
106 This directory is what you add to the
107 <ulink url='&YOCTO_DOCS_REF_URL;#var-BBLAYERS'><filename>BBLAYERS</filename></ulink>
108 variable in the <filename>conf/bblayers.conf</filename> file found in your
109 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>,
110 which is established after you run the OpenEmbedded build environment
111 setup script (i.e.
112 <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>).
113 Adding the root directory allows the
114 <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>
115 to recognize the BSP layer and from it build an image.
116 Here is an example:
117 <literallayout class='monospaced'>
118 BBLAYERS ?= " \
119 /usr/local/src/yocto/meta \
120 /usr/local/src/yocto/meta-poky \
121 /usr/local/src/yocto/meta-yocto-bsp \
122 /usr/local/src/yocto/meta-mylayer \
123 "
124 </literallayout>
125 <note><title>Tip</title>
126 Ordering and
127 <ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILE_PRIORITY'><filename>BBFILE_PRIORITY</filename></ulink>
128 for the layers listed in <filename>BBLAYERS</filename>
129 matter.
130 For example, if multiple layers define a machine
131 configuration, the OpenEmbedded build system uses
132 the last layer searched given similar layer
133 priorities.
134 The build system works from the top-down through
135 the layers listed in <filename>BBLAYERS</filename>.
136 </note>
137 </para>
138
139 <para>
140 Some BSPs require or depend on additional layers
141 beyond the BSP's root layer in order to be functional.
142 In this case, you need to specify these layers in the
143 <filename>README</filename> "Dependencies" section of the
144 BSP's root layer.
145 Additionally, if any build instructions exist for the
146 BSP, you must add them to the "Dependencies" section.
147 </para>
148
149 <para>
150 Some layers function as a layer to hold other BSP layers.
151 These layers are knows as
152 "<ulink url='&YOCTO_DOCS_REF_URL;#term-container-layer'>container layers</ulink>".
153 An example of this type of layer is OpenEmbedded's
154 <ulink url='https://github.com/openembedded/meta-openembedded'><filename>meta-openembedded</filename></ulink>
155 layer.
156 The <filename>meta-openembedded</filename> layer contains
157 many <filename>meta-*</filename> layers.
158 In cases like this, you need to include the names of the actual
159 layers you want to work with, such as:
160 <literallayout class='monospaced'>
161 BBLAYERS ?= " \
162 /usr/local/src/yocto/meta \
163 /usr/local/src/yocto/meta-poky \
164 /usr/local/src/yocto/meta-yocto-bsp \
165 /usr/local/src/yocto/meta-mylayer \
166 .../meta-openembedded/meta-oe \
167 .../meta-openembedded/meta-perl \
168 .../meta-openembedded/meta-networking \
169 "
170 </literallayout>
171 and so on.
172 </para>
173
174 <para>
175 For more information on layers, see the
176 "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
177 section of the Yocto Project Development Tasks Manual.
178 </para>
179</section>
180
181<section id='preparing-your-build-host-to-work-with-bsp-layers'>
182 <title>Preparing Your Build Host to Work With BSP Layers</title>
183
184 <para>
185 This section describes how to get your build host ready
186 to work with BSP layers.
187 Once you have the host set up, you can create the layer
188 as described in the
189 "<link linkend='creating-a-new-bsp-layer-using-the-bitbake-layers-script'>Creating a new BSP Layer Using the <filename>bitbake-layers</filename> Script</link>"
190 section.
191 <note>
192 For structural information on BSPs, see the
193 <link linkend='bsp-filelayout'>Example Filesystem Layout</link>
194 section.
195 </note>
196 <orderedlist>
197 <listitem><para>
198 <emphasis>Set Up the Build Environment:</emphasis>
199 Be sure you are set up to use BitBake in a shell.
200 See the
201 "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-preparing-the-build-host'>Preparing the Build Host</ulink>"
202 section in the Yocto Project Development Tasks Manual for information
203 on how to get a build host ready that is either a native
204 Linux machine or a machine that uses CROPS.
205 </para></listitem>
206 <listitem><para>
207 <emphasis>Clone the <filename>poky</filename> Repository:</emphasis>
208 You need to have a local copy of the Yocto Project
209 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
210 (i.e. a local <filename>poky</filename> repository).
211 See the
212 "<ulink url='&YOCTO_DOCS_DEV_URL;#cloning-the-poky-repository'>Cloning the <filename>poky</filename> Repository</ulink>"
213 and possibly the
214 "<ulink url='&YOCTO_DOCS_DEV_URL;#checking-out-by-branch-in-poky'>Checking Out by Branch in Poky</ulink>"
215 or
216 "<ulink url='&YOCTO_DOCS_DEV_URL;#checkout-out-by-tag-in-poky'>Checking Out by Tag in Poky</ulink>"
217 sections all in the Yocto Project Development Tasks Manual for
218 information on how to clone the <filename>poky</filename>
219 repository and check out the appropriate branch for your work.
220 </para></listitem>
221 <listitem><para>
222 <emphasis>Determine the BSP Layer You Want:</emphasis>
223 The Yocto Project supports many BSPs, which are maintained in
224 their own layers or in layers designed to contain several
225 BSPs.
226 To get an idea of machine support through BSP layers, you can
227 look at the
228 <ulink url='&YOCTO_RELEASE_DL_URL;/machines'>index of machines</ulink>
229 for the release.
230 </para></listitem>
231 <listitem><para>
232 <emphasis>Optionally Clone the
233 <filename>meta-intel</filename> BSP Layer:</emphasis>
234 If your hardware is based on current Intel CPUs and devices,
235 you can leverage this BSP layer.
236 For details on the <filename>meta-intel</filename> BSP layer,
237 see the layer's
238 <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel/tree/README'><filename>README</filename></ulink>
239 file.
240 <orderedlist>
241 <listitem><para>
242 <emphasis>Navigate to Your Source Directory:</emphasis>
243 Typically, you set up the
244 <filename>meta-intel</filename> Git repository
245 inside the
246 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
247 (e.g. <filename>poky</filename>).
248 <literallayout class='monospaced'>
249 $ cd /home/<replaceable>you</replaceable>/poky
250 </literallayout>
251 </para></listitem>
252 <listitem><para>
253 <emphasis>Clone the Layer:</emphasis>
254 <literallayout class='monospaced'>
255 $ git clone git://git.yoctoproject.org/meta-intel.git
256 Cloning into 'meta-intel'...
257 remote: Counting objects: 15585, done.
258 remote: Compressing objects: 100% (5056/5056), done.
259 remote: Total 15585 (delta 9123), reused 15329 (delta 8867)
260 Receiving objects: 100% (15585/15585), 4.51 MiB | 3.19 MiB/s, done.
261 Resolving deltas: 100% (9123/9123), done.
262 Checking connectivity... done.
263 </literallayout>
264 </para></listitem>
265 <listitem><para>
266 <emphasis>Check Out the Proper Branch:</emphasis>
267 The branch you check out for
268 <filename>meta-intel</filename> must match the same
269 branch you are using for the Yocto Project release
270 (e.g. &DISTRO_NAME_NO_CAP;):
271 <literallayout class='monospaced'>
272 $ cd meta-intel
273 $ git checkout -b &DISTRO_NAME_NO_CAP; remotes/origin/&DISTRO_NAME_NO_CAP;
274 Branch &DISTRO_NAME_NO_CAP; set up to track remote branch &DISTRO_NAME_NO_CAP; from origin.
275 Switched to a new branch '&DISTRO_NAME_NO_CAP;'
276 </literallayout>
277 <note>
278 To see the available branch names in a cloned repository,
279 use the <filename>git branch -al</filename> command.
280 See the
281 "<ulink url='&YOCTO_DOCS_DEV_URL;#checking-out-by-branch-in-poky'>Checking Out By Branch in Poky</ulink>"
282 section in the Yocto Project Development Tasks
283 Manual for more information.
284 </note>
285 </para></listitem>
286 </orderedlist>
287 </para></listitem>
288 <listitem><para>
289 <emphasis>Optionally Set Up an Alternative BSP Layer:</emphasis>
290 If your hardware can be more closely leveraged to an
291 existing BSP not within the <filename>meta-intel</filename>
292 BSP layer, you can clone that BSP layer.</para>
293
294 <para>The process is identical to the process used for the
295 <filename>meta-intel</filename> layer except for the layer's
296 name.
297 For example, if you determine that your hardware most
298 closely matches the <filename>meta-raspberrypi</filename>,
299 clone that layer:
300 <literallayout class='monospaced'>
301 $ git clone git://git.yoctoproject.org/meta-raspberrypi
302 Cloning into 'meta-raspberrypi'...
303 remote: Counting objects: 4743, done.
304 remote: Compressing objects: 100% (2185/2185), done.
305 remote: Total 4743 (delta 2447), reused 4496 (delta 2258)
306 Receiving objects: 100% (4743/4743), 1.18 MiB | 0 bytes/s, done.
307 Resolving deltas: 100% (2447/2447), done.
308 Checking connectivity... done.
309 </literallayout>
310 </para></listitem>
311 <listitem><para>
312 <emphasis>Initialize the Build Environment:</emphasis>
313 While in the root directory of the Source Directory (i.e.
314 <filename>poky</filename>), run the
315 <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
316 environment setup script to define the OpenEmbedded
317 build environment on your build host.
318 <literallayout class='monospaced'>
319 $ source &OE_INIT_FILE;
320 </literallayout>
321 Among other things, the script creates the
322 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>,
323 which is <filename>build</filename> in this case
324 and is located in the
325 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
326 After the script runs, your current working directory
327 is set to the <filename>build</filename> directory.
328 </para></listitem>
329 </orderedlist>
330 </para>
331</section>
332
333<section id="bsp-filelayout">
334 <title>Example Filesystem Layout</title>
335
336 <para>
337 Defining a common BSP directory structure allows
338 end-users to understand and become familiar with
339 that standard.
340 A common format also encourages standardization
341 of software support for hardware.
342 </para>
343
344 <para>
345 The proposed form described in this section does
346 have elements that are specific to the OpenEmbedded
347 build system.
348 It is intended that developers can use this structure
349 with other build systems besides the OpenEmbedded build
350 system.
351 It is also intended that it will be be simple to extract
352 information and convert it to other formats if required.
353 The OpenEmbedded build system, through its standard
354 <ulink url='&YOCTO_DOCS_OM_URL;#the-yocto-project-layer-model'>layers mechanism</ulink>,
355 can directly accept the format described as a layer.
356 The BSP layer captures all the hardware-specific details
357 in one place using a standard format, which is useful
358 for any person wishing to use the hardware platform
359 regardless of the build system they are using.
360 </para>
361
362 <para>
363 The BSP specification does not include a build system
364 or other tools - the specification is concerned with
365 the hardware-specific components only.
366 At the end-distribution point, you can ship the BSP
367 layer combined with a build system and other tools.
368 Realize that it is important to maintain the distinction
369 that the BSP layer, a build system, and tools are
370 separate components that could be combined in
371 certain end products.
372 </para>
373
374 <para>
375 Before looking at the recommended form for the directory structure
376 inside a BSP layer, you should be aware that some
377 requirements do exist in order for a BSP layer to
378 be considered <firstterm>compliant</firstterm> with the Yocto Project.
379 For that list of requirements, see the
380 "<link linkend='released-bsp-requirements'>Released BSP Requirements</link>"
381 section.
382 </para>
383
384 <para>
385 Below is the typical directory structure for a BSP layer.
386 While this basic form represents the standard,
387 realize that the actual layout for individual
388 BSPs could differ.
389 <literallayout class='monospaced'>
390 meta-<replaceable>bsp_root_name</replaceable>/
391 meta-<replaceable>bsp_root_name</replaceable>/<replaceable>bsp_license_file</replaceable>
392 meta-<replaceable>bsp_root_name</replaceable>/README
393 meta-<replaceable>bsp_root_name</replaceable>/README.sources
394 meta-<replaceable>bsp_root_name</replaceable>/binary/<replaceable>bootable_images</replaceable>
395 meta-<replaceable>bsp_root_name</replaceable>/conf/layer.conf
396 meta-<replaceable>bsp_root_name</replaceable>/conf/machine/*.conf
397 meta-<replaceable>bsp_root_name</replaceable>/recipes-bsp/*
398 meta-<replaceable>bsp_root_name</replaceable>/recipes-core/*
399 meta-<replaceable>bsp_root_name</replaceable>/recipes-graphics/*
400 meta-<replaceable>bsp_root_name</replaceable>/recipes-kernel/linux/linux-yocto_<replaceable>kernel_rev</replaceable>.bbappend
401 </literallayout>
402 </para>
403
404 <para>
405 Below is an example of the Raspberry Pi BSP
406 layer that is available from the
407 <ulink url='&YOCTO_GIT_URL;'>Source Respositories</ulink>:
408 <literallayout class='monospaced'>
409 meta-raspberrypi/COPYING.MIT
410 meta-raspberrypi/README.md
411 meta-raspberrypi/classes
412 meta-raspberrypi/classes/sdcard_image-rpi.bbclass
413 meta-raspberrypi/conf/
414 meta-raspberrypi/conf/layer.conf
415 meta-raspberrypi/conf/machine/
416 meta-raspberrypi/conf/machine/raspberrypi-cm.conf
417 meta-raspberrypi/conf/machine/raspberrypi-cm3.conf
418 meta-raspberrypi/conf/machine/raspberrypi.conf
419 meta-raspberrypi/conf/machine/raspberrypi0-wifi.conf
420 meta-raspberrypi/conf/machine/raspberrypi0.conf
421 meta-raspberrypi/conf/machine/raspberrypi2.conf
422 meta-raspberrypi/conf/machine/raspberrypi3-64.conf
423 meta-raspberrypi/conf/machine/raspberrypi3.conf
424 meta-raspberrypi/conf/machine/include
425 meta-raspberrypi/conf/machine/include/rpi-base.inc
426 meta-raspberrypi/conf/machine/include/rpi-default-providers.inc
427 meta-raspberrypi/conf/machine/include/rpi-default-settings.inc
428 meta-raspberrypi/conf/machine/include/rpi-default-versions.inc
429 meta-raspberrypi/conf/machine/include/tune-arm1176jzf-s.inc
430 meta-raspberrypi/docs
431 meta-raspberrypi/docs/Makefile
432 meta-raspberrypi/docs/conf.py
433 meta-raspberrypi/docs/contributing.md
434 meta-raspberrypi/docs/extra-apps.md
435 meta-raspberrypi/docs/extra-build-config.md
436 meta-raspberrypi/docs/index.rst
437 meta-raspberrypi/docs/layer-contents.md
438 meta-raspberrypi/docs/readme.md
439 meta-raspberrypi/files
440 meta-raspberrypi/files/custom-licenses
441 meta-raspberrypi/files/custom-licenses/Broadcom
442 meta-raspberrypi/recipes-bsp
443 meta-raspberrypi/recipes-bsp/bootfiles
444 meta-raspberrypi/recipes-bsp/bootfiles/bcm2835-bootfiles.bb
445 meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bb
446 meta-raspberrypi/recipes-bsp/common
447 meta-raspberrypi/recipes-bsp/common/firmware.inc
448 meta-raspberrypi/recipes-bsp/formfactor
449 meta-raspberrypi/recipes-bsp/formfactor/formfactor
450 meta-raspberrypi/recipes-bsp/formfactor/formfactor/raspberrypi
451 meta-raspberrypi/recipes-bsp/formfactor/formfactor/raspberrypi/machconfig
452 meta-raspberrypi/recipes-bsp/formfactor/formfactor_0.0.bbappend
453 meta-raspberrypi/recipes-bsp/rpi-u-boot-src
454 meta-raspberrypi/recipes-bsp/rpi-u-boot-src/files
455 meta-raspberrypi/recipes-bsp/rpi-u-boot-src/files/boot.cmd.in
456 meta-raspberrypi/recipes-bsp/rpi-u-boot-src/rpi-u-boot-scr.bb
457 meta-raspberrypi/recipes-bsp/u-boot
458 meta-raspberrypi/recipes-bsp/u-boot/u-boot
459 meta-raspberrypi/recipes-bsp/u-boot/u-boot/*.patch
460 meta-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend
461 meta-raspberrypi/recipes-connectivity
462 meta-raspberrypi/recipes-connectivity/bluez5
463 meta-raspberrypi/recipes-connectivity/bluez5/bluez5
464 meta-raspberrypi/recipes-connectivity/bluez5/bluez5/*.patch
465 meta-raspberrypi/recipes-connectivity/bluez5/bluez5/BCM43430A1.hcd
466 meta-raspberrypi/recipes-connectivity/bluez5/bluez5brcm43438.service
467 meta-raspberrypi/recipes-connectivity/bluez5/bluez5_%.bbappend
468 meta-raspberrypi/recipes-core
469 meta-raspberrypi/recipes-core/images
470 meta-raspberrypi/recipes-core/images/rpi-basic-image.bb
471 meta-raspberrypi/recipes-core/images/rpi-hwup-image.bb
472 meta-raspberrypi/recipes-core/images/rpi-test-image.bb
473 meta-raspberrypi/recipes-core/packagegroups
474 meta-raspberrypi/recipes-core/packagegroups/packagegroup-rpi-test.bb
475 meta-raspberrypi/recipes-core/psplash
476 meta-raspberrypi/recipes-core/psplash/files
477 meta-raspberrypi/recipes-core/psplash/files/psplash-raspberrypi-img.h
478 meta-raspberrypi/recipes-core/psplash/psplash_git.bbappend
479 meta-raspberrypi/recipes-core/udev
480 meta-raspberrypi/recipes-core/udev/udev-rules-rpi
481 meta-raspberrypi/recipes-core/udev/udev-rules-rpi/99-com.rules
482 meta-raspberrypi/recipes-core/udev/udev-rules-rpi.bb
483 meta-raspberrypi/recipes-devtools
484 meta-raspberrypi/recipes-devtools/bcm2835
485 meta-raspberrypi/recipes-devtools/bcm2835/bcm2835_1.52.bb
486 meta-raspberrypi/recipes-devtools/pi-blaster
487 meta-raspberrypi/recipes-devtools/pi-blaster/files
488 meta-raspberrypi/recipes-devtools/pi-blaster/files/*.patch
489 meta-raspberrypi/recipes-devtools/pi-blaster/pi-blaster_git.bb
490 meta-raspberrypi/recipes-devtools/python
491 meta-raspberrypi/recipes-devtools/python/python-rtimu
492 meta-raspberrypi/recipes-devtools/python/python-rtimu/*.patch
493 meta-raspberrypi/recipes-devtools/python/python-rtimu_git.bb
494 meta-raspberrypi/recipes-devtools/python/python-sense-hat_2.2.0.bb
495 meta-raspberrypi/recipes-devtools/python/rpi-gpio
496 meta-raspberrypi/recipes-devtools/python/rpi-gpio/*.patch
497 meta-raspberrypi/recipes-devtools/python/rpi-gpio_0.6.3.bb
498 meta-raspberrypi/recipes-devtools/python/rpio
499 meta-raspberrypi/recipes-devtools/python/rpio/*.patch
500 meta-raspberrypi/recipes-devtools/python/rpio_0.10.0.bb
501 meta-raspberrypi/recipes-devtools/wiringPi
502 meta-raspberrypi/recipes-devtools/wiringPi/files
503 meta-raspberrypi/recipes-devtools/wiringPi/files/*.patch
504 meta-raspberrypi/recipes-devtools/wiringPi/wiringpi_git.bb
505 meta-raspberrypi/recipes-graphics
506 meta-raspberrypi/recipes-graphics/eglinfo
507 meta-raspberrypi/recipes-graphics/eglinfo/eglinfo-fb_%.bbappend
508 meta-raspberrypi/recipes-graphics/eglinfo/eglinfo-x11_%.bbappend
509 meta-raspberrypi/recipes-graphics/mesa
510 meta-raspberrypi/recipes-graphics/mesa/mesa-gl_%.bbappend
511 meta-raspberrypi/recipes-graphics/mesa/mesa_%.bbappend
512 meta-raspberrypi/recipes-graphics/userland
513 meta-raspberrypi/recipes-graphics/userland/userland
514 meta-raspberrypi/recipes-graphics/userland/userland/*.patch
515 meta-raspberrypi/recipes-graphics/userland/userland_git.bb
516 meta-raspberrypi/recipes-graphics/vc-graphics
517 meta-raspberrypi/recipes-graphics/vc-graphics/files
518 meta-raspberrypi/recipes-graphics/vc-graphics/files/egl.pc
519 meta-raspberrypi/recipes-graphics/vc-graphics/files/vchiq.sh
520 meta-raspberrypi/recipes-graphics/vc-graphics/vc-graphics-hardfp.bb
521 meta-raspberrypi/recipes-graphics/vc-graphics/vc-graphics.bb
522 meta-raspberrypi/recipes-graphics/vc-graphics/vc-graphics.inc
523 meta-raspberrypi/recipes-graphics/wayland
524 meta-raspberrypi/recipes-graphics/wayland/weston_%.bbappend
525 meta-raspberrypi/recipes-graphics/xorg-xserver
526 meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config
527 meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config/rpi
528 meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf
529 meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d
530 meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d/10-evdev.conf
531 meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d/98-pitft.conf
532 meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d/99-calibration.conf
533 meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
534 meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend
535 meta-raspberrypi/recipes-kernel
536 meta-raspberrypi/recipes-kernel/linux-firmware
537 meta-raspberrypi/recipes-kernel/linux-firmware/files
538 meta-raspberrypi/recipes-kernel/linux-firmware/files/brcmfmac43430-sdio.bin
539 meta-raspberrypi/recipes-kernel/linux-firmware/files/brcfmac43430-sdio.txt
540 meta-raspberrypi/recipes-kernel/linux-firmware/linux-firmware_%.bbappend
541 meta-raspberrypi/recipes-kernel/linux
542 meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-dev.bb
543 meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi.inc
544 meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.14.bb
545 meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.9.bb
546 meta-raspberrypi/recipes-multimedia
547 meta-raspberrypi/recipes-multimedia/gstreamer
548 meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx
549 meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/*.patch
550 meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_%.bbappend
551 meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend
552 meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.12
553 meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.12/*.patch
554 meta-raspberrypi/recipes-multimedia/omxplayer
555 meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer
556 meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/*.patch
557 meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer_git.bb
558 meta-raspberrypi/recipes-multimedia/x264
559 meta-raspberrypi/recipes-multimedia/x264/x264_git.bbappend
560 meta-raspberrypi/wic
561 meta-raspberrypi/wic/sdimage-raspberrypi.wks
562 </literallayout>
563 </para>
564
565 <para>
566 The following sections describe each part of the proposed
567 BSP format.
568 </para>
569
570 <section id="bsp-filelayout-license">
571 <title>License Files</title>
572
573 <para>
574 You can find these files in the BSP Layer at:
575 <literallayout class='monospaced'>
576 meta-<replaceable>bsp_root_name</replaceable>/<replaceable>bsp_license_file</replaceable>
577 </literallayout>
578 </para>
579
580 <para>
581 These optional files satisfy licensing requirements
582 for the BSP.
583 The type or types of files here can vary depending
584 on the licensing requirements.
585 For example, in the Raspberry Pi BSP, all licensing
586 requirements are handled with the
587 <filename>COPYING.MIT</filename> file.
588 </para>
589
590 <para>
591 Licensing files can be MIT, BSD, GPLv*, and so forth.
592 These files are recommended for the BSP but are
593 optional and totally up to the BSP developer.
594 For information on how to maintain license
595 compliance, see the
596 "<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle'>Maintaining Open Source License Compliance During Your Product's Lifecycle</ulink>"
597 section in the Yocto Project Development Tasks
598 Manual.
599 </para>
600 </section>
601
602 <section id="bsp-filelayout-readme">
603 <title>README File</title>
604
605 <para>
606 You can find this file in the BSP Layer at:
607 <literallayout class='monospaced'>
608 meta-<replaceable>bsp_root_name</replaceable>/README
609 </literallayout>
610 </para>
611
612 <para>
613 This file provides information on how to boot the live
614 images that are optionally included in the
615 <filename>binary/</filename> directory.
616 The <filename>README</filename> file also provides
617 information needed for building the image.
618 </para>
619
620 <para>
621 At a minimum, the <filename>README</filename> file must
622 contain a list of dependencies, such as the names of
623 any other layers on which the BSP depends and the name of
624 the BSP maintainer with his or her contact information.
625 </para>
626 </section>
627
628 <section id="bsp-filelayout-readme-sources">
629 <title>README.sources File</title>
630
631 <para>
632 You can find this file in the BSP Layer at:
633 <literallayout class='monospaced'>
634 meta-<replaceable>bsp_root_name</replaceable>/README.sources
635 </literallayout>
636 </para>
637
638 <para>
639 This file provides information on where to locate the BSP
640 source files used to build the images (if any) that
641 reside in
642 <filename>meta-<replaceable>bsp_root_name</replaceable>/binary</filename>.
643 Images in the <filename>binary</filename> would be images
644 released with the BSP.
645 The information in the <filename>README.sources</filename>
646 file also helps you find the
647 <ulink url='&YOCTO_DOCS_REF_URL;#metadata'>Metadata</ulink>
648 used to generate the images that ship with the BSP.
649 <note>
650 If the BSP's <filename>binary</filename> directory is
651 missing or the directory has no images, an existing
652 <filename>README.sources</filename> file is
653 meaningless and usually does not exist.
654 </note>
655 </para>
656 </section>
657
658 <section id="bsp-filelayout-binary">
659 <title>Pre-built User Binaries</title>
660
661 <para>
662 You can find these files in the BSP Layer at:
663 <literallayout class='monospaced'>
664 meta-<replaceable>bsp_root_name</replaceable>/binary/<replaceable>bootable_images</replaceable>
665 </literallayout>
666 </para>
667
668 <para>
669 This optional area contains useful pre-built kernels
670 and user-space filesystem images released with the
671 BSP that are appropriate to the target system.
672 This directory typically contains graphical (e.g. Sato)
673 and minimal live images when the BSP tarball has been
674 created and made available in the
675 <ulink url='&YOCTO_HOME_URL;'>Yocto Project</ulink>
676 website.
677 You can use these kernels and images to get a system
678 running and quickly get started on development tasks.
679 </para>
680
681 <para>
682 The exact types of binaries present are highly
683 hardware-dependent.
684 The
685 <link linkend='bsp-filelayout-readme'><filename>README</filename></link>
686 file should be present in the BSP Layer and it
687 explains how to use the images with the target hardware.
688 Additionally, the
689 <link linkend='bsp-filelayout-readme-sources'><filename>README.sources</filename></link>
690 file should be present to locate the sources used to
691 build the images and provide information on the
692 Metadata.
693 </para>
694 </section>
695
696 <section id='bsp-filelayout-layer'>
697 <title>Layer Configuration File</title>
698
699 <para>
700 You can find this file in the BSP Layer at:
701 <literallayout class='monospaced'>
702 meta-<replaceable>bsp_root_name</replaceable>/conf/layer.conf
703 </literallayout>
704 </para>
705
706 <para>
707 The <filename>conf/layer.conf</filename> file
708 identifies the file structure as a layer,
709 identifies the contents of the layer, and
710 contains information about how the build system should
711 use it.
712 Generally, a standard boilerplate file such as the
713 following works.
714 In the following example, you would replace
715 <replaceable>bsp</replaceable> with the actual
716 name of the BSP (i.e.
717 <replaceable>bsp_root_name</replaceable> from the example
718 template).
719 </para>
720
721 <para>
722 <literallayout class='monospaced'>
723 # We have a conf and classes directory, add to BBPATH
724 BBPATH .= ":${LAYERDIR}"
725
726 # We have a recipes directory, add to BBFILES
727 BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
728 ${LAYERDIR}/recipes-*/*/*.bbappend"
729
730 BBFILE_COLLECTIONS += "<replaceable>bsp</replaceable>"
731 BBFILE_PATTERN_<replaceable>bsp</replaceable> = "^${LAYERDIR}/"
732 BBFILE_PRIORITY_<replaceable>bsp</replaceable> = "6"
733
734 LAYERDEPENDS_<replaceable>bsp</replaceable> = "intel"
735 </literallayout>
736 </para>
737
738 <para>
739 To illustrate the string substitutions, here are
740 the corresponding statements from the Raspberry
741 Pi <filename>conf/layer.conf</filename> file:
742 <literallayout class='monospaced'>
743 # We have a conf and classes directory, append to BBPATH
744 BBPATH .= ":${LAYERDIR}"
745
746 # We have a recipes directory containing .bb and .bbappend files, add to BBFILES
747 BBFILES += "${LAYERDIR}/recipes*/*/*.bb \
748 ${LAYERDIR}/recipes*/*/*.bbappend"
749
750 BBFILE_COLLECTIONS += "raspberrypi"
751 BBFILE_PATTERN_raspberrypi := "^${LAYERDIR}/"
752 BBFILE_PRIORITY_raspberrypi = "9"
753
754 # Additional license directories.
755 LICENSE_PATH += "${LAYERDIR}/files/custom-licenses"
756 .
757 .
758 .
759 </literallayout>
760 </para>
761
762 <para>
763 This file simply makes
764 <ulink url='&YOCTO_DOCS_REF_URL;#bitbake-term'>BitBake</ulink>
765 aware of the recipes and configuration directories.
766 The file must exist so that the OpenEmbedded build system
767 can recognize the BSP.
768 </para>
769 </section>
770
771 <section id="bsp-filelayout-machine">
772 <title>Hardware Configuration Options</title>
773
774 <para>
775 You can find these files in the BSP Layer at:
776 <literallayout class='monospaced'>
777 meta-<replaceable>bsp_root_name</replaceable>/conf/machine/*.conf
778 </literallayout>
779 </para>
780
781 <para>
782 The machine files bind together all the information
783 contained elsewhere in the BSP into a format that
784 the build system can understand.
785 Each BSP Layer requires at least one machine file.
786 If the BSP supports multiple machines, multiple
787 machine configuration files can exist.
788 These filenames correspond to the values to which
789 users have set the
790 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink> variable.
791 </para>
792
793 <para>
794 These files define things such as the kernel package
795 to use
796 (<ulink url='&YOCTO_DOCS_REF_URL;#var-PREFERRED_PROVIDER'><filename>PREFERRED_PROVIDER</filename></ulink>
797 of
798 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata-virtual-providers'>virtual/kernel</ulink>),
799 the hardware drivers to include in different types
800 of images, any special software components that are
801 needed, any bootloader information, and also any
802 special image format requirements.
803 </para>
804
805 <para>
806 This configuration file could also include a hardware
807 "tuning" file that is commonly used to define the
808 package architecture and specify optimization flags,
809 which are carefully chosen to give best performance
810 on a given processor.
811 </para>
812
813 <para>
814 Tuning files are found in the
815 <filename>meta/conf/machine/include</filename>
816 directory within the
817 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
818 For example, many <filename>tune-*</filename> files
819 (e.g. <filename>tune-arm1136jf-s.inc</filename>,
820 <filename>tune-1586-nlp.inc</filename>, and so forth)
821 reside in the
822 <filename>poky/meta/conf/machine/include</filename>
823 directory.
824 </para>
825
826 <para>
827 To use an include file, you simply include them in the
828 machine configuration file.
829 For example, the Raspberry Pi BSP
830 <filename>raspberrypi3.conf</filename> contains the
831 following statement:
832 <literallayout class='monospaced'>
833 include conf/machine/include/rpi-base.inc
834 </literallayout>
835 </para>
836 </section>
837
838 <section id='bsp-filelayout-misc-recipes'>
839 <title>Miscellaneous BSP-Specific Recipe Files</title>
840
841 <para>
842 You can find these files in the BSP Layer at:
843 <literallayout class='monospaced'>
844 meta-<replaceable>bsp_root_name</replaceable>/recipes-bsp/*
845 </literallayout>
846 </para>
847
848 <para>
849 This optional directory contains miscellaneous recipe
850 files for the BSP.
851 Most notably would be the formfactor files.
852 For example, in the Raspberry Pi BSP, there is the
853 <filename>formfactor_0.0.bbappend</filename> file,
854 which is an append file used to augment the recipe
855 that starts the build.
856 Furthermore, there are machine-specific settings used
857 during the build that are defined by the
858 <filename>machconfig</filename> file further down in
859 the directory.
860 Here is the <filename>machconfig</filename> file for
861 the Raspberry Pi BSP:
862 <literallayout class='monospaced'>
863 HAVE_TOUCHSCREEN=0
864 HAVE_KEYBOARD=1
865
866 DISPLAY_CAN_ROTATE=0
867 DISPLAY_ORIENTATION=0
868 DISPLAY_DPI=133
869 </literallayout>
870 </para>
871
872 <note><para>
873 If a BSP does not have a formfactor entry, defaults
874 are established according to the formfactor
875 configuration file that is installed by the main
876 formfactor recipe
877 <filename>meta/recipes-bsp/formfactor/formfactor_0.0.bb</filename>,
878 which is found in the
879 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
880 </para></note>
881 </section>
882
883 <section id='bsp-filelayout-recipes-graphics'>
884 <title>Display Support Files</title>
885
886 <para>
887 You can find these files in the BSP Layer at:
888 <literallayout class='monospaced'>
889 meta-<replaceable>bsp_root_name</replaceable>/recipes-graphics/*
890 </literallayout>
891 </para>
892
893 <para>
894 This optional directory contains recipes for the
895 BSP if it has special requirements for graphics
896 support.
897 All files that are needed for the BSP to support
898 a display are kept here.
899 </para>
900 </section>
901
902 <section id='bsp-filelayout-kernel'>
903 <title>Linux Kernel Configuration</title>
904
905 <para>
906 You can find these files in the BSP Layer at:
907 <literallayout class='monospaced'>
908 meta-<replaceable>bsp_root_name</replaceable>/recipes-kernel/linux/linux*.bbappend
909 meta-<replaceable>bsp_root_name</replaceable>/recipes-kernel/linux/*.bb
910 </literallayout>
911 </para>
912
913 <para>
914 Append files (<filename>*.bbappend</filename>) modify
915 the main kernel recipe being used to build the image.
916 The <filename>*.bb</filename> files would be a
917 developer-supplied kernel recipe.
918 This area of the BSP hierarchy can contain both these
919 types of files although, in practice, it is likely that
920 you would have one or the other.
921 </para>
922
923 <para>
924 For your BSP, you typically want to use an existing Yocto
925 Project kernel recipe found in the
926 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
927 at <filename>meta/recipes-kernel/linux</filename>.
928 You can append machine-specific changes to the
929 kernel recipe by using a similarly named append
930 file, which is located in the BSP Layer for your
931 target device (e.g. the
932 <filename>meta-<replaceable>bsp_root_name</replaceable>/recipes-kernel/linux</filename> directory).
933 </para>
934
935 <para>
936 Suppose you are using the
937 <filename>linux-yocto_4.4.bb</filename> recipe to
938 build the kernel.
939 In other words, you have selected the kernel in your
940 <replaceable>bsp_root_name</replaceable><filename>.conf</filename>
941 file by adding
942 <ulink url='&YOCTO_DOCS_REF_URL;#var-PREFERRED_PROVIDER'><filename>PREFERRED_PROVIDER</filename></ulink>
943 and
944 <ulink url='&YOCTO_DOCS_REF_URL;#var-PREFERRED_VERSION'><filename>PREFERRED_VERSION</filename></ulink>
945 statements as follows:
946 <literallayout class='monospaced'>
947 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
948 PREFERRED_VERSION_linux-yocto ?= "4.4%"
949 </literallayout>
950 <note>
951 When the preferred provider is assumed by
952 default, the
953 <filename>PREFERRED_PROVIDER</filename>
954 statement does not appear in the
955 <replaceable>bsp_root_name</replaceable><filename>.conf</filename> file.
956 </note>
957 You would use the
958 <filename>linux-yocto_4.4.bbappend</filename>
959 file to append specific BSP settings to the kernel,
960 thus configuring the kernel for your particular BSP.
961 </para>
962
963 <para>
964 You can find more information on what your append file
965 should contain in the
966 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#creating-the-append-file'>Creating the Append File</ulink>"
967 section in the Yocto Project Linux Kernel Development
968 Manual.
969 </para>
970
971 <para>
972 An alternate scenario is when you create your own
973 kernel recipe for the BSP.
974 A good example of this is the Raspberry Pi BSP.
975 If you examine the
976 <filename>recipes-kernel/linux</filename> directory
977 you see the following:
978 <literallayout class='monospaced'>
979 linux-raspberrypi-dev.bb
980 linux-raspberrypi.inc
981 linux-raspberrypi_4.14.bb
982 linux-raspberrypi_4.9.bb
983 </literallayout>
984 The directory contains three kernel recipes and a
985 common include file.
986 </para>
987 </section>
988</section>
989
990<section id='developing-a-board-support-package-bsp'>
991 <title>Developing a Board Support Package (BSP)</title>
992
993 <para>
994 This section describes the high-level procedure you can
995 follow to create a BSP.
996 Although not required for BSP creation, the
997 <filename>meta-intel</filename> repository, which
998 contains many BSPs supported by the Yocto Project,
999 is part of the example.
1000 </para>
1001
1002 <para>
1003 For an example that shows how to create a new
1004 layer using the tools, see the
1005 "<link linkend='creating-a-new-bsp-layer-using-the-bitbake-layers-script'>Creating a New BSP Layer Using the <filename>bitbake-layers</filename> Script</link>"
1006 section.
1007 </para>
1008
1009 <para>
1010 The following illustration and list summarize the BSP
1011 creation general workflow.
1012 </para>
1013
1014 <para>
1015 <imagedata fileref="figures/bsp-dev-flow.png" width="7in" depth="5in" align="center" scalefit="1" />
1016 </para>
1017
1018 <para>
1019 <orderedlist>
1020 <listitem><para>
1021 <emphasis>Set up Your Host Development System
1022 to Support Development Using the Yocto
1023 Project</emphasis>:
1024 See the
1025 "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-preparing-the-build-host'>Preparing the Build Host</ulink>"
1026 section in the Yocto Project Development Tasks
1027 Manual for options on how to get a system ready
1028 to use the Yocto Project.
1029 </para></listitem>
1030 <listitem><para>
1031 <emphasis>Establish the
1032 <filename>meta-intel</filename>
1033 Repository on Your System:</emphasis>
1034 Having local copies of these supported BSP layers
1035 on your system gives you access to layers you
1036 might be able to leverage when creating your BSP.
1037 For information on how to get these files, see the
1038 "<link linkend='preparing-your-build-host-to-work-with-bsp-layers'>Preparing Your Build Host to Work with BSP Layers</link>"
1039 section.
1040 </para></listitem>
1041 <listitem><para>
1042 <emphasis>Create Your Own BSP Layer Using the
1043 <filename>bitbake-layers</filename>
1044 Script:</emphasis>
1045 Layers are ideal for isolating and storing work
1046 for a given piece of hardware.
1047 A layer is really just a location or area in which you
1048 place the recipes and configurations for your BSP.
1049 In fact, a BSP is, in itself, a special type of layer.
1050 The simplest way to create a new BSP layer that is
1051 compliant with the Yocto Project is to use the
1052 <filename>bitbake-layers</filename> script.
1053 For information about that script, see the
1054 "<link linkend='creating-a-new-bsp-layer-using-the-bitbake-layers-script'>Creating a New BSP Layer Using the <filename>bitbake-layers</filename> Script</link>"
1055 section.</para>
1056
1057 <para>Another example that illustrates a layer
1058 is an application.
1059 Suppose you are creating an application that has
1060 library or other dependencies in order for it to
1061 compile and run.
1062 The layer, in this case, would be where all the
1063 recipes that define those dependencies are kept.
1064 The key point for a layer is that it is an
1065 isolated area that contains all the relevant
1066 information for the project that the
1067 OpenEmbedded build system knows about.
1068 For more information on layers, see the
1069 "<ulink url='&YOCTO_DOCS_OM_URL;#the-yocto-project-layer-model'>The Yocto Project Layer Model</ulink>"
1070 section in the Yocto Project Overview and Concepts
1071 Manual.
1072 You can also reference the
1073 "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
1074 section in the Yocto Project Development Tasks
1075 Manual.
1076 For more information on BSP layers, see the
1077 "<link linkend='bsp-layers'>BSP Layers</link>"
1078 section.
1079 <note><title>Notes</title>
1080 <itemizedlist>
1081 <listitem><para>
1082 Five hardware reference BSPs exist
1083 that are part of the Yocto Project release
1084 and are located in the
1085 <filename>poky/meta-yocto-bsp</filename> BSP
1086 layer:
1087 <itemizedlist>
1088 <listitem><para>
1089 Texas Instruments Beaglebone
1090 (<filename>beaglebone-yocto</filename>)
1091 </para></listitem>
1092 <listitem><para>
1093 Ubiquiti Networks EdgeRouter Lite
1094 (<filename>edgerouter</filename>)
1095 </para></listitem>
1096 <listitem><para>
1097 Two general IA platforms
1098 (<filename>genericx86</filename> and
1099 <filename>genericx86-64</filename>)
1100 </para></listitem>
1101 </itemizedlist>
1102 </para></listitem>
1103 <listitem><para>
1104 Three core Intel BSPs exist as part of
1105 the Yocto Project release in the
1106 <filename>meta-intel</filename> layer:
1107 <itemizedlist>
1108 <listitem><para>
1109 <filename>intel-core2-32</filename>,
1110 which is a BSP optimized for the Core2
1111 family of CPUs as well as all CPUs
1112 prior to the Silvermont core.
1113 </para></listitem>
1114 <listitem><para>
1115 <filename>intel-corei7-64</filename>,
1116 which is a BSP optimized for Nehalem
1117 and later Core and Xeon CPUs as well
1118 as Silvermont and later Atom CPUs,
1119 such as the Baytrail SoCs.
1120 </para></listitem>
1121 <listitem><para>
1122 <filename>intel-quark</filename>,
1123 which is a BSP optimized for the
1124 Intel Galileo gen1 &amp; gen2
1125 development boards.
1126 </para></listitem>
1127 </itemizedlist>
1128 </para></listitem>
1129 </itemizedlist>
1130 </note></para>
1131
1132 <para>When you set up a layer for a new BSP,
1133 you should follow a standard layout.
1134 This layout is described in the
1135 "<link linkend='bsp-filelayout'>Example Filesystem Layout</link>"
1136 section.
1137 In the standard layout, notice the suggested
1138 structure for recipes and configuration
1139 information.
1140 You can see the standard layout for a BSP
1141 by examining any supported BSP found in the
1142 <filename>meta-intel</filename> layer inside
1143 the Source Directory.
1144 </para></listitem>
1145 <listitem><para>
1146 <emphasis>Make Configuration Changes to Your New
1147 BSP Layer:</emphasis>
1148 The standard BSP layer structure organizes the
1149 files you need to edit in
1150 <filename>conf</filename> and several
1151 <filename>recipes-*</filename> directories
1152 within the BSP layer.
1153 Configuration changes identify where your new
1154 layer is on the local system and identifies the
1155 kernel you are going to use.
1156 When you run the
1157 <filename>bitbake-layers</filename> script,
1158 you are able to interactively configure many
1159 things for the BSP (e.g. keyboard, touchscreen,
1160 and so forth).
1161 </para></listitem>
1162 <listitem><para>
1163 <emphasis>Make Recipe Changes to Your New BSP
1164 Layer:</emphasis>
1165 Recipe changes include altering recipes
1166 (<filename>*.bb</filename> files), removing
1167 recipes you do not use, and adding new recipes
1168 or append files (<filename>.bbappend</filename>)
1169 that support your hardware.
1170 </para></listitem>
1171 <listitem><para>
1172 <emphasis>Prepare for the Build:</emphasis>
1173 Once you have made all the changes to your BSP
1174 layer, there remains a few things you need to
1175 do for the OpenEmbedded build system in order
1176 for it to create your image.
1177 You need to get the build environment ready by
1178 sourcing an environment setup script
1179 (i.e. <filename>oe-init-build-env</filename>)
1180 and you need to be sure two key configuration
1181 files are configured appropriately: the
1182 <filename>conf/local.conf</filename> and the
1183 <filename>conf/bblayers.conf</filename> file.
1184 You must make the OpenEmbedded build system aware
1185 of your new layer.
1186 See the
1187 "<ulink url='&YOCTO_DOCS_DEV_URL;#enabling-your-layer'>Enabling Your Layer</ulink>"
1188 section in the Yocto Project Development Tasks Manual
1189 for information on how to let the build system
1190 know about your new layer.
1191 </para></listitem>
1192 <listitem><para>
1193 <emphasis>Build the Image:</emphasis>
1194 The OpenEmbedded build system uses the BitBake tool
1195 to build images based on the type of image you want to
1196 create.
1197 You can find more information about BitBake in the
1198 <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>.
1199 </para>
1200
1201 <para>The build process supports several types of
1202 images to satisfy different needs.
1203 See the
1204 "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>"
1205 chapter in the Yocto Project Reference Manual for
1206 information on supported images.
1207 </para></listitem>
1208 </orderedlist>
1209 </para>
1210</section>
1211
1212<section id='requirements-and-recommendations-for-released-bsps'>
1213 <title>Requirements and Recommendations for Released BSPs</title>
1214
1215 <para>
1216 Certain requirements exist for a released BSP to be
1217 considered compliant with the Yocto Project.
1218 Additionally, recommendations also exist.
1219 This section describes the requirements and
1220 recommendations for released BSPs.
1221 </para>
1222
1223 <section id='released-bsp-requirements'>
1224 <title>Released BSP Requirements</title>
1225
1226 <para>
1227 Before looking at BSP requirements, you should consider
1228 the following:
1229 <itemizedlist>
1230 <listitem><para>
1231 The requirements here assume the BSP layer
1232 is a well-formed, "legal" layer that can be
1233 added to the Yocto Project.
1234 For guidelines on creating a layer that meets
1235 these base requirements, see the
1236 "<link linkend='bsp-layers'>BSP Layers</link>"
1237 section in this manual and the
1238 "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers"</ulink>"
1239 section in the Yocto Project Development Tasks
1240 Manual.
1241 </para></listitem>
1242 <listitem><para>
1243 The requirements in this section apply
1244 regardless of how you package a BSP.
1245 You should consult the packaging and distribution
1246 guidelines for your specific release process.
1247 For an example of packaging and distribution
1248 requirements, see the
1249 "<ulink url='https://wiki.yoctoproject.org/wiki/Third_Party_BSP_Release_Process'>Third Party BSP Release Process</ulink>"
1250 wiki page.
1251 </para></listitem>
1252 <listitem><para>
1253 The requirements for the BSP as it is made
1254 available to a developer are completely
1255 independent of the released form of the BSP.
1256 For example, the BSP Metadata can be contained
1257 within a Git repository and could have a directory
1258 structure completely different from what appears
1259 in the officially released BSP layer.
1260 </para></listitem>
1261 <listitem><para>
1262 It is not required that specific packages or
1263 package modifications exist in the BSP layer,
1264 beyond the requirements for general
1265 compliance with the Yocto Project.
1266 For example, no requirement exists dictating
1267 that a specific kernel or kernel version be
1268 used in a given BSP.
1269 </para></listitem>
1270 </itemizedlist>
1271 </para>
1272
1273 <para>
1274 Following are the requirements for a released BSP
1275 that conform to the Yocto Project:
1276 <itemizedlist>
1277 <listitem><para>
1278 <emphasis>Layer Name:</emphasis>
1279 The BSP must have a layer name that follows
1280 the Yocto Project standards.
1281 For information on BSP layer names, see the
1282 "<link linkend='bsp-layers'>BSP Layers</link>" section.
1283 </para></listitem>
1284 <listitem><para>
1285 <emphasis>File System Layout:</emphasis>
1286 When possible, use the same directory names
1287 in your BSP layer as listed in the
1288 <filename>recipes.txt</filename> file, which
1289 is found in <filename>poky/meta</filename>
1290 directory of the
1291 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
1292 or in the OpenEmbedded-Core Layer
1293 (<filename>openembedded-core</filename>) at
1294 <ulink url='http://git.openembedded.org/openembedded-core/tree/meta'></ulink>.
1295 </para>
1296
1297 <para>You should place recipes
1298 (<filename>*.bb</filename> files) and recipe
1299 modifications (<filename>*.bbappend</filename>
1300 files) into <filename>recipes-*</filename>
1301 subdirectories by functional area as outlined
1302 in <filename>recipes.txt</filename>.
1303 If you cannot find a category in
1304 <filename>recipes.txt</filename> to fit a
1305 particular recipe, you can make up your own
1306 <filename>recipes-*</filename> subdirectory.
1307 </para>
1308
1309 <para>Within any particular
1310 <filename>recipes-*</filename> category, the
1311 layout should match what is found in the
1312 OpenEmbedded-Core Git repository
1313 (<filename>openembedded-core</filename>)
1314 or the Source Directory (<filename>poky</filename>).
1315 In other words, make sure you place related
1316 files in appropriately-related
1317 <filename>recipes-*</filename> subdirectories
1318 specific to the recipe's function, or within
1319 a subdirectory containing a set of closely-related
1320 recipes.
1321 The recipes themselves should follow the general
1322 guidelines for recipes used in the Yocto Project
1323 found in the
1324 "<ulink url='http://openembedded.org/wiki/Styleguide'>OpenEmbedded Style Guide</ulink>".
1325 </para></listitem>
1326 <listitem><para>
1327 <emphasis>License File:</emphasis>
1328 You must include a license file in the
1329 <filename>meta-</filename><replaceable>bsp_root_name</replaceable>
1330 directory.
1331 This license covers the BSP Metadata as a whole.
1332 You must specify which license to use since no
1333 default license exists when one is not specified.
1334 See the
1335 <ulink url='&YOCTO_GIT_URL;/cgit.cgi/meta-raspberrypi/tree/COPYING.MIT'><filename>COPYING.MIT</filename></ulink>
1336 file for the Raspberry Pi BSP in the
1337 <filename>meta-raspberrypi</filename> BSP layer
1338 as an example.
1339 </para></listitem>
1340 <listitem><para>
1341 <emphasis>README File:</emphasis>
1342 You must include a <filename>README</filename>
1343 file in the
1344 <filename>meta-</filename><replaceable>bsp_root_name</replaceable>
1345 directory.
1346 See the
1347 <ulink url='&YOCTO_GIT_URL;/cgit.cgi/meta-raspberrypi/tree/README.md'><filename>README.md</filename></ulink>
1348 file for the Raspberry Pi BSP in the
1349 <filename>meta-raspberrypi</filename> BSP layer
1350 as an example.</para>
1351
1352 <para>At a minimum, the <filename>README</filename>
1353 file should contain the following:
1354 <itemizedlist>
1355 <listitem><para>
1356 A brief description of the target hardware.
1357 </para></listitem>
1358 <listitem><para>
1359 A list of all the dependencies of the BSP.
1360 These dependencies are typically a list
1361 of required layers needed to build the
1362 BSP.
1363 However, the dependencies should also
1364 contain information regarding any other
1365 dependencies the BSP might have.
1366 </para></listitem>
1367 <listitem><para>
1368 Any required special licensing information.
1369 For example, this information includes
1370 information on special variables needed
1371 to satisfy a EULA, or instructions on
1372 information needed to build or distribute
1373 binaries built from the BSP Metadata.
1374 </para></listitem>
1375 <listitem><para>
1376 The name and contact information for the
1377 BSP layer maintainer.
1378 This is the person to whom patches and
1379 questions should be sent.
1380 For information on how to find the right
1381 person, see the
1382 "<ulink url='&YOCTO_DOCS_DEV_URL;#how-to-submit-a-change'>Submitting a Change to the Yocto Project</ulink>"
1383 section in the Yocto Project Development
1384 Tasks Manual.
1385 </para></listitem>
1386 <listitem><para>
1387 Instructions on how to build the BSP using
1388 the BSP layer.
1389 </para></listitem>
1390 <listitem><para>
1391 Instructions on how to boot the BSP build
1392 from the BSP layer.
1393 </para></listitem>
1394 <listitem><para>
1395 Instructions on how to boot the binary
1396 images contained in the
1397 <filename>binary</filename> directory,
1398 if present.
1399 </para></listitem>
1400 <listitem><para>
1401 Information on any known bugs or issues
1402 that users should know about when either
1403 building or booting the BSP binaries.
1404 </para></listitem>
1405 </itemizedlist>
1406 </para></listitem>
1407 <listitem><para>
1408 <emphasis>README.sources File:</emphasis>
1409 If you BSP contains binary images in the
1410 <filename>binary</filename> directory, you must
1411 include a <filename>README.sources</filename>
1412 file in the
1413 <filename>meta-</filename><replaceable>bsp_root_name</replaceable>
1414 directory.
1415 This file specifies exactly where you can find
1416 the sources used to generate the binary images.
1417 </para></listitem>
1418 <listitem><para>
1419 <emphasis>Layer Configuration File:</emphasis>
1420 You must include a
1421 <filename>conf/layer.conf</filename> file in
1422 the
1423 <filename>meta-</filename><replaceable>bsp_root_name</replaceable>
1424 directory.
1425 This file identifies the
1426 <filename>meta-</filename><replaceable>bsp_root_name</replaceable>
1427 BSP layer as a layer to the build system.
1428 </para></listitem>
1429 <listitem><para>
1430 <emphasis>Machine Configuration File:</emphasis>
1431 You must include one or more
1432 <filename>conf/machine/</filename><replaceable>bsp_root_name</replaceable><filename>.conf</filename>
1433 files in the
1434 <filename>meta-</filename><replaceable>bsp_root_name</replaceable>
1435 directory.
1436 These configuration files define machine targets
1437 that can be built using the BSP layer.
1438 Multiple machine configuration files define
1439 variations of machine configurations that the
1440 BSP supports.
1441 If a BSP supports multiple machine variations,
1442 you need to adequately describe each variation
1443 in the BSP <filename>README</filename> file.
1444 Do not use multiple machine configuration files
1445 to describe disparate hardware.
1446 If you do have very different targets, you should
1447 create separate BSP layers for each target.
1448 <note>
1449 It is completely possible for a developer to
1450 structure the working repository as a
1451 conglomeration of unrelated BSP files, and to
1452 possibly generate BSPs targeted for release
1453 from that directory using scripts or some
1454 other mechanism
1455 (e.g. <filename>meta-yocto-bsp</filename> layer).
1456 Such considerations are outside the scope of
1457 this document.
1458 </note>
1459 </para></listitem>
1460 </itemizedlist>
1461 </para>
1462 </section>
1463
1464 <section id='released-bsp-recommendations'>
1465 <title>Released BSP Recommendations</title>
1466
1467 <para>
1468 Following are recommendations for released BSPs that
1469 conform to the Yocto Project:
1470 <itemizedlist>
1471 <listitem><para>
1472 <emphasis>Bootable Images:</emphasis>
1473 Released BSPs can contain one or more bootable
1474 images.
1475 Including bootable images allows users to easily
1476 try out the BSP using their own hardware.</para>
1477
1478 <para>In some cases, it might not be convenient
1479 to include a bootable image.
1480 If so, you might want to make two versions of the
1481 BSP available: one that contains binary images, and
1482 one that does not.
1483 The version that does not contain bootable images
1484 avoids unnecessary download times for users not
1485 interested in the images.</para>
1486
1487 <para>If you need to distribute a BSP and include
1488 bootable images or build kernel and filesystems
1489 meant to allow users to boot the BSP for evaluation
1490 purposes, you should put the images and artifacts
1491 within a
1492 <filename>binary/</filename> subdirectory located
1493 in the
1494 <filename>meta-</filename><replaceable>bsp_root_name</replaceable>
1495 directory.
1496 <note>
1497 If you do include a bootable image as part
1498 of the BSP and the image was built by software
1499 covered by the GPL or other open source licenses,
1500 it is your responsibility to understand
1501 and meet all licensing requirements, which could
1502 include distribution of source files.
1503 </note>
1504 </para></listitem>
1505 <listitem><para>
1506 <emphasis>Use a Yocto Linux Kernel:</emphasis>
1507 Kernel recipes in the BSP should be based on a
1508 Yocto Linux kernel.
1509 Basing your recipes on these kernels reduces
1510 the costs for maintaining the BSP and increases
1511 its scalability.
1512 See the <filename>Yocto Linux Kernel</filename>
1513 category in the
1514 <ulink url='&YOCTO_GIT_URL;'>Source Repositories</ulink>
1515 for these kernels.
1516 </para></listitem>
1517 </itemizedlist>
1518 </para>
1519 </section>
1520</section>
1521
1522<section id='customizing-a-recipe-for-a-bsp'>
1523 <title>Customizing a Recipe for a BSP</title>
1524
1525 <para>
1526 If you plan on customizing a recipe for a particular BSP,
1527 you need to do the following:
1528 <itemizedlist>
1529 <listitem><para>
1530 Create a <filename>*.bbappend</filename> file for
1531 the modified recipe.
1532 For information on using append files, see the
1533 "<ulink url='&YOCTO_DOCS_DEV_URL;#using-bbappend-files'>Using .bbappend Files in Your Layer</ulink>"
1534 section in the Yocto Project Development Tasks
1535 Manual.
1536 </para></listitem>
1537 <listitem><para>
1538 Ensure your directory structure in the BSP layer
1539 that supports your machine is such that the
1540 OpenEmbedded build system can find it.
1541 See the example later in this section for more
1542 information.
1543 </para></listitem>
1544 <listitem><para>
1545 Put the append file in a directory whose name matches
1546 the machine's name and is located in an appropriate
1547 sub-directory inside the BSP layer (i.e.
1548 <filename>recipes-bsp</filename>,
1549 <filename>recipes-graphics</filename>,
1550 <filename>recipes-core</filename>, and so forth).
1551 </para></listitem>
1552 <listitem><para>
1553 Place the BSP-specific files in the proper
1554 directory inside the BSP layer.
1555 How expansive the layer is affects where you must
1556 place these files.
1557 For example, if your layer supports several
1558 different machine types, you need to be sure your
1559 layer's directory structure includes hierarchy
1560 that separates the files according to machine.
1561 If your layer does not support multiple machines,
1562 the layer would not have that additional hierarchy
1563 and the files would obviously not be able to reside
1564 in a machine-specific directory.
1565 </para></listitem>
1566 </itemizedlist>
1567 </para>
1568
1569 <para>
1570 Following is a specific example to help you better understand
1571 the process.
1572 This example customizes customizes a recipe by adding a
1573 BSP-specific configuration file named
1574 <filename>interfaces</filename> to the
1575 <filename>init-ifupdown_1.0.bb</filename> recipe for machine
1576 "xyz" where the BSP layer also supports several other
1577 machines:
1578 <orderedlist>
1579 <listitem><para>
1580 Edit the
1581 <filename>init-ifupdown_1.0.bbappend</filename> file
1582 so that it contains the following:
1583 <literallayout class='monospaced'>
1584 FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
1585 </literallayout>
1586 The append file needs to be in the
1587 <filename>meta-xyz/recipes-core/init-ifupdown</filename>
1588 directory.
1589 </para></listitem>
1590 <listitem><para>
1591 Create and place the new
1592 <filename>interfaces</filename> configuration file in
1593 the BSP's layer here:
1594 <literallayout class='monospaced'>
1595 meta-xyz/recipes-core/init-ifupdown/files/xyz-machine-one/interfaces
1596 </literallayout>
1597 <note>
1598 If the <filename>meta-xyz</filename> layer did
1599 not support multiple machines, you would place
1600 the <filename>interfaces</filename> configuration
1601 file in the layer here:
1602 <literallayout class='monospaced'>
1603 meta-xyz/recipes-core/init-ifupdown/files/interfaces
1604 </literallayout>
1605 </note>
1606 The
1607 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>
1608 variable in the append files extends the search path
1609 the build system uses to find files during the build.
1610 Consequently, for this example you need to have the
1611 <filename>files</filename> directory in the same
1612 location as your append file.
1613 </para></listitem>
1614 </orderedlist>
1615 </para>
1616</section>
1617
1618<section id='bsp-licensing-considerations'>
1619 <title>BSP Licensing Considerations</title>
1620
1621 <para>
1622 In some cases, a BSP contains separately-licensed
1623 Intellectual Property (IP) for a component or components.
1624 For these cases, you are required to accept the terms
1625 of a commercial or other type of license that requires
1626 some kind of explicit End User License Agreement (EULA).
1627 Once you accept the license, the OpenEmbedded build system
1628 can then build and include the corresponding component
1629 in the final BSP image.
1630 If the BSP is available as a pre-built image, you can
1631 download the image after agreeing to the license or EULA.
1632 </para>
1633
1634 <para>
1635 You could find that some separately-licensed components
1636 that are essential for normal operation of the system might
1637 not have an unencumbered (or free) substitute.
1638 Without these essential components, the system would be
1639 non-functional.
1640 Then again, you might find that other licensed components
1641 that are simply 'good-to-have' or purely elective do have
1642 an unencumbered, free replacement component that you can
1643 use rather than agreeing to the separately-licensed
1644 component.
1645 Even for components essential to the system, you might
1646 find an unencumbered component that is not identical but
1647 will work as a less-capable version of the licensed version
1648 in the BSP recipe.
1649 </para>
1650
1651 <para>
1652 For cases where you can substitute a free component and
1653 still maintain the system's functionality, the "DOWNLOADS"
1654 selection from the "SOFTWARE" tab on the
1655 <ulink url='&YOCTO_HOME_URL;'>Yocto Project website</ulink>
1656 makes available de-featured BSPs that are completely free
1657 of any IP encumbrances.
1658 For these cases, you can use the substitution directly and
1659 without any further licensing requirements.
1660 If present, these fully de-featured BSPs are named
1661 appropriately different as compared to the names of their
1662 respective encumbered BSPs.
1663 If available, these substitutions are your simplest and
1664 most preferred options.
1665 Obviously, use of these substitutions assumes the resulting
1666 functionality meets system requirements.
1667 <note>
1668 If however, a non-encumbered version is unavailable or
1669 it provides unsuitable functionality or quality, you can
1670 use an encumbered version.
1671 </note>
1672 </para>
1673
1674 <para>
1675 A couple different methods exist within the OpenEmbedded
1676 build system to satisfy the licensing requirements for an
1677 encumbered BSP.
1678 The following list describes them in order of preference:
1679 <orderedlist>
1680 <listitem><para>
1681 <emphasis>Use the
1682 <ulink url='&YOCTO_DOCS_REF_URL;#var-LICENSE_FLAGS'><filename>LICENSE_FLAGS</filename></ulink>
1683 Variable to Define the Recipes that Have Commercial
1684 or Other Types of Specially-Licensed Packages:</emphasis>
1685 For each of those recipes, you can specify a
1686 matching license string in a
1687 <filename>local.conf</filename> variable named
1688 <ulink url='&YOCTO_DOCS_REF_URL;#var-LICENSE_FLAGS_WHITELIST'><filename>LICENSE_FLAGS_WHITELIST</filename></ulink>.
1689 Specifying the matching license string signifies
1690 that you agree to the license.
1691 Thus, the build system can build the corresponding
1692 recipe and include the component in the image.
1693 See the
1694 "<ulink url='&YOCTO_DOCS_DEV_URL;#enabling-commercially-licensed-recipes'>Enabling Commercially Licensed Recipes</ulink>"
1695 section in the Yocto Project Development Tasks
1696 Manual for details on how to use these variables.
1697 </para>
1698
1699 <para>If you build as you normally would, without
1700 specifying any recipes in the
1701 <filename>LICENSE_FLAGS_WHITELIST</filename>, the
1702 build stops and provides you with the list of recipes
1703 that you have tried to include in the image that
1704 need entries in the
1705 <filename>LICENSE_FLAGS_WHITELIST</filename>.
1706 Once you enter the appropriate license flags into
1707 the whitelist, restart the build to continue where
1708 it left off.
1709 During the build, the prompt will not appear again
1710 since you have satisfied the requirement.</para>
1711
1712 <para>Once the appropriate license flags are on the
1713 white list in the
1714 <filename>LICENSE_FLAGS_WHITELIST</filename> variable,
1715 you can build the encumbered image with no change
1716 at all to the normal build process.
1717 </para></listitem>
1718 <listitem><para>
1719 <emphasis>Get a Pre-Built Version of the BSP:</emphasis>
1720 You can get this type of BSP by selecting the
1721 "DOWNLOADS" item from the "SOFTWARE" tab on the
1722 <ulink url='&YOCTO_HOME_URL;'>Yocto Project website</ulink>.
1723 You can download BSP tarballs that contain
1724 proprietary components after agreeing to the
1725 licensing requirements of each of the individually
1726 encumbered packages as part of the download process.
1727 Obtaining the BSP this way allows you to access an
1728 encumbered image immediately after agreeing to the
1729 click-through license agreements presented by the
1730 website.
1731 If you want to build the image yourself using
1732 the recipes contained within the BSP tarball,
1733 you will still need to create an appropriate
1734 <filename>LICENSE_FLAGS_WHITELIST</filename>
1735 to match the encumbered recipes in the BSP.
1736 </para></listitem>
1737 </orderedlist>
1738 <note>
1739 Pre-compiled images are bundled with a time-limited
1740 kernel that runs for a predetermined amount of time
1741 (10 days) before it forces the system to reboot.
1742 This limitation is meant to discourage direct
1743 redistribution of the image.
1744 You must eventually rebuild the image if you want
1745 to remove this restriction.
1746 </note>
1747 </para>
1748</section>
1749
1750<section id='creating-a-new-bsp-layer-using-the-bitbake-layers-script'>
1751 <title>Creating a new BSP Layer Using the <filename>bitbake-layers</filename> Script</title>
1752
1753 <para>
1754 The <filename>bitbake-layers create-layer</filename> script
1755 automates creating a BSP layer.
1756 What makes a layer a "BSP layer" is the presence of at least one machine
1757 configuration file.
1758 Additionally, a BSP layer usually has a kernel recipe
1759 or an append file that leverages off an existing kernel recipe.
1760 The primary requirement, however, is the machine configuration.
1761 </para>
1762
1763 <para>
1764 Use these steps to create a BSP layer:
1765 <itemizedlist>
1766 <listitem><para>
1767 <emphasis>Create a General Layer:</emphasis>
1768 Use the <filename>bitbake-layers</filename> script with the
1769 <filename>create-layer</filename> subcommand to create a
1770 new general layer.
1771 For instructions on how to create a general layer using the
1772 <filename>bitbake-layers</filename> script, see the
1773 "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-general-layer-using-the-bitbake-layers-script'>Creating a General Layer Using the <filename>bitbake-layers</filename> Script</ulink>"
1774 section in the Yocto Project Development Tasks Manual.
1775 </para></listitem>
1776 <listitem><para>
1777 <emphasis>Create a Layer Configuration File:</emphasis>
1778 Every layer needs a layer configuration file.
1779 This configuration file establishes locations for the
1780 layer's recipes, priorities for the layer, and so forth.
1781 You can find examples of <filename>layer.conf</filename>
1782 files in the Yocto Project
1783 <ulink url='&YOCTO_GIT_URL;'>Source Repositories</ulink>.
1784 To get examples of what you need in your configuration
1785 file, locate a layer (e.g. "meta-ti") and examine the
1786 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/meta-ti/tree/conf/layer.conf'></ulink>
1787 file.
1788 </para></listitem>
1789 <listitem><para>
1790 <emphasis>Create a Machine Configuration File:</emphasis>
1791 Create a <filename>conf/machine/</filename><replaceable>bsp_root_name</replaceable><filename>.conf</filename>
1792 file.
1793 See
1794 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta-yocto-bsp/conf/machine'><filename>meta-yocto-bsp/conf/machine</filename></ulink>
1795 for sample
1796 <replaceable>bsp_root_name</replaceable><filename>.conf</filename>
1797 files.
1798 Other samples such as
1799 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/meta-ti/tree/conf/machine'><filename>meta-ti</filename></ulink>
1800 and
1801 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/meta-freescale/tree/conf/machine'><filename>meta-freescale</filename></ulink>
1802 exist from other vendors that have more specific machine
1803 and tuning examples.
1804 </para></listitem>
1805 <listitem><para>
1806 <emphasis>Create a Kernel Recipe:</emphasis>
1807 Create a kernel recipe in <filename>recipes-kernel/linux</filename>
1808 by either using a kernel append file or a new custom kernel
1809 recipe file (e.g. <filename>yocto-linux_4.12.bb</filename>).
1810 The BSP layers mentioned in the previous step also contain different
1811 kernel examples.
1812 See the
1813 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#modifying-an-existing-recipe'>Modifying an Existing Recipe</ulink>"
1814 section in the Yocto Project Linux Kernel Development Manual
1815 for information on how to create a custom kernel.
1816 </para></listitem>
1817 </itemizedlist>
1818 </para>
1819
1820 <para>
1821 The remainder of this section provides a description of
1822 the Yocto Project reference BSP for Beaglebone, which
1823 resides in the
1824 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta-yocto-bsp'><filename>meta-yocto-bsp</filename></ulink>
1825 layer.
1826 </para>
1827
1828 <section id='bsp-layer-configuration-example'>
1829 <title>BSP Layer Configuration Example</title>
1830
1831 <para>
1832 The layer's <filename>conf</filename> directory
1833 contains the <filename>layer.conf</filename>
1834 configuration file.
1835 In this example, the
1836 <filename>conf/layer.conf</filename> is the
1837 following:
1838 <literallayout class='monospaced'>
1839 # We have a conf and classes directory, add to BBPATH
1840 BBPATH .= ":${LAYERDIR}"
1841
1842 # We have recipes-* directories, add to BBFILES
1843 BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
1844 ${LAYERDIR}/recipes-*/*/*.bbappend"
1845
1846 BBFILE_COLLECTIONS += "yoctobsp"
1847 BBFILE_PATTERN_yoctobsp = "^${LAYERDIR}/"
1848 BBFILE_PRIORITY_yoctobsp = "5"
1849 LAYERVERSION_yoctobsp = "4"
1850 LAYERSERIES_COMPAT_yoctobsp = "&DISTRO_NAME_NO_CAP;"
1851 </literallayout>
1852 The variables used in this file configure the
1853 layer.
1854 A good way to learn about layer configuration
1855 files is to examine various files for BSP from
1856 the
1857 <ulink url='&YOCTO_GIT_URL;'>Source Repositories</ulink>.
1858 </para>
1859
1860 <para>
1861 For a detailed description of this particular
1862 layer configuration file, see
1863 "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-layer-config-file-description'>step 3</ulink>
1864 in the discussion that describes how to create
1865 layers in the Yocto Project Development Tasks Manual.
1866 </para>
1867 </section>
1868
1869 <section id='bsp-machine-configuration-example'>
1870 <title>BSP Machine Configuration Example</title>
1871
1872 <para>
1873 As mentioned earlier in this section, the existence
1874 of a machine configuration file is what makes a
1875 layer a BSP layer as compared to a general or
1876 kernel layer.
1877 </para>
1878
1879 <para>
1880 One or more machine configuration files exist in the
1881 <replaceable>bsp_layer</replaceable><filename>/conf/machine/</filename>
1882 directory of the layer:
1883 <literallayout class='monospaced'>
1884 <replaceable>bsp_layer</replaceable><filename>/conf/machine/</filename><replaceable>machine1</replaceable><filename>.conf</filename>
1885 <replaceable>bsp_layer</replaceable><filename>/conf/machine/</filename><replaceable>machine2</replaceable><filename>.conf</filename>
1886 <replaceable>bsp_layer</replaceable><filename>/conf/machine/</filename><replaceable>machine3</replaceable><filename>.conf</filename>
1887 ... more ...
1888 </literallayout>
1889 For example, the machine configuration file for the
1890 <ulink url='http://beagleboard.org/bone'>BeagleBone and BeagleBone Black development boards</ulink>
1891 is located in the layer
1892 <filename>poky/meta-yocto-bsp/conf/machine</filename>
1893 and is named <filename>beaglebone-yocto.conf</filename>:
1894 <literallayout class='monospaced'>
1895 #@TYPE: Machine
1896 #@NAME: Beaglebone-yocto machine
1897 #@DESCRIPTION: Reference machine configuration for http://beagleboard.org/bone and http://beagleboard.org/black boards
1898
1899 PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
1900 XSERVER ?= "xserver-xorg \
1901 xf86-video-modesetting \
1902 "
1903
1904 MACHINE_EXTRA_RRECOMMENDS = "kernel-modules kernel-devicetree"
1905
1906 EXTRA_IMAGEDEPENDS += "u-boot"
1907
1908 DEFAULTTUNE ?= "cortexa8hf-neon"
1909 include conf/machine/include/tune-cortexa8.inc
1910
1911 IMAGE_FSTYPES += "tar.bz2 jffs2 wic wic.bmap"
1912 EXTRA_IMAGECMD_jffs2 = "-lnp "
1913 WKS_FILE ?= "beaglebone-yocto.wks"
1914 IMAGE_INSTALL_append = " kernel-devicetree kernel-image-zimage"
1915 do_image_wic[depends] += "mtools-native:do_populate_sysroot dosfstools-native:do_populate_sysroot"
1916
1917 SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyO0"
1918 SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}"
1919
1920 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
1921 PREFERRED_VERSION_linux-yocto ?= "5.0%"
1922
1923 KERNEL_IMAGETYPE = "zImage"
1924 KERNEL_DEVICETREE = "am335x-bone.dtb am335x-boneblack.dtb am335x-bonegreen.dtb"
1925 KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
1926
1927 SPL_BINARY = "MLO"
1928 UBOOT_SUFFIX = "img"
1929 UBOOT_MACHINE = "am335x_evm_defconfig"
1930 UBOOT_ENTRYPOINT = "0x80008000"
1931 UBOOT_LOADADDRESS = "0x80008000"
1932
1933 MACHINE_FEATURES = "usbgadget usbhost vfat alsa"
1934
1935 IMAGE_BOOT_FILES ?= "u-boot.${UBOOT_SUFFIX} MLO zImage am335x-bone.dtb am335x-boneblack.dtb am335x-bonegreen.dtb"
1936 </literallayout>
1937 The variables used to configure the machine define
1938 machine-specific properties;
1939 for example, machine-dependent packages, machine
1940 tunings, the type of kernel to build, and
1941 U-Boot configurations.
1942 </para>
1943
1944 <para>
1945 The following list provides some explanation
1946 for the statements found in the example reference
1947 machine configuration file for the BeagleBone
1948 development boards.
1949 Realize that much more can be defined as part of
1950 a machine's configuration file.
1951 In general, you can learn about related variables
1952 that this example does not have by locating the
1953 variables in the
1954 "<ulink url='&YOCTO_DOCS_REF_URL;#ref-variables-glos'>Yocto Project Variables Glossary</ulink>"
1955 in the Yocto Project Reference Manual.
1956 <itemizedlist>
1957 <listitem><para>
1958 <ulink url='&YOCTO_DOCS_REF_URL;#var-PREFERRED_PROVIDER'><filename>PREFERRED_PROVIDER_virtual/xserver</filename></ulink>:
1959 The recipe that provides "virtual/xserver" when
1960 more than one provider is found.
1961 In this case, the recipe that provides
1962 "virtual/xserver" is "xserver-xorg", which
1963 exists in
1964 <filename>poky/meta/recipes-graphics/xorg-xserver</filename>.
1965 </para></listitem>
1966 <listitem><para>
1967 <ulink url='&YOCTO_DOCS_REF_URL;#var-XSERVER'><filename>XSERVER</filename></ulink>:
1968 The packages that should be installed to provide
1969 an X server and drivers for the machine.
1970 In this example, the "xserver-xorg" and
1971 "xf86-video-modesetting" are installed.
1972 </para></listitem>
1973 <listitem><para>
1974 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_EXTRA_RRECOMMENDS'><filename>MACHINE_EXTRA_RRECOMMENDS</filename></ulink>:
1975 A list of machine-dependent packages
1976 not essential for booting the image.
1977 Thus, the build does not fail if the packages
1978 do not exist.
1979 However, the packages are required for a
1980 fully-featured image.
1981 <note><title>Tip</title>
1982 Many <filename>MACHINE*</filename> variables
1983 exist that help you configure a particular
1984 piece of hardware.
1985 </note>
1986 </para></listitem>
1987 <listitem><para>
1988 <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_IMAGEDEPENDS'><filename>EXTRA_IMAGEDEPENDS</filename></ulink>:
1989 Recipes to build that do not provide packages
1990 for installing into the root filesystem
1991 but building the image depends on the
1992 recipes.
1993 Sometimes a recipe is required to build
1994 the final image but is not needed in the
1995 root filesystem.
1996 In this case, the U-Boot recipe must be
1997 built for the image.
1998 </para></listitem>
1999 <listitem><para>
2000 <ulink url='&YOCTO_DOCS_REF_URL;#var-DEFAULTTUNE'><filename>DEFAULTTUNE</filename></ulink>:
2001 Machines use tunings to optimize machine,
2002 CPU, and application performance.
2003 These features, which are collectively known
2004 as "tuning features", exist in the
2005 <ulink url='&YOCTO_DOCS_REF_URL;#oe-core'>OpenEmbedded-Core (OE-Core)</ulink>
2006 layer (e.g.
2007 <filename>poky/meta/conf/machine/include</filename>).
2008 In this example, the default tunning file is
2009 "cortexa8hf-neon".
2010 <note>
2011 The <filename>include</filename> statement
2012 that pulls in the
2013 <filename>conf/machine/include/tune-cortexa8.inc</filename>
2014 file provides many tuning possibilities.
2015 </note>
2016 </para></listitem>
2017 <listitem><para>
2018 <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></ulink>:
2019 The formats the OpenEmbedded build system
2020 uses during the build when creating the
2021 root filesystem.
2022 In this example, four types of images are
2023 supported.
2024 </para></listitem>
2025 <listitem><para>
2026 <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_IMAGECMD'><filename>EXTRA_IMAGECMD</filename></ulink>:
2027 Specifies additional options for image
2028 creation commands.
2029 In this example, the "-lnp " option is used
2030 when creating the
2031 <ulink url='https://en.wikipedia.org/wiki/JFFS2'>JFFS2</ulink>
2032 image.
2033 </para></listitem>
2034 <listitem><para>
2035 <ulink url='&YOCTO_DOCS_REF_URL;#var-WKS_FILE'><filename>WKS_FILE</filename></ulink>:
2036 The location of the
2037 <ulink url='&YOCTO_DOCS_REF_URL;#ref-kickstart'>Wic kickstart</ulink>
2038 file used by the OpenEmbedded build system to
2039 create a partitioned image (image.wic).
2040 </para></listitem>
2041 <listitem><para>
2042 <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></ulink>:
2043 Specifies packages to install into an image
2044 through the
2045 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-image'><filename>image</filename></ulink>
2046 class.
2047 Recipes use the <filename>IMAGE_INSTALL</filename>
2048 variable.
2049 </para></listitem>
2050 <listitem><para>
2051 <filename>do_image_wic[depends]</filename>:
2052 A task that is constructed during the build.
2053 In this example, the task depends on specific tools
2054 in order to create the sysroot when buiding a Wic
2055 image.
2056 </para></listitem>
2057 <listitem><para>
2058 <ulink url='&YOCTO_DOCS_REF_URL;#var-SERIAL_CONSOLES'><filename>SERIAL_CONSOLES</filename></ulink>:
2059 Defines a serial console (TTY) to enable using
2060 getty.
2061 In this case, the baud rate is "115200" and the
2062 device name is "ttyO0".
2063 </para></listitem>
2064 <listitem><para>
2065 <ulink url='&YOCTO_DOCS_REF_URL;#var-PREFERRED_PROVIDER'><filename>PREFERRED_PROVIDER_virtual/kernel</filename></ulink>:
2066 Specifies the recipe that provides
2067 "virtual/kernel" when more than one provider
2068 is found.
2069 In this case, the recipe that provides
2070 "virtual/kernel" is "linux-yocto", which
2071 exists in the layer's
2072 <filename>recipes-kernel/linux</filename> directory.
2073 </para></listitem>
2074 <listitem><para>
2075 <ulink url='&YOCTO_DOCS_REF_URL;#var-PREFERRED_VERSION'><filename>PREFERRED_VERSION_linux-yocto</filename></ulink>:
2076 Defines the version of the recipe used
2077 to build the kernel, which is "5.0" in this
2078 case.
2079 </para></listitem>
2080 <listitem><para>
2081 <ulink url='&YOCTO_DOCS_REF_URL;#var-KERNEL_IMAGETYPE'><filename>KERNEL_IMAGETYPE</filename></ulink>:
2082 The type of kernel to build for the device.
2083 In this case, the OpenEmbedded build system
2084 creates a "zImage" image type.
2085 </para></listitem>
2086 <listitem><para>
2087 <ulink url='&YOCTO_DOCS_REF_URL;#var-KERNEL_DEVICETREE'><filename>KERNEL_DEVICETREE</filename></ulink>:
2088 The names of the generated Linux kernel device
2089 trees (i.e. the <filename>*.dtb</filename>) files.
2090 All the device trees for the various BeagleBone
2091 devices are included.
2092<!--
2093 You have to include some *.inc files according to the definition of KERNEL_DEVICETREE.
2094 I don't see where these are being provided.
2095-->
2096 </para></listitem>
2097 <listitem><para>
2098 <ulink url='&YOCTO_DOCS_REF_URL;#var-KERNEL_EXTRA_ARGS'><filename>KERNEL_EXTRA_ARGS</filename></ulink>:
2099 Additional <filename>make</filename>
2100 command-line arguments the OpenEmbedded build
2101 system passes on when compiling the kernel.
2102 In this example, "LOADADDR=${UBOOT_ENTRYPOINT}"
2103 is passed as a command-line argument.
2104 </para></listitem>
2105 <listitem><para>
2106 <ulink url='&YOCTO_DOCS_REF_URL;#var-SPL_BINARY'><filename>SPL_BINARY</filename></ulink>:
2107 Defines the Secondary Program Loader (SPL) binary
2108 type.
2109 In this case, the SPL binary is set to
2110 "MLO", which stands for Multimedia card LOader.
2111 </para>
2112
2113 <para>The BeagleBone development board requires an
2114 SPL to boot and that SPL file type must be MLO.
2115 Consequently, the machine configuration needs to
2116 define <filename>SPL_BINARY</filename> as "MLO".
2117 <note>
2118 For more information on how the SPL variables
2119 are used, see the
2120 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta/recipes-bsp/u-boot/u-boot.inc'><filename>u-boot.inc</filename></ulink>
2121 include file.
2122 </note>
2123 </para></listitem>
2124 <listitem><para>
2125 <ulink url='&YOCTO_DOCS_REF_URL;#var-UBOOT_ENTRYPOINT'><filename>UBOOT_*</filename></ulink>:
2126 Defines various U-Boot configurations needed
2127 to build a U-Boot image.
2128 In this example, a U-Boot image is required
2129 to boot the BeagleBone device.
2130 See the following variables for more information:
2131 <itemizedlist>
2132 <listitem><para>
2133 <ulink url='&YOCTO_DOCS_REF_URL;#var-UBOOT_SUFFIX'><filename>UBOOT_SUFFIX</filename></ulink>:
2134 Points to the generated U-Boot extension.
2135 </para></listitem>
2136 <listitem><para>
2137 <ulink url='&YOCTO_DOCS_REF_URL;#var-UBOOT_MACHINE'><filename>UBOOT_MACHINE</filename></ulink>:
2138 Specifies the value passed on the make command line when building a U-Boot image.
2139 </para></listitem>
2140 <listitem><para>
2141 <ulink url='&YOCTO_DOCS_REF_URL;#var-UBOOT_ENTRYPOINT'><filename>UBOOT_ENTRYPOINT</filename></ulink>:
2142 Specifies the entry point for the U-Boot image.
2143 </para></listitem>
2144 <listitem><para>
2145 <ulink url='&YOCTO_DOCS_REF_URL;#var-UBOOT_LOADADDRESS'><filename>UBOOT_LOADADDRESS</filename></ulink>:
2146 Specifies the load address for the U-Boot image.
2147 </para></listitem>
2148 </itemizedlist>
2149 </para></listitem>
2150 <listitem><para>
2151 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_FEATURES'><filename>MACHINE_FEATURES</filename></ulink>:
2152 Specifies the list of hardware features the
2153 BeagleBone device is capable of supporting.
2154 In this case, the device supports
2155 "usbgadget usbhost vfat alsa".
2156 </para></listitem>
2157 <listitem><para>
2158 <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_BOOT_FILES'><filename>IMAGE_BOOT_FILES</filename></ulink>:
2159 Files installed into the device's boot partition
2160 when preparing the image using the Wic tool
2161 with the <filename>bootimg-partition</filename> or <filename>bootimg-efi</filename>
2162 source plugin.
2163 </para></listitem>
2164 </itemizedlist>
2165 </para>
2166 </section>
2167
2168 <section id='bsp-kernel-recipe-example'>
2169 <title>BSP Kernel Recipe Example</title>
2170
2171 <para>
2172 The kernel recipe used to build the kernel image
2173 for the BeagleBone device was established in the
2174 machine configuration:
2175 <literallayout class='monospaced'>
2176 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
2177 PREFERRED_VERSION_linux-yocto ?= "5.0%"
2178 </literallayout>
2179 The <filename>meta-yocto-bsp/recipes-kernel/linux</filename>
2180 directory in the layer contains metadata used
2181 to build the kernel.
2182 In this case, a kernel append file (i.e.
2183 <filename>linux-yocto_5.0.bbappend</filename>) is used to
2184 override an established kernel recipe (i.e.
2185 <filename>linux-yocto_5.0.bb</filename>), which is
2186 located in
2187 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta/recipes-kernel/linux'></ulink>.
2188 </para>
2189
2190 <para>
2191 Following is the contents of the append file:
2192 <literallayout class='monospaced'>
2193 KBRANCH_genericx86 = "v5.0/standard/base"
2194 KBRANCH_genericx86-64 = "v5.0/standard/base"
2195 KBRANCH_edgerouter = "v5.0/standard/edgerouter"
2196 KBRANCH_beaglebone-yocto = "v5.0/standard/beaglebone"
2197
2198 KMACHINE_genericx86 ?= "common-pc"
2199 KMACHINE_genericx86-64 ?= "common-pc-64"
2200 KMACHINE_beaglebone-yocto ?= "beaglebone"
2201
2202 SRCREV_machine_genericx86 ?= "3df4aae6074e94e794e27fe7f17451d9353cdf3d"
2203 SRCREV_machine_genericx86-64 ?= "3df4aae6074e94e794e27fe7f17451d9353cdf3d"
2204 SRCREV_machine_edgerouter ?= "3df4aae6074e94e794e27fe7f17451d9353cdf3d"
2205 SRCREV_machine_beaglebone-yocto ?= "3df4aae6074e94e794e27fe7f17451d9353cdf3d"
2206
2207 COMPATIBLE_MACHINE_genericx86 = "genericx86"
2208 COMPATIBLE_MACHINE_genericx86-64 = "genericx86-64"
2209 COMPATIBLE_MACHINE_edgerouter = "edgerouter"
2210 COMPATIBLE_MACHINE_beaglebone-yocto = "beaglebone-yocto"
2211
2212 LINUX_VERSION_genericx86 = "5.0.3"
2213 LINUX_VERSION_genericx86-64 = "5.0.3"
2214 LINUX_VERSION_edgerouter = "5.0.3"
2215 LINUX_VERSION_beaglebone-yocto = "5.0.3"
2216 </literallayout>
2217 This particular append file works for all the
2218 machines that are part of the
2219 <filename>meta-yocto-bsp</filename> layer.
2220 The relevant statements are appended with
2221 the "beaglebone-yocto" string.
2222 The OpenEmbedded build system uses these
2223 statements to override similar statements
2224 in the kernel recipe:
2225 <itemizedlist>
2226 <listitem><para>
2227 <ulink url='&YOCTO_DOCS_REF_URL;#var-KBRANCH'><filename>KBRANCH</filename></ulink>:
2228 Identifies the kernel branch that is validated,
2229 patched, and configured during the build.
2230 </para></listitem>
2231 <listitem><para>
2232 <ulink url='&YOCTO_DOCS_REF_URL;#var-KMACHINE'><filename>KMACHINE</filename></ulink>:
2233 Identifies the machine name as known by the
2234 kernel, which is sometimes a different name
2235 than what is known by the OpenEmbedded build
2236 system.
2237 </para></listitem>
2238 <listitem><para>
2239 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRCREV'><filename>SRCREV</filename></ulink>:
2240 Identifies the revision of the source code used
2241 to build the image.
2242 </para></listitem>
2243 <listitem><para>
2244 <ulink url='&YOCTO_DOCS_REF_URL;#var-COMPATIBLE_MACHINE'><filename>COMPATIBLE_MACHINE</filename></ulink>:
2245 A regular expression that resolves to one or
2246 more target machines with which the recipe
2247 is compatible.
2248 </para></listitem>
2249 <listitem><para>
2250 <ulink url='&YOCTO_DOCS_REF_URL;#var-LINUX_VERSION'><filename>LINUX_VERSION</filename></ulink>:
2251 The Linux version from kernel.org used by
2252 the OpenEmbedded build system to build the
2253 kernel image.
2254 </para></listitem>
2255 </itemizedlist>
2256 </para>
2257 </section>
2258</section>
2259</chapter>
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml
deleted file mode 100644
index 247f6abfd4..0000000000
--- a/documentation/dev-manual/dev-manual-common-tasks.xml
+++ /dev/null
@@ -1,16081 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='extendpoky'>
7
8<title>Common Tasks</title>
9 <para>
10 This chapter describes fundamental procedures such as creating layers,
11 adding new software packages, extending or customizing images,
12 porting work to new hardware (adding a new machine), and so forth.
13 You will find that the procedures documented here occur often in the
14 development cycle using the Yocto Project.
15 </para>
16
17 <section id="understanding-and-creating-layers">
18 <title>Understanding and Creating Layers</title>
19
20 <para>
21 The OpenEmbedded build system supports organizing
22 <ulink url='&YOCTO_DOCS_REF_URL;#metadata'>Metadata</ulink> into
23 multiple layers.
24 Layers allow you to isolate different types of customizations from
25 each other.
26 For introductory information on the Yocto Project Layer Model,
27 see the
28 "<ulink url='&YOCTO_DOCS_OM_URL;#the-yocto-project-layer-model'>The Yocto Project Layer Model</ulink>"
29 section in the Yocto Project Overview and Concepts Manual.
30 </para>
31
32 <section id='creating-your-own-layer'>
33 <title>Creating Your Own Layer</title>
34
35 <para>
36 It is very easy to create your own layers to use with the
37 OpenEmbedded build system.
38 The Yocto Project ships with tools that speed up creating
39 layers.
40 This section describes the steps you perform by hand to create
41 layers so that you can better understand them.
42 For information about the layer-creation tools, see the
43 "<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-bitbake-layers-script'>Creating a New BSP Layer Using the <filename>bitbake-layers</filename> Script</ulink>"
44 section in the Yocto Project Board Support Package (BSP)
45 Developer's Guide and the
46 "<link linkend='creating-a-general-layer-using-the-bitbake-layers-script'>Creating a General Layer Using the <filename>bitbake-layers</filename> Script</link>"
47 section further down in this manual.
48 </para>
49
50 <para>
51 Follow these general steps to create your layer without using
52 tools:
53 <orderedlist>
54 <listitem><para>
55 <emphasis>Check Existing Layers:</emphasis>
56 Before creating a new layer, you should be sure someone
57 has not already created a layer containing the Metadata
58 you need.
59 You can see the
60 <ulink url='http://layers.openembedded.org/layerindex/layers/'>OpenEmbedded Metadata Index</ulink>
61 for a list of layers from the OpenEmbedded community
62 that can be used in the Yocto Project.
63 You could find a layer that is identical or close to
64 what you need.
65 </para></listitem>
66 <listitem><para>
67 <emphasis>Create a Directory:</emphasis>
68 Create the directory for your layer.
69 When you create the layer, be sure to create the
70 directory in an area not associated with the
71 Yocto Project
72 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
73 (e.g. the cloned <filename>poky</filename> repository).
74 </para>
75
76 <para>While not strictly required, prepend the name of
77 the directory with the string "meta-".
78 For example:
79 <literallayout class='monospaced'>
80 meta-mylayer
81 meta-GUI_xyz
82 meta-mymachine
83 </literallayout>
84 With rare exceptions, a layer's name follows this
85 form:
86 <literallayout class='monospaced'>
87 meta-<replaceable>root_name</replaceable>
88 </literallayout>
89 Following this layer naming convention can
90 save you trouble later when tools, components, or
91 variables "assume" your layer name begins with "meta-".
92 A notable example is in configuration files as
93 shown in the following step where layer names without
94 the "meta-" string are appended
95 to several variables used in the configuration.
96 </para></listitem>
97 <listitem><para id='dev-layer-config-file-description'>
98 <emphasis>Create a Layer Configuration File:</emphasis>
99 Inside your new layer folder, you need to create a
100 <filename>conf/layer.conf</filename> file.
101 It is easiest to take an existing layer configuration
102 file and copy that to your layer's
103 <filename>conf</filename> directory and then modify the
104 file as needed.</para>
105
106 <para>The
107 <filename>meta-yocto-bsp/conf/layer.conf</filename> file
108 in the Yocto Project
109 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta-yocto-bsp/conf'>Source Repositories</ulink>
110 demonstrates the required syntax.
111 For your layer, you need to replace "yoctobsp" with
112 a unique identifier for your layer (e.g. "machinexyz"
113 for a layer named "meta-machinexyz"):
114 <literallayout class='monospaced'>
115 # We have a conf and classes directory, add to BBPATH
116 BBPATH .= ":${LAYERDIR}"
117
118 # We have recipes-* directories, add to BBFILES
119 BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
120 ${LAYERDIR}/recipes-*/*/*.bbappend"
121
122 BBFILE_COLLECTIONS += "yoctobsp"
123 BBFILE_PATTERN_yoctobsp = "^${LAYERDIR}/"
124 BBFILE_PRIORITY_yoctobsp = "5"
125 LAYERVERSION_yoctobsp = "4"
126 LAYERSERIES_COMPAT_yoctobsp = "&DISTRO_NAME_NO_CAP;"
127 </literallayout>
128 Following is an explanation of the layer configuration
129 file:
130 <itemizedlist>
131 <listitem><para>
132 <ulink url='&YOCTO_DOCS_REF_URL;#var-BBPATH'><filename>BBPATH</filename></ulink>:
133 Adds the layer's root directory to BitBake's
134 search path.
135 Through the use of the
136 <filename>BBPATH</filename> variable, BitBake
137 locates class files
138 (<filename>.bbclass</filename>),
139 configuration files, and files that are
140 included with <filename>include</filename> and
141 <filename>require</filename> statements.
142 For these cases, BitBake uses the first file
143 that matches the name found in
144 <filename>BBPATH</filename>.
145 This is similar to the way the
146 <filename>PATH</filename> variable is used for
147 binaries.
148 It is recommended, therefore, that you use
149 unique class and configuration filenames in
150 your custom layer.
151 </para></listitem>
152 <listitem><para>
153 <ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILES'><filename>BBFILES</filename></ulink>:
154 Defines the location for all recipes in the
155 layer.
156 </para></listitem>
157 <listitem><para>
158 <ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILE_COLLECTIONS'><filename>BBFILE_COLLECTIONS</filename></ulink>:
159 Establishes the current layer through a
160 unique identifier that is used throughout the
161 OpenEmbedded build system to refer to the layer.
162 In this example, the identifier "yoctobsp" is
163 the representation for the container layer
164 named "meta-yocto-bsp".
165 </para></listitem>
166 <listitem><para>
167 <ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILE_PATTERN'><filename>BBFILE_PATTERN</filename></ulink>:
168 Expands immediately during parsing to
169 provide the directory of the layer.
170 </para></listitem>
171 <listitem><para>
172 <ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILE_PRIORITY'><filename>BBFILE_PRIORITY</filename></ulink>:
173 Establishes a priority to use for
174 recipes in the layer when the OpenEmbedded build
175 finds recipes of the same name in different
176 layers.
177 </para></listitem>
178 <listitem><para>
179 <ulink url='&YOCTO_DOCS_REF_URL;#var-LAYERVERSION'><filename>LAYERVERSION</filename></ulink>:
180 Establishes a version number for the layer.
181 You can use this version number to specify this
182 exact version of the layer as a dependency when
183 using the
184 <ulink url='&YOCTO_DOCS_REF_URL;#var-LAYERDEPENDS'><filename>LAYERDEPENDS</filename></ulink>
185 variable.
186 </para></listitem>
187 <listitem><para>
188 <ulink url='&YOCTO_DOCS_REF_URL;#var-LAYERDEPENDS'><filename>LAYERDEPENDS</filename></ulink>:
189 Lists all layers on which this layer depends (if any).
190 </para></listitem>
191 <listitem><para>
192 <ulink url='&YOCTO_DOCS_REF_URL;#var-LAYERSERIES_COMPAT'><filename>LAYERSERIES_COMPAT</filename></ulink>:
193 Lists the
194 <ulink url='&YOCTO_WIKI_URL;/wiki/Releases'>Yocto Project</ulink>
195 releases for which the current version is
196 compatible.
197 This variable is a good way to indicate if
198 your particular layer is current.
199 </para></listitem>
200 </itemizedlist>
201 </para></listitem>
202 <listitem><para>
203 <emphasis>Add Content:</emphasis>
204 Depending on the type of layer, add the content.
205 If the layer adds support for a machine, add the machine
206 configuration in a <filename>conf/machine/</filename>
207 file within the layer.
208 If the layer adds distro policy, add the distro
209 configuration in a <filename>conf/distro/</filename>
210 file within the layer.
211 If the layer introduces new recipes, put the recipes
212 you need in <filename>recipes-*</filename>
213 subdirectories within the layer.
214 <note>
215 For an explanation of layer hierarchy that
216 is compliant with the Yocto Project, see
217 the
218 "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-filelayout'>Example Filesystem Layout</ulink>"
219 section in the Yocto Project Board
220 Support Package (BSP) Developer's Guide.
221 </note>
222 </para></listitem>
223 <listitem><para>
224 <emphasis>Optionally Test for Compatibility:</emphasis>
225 If you want permission to use the Yocto Project
226 Compatibility logo with your layer or application that
227 uses your layer, perform the steps to apply for
228 compatibility.
229 See the
230 "<link linkend='making-sure-your-layer-is-compatible-with-yocto-project'>Making Sure Your Layer is Compatible With Yocto Project</link>"
231 section for more information.
232 </para></listitem>
233 </orderedlist>
234 </para>
235 </section>
236
237 <section id='best-practices-to-follow-when-creating-layers'>
238 <title>Following Best Practices When Creating Layers</title>
239
240 <para>
241 To create layers that are easier to maintain and that will
242 not impact builds for other machines, you should consider the
243 information in the following list:
244 <itemizedlist>
245 <listitem><para>
246 <emphasis>Avoid "Overlaying" Entire Recipes from Other Layers in Your Configuration:</emphasis>
247 In other words, do not copy an entire recipe into your
248 layer and then modify it.
249 Rather, use an append file
250 (<filename>.bbappend</filename>) to override only those
251 parts of the original recipe you need to modify.
252 </para></listitem>
253 <listitem><para>
254 <emphasis>Avoid Duplicating Include Files:</emphasis>
255 Use append files (<filename>.bbappend</filename>)
256 for each recipe that uses an include file.
257 Or, if you are introducing a new recipe that requires
258 the included file, use the path relative to the
259 original layer directory to refer to the file.
260 For example, use
261 <filename>require recipes-core/</filename><replaceable>package</replaceable><filename>/</filename><replaceable>file</replaceable><filename>.inc</filename>
262 instead of
263 <filename>require </filename><replaceable>file</replaceable><filename>.inc</filename>.
264 If you're finding you have to overlay the include file,
265 it could indicate a deficiency in the include file in
266 the layer to which it originally belongs.
267 If this is the case, you should try to address that
268 deficiency instead of overlaying the include file.
269 For example, you could address this by getting the
270 maintainer of the include file to add a variable or
271 variables to make it easy to override the parts needing
272 to be overridden.
273 </para></listitem>
274 <listitem><para>
275 <emphasis>Structure Your Layers:</emphasis>
276 Proper use of overrides within append files and
277 placement of machine-specific files within your layer
278 can ensure that a build is not using the wrong Metadata
279 and negatively impacting a build for a different
280 machine.
281 Following are some examples:
282 <itemizedlist>
283 <listitem><para>
284 <emphasis>Modify Variables to Support a
285 Different Machine:</emphasis>
286 Suppose you have a layer named
287 <filename>meta-one</filename> that adds support
288 for building machine "one".
289 To do so, you use an append file named
290 <filename>base-files.bbappend</filename> and
291 create a dependency on "foo" by altering the
292 <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPENDS'><filename>DEPENDS</filename></ulink>
293 variable:
294 <literallayout class='monospaced'>
295 DEPENDS = "foo"
296 </literallayout>
297 The dependency is created during any build that
298 includes the layer
299 <filename>meta-one</filename>.
300 However, you might not want this dependency
301 for all machines.
302 For example, suppose you are building for
303 machine "two" but your
304 <filename>bblayers.conf</filename> file has the
305 <filename>meta-one</filename> layer included.
306 During the build, the
307 <filename>base-files</filename> for machine
308 "two" will also have the dependency on
309 <filename>foo</filename>.</para>
310 <para>To make sure your changes apply only when
311 building machine "one", use a machine override
312 with the <filename>DEPENDS</filename> statement:
313 <literallayout class='monospaced'>
314 DEPENDS_one = "foo"
315 </literallayout>
316 You should follow the same strategy when using
317 <filename>_append</filename> and
318 <filename>_prepend</filename> operations:
319 <literallayout class='monospaced'>
320 DEPENDS_append_one = " foo"
321 DEPENDS_prepend_one = "foo "
322 </literallayout>
323 As an actual example, here's a snippet from the
324 generic kernel include file
325 <filename>linux-yocto.inc</filename>,
326 wherein the kernel compile and link options are
327 adjusted in the case of a subset of the supported
328 architectures:
329 <literallayout class='monospaced'>
330 DEPENDS_append_aarch64 = " libgcc"
331 KERNEL_CC_append_aarch64 = " ${TOOLCHAIN_OPTIONS}"
332 KERNEL_LD_append_aarch64 = " ${TOOLCHAIN_OPTIONS}"
333
334 DEPENDS_append_nios2 = " libgcc"
335 KERNEL_CC_append_nios2 = " ${TOOLCHAIN_OPTIONS}"
336 KERNEL_LD_append_nios2 = " ${TOOLCHAIN_OPTIONS}"
337
338 DEPENDS_append_arc = " libgcc"
339 KERNEL_CC_append_arc = " ${TOOLCHAIN_OPTIONS}"
340 KERNEL_LD_append_arc = " ${TOOLCHAIN_OPTIONS}"
341
342 KERNEL_FEATURES_append_qemuall=" features/debug/printk.scc"
343 </literallayout>
344 <note>
345 Avoiding "+=" and "=+" and using
346 machine-specific
347 <filename>_append</filename>
348 and <filename>_prepend</filename> operations
349 is recommended as well.
350 </note>
351 </para></listitem>
352 <listitem><para>
353 <emphasis>Place Machine-Specific Files in
354 Machine-Specific Locations:</emphasis>
355 When you have a base recipe, such as
356 <filename>base-files.bb</filename>, that
357 contains a
358 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
359 statement to a file, you can use an append file
360 to cause the build to use your own version of
361 the file.
362 For example, an append file in your layer at
363 <filename>meta-one/recipes-core/base-files/base-files.bbappend</filename>
364 could extend
365 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESPATH'><filename>FILESPATH</filename></ulink>
366 using
367 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>
368 as follows:
369 <literallayout class='monospaced'>
370 FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
371 </literallayout>
372 The build for machine "one" will pick up your
373 machine-specific file as long as you have the
374 file in
375 <filename>meta-one/recipes-core/base-files/base-files/</filename>.
376 However, if you are building for a different
377 machine and the
378 <filename>bblayers.conf</filename> file includes
379 the <filename>meta-one</filename> layer and
380 the location of your machine-specific file is
381 the first location where that file is found
382 according to <filename>FILESPATH</filename>,
383 builds for all machines will also use that
384 machine-specific file.</para>
385 <para>You can make sure that a machine-specific
386 file is used for a particular machine by putting
387 the file in a subdirectory specific to the
388 machine.
389 For example, rather than placing the file in
390 <filename>meta-one/recipes-core/base-files/base-files/</filename>
391 as shown above, put it in
392 <filename>meta-one/recipes-core/base-files/base-files/one/</filename>.
393 Not only does this make sure the file is used
394 only when building for machine "one", but the
395 build process locates the file more quickly.</para>
396 <para>In summary, you need to place all files
397 referenced from <filename>SRC_URI</filename>
398 in a machine-specific subdirectory within the
399 layer in order to restrict those files to
400 machine-specific builds.
401 </para></listitem>
402 </itemizedlist>
403 </para></listitem>
404 <listitem><para>
405 <emphasis>Perform Steps to Apply for Yocto Project Compatibility:</emphasis>
406 If you want permission to use the
407 Yocto Project Compatibility logo with your layer
408 or application that uses your layer, perform the
409 steps to apply for compatibility.
410 See the
411 "<link linkend='making-sure-your-layer-is-compatible-with-yocto-project'>Making Sure Your Layer is Compatible With Yocto Project</link>"
412 section for more information.
413 </para></listitem>
414 <listitem><para>
415 <emphasis>Follow the Layer Naming Convention:</emphasis>
416 Store custom layers in a Git repository that use the
417 <filename>meta-<replaceable>layer_name</replaceable></filename>
418 format.
419 </para></listitem>
420 <listitem><para>
421 <emphasis>Group Your Layers Locally:</emphasis>
422 Clone your repository alongside other cloned
423 <filename>meta</filename> directories from the
424 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
425 </para></listitem>
426 </itemizedlist>
427 </para>
428 </section>
429
430 <section id='making-sure-your-layer-is-compatible-with-yocto-project'>
431 <title>Making Sure Your Layer is Compatible With Yocto Project</title>
432
433 <para>
434 When you create a layer used with the Yocto Project, it is
435 advantageous to make sure that the layer interacts well with
436 existing Yocto Project layers (i.e. the layer is compatible
437 with the Yocto Project).
438 Ensuring compatibility makes the layer easy to be consumed
439 by others in the Yocto Project community and could allow you
440 permission to use the Yocto Project Compatible Logo.
441 <note>
442 Only Yocto Project member organizations are permitted to
443 use the Yocto Project Compatible Logo.
444 The logo is not available for general use.
445 For information on how to become a Yocto Project member
446 organization, see the
447 <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink>.
448 </note>
449 </para>
450
451 <para>
452 The Yocto Project Compatibility Program consists of a layer
453 application process that requests permission to use the Yocto
454 Project Compatibility Logo for your layer and application.
455 The process consists of two parts:
456 <orderedlist>
457 <listitem><para>
458 Successfully passing a script
459 (<filename>yocto-check-layer</filename>) that
460 when run against your layer, tests it against
461 constraints based on experiences of how layers have
462 worked in the real world and where pitfalls have been
463 found.
464 Getting a "PASS" result from the script is required for
465 successful compatibility registration.
466 </para></listitem>
467 <listitem><para>
468 Completion of an application acceptance form, which
469 you can find at
470 <ulink url='https://www.yoctoproject.org/webform/yocto-project-compatible-registration'></ulink>.
471 </para></listitem>
472 </orderedlist>
473 </para>
474
475 <para>
476 To be granted permission to use the logo, you need to satisfy
477 the following:
478 <itemizedlist>
479 <listitem><para>
480 Be able to check the box indicating that you
481 got a "PASS" when running the script against your
482 layer.
483 </para></listitem>
484 <listitem><para>
485 Answer "Yes" to the questions on the form or have an
486 acceptable explanation for any questions answered "No".
487 </para></listitem>
488 <listitem><para>
489 Be a Yocto Project Member Organization.
490 </para></listitem>
491 </itemizedlist>
492 </para>
493
494 <para>
495 The remainder of this section presents information on the
496 registration form and on the
497 <filename>yocto-check-layer</filename> script.
498 </para>
499
500 <section id='yocto-project-compatible-program-application'>
501 <title>Yocto Project Compatible Program Application</title>
502
503 <para>
504 Use the form to apply for your layer's approval.
505 Upon successful application, you can use the Yocto
506 Project Compatibility Logo with your layer and the
507 application that uses your layer.
508 </para>
509
510 <para>
511 To access the form, use this link:
512 <ulink url='https://www.yoctoproject.org/webform/yocto-project-compatible-registration'></ulink>.
513 Follow the instructions on the form to complete your
514 application.
515 </para>
516
517 <para>
518 The application consists of the following sections:
519 <itemizedlist>
520 <listitem><para>
521 <emphasis>Contact Information:</emphasis>
522 Provide your contact information as the fields
523 require.
524 Along with your information, provide the
525 released versions of the Yocto Project for which
526 your layer is compatible.
527 </para></listitem>
528 <listitem><para>
529 <emphasis>Acceptance Criteria:</emphasis>
530 Provide "Yes" or "No" answers for each of the
531 items in the checklist.
532 Space exists at the bottom of the form for any
533 explanations for items for which you answered "No".
534 </para></listitem>
535 <listitem><para>
536 <emphasis>Recommendations:</emphasis>
537 Provide answers for the questions regarding Linux
538 kernel use and build success.
539 </para></listitem>
540 </itemizedlist>
541 </para>
542 </section>
543
544 <section id='yocto-check-layer-script'>
545 <title><filename>yocto-check-layer</filename> Script</title>
546
547 <para>
548 The <filename>yocto-check-layer</filename> script
549 provides you a way to assess how compatible your layer is
550 with the Yocto Project.
551 You should run this script prior to using the form to
552 apply for compatibility as described in the previous
553 section.
554 You need to achieve a "PASS" result in order to have
555 your application form successfully processed.
556 </para>
557
558 <para>
559 The script divides tests into three areas: COMMON, BSP,
560 and DISTRO.
561 For example, given a distribution layer (DISTRO), the
562 layer must pass both the COMMON and DISTRO related tests.
563 Furthermore, if your layer is a BSP layer, the layer must
564 pass the COMMON and BSP set of tests.
565 </para>
566
567 <para>
568 To execute the script, enter the following commands from
569 your build directory:
570 <literallayout class='monospaced'>
571 $ source oe-init-build-env
572 $ yocto-check-layer <replaceable>your_layer_directory</replaceable>
573 </literallayout>
574 Be sure to provide the actual directory for your layer
575 as part of the command.
576 </para>
577
578 <para>
579 Entering the command causes the script to determine the
580 type of layer and then to execute a set of specific
581 tests against the layer.
582 The following list overviews the test:
583 <itemizedlist>
584 <listitem><para>
585 <filename>common.test_readme</filename>:
586 Tests if a <filename>README</filename> file
587 exists in the layer and the file is not empty.
588 </para></listitem>
589 <listitem><para>
590 <filename>common.test_parse</filename>:
591 Tests to make sure that BitBake can parse the
592 files without error (i.e.
593 <filename>bitbake -p</filename>).
594 </para></listitem>
595 <listitem><para>
596 <filename>common.test_show_environment</filename>:
597 Tests that the global or per-recipe environment
598 is in order without errors (i.e.
599 <filename>bitbake -e</filename>).
600 </para></listitem>
601 <listitem><para>
602 <filename>common.test_world</filename>:
603 Verifies that <filename>bitbake world</filename> works.
604 </para></listitem>
605 <listitem><para>
606 <filename>common.test_signatures</filename>:
607 Tests to be sure that BSP and DISTRO layers do not
608 come with recipes that change signatures.
609 </para></listitem>
610 <listitem><para>
611 <filename>common.test_layerseries_compat</filename>:
612 Verifies layer compatibility is set properly.
613 </para></listitem>
614 <listitem><para>
615 <filename>bsp.test_bsp_defines_machines</filename>:
616 Tests if a BSP layer has machine configurations.
617 </para></listitem>
618 <listitem><para>
619 <filename>bsp.test_bsp_no_set_machine</filename>:
620 Tests to ensure a BSP layer does not set the
621 machine when the layer is added.
622 </para></listitem>
623 <listitem><para>
624 <filename>bsp.test_machine_world</filename>:
625 Verifies that <filename>bitbake world</filename>
626 works regardless of which machine is selected.
627 </para></listitem>
628 <listitem><para>
629 <filename>bsp.test_machine_signatures</filename>:
630 Verifies that building for a particular machine
631 affects only the signature of tasks specific to that
632 machine.
633 </para></listitem>
634 <listitem><para>
635 <filename>distro.test_distro_defines_distros</filename>:
636 Tests if a DISTRO layer has distro configurations.
637 </para></listitem>
638 <listitem><para>
639 <filename>distro.test_distro_no_set_distros</filename>:
640 Tests to ensure a DISTRO layer does not set the
641 distribution when the layer is added.
642 </para></listitem>
643 </itemizedlist>
644 </para>
645 </section>
646 </section>
647
648 <section id='enabling-your-layer'>
649 <title>Enabling Your Layer</title>
650
651 <para>
652 Before the OpenEmbedded build system can use your new layer,
653 you need to enable it.
654 To enable your layer, simply add your layer's path to the
655 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-BBLAYERS'>BBLAYERS</ulink></filename>
656 variable in your <filename>conf/bblayers.conf</filename> file,
657 which is found in the
658 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
659 The following example shows how to enable a layer named
660 <filename>meta-mylayer</filename>:
661 <literallayout class='monospaced'>
662 # POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
663 # changes incompatibly
664 POKY_BBLAYERS_CONF_VERSION = "2"
665
666 BBPATH = "${TOPDIR}"
667 BBFILES ?= ""
668
669 BBLAYERS ?= " \
670 /home/<replaceable>user</replaceable>/poky/meta \
671 /home/<replaceable>user</replaceable>/poky/meta-poky \
672 /home/<replaceable>user</replaceable>/poky/meta-yocto-bsp \
673 /home/<replaceable>user</replaceable>/poky/meta-mylayer \
674 "
675 </literallayout>
676 </para>
677
678 <para>
679 BitBake parses each <filename>conf/layer.conf</filename> file
680 from the top down as specified in the
681 <filename>BBLAYERS</filename> variable
682 within the <filename>conf/bblayers.conf</filename> file.
683 During the processing of each
684 <filename>conf/layer.conf</filename> file, BitBake adds the
685 recipes, classes and configurations contained within the
686 particular layer to the source directory.
687 </para>
688 </section>
689
690 <section id='using-bbappend-files'>
691 <title>Using .bbappend Files in Your Layer</title>
692
693 <para>
694 A recipe that appends Metadata to another recipe is called a
695 BitBake append file.
696 A BitBake append file uses the <filename>.bbappend</filename>
697 file type suffix, while the corresponding recipe to which
698 Metadata is being appended uses the <filename>.bb</filename>
699 file type suffix.
700 </para>
701
702 <para>
703 You can use a <filename>.bbappend</filename> file in your
704 layer to make additions or changes to the content of another
705 layer's recipe without having to copy the other layer's
706 recipe into your layer.
707 Your <filename>.bbappend</filename> file resides in your layer,
708 while the main <filename>.bb</filename> recipe file to
709 which you are appending Metadata resides in a different layer.
710 </para>
711
712 <para>
713 Being able to append information to an existing recipe not only
714 avoids duplication, but also automatically applies recipe
715 changes from a different layer into your layer.
716 If you were copying recipes, you would have to manually merge
717 changes as they occur.
718 </para>
719
720 <para>
721 When you create an append file, you must use the same root
722 name as the corresponding recipe file.
723 For example, the append file
724 <filename>someapp_&DISTRO;.bbappend</filename> must apply to
725 <filename>someapp_&DISTRO;.bb</filename>.
726 This means the original recipe and append file names are
727 version number-specific.
728 If the corresponding recipe is renamed to update to a newer
729 version, you must also rename and possibly update
730 the corresponding <filename>.bbappend</filename> as well.
731 During the build process, BitBake displays an error on starting
732 if it detects a <filename>.bbappend</filename> file that does
733 not have a corresponding recipe with a matching name.
734 See the
735 <ulink url='&YOCTO_DOCS_REF_URL;#var-BB_DANGLINGAPPENDS_WARNONLY'><filename>BB_DANGLINGAPPENDS_WARNONLY</filename></ulink>
736 variable for information on how to handle this error.
737 </para>
738
739 <para>
740 As an example, consider the main formfactor recipe and a
741 corresponding formfactor append file both from the
742 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
743 Here is the main formfactor recipe, which is named
744 <filename>formfactor_0.0.bb</filename> and located in the
745 "meta" layer at
746 <filename>meta/recipes-bsp/formfactor</filename>:
747 <literallayout class='monospaced'>
748 SUMMARY = "Device formfactor information"
749 SECTION = "base"
750 LICENSE = "MIT"
751 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
752 PR = "r45"
753
754 SRC_URI = "file://config file://machconfig"
755 S = "${WORKDIR}"
756
757 PACKAGE_ARCH = "${MACHINE_ARCH}"
758 INHIBIT_DEFAULT_DEPS = "1"
759
760 do_install() {
761 # Install file only if it has contents
762 install -d ${D}${sysconfdir}/formfactor/
763 install -m 0644 ${S}/config ${D}${sysconfdir}/formfactor/
764 if [ -s "${S}/machconfig" ]; then
765 install -m 0644 ${S}/machconfig ${D}${sysconfdir}/formfactor/
766 fi
767 } </literallayout>
768 In the main recipe, note the
769 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
770 variable, which tells the OpenEmbedded build system where to
771 find files during the build.
772 </para>
773
774 <para>
775 Following is the append file, which is named
776 <filename>formfactor_0.0.bbappend</filename> and is from the
777 Raspberry Pi BSP Layer named
778 <filename>meta-raspberrypi</filename>.
779 The file is in the layer at
780 <filename>recipes-bsp/formfactor</filename>:
781 <literallayout class='monospaced'>
782 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
783 </literallayout>
784 </para>
785
786 <para>
787 By default, the build system uses the
788 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESPATH'><filename>FILESPATH</filename></ulink>
789 variable to locate files.
790 This append file extends the locations by setting the
791 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>
792 variable.
793 Setting this variable in the <filename>.bbappend</filename>
794 file is the most reliable and recommended method for adding
795 directories to the search path used by the build system
796 to find files.
797 </para>
798
799 <para>
800 The statement in this example extends the directories to
801 include
802 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-THISDIR'><filename>THISDIR</filename></ulink><filename>}/${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink><filename>}</filename>,
803 which resolves to a directory named
804 <filename>formfactor</filename> in the same directory
805 in which the append file resides (i.e.
806 <filename>meta-raspberrypi/recipes-bsp/formfactor</filename>.
807 This implies that you must have the supporting directory
808 structure set up that will contain any files or patches you
809 will be including from the layer.
810 </para>
811
812 <para>
813 Using the immediate expansion assignment operator
814 <filename>:=</filename> is important because of the reference
815 to <filename>THISDIR</filename>.
816 The trailing colon character is important as it ensures that
817 items in the list remain colon-separated.
818 <note>
819 <para>
820 BitBake automatically defines the
821 <filename>THISDIR</filename> variable.
822 You should never set this variable yourself.
823 Using "_prepend" as part of the
824 <filename>FILESEXTRAPATHS</filename> ensures your path
825 will be searched prior to other paths in the final
826 list.
827 </para>
828
829 <para>
830 Also, not all append files add extra files.
831 Many append files simply exist to add build options
832 (e.g. <filename>systemd</filename>).
833 For these cases, your append file would not even
834 use the <filename>FILESEXTRAPATHS</filename> statement.
835 </para>
836 </note>
837 </para>
838 </section>
839
840 <section id='prioritizing-your-layer'>
841 <title>Prioritizing Your Layer</title>
842
843 <para>
844 Each layer is assigned a priority value.
845 Priority values control which layer takes precedence if there
846 are recipe files with the same name in multiple layers.
847 For these cases, the recipe file from the layer with a higher
848 priority number takes precedence.
849 Priority values also affect the order in which multiple
850 <filename>.bbappend</filename> files for the same recipe are
851 applied.
852 You can either specify the priority manually, or allow the
853 build system to calculate it based on the layer's dependencies.
854 </para>
855
856 <para>
857 To specify the layer's priority manually, use the
858 <ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILE_PRIORITY'><filename>BBFILE_PRIORITY</filename></ulink>
859 variable and append the layer's root name:
860 <literallayout class='monospaced'>
861 BBFILE_PRIORITY_mylayer = "1"
862 </literallayout>
863 </para>
864
865 <note>
866 <para>It is possible for a recipe with a lower version number
867 <ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>
868 in a layer that has a higher priority to take precedence.</para>
869 <para>Also, the layer priority does not currently affect the
870 precedence order of <filename>.conf</filename>
871 or <filename>.bbclass</filename> files.
872 Future versions of BitBake might address this.</para>
873 </note>
874 </section>
875
876 <section id='managing-layers'>
877 <title>Managing Layers</title>
878
879 <para>
880 You can use the BitBake layer management tool
881 <filename>bitbake-layers</filename> to provide a view
882 into the structure of recipes across a multi-layer project.
883 Being able to generate output that reports on configured layers
884 with their paths and priorities and on
885 <filename>.bbappend</filename> files and their applicable
886 recipes can help to reveal potential problems.
887 </para>
888
889 <para>
890 For help on the BitBake layer management tool, use the
891 following command:
892 <literallayout class='monospaced'>
893 $ bitbake-layers --help
894 NOTE: Starting bitbake server...
895 usage: bitbake-layers [-d] [-q] [-F] [--color COLOR] [-h] &lt;subcommand&gt; ...
896
897 BitBake layers utility
898
899 optional arguments:
900 -d, --debug Enable debug output
901 -q, --quiet Print only errors
902 -F, --force Force add without recipe parse verification
903 --color COLOR Colorize output (where COLOR is auto, always, never)
904 -h, --help show this help message and exit
905
906 subcommands:
907 &lt;subcommand&gt;
908 show-layers show current configured layers.
909 show-overlayed list overlayed recipes (where the same recipe exists
910 in another layer)
911 show-recipes list available recipes, showing the layer they are
912 provided by
913 show-appends list bbappend files and recipe files they apply to
914 show-cross-depends Show dependencies between recipes that cross layer
915 boundaries.
916 add-layer Add one or more layers to bblayers.conf.
917 remove-layer Remove one or more layers from bblayers.conf.
918 flatten flatten layer configuration into a separate output
919 directory.
920 layerindex-fetch Fetches a layer from a layer index along with its
921 dependent layers, and adds them to conf/bblayers.conf.
922 layerindex-show-depends
923 Find layer dependencies from layer index.
924 create-layer Create a basic layer
925
926 Use bitbake-layers &lt;subcommand&gt; --help to get help on a specific command
927 </literallayout>
928 </para>
929
930 <para>
931 The following list describes the available commands:
932 <itemizedlist>
933 <listitem><para>
934 <emphasis><filename>help:</filename></emphasis>
935 Displays general help or help on a specified command.
936 </para></listitem>
937 <listitem><para>
938 <emphasis><filename>show-layers:</filename></emphasis>
939 Shows the current configured layers.
940 </para></listitem>
941 <listitem><para>
942 <emphasis><filename>show-overlayed:</filename></emphasis>
943 Lists overlayed recipes.
944 A recipe is overlayed when a recipe with the same name
945 exists in another layer that has a higher layer
946 priority.
947 </para></listitem>
948 <listitem><para>
949 <emphasis><filename>show-recipes:</filename></emphasis>
950 Lists available recipes and the layers that provide them.
951 </para></listitem>
952 <listitem><para>
953 <emphasis><filename>show-appends:</filename></emphasis>
954 Lists <filename>.bbappend</filename> files and the
955 recipe files to which they apply.
956 </para></listitem>
957 <listitem><para>
958 <emphasis><filename>show-cross-depends:</filename></emphasis>
959 Lists dependency relationships between recipes that
960 cross layer boundaries.
961 </para></listitem>
962 <listitem><para>
963 <emphasis><filename>add-layer:</filename></emphasis>
964 Adds a layer to <filename>bblayers.conf</filename>.
965 </para></listitem>
966 <listitem><para>
967 <emphasis><filename>remove-layer:</filename></emphasis>
968 Removes a layer from <filename>bblayers.conf</filename>
969 </para></listitem>
970 <listitem><para>
971 <emphasis><filename>flatten:</filename></emphasis>
972 Flattens the layer configuration into a separate output
973 directory.
974 Flattening your layer configuration builds a "flattened"
975 directory that contains the contents of all layers,
976 with any overlayed recipes removed and any
977 <filename>.bbappend</filename> files appended to the
978 corresponding recipes.
979 You might have to perform some manual cleanup of the
980 flattened layer as follows:
981 <itemizedlist>
982 <listitem><para>
983 Non-recipe files (such as patches)
984 are overwritten.
985 The flatten command shows a warning for these
986 files.
987 </para></listitem>
988 <listitem><para>
989 Anything beyond the normal layer
990 setup has been added to the
991 <filename>layer.conf</filename> file.
992 Only the lowest priority layer's
993 <filename>layer.conf</filename> is used.
994 </para></listitem>
995 <listitem><para>
996 Overridden and appended items from
997 <filename>.bbappend</filename> files need to be
998 cleaned up.
999 The contents of each
1000 <filename>.bbappend</filename> end up in the
1001 flattened recipe.
1002 However, if there are appended or changed
1003 variable values, you need to tidy these up
1004 yourself.
1005 Consider the following example.
1006 Here, the <filename>bitbake-layers</filename>
1007 command adds the line
1008 <filename>#### bbappended ...</filename> so that
1009 you know where the following lines originate:
1010 <literallayout class='monospaced'>
1011 ...
1012 DESCRIPTION = "A useful utility"
1013 ...
1014 EXTRA_OECONF = "--enable-something"
1015 ...
1016
1017 #### bbappended from meta-anotherlayer ####
1018
1019 DESCRIPTION = "Customized utility"
1020 EXTRA_OECONF += "--enable-somethingelse"
1021 </literallayout>
1022 Ideally, you would tidy up these utilities as
1023 follows:
1024 <literallayout class='monospaced'>
1025 ...
1026 DESCRIPTION = "Customized utility"
1027 ...
1028 EXTRA_OECONF = "--enable-something --enable-somethingelse"
1029 ...
1030 </literallayout>
1031 </para></listitem>
1032 </itemizedlist>
1033 </para></listitem>
1034 <listitem><para>
1035 <emphasis><filename>layerindex-fetch</filename>:</emphasis>
1036 Fetches a layer from a layer index, along with its
1037 dependent layers, and adds the layers to the
1038 <filename>conf/bblayers.conf</filename> file.
1039 </para></listitem>
1040 <listitem><para>
1041 <emphasis><filename>layerindex-show-depends</filename>:</emphasis>
1042 Finds layer dependencies from the layer index.
1043 </para></listitem>
1044 <listitem><para>
1045 <emphasis><filename>create-layer</filename>:</emphasis>
1046 Creates a basic layer.
1047 </para></listitem>
1048 </itemizedlist>
1049 </para>
1050 </section>
1051
1052 <section id='creating-a-general-layer-using-the-bitbake-layers-script'>
1053 <title>Creating a General Layer Using the <filename>bitbake-layers</filename> Script</title>
1054
1055 <para>
1056 The <filename>bitbake-layers</filename> script with the
1057 <filename>create-layer</filename> subcommand simplifies
1058 creating a new general layer.
1059 <note><title>Notes</title>
1060 <itemizedlist>
1061 <listitem><para>
1062 For information on BSP layers, see the
1063 "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>"
1064 section in the Yocto Project Board Specific (BSP)
1065 Developer's Guide.
1066 </para></listitem>
1067 <listitem><para>
1068 In order to use a layer with the OpenEmbedded
1069 build system, you need to add the layer to your
1070 <filename>bblayers.conf</filename> configuration
1071 file.
1072 See the
1073 "<link linkend='adding-a-layer-using-the-bitbake-layers-script'>Adding a Layer Using the <filename>bitbake-layers</filename> Script</link>"
1074 section for more information.
1075 </para></listitem>
1076 </itemizedlist>
1077 </note>
1078 The default mode of the script's operation with this
1079 subcommand is to create a layer with the following:
1080 <itemizedlist>
1081 <listitem><para>A layer priority of 6.
1082 </para></listitem>
1083 <listitem><para>A <filename>conf</filename>
1084 subdirectory that contains a
1085 <filename>layer.conf</filename> file.
1086 </para></listitem>
1087 <listitem><para>
1088 A <filename>recipes-example</filename> subdirectory
1089 that contains a further subdirectory named
1090 <filename>example</filename>, which contains
1091 an <filename>example.bb</filename> recipe file.
1092 </para></listitem>
1093 <listitem><para>A <filename >COPYING.MIT</filename>,
1094 which is the license statement for the layer.
1095 The script assumes you want to use the MIT license,
1096 which is typical for most layers, for the contents of
1097 the layer itself.
1098 </para></listitem>
1099 <listitem><para>
1100 A <filename>README</filename> file, which is a file
1101 describing the contents of your new layer.
1102 </para></listitem>
1103 </itemizedlist>
1104 </para>
1105
1106 <para>
1107 In its simplest form, you can use the following command form
1108 to create a layer.
1109 The command creates a layer whose name corresponds to
1110 <replaceable>your_layer_name</replaceable> in the current
1111 directory:
1112 <literallayout class='monospaced'>
1113 $ bitbake-layers create-layer <replaceable>your_layer_name</replaceable>
1114 </literallayout>
1115 As an example, the following command creates a layer named
1116 <filename>meta-scottrif</filename> in your home directory:
1117 <literallayout class='monospaced'>
1118 $ cd /usr/home
1119 $ bitbake-layers create-layer meta-scottrif
1120 NOTE: Starting bitbake server...
1121 Add your new layer with 'bitbake-layers add-layer meta-scottrif'
1122 </literallayout>
1123 </para>
1124
1125 <para>
1126 If you want to set the priority of the layer to other than the
1127 default value of "6", you can either use the
1128 <filename>&dash;&dash;priority</filename> option or you can
1129 edit the
1130 <ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILE_PRIORITY'><filename>BBFILE_PRIORITY</filename></ulink>
1131 value in the <filename>conf/layer.conf</filename> after the
1132 script creates it.
1133 Furthermore, if you want to give the example recipe file
1134 some name other than the default, you can
1135 use the
1136 <filename>&dash;&dash;example-recipe-name</filename> option.
1137 </para>
1138
1139 <para>
1140 The easiest way to see how the
1141 <filename>bitbake-layers create-layer</filename> command
1142 works is to experiment with the script.
1143 You can also read the usage information by entering the
1144 following:
1145 <literallayout class='monospaced'>
1146 $ bitbake-layers create-layer --help
1147 NOTE: Starting bitbake server...
1148 usage: bitbake-layers create-layer [-h] [--priority PRIORITY]
1149 [--example-recipe-name EXAMPLERECIPE]
1150 layerdir
1151
1152 Create a basic layer
1153
1154 positional arguments:
1155 layerdir Layer directory to create
1156
1157 optional arguments:
1158 -h, --help show this help message and exit
1159 --priority PRIORITY, -p PRIORITY
1160 Layer directory to create
1161 --example-recipe-name EXAMPLERECIPE, -e EXAMPLERECIPE
1162 Filename of the example recipe
1163 </literallayout>
1164 </para>
1165 </section>
1166
1167 <section id='adding-a-layer-using-the-bitbake-layers-script'>
1168 <title>Adding a Layer Using the <filename>bitbake-layers</filename> Script</title>
1169
1170 <para>
1171 Once you create your general layer, you must add it to your
1172 <filename>bblayers.conf</filename> file.
1173 Adding the layer to this configuration file makes the
1174 OpenEmbedded build system aware of your layer so that it can
1175 search it for metadata.
1176 </para>
1177
1178 <para>
1179 Add your layer by using the
1180 <filename>bitbake-layers add-layer</filename> command:
1181 <literallayout class='monospaced'>
1182 $ bitbake-layers add-layer <replaceable>your_layer_name</replaceable>
1183 </literallayout>
1184 Here is an example that adds a layer named
1185 <filename>meta-scottrif</filename> to the configuration file.
1186 Following the command that adds the layer is another
1187 <filename>bitbake-layers</filename> command that shows the
1188 layers that are in your <filename>bblayers.conf</filename>
1189 file:
1190 <literallayout class='monospaced'>
1191 $ bitbake-layers add-layer meta-scottrif
1192 NOTE: Starting bitbake server...
1193 Parsing recipes: 100% |##########################################################| Time: 0:00:49
1194 Parsing of 1441 .bb files complete (0 cached, 1441 parsed). 2055 targets, 56 skipped, 0 masked, 0 errors.
1195 $ bitbake-layers show-layers
1196 NOTE: Starting bitbake server...
1197 layer path priority
1198 ==========================================================================
1199 meta /home/scottrif/poky/meta 5
1200 meta-poky /home/scottrif/poky/meta-poky 5
1201 meta-yocto-bsp /home/scottrif/poky/meta-yocto-bsp 5
1202 workspace /home/scottrif/poky/build/workspace 99
1203 meta-scottrif /home/scottrif/poky/build/meta-scottrif 6
1204 </literallayout>
1205 Adding the layer to this file enables the build system to
1206 locate the layer during the build.
1207 <note>
1208 During a build, the OpenEmbedded build system looks in
1209 the layers from the top of the list down to the bottom
1210 in that order.
1211 </note>
1212 </para>
1213 </section>
1214 </section>
1215
1216 <section id='usingpoky-extend-customimage'>
1217 <title>Customizing Images</title>
1218
1219 <para>
1220 You can customize images to satisfy particular requirements.
1221 This section describes several methods and provides guidelines for each.
1222 </para>
1223
1224 <section id='usingpoky-extend-customimage-localconf'>
1225 <title>Customizing Images Using <filename>local.conf</filename></title>
1226
1227 <para>
1228 Probably the easiest way to customize an image is to add a
1229 package by way of the <filename>local.conf</filename>
1230 configuration file.
1231 Because it is limited to local use, this method generally only
1232 allows you to add packages and is not as flexible as creating
1233 your own customized image.
1234 When you add packages using local variables this way, you need
1235 to realize that these variable changes are in effect for every
1236 build and consequently affect all images, which might not
1237 be what you require.
1238 </para>
1239
1240 <para>
1241 To add a package to your image using the local configuration
1242 file, use the
1243 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'>IMAGE_INSTALL</ulink></filename>
1244 variable with the <filename>_append</filename> operator:
1245 <literallayout class='monospaced'>
1246 IMAGE_INSTALL_append = " strace"
1247 </literallayout>
1248 Use of the syntax is important - specifically, the space between
1249 the quote and the package name, which is
1250 <filename>strace</filename> in this example.
1251 This space is required since the <filename>_append</filename>
1252 operator does not add the space.
1253 </para>
1254
1255 <para>
1256 Furthermore, you must use <filename>_append</filename> instead
1257 of the <filename>+=</filename> operator if you want to avoid
1258 ordering issues.
1259 The reason for this is because doing so unconditionally appends
1260 to the variable and avoids ordering problems due to the
1261 variable being set in image recipes and
1262 <filename>.bbclass</filename> files with operators like
1263 <filename>?=</filename>.
1264 Using <filename>_append</filename> ensures the operation takes
1265 affect.
1266 </para>
1267
1268 <para>
1269 As shown in its simplest use,
1270 <filename>IMAGE_INSTALL_append</filename> affects all images.
1271 It is possible to extend the syntax so that the variable
1272 applies to a specific image only.
1273 Here is an example:
1274 <literallayout class='monospaced'>
1275 IMAGE_INSTALL_append_pn-core-image-minimal = " strace"
1276 </literallayout>
1277 This example adds <filename>strace</filename> to the
1278 <filename>core-image-minimal</filename> image only.
1279 </para>
1280
1281 <para>
1282 You can add packages using a similar approach through the
1283 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-CORE_IMAGE_EXTRA_INSTALL'>CORE_IMAGE_EXTRA_INSTALL</ulink></filename>
1284 variable.
1285 If you use this variable, only
1286 <filename>core-image-*</filename> images are affected.
1287 </para>
1288 </section>
1289
1290 <section id='usingpoky-extend-customimage-imagefeatures'>
1291 <title>Customizing Images Using Custom <filename>IMAGE_FEATURES</filename> and
1292 <filename>EXTRA_IMAGE_FEATURES</filename></title>
1293
1294 <para>
1295 Another method for customizing your image is to enable or
1296 disable high-level image features by using the
1297 <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></ulink>
1298 and <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_IMAGE_FEATURES'><filename>EXTRA_IMAGE_FEATURES</filename></ulink>
1299 variables.
1300 Although the functions for both variables are nearly equivalent,
1301 best practices dictate using <filename>IMAGE_FEATURES</filename>
1302 from within a recipe and using
1303 <filename>EXTRA_IMAGE_FEATURES</filename> from within
1304 your <filename>local.conf</filename> file, which is found in the
1305 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
1306 </para>
1307
1308 <para>
1309 To understand how these features work, the best reference is
1310 <filename>meta/classes/core-image.bbclass</filename>.
1311 This class lists out the available
1312 <filename>IMAGE_FEATURES</filename> of which most map to
1313 package groups while some, such as
1314 <filename>debug-tweaks</filename> and
1315 <filename>read-only-rootfs</filename>, resolve as general
1316 configuration settings.
1317 </para>
1318
1319 <para>
1320 In summary, the file looks at the contents of the
1321 <filename>IMAGE_FEATURES</filename> variable and then maps
1322 or configures the feature accordingly.
1323 Based on this information, the build system automatically
1324 adds the appropriate packages or configurations to the
1325 <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></ulink>
1326 variable.
1327 Effectively, you are enabling extra features by extending the
1328 class or creating a custom class for use with specialized image
1329 <filename>.bb</filename> files.
1330 </para>
1331
1332 <para>
1333 Use the <filename>EXTRA_IMAGE_FEATURES</filename> variable
1334 from within your local configuration file.
1335 Using a separate area from which to enable features with
1336 this variable helps you avoid overwriting the features in the
1337 image recipe that are enabled with
1338 <filename>IMAGE_FEATURES</filename>.
1339 The value of <filename>EXTRA_IMAGE_FEATURES</filename> is added
1340 to <filename>IMAGE_FEATURES</filename> within
1341 <filename>meta/conf/bitbake.conf</filename>.
1342 </para>
1343
1344 <para>
1345 To illustrate how you can use these variables to modify your
1346 image, consider an example that selects the SSH server.
1347 The Yocto Project ships with two SSH servers you can use
1348 with your images: Dropbear and OpenSSH.
1349 Dropbear is a minimal SSH server appropriate for
1350 resource-constrained environments, while OpenSSH is a
1351 well-known standard SSH server implementation.
1352 By default, the <filename>core-image-sato</filename> image
1353 is configured to use Dropbear.
1354 The <filename>core-image-full-cmdline</filename> and
1355 <filename>core-image-lsb</filename> images both
1356 include OpenSSH.
1357 The <filename>core-image-minimal</filename> image does not
1358 contain an SSH server.
1359 </para>
1360
1361 <para>
1362 You can customize your image and change these defaults.
1363 Edit the <filename>IMAGE_FEATURES</filename> variable
1364 in your recipe or use the
1365 <filename>EXTRA_IMAGE_FEATURES</filename> in your
1366 <filename>local.conf</filename> file so that it configures the
1367 image you are working with to include
1368 <filename>ssh-server-dropbear</filename> or
1369 <filename>ssh-server-openssh</filename>.
1370 </para>
1371
1372 <note>
1373 See the
1374 "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>"
1375 section in the Yocto Project Reference Manual for a complete
1376 list of image features that ship with the Yocto Project.
1377 </note>
1378 </section>
1379
1380 <section id='usingpoky-extend-customimage-custombb'>
1381 <title>Customizing Images Using Custom .bb Files</title>
1382
1383 <para>
1384 You can also customize an image by creating a custom recipe
1385 that defines additional software as part of the image.
1386 The following example shows the form for the two lines you need:
1387 <literallayout class='monospaced'>
1388 IMAGE_INSTALL = "packagegroup-core-x11-base package1 package2"
1389
1390 inherit core-image
1391 </literallayout>
1392 </para>
1393
1394 <para>
1395 Defining the software using a custom recipe gives you total
1396 control over the contents of the image.
1397 It is important to use the correct names of packages in the
1398 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'>IMAGE_INSTALL</ulink></filename>
1399 variable.
1400 You must use the OpenEmbedded notation and not the Debian notation for the names
1401 (e.g. <filename>glibc-dev</filename> instead of <filename>libc6-dev</filename>).
1402 </para>
1403
1404 <para>
1405 The other method for creating a custom image is to base it on an existing image.
1406 For example, if you want to create an image based on <filename>core-image-sato</filename>
1407 but add the additional package <filename>strace</filename> to the image,
1408 copy the <filename>meta/recipes-sato/images/core-image-sato.bb</filename> to a
1409 new <filename>.bb</filename> and add the following line to the end of the copy:
1410 <literallayout class='monospaced'>
1411 IMAGE_INSTALL += "strace"
1412 </literallayout>
1413 </para>
1414 </section>
1415
1416 <section id='usingpoky-extend-customimage-customtasks'>
1417 <title>Customizing Images Using Custom Package Groups</title>
1418
1419 <para>
1420 For complex custom images, the best approach for customizing
1421 an image is to create a custom package group recipe that is
1422 used to build the image or images.
1423 A good example of a package group recipe is
1424 <filename>meta/recipes-core/packagegroups/packagegroup-base.bb</filename>.
1425 </para>
1426
1427 <para>
1428 If you examine that recipe, you see that the
1429 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGES'>PACKAGES</ulink></filename>
1430 variable lists the package group packages to produce.
1431 The <filename>inherit packagegroup</filename> statement
1432 sets appropriate default values and automatically adds
1433 <filename>-dev</filename>, <filename>-dbg</filename>, and
1434 <filename>-ptest</filename> complementary packages for each
1435 package specified in the <filename>PACKAGES</filename>
1436 statement.
1437 <note>
1438 The <filename>inherit packagegroup</filename> line should be
1439 located near the top of the recipe, certainly before
1440 the <filename>PACKAGES</filename> statement.
1441 </note>
1442 </para>
1443
1444 <para>
1445 For each package you specify in <filename>PACKAGES</filename>,
1446 you can use
1447 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-RDEPENDS'>RDEPENDS</ulink></filename>
1448 and
1449 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-RRECOMMENDS'>RRECOMMENDS</ulink></filename>
1450 entries to provide a list of packages the parent task package
1451 should contain.
1452 You can see examples of these further down in the
1453 <filename>packagegroup-base.bb</filename> recipe.
1454 </para>
1455
1456 <para>
1457 Here is a short, fabricated example showing the same basic
1458 pieces for a hypothetical packagegroup defined in
1459 <filename>packagegroup-custom.bb</filename>, where the
1460 variable <filename>PN</filename> is the standard way to
1461 abbreviate the reference to the full packagegroup name
1462 <filename>packagegroup-custom</filename>:
1463 <literallayout class='monospaced'>
1464 DESCRIPTION = "My Custom Package Groups"
1465
1466 inherit packagegroup
1467
1468 PACKAGES = "\
1469 ${PN}-apps \
1470 ${PN}-tools \
1471 "
1472
1473 RDEPENDS_${PN}-apps = "\
1474 dropbear \
1475 portmap \
1476 psplash"
1477
1478 RDEPENDS_${PN}-tools = "\
1479 oprofile \
1480 oprofileui-server \
1481 lttng-tools"
1482
1483 RRECOMMENDS_${PN}-tools = "\
1484 kernel-module-oprofile"
1485 </literallayout>
1486 </para>
1487
1488 <para>
1489 In the previous example, two package group packages are created with their dependencies and their
1490 recommended package dependencies listed: <filename>packagegroup-custom-apps</filename>, and
1491 <filename>packagegroup-custom-tools</filename>.
1492 To build an image using these package group packages, you need to add
1493 <filename>packagegroup-custom-apps</filename> and/or
1494 <filename>packagegroup-custom-tools</filename> to
1495 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'>IMAGE_INSTALL</ulink></filename>.
1496 For other forms of image dependencies see the other areas of this section.
1497 </para>
1498 </section>
1499
1500 <section id='usingpoky-extend-customimage-image-name'>
1501 <title>Customizing an Image Hostname</title>
1502
1503 <para>
1504 By default, the configured hostname (i.e.
1505 <filename>/etc/hostname</filename>) in an image is the
1506 same as the machine name.
1507 For example, if
1508 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
1509 equals "qemux86", the configured hostname written to
1510 <filename>/etc/hostname</filename> is "qemux86".
1511 </para>
1512
1513 <para>
1514 You can customize this name by altering the value of the
1515 "hostname" variable in the
1516 <filename>base-files</filename> recipe using either
1517 an append file or a configuration file.
1518 Use the following in an append file:
1519 <literallayout class='monospaced'>
1520 hostname="myhostname"
1521 </literallayout>
1522 Use the following in a configuration file:
1523 <literallayout class='monospaced'>
1524 hostname_pn-base-files = "myhostname"
1525 </literallayout>
1526 </para>
1527
1528 <para>
1529 Changing the default value of the variable "hostname" can be
1530 useful in certain situations.
1531 For example, suppose you need to do extensive testing on an
1532 image and you would like to easily identify the image
1533 under test from existing images with typical default
1534 hostnames.
1535 In this situation, you could change the default hostname to
1536 "testme", which results in all the images using the name
1537 "testme".
1538 Once testing is complete and you do not need to rebuild the
1539 image for test any longer, you can easily reset the default
1540 hostname.
1541 </para>
1542
1543 <para>
1544 Another point of interest is that if you unset the variable,
1545 the image will have no default hostname in the filesystem.
1546 Here is an example that unsets the variable in a
1547 configuration file:
1548 <literallayout class='monospaced'>
1549 hostname_pn-base-files = ""
1550 </literallayout>
1551 Having no default hostname in the filesystem is suitable for
1552 environments that use dynamic hostnames such as virtual
1553 machines.
1554 </para>
1555 </section>
1556 </section>
1557
1558 <section id='new-recipe-writing-a-new-recipe'>
1559 <title>Writing a New Recipe</title>
1560
1561 <para>
1562 Recipes (<filename>.bb</filename> files) are fundamental components
1563 in the Yocto Project environment.
1564 Each software component built by the OpenEmbedded build system
1565 requires a recipe to define the component.
1566 This section describes how to create, write, and test a new
1567 recipe.
1568 <note>
1569 For information on variables that are useful for recipes and
1570 for information about recipe naming issues, see the
1571 "<ulink url='&YOCTO_DOCS_REF_URL;#ref-varlocality-recipe-required'>Required</ulink>"
1572 section of the Yocto Project Reference Manual.
1573 </note>
1574 </para>
1575
1576 <section id='new-recipe-overview'>
1577 <title>Overview</title>
1578
1579 <para>
1580 The following figure shows the basic process for creating a
1581 new recipe.
1582 The remainder of the section provides details for the steps.
1583 <imagedata fileref="figures/recipe-workflow.png" width="6in" depth="7in" align="center" scalefit="1" />
1584 </para>
1585 </section>
1586
1587 <section id='new-recipe-locate-or-automatically-create-a-base-recipe'>
1588 <title>Locate or Automatically Create a Base Recipe</title>
1589
1590 <para>
1591 You can always write a recipe from scratch.
1592 However, three choices exist that can help you quickly get a
1593 start on a new recipe:
1594 <itemizedlist>
1595 <listitem><para>
1596 <emphasis><filename>devtool add</filename>:</emphasis>
1597 A command that assists in creating a recipe and
1598 an environment conducive to development.
1599 </para></listitem>
1600 <listitem><para>
1601 <emphasis><filename>recipetool create</filename>:</emphasis>
1602 A command provided by the Yocto Project that automates
1603 creation of a base recipe based on the source
1604 files.
1605 </para></listitem>
1606 <listitem><para>
1607 <emphasis>Existing Recipes:</emphasis>
1608 Location and modification of an existing recipe that is
1609 similar in function to the recipe you need.
1610 </para></listitem>
1611 </itemizedlist>
1612 <note>
1613 For information on recipe syntax, see the
1614 "<link linkend='recipe-syntax'>Recipe Syntax</link>"
1615 section.
1616 </note>
1617 </para>
1618
1619 <section id='new-recipe-creating-the-base-recipe-using-devtool'>
1620 <title>Creating the Base Recipe Using <filename>devtool add</filename></title>
1621
1622 <para>
1623 The <filename>devtool add</filename> command uses the same
1624 logic for auto-creating the recipe as
1625 <filename>recipetool create</filename>, which is listed
1626 below.
1627 Additionally, however, <filename>devtool add</filename>
1628 sets up an environment that makes it easy for you to
1629 patch the source and to make changes to the recipe as
1630 is often necessary when adding a recipe to build a new
1631 piece of software to be included in a build.
1632 </para>
1633
1634 <para>
1635 You can find a complete description of the
1636 <filename>devtool add</filename> command in the
1637 "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-a-closer-look-at-devtool-add'>A Closer Look at <filename>devtool</filename> add</ulink>"
1638 section in the Yocto Project Application Development
1639 and the Extensible Software Development Kit (eSDK) manual.
1640 </para>
1641 </section>
1642
1643 <section id='new-recipe-creating-the-base-recipe-using-recipetool'>
1644 <title>Creating the Base Recipe Using <filename>recipetool create</filename></title>
1645
1646 <para>
1647 <filename>recipetool create</filename> automates creation
1648 of a base recipe given a set of source code files.
1649 As long as you can extract or point to the source files,
1650 the tool will construct a recipe and automatically
1651 configure all pre-build information into the recipe.
1652 For example, suppose you have an application that builds
1653 using Autotools.
1654 Creating the base recipe using
1655 <filename>recipetool</filename> results in a recipe
1656 that has the pre-build dependencies, license requirements,
1657 and checksums configured.
1658 </para>
1659
1660 <para>
1661 To run the tool, you just need to be in your
1662 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
1663 and have sourced the build environment setup script
1664 (i.e.
1665 <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>oe-init-build-env</filename></ulink>).
1666 To get help on the tool, use the following command:
1667 <literallayout class='monospaced'>
1668 $ recipetool -h
1669 NOTE: Starting bitbake server...
1670 usage: recipetool [-d] [-q] [--color COLOR] [-h] &lt;subcommand&gt; ...
1671
1672 OpenEmbedded recipe tool
1673
1674 options:
1675 -d, --debug Enable debug output
1676 -q, --quiet Print only errors
1677 --color COLOR Colorize output (where COLOR is auto, always, never)
1678 -h, --help show this help message and exit
1679
1680 subcommands:
1681 create Create a new recipe
1682 newappend Create a bbappend for the specified target in the specified
1683 layer
1684 setvar Set a variable within a recipe
1685 appendfile Create/update a bbappend to replace a target file
1686 appendsrcfiles Create/update a bbappend to add or replace source files
1687 appendsrcfile Create/update a bbappend to add or replace a source file
1688 Use recipetool &lt;subcommand&gt; --help to get help on a specific command
1689 </literallayout>
1690 </para>
1691
1692 <para>
1693 Running
1694 <filename>recipetool create -o</filename>&nbsp;<replaceable>OUTFILE</replaceable>
1695 creates the base recipe and locates it properly in the
1696 layer that contains your source files.
1697 Following are some syntax examples:
1698 </para>
1699
1700 <para>
1701 Use this syntax to generate a recipe based on
1702 <replaceable>source</replaceable>.
1703 Once generated, the recipe resides in the existing source
1704 code layer:
1705 <literallayout class='monospaced'>
1706 recipetool create -o <replaceable>OUTFILE</replaceable>&nbsp;<replaceable>source</replaceable>
1707 </literallayout>
1708 Use this syntax to generate a recipe using code that you
1709 extract from <replaceable>source</replaceable>.
1710 The extracted code is placed in its own layer defined
1711 by <replaceable>EXTERNALSRC</replaceable>.
1712 <literallayout class='monospaced'>
1713 recipetool create -o <replaceable>OUTFILE</replaceable> -x <replaceable>EXTERNALSRC</replaceable> <replaceable>source</replaceable>
1714 </literallayout>
1715 Use this syntax to generate a recipe based on
1716 <replaceable>source</replaceable>.
1717 The options direct <filename>recipetool</filename> to
1718 generate debugging information.
1719 Once generated, the recipe resides in the existing source
1720 code layer:
1721 <literallayout class='monospaced'>
1722 recipetool create -d -o <replaceable>OUTFILE</replaceable> <replaceable>source</replaceable>
1723 </literallayout>
1724 </para>
1725 </section>
1726
1727 <section id='new-recipe-locating-and-using-a-similar-recipe'>
1728 <title>Locating and Using a Similar Recipe</title>
1729
1730 <para>
1731 Before writing a recipe from scratch, it is often useful to
1732 discover whether someone else has already written one that
1733 meets (or comes close to meeting) your needs.
1734 The Yocto Project and OpenEmbedded communities maintain many
1735 recipes that might be candidates for what you are doing.
1736 You can find a good central index of these recipes in the
1737 <ulink url='http://layers.openembedded.org'>OpenEmbedded Layer Index</ulink>.
1738 </para>
1739
1740 <para>
1741 Working from an existing recipe or a skeleton recipe is the
1742 best way to get started.
1743 Here are some points on both methods:
1744 <itemizedlist>
1745 <listitem><para><emphasis>Locate and modify a recipe that
1746 is close to what you want to do:</emphasis>
1747 This method works when you are familiar with the
1748 current recipe space.
1749 The method does not work so well for those new to
1750 the Yocto Project or writing recipes.</para>
1751 <para>Some risks associated with this method are
1752 using a recipe that has areas totally unrelated to
1753 what you are trying to accomplish with your recipe,
1754 not recognizing areas of the recipe that you might
1755 have to add from scratch, and so forth.
1756 All these risks stem from unfamiliarity with the
1757 existing recipe space.</para></listitem>
1758 <listitem><para><emphasis>Use and modify the following
1759 skeleton recipe:</emphasis>
1760 If for some reason you do not want to use
1761 <filename>recipetool</filename> and you cannot
1762 find an existing recipe that is close to meeting
1763 your needs, you can use the following structure to
1764 provide the fundamental areas of a new recipe.
1765 <literallayout class='monospaced'>
1766 DESCRIPTION = ""
1767 HOMEPAGE = ""
1768 LICENSE = ""
1769 SECTION = ""
1770 DEPENDS = ""
1771 LIC_FILES_CHKSUM = ""
1772
1773 SRC_URI = ""
1774 </literallayout>
1775 </para></listitem>
1776 </itemizedlist>
1777 </para>
1778 </section>
1779 </section>
1780
1781 <section id='new-recipe-storing-and-naming-the-recipe'>
1782 <title>Storing and Naming the Recipe</title>
1783
1784 <para>
1785 Once you have your base recipe, you should put it in your
1786 own layer and name it appropriately.
1787 Locating it correctly ensures that the OpenEmbedded build
1788 system can find it when you use BitBake to process the
1789 recipe.
1790 </para>
1791
1792 <itemizedlist>
1793 <listitem><para><emphasis>Storing Your Recipe:</emphasis>
1794 The OpenEmbedded build system locates your recipe
1795 through the layer's <filename>conf/layer.conf</filename>
1796 file and the
1797 <ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILES'><filename>BBFILES</filename></ulink>
1798 variable.
1799 This variable sets up a path from which the build system can
1800 locate recipes.
1801 Here is the typical use:
1802 <literallayout class='monospaced'>
1803 BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
1804 ${LAYERDIR}/recipes-*/*/*.bbappend"
1805 </literallayout>
1806 Consequently, you need to be sure you locate your new recipe
1807 inside your layer such that it can be found.</para>
1808 <para>You can find more information on how layers are
1809 structured in the
1810 "<link linkend='understanding-and-creating-layers'>Understanding and Creating Layers</link>"
1811 section.</para></listitem>
1812 <listitem><para><emphasis>Naming Your Recipe:</emphasis>
1813 When you name your recipe, you need to follow this naming
1814 convention:
1815 <literallayout class='monospaced'>
1816 <replaceable>basename</replaceable>_<replaceable>version</replaceable>.bb
1817 </literallayout>
1818 Use lower-cased characters and do not include the reserved
1819 suffixes <filename>-native</filename>,
1820 <filename>-cross</filename>, <filename>-initial</filename>,
1821 or <filename>-dev</filename> casually (i.e. do not use them
1822 as part of your recipe name unless the string applies).
1823 Here are some examples:
1824 <literallayout class='monospaced'>
1825 cups_1.7.0.bb
1826 gawk_4.0.2.bb
1827 irssi_0.8.16-rc1.bb
1828 </literallayout></para></listitem>
1829 </itemizedlist>
1830 </section>
1831
1832 <section id='new-recipe-running-a-build-on-the-recipe'>
1833 <title>Running a Build on the Recipe</title>
1834
1835 <para>
1836 Creating a new recipe is usually an iterative process that
1837 requires using BitBake to process the recipe multiple times in
1838 order to progressively discover and add information to the
1839 recipe file.
1840 </para>
1841
1842 <para>
1843 Assuming you have sourced the build environment setup script (i.e.
1844 <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>)
1845 and you are in the
1846 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>,
1847 use BitBake to process your recipe.
1848 All you need to provide is the
1849 <filename><replaceable>basename</replaceable></filename> of the recipe as described
1850 in the previous section:
1851 <literallayout class='monospaced'>
1852 $ bitbake <replaceable>basename</replaceable>
1853 </literallayout>
1854
1855 </para>
1856
1857 <para>
1858 During the build, the OpenEmbedded build system creates a
1859 temporary work directory for each recipe
1860 (<filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink><filename>}</filename>)
1861 where it keeps extracted source files, log files, intermediate
1862 compilation and packaging files, and so forth.
1863 </para>
1864
1865 <para>
1866 The path to the per-recipe temporary work directory depends
1867 on the context in which it is being built.
1868 The quickest way to find this path is to have BitBake return it
1869 by running the following:
1870 <literallayout class='monospaced'>
1871 $ bitbake -e <replaceable>basename</replaceable> | grep ^WORKDIR=
1872 </literallayout>
1873 As an example, assume a Source Directory top-level folder named
1874 <filename>poky</filename>, a default Build Directory at
1875 <filename>poky/build</filename>, and a
1876 <filename>qemux86-poky-linux</filename> machine target system.
1877 Furthermore, suppose your recipe is named
1878 <filename>foo_1.3.0.bb</filename>.
1879 In this case, the work directory the build system uses to
1880 build the package would be as follows:
1881 <literallayout class='monospaced'>
1882 poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0
1883 </literallayout>
1884 Inside this directory you can find sub-directories such as
1885 <filename>image</filename>, <filename>packages-split</filename>,
1886 and <filename>temp</filename>.
1887 After the build, you can examine these to determine how well
1888 the build went.
1889 <note>
1890 You can find log files for each task in the recipe's
1891 <filename>temp</filename> directory (e.g.
1892 <filename>poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0/temp</filename>).
1893 Log files are named <filename>log.<replaceable>taskname</replaceable></filename>
1894 (e.g. <filename>log.do_configure</filename>,
1895 <filename>log.do_fetch</filename>, and
1896 <filename>log.do_compile</filename>).
1897 </note>
1898 </para>
1899
1900 <para>
1901 You can find more information about the build process in
1902 "<ulink url='&YOCTO_DOCS_OM_URL;#overview-development-environment'>The Yocto Project Development Environment</ulink>"
1903 chapter of the Yocto Project Overview and Concepts Manual.
1904 </para>
1905 </section>
1906
1907 <section id='new-recipe-fetching-code'>
1908 <title>Fetching Code</title>
1909
1910 <para>
1911 The first thing your recipe must do is specify how to fetch
1912 the source files.
1913 Fetching is controlled mainly through the
1914 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
1915 variable.
1916 Your recipe must have a <filename>SRC_URI</filename> variable
1917 that points to where the source is located.
1918 For a graphical representation of source locations, see the
1919 "<ulink url='&YOCTO_DOCS_OM_URL;#sources-dev-environment'>Sources</ulink>"
1920 section in the Yocto Project Overview and Concepts Manual.
1921 </para>
1922
1923 <para>
1924 The
1925 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-fetch'><filename>do_fetch</filename></ulink>
1926 task uses the prefix of each entry in the
1927 <filename>SRC_URI</filename> variable value to determine which
1928 <ulink url='&YOCTO_DOCS_BB_URL;#bb-fetchers'>fetcher</ulink>
1929 to use to get your source files.
1930 It is the <filename>SRC_URI</filename> variable that triggers
1931 the fetcher.
1932 The
1933 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-patch'><filename>do_patch</filename></ulink>
1934 task uses the variable after source is fetched to apply
1935 patches.
1936 The OpenEmbedded build system uses
1937 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESOVERRIDES'><filename>FILESOVERRIDES</filename></ulink>
1938 for scanning directory locations for local files in
1939 <filename>SRC_URI</filename>.
1940 </para>
1941
1942 <para>
1943 The <filename>SRC_URI</filename> variable in your recipe must
1944 define each unique location for your source files.
1945 It is good practice to not hard-code version numbers in a URL used
1946 in <filename>SRC_URI</filename>.
1947 Rather than hard-code these values, use
1948 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink><filename>}</filename>,
1949 which causes the fetch process to use the version specified in
1950 the recipe filename.
1951 Specifying the version in this manner means that upgrading the
1952 recipe to a future version is as simple as renaming the recipe
1953 to match the new version.
1954 </para>
1955
1956 <para>
1957 Here is a simple example from the
1958 <filename>meta/recipes-devtools/strace/strace_5.5.bb</filename>
1959 recipe where the source comes from a single tarball.
1960 Notice the use of the
1961 <ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>
1962 variable:
1963 <literallayout class='monospaced'>
1964 SRC_URI = "https://strace.io/files/${PV}/strace-${PV}.tar.xz \
1965 </literallayout>
1966 </para>
1967
1968 <para>
1969 Files mentioned in <filename>SRC_URI</filename> whose names end
1970 in a typical archive extension (e.g. <filename>.tar</filename>,
1971 <filename>.tar.gz</filename>, <filename>.tar.bz2</filename>,
1972 <filename>.zip</filename>, and so forth), are automatically
1973 extracted during the
1974 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-unpack'><filename>do_unpack</filename></ulink>
1975 task.
1976 For another example that specifies these types of files, see
1977 the
1978 "<link linkend='new-recipe-autotooled-package'>Autotooled Package</link>"
1979 section.
1980 </para>
1981
1982 <para>
1983 Another way of specifying source is from an SCM.
1984 For Git repositories, you must specify
1985 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRCREV'><filename>SRCREV</filename></ulink>
1986 and you should specify
1987 <ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>
1988 to include the revision with
1989 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRCPV'><filename>SRCPV</filename></ulink>.
1990 Here is an example from the recipe
1991 <filename>meta/recipes-kernel/blktrace/blktrace_git.bb</filename>:
1992 <literallayout class='monospaced'>
1993 SRCREV = "d6918c8832793b4205ed3bfede78c2f915c23385"
1994
1995 PR = "r6"
1996 PV = "1.0.5+git${SRCPV}"
1997
1998 SRC_URI = "git://git.kernel.dk/blktrace.git \
1999 file://ldflags.patch"
2000 </literallayout>
2001 </para>
2002
2003 <para>
2004 If your <filename>SRC_URI</filename> statement includes
2005 URLs pointing to individual files fetched from a remote server
2006 other than a version control system, BitBake attempts to
2007 verify the files against checksums defined in your recipe to
2008 ensure they have not been tampered with or otherwise modified
2009 since the recipe was written.
2010 Two checksums are used:
2011 <filename>SRC_URI[md5sum]</filename> and
2012 <filename>SRC_URI[sha256sum]</filename>.
2013 </para>
2014
2015 <para>
2016 If your <filename>SRC_URI</filename> variable points to
2017 more than a single URL (excluding SCM URLs), you need to
2018 provide the <filename>md5</filename> and
2019 <filename>sha256</filename> checksums for each URL.
2020 For these cases, you provide a name for each URL as part of
2021 the <filename>SRC_URI</filename> and then reference that name
2022 in the subsequent checksum statements.
2023 Here is an example combining lines from the files
2024 <filename>git.inc</filename> and
2025 <filename>git_2.24.1.bb</filename>:
2026 <literallayout class='monospaced'>
2027 SRC_URI = "${KERNELORG_MIRROR}/software/scm/git/git-${PV}.tar.gz;name=tarball \
2028 ${KERNELORG_MIRROR}/software/scm/git/git-manpages-${PV}.tar.gz;name=manpages"
2029
2030 SRC_URI[tarball.md5sum] = "166bde96adbbc11c8843d4f8f4f9811b"
2031 SRC_URI[tarball.sha256sum] = "ad5334956301c86841eb1e5b1bb20884a6bad89a10a6762c958220c7cf64da02"
2032 SRC_URI[manpages.md5sum] = "31c2272a8979022497ba3d4202df145d"
2033 SRC_URI[manpages.sha256sum] = "9a7ae3a093bea39770eb96ca3e5b40bff7af0b9f6123f089d7821d0e5b8e1230"
2034 </literallayout>
2035 </para>
2036
2037 <para>
2038 Proper values for <filename>md5</filename> and
2039 <filename>sha256</filename> checksums might be available
2040 with other signatures on the download page for the upstream
2041 source (e.g. <filename>md5</filename>,
2042 <filename>sha1</filename>, <filename>sha256</filename>,
2043 <filename>GPG</filename>, and so forth).
2044 Because the OpenEmbedded build system only deals with
2045 <filename>sha256sum</filename> and <filename>md5sum</filename>,
2046 you should verify all the signatures you find by hand.
2047 </para>
2048
2049 <para>
2050 If no <filename>SRC_URI</filename> checksums are specified
2051 when you attempt to build the recipe, or you provide an
2052 incorrect checksum, the build will produce an error for each
2053 missing or incorrect checksum.
2054 As part of the error message, the build system provides
2055 the checksum string corresponding to the fetched file.
2056 Once you have the correct checksums, you can copy and paste
2057 them into your recipe and then run the build again to continue.
2058 <note>
2059 As mentioned, if the upstream source provides signatures
2060 for verifying the downloaded source code, you should
2061 verify those manually before setting the checksum values
2062 in the recipe and continuing with the build.
2063 </note>
2064 </para>
2065
2066 <para>
2067 This final example is a bit more complicated and is from the
2068 <filename>meta/recipes-sato/rxvt-unicode/rxvt-unicode_9.20.bb</filename>
2069 recipe.
2070 The example's <filename>SRC_URI</filename> statement identifies
2071 multiple files as the source files for the recipe: a tarball, a
2072 patch file, a desktop file, and an icon.
2073 <literallayout class='monospaced'>
2074 SRC_URI = "http://dist.schmorp.de/rxvt-unicode/Attic/rxvt-unicode-${PV}.tar.bz2 \
2075 file://xwc.patch \
2076 file://rxvt.desktop \
2077 file://rxvt.png"
2078 </literallayout>
2079 </para>
2080
2081 <para>
2082 When you specify local files using the
2083 <filename>file://</filename> URI protocol, the build system
2084 fetches files from the local machine.
2085 The path is relative to the
2086 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESPATH'><filename>FILESPATH</filename></ulink>
2087 variable and searches specific directories in a certain order:
2088 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-BP'><filename>BP</filename></ulink><filename>}</filename>,
2089 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-BPN'><filename>BPN</filename></ulink><filename>}</filename>,
2090 and <filename>files</filename>.
2091 The directories are assumed to be subdirectories of the
2092 directory in which the recipe or append file resides.
2093 For another example that specifies these types of files, see the
2094 "<link linkend='new-recipe-single-c-file-package-hello-world'>Single .c File Package (Hello World!)</link>"
2095 section.
2096 </para>
2097
2098 <para>
2099 The previous example also specifies a patch file.
2100 Patch files are files whose names usually end in
2101 <filename>.patch</filename> or <filename>.diff</filename> but
2102 can end with compressed suffixes such as
2103 <filename>diff.gz</filename> and
2104 <filename>patch.bz2</filename>, for example.
2105 The build system automatically applies patches as described
2106 in the
2107 "<link linkend='new-recipe-patching-code'>Patching Code</link>" section.
2108 </para>
2109 </section>
2110
2111 <section id='new-recipe-unpacking-code'>
2112 <title>Unpacking Code</title>
2113
2114 <para>
2115 During the build, the
2116 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-unpack'><filename>do_unpack</filename></ulink>
2117 task unpacks the source with
2118 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink><filename>}</filename>
2119 pointing to where it is unpacked.
2120 </para>
2121
2122 <para>
2123 If you are fetching your source files from an upstream source
2124 archived tarball and the tarball's internal structure matches
2125 the common convention of a top-level subdirectory named
2126 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-BPN'><filename>BPN</filename></ulink><filename>}-${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink><filename>}</filename>,
2127 then you do not need to set <filename>S</filename>.
2128 However, if <filename>SRC_URI</filename> specifies to fetch
2129 source from an archive that does not use this convention,
2130 or from an SCM like Git or Subversion, your recipe needs to
2131 define <filename>S</filename>.
2132 </para>
2133
2134 <para>
2135 If processing your recipe using BitBake successfully unpacks
2136 the source files, you need to be sure that the directory
2137 pointed to by <filename>${S}</filename> matches the structure
2138 of the source.
2139 </para>
2140 </section>
2141
2142 <section id='new-recipe-patching-code'>
2143 <title>Patching Code</title>
2144
2145 <para>
2146 Sometimes it is necessary to patch code after it has been
2147 fetched.
2148 Any files mentioned in <filename>SRC_URI</filename> whose
2149 names end in <filename>.patch</filename> or
2150 <filename>.diff</filename> or compressed versions of these
2151 suffixes (e.g. <filename>diff.gz</filename> are treated as
2152 patches.
2153 The
2154 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-patch'><filename>do_patch</filename></ulink>
2155 task automatically applies these patches.
2156 </para>
2157
2158 <para>
2159 The build system should be able to apply patches with the "-p1"
2160 option (i.e. one directory level in the path will be stripped
2161 off).
2162 If your patch needs to have more directory levels stripped off,
2163 specify the number of levels using the "striplevel" option in
2164 the <filename>SRC_URI</filename> entry for the patch.
2165 Alternatively, if your patch needs to be applied in a specific
2166 subdirectory that is not specified in the patch file, use the
2167 "patchdir" option in the entry.
2168 </para>
2169
2170 <para>
2171 As with all local files referenced in
2172 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
2173 using <filename>file://</filename>, you should place
2174 patch files in a directory next to the recipe either
2175 named the same as the base name of the recipe
2176 (<ulink url='&YOCTO_DOCS_REF_URL;#var-BP'><filename>BP</filename></ulink>
2177 and
2178 <ulink url='&YOCTO_DOCS_REF_URL;#var-BPN'><filename>BPN</filename></ulink>)
2179 or "files".
2180 </para>
2181 </section>
2182
2183 <section id='new-recipe-licensing'>
2184 <title>Licensing</title>
2185
2186 <para>
2187 Your recipe needs to have both the
2188 <ulink url='&YOCTO_DOCS_REF_URL;#var-LICENSE'><filename>LICENSE</filename></ulink>
2189 and
2190 <ulink url='&YOCTO_DOCS_REF_URL;#var-LIC_FILES_CHKSUM'><filename>LIC_FILES_CHKSUM</filename></ulink>
2191 variables:
2192 <itemizedlist>
2193 <listitem><para><emphasis><filename>LICENSE</filename>:</emphasis>
2194 This variable specifies the license for the software.
2195 If you do not know the license under which the software
2196 you are building is distributed, you should go to the
2197 source code and look for that information.
2198 Typical files containing this information include
2199 <filename>COPYING</filename>,
2200 <filename>LICENSE</filename>, and
2201 <filename>README</filename> files.
2202 You could also find the information near the top of
2203 a source file.
2204 For example, given a piece of software licensed under
2205 the GNU General Public License version 2, you would
2206 set <filename>LICENSE</filename> as follows:
2207 <literallayout class='monospaced'>
2208 LICENSE = "GPLv2"
2209 </literallayout></para>
2210 <para>The licenses you specify within
2211 <filename>LICENSE</filename> can have any name as long
2212 as you do not use spaces, since spaces are used as
2213 separators between license names.
2214 For standard licenses, use the names of the files in
2215 <filename>meta/files/common-licenses/</filename>
2216 or the <filename>SPDXLICENSEMAP</filename> flag names
2217 defined in <filename>meta/conf/licenses.conf</filename>.
2218 </para></listitem>
2219 <listitem><para><emphasis><filename>LIC_FILES_CHKSUM</filename>:</emphasis>
2220 The OpenEmbedded build system uses this variable to
2221 make sure the license text has not changed.
2222 If it has, the build produces an error and it affords
2223 you the chance to figure it out and correct the problem.
2224 </para>
2225 <para>You need to specify all applicable licensing
2226 files for the software.
2227 At the end of the configuration step, the build process
2228 will compare the checksums of the files to be sure
2229 the text has not changed.
2230 Any differences result in an error with the message
2231 containing the current checksum.
2232 For more explanation and examples of how to set the
2233 <filename>LIC_FILES_CHKSUM</filename> variable, see the
2234 "<link link='usingpoky-configuring-LIC_FILES_CHKSUM'>Tracking License Changes</link>"
2235 section.</para>
2236
2237 <para>To determine the correct checksum string, you
2238 can list the appropriate files in the
2239 <filename>LIC_FILES_CHKSUM</filename> variable with
2240 incorrect md5 strings, attempt to build the software,
2241 and then note the resulting error messages that will
2242 report the correct md5 strings.
2243 See the
2244 "<link linkend='new-recipe-fetching-code'>Fetching Code</link>"
2245 section for additional information.
2246 </para>
2247
2248 <para>
2249 Here is an example that assumes the software has a
2250 <filename>COPYING</filename> file:
2251 <literallayout class='monospaced'>
2252 LIC_FILES_CHKSUM = "file://COPYING;md5=xxx"
2253 </literallayout>
2254 When you try to build the software, the build system
2255 will produce an error and give you the correct string
2256 that you can substitute into the recipe file for a
2257 subsequent build.
2258 </para></listitem>
2259 </itemizedlist>
2260 </para>
2261
2262<!--
2263
2264 <para>
2265 For trying this out I created a new recipe named
2266 <filename>htop_1.0.2.bb</filename> and put it in
2267 <filename>poky/meta/recipes-extended/htop</filename>.
2268 There are two license type statements in my very simple
2269 recipe:
2270 <literallayout class='monospaced'>
2271 LICENSE = ""
2272
2273 LIC_FILES_CHKSUM = ""
2274
2275 SRC_URI[md5sum] = ""
2276 SRC_URI[sha256sum] = ""
2277 </literallayout>
2278 Evidently, you need to run a <filename>bitbake -c cleanall htop</filename>.
2279 Next, you delete or comment out the two <filename>SRC_URI</filename>
2280 lines at the end and then attempt to build the software with
2281 <filename>bitbake htop</filename>.
2282 Doing so causes BitBake to report some errors and and give
2283 you the actual strings you need for the last two
2284 <filename>SRC_URI</filename> lines.
2285 Prior to this, you have to dig around in the home page of the
2286 source for <filename>htop</filename> and determine that the
2287 software is released under GPLv2.
2288 You can provide that in the <filename>LICENSE</filename>
2289 statement.
2290 Now you edit your recipe to have those two strings for
2291 the <filename>SRC_URI</filename> statements:
2292 <literallayout class='monospaced'>
2293 LICENSE = "GPLv2"
2294
2295 LIC_FILES_CHKSUM = ""
2296
2297 SRC_URI = "${SOURCEFORGE_MIRROR}/htop/htop-${PV}.tar.gz"
2298 SRC_URI[md5sum] = "0d01cca8df3349c74569cefebbd9919e"
2299 SRC_URI[sha256sum] = "ee60657b044ece0df096c053060df7abf3cce3a568ab34d260049e6a37ccd8a1"
2300 </literallayout>
2301 At this point, you can build the software again using the
2302 <filename>bitbake htop</filename> command.
2303 There is just a set of errors now associated with the
2304 empty <filename>LIC_FILES_CHKSUM</filename> variable now.
2305 </para>
2306-->
2307
2308 </section>
2309
2310 <section id='new-dependencies'>
2311 <title>Dependencies</title>
2312
2313 <para>
2314 Most software packages have a short list of other packages
2315 that they require, which are called dependencies.
2316 These dependencies fall into two main categories: build-time
2317 dependencies, which are required when the software is built;
2318 and runtime dependencies, which are required to be installed
2319 on the target in order for the software to run.
2320 </para>
2321
2322 <para>
2323 Within a recipe, you specify build-time dependencies using the
2324 <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPENDS'><filename>DEPENDS</filename></ulink>
2325 variable.
2326 Although nuances exist, items specified in
2327 <filename>DEPENDS</filename> should be names of other recipes.
2328 It is important that you specify all build-time dependencies
2329 explicitly.
2330 If you do not, due to the parallel nature of BitBake's
2331 execution, you can end up with a race condition where the
2332 dependency is present for one task of a recipe (e.g.
2333 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-configure'><filename>do_configure</filename></ulink>)
2334 and then gone when the next task runs (e.g.
2335 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-compile'><filename>do_compile</filename></ulink>).
2336 </para>
2337
2338 <para>
2339 Another consideration is that configure scripts might
2340 automatically check for optional dependencies and enable
2341 corresponding functionality if those dependencies are found.
2342 This behavior means that to ensure deterministic results and
2343 thus avoid more race conditions, you need to either explicitly
2344 specify these dependencies as well, or tell the configure
2345 script explicitly to disable the functionality.
2346 If you wish to make a recipe that is more generally useful
2347 (e.g. publish the recipe in a layer for others to use),
2348 instead of hard-disabling the functionality, you can use the
2349 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGECONFIG'><filename>PACKAGECONFIG</filename></ulink>
2350 variable to allow functionality and the corresponding
2351 dependencies to be enabled and disabled easily by other
2352 users of the recipe.
2353 </para>
2354
2355 <para>
2356 Similar to build-time dependencies, you specify runtime
2357 dependencies through a variable -
2358 <ulink url='&YOCTO_DOCS_REF_URL;#var-RDEPENDS'><filename>RDEPENDS</filename></ulink>,
2359 which is package-specific.
2360 All variables that are package-specific need to have the name
2361 of the package added to the end as an override.
2362 Since the main package for a recipe has the same name as the
2363 recipe, and the recipe's name can be found through the
2364 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink><filename>}</filename>
2365 variable, then you specify the dependencies for the main
2366 package by setting <filename>RDEPENDS_${PN}</filename>.
2367 If the package were named <filename>${PN}-tools</filename>,
2368 then you would set <filename>RDEPENDS_${PN}-tools</filename>,
2369 and so forth.
2370 </para>
2371
2372 <para>
2373 Some runtime dependencies will be set automatically at
2374 packaging time.
2375 These dependencies include any shared library dependencies
2376 (i.e. if a package "example" contains "libexample" and
2377 another package "mypackage" contains a binary that links to
2378 "libexample" then the OpenEmbedded build system will
2379 automatically add a runtime dependency to "mypackage" on
2380 "example").
2381 See the
2382 "<ulink url='&YOCTO_DOCS_OM_URL;#automatically-added-runtime-dependencies'>Automatically Added Runtime Dependencies</ulink>"
2383 section in the Yocto Project Overview and Concepts Manual for
2384 further details.
2385 </para>
2386 </section>
2387
2388 <section id='new-recipe-configuring-the-recipe'>
2389 <title>Configuring the Recipe</title>
2390
2391 <para>
2392 Most software provides some means of setting build-time
2393 configuration options before compilation.
2394 Typically, setting these options is accomplished by running a
2395 configure script with options, or by modifying a build
2396 configuration file.
2397 <note>
2398 As of Yocto Project Release 1.7, some of the core recipes
2399 that package binary configuration scripts now disable the
2400 scripts due to the scripts previously requiring error-prone
2401 path substitution.
2402 The OpenEmbedded build system uses
2403 <filename>pkg-config</filename> now, which is much more
2404 robust.
2405 You can find a list of the <filename>*-config</filename>
2406 scripts that are disabled list in the
2407 "<ulink url='&YOCTO_DOCS_REF_URL;#migration-1.7-binary-configuration-scripts-disabled'>Binary Configuration Scripts Disabled</ulink>"
2408 section in the Yocto Project Reference Manual.
2409 </note>
2410 </para>
2411
2412 <para>
2413 A major part of build-time configuration is about checking for
2414 build-time dependencies and possibly enabling optional
2415 functionality as a result.
2416 You need to specify any build-time dependencies for the
2417 software you are building in your recipe's
2418 <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPENDS'><filename>DEPENDS</filename></ulink>
2419 value, in terms of other recipes that satisfy those
2420 dependencies.
2421 You can often find build-time or runtime
2422 dependencies described in the software's documentation.
2423 </para>
2424
2425 <para>
2426 The following list provides configuration items of note based
2427 on how your software is built:
2428 <itemizedlist>
2429 <listitem><para><emphasis>Autotools:</emphasis>
2430 If your source files have a
2431 <filename>configure.ac</filename> file, then your
2432 software is built using Autotools.
2433 If this is the case, you just need to worry about
2434 modifying the configuration.</para>
2435
2436 <para>When using Autotools, your recipe needs to inherit
2437 the
2438 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-autotools'><filename>autotools</filename></ulink>
2439 class and your recipe does not have to contain a
2440 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-configure'><filename>do_configure</filename></ulink>
2441 task.
2442 However, you might still want to make some adjustments.
2443 For example, you can set
2444 <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_OECONF'><filename>EXTRA_OECONF</filename></ulink>
2445 or
2446 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGECONFIG_CONFARGS'><filename>PACKAGECONFIG_CONFARGS</filename></ulink>
2447 to pass any needed configure options that are specific
2448 to the recipe.
2449 </para></listitem>
2450 <listitem><para><emphasis>CMake:</emphasis>
2451 If your source files have a
2452 <filename>CMakeLists.txt</filename> file, then your
2453 software is built using CMake.
2454 If this is the case, you just need to worry about
2455 modifying the configuration.</para>
2456
2457 <para>When you use CMake, your recipe needs to inherit
2458 the
2459 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-cmake'><filename>cmake</filename></ulink>
2460 class and your recipe does not have to contain a
2461 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-configure'><filename>do_configure</filename></ulink>
2462 task.
2463 You can make some adjustments by setting
2464 <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_OECMAKE'><filename>EXTRA_OECMAKE</filename></ulink>
2465 to pass any needed configure options that are specific
2466 to the recipe.
2467 <note>
2468 If you need to install one or more custom CMake
2469 toolchain files that are supplied by the
2470 application you are building, install the files to
2471 <filename>${D}${datadir}/cmake/</filename> Modules
2472 during
2473 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink>.
2474 </note>
2475 </para></listitem>
2476 <listitem><para><emphasis>Other:</emphasis>
2477 If your source files do not have a
2478 <filename>configure.ac</filename> or
2479 <filename>CMakeLists.txt</filename> file, then your
2480 software is built using some method other than Autotools
2481 or CMake.
2482 If this is the case, you normally need to provide a
2483 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-configure'><filename>do_configure</filename></ulink>
2484 task in your recipe
2485 unless, of course, there is nothing to configure.
2486 </para>
2487 <para>Even if your software is not being built by
2488 Autotools or CMake, you still might not need to deal
2489 with any configuration issues.
2490 You need to determine if configuration is even a required step.
2491 You might need to modify a Makefile or some configuration file
2492 used for the build to specify necessary build options.
2493 Or, perhaps you might need to run a provided, custom
2494 configure script with the appropriate options.</para>
2495 <para>For the case involving a custom configure
2496 script, you would run
2497 <filename>./configure --help</filename> and look for
2498 the options you need to set.</para></listitem>
2499 </itemizedlist>
2500 </para>
2501
2502 <para>
2503 Once configuration succeeds, it is always good practice to
2504 look at the <filename>log.do_configure</filename> file to
2505 ensure that the appropriate options have been enabled and no
2506 additional build-time dependencies need to be added to
2507 <filename>DEPENDS</filename>.
2508 For example, if the configure script reports that it found
2509 something not mentioned in <filename>DEPENDS</filename>, or
2510 that it did not find something that it needed for some
2511 desired optional functionality, then you would need to add
2512 those to <filename>DEPENDS</filename>.
2513 Looking at the log might also reveal items being checked for,
2514 enabled, or both that you do not want, or items not being found
2515 that are in <filename>DEPENDS</filename>, in which case
2516 you would need to look at passing extra options to the
2517 configure script as needed.
2518 For reference information on configure options specific to the
2519 software you are building, you can consult the output of the
2520 <filename>./configure --help</filename> command within
2521 <filename>${S}</filename> or consult the software's upstream
2522 documentation.
2523 </para>
2524 </section>
2525
2526 <section id='new-recipe-using-headers-to-interface-with-devices'>
2527 <title>Using Headers to Interface with Devices</title>
2528
2529 <para>
2530 If your recipe builds an application that needs to
2531 communicate with some device or needs an API into a custom
2532 kernel, you will need to provide appropriate header files.
2533 Under no circumstances should you ever modify the existing
2534 <filename>meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc</filename>
2535 file.
2536 These headers are used to build <filename>libc</filename> and
2537 must not be compromised with custom or machine-specific
2538 header information.
2539 If you customize <filename>libc</filename> through modified
2540 headers all other applications that use
2541 <filename>libc</filename> thus become affected.
2542 <note><title>Warning</title>
2543 Never copy and customize the <filename>libc</filename>
2544 header file (i.e.
2545 <filename>meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc</filename>).
2546 </note>
2547 The correct way to interface to a device or custom kernel is
2548 to use a separate package that provides the additional headers
2549 for the driver or other unique interfaces.
2550 When doing so, your application also becomes responsible for
2551 creating a dependency on that specific provider.
2552 </para>
2553
2554 <para>
2555 Consider the following:
2556 <itemizedlist>
2557 <listitem><para>
2558 Never modify
2559 <filename>linux-libc-headers.inc</filename>.
2560 Consider that file to be part of the
2561 <filename>libc</filename> system, and not something
2562 you use to access the kernel directly.
2563 You should access <filename>libc</filename> through
2564 specific <filename>libc</filename> calls.
2565 </para></listitem>
2566 <listitem><para>
2567 Applications that must talk directly to devices
2568 should either provide necessary headers themselves,
2569 or establish a dependency on a special headers package
2570 that is specific to that driver.
2571 </para></listitem>
2572 </itemizedlist>
2573 </para>
2574
2575 <para>
2576 For example, suppose you want to modify an existing header
2577 that adds I/O control or network support.
2578 If the modifications are used by a small number programs,
2579 providing a unique version of a header is easy and has little
2580 impact.
2581 When doing so, bear in mind the guidelines in the previous
2582 list.
2583 <note>
2584 If for some reason your changes need to modify the behavior
2585 of the <filename>libc</filename>, and subsequently all
2586 other applications on the system, use a
2587 <filename>.bbappend</filename> to modify the
2588 <filename>linux-kernel-headers.inc</filename> file.
2589 However, take care to not make the changes
2590 machine specific.
2591 </note>
2592 </para>
2593
2594 <para>
2595 Consider a case where your kernel is older and you need
2596 an older <filename>libc</filename> ABI.
2597 The headers installed by your recipe should still be a
2598 standard mainline kernel, not your own custom one.
2599 </para>
2600
2601 <para>
2602 When you use custom kernel headers you need to get them from
2603 <ulink url='&YOCTO_DOCS_REF_URL;#var-STAGING_KERNEL_DIR'><filename>STAGING_KERNEL_DIR</filename></ulink>,
2604 which is the directory with kernel headers that are
2605 required to build out-of-tree modules.
2606 Your recipe will also need the following:
2607 <literallayout class='monospaced'>
2608 do_configure[depends] += "virtual/kernel:do_shared_workdir"
2609 </literallayout>
2610 </para>
2611 </section>
2612
2613 <section id='new-recipe-compilation'>
2614 <title>Compilation</title>
2615
2616 <para>
2617 During a build, the <filename>do_compile</filename> task
2618 happens after source is fetched, unpacked, and configured.
2619 If the recipe passes through <filename>do_compile</filename>
2620 successfully, nothing needs to be done.
2621 </para>
2622
2623 <para>
2624 However, if the compile step fails, you need to diagnose the
2625 failure.
2626 Here are some common issues that cause failures.
2627 <note>
2628 For cases where improper paths are detected for
2629 configuration files or for when libraries/headers cannot
2630 be found, be sure you are using the more robust
2631 <filename>pkg-config</filename>.
2632 See the note in section
2633 "<link linkend='new-recipe-configuring-the-recipe'>Configuring the Recipe</link>"
2634 for additional information.
2635 </note>
2636 <itemizedlist>
2637 <listitem><para><emphasis>Parallel build failures:</emphasis>
2638 These failures manifest themselves as intermittent
2639 errors, or errors reporting that a file or directory
2640 that should be created by some other part of the build
2641 process could not be found.
2642 This type of failure can occur even if, upon inspection,
2643 the file or directory does exist after the build has
2644 failed, because that part of the build process happened
2645 in the wrong order.</para>
2646 <para>To fix the problem, you need to either satisfy
2647 the missing dependency in the Makefile or whatever
2648 script produced the Makefile, or (as a workaround)
2649 set
2650 <ulink url='&YOCTO_DOCS_REF_URL;#var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></ulink>
2651 to an empty string:
2652 <literallayout class='monospaced'>
2653 PARALLEL_MAKE = ""
2654 </literallayout></para>
2655 <para>
2656 For information on parallel Makefile issues, see the
2657 "<link linkend='debugging-parallel-make-races'>Debugging Parallel Make Races</link>"
2658 section.
2659 </para></listitem>
2660 <listitem><para><emphasis>Improper host path usage:</emphasis>
2661 This failure applies to recipes building for the target
2662 or <filename>nativesdk</filename> only.
2663 The failure occurs when the compilation process uses
2664 improper headers, libraries, or other files from the
2665 host system when cross-compiling for the target.
2666 </para>
2667 <para>To fix the problem, examine the
2668 <filename>log.do_compile</filename> file to identify
2669 the host paths being used (e.g.
2670 <filename>/usr/include</filename>,
2671 <filename>/usr/lib</filename>, and so forth) and then
2672 either add configure options, apply a patch, or do both.
2673 </para></listitem>
2674 <listitem><para><emphasis>Failure to find required
2675 libraries/headers:</emphasis>
2676 If a build-time dependency is missing because it has
2677 not been declared in
2678 <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPENDS'><filename>DEPENDS</filename></ulink>,
2679 or because the dependency exists but the path used by
2680 the build process to find the file is incorrect and the
2681 configure step did not detect it, the compilation
2682 process could fail.
2683 For either of these failures, the compilation process
2684 notes that files could not be found.
2685 In these cases, you need to go back and add additional
2686 options to the configure script as well as possibly
2687 add additional build-time dependencies to
2688 <filename>DEPENDS</filename>.</para>
2689 <para>Occasionally, it is necessary to apply a patch
2690 to the source to ensure the correct paths are used.
2691 If you need to specify paths to find files staged
2692 into the sysroot from other recipes, use the variables
2693 that the OpenEmbedded build system provides
2694 (e.g.
2695 <filename>STAGING_BINDIR</filename>,
2696 <filename>STAGING_INCDIR</filename>,
2697 <filename>STAGING_DATADIR</filename>, and so forth).
2698<!--
2699 (e.g.
2700 <ulink url='&YOCTO_DOCS_REF_URL;#var-STAGING_BINDIR'><filename>STAGING_BINDIR</filename></ulink>,
2701 <ulink url='&YOCTO_DOCS_REF_URL;#var-STAGING_INCDIR'><filename>STAGING_INCDIR</filename></ulink>,
2702 <ulink url='&YOCTO_DOCS_REF_URL;#var-STAGING_DATADIR'><filename>STAGING_DATADIR</filename></ulink>,
2703 and so forth).
2704-->
2705 </para></listitem>
2706 </itemizedlist>
2707 </para>
2708 </section>
2709
2710 <section id='new-recipe-installing'>
2711 <title>Installing</title>
2712
2713 <para>
2714 During <filename>do_install</filename>, the task copies the
2715 built files along with their hierarchy to locations that
2716 would mirror their locations on the target device.
2717 The installation process copies files from the
2718 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink><filename>}</filename>,
2719 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-B'><filename>B</filename></ulink><filename>}</filename>,
2720 and
2721 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink><filename>}</filename>
2722 directories to the
2723 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-D'><filename>D</filename></ulink><filename>}</filename>
2724 directory to create the structure as it should appear on the
2725 target system.
2726 </para>
2727
2728 <para>
2729 How your software is built affects what you must do to be
2730 sure your software is installed correctly.
2731 The following list describes what you must do for installation
2732 depending on the type of build system used by the software
2733 being built:
2734 <itemizedlist>
2735 <listitem><para><emphasis>Autotools and CMake:</emphasis>
2736 If the software your recipe is building uses Autotools
2737 or CMake, the OpenEmbedded build
2738 system understands how to install the software.
2739 Consequently, you do not have to have a
2740 <filename>do_install</filename> task as part of your
2741 recipe.
2742 You just need to make sure the install portion of the
2743 build completes with no issues.
2744 However, if you wish to install additional files not
2745 already being installed by
2746 <filename>make install</filename>, you should do this
2747 using a <filename>do_install_append</filename> function
2748 using the install command as described in
2749 the "Manual" bulleted item later in this list.
2750 </para></listitem>
2751 <listitem><para><emphasis>Other (using
2752 <filename>make install</filename>):</emphasis>
2753 You need to define a
2754 <filename>do_install</filename> function in your
2755 recipe.
2756 The function should call
2757 <filename>oe_runmake install</filename> and will likely
2758 need to pass in the destination directory as well.
2759 How you pass that path is dependent on how the
2760 <filename>Makefile</filename> being run is written
2761 (e.g. <filename>DESTDIR=${D}</filename>,
2762 <filename>PREFIX=${D}</filename>,
2763 <filename>INSTALLROOT=${D}</filename>, and so forth).
2764 </para>
2765 <para>For an example recipe using
2766 <filename>make install</filename>, see the
2767 "<link linkend='new-recipe-makefile-based-package'>Makefile-Based Package</link>"
2768 section.</para></listitem>
2769 <listitem><para><emphasis>Manual:</emphasis>
2770 You need to define a
2771 <filename>do_install</filename> function in your
2772 recipe.
2773 The function must first use
2774 <filename>install -d</filename> to create the
2775 directories under
2776 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-D'><filename>D</filename></ulink><filename>}</filename>.
2777 Once the directories exist, your function can use
2778 <filename>install</filename> to manually install the
2779 built software into the directories.</para>
2780 <para>You can find more information on
2781 <filename>install</filename> at
2782 <ulink url='http://www.gnu.org/software/coreutils/manual/html_node/install-invocation.html'></ulink>.
2783 </para></listitem>
2784 </itemizedlist>
2785 </para>
2786
2787 <para>
2788 For the scenarios that do not use Autotools or
2789 CMake, you need to track the installation
2790 and diagnose and fix any issues until everything installs
2791 correctly.
2792 You need to look in the default location of
2793 <filename>${D}</filename>, which is
2794 <filename>${WORKDIR}/image</filename>, to be sure your
2795 files have been installed correctly.
2796 </para>
2797
2798 <note><title>Notes</title>
2799 <itemizedlist>
2800 <listitem><para>
2801 During the installation process, you might need to
2802 modify some of the installed files to suit the target
2803 layout.
2804 For example, you might need to replace hard-coded paths
2805 in an initscript with values of variables provided by
2806 the build system, such as replacing
2807 <filename>/usr/bin/</filename> with
2808 <filename>${bindir}</filename>.
2809 If you do perform such modifications during
2810 <filename>do_install</filename>, be sure to modify the
2811 destination file after copying rather than before
2812 copying.
2813 Modifying after copying ensures that the build system
2814 can re-execute <filename>do_install</filename> if
2815 needed.
2816 </para></listitem>
2817 <listitem><para>
2818 <filename>oe_runmake install</filename>, which can be
2819 run directly or can be run indirectly by the
2820 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-autotools'><filename>autotools</filename></ulink>
2821 and
2822 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-cmake'><filename>cmake</filename></ulink>
2823 classes, runs <filename>make install</filename> in
2824 parallel.
2825 Sometimes, a Makefile can have missing dependencies
2826 between targets that can result in race conditions.
2827 If you experience intermittent failures during
2828 <filename>do_install</filename>, you might be able to
2829 work around them by disabling parallel Makefile
2830 installs by adding the following to the recipe:
2831 <literallayout class='monospaced'>
2832 PARALLEL_MAKEINST = ""
2833 </literallayout>
2834 See
2835 <ulink url='&YOCTO_DOCS_REF_URL;#var-PARALLEL_MAKEINST'><filename>PARALLEL_MAKEINST</filename></ulink>
2836 for additional information.
2837 </para></listitem>
2838 <listitem><para>
2839 If you need to install one or more custom CMake
2840 toolchain files that are supplied by the
2841 application you are building, install the files to
2842 <filename>${D}${datadir}/cmake/</filename> Modules
2843 during
2844 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink>.
2845 </para></listitem>
2846 </itemizedlist>
2847 </note>
2848 </section>
2849
2850 <section id='new-recipe-enabling-system-services'>
2851 <title>Enabling System Services</title>
2852
2853 <para>
2854 If you want to install a service, which is a process that
2855 usually starts on boot and runs in the background, then
2856 you must include some additional definitions in your recipe.
2857 </para>
2858
2859 <para>
2860 If you are adding services and the service initialization
2861 script or the service file itself is not installed, you must
2862 provide for that installation in your recipe using a
2863 <filename>do_install_append</filename> function.
2864 If your recipe already has a <filename>do_install</filename>
2865 function, update the function near its end rather than
2866 adding an additional <filename>do_install_append</filename>
2867 function.
2868 </para>
2869
2870 <para>
2871 When you create the installation for your services, you need
2872 to accomplish what is normally done by
2873 <filename>make install</filename>.
2874 In other words, make sure your installation arranges the output
2875 similar to how it is arranged on the target system.
2876 </para>
2877
2878 <para>
2879 The OpenEmbedded build system provides support for starting
2880 services two different ways:
2881 <itemizedlist>
2882 <listitem><para><emphasis>SysVinit:</emphasis>
2883 SysVinit is a system and service manager that
2884 manages the init system used to control the very basic
2885 functions of your system.
2886 The init program is the first program
2887 started by the Linux kernel when the system boots.
2888 Init then controls the startup, running and shutdown
2889 of all other programs.</para>
2890 <para>To enable a service using SysVinit, your recipe
2891 needs to inherit the
2892 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-update-rc.d'><filename>update-rc.d</filename></ulink>
2893 class.
2894 The class helps facilitate safely installing the
2895 package on the target.</para>
2896 <para>You will need to set the
2897 <ulink url='&YOCTO_DOCS_REF_URL;#var-INITSCRIPT_PACKAGES'><filename>INITSCRIPT_PACKAGES</filename></ulink>,
2898 <ulink url='&YOCTO_DOCS_REF_URL;#var-INITSCRIPT_NAME'><filename>INITSCRIPT_NAME</filename></ulink>,
2899 and
2900 <ulink url='&YOCTO_DOCS_REF_URL;#var-INITSCRIPT_PARAMS'><filename>INITSCRIPT_PARAMS</filename></ulink>
2901 variables within your recipe.</para></listitem>
2902 <listitem><para><emphasis>systemd:</emphasis>
2903 System Management Daemon (systemd) was designed to
2904 replace SysVinit and to provide
2905 enhanced management of services.
2906 For more information on systemd, see the systemd
2907 homepage at
2908 <ulink url='http://freedesktop.org/wiki/Software/systemd/'></ulink>.
2909 </para>
2910 <para>To enable a service using systemd, your recipe
2911 needs to inherit the
2912 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-systemd'><filename>systemd</filename></ulink>
2913 class.
2914 See the <filename>systemd.bbclass</filename> file
2915 located in your
2916 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
2917 section for more information.
2918 </para></listitem>
2919 </itemizedlist>
2920 </para>
2921 </section>
2922
2923 <section id='new-recipe-packaging'>
2924 <title>Packaging</title>
2925
2926 <para>
2927 Successful packaging is a combination of automated processes
2928 performed by the OpenEmbedded build system and some
2929 specific steps you need to take.
2930 The following list describes the process:
2931 <itemizedlist>
2932 <listitem><para><emphasis>Splitting Files</emphasis>:
2933 The <filename>do_package</filename> task splits the
2934 files produced by the recipe into logical components.
2935 Even software that produces a single binary might
2936 still have debug symbols, documentation, and other
2937 logical components that should be split out.
2938 The <filename>do_package</filename> task ensures
2939 that files are split up and packaged correctly.
2940 </para></listitem>
2941 <listitem><para><emphasis>Running QA Checks</emphasis>:
2942 The
2943 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-insane'><filename>insane</filename></ulink>
2944 class adds a step to
2945 the package generation process so that output quality
2946 assurance checks are generated by the OpenEmbedded
2947 build system.
2948 This step performs a range of checks to be sure the
2949 build's output is free of common problems that show
2950 up during runtime.
2951 For information on these checks, see the
2952 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-insane'><filename>insane</filename></ulink>
2953 class and the
2954 "<ulink url='&YOCTO_DOCS_REF_URL;#ref-qa-checks'>QA Error and Warning Messages</ulink>"
2955 chapter in the Yocto Project Reference Manual.
2956 </para></listitem>
2957 <listitem><para><emphasis>Hand-Checking Your Packages</emphasis>:
2958 After you build your software, you need to be sure
2959 your packages are correct.
2960 Examine the
2961 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink><filename>}/packages-split</filename>
2962 directory and make sure files are where you expect
2963 them to be.
2964 If you discover problems, you can set
2965 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGES'><filename>PACKAGES</filename></ulink>,
2966 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILES'><filename>FILES</filename></ulink>,
2967 <filename>do_install(_append)</filename>, and so forth as
2968 needed.
2969 </para></listitem>
2970 <listitem><para><emphasis>Splitting an Application into Multiple Packages</emphasis>:
2971 If you need to split an application into several
2972 packages, see the
2973 "<link linkend='splitting-an-application-into-multiple-packages'>Splitting an Application into Multiple Packages</link>"
2974 section for an example.
2975 </para></listitem>
2976 <listitem><para><emphasis>Installing a Post-Installation Script</emphasis>:
2977 For an example showing how to install a
2978 post-installation script, see the
2979 "<link linkend='new-recipe-post-installation-scripts'>Post-Installation Scripts</link>"
2980 section.
2981 </para></listitem>
2982 <listitem><para><emphasis>Marking Package Architecture</emphasis>:
2983 Depending on what your recipe is building and how it
2984 is configured, it might be important to mark the
2985 packages produced as being specific to a particular
2986 machine, or to mark them as not being specific to
2987 a particular machine or architecture at all.</para>
2988 <para>By default, packages apply to any machine with the
2989 same architecture as the target machine.
2990 When a recipe produces packages that are
2991 machine-specific (e.g. the
2992 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
2993 value is passed into the configure script or a patch
2994 is applied only for a particular machine), you should
2995 mark them as such by adding the following to the
2996 recipe:
2997 <literallayout class='monospaced'>
2998 PACKAGE_ARCH = "${MACHINE_ARCH}"
2999 </literallayout></para>
3000 <para>On the other hand, if the recipe produces packages
3001 that do not contain anything specific to the target
3002 machine or architecture at all (e.g. recipes
3003 that simply package script files or configuration
3004 files), you should use the
3005 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-allarch'><filename>allarch</filename></ulink>
3006 class to do this for you by adding this to your
3007 recipe:
3008 <literallayout class='monospaced'>
3009 inherit allarch
3010 </literallayout>
3011 Ensuring that the package architecture is correct is
3012 not critical while you are doing the first few builds
3013 of your recipe.
3014 However, it is important in order
3015 to ensure that your recipe rebuilds (or does not
3016 rebuild) appropriately in response to changes in
3017 configuration, and to ensure that you get the
3018 appropriate packages installed on the target machine,
3019 particularly if you run separate builds for more
3020 than one target machine.
3021 </para></listitem>
3022 </itemizedlist>
3023 </para>
3024 </section>
3025
3026 <section id='new-sharing-files-between-recipes'>
3027 <title>Sharing Files Between Recipes</title>
3028
3029 <para>
3030 Recipes often need to use files provided by other recipes on
3031 the build host.
3032 For example, an application linking to a common library needs
3033 access to the library itself and its associated headers.
3034 The way this access is accomplished is by populating a sysroot
3035 with files.
3036 Each recipe has two sysroots in its work directory, one for
3037 target files
3038 (<filename>recipe-sysroot</filename>) and one for files that
3039 are native to the build host
3040 (<filename>recipe-sysroot-native</filename>).
3041 <note>
3042 You could find the term "staging" used within the Yocto
3043 project regarding files populating sysroots (e.g. the
3044 <ulink url='&YOCTO_DOCS_REF_URL;#var-STAGING_DIR'><filename>STAGING_DIR</filename></ulink>
3045 variable).
3046 </note>
3047 </para>
3048
3049 <para>
3050 Recipes should never populate the sysroot directly (i.e. write
3051 files into sysroot).
3052 Instead, files should be installed into standard locations
3053 during the
3054 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink>
3055 task within the
3056 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-D'><filename>D</filename></ulink><filename>}</filename>
3057 directory.
3058 The reason for this limitation is that almost all files that
3059 populate the sysroot are cataloged in manifests in order to
3060 ensure the files can be removed later when a recipe is either
3061 modified or removed.
3062 Thus, the sysroot is able to remain free from stale files.
3063 </para>
3064
3065 <para>
3066 A subset of the files installed by the
3067 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink>
3068 task are used by the
3069 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-populate_sysroot'><filename>do_populate_sysroot</filename></ulink>
3070 task as defined by the the
3071 <ulink url='&YOCTO_DOCS_REF_URL;#var-SYSROOT_DIRS'><filename>SYSROOT_DIRS</filename></ulink>
3072 variable to automatically populate the sysroot.
3073 It is possible to modify the list of directories that populate
3074 the sysroot.
3075 The following example shows how you could add the
3076 <filename>/opt</filename> directory to the list of
3077 directories within a recipe:
3078 <literallayout class='monospaced'>
3079 SYSROOT_DIRS += "/opt"
3080 </literallayout>
3081 </para>
3082
3083 <para>
3084 For a more complete description of the
3085 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-populate_sysroot'><filename>do_populate_sysroot</filename></ulink>
3086 task and its associated functions, see the
3087 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-staging'><filename>staging</filename></ulink>
3088 class.
3089 </para>
3090 </section>
3091
3092 <section id='metadata-virtual-providers'>
3093 <title>Using Virtual Providers</title>
3094
3095 <para>
3096 Prior to a build, if you know that several different recipes
3097 provide the same functionality, you can use a virtual provider
3098 (i.e. <filename>virtual/*</filename>) as a placeholder for the
3099 actual provider.
3100 The actual provider is determined at build-time.
3101 </para>
3102
3103 <para>
3104 A common scenario where a virtual provider is used would be
3105 for the kernel recipe.
3106 Suppose you have three kernel recipes whose
3107 <ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink>
3108 values map to <filename>kernel-big</filename>,
3109 <filename>kernel-mid</filename>, and
3110 <filename>kernel-small</filename>.
3111 Furthermore, each of these recipes in some way uses a
3112 <ulink url='&YOCTO_DOCS_REF_URL;#var-PROVIDES'><filename>PROVIDES</filename></ulink>
3113 statement that essentially identifies itself as being able
3114 to provide <filename>virtual/kernel</filename>.
3115 Here is one way through the
3116 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-kernel'><filename>kernel</filename></ulink>
3117 class:
3118 <literallayout class='monospaced'>
3119 PROVIDES += "${@ "virtual/kernel" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") else "" }"
3120 </literallayout>
3121 Any recipe that inherits the <filename>kernel</filename> class
3122 is going to utilize a <filename>PROVIDES</filename> statement
3123 that identifies that recipe as being able to provide the
3124 <filename>virtual/kernel</filename> item.
3125 </para>
3126
3127 <para>
3128 Now comes the time to actually build an image and you need a
3129 kernel recipe, but which one?
3130 You can configure your build to call out the kernel recipe
3131 you want by using the
3132 <ulink url='&YOCTO_DOCS_REF_URL;#var-PREFERRED_PROVIDER'><filename>PREFERRED_PROVIDER</filename></ulink>
3133 variable.
3134 As an example, consider the
3135 <ulink url='https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/conf/machine/include/x86-base.inc'><filename>x86-base.inc</filename></ulink>
3136 include file, which is a machine
3137 (i.e. <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>)
3138 configuration file.
3139 This include file is the reason all x86-based machines use the
3140 <filename>linux-yocto</filename> kernel.
3141 Here are the relevant lines from the include file:
3142 <literallayout class='monospaced'>
3143 PREFERRED_PROVIDER_virtual/kernel ??= "linux-yocto"
3144 PREFERRED_VERSION_linux-yocto ??= "4.15%"
3145 </literallayout>
3146 </para>
3147
3148 <para>
3149 When you use a virtual provider, you do not have to
3150 "hard code" a recipe name as a build dependency.
3151 You can use the
3152 <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPENDS'><filename>DEPENDS</filename></ulink>
3153 variable to state the build is dependent on
3154 <filename>virtual/kernel</filename> for example:
3155 <literallayout class='monospaced'>
3156 DEPENDS = "virtual/kernel"
3157 </literallayout>
3158 During the build, the OpenEmbedded build system picks
3159 the correct recipe needed for the
3160 <filename>virtual/kernel</filename> dependency based on the
3161 <filename>PREFERRED_PROVIDER</filename> variable.
3162 If you want to use the small kernel mentioned at the beginning
3163 of this section, configure your build as follows:
3164 <literallayout class='monospaced'>
3165 PREFERRED_PROVIDER_virtual/kernel ??= "kernel-small"
3166 </literallayout>
3167 <note>
3168 Any recipe that
3169 <ulink url='&YOCTO_DOCS_REF_URL;#var-PROVIDES'><filename>PROVIDES</filename></ulink>
3170 a <filename>virtual/*</filename> item that is ultimately
3171 not selected through
3172 <filename>PREFERRED_PROVIDER</filename> does not get built.
3173 Preventing these recipes from building is usually the
3174 desired behavior since this mechanism's purpose is to
3175 select between mutually exclusive alternative providers.
3176 </note>
3177 </para>
3178
3179 <para>
3180 The following lists specific examples of virtual providers:
3181 <itemizedlist>
3182 <listitem><para>
3183 <filename>virtual/kernel</filename>:
3184 Provides the name of the kernel recipe to use when
3185 building a kernel image.
3186 </para></listitem>
3187 <listitem><para>
3188 <filename>virtual/bootloader</filename>:
3189 Provides the name of the bootloader to use when
3190 building an image.
3191 </para></listitem>
3192 <listitem><para>
3193 <filename>virtual/libgbm</filename>:
3194 Provides <filename>gbm.pc</filename>.
3195 </para></listitem>
3196 <listitem><para>
3197 <filename>virtual/egl</filename>:
3198 Provides <filename>egl.pc</filename> and possibly
3199 <filename>wayland-egl.pc</filename>.
3200 </para></listitem>
3201 <listitem><para>
3202 <filename>virtual/libgl</filename>:
3203 Provides <filename>gl.pc</filename> (i.e. libGL).
3204 </para></listitem>
3205 <listitem><para>
3206 <filename>virtual/libgles1</filename>:
3207 Provides <filename>glesv1_cm.pc</filename>
3208 (i.e. libGLESv1_CM).
3209 </para></listitem>
3210 <listitem><para>
3211 <filename>virtual/libgles2</filename>:
3212 Provides <filename>glesv2.pc</filename>
3213 (i.e. libGLESv2).
3214 </para></listitem>
3215 </itemizedlist>
3216 </para>
3217 </section>
3218
3219 <section id='properly-versioning-pre-release-recipes'>
3220 <title>Properly Versioning Pre-Release Recipes</title>
3221
3222 <para>
3223 Sometimes the name of a recipe can lead to versioning
3224 problems when the recipe is upgraded to a final release.
3225 For example, consider the
3226 <filename>irssi_0.8.16-rc1.bb</filename> recipe file in
3227 the list of example recipes in the
3228 "<link linkend='new-recipe-storing-and-naming-the-recipe'>Storing and Naming the Recipe</link>"
3229 section.
3230 This recipe is at a release candidate stage (i.e.
3231 "rc1").
3232 When the recipe is released, the recipe filename becomes
3233 <filename>irssi_0.8.16.bb</filename>.
3234 The version change from <filename>0.8.16-rc1</filename>
3235 to <filename>0.8.16</filename> is seen as a decrease by the
3236 build system and package managers, so the resulting packages
3237 will not correctly trigger an upgrade.
3238 </para>
3239
3240 <para>
3241 In order to ensure the versions compare properly, the
3242 recommended convention is to set
3243 <ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>
3244 within the recipe to
3245 "<replaceable>previous_version</replaceable>+<replaceable>current_version</replaceable>".
3246 You can use an additional variable so that you can use the
3247 current version elsewhere.
3248 Here is an example:
3249 <literallayout class='monospaced'>
3250 REALPV = "0.8.16-rc1"
3251 PV = "0.8.15+${REALPV}"
3252 </literallayout>
3253 </para>
3254 </section>
3255
3256 <section id='new-recipe-post-installation-scripts'>
3257 <title>Post-Installation Scripts</title>
3258
3259 <para>
3260 Post-installation scripts run immediately after installing
3261 a package on the target or during image creation when a
3262 package is included in an image.
3263 To add a post-installation script to a package, add a
3264 <filename>pkg_postinst_</filename><replaceable>PACKAGENAME</replaceable><filename>()</filename> function to
3265 the recipe file (<filename>.bb</filename>) and replace
3266 <replaceable>PACKAGENAME</replaceable> with the name of the package
3267 you want to attach to the <filename>postinst</filename>
3268 script.
3269 To apply the post-installation script to the main package
3270 for the recipe, which is usually what is required, specify
3271 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink><filename>}</filename>
3272 in place of <replaceable>PACKAGENAME</replaceable>.
3273 </para>
3274
3275 <para>
3276 A post-installation function has the following structure:
3277 <literallayout class='monospaced'>
3278 pkg_postinst_<replaceable>PACKAGENAME</replaceable>() {
3279 # Commands to carry out
3280 }
3281 </literallayout>
3282 </para>
3283
3284 <para>
3285 The script defined in the post-installation function is
3286 called when the root filesystem is created.
3287 If the script succeeds, the package is marked as installed.
3288 <note>
3289 Any RPM post-installation script that runs on the target
3290 should return a 0 exit code.
3291 RPM does not allow non-zero exit codes for these scripts,
3292 and the RPM package manager will cause the package to fail
3293 installation on the target.
3294 </note>
3295 </para>
3296
3297 <para>
3298 Sometimes it is necessary for the execution of a
3299 post-installation script to be delayed until the first boot.
3300 For example, the script might need to be executed on the
3301 device itself.
3302 To delay script execution until boot time, you must explicitly
3303 mark post installs to defer to the target.
3304 You can use <filename>pkg_postinst_ontarget()</filename> or
3305 call
3306 <filename>postinst_intercept delay_to_first_boot</filename>
3307 from <filename>pkg_postinst()</filename>.
3308 Any failure of a <filename>pkg_postinst()</filename> script
3309 (including exit 1) triggers an error during the
3310 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-rootfs'><filename>do_rootfs</filename></ulink>
3311 task.
3312 </para>
3313
3314 <para>
3315 If you have recipes that use
3316 <filename>pkg_postinst</filename> function
3317 and they require the use of non-standard native
3318 tools that have dependencies during rootfs construction, you
3319 need to use the
3320 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_WRITE_DEPS'><filename>PACKAGE_WRITE_DEPS</filename></ulink>
3321 variable in your recipe to list these tools.
3322 If you do not use this variable, the tools might be missing and
3323 execution of the post-installation script is deferred until
3324 first boot.
3325 Deferring the script to first boot is undesirable and for
3326 read-only rootfs impossible.
3327 </para>
3328
3329 <note>
3330 Equivalent support for pre-install, pre-uninstall, and
3331 post-uninstall scripts exist by way of
3332 <filename>pkg_preinst</filename>,
3333 <filename>pkg_prerm</filename>, and
3334 <filename>pkg_postrm</filename>, respectively.
3335 These scrips work in exactly the same way as does
3336 <filename>pkg_postinst</filename> with the exception
3337 that they run at different times.
3338 Also, because of when they run, they are not applicable to
3339 being run at image creation time like
3340 <filename>pkg_postinst</filename>.
3341 </note>
3342 </section>
3343
3344 <section id='new-recipe-testing'>
3345 <title>Testing</title>
3346
3347 <para>
3348 The final step for completing your recipe is to be sure that
3349 the software you built runs correctly.
3350 To accomplish runtime testing, add the build's output
3351 packages to your image and test them on the target.
3352 </para>
3353
3354 <para>
3355 For information on how to customize your image by adding
3356 specific packages, see the
3357 "<link linkend='usingpoky-extend-customimage'>Customizing Images</link>"
3358 section.
3359 </para>
3360 </section>
3361
3362 <section id='new-recipe-testing-examples'>
3363 <title>Examples</title>
3364
3365 <para>
3366 To help summarize how to write a recipe, this section provides
3367 some examples given various scenarios:
3368 <itemizedlist>
3369 <listitem><para>Recipes that use local files</para></listitem>
3370 <listitem><para>Using an Autotooled package</para></listitem>
3371 <listitem><para>Using a Makefile-based package</para></listitem>
3372 <listitem><para>Splitting an application into multiple packages</para></listitem>
3373 <listitem><para>Adding binaries to an image</para></listitem>
3374 </itemizedlist>
3375 </para>
3376
3377 <section id='new-recipe-single-c-file-package-hello-world'>
3378 <title>Single .c File Package (Hello World!)</title>
3379
3380 <para>
3381 Building an application from a single file that is stored
3382 locally (e.g. under <filename>files</filename>) requires
3383 a recipe that has the file listed in the
3384 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'>SRC_URI</ulink></filename>
3385 variable.
3386 Additionally, you need to manually write the
3387 <filename>do_compile</filename> and
3388 <filename>do_install</filename> tasks.
3389 The <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-S'>S</ulink></filename>
3390 variable defines the directory containing the source code,
3391 which is set to
3392 <ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink>
3393 in this case - the directory BitBake uses for the build.
3394 <literallayout class='monospaced'>
3395 SUMMARY = "Simple helloworld application"
3396 SECTION = "examples"
3397 LICENSE = "MIT"
3398 LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
3399
3400 SRC_URI = "file://helloworld.c"
3401
3402 S = "${WORKDIR}"
3403
3404 do_compile() {
3405 ${CC} helloworld.c -o helloworld
3406 }
3407
3408 do_install() {
3409 install -d ${D}${bindir}
3410 install -m 0755 helloworld ${D}${bindir}
3411 }
3412 </literallayout>
3413 </para>
3414
3415 <para>
3416 By default, the <filename>helloworld</filename>,
3417 <filename>helloworld-dbg</filename>, and
3418 <filename>helloworld-dev</filename> packages are built.
3419 For information on how to customize the packaging process,
3420 see the
3421 "<link linkend='splitting-an-application-into-multiple-packages'>Splitting an Application into Multiple Packages</link>"
3422 section.
3423 </para>
3424 </section>
3425
3426 <section id='new-recipe-autotooled-package'>
3427 <title>Autotooled Package</title>
3428 <para>
3429 Applications that use Autotools such as <filename>autoconf</filename> and
3430 <filename>automake</filename> require a recipe that has a source archive listed in
3431 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'>SRC_URI</ulink></filename> and
3432 also inherit the
3433 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-autotools'><filename>autotools</filename></ulink>
3434 class, which contains the definitions of all the steps
3435 needed to build an Autotool-based application.
3436 The result of the build is automatically packaged.
3437 And, if the application uses NLS for localization, packages with local information are
3438 generated (one package per language).
3439 Following is one example: (<filename>hello_2.3.bb</filename>)
3440 <literallayout class='monospaced'>
3441 SUMMARY = "GNU Helloworld application"
3442 SECTION = "examples"
3443 LICENSE = "GPLv2+"
3444 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
3445
3446 SRC_URI = "${GNU_MIRROR}/hello/hello-${PV}.tar.gz"
3447
3448 inherit autotools gettext
3449 </literallayout>
3450 </para>
3451
3452 <para>
3453 The variable
3454 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-LIC_FILES_CHKSUM'>LIC_FILES_CHKSUM</ulink></filename>
3455 is used to track source license changes as described in the
3456 "<link linkend='usingpoky-configuring-LIC_FILES_CHKSUM'>Tracking License Changes</link>"
3457 section in the Yocto Project Overview and Concepts Manual.
3458 You can quickly create Autotool-based recipes in a manner
3459 similar to the previous example.
3460 </para>
3461 </section>
3462
3463 <section id='new-recipe-makefile-based-package'>
3464 <title>Makefile-Based Package</title>
3465
3466 <para>
3467 Applications that use GNU <filename>make</filename> also require a recipe that has
3468 the source archive listed in
3469 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'>SRC_URI</ulink></filename>.
3470 You do not need to add a <filename>do_compile</filename> step since by default BitBake
3471 starts the <filename>make</filename> command to compile the application.
3472 If you need additional <filename>make</filename> options, you should store them in the
3473 <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_OEMAKE'><filename>EXTRA_OEMAKE</filename></ulink>
3474 or
3475 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGECONFIG_CONFARGS'><filename>PACKAGECONFIG_CONFARGS</filename></ulink>
3476 variables.
3477 BitBake passes these options into the GNU <filename>make</filename> invocation.
3478 Note that a <filename>do_install</filename> task is still required.
3479 Otherwise, BitBake runs an empty <filename>do_install</filename> task by default.
3480 </para>
3481
3482 <para>
3483 Some applications might require extra parameters to be passed to the compiler.
3484 For example, the application might need an additional header path.
3485 You can accomplish this by adding to the
3486 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-CFLAGS'>CFLAGS</ulink></filename> variable.
3487 The following example shows this:
3488 <literallayout class='monospaced'>
3489 CFLAGS_prepend = "-I ${S}/include "
3490 </literallayout>
3491 </para>
3492
3493 <para>
3494 In the following example, <filename>mtd-utils</filename> is a makefile-based package:
3495 <literallayout class='monospaced'>
3496 SUMMARY = "Tools for managing memory technology devices"
3497 SECTION = "base"
3498 DEPENDS = "zlib lzo e2fsprogs util-linux"
3499 HOMEPAGE = "http://www.linux-mtd.infradead.org/"
3500 LICENSE = "GPLv2+"
3501 LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
3502 file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c"
3503
3504 # Use the latest version at 26 Oct, 2013
3505 SRCREV = "9f107132a6a073cce37434ca9cda6917dd8d866b"
3506 SRC_URI = "git://git.infradead.org/mtd-utils.git \
3507 file://add-exclusion-to-mkfs-jffs2-git-2.patch \
3508 "
3509
3510 PV = "1.5.1+git${SRCPV}"
3511
3512 S = "${WORKDIR}/git"
3513
3514 EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'CFLAGS=${CFLAGS} -I${S}/include -DWITHOUT_XATTR' 'BUILDDIR=${S}'"
3515
3516 do_install () {
3517 oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir}
3518 }
3519
3520 PACKAGES =+ "mtd-utils-jffs2 mtd-utils-ubifs mtd-utils-misc"
3521
3522 FILES_mtd-utils-jffs2 = "${sbindir}/mkfs.jffs2 ${sbindir}/jffs2dump ${sbindir}/jffs2reader ${sbindir}/sumtool"
3523 FILES_mtd-utils-ubifs = "${sbindir}/mkfs.ubifs ${sbindir}/ubi*"
3524 FILES_mtd-utils-misc = "${sbindir}/nftl* ${sbindir}/ftl* ${sbindir}/rfd* ${sbindir}/doc* ${sbindir}/serve_image ${sbindir}/recv_image"
3525
3526 PARALLEL_MAKE = ""
3527
3528 BBCLASSEXTEND = "native"
3529 </literallayout>
3530 </para>
3531 </section>
3532
3533 <section id='splitting-an-application-into-multiple-packages'>
3534 <title>Splitting an Application into Multiple Packages</title>
3535
3536 <para>
3537 You can use the variables
3538 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGES'>PACKAGES</ulink></filename> and
3539 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-FILES'>FILES</ulink></filename>
3540 to split an application into multiple packages.
3541 </para>
3542
3543 <para>
3544 Following is an example that uses the <filename>libxpm</filename> recipe.
3545 By default, this recipe generates a single package that contains the library along
3546 with a few binaries.
3547 You can modify the recipe to split the binaries into separate packages:
3548 <literallayout class='monospaced'>
3549 require xorg-lib-common.inc
3550
3551 SUMMARY = "Xpm: X Pixmap extension library"
3552 LICENSE = "BSD"
3553 LIC_FILES_CHKSUM = "file://COPYING;md5=51f4270b012ecd4ab1a164f5f4ed6cf7"
3554 DEPENDS += "libxext libsm libxt"
3555 PE = "1"
3556
3557 XORG_PN = "libXpm"
3558
3559 PACKAGES =+ "sxpm cxpm"
3560 FILES_cxpm = "${bindir}/cxpm"
3561 FILES_sxpm = "${bindir}/sxpm"
3562 </literallayout>
3563 </para>
3564
3565 <para>
3566 In the previous example, we want to ship the <filename>sxpm</filename>
3567 and <filename>cxpm</filename> binaries in separate packages.
3568 Since <filename>bindir</filename> would be packaged into the main
3569 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PN'>PN</ulink></filename>
3570 package by default, we prepend the <filename>PACKAGES</filename>
3571 variable so additional package names are added to the start of list.
3572 This results in the extra <filename>FILES_*</filename>
3573 variables then containing information that define which files and
3574 directories go into which packages.
3575 Files included by earlier packages are skipped by latter packages.
3576 Thus, the main <filename>PN</filename> package
3577 does not include the above listed files.
3578 </para>
3579 </section>
3580
3581 <section id='packaging-externally-produced-binaries'>
3582 <title>Packaging Externally Produced Binaries</title>
3583
3584 <para>
3585 Sometimes, you need to add pre-compiled binaries to an
3586 image.
3587 For example, suppose that binaries for proprietary code
3588 exist, which are created by a particular division of a
3589 company.
3590 Your part of the company needs to use those binaries as
3591 part of an image that you are building using the
3592 OpenEmbedded build system.
3593 Since you only have the binaries and not the source code,
3594 you cannot use a typical recipe that expects to fetch the
3595 source specified in
3596 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
3597 and then compile it.
3598 </para>
3599
3600 <para>
3601 One method is to package the binaries and then install them
3602 as part of the image.
3603 Generally, it is not a good idea to package binaries
3604 since, among other things, it can hinder the ability to
3605 reproduce builds and could lead to compatibility problems
3606 with ABI in the future.
3607 However, sometimes you have no choice.
3608 </para>
3609
3610 <para>
3611 The easiest solution is to create a recipe that uses
3612 the
3613 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-bin-package'><filename>bin_package</filename></ulink>
3614 class and to be sure that you are using default locations
3615 for build artifacts.
3616 In most cases, the <filename>bin_package</filename> class
3617 handles "skipping" the configure and compile steps as well
3618 as sets things up to grab packages from the appropriate
3619 area.
3620 In particular, this class sets <filename>noexec</filename>
3621 on both the
3622 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-configure'><filename>do_configure</filename></ulink>
3623 and
3624 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-compile'><filename>do_compile</filename></ulink>
3625 tasks, sets
3626 <filename>FILES_${PN}</filename> to "/" so that it picks
3627 up all files, and sets up a
3628 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink>
3629 task, which effectively copies all files from
3630 <filename>${S}</filename> to <filename>${D}</filename>.
3631 The <filename>bin_package</filename> class works well when
3632 the files extracted into <filename>${S}</filename> are
3633 already laid out in the way they should be laid out
3634 on the target.
3635 For more information on these variables, see the
3636 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILES'><filename>FILES</filename></ulink>,
3637 <ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink>,
3638 <ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink>,
3639 and
3640 <ulink url='&YOCTO_DOCS_REF_URL;#var-D'><filename>D</filename></ulink>
3641 variables in the Yocto Project Reference Manual's variable
3642 glossary.
3643 <note><title>Notes</title>
3644 <itemizedlist>
3645 <listitem><para>
3646 Using
3647 <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPENDS'><filename>DEPENDS</filename></ulink>
3648 is a good idea even for components distributed
3649 in binary form, and is often necessary for
3650 shared libraries.
3651 For a shared library, listing the library
3652 dependencies in
3653 <filename>DEPENDS</filename> makes sure that
3654 the libraries are available in the staging
3655 sysroot when other recipes link against the
3656 library, which might be necessary for
3657 successful linking.
3658 </para></listitem>
3659 <listitem><para>
3660 Using <filename>DEPENDS</filename> also
3661 allows runtime dependencies between packages
3662 to be added automatically.
3663 See the
3664 "<ulink url='&YOCTO_DOCS_OM_URL;#automatically-added-runtime-dependencies'>Automatically Added Runtime Dependencies</ulink>"
3665 section in the Yocto Project Overview and
3666 Concepts Manual for more information.
3667 </para></listitem>
3668 </itemizedlist>
3669 </note>
3670 </para>
3671
3672 <para>
3673 If you cannot use the <filename>bin_package</filename>
3674 class, you need to be sure you are doing the following:
3675 <itemizedlist>
3676 <listitem><para>
3677 Create a recipe where the
3678 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-configure'><filename>do_configure</filename></ulink>
3679 and
3680 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-compile'><filename>do_compile</filename></ulink>
3681 tasks do nothing:
3682 It is usually sufficient to just not define these
3683 tasks in the recipe, because the default
3684 implementations do nothing unless a Makefile is
3685 found in
3686 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink><filename>}</filename>.
3687 </para>
3688
3689 <para>If
3690 <filename>${S}</filename> might contain a Makefile,
3691 or if you inherit some class that replaces
3692 <filename>do_configure</filename> and
3693 <filename>do_compile</filename> with custom
3694 versions, then you can use the
3695 <filename>[</filename><ulink url='&YOCTO_DOCS_BB_URL;#variable-flags'><filename>noexec</filename></ulink><filename>]</filename>
3696 flag to turn the tasks into no-ops, as follows:
3697 <literallayout class='monospaced'>
3698 do_configure[noexec] = "1"
3699 do_compile[noexec] = "1"
3700 </literallayout>
3701 Unlike
3702 <ulink url='&YOCTO_DOCS_BB_URL;#deleting-a-task'><filename>deleting the tasks</filename></ulink>,
3703 using the flag preserves the dependency chain from
3704 the
3705 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-fetch'><filename>do_fetch</filename></ulink>, <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-unpack'><filename>do_unpack</filename></ulink>,
3706 and
3707 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-patch'><filename>do_patch</filename></ulink>
3708 tasks to the
3709 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink>
3710 task.
3711 </para></listitem>
3712 <listitem><para>Make sure your
3713 <filename>do_install</filename> task installs the
3714 binaries appropriately.
3715 </para></listitem>
3716 <listitem><para>Ensure that you set up
3717 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILES'><filename>FILES</filename></ulink>
3718 (usually
3719 <filename>FILES_${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink><filename>}</filename>)
3720 to point to the files you have installed, which of
3721 course depends on where you have installed them
3722 and whether those files are in different locations
3723 than the defaults.
3724 </para></listitem>
3725 </itemizedlist>
3726 </para>
3727 </section>
3728 </section>
3729
3730 <section id="following-recipe-style-guidelines">
3731 <title>Following Recipe Style Guidelines</title>
3732
3733 <para>
3734 When writing recipes, it is good to conform to existing
3735 style guidelines.
3736 The
3737 <ulink url='http://www.openembedded.org/wiki/Styleguide'>OpenEmbedded Styleguide</ulink>
3738 wiki page provides rough guidelines for preferred recipe style.
3739 </para>
3740
3741 <para>
3742 It is common for existing recipes to deviate a bit from this
3743 style.
3744 However, aiming for at least a consistent style is a good idea.
3745 Some practices, such as omitting spaces around
3746 <filename>=</filename> operators in assignments or ordering
3747 recipe components in an erratic way, are widely seen as poor
3748 style.
3749 </para>
3750 </section>
3751
3752 <section id='recipe-syntax'>
3753 <title>Recipe Syntax</title>
3754
3755 <para>
3756 Understanding recipe file syntax is important for writing
3757 recipes.
3758 The following list overviews the basic items that make up a
3759 BitBake recipe file.
3760 For more complete BitBake syntax descriptions, see the
3761 "<ulink url='&YOCTO_DOCS_BB_URL;#bitbake-user-manual-metadata'>Syntax and Operators</ulink>"
3762 chapter of the BitBake User Manual.
3763 <itemizedlist>
3764 <listitem><para>
3765 <emphasis>Variable Assignments and Manipulations:</emphasis>
3766 Variable assignments allow a value to be assigned to a
3767 variable.
3768 The assignment can be static text or might include
3769 the contents of other variables.
3770 In addition to the assignment, appending and prepending
3771 operations are also supported.</para>
3772
3773 <para>The following example shows some of the ways
3774 you can use variables in recipes:
3775 <literallayout class='monospaced'>
3776 S = "${WORKDIR}/postfix-${PV}"
3777 CFLAGS += "-DNO_ASM"
3778 SRC_URI_append = " file://fixup.patch"
3779 </literallayout>
3780 </para></listitem>
3781 <listitem><para>
3782 <emphasis>Functions:</emphasis>
3783 Functions provide a series of actions to be performed.
3784 You usually use functions to override the default
3785 implementation of a task function or to complement
3786 a default function (i.e. append or prepend to an
3787 existing function).
3788 Standard functions use <filename>sh</filename> shell
3789 syntax, although access to OpenEmbedded variables and
3790 internal methods are also available.</para>
3791
3792 <para>The following is an example function from the
3793 <filename>sed</filename> recipe:
3794 <literallayout class='monospaced'>
3795 do_install () {
3796 autotools_do_install
3797 install -d ${D}${base_bindir}
3798 mv ${D}${bindir}/sed ${D}${base_bindir}/sed
3799 rmdir ${D}${bindir}/
3800 }
3801 </literallayout>
3802 It is also possible to implement new functions that
3803 are called between existing tasks as long as the
3804 new functions are not replacing or complementing the
3805 default functions.
3806 You can implement functions in Python
3807 instead of shell.
3808 Both of these options are not seen in the majority of
3809 recipes.
3810 </para></listitem>
3811 <listitem><para><emphasis>Keywords:</emphasis>
3812 BitBake recipes use only a few keywords.
3813 You use keywords to include common
3814 functions (<filename>inherit</filename>), load parts
3815 of a recipe from other files
3816 (<filename>include</filename> and
3817 <filename>require</filename>) and export variables
3818 to the environment (<filename>export</filename>).
3819 </para>
3820
3821 <para>The following example shows the use of some of
3822 these keywords:
3823 <literallayout class='monospaced'>
3824 export POSTCONF = "${STAGING_BINDIR}/postconf"
3825 inherit autoconf
3826 require otherfile.inc
3827 </literallayout>
3828 </para></listitem>
3829 <listitem><para>
3830 <emphasis>Comments (#):</emphasis>
3831 Any lines that begin with the hash character
3832 (<filename>#</filename>) are treated as comment lines
3833 and are ignored:
3834 <literallayout class='monospaced'>
3835 # This is a comment
3836 </literallayout>
3837 </para></listitem>
3838 </itemizedlist>
3839 </para>
3840
3841 <para>
3842 This next list summarizes the most important and most commonly
3843 used parts of the recipe syntax.
3844 For more information on these parts of the syntax, you can
3845 reference the
3846 <ulink url='&YOCTO_DOCS_BB_URL;#bitbake-user-manual-metadata'>Syntax and Operators</ulink>
3847 chapter in the BitBake User Manual.
3848 <itemizedlist>
3849 <listitem><para>
3850 <emphasis>Line Continuation (\):</emphasis>
3851 Use the backward slash (<filename>\</filename>)
3852 character to split a statement over multiple lines.
3853 Place the slash character at the end of the line that
3854 is to be continued on the next line:
3855 <literallayout class='monospaced'>
3856 VAR = "A really long \
3857 line"
3858 </literallayout>
3859 <note>
3860 You cannot have any characters including spaces
3861 or tabs after the slash character.
3862 </note>
3863 </para></listitem>
3864 <listitem><para>
3865 <emphasis>Using Variables (${<replaceable>VARNAME</replaceable>}):</emphasis>
3866 Use the <filename>${<replaceable>VARNAME</replaceable>}</filename>
3867 syntax to access the contents of a variable:
3868 <literallayout class='monospaced'>
3869 SRC_URI = "${SOURCEFORGE_MIRROR}/libpng/zlib-${PV}.tar.gz"
3870 </literallayout>
3871 <note>
3872 It is important to understand that the value of a
3873 variable expressed in this form does not get
3874 substituted automatically.
3875 The expansion of these expressions happens
3876 on-demand later (e.g. usually when a function that
3877 makes reference to the variable executes).
3878 This behavior ensures that the values are most
3879 appropriate for the context in which they are
3880 finally used.
3881 On the rare occasion that you do need the variable
3882 expression to be expanded immediately, you can use
3883 the <filename>:=</filename> operator instead of
3884 <filename>=</filename> when you make the
3885 assignment, but this is not generally needed.
3886 </note>
3887 </para></listitem>
3888 <listitem><para>
3889 <emphasis>Quote All Assignments ("<replaceable>value</replaceable>"):</emphasis>
3890 Use double quotes around values in all variable
3891 assignments (e.g.
3892 <filename>"<replaceable>value</replaceable>"</filename>).
3893 Following is an example:
3894 <literallayout class='monospaced'>
3895 VAR1 = "${OTHERVAR}"
3896 VAR2 = "The version is ${PV}"
3897 </literallayout>
3898 </para></listitem>
3899 <listitem><para>
3900 <emphasis>Conditional Assignment (?=):</emphasis>
3901 Conditional assignment is used to assign a
3902 value to a variable, but only when the variable is
3903 currently unset.
3904 Use the question mark followed by the equal sign
3905 (<filename>?=</filename>) to make a "soft" assignment
3906 used for conditional assignment.
3907 Typically, "soft" assignments are used in the
3908 <filename>local.conf</filename> file for variables
3909 that are allowed to come through from the external
3910 environment.
3911 </para>
3912
3913 <para>Here is an example where
3914 <filename>VAR1</filename> is set to "New value" if
3915 it is currently empty.
3916 However, if <filename>VAR1</filename> has already been
3917 set, it remains unchanged:
3918 <literallayout class='monospaced'>
3919 VAR1 ?= "New value"
3920 </literallayout>
3921 In this next example, <filename>VAR1</filename>
3922 is left with the value "Original value":
3923 <literallayout class='monospaced'>
3924 VAR1 = "Original value"
3925 VAR1 ?= "New value"
3926 </literallayout>
3927 </para></listitem>
3928 <listitem><para>
3929 <emphasis>Appending (+=):</emphasis>
3930 Use the plus character followed by the equals sign
3931 (<filename>+=</filename>) to append values to existing
3932 variables.
3933 <note>
3934 This operator adds a space between the existing
3935 content of the variable and the new content.
3936 </note></para>
3937
3938 <para>Here is an example:
3939 <literallayout class='monospaced'>
3940 SRC_URI += "file://fix-makefile.patch"
3941 </literallayout>
3942 </para></listitem>
3943 <listitem><para>
3944 <emphasis>Prepending (=+):</emphasis>
3945 Use the equals sign followed by the plus character
3946 (<filename>=+</filename>) to prepend values to existing
3947 variables.
3948 <note>
3949 This operator adds a space between the new content
3950 and the existing content of the variable.
3951 </note></para>
3952
3953 <para>Here is an example:
3954 <literallayout class='monospaced'>
3955 VAR =+ "Starts"
3956 </literallayout>
3957 </para></listitem>
3958 <listitem><para>
3959 <emphasis>Appending (_append):</emphasis>
3960 Use the <filename>_append</filename> operator to
3961 append values to existing variables.
3962 This operator does not add any additional space.
3963 Also, the operator is applied after all the
3964 <filename>+=</filename>, and
3965 <filename>=+</filename> operators have been applied and
3966 after all <filename>=</filename> assignments have
3967 occurred.
3968 </para>
3969
3970 <para>The following example shows the space being
3971 explicitly added to the start to ensure the appended
3972 value is not merged with the existing value:
3973 <literallayout class='monospaced'>
3974 SRC_URI_append = " file://fix-makefile.patch"
3975 </literallayout>
3976 You can also use the <filename>_append</filename>
3977 operator with overrides, which results in the actions
3978 only being performed for the specified target or
3979 machine:
3980 <literallayout class='monospaced'>
3981 SRC_URI_append_sh4 = " file://fix-makefile.patch"
3982 </literallayout>
3983 </para></listitem>
3984 <listitem><para>
3985 <emphasis>Prepending (_prepend):</emphasis>
3986 Use the <filename>_prepend</filename> operator to
3987 prepend values to existing variables.
3988 This operator does not add any additional space.
3989 Also, the operator is applied after all the
3990 <filename>+=</filename>, and
3991 <filename>=+</filename> operators have been applied and
3992 after all <filename>=</filename> assignments have
3993 occurred.
3994 </para>
3995
3996 <para>The following example shows the space being
3997 explicitly added to the end to ensure the prepended
3998 value is not merged with the existing value:
3999 <literallayout class='monospaced'>
4000 CFLAGS_prepend = "-I${S}/myincludes "
4001 </literallayout>
4002 You can also use the <filename>_prepend</filename>
4003 operator with overrides, which results in the actions
4004 only being performed for the specified target or
4005 machine:
4006 <literallayout class='monospaced'>
4007 CFLAGS_prepend_sh4 = "-I${S}/myincludes "
4008 </literallayout>
4009 </para></listitem>
4010 <listitem><para>
4011 <emphasis>Overrides:</emphasis>
4012 You can use overrides to set a value conditionally,
4013 typically based on how the recipe is being built.
4014 For example, to set the
4015 <ulink url='&YOCTO_DOCS_REF_URL;#var-KBRANCH'><filename>KBRANCH</filename></ulink>
4016 variable's value to "standard/base" for any target
4017 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>,
4018 except for qemuarm where it should be set to
4019 "standard/arm-versatile-926ejs", you would do the
4020 following:
4021 <literallayout class='monospaced'>
4022 KBRANCH = "standard/base"
4023 KBRANCH_qemuarm = "standard/arm-versatile-926ejs"
4024 </literallayout>
4025 Overrides are also used to separate alternate values
4026 of a variable in other situations.
4027 For example, when setting variables such as
4028 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILES'><filename>FILES</filename></ulink>
4029 and
4030 <ulink url='&YOCTO_DOCS_REF_URL;#var-RDEPENDS'><filename>RDEPENDS</filename></ulink>
4031 that are specific to individual packages produced by
4032 a recipe, you should always use an override that
4033 specifies the name of the package.
4034 </para></listitem>
4035 <listitem><para>
4036 <emphasis>Indentation:</emphasis>
4037 Use spaces for indentation rather than than tabs.
4038 For shell functions, both currently work.
4039 However, it is a policy decision of the Yocto Project
4040 to use tabs in shell functions.
4041 Realize that some layers have a policy to use spaces
4042 for all indentation.
4043 </para></listitem>
4044 <listitem><para>
4045 <emphasis>Using Python for Complex Operations:</emphasis>
4046 For more advanced processing, it is possible to use
4047 Python code during variable assignments (e.g.
4048 search and replacement on a variable).</para>
4049
4050 <para>You indicate Python code using the
4051 <filename>${@<replaceable>python_code</replaceable>}</filename>
4052 syntax for the variable assignment:
4053 <literallayout class='monospaced'>
4054 SRC_URI = "ftp://ftp.info-zip.org/pub/infozip/src/zip${@d.getVar('PV',1).replace('.', '')}.tgz
4055 </literallayout>
4056 </para></listitem>
4057 <listitem><para>
4058 <emphasis>Shell Function Syntax:</emphasis>
4059 Write shell functions as if you were writing a shell
4060 script when you describe a list of actions to take.
4061 You should ensure that your script works with a generic
4062 <filename>sh</filename> and that it does not require
4063 any <filename>bash</filename> or other shell-specific
4064 functionality.
4065 The same considerations apply to various system
4066 utilities (e.g. <filename>sed</filename>,
4067 <filename>grep</filename>, <filename>awk</filename>,
4068 and so forth) that you might wish to use.
4069 If in doubt, you should check with multiple
4070 implementations - including those from BusyBox.
4071 </para></listitem>
4072 </itemizedlist>
4073 </para>
4074 </section>
4075 </section>
4076
4077 <section id="platdev-newmachine">
4078 <title>Adding a New Machine</title>
4079
4080 <para>
4081 Adding a new machine to the Yocto Project is a straightforward
4082 process.
4083 This section describes how to add machines that are similar
4084 to those that the Yocto Project already supports.
4085 <note>
4086 Although well within the capabilities of the Yocto Project,
4087 adding a totally new architecture might require
4088 changes to <filename>gcc/glibc</filename> and to the site
4089 information, which is beyond the scope of this manual.
4090 </note>
4091 </para>
4092
4093 <para>
4094 For a complete example that shows how to add a new machine,
4095 see the
4096 "<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-bitbake-layers-script'>Creating a New BSP Layer Using the <filename>bitbake-layers</filename> Script</ulink>"
4097 section in the Yocto Project Board Support Package (BSP)
4098 Developer's Guide.
4099 </para>
4100
4101 <section id="platdev-newmachine-conffile">
4102 <title>Adding the Machine Configuration File</title>
4103
4104 <para>
4105 To add a new machine, you need to add a new machine
4106 configuration file to the layer's
4107 <filename>conf/machine</filename> directory.
4108 This configuration file provides details about the device
4109 you are adding.
4110 </para>
4111
4112 <para>
4113 The OpenEmbedded build system uses the root name of the
4114 machine configuration file to reference the new machine.
4115 For example, given a machine configuration file named
4116 <filename>crownbay.conf</filename>, the build system
4117 recognizes the machine as "crownbay".
4118 </para>
4119
4120 <para>
4121 The most important variables you must set in your machine
4122 configuration file or include from a lower-level configuration
4123 file are as follows:
4124 <itemizedlist>
4125 <listitem><para><filename><ulink url='&YOCTO_DOCS_REF_URL;#var-TARGET_ARCH'>TARGET_ARCH</ulink></filename>
4126 (e.g. "arm")</para></listitem>
4127 <listitem><para><filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PREFERRED_PROVIDER'>PREFERRED_PROVIDER</ulink>_virtual/kernel</filename>
4128 </para></listitem>
4129 <listitem><para><filename><ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_FEATURES'>MACHINE_FEATURES</ulink></filename>
4130 (e.g. "apm screen wifi")</para></listitem>
4131 </itemizedlist>
4132 </para>
4133
4134 <para>
4135 You might also need these variables:
4136 <itemizedlist>
4137 <listitem><para><filename><ulink url='&YOCTO_DOCS_REF_URL;#var-SERIAL_CONSOLES'>SERIAL_CONSOLES</ulink></filename>
4138 (e.g. "115200;ttyS0 115200;ttyS1")</para></listitem>
4139 <listitem><para><filename><ulink url='&YOCTO_DOCS_REF_URL;#var-KERNEL_IMAGETYPE'>KERNEL_IMAGETYPE</ulink></filename>
4140 (e.g. "zImage")</para></listitem>
4141 <listitem><para><filename><ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FSTYPES'>IMAGE_FSTYPES</ulink></filename>
4142 (e.g. "tar.gz jffs2")</para></listitem>
4143 </itemizedlist>
4144 </para>
4145
4146 <para>
4147 You can find full details on these variables in the reference
4148 section.
4149 You can leverage existing machine <filename>.conf</filename>
4150 files from <filename>meta-yocto-bsp/conf/machine/</filename>.
4151 </para>
4152 </section>
4153
4154 <section id="platdev-newmachine-kernel">
4155 <title>Adding a Kernel for the Machine</title>
4156
4157 <para>
4158 The OpenEmbedded build system needs to be able to build a kernel
4159 for the machine.
4160 You need to either create a new kernel recipe for this machine,
4161 or extend an existing kernel recipe.
4162 You can find several kernel recipe examples in the
4163 Source Directory at
4164 <filename>meta/recipes-kernel/linux</filename>
4165 that you can use as references.
4166 </para>
4167
4168 <para>
4169 If you are creating a new kernel recipe, normal recipe-writing
4170 rules apply for setting up a
4171 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'>SRC_URI</ulink></filename>.
4172 Thus, you need to specify any necessary patches and set
4173 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-S'>S</ulink></filename>
4174 to point at the source code.
4175 You need to create a <filename>do_configure</filename> task that
4176 configures the unpacked kernel with a
4177 <filename>defconfig</filename> file.
4178 You can do this by using a <filename>make defconfig</filename>
4179 command or, more commonly, by copying in a suitable
4180 <filename>defconfig</filename> file and then running
4181 <filename>make oldconfig</filename>.
4182 By making use of <filename>inherit kernel</filename> and
4183 potentially some of the <filename>linux-*.inc</filename> files,
4184 most other functionality is centralized and the defaults of the
4185 class normally work well.
4186 </para>
4187
4188 <para>
4189 If you are extending an existing kernel recipe, it is usually
4190 a matter of adding a suitable <filename>defconfig</filename>
4191 file.
4192 The file needs to be added into a location similar to
4193 <filename>defconfig</filename> files used for other machines
4194 in a given kernel recipe.
4195 A possible way to do this is by listing the file in the
4196 <filename>SRC_URI</filename> and adding the machine to the
4197 expression in
4198 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-COMPATIBLE_MACHINE'>COMPATIBLE_MACHINE</ulink></filename>:
4199 <literallayout class='monospaced'>
4200 COMPATIBLE_MACHINE = '(qemux86|qemumips)'
4201 </literallayout>
4202 For more information on <filename>defconfig</filename> files,
4203 see the
4204 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#changing-the-configuration'>Changing the Configuration</ulink>"
4205 section in the Yocto Project Linux Kernel Development Manual.
4206 </para>
4207 </section>
4208
4209 <section id="platdev-newmachine-formfactor">
4210 <title>Adding a Formfactor Configuration File</title>
4211
4212 <para>
4213 A formfactor configuration file provides information about the
4214 target hardware for which the image is being built and information that
4215 the build system cannot obtain from other sources such as the kernel.
4216 Some examples of information contained in a formfactor configuration file include
4217 framebuffer orientation, whether or not the system has a keyboard,
4218 the positioning of the keyboard in relation to the screen, and
4219 the screen resolution.
4220 </para>
4221
4222 <para>
4223 The build system uses reasonable defaults in most cases.
4224 However, if customization is
4225 necessary, you need to create a <filename>machconfig</filename> file
4226 in the <filename>meta/recipes-bsp/formfactor/files</filename>
4227 directory.
4228 This directory contains directories for specific machines such as
4229 <filename>qemuarm</filename> and <filename>qemux86</filename>.
4230 For information about the settings available and the defaults, see the
4231 <filename>meta/recipes-bsp/formfactor/files/config</filename> file found in the
4232 same area.
4233 </para>
4234
4235 <para>
4236 Following is an example for "qemuarm" machine:
4237 <literallayout class='monospaced'>
4238 HAVE_TOUCHSCREEN=1
4239 HAVE_KEYBOARD=1
4240
4241 DISPLAY_CAN_ROTATE=0
4242 DISPLAY_ORIENTATION=0
4243 #DISPLAY_WIDTH_PIXELS=640
4244 #DISPLAY_HEIGHT_PIXELS=480
4245 #DISPLAY_BPP=16
4246 DISPLAY_DPI=150
4247 DISPLAY_SUBPIXEL_ORDER=vrgb
4248 </literallayout>
4249 </para>
4250 </section>
4251 </section>
4252
4253 <section id='gs-upgrading-recipes'>
4254 <title>Upgrading Recipes</title>
4255
4256 <para>
4257 Over time, upstream developers publish new versions for software
4258 built by layer recipes.
4259 It is recommended to keep recipes up-to-date with upstream
4260 version releases.
4261 </para>
4262
4263 <para>
4264 While several methods exist that allow you upgrade a recipe,
4265 you might consider checking on the upgrade status of a recipe
4266 first.
4267 You can do so using the
4268 <filename>devtool check-upgrade-status</filename> command.
4269 See the
4270 "<ulink url='&YOCTO_DOCS_REF_URL;#devtool-checking-on-the-upgrade-status-of-a-recipe'>Checking on the Upgrade Status of a Recipe</ulink>"
4271 section in the Yocto Project Reference Manual for more information.
4272 </para>
4273
4274 <para>
4275 The remainder of this section describes three ways you can
4276 upgrade a recipe.
4277 You can use the Automated Upgrade Helper (AUH) to set up
4278 automatic version upgrades.
4279 Alternatively, you can use <filename>devtool upgrade</filename>
4280 to set up semi-automatic version upgrades.
4281 Finally, you can manually upgrade a recipe by editing the
4282 recipe itself.
4283 </para>
4284
4285 <section id='gs-using-the-auto-upgrade-helper'>
4286 <title>Using the Auto Upgrade Helper (AUH)</title>
4287
4288 <para>
4289 The AUH utility works in conjunction with the
4290 OpenEmbedded build system in order to automatically generate
4291 upgrades for recipes based on new versions being
4292 published upstream.
4293 Use AUH when you want to create a service that performs the
4294 upgrades automatically and optionally sends you an email with
4295 the results.
4296 </para>
4297
4298 <para>
4299 AUH allows you to update several recipes with a single use.
4300 You can also optionally perform build and integration tests
4301 using images with the results saved to your hard drive and
4302 emails of results optionally sent to recipe maintainers.
4303 Finally, AUH creates Git commits with appropriate commit
4304 messages in the layer's tree for the changes made to recipes.
4305 <note>
4306 Conditions do exist when you should not use AUH to upgrade
4307 recipes and you should instead use either
4308 <filename>devtool upgrade</filename> or upgrade your
4309 recipes manually:
4310 <itemizedlist>
4311 <listitem><para>
4312 When AUH cannot complete the upgrade sequence.
4313 This situation usually results because custom
4314 patches carried by the recipe cannot be
4315 automatically rebased to the new version.
4316 In this case, <filename>devtool upgrade</filename>
4317 allows you to manually resolve conflicts.
4318 </para></listitem>
4319 <listitem><para>
4320 When for any reason you want fuller control over
4321 the upgrade process.
4322 For example, when you want special arrangements
4323 for testing.
4324 </para></listitem>
4325 </itemizedlist>
4326 </note>
4327 </para>
4328
4329 <para>
4330 The following steps describe how to set up the AUH utility:
4331 <orderedlist>
4332 <listitem><para>
4333 <emphasis>Be Sure the Development Host is Set Up:</emphasis>
4334 You need to be sure that your development host is
4335 set up to use the Yocto Project.
4336 For information on how to set up your host, see the
4337 "<link linkend='dev-preparing-the-build-host'>Preparing the Build Host</link>"
4338 section.
4339 </para></listitem>
4340 <listitem><para>
4341 <emphasis>Make Sure Git is Configured:</emphasis>
4342 The AUH utility requires Git to be configured because
4343 AUH uses Git to save upgrades.
4344 Thus, you must have Git user and email configured.
4345 The following command shows your configurations:
4346 <literallayout class='monospaced'>
4347 $ git config --list
4348 </literallayout>
4349 If you do not have the user and email configured, you
4350 can use the following commands to do so:
4351 <literallayout class='monospaced'>
4352 $ git config --global user.name <replaceable>some_name</replaceable>
4353 $ git config --global user.email <replaceable>username</replaceable>@<replaceable>domain</replaceable>.com
4354 </literallayout>
4355 </para></listitem>
4356 <listitem><para>
4357 <emphasis>Clone the AUH Repository:</emphasis>
4358 To use AUH, you must clone the repository onto your
4359 development host.
4360 The following command uses Git to create a local
4361 copy of the repository on your system:
4362 <literallayout class='monospaced'>
4363 $ git clone git://git.yoctoproject.org/auto-upgrade-helper
4364 Cloning into 'auto-upgrade-helper'...
4365 remote: Counting objects: 768, done.
4366 remote: Compressing objects: 100% (300/300), done.
4367 remote: Total 768 (delta 499), reused 703 (delta 434)
4368 Receiving objects: 100% (768/768), 191.47 KiB | 98.00 KiB/s, done.
4369 Resolving deltas: 100% (499/499), done.
4370 Checking connectivity... done.
4371 </literallayout>
4372 AUH is not part of the
4373 <ulink url='&YOCTO_DOCS_REF_URL;#oe-core'>OpenEmbedded-Core (OE-Core)</ulink>
4374 or
4375 <ulink url='&YOCTO_DOCS_REF_URL;#poky'>Poky</ulink>
4376 repositories.
4377 </para></listitem>
4378 <listitem><para>
4379 <emphasis>Create a Dedicated Build Directory:</emphasis>
4380 Run the
4381 <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>oe-init-build-env</filename></ulink>
4382 script to create a fresh build directory that you
4383 use exclusively for running the AUH utility:
4384 <literallayout class='monospaced'>
4385 $ cd ~/poky
4386 $ source oe-init-build-env <replaceable>your_AUH_build_directory</replaceable>
4387 </literallayout>
4388 Re-using an existing build directory and its
4389 configurations is not recommended as existing settings
4390 could cause AUH to fail or behave undesirably.
4391 </para></listitem>
4392 <listitem><para>
4393 <emphasis>Make Configurations in Your Local Configuration File:</emphasis>
4394 Several settings need to exist in the
4395 <filename>local.conf</filename> file in the build
4396 directory you just created for AUH.
4397 Make these following configurations:
4398 <itemizedlist>
4399 <listitem><para>
4400 If you want to enable
4401 <ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-build-output-quality'>Build History</ulink>,
4402 which is optional, you need the following
4403 lines in the
4404 <filename>conf/local.conf</filename> file:
4405 <literallayout class='monospaced'>
4406 INHERIT =+ "buildhistory"
4407 BUILDHISTORY_COMMIT = "1"
4408 </literallayout>
4409 With this configuration and a successful
4410 upgrade, a build history "diff" file appears in
4411 the
4412 <filename>upgrade-helper/work/recipe/buildhistory-diff.txt</filename>
4413 file found in your build directory.
4414 </para></listitem>
4415 <listitem><para>
4416 If you want to enable testing through the
4417 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-testimage*'><filename>testimage</filename></ulink>
4418 class, which is optional, you need to have the
4419 following set in your
4420 <filename>conf/local.conf</filename> file:
4421 <literallayout class='monospaced'>
4422 INHERIT += "testimage"
4423 </literallayout>
4424 <note>
4425 If your distro does not enable by default
4426 ptest, which Poky does, you need the
4427 following in your
4428 <filename>local.conf</filename> file:
4429 <literallayout class='monospaced'>
4430 DISTRO_FEATURES_append = " ptest"
4431 </literallayout>
4432 </note>
4433 </para></listitem>
4434 </itemizedlist>
4435 </para></listitem>
4436 <listitem><para>
4437 <emphasis>Optionally Start a vncserver:</emphasis>
4438 If you are running in a server without an X11 session,
4439 you need to start a vncserver:
4440 <literallayout class='monospaced'>
4441 $ vncserver :1
4442 $ export DISPLAY=:1
4443 </literallayout>
4444 </para></listitem>
4445 <listitem><para>
4446 <emphasis>Create and Edit an AUH Configuration File:</emphasis>
4447 You need to have the
4448 <filename>upgrade-helper/upgrade-helper.conf</filename>
4449 configuration file in your build directory.
4450 You can find a sample configuration file in the
4451 <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/auto-upgrade-helper/tree/'>AUH source repository</ulink>.
4452 </para>
4453
4454 <para>Read through the sample file and make
4455 configurations as needed.
4456 For example, if you enabled build history in your
4457 <filename>local.conf</filename> as described earlier,
4458 you must enable it in
4459 <filename>upgrade-helper.conf</filename>.</para>
4460
4461 <para>Also, if you are using the default
4462 <filename>maintainers.inc</filename> file supplied
4463 with Poky and located in
4464 <filename>meta-yocto</filename> and you do not set a
4465 "maintainers_whitelist" or "global_maintainer_override"
4466 in the <filename>upgrade-helper.conf</filename>
4467 configuration, and you specify "-e all" on the
4468 AUH command-line, the utility automatically sends out
4469 emails to all the default maintainers.
4470 Please avoid this.
4471 </para></listitem>
4472 </orderedlist>
4473 </para>
4474
4475 <para>
4476 This next set of examples describes how to use the AUH:
4477 <itemizedlist>
4478 <listitem><para>
4479 <emphasis>Upgrading a Specific Recipe:</emphasis>
4480 To upgrade a specific recipe, use the following
4481 form:
4482 <literallayout class='monospaced'>
4483 $ upgrade-helper.py <replaceable>recipe_name</replaceable>
4484 </literallayout>
4485 For example, this command upgrades the
4486 <filename>xmodmap</filename> recipe:
4487 <literallayout class='monospaced'>
4488 $ upgrade-helper.py xmodmap
4489 </literallayout>
4490 </para></listitem>
4491 <listitem><para>
4492 <emphasis>Upgrading a Specific Recipe to a Particular Version:</emphasis>
4493 To upgrade a specific recipe to a particular version,
4494 use the following form:
4495 <literallayout class='monospaced'>
4496 $ upgrade-helper.py <replaceable>recipe_name</replaceable> -t <replaceable>version</replaceable>
4497 </literallayout>
4498 For example, this command upgrades the
4499 <filename>xmodmap</filename> recipe to version
4500 1.2.3:
4501 <literallayout class='monospaced'>
4502 $ upgrade-helper.py xmodmap -t 1.2.3
4503 </literallayout>
4504 </para></listitem>
4505 <listitem><para>
4506 <emphasis>Upgrading all Recipes to the Latest Versions and Suppressing Email Notifications:</emphasis>
4507 To upgrade all recipes to their most recent versions
4508 and suppress the email notifications, use the following
4509 command:
4510 <literallayout class='monospaced'>
4511 $ upgrade-helper.py all
4512 </literallayout>
4513 </para></listitem>
4514 <listitem><para>
4515 <emphasis>Upgrading all Recipes to the Latest Versions and Send Email Notifications:</emphasis>
4516 To upgrade all recipes to their most recent versions
4517 and send email messages to maintainers for each
4518 attempted recipe as well as a status email, use the
4519 following command:
4520 <literallayout class='monospaced'>
4521 $ upgrade-helper.py -e all
4522 </literallayout>
4523 </para></listitem>
4524 </itemizedlist>
4525 </para>
4526
4527 <para>
4528 Once you have run the AUH utility, you can find the results
4529 in the AUH build directory:
4530 <literallayout class='monospaced'>
4531 ${BUILDDIR}/upgrade-helper/<replaceable>timestamp</replaceable>
4532 </literallayout>
4533 The AUH utility also creates recipe update commits from
4534 successful upgrade attempts in the layer tree.
4535 </para>
4536
4537 <para>
4538 You can easily set up to run the AUH utility on a regular
4539 basis by using a cron job.
4540 See the
4541 <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/auto-upgrade-helper/tree/weeklyjob.sh'><filename>weeklyjob.sh</filename></ulink>
4542 file distributed with the utility for an example.
4543 </para>
4544 </section>
4545
4546 <section id='gs-using-devtool-upgrade'>
4547 <title>Using <filename>devtool upgrade</filename></title>
4548
4549 <para>
4550 As mentioned earlier, an alternative method for upgrading
4551 recipes to newer versions is to use
4552 <ulink url='&YOCTO_DOCS_REF_URL;#ref-devtool-reference'><filename>devtool upgrade</filename></ulink>.
4553 You can read about <filename>devtool upgrade</filename> in
4554 general in the
4555 "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-devtool-use-devtool-upgrade-to-create-a-version-of-the-recipe-that-supports-a-newer-version-of-the-software'>Use <filename>devtool upgrade</filename> to Create a Version of the Recipe that Supports a Newer Version of the Software</ulink>"
4556 section in the Yocto Project Application Development and the
4557 Extensible Software Development Kit (eSDK) Manual.
4558 </para>
4559
4560 <para>
4561 To see all the command-line options available with
4562 <filename>devtool upgrade</filename>, use the following help
4563 command:
4564 <literallayout class='monospaced'>
4565 $ devtool upgrade -h
4566 </literallayout>
4567 </para>
4568
4569 <para>
4570 If you want to find out what version a recipe is currently at
4571 upstream without any attempt to upgrade your local version of
4572 the recipe, you can use the following command:
4573 <literallayout class='monospaced'>
4574 $ devtool latest-version <replaceable>recipe_name</replaceable>
4575 </literallayout>
4576 </para>
4577
4578 <para>
4579 As mentioned in the previous section describing AUH,
4580 <filename>devtool upgrade</filename> works in a
4581 less-automated manner than AUH.
4582 Specifically, <filename>devtool upgrade</filename> only
4583 works on a single recipe that you name on the command line,
4584 cannot perform build and integration testing using images,
4585 and does not automatically generate commits for changes in
4586 the source tree.
4587 Despite all these "limitations",
4588 <filename>devtool upgrade</filename> updates the recipe file
4589 to the new upstream version and attempts to rebase custom
4590 patches contained by the recipe as needed.
4591 <note>
4592 AUH uses much of <filename>devtool upgrade</filename>
4593 behind the scenes making AUH somewhat of a "wrapper"
4594 application for <filename>devtool upgrade</filename>.
4595 </note>
4596 </para>
4597
4598 <para>
4599 A typical scenario involves having used Git to clone an
4600 upstream repository that you use during build operations.
4601 Because you are (or have) built the recipe in the past, the
4602 layer is likely added to your configuration already.
4603 If for some reason, the layer is not added, you could add
4604 it easily using the
4605 <ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-bitbake-layers-script'><filename>bitbake-layers</filename></ulink>
4606 script.
4607 For example, suppose you use the <filename>nano.bb</filename>
4608 recipe from the <filename>meta-oe</filename> layer in the
4609 <filename>meta-openembedded</filename> repository.
4610 For this example, assume that the layer has been cloned into
4611 following area:
4612 <literallayout class='monospaced'>
4613 /home/scottrif/meta-openembedded
4614 </literallayout>
4615 The following command from your
4616 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
4617 adds the layer to your build configuration (i.e.
4618 <filename>${BUILDDIR}/conf/bblayers.conf</filename>):
4619 <literallayout class='monospaced'>
4620 $ bitbake-layers add-layer /home/scottrif/meta-openembedded/meta-oe
4621 NOTE: Starting bitbake server...
4622 Parsing recipes: 100% |##########################################| Time: 0:00:55
4623 Parsing of 1431 .bb files complete (0 cached, 1431 parsed). 2040 targets, 56 skipped, 0 masked, 0 errors.
4624 Removing 12 recipes from the x86_64 sysroot: 100% |##############| Time: 0:00:00
4625 Removing 1 recipes from the x86_64_i586 sysroot: 100% |##########| Time: 0:00:00
4626 Removing 5 recipes from the i586 sysroot: 100% |#################| Time: 0:00:00
4627 Removing 5 recipes from the qemux86 sysroot: 100% |##############| Time: 0:00:00
4628 </literallayout>
4629 For this example, assume that the <filename>nano.bb</filename>
4630 recipe that is upstream has a 2.9.3 version number.
4631 However, the version in the local repository is 2.7.4.
4632 The following command from your build directory automatically
4633 upgrades the recipe for you:
4634 <note>
4635 Using the <filename>-V</filename> option is not necessary.
4636 Omitting the version number causes
4637 <filename>devtool upgrade</filename> to upgrade the recipe
4638 to the most recent version.
4639 </note>
4640 <literallayout class='monospaced'>
4641 $ devtool upgrade nano -V 2.9.3
4642 NOTE: Starting bitbake server...
4643 NOTE: Creating workspace layer in /home/scottrif/poky/build/workspace
4644 Parsing recipes: 100% |##########################################| Time: 0:00:46
4645 Parsing of 1431 .bb files complete (0 cached, 1431 parsed). 2040 targets, 56 skipped, 0 masked, 0 errors.
4646 NOTE: Extracting current version source...
4647 NOTE: Resolving any missing task queue dependencies
4648 .
4649 .
4650 .
4651 NOTE: Executing SetScene Tasks
4652 NOTE: Executing RunQueue Tasks
4653 NOTE: Tasks Summary: Attempted 74 tasks of which 72 didn't need to be rerun and all succeeded.
4654 Adding changed files: 100% |#####################################| Time: 0:00:00
4655 NOTE: Upgraded source extracted to /home/scottrif/poky/build/workspace/sources/nano
4656 NOTE: New recipe is /home/scottrif/poky/build/workspace/recipes/nano/nano_2.9.3.bb
4657 </literallayout>
4658 Continuing with this example, you can use
4659 <filename>devtool build</filename> to build the newly upgraded
4660 recipe:
4661 <literallayout class='monospaced'>
4662 $ devtool build nano
4663 NOTE: Starting bitbake server...
4664 Loading cache: 100% |################################################################################################| Time: 0:00:01
4665 Loaded 2040 entries from dependency cache.
4666 Parsing recipes: 100% |##############################################################################################| Time: 0:00:00
4667 Parsing of 1432 .bb files complete (1431 cached, 1 parsed). 2041 targets, 56 skipped, 0 masked, 0 errors.
4668 NOTE: Resolving any missing task queue dependencies
4669 .
4670 .
4671 .
4672 NOTE: Executing SetScene Tasks
4673 NOTE: Executing RunQueue Tasks
4674 NOTE: nano: compiling from external source tree /home/scottrif/poky/build/workspace/sources/nano
4675 NOTE: Tasks Summary: Attempted 520 tasks of which 304 didn't need to be rerun and all succeeded.
4676 </literallayout>
4677 Within the <filename>devtool upgrade</filename> workflow,
4678 opportunity exists to deploy and test your rebuilt software.
4679 For this example, however, running
4680 <filename>devtool finish</filename> cleans up the workspace
4681 once the source in your workspace is clean.
4682 This usually means using Git to stage and submit commits
4683 for the changes generated by the upgrade process.
4684 </para>
4685
4686 <para>
4687 Once the tree is clean, you can clean things up in this
4688 example with the following command from the
4689 <filename>${BUILDDIR}/workspace/sources/nano</filename>
4690 directory:
4691 <literallayout class='monospaced'>
4692 $ devtool finish nano meta-oe
4693 NOTE: Starting bitbake server...
4694 Loading cache: 100% |################################################################################################| Time: 0:00:00
4695 Loaded 2040 entries from dependency cache.
4696 Parsing recipes: 100% |##############################################################################################| Time: 0:00:01
4697 Parsing of 1432 .bb files complete (1431 cached, 1 parsed). 2041 targets, 56 skipped, 0 masked, 0 errors.
4698 NOTE: Adding new patch 0001-nano.bb-Stuff-I-changed-when-upgrading-nano.bb.patch
4699 NOTE: Updating recipe nano_2.9.3.bb
4700 NOTE: Removing file /home/scottrif/meta-openembedded/meta-oe/recipes-support/nano/nano_2.7.4.bb
4701 NOTE: Moving recipe file to /home/scottrif/meta-openembedded/meta-oe/recipes-support/nano
4702 NOTE: Leaving source tree /home/scottrif/poky/build/workspace/sources/nano as-is; if you no longer need it then please delete it manually
4703 </literallayout>
4704 Using the <filename>devtool finish</filename> command cleans
4705 up the workspace and creates a patch file based on your
4706 commits.
4707 The tool puts all patch files back into the source directory
4708 in a sub-directory named <filename>nano</filename> in this
4709 case.
4710 </para>
4711 </section>
4712
4713 <section id='dev-manually-upgrading-a-recipe'>
4714 <title>Manually Upgrading a Recipe</title>
4715
4716 <para>
4717 If for some reason you choose not to upgrade recipes using the
4718 <link linkend='gs-using-the-auto-upgrade-helper'>Auto Upgrade Helper (AUH)</link>
4719 or by using
4720 <link linkend='gs-using-devtool-upgrade'><filename>devtool upgrade</filename></link>,
4721 you can manually edit the recipe files to upgrade the versions.
4722 <note><title>Caution</title>
4723 Manually updating multiple recipes scales poorly and
4724 involves many steps.
4725 The recommendation to upgrade recipe versions is through
4726 AUH or <filename>devtool upgrade</filename>, both of which
4727 automate some steps and provide guidance for others needed
4728 for the manual process.
4729 </note>
4730 </para>
4731
4732 <para>
4733 To manually upgrade recipe versions, follow these general steps:
4734 <orderedlist>
4735 <listitem><para>
4736 <emphasis>Change the Version:</emphasis>
4737 Rename the recipe such that the version (i.e. the
4738 <ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>
4739 part of the recipe name) changes appropriately.
4740 If the version is not part of the recipe name, change
4741 the value as it is set for <filename>PV</filename>
4742 within the recipe itself.
4743 </para></listitem>
4744 <listitem><para>
4745 <emphasis>Update <filename>SRCREV</filename> if Needed:</emphasis>
4746 If the source code your recipe builds is fetched from
4747 Git or some other version control system, update
4748 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRCREV'><filename>SRCREV</filename></ulink>
4749 to point to the commit hash that matches the new
4750 version.
4751 </para></listitem>
4752 <listitem><para>
4753 <emphasis>Build the Software:</emphasis>
4754 Try to build the recipe using BitBake.
4755 Typical build failures include the following:
4756 <itemizedlist>
4757 <listitem><para>
4758 License statements were updated for the new
4759 version.
4760 For this case, you need to review any changes
4761 to the license and update the values of
4762 <ulink url='&YOCTO_DOCS_REF_URL;#var-LICENSE'><filename>LICENSE</filename></ulink>
4763 and
4764 <ulink url='&YOCTO_DOCS_REF_URL;#var-LIC_FILES_CHKSUM'><filename>LIC_FILES_CHKSUM</filename></ulink>
4765 as needed.
4766 <note>
4767 License changes are often inconsequential.
4768 For example, the license text's copyright
4769 year might have changed.
4770 </note>
4771 </para></listitem>
4772 <listitem><para>
4773 Custom patches carried by the older version of
4774 the recipe might fail to apply to the new
4775 version.
4776 For these cases, you need to review the
4777 failures.
4778 Patches might not be necessary for the new
4779 version of the software if the upgraded version
4780 has fixed those issues.
4781 If a patch is necessary and failing, you need
4782 to rebase it into the new version.
4783 </para></listitem>
4784 </itemizedlist>
4785 </para></listitem>
4786 <listitem><para>
4787 <emphasis>Optionally Attempt to Build for Several Architectures:</emphasis>
4788 Once you successfully build the new software for a
4789 given architecture, you could test the build for
4790 other architectures by changing the
4791 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
4792 variable and rebuilding the software.
4793 This optional step is especially important if the
4794 recipe is to be released publicly.
4795 </para></listitem>
4796 <listitem><para>
4797 <emphasis>Check the Upstream Change Log or Release Notes:</emphasis>
4798 Checking both these reveals if new features exist that
4799 could break backwards-compatibility.
4800 If so, you need to take steps to mitigate or eliminate
4801 that situation.
4802 </para></listitem>
4803 <listitem><para>
4804 <emphasis>Optionally Create a Bootable Image and Test:</emphasis>
4805 If you want, you can test the new software by booting
4806 it onto actual hardware.
4807 </para></listitem>
4808 <listitem><para>
4809 <emphasis>Create a Commit with the Change in the Layer Repository:</emphasis>
4810 After all builds work and any testing is successful,
4811 you can create commits for any changes in the layer
4812 holding your upgraded recipe.
4813 </para></listitem>
4814 </orderedlist>
4815 </para>
4816 </section>
4817 </section>
4818
4819 <section id='finding-the-temporary-source-code'>
4820 <title>Finding Temporary Source Code</title>
4821
4822 <para>
4823 You might find it helpful during development to modify the
4824 temporary source code used by recipes to build packages.
4825 For example, suppose you are developing a patch and you need to
4826 experiment a bit to figure out your solution.
4827 After you have initially built the package, you can iteratively
4828 tweak the source code, which is located in the
4829 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>,
4830 and then you can force a re-compile and quickly test your altered
4831 code.
4832 Once you settle on a solution, you can then preserve your changes
4833 in the form of patches.
4834 </para>
4835
4836 <para>
4837 During a build, the unpacked temporary source code used by recipes
4838 to build packages is available in the Build Directory as
4839 defined by the
4840 <ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink>
4841 variable.
4842 Below is the default value for the <filename>S</filename> variable
4843 as defined in the
4844 <filename>meta/conf/bitbake.conf</filename> configuration file
4845 in the
4846 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>:
4847 <literallayout class='monospaced'>
4848 S = "${WORKDIR}/${BP}"
4849 </literallayout>
4850 You should be aware that many recipes override the
4851 <filename>S</filename> variable.
4852 For example, recipes that fetch their source from Git usually set
4853 <filename>S</filename> to <filename>${WORKDIR}/git</filename>.
4854 <note>
4855 The
4856 <ulink url='&YOCTO_DOCS_REF_URL;#var-BP'><filename>BP</filename></ulink>
4857 represents the base recipe name, which consists of the name
4858 and version:
4859 <literallayout class='monospaced'>
4860 BP = "${BPN}-${PV}"
4861 </literallayout>
4862 </note>
4863 </para>
4864
4865 <para>
4866 The path to the work directory for the recipe
4867 (<ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink>)
4868 is defined as follows:
4869 <literallayout class='monospaced'>
4870 ${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}
4871 </literallayout>
4872 The actual directory depends on several things:
4873 <itemizedlist>
4874 <listitem><para>
4875 <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>:
4876 The top-level build output directory.
4877 </para></listitem>
4878 <listitem><para>
4879 <ulink url='&YOCTO_DOCS_REF_URL;#var-MULTIMACH_TARGET_SYS'><filename>MULTIMACH_TARGET_SYS</filename></ulink>:
4880 The target system identifier.
4881 </para></listitem>
4882 <listitem><para>
4883 <ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink>:
4884 The recipe name.
4885 </para></listitem>
4886 <listitem><para>
4887 <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTENDPE'><filename>EXTENDPE</filename></ulink>:
4888 The epoch - (if
4889 <ulink url='&YOCTO_DOCS_REF_URL;#var-PE'><filename>PE</filename></ulink>
4890 is not specified, which is usually the case for most
4891 recipes, then <filename>EXTENDPE</filename> is blank).
4892 </para></listitem>
4893 <listitem><para>
4894 <ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>:
4895 The recipe version.
4896 </para></listitem>
4897 <listitem><para>
4898 <ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink>:
4899 The recipe revision.
4900 </para></listitem>
4901 </itemizedlist>
4902 </para>
4903
4904 <para>
4905 As an example, assume a Source Directory top-level folder
4906 named <filename>poky</filename>, a default Build Directory at
4907 <filename>poky/build</filename>, and a
4908 <filename>qemux86-poky-linux</filename> machine target
4909 system.
4910 Furthermore, suppose your recipe is named
4911 <filename>foo_1.3.0.bb</filename>.
4912 In this case, the work directory the build system uses to
4913 build the package would be as follows:
4914 <literallayout class='monospaced'>
4915 poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0
4916 </literallayout>
4917 </para>
4918 </section>
4919
4920 <section id="using-a-quilt-workflow">
4921 <title>Using Quilt in Your Workflow</title>
4922
4923 <para>
4924 <ulink url='http://savannah.nongnu.org/projects/quilt'>Quilt</ulink>
4925 is a powerful tool that allows you to capture source code changes
4926 without having a clean source tree.
4927 This section outlines the typical workflow you can use to modify
4928 source code, test changes, and then preserve the changes in the
4929 form of a patch all using Quilt.
4930 <note><title>Tip</title>
4931 With regard to preserving changes to source files, if you
4932 clean a recipe or have <filename>rm_work</filename> enabled,
4933 the
4934 <ulink url='&YOCTO_DOCS_SDK_URL;#using-devtool-in-your-sdk-workflow'><filename>devtool</filename> workflow</ulink>
4935 as described in the Yocto Project Application Development
4936 and the Extensible Software Development Kit (eSDK) manual
4937 is a safer development flow than the flow that uses Quilt.
4938 </note>
4939 </para>
4940
4941 <para>
4942 Follow these general steps:
4943 <orderedlist>
4944 <listitem><para>
4945 <emphasis>Find the Source Code:</emphasis>
4946 Temporary source code used by the OpenEmbedded build system
4947 is kept in the
4948 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
4949 See the
4950 "<link linkend='finding-the-temporary-source-code'>Finding Temporary Source Code</link>"
4951 section to learn how to locate the directory that has the
4952 temporary source code for a particular package.
4953 </para></listitem>
4954 <listitem><para>
4955 <emphasis>Change Your Working Directory:</emphasis>
4956 You need to be in the directory that has the temporary
4957 source code.
4958 That directory is defined by the
4959 <ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink>
4960 variable.</para></listitem>
4961 <listitem><para>
4962 <emphasis>Create a New Patch:</emphasis>
4963 Before modifying source code, you need to create a new
4964 patch.
4965 To create a new patch file, use
4966 <filename>quilt new</filename> as below:
4967 <literallayout class='monospaced'>
4968 $ quilt new my_changes.patch
4969 </literallayout>
4970 </para></listitem>
4971 <listitem><para>
4972 <emphasis>Notify Quilt and Add Files:</emphasis>
4973 After creating the patch, you need to notify Quilt about
4974 the files you plan to edit.
4975 You notify Quilt by adding the files to the patch you
4976 just created:
4977 <literallayout class='monospaced'>
4978 $ quilt add file1.c file2.c file3.c
4979 </literallayout>
4980 </para></listitem>
4981 <listitem><para>
4982 <emphasis>Edit the Files:</emphasis>
4983 Make your changes in the source code to the files you added
4984 to the patch.
4985 </para></listitem>
4986 <listitem><para>
4987 <emphasis>Test Your Changes:</emphasis>
4988 Once you have modified the source code, the easiest way to
4989 test your changes is by calling the
4990 <filename>do_compile</filename> task as shown in the
4991 following example:
4992 <literallayout class='monospaced'>
4993 $ bitbake -c compile -f <replaceable>package</replaceable>
4994 </literallayout>
4995 The <filename>-f</filename> or <filename>--force</filename>
4996 option forces the specified task to execute.
4997 If you find problems with your code, you can just keep
4998 editing and re-testing iteratively until things work
4999 as expected.
5000 <note>
5001 All the modifications you make to the temporary
5002 source code disappear once you run the
5003 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-clean'><filename>do_clean</filename></ulink>
5004 or
5005 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-cleanall'><filename>do_cleanall</filename></ulink>
5006 tasks using BitBake (i.e.
5007 <filename>bitbake -c clean <replaceable>package</replaceable></filename>
5008 and
5009 <filename>bitbake -c cleanall <replaceable>package</replaceable></filename>).
5010 Modifications will also disappear if you use the
5011 <filename>rm_work</filename> feature as described
5012 in the
5013 "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-saving-memory-during-a-build'>Conserving Disk Space During Builds</ulink>"
5014 section.
5015 </note>
5016 </para></listitem>
5017 <listitem><para>
5018 <emphasis>Generate the Patch:</emphasis>
5019 Once your changes work as expected, you need to use Quilt
5020 to generate the final patch that contains all your
5021 modifications.
5022 <literallayout class='monospaced'>
5023 $ quilt refresh
5024 </literallayout>
5025 At this point, the <filename>my_changes.patch</filename>
5026 file has all your edits made to the
5027 <filename>file1.c</filename>, <filename>file2.c</filename>,
5028 and <filename>file3.c</filename> files.</para>
5029
5030 <para>You can find the resulting patch file in the
5031 <filename>patches/</filename> subdirectory of the source
5032 (<filename>S</filename>) directory.
5033 </para></listitem>
5034 <listitem><para>
5035 <emphasis>Copy the Patch File:</emphasis>
5036 For simplicity, copy the patch file into a directory
5037 named <filename>files</filename>, which you can create
5038 in the same directory that holds the recipe
5039 (<filename>.bb</filename>) file or the append
5040 (<filename>.bbappend</filename>) file.
5041 Placing the patch here guarantees that the OpenEmbedded
5042 build system will find the patch.
5043 Next, add the patch into the
5044 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'>SRC_URI</ulink></filename>
5045 of the recipe.
5046 Here is an example:
5047 <literallayout class='monospaced'>
5048 SRC_URI += "file://my_changes.patch"
5049 </literallayout>
5050 </para></listitem>
5051 </orderedlist>
5052 </para>
5053 </section>
5054
5055 <section id="platdev-appdev-devshell">
5056 <title>Using a Development Shell</title>
5057
5058 <para>
5059 When debugging certain commands or even when just editing packages,
5060 <filename>devshell</filename> can be a useful tool.
5061 When you invoke <filename>devshell</filename>, all tasks up to and
5062 including
5063 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-patch'><filename>do_patch</filename></ulink>
5064 are run for the specified target.
5065 Then, a new terminal is opened and you are placed in
5066 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink><filename>}</filename>,
5067 the source directory.
5068 In the new terminal, all the OpenEmbedded build-related environment variables are
5069 still defined so you can use commands such as <filename>configure</filename> and
5070 <filename>make</filename>.
5071 The commands execute just as if the OpenEmbedded build system were executing them.
5072 Consequently, working this way can be helpful when debugging a build or preparing
5073 software to be used with the OpenEmbedded build system.
5074 </para>
5075
5076 <para>
5077 Following is an example that uses <filename>devshell</filename> on a target named
5078 <filename>matchbox-desktop</filename>:
5079 <literallayout class='monospaced'>
5080 $ bitbake matchbox-desktop -c devshell
5081 </literallayout>
5082 </para>
5083
5084 <para>
5085 This command spawns a terminal with a shell prompt within the OpenEmbedded build environment.
5086 The <ulink url='&YOCTO_DOCS_REF_URL;#var-OE_TERMINAL'><filename>OE_TERMINAL</filename></ulink>
5087 variable controls what type of shell is opened.
5088 </para>
5089
5090 <para>
5091 For spawned terminals, the following occurs:
5092 <itemizedlist>
5093 <listitem><para>The <filename>PATH</filename> variable includes the
5094 cross-toolchain.</para></listitem>
5095 <listitem><para>The <filename>pkgconfig</filename> variables find the correct
5096 <filename>.pc</filename> files.</para></listitem>
5097 <listitem><para>The <filename>configure</filename> command finds the
5098 Yocto Project site files as well as any other necessary files.</para></listitem>
5099 </itemizedlist>
5100 </para>
5101
5102 <para>
5103 Within this environment, you can run configure or compile
5104 commands as if they were being run by
5105 the OpenEmbedded build system itself.
5106 As noted earlier, the working directory also automatically changes to the
5107 Source Directory (<ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink>).
5108 </para>
5109
5110 <para>
5111 To manually run a specific task using <filename>devshell</filename>,
5112 run the corresponding <filename>run.*</filename> script in
5113 the
5114 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink><filename>}/temp</filename>
5115 directory (e.g.,
5116 <filename>run.do_configure.</filename><replaceable>pid</replaceable>).
5117 If a task's script does not exist, which would be the case if the task was
5118 skipped by way of the sstate cache, you can create the task by first running
5119 it outside of the <filename>devshell</filename>:
5120 <literallayout class='monospaced'>
5121 $ bitbake -c <replaceable>task</replaceable>
5122 </literallayout>
5123 <note><title>Notes</title>
5124 <itemizedlist>
5125 <listitem><para>Execution of a task's <filename>run.*</filename>
5126 script and BitBake's execution of a task are identical.
5127 In other words, running the script re-runs the task
5128 just as it would be run using the
5129 <filename>bitbake -c</filename> command.
5130 </para></listitem>
5131 <listitem><para>Any <filename>run.*</filename> file that does not
5132 have a <filename>.pid</filename> extension is a
5133 symbolic link (symlink) to the most recent version of that
5134 file.
5135 </para></listitem>
5136 </itemizedlist>
5137 </note>
5138 </para>
5139
5140 <para>
5141 Remember, that the <filename>devshell</filename> is a mechanism that allows
5142 you to get into the BitBake task execution environment.
5143 And as such, all commands must be called just as BitBake would call them.
5144 That means you need to provide the appropriate options for
5145 cross-compilation and so forth as applicable.
5146 </para>
5147
5148 <para>
5149 When you are finished using <filename>devshell</filename>, exit the shell
5150 or close the terminal window.
5151 </para>
5152
5153 <note><title>Notes</title>
5154 <itemizedlist>
5155 <listitem><para>
5156 It is worth remembering that when using <filename>devshell</filename>
5157 you need to use the full compiler name such as <filename>arm-poky-linux-gnueabi-gcc</filename>
5158 instead of just using <filename>gcc</filename>.
5159 The same applies to other applications such as <filename>binutils</filename>,
5160 <filename>libtool</filename> and so forth.
5161 BitBake sets up environment variables such as <filename>CC</filename>
5162 to assist applications, such as <filename>make</filename> to find the correct tools.
5163 </para></listitem>
5164 <listitem><para>
5165 It is also worth noting that <filename>devshell</filename> still works over
5166 X11 forwarding and similar situations.
5167 </para></listitem>
5168 </itemizedlist>
5169 </note>
5170 </section>
5171
5172 <section id="platdev-appdev-devpyshell">
5173 <title>Using a Development Python Shell</title>
5174
5175 <para>
5176 Similar to working within a development shell as described in
5177 the previous section, you can also spawn and work within an
5178 interactive Python development shell.
5179 When debugging certain commands or even when just editing packages,
5180 <filename>devpyshell</filename> can be a useful tool.
5181 When you invoke <filename>devpyshell</filename>, all tasks up to and
5182 including
5183 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-patch'><filename>do_patch</filename></ulink>
5184 are run for the specified target.
5185 Then a new terminal is opened.
5186 Additionally, key Python objects and code are available in the same
5187 way they are to BitBake tasks, in particular, the data store 'd'.
5188 So, commands such as the following are useful when exploring the data
5189 store and running functions:
5190 <literallayout class='monospaced'>
5191 pydevshell> d.getVar("STAGING_DIR")
5192 '/media/build1/poky/build/tmp/sysroots'
5193 pydevshell> d.getVar("STAGING_DIR")
5194 '${TMPDIR}/sysroots'
5195 pydevshell> d.setVar("FOO", "bar")
5196 pydevshell> d.getVar("FOO")
5197 'bar'
5198 pydevshell> d.delVar("FOO")
5199 pydevshell> d.getVar("FOO")
5200 pydevshell> bb.build.exec_func("do_unpack", d)
5201 pydevshell>
5202 </literallayout>
5203 The commands execute just as if the OpenEmbedded build system were executing them.
5204 Consequently, working this way can be helpful when debugging a build or preparing
5205 software to be used with the OpenEmbedded build system.
5206 </para>
5207
5208 <para>
5209 Following is an example that uses <filename>devpyshell</filename> on a target named
5210 <filename>matchbox-desktop</filename>:
5211 <literallayout class='monospaced'>
5212 $ bitbake matchbox-desktop -c devpyshell
5213 </literallayout>
5214 </para>
5215
5216 <para>
5217 This command spawns a terminal and places you in an interactive
5218 Python interpreter within the OpenEmbedded build environment.
5219 The <ulink url='&YOCTO_DOCS_REF_URL;#var-OE_TERMINAL'><filename>OE_TERMINAL</filename></ulink>
5220 variable controls what type of shell is opened.
5221 </para>
5222
5223 <para>
5224 When you are finished using <filename>devpyshell</filename>, you
5225 can exit the shell either by using Ctrl+d or closing the terminal
5226 window.
5227 </para>
5228 </section>
5229
5230 <section id='dev-building'>
5231 <title>Building</title>
5232
5233 <para>
5234 This section describes various build procedures.
5235 For example, the steps needed for a simple build, a target that
5236 uses multiple configurations, building an image for more than
5237 one machine, and so forth.
5238 </para>
5239
5240 <section id='dev-building-a-simple-image'>
5241 <title>Building a Simple Image</title>
5242
5243 <para>
5244 In the development environment, you need to build an image
5245 whenever you change hardware support, add or change system
5246 libraries, or add or change services that have dependencies.
5247 Several methods exist that allow you to build an image within
5248 the Yocto Project.
5249 This section presents the basic steps you need to build a
5250 simple image using BitBake from a build host running Linux.
5251 <note><title>Notes</title>
5252 <itemizedlist>
5253 <listitem><para>
5254 For information on how to build an image using
5255 <ulink url='&YOCTO_DOCS_REF_URL;#toaster-term'>Toaster</ulink>,
5256 see the
5257 <ulink url='&YOCTO_DOCS_TOAST_URL;'>Toaster User Manual</ulink>.
5258 </para></listitem>
5259 <listitem><para>
5260 For information on how to use
5261 <filename>devtool</filename> to build images, see
5262 the
5263 "<ulink url='&YOCTO_DOCS_SDK_URL;#using-devtool-in-your-sdk-workflow'>Using <filename>devtool</filename> in Your SDK Workflow</ulink>"
5264 section in the Yocto Project Application
5265 Development and the Extensible Software Development
5266 Kit (eSDK) manual.
5267 </para></listitem>
5268 <listitem><para>
5269 For a quick example on how to build an image using
5270 the OpenEmbedded build system, see the
5271 <ulink url='&YOCTO_DOCS_BRIEF_URL;'>Yocto Project Quick Build</ulink>
5272 document.
5273 </para></listitem>
5274 </itemizedlist>
5275 </note>
5276 </para>
5277
5278 <para>
5279 The build process creates an entire Linux distribution from
5280 source and places it in your
5281 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
5282 under <filename>tmp/deploy/images</filename>.
5283 For detailed information on the build process using BitBake,
5284 see the
5285 "<ulink url='&YOCTO_DOCS_OM_URL;#images-dev-environment'>Images</ulink>"
5286 section in the Yocto Project Overview and Concepts Manual.
5287 </para>
5288
5289 <para>
5290 The following figure and list overviews the build process:
5291 <imagedata fileref="figures/bitbake-build-flow.png" width="7in" depth="4in" align="center" scalefit="1" />
5292 <orderedlist>
5293 <listitem><para>
5294 <emphasis>Set up Your Host Development System to Support
5295 Development Using the Yocto Project</emphasis>:
5296 See the
5297 "<link linkend='dev-manual-start'>Setting Up to Use the Yocto Project</link>"
5298 section for options on how to get a build host ready to
5299 use the Yocto Project.
5300 </para></listitem>
5301 <listitem><para>
5302 <emphasis>Initialize the Build Environment:</emphasis>
5303 Initialize the build environment by sourcing the build
5304 environment script (i.e.
5305 <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>):
5306 <literallayout class='monospaced'>
5307 $ source &OE_INIT_FILE; [<replaceable>build_dir</replaceable>]
5308 </literallayout></para>
5309
5310 <para>When you use the initialization script, the
5311 OpenEmbedded build system uses
5312 <filename>build</filename> as the default Build
5313 Directory in your current work directory.
5314 You can use a <replaceable>build_dir</replaceable>
5315 argument with the script to specify a different build
5316 directory.
5317 <note><title>Tip</title>
5318 A common practice is to use a different Build
5319 Directory for different targets.
5320 For example, <filename>~/build/x86</filename> for a
5321 <filename>qemux86</filename> target, and
5322 <filename>~/build/arm</filename> for a
5323 <filename>qemuarm</filename> target.
5324 </note>
5325 </para></listitem>
5326 <listitem><para>
5327 <emphasis>Make Sure Your <filename>local.conf</filename>
5328 File is Correct:</emphasis>
5329 Ensure the <filename>conf/local.conf</filename>
5330 configuration file, which is found in the Build
5331 Directory, is set up how you want it.
5332 This file defines many aspects of the build environment
5333 including the target machine architecture through the
5334 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'>MACHINE</ulink></filename> variable,
5335 the packaging format used during the build
5336 (<ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></ulink>),
5337 and a centralized tarball download directory through the
5338 <ulink url='&YOCTO_DOCS_REF_URL;#var-DL_DIR'><filename>DL_DIR</filename></ulink> variable.
5339 </para></listitem>
5340 <listitem><para>
5341 <emphasis>Build the Image:</emphasis>
5342 Build the image using the <filename>bitbake</filename>
5343 command:
5344 <literallayout class='monospaced'>
5345 $ bitbake <replaceable>target</replaceable>
5346 </literallayout>
5347 <note>
5348 For information on BitBake, see the
5349 <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>.
5350 </note>
5351 The <replaceable>target</replaceable> is the name of the
5352 recipe you want to build.
5353 Common targets are the images in
5354 <filename>meta/recipes-core/images</filename>,
5355 <filename>meta/recipes-sato/images</filename>, and so
5356 forth all found in the
5357 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
5358 Or, the target can be the name of a recipe for a
5359 specific piece of software such as BusyBox.
5360 For more details about the images the OpenEmbedded build
5361 system supports, see the
5362 "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>"
5363 chapter in the Yocto Project Reference Manual.</para>
5364
5365 <para>As an example, the following command builds the
5366 <filename>core-image-minimal</filename> image:
5367 <literallayout class='monospaced'>
5368 $ bitbake core-image-minimal
5369 </literallayout>
5370 Once an image has been built, it often needs to be
5371 installed.
5372 The images and kernels built by the OpenEmbedded
5373 build system are placed in the Build Directory in
5374 <filename class="directory">tmp/deploy/images</filename>.
5375 For information on how to run pre-built images such as
5376 <filename>qemux86</filename> and <filename>qemuarm</filename>,
5377 see the
5378 <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
5379 manual.
5380 For information about how to install these images,
5381 see the documentation for your particular board or
5382 machine.
5383 </para></listitem>
5384 </orderedlist>
5385 </para>
5386 </section>
5387
5388 <section id='dev-building-images-for-multiple-targets-using-multiple-configurations'>
5389 <title>Building Images for Multiple Targets Using Multiple Configurations</title>
5390
5391 <para>
5392 You can use a single <filename>bitbake</filename> command
5393 to build multiple images or packages for different targets
5394 where each image or package requires a different configuration
5395 (multiple configuration builds).
5396 The builds, in this scenario, are sometimes referred to as
5397 "multiconfigs", and this section uses that term throughout.
5398 </para>
5399
5400 <para>
5401 This section describes how to set up for multiple
5402 configuration builds and how to account for cross-build
5403 dependencies between the multiconfigs.
5404 </para>
5405
5406 <section id='dev-setting-up-and-running-a-multiple-configuration-build'>
5407 <title>Setting Up and Running a Multiple Configuration Build</title>
5408
5409 <para>
5410 To accomplish a multiple configuration build, you must
5411 define each target's configuration separately using
5412 a parallel configuration file in the
5413 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>,
5414 and you must follow a required file hierarchy.
5415 Additionally, you must enable the multiple configuration
5416 builds in your <filename>local.conf</filename> file.
5417 </para>
5418
5419 <para>
5420 Follow these steps to set up and execute multiple
5421 configuration builds:
5422 <itemizedlist>
5423 <listitem><para>
5424 <emphasis>Create Separate Configuration Files</emphasis>:
5425 You need to create a single configuration file for
5426 each build target (each multiconfig).
5427 Minimally, each configuration file must define the
5428 machine and the temporary directory BitBake uses
5429 for the build.
5430 Suggested practice dictates that you do not
5431 overlap the temporary directories
5432 used during the builds.
5433 However, it is possible that you can share the
5434 temporary directory
5435 (<ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>).
5436 For example, consider a scenario with two
5437 different multiconfigs for the same
5438 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>: "qemux86" built for
5439 two distributions such as "poky" and "poky-lsb".
5440 In this case, you might want to use the same
5441 <filename>TMPDIR</filename>.</para>
5442
5443 <para>Here is an example showing the minimal
5444 statements needed in a configuration file for
5445 a "qemux86" target whose temporary build directory
5446 is <filename>tmpmultix86</filename>:
5447 <literallayout class='monospaced'>
5448 MACHINE="qemux86"
5449 TMPDIR="${TOPDIR}/tmpmultix86"
5450 </literallayout></para>
5451
5452 <para>The location for these multiconfig
5453 configuration files is specific.
5454 They must reside in the current build directory in
5455 a sub-directory of <filename>conf</filename> named
5456 <filename>multiconfig</filename>.
5457 Following is an example that defines two
5458 configuration files for the "x86" and "arm"
5459 multiconfigs:
5460 <imagedata fileref="figures/multiconfig_files.png" align="center" width="4in" depth="3in" />
5461 </para>
5462
5463 <para>The reason for this required file hierarchy
5464 is because the <filename>BBPATH</filename> variable
5465 is not constructed until the layers are parsed.
5466 Consequently, using the configuration file as a
5467 pre-configuration file is not possible unless it is
5468 located in the current working directory.
5469 </para></listitem>
5470 <listitem><para>
5471 <emphasis>Add the BitBake Multi-configuration Variable to the Local Configuration File</emphasis>:
5472 Use the
5473 <ulink url='&YOCTO_DOCS_REF_URL;#var-BBMULTICONFIG'><filename>BBMULTICONFIG</filename></ulink>
5474 variable in your
5475 <filename>conf/local.conf</filename> configuration
5476 file to specify each multiconfig.
5477 Continuing with the example from the previous
5478 figure, the <filename>BBMULTICONFIG</filename>
5479 variable needs to enable two multiconfigs: "x86"
5480 and "arm" by specifying each configuration file:
5481 <literallayout class='monospaced'>
5482 BBMULTICONFIG = "x86 arm"
5483 </literallayout>
5484 <note>
5485 A "default" configuration already exists by
5486 definition.
5487 This configuration is named: "" (i.e. empty
5488 string) and is defined by the variables coming
5489 from your <filename>local.conf</filename> file.
5490 Consequently, the previous example actually
5491 adds two additional configurations to your
5492 build: "arm" and "x86" along with "".
5493 </note>
5494 </para></listitem>
5495 <listitem><para>
5496 <emphasis>Launch BitBake</emphasis>:
5497 Use the following BitBake command form to launch the
5498 multiple configuration build:
5499 <literallayout class='monospaced'>
5500 $ bitbake [mc:<replaceable>multiconfigname</replaceable>:]<replaceable>target</replaceable> [[[mc:<replaceable>multiconfigname</replaceable>:]<replaceable>target</replaceable>] ... ]
5501 </literallayout>
5502 For the example in this section, the following
5503 command applies:
5504 <literallayout class='monospaced'>
5505 $ bitbake mc:x86:core-image-minimal mc:arm:core-image-sato mc::core-image-base
5506 </literallayout>
5507 The previous BitBake command builds a
5508 <filename>core-image-minimal</filename> image that
5509 is configured through the
5510 <filename>x86.conf</filename> configuration file,
5511 a <filename>core-image-sato</filename>
5512 image that is configured through the
5513 <filename>arm.conf</filename> configuration file
5514 and a <filename>core-image-base</filename> that is
5515 configured through your
5516 <filename>local.conf</filename> configuration file.
5517 </para></listitem>
5518 </itemizedlist>
5519 <note>
5520 Support for multiple configuration builds in the
5521 Yocto Project &DISTRO; (&DISTRO_NAME;) Release does
5522 not include Shared State (sstate) optimizations.
5523 Consequently, if a build uses the same object twice
5524 in, for example, two different
5525 <filename>TMPDIR</filename> directories, the build
5526 either loads from an existing sstate cache for that
5527 build at the start or builds the object fresh.
5528 </note>
5529 </para>
5530 </section>
5531
5532 <section id='dev-enabling-multiple-configuration-build-dependencies'>
5533 <title>Enabling Multiple Configuration Build Dependencies</title>
5534
5535 <para>
5536 Sometimes dependencies can exist between targets
5537 (multiconfigs) in a multiple configuration build.
5538 For example, suppose that in order to build a
5539 <filename>core-image-sato</filename> image for an "x86"
5540 multiconfig, the root filesystem of an "arm"
5541 multiconfig must exist.
5542 This dependency is essentially that the
5543 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-image'><filename>do_image</filename></ulink>
5544 task in the <filename>core-image-sato</filename> recipe
5545 depends on the completion of the
5546 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-rootfs'><filename>do_rootfs</filename></ulink>
5547 task of the <filename>core-image-minimal</filename>
5548 recipe.
5549 </para>
5550
5551 <para>
5552 To enable dependencies in a multiple configuration
5553 build, you must declare the dependencies in the recipe
5554 using the following statement form:
5555 <literallayout class='monospaced'>
5556 <replaceable>task_or_package</replaceable>[mcdepends] = "mc:<replaceable>from_multiconfig</replaceable>:<replaceable>to_multiconfig</replaceable>:<replaceable>recipe_name</replaceable>:<replaceable>task_on_which_to_depend</replaceable>"
5557 </literallayout>
5558 To better show how to use this statement, consider the
5559 example scenario from the first paragraph of this section.
5560 The following statement needs to be added to the recipe
5561 that builds the <filename>core-image-sato</filename>
5562 image:
5563 <literallayout class='monospaced'>
5564 do_image[mcdepends] = "mc:x86:arm:core-image-minimal:do_rootfs"
5565 </literallayout>
5566 In this example, the
5567 <replaceable>from_multiconfig</replaceable> is "x86".
5568 The <replaceable>to_multiconfig</replaceable> is "arm".
5569 The task on which the <filename>do_image</filename> task
5570 in the recipe depends is the <filename>do_rootfs</filename>
5571 task from the <filename>core-image-minimal</filename>
5572 recipe associated with the "arm" multiconfig.
5573 </para>
5574
5575 <para>
5576 Once you set up this dependency, you can build the
5577 "x86" multiconfig using a BitBake command as follows:
5578 <literallayout class='monospaced'>
5579 $ bitbake mc:x86:core-image-sato
5580 </literallayout>
5581 This command executes all the tasks needed to create
5582 the <filename>core-image-sato</filename> image for the
5583 "x86" multiconfig.
5584 Because of the dependency, BitBake also executes through
5585 the <filename>do_rootfs</filename> task for the "arm"
5586 multiconfig build.
5587 </para>
5588
5589 <para>
5590 Having a recipe depend on the root filesystem of another
5591 build might not seem that useful.
5592 Consider this change to the statement in the
5593 <filename>core-image-sato</filename> recipe:
5594 <literallayout class='monospaced'>
5595 do_image[mcdepends] = "mc:x86:arm:core-image-minimal:do_image"
5596 </literallayout>
5597 In this case, BitBake must create the
5598 <filename>core-image-minimal</filename> image for the
5599 "arm" build since the "x86" build depends on it.
5600 </para>
5601
5602 <para>
5603 Because "x86" and "arm" are enabled for multiple
5604 configuration builds and have separate configuration
5605 files, BitBake places the artifacts for each build in the
5606 respective temporary build directories (i.e.
5607 <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>).
5608 </para>
5609 </section>
5610 </section>
5611
5612 <section id='building-an-initramfs-image'>
5613 <title>Building an Initial RAM Filesystem (initramfs) Image</title>
5614
5615 <para>
5616 An initial RAM filesystem (initramfs) image provides a temporary
5617 root filesystem used for early system initialization (e.g.
5618 loading of modules needed to locate and mount the "real" root
5619 filesystem).
5620 <note>
5621 The initramfs image is the successor of initial RAM disk
5622 (initrd).
5623 It is a "copy in and out" (cpio) archive of the initial
5624 filesystem that gets loaded into memory during the Linux
5625 startup process.
5626 Because Linux uses the contents of the archive during
5627 initialization, the initramfs image needs to contain all of the
5628 device drivers and tools needed to mount the final root
5629 filesystem.
5630 </note>
5631 </para>
5632
5633 <para>
5634 Follow these steps to create an initramfs image:
5635 <orderedlist>
5636 <listitem><para>
5637 <emphasis>Create the initramfs Image Recipe:</emphasis>
5638 You can reference the
5639 <filename>core-image-minimal-initramfs.bb</filename>
5640 recipe found in the <filename>meta/recipes-core</filename>
5641 directory of the
5642 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
5643 as an example from which to work.
5644 </para></listitem>
5645 <listitem><para>
5646 <emphasis>Decide if You Need to Bundle the initramfs Image
5647 Into the Kernel Image:</emphasis>
5648 If you want the initramfs image that is built to be
5649 bundled in with the kernel image, set the
5650 <ulink url='&YOCTO_DOCS_REF_URL;#var-INITRAMFS_IMAGE_BUNDLE'><filename>INITRAMFS_IMAGE_BUNDLE</filename></ulink>
5651 variable to "1" in your <filename>local.conf</filename>
5652 configuration file and set the
5653 <ulink url='&YOCTO_DOCS_REF_URL;#var-INITRAMFS_IMAGE'><filename>INITRAMFS_IMAGE</filename></ulink>
5654 variable in the recipe that builds the kernel image.
5655 <note><title>Tip</title>
5656 It is recommended that you do bundle the initramfs
5657 image with the kernel image to avoid circular
5658 dependencies between the kernel recipe and the
5659 initramfs recipe should the initramfs image
5660 include kernel modules.
5661 </note>
5662 Setting the <filename>INITRAMFS_IMAGE_BUNDLE</filename>
5663 flag causes the initramfs image to be unpacked
5664 into the <filename>${B}/usr/</filename> directory.
5665 The unpacked initramfs image is then passed to the kernel's
5666 <filename>Makefile</filename> using the
5667 <ulink url='&YOCTO_DOCS_REF_URL;#var-CONFIG_INITRAMFS_SOURCE'><filename>CONFIG_INITRAMFS_SOURCE</filename></ulink>
5668 variable, allowing the initramfs image to be built into
5669 the kernel normally.
5670 <note>
5671 If you choose to not bundle the initramfs image with
5672 the kernel image, you are essentially using an
5673 <ulink url='https://en.wikipedia.org/wiki/Initrd'>Initial RAM Disk (initrd)</ulink>.
5674 Creating an initrd is handled primarily through the
5675 <ulink url='&YOCTO_DOCS_REF_URL;#var-INITRD_IMAGE'><filename>INITRD_IMAGE</filename></ulink>,
5676 <filename>INITRD_LIVE</filename>, and
5677 <filename>INITRD_IMAGE_LIVE</filename> variables.
5678 For more information, see the
5679 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta/classes/image-live.bbclass'><filename>image-live.bbclass</filename></ulink>
5680 file.
5681 </note>
5682 </para></listitem>
5683 <listitem><para>
5684 <emphasis>Optionally Add Items to the initramfs Image
5685 Through the initramfs Image Recipe:</emphasis>
5686 If you add items to the initramfs image by way of its
5687 recipe, you should use
5688 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_INSTALL'><filename>PACKAGE_INSTALL</filename></ulink>
5689 rather than
5690 <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></ulink>.
5691 <filename>PACKAGE_INSTALL</filename> gives more direct
5692 control of what is added to the image as compared to
5693 the defaults you might not necessarily want that are
5694 set by the
5695 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-image'><filename>image</filename></ulink>
5696 or
5697 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-core-image'><filename>core-image</filename></ulink>
5698 classes.
5699 </para></listitem>
5700 <listitem><para>
5701 <emphasis>Build the Kernel Image and the initramfs
5702 Image:</emphasis>
5703 Build your kernel image using BitBake.
5704 Because the initramfs image recipe is a dependency of the
5705 kernel image, the initramfs image is built as well and
5706 bundled with the kernel image if you used the
5707 <ulink url='&YOCTO_DOCS_REF_URL;#var-INITRAMFS_IMAGE_BUNDLE'><filename>INITRAMFS_IMAGE_BUNDLE</filename></ulink>
5708 variable described earlier.
5709 </para></listitem>
5710 </orderedlist>
5711 </para>
5712 </section>
5713
5714 <section id='building-a-tiny-system'>
5715 <title>Building a Tiny System</title>
5716
5717 <para>
5718 Very small distributions have some significant advantages such
5719 as requiring less on-die or in-package memory (cheaper), better
5720 performance through efficient cache usage, lower power requirements
5721 due to less memory, faster boot times, and reduced development
5722 overhead.
5723 Some real-world examples where a very small distribution gives
5724 you distinct advantages are digital cameras, medical devices,
5725 and small headless systems.
5726 </para>
5727
5728 <para>
5729 This section presents information that shows you how you can
5730 trim your distribution to even smaller sizes than the
5731 <filename>poky-tiny</filename> distribution, which is around
5732 5 Mbytes, that can be built out-of-the-box using the Yocto Project.
5733 </para>
5734
5735 <section id='tiny-system-overview'>
5736 <title>Overview</title>
5737
5738 <para>
5739 The following list presents the overall steps you need to
5740 consider and perform to create distributions with smaller
5741 root filesystems, achieve faster boot times, maintain your critical
5742 functionality, and avoid initial RAM disks:
5743 <itemizedlist>
5744 <listitem><para>
5745 <link linkend='goals-and-guiding-principles'>Determine your goals and guiding principles.</link>
5746 </para></listitem>
5747 <listitem><para>
5748 <link linkend='understand-what-gives-your-image-size'>Understand what contributes to your image size.</link>
5749 </para></listitem>
5750 <listitem><para>
5751 <link linkend='trim-the-root-filesystem'>Reduce the size of the root filesystem.</link>
5752 </para></listitem>
5753 <listitem><para>
5754 <link linkend='trim-the-kernel'>Reduce the size of the kernel.</link>
5755 </para></listitem>
5756 <listitem><para>
5757 <link linkend='remove-package-management-requirements'>Eliminate packaging requirements.</link>
5758 </para></listitem>
5759 <listitem><para>
5760 <link linkend='look-for-other-ways-to-minimize-size'>Look for other ways to minimize size.</link>
5761 </para></listitem>
5762 <listitem><para>
5763 <link linkend='iterate-on-the-process'>Iterate on the process.</link>
5764 </para></listitem>
5765 </itemizedlist>
5766 </para>
5767 </section>
5768
5769 <section id='goals-and-guiding-principles'>
5770 <title>Goals and Guiding Principles</title>
5771
5772 <para>
5773 Before you can reach your destination, you need to know
5774 where you are going.
5775 Here is an example list that you can use as a guide when
5776 creating very small distributions:
5777 <itemizedlist>
5778 <listitem><para>Determine how much space you need
5779 (e.g. a kernel that is 1 Mbyte or less and
5780 a root filesystem that is 3 Mbytes or less).
5781 </para></listitem>
5782 <listitem><para>Find the areas that are currently
5783 taking 90% of the space and concentrate on reducing
5784 those areas.
5785 </para></listitem>
5786 <listitem><para>Do not create any difficult "hacks"
5787 to achieve your goals.</para></listitem>
5788 <listitem><para>Leverage the device-specific
5789 options.</para></listitem>
5790 <listitem><para>Work in a separate layer so that you
5791 keep changes isolated.
5792 For information on how to create layers, see
5793 the "<link linkend='understanding-and-creating-layers'>Understanding and Creating Layers</link>" section.
5794 </para></listitem>
5795 </itemizedlist>
5796 </para>
5797 </section>
5798
5799 <section id='understand-what-gives-your-image-size'>
5800 <title>Understand What Contributes to Your Image Size</title>
5801
5802 <para>
5803 It is easiest to have something to start with when creating
5804 your own distribution.
5805 You can use the Yocto Project out-of-the-box to create the
5806 <filename>poky-tiny</filename> distribution.
5807 Ultimately, you will want to make changes in your own
5808 distribution that are likely modeled after
5809 <filename>poky-tiny</filename>.
5810 <note>
5811 To use <filename>poky-tiny</filename> in your build,
5812 set the
5813 <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO'><filename>DISTRO</filename></ulink>
5814 variable in your
5815 <filename>local.conf</filename> file to "poky-tiny"
5816 as described in the
5817 "<link linkend='creating-your-own-distribution'>Creating Your Own Distribution</link>"
5818 section.
5819 </note>
5820 </para>
5821
5822 <para>
5823 Understanding some memory concepts will help you reduce the
5824 system size.
5825 Memory consists of static, dynamic, and temporary memory.
5826 Static memory is the TEXT (code), DATA (initialized data
5827 in the code), and BSS (uninitialized data) sections.
5828 Dynamic memory represents memory that is allocated at runtime:
5829 stacks, hash tables, and so forth.
5830 Temporary memory is recovered after the boot process.
5831 This memory consists of memory used for decompressing
5832 the kernel and for the <filename>__init__</filename>
5833 functions.
5834 </para>
5835
5836 <para>
5837 To help you see where you currently are with kernel and root
5838 filesystem sizes, you can use two tools found in the
5839 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink> in
5840 the <filename>scripts/tiny/</filename> directory:
5841 <itemizedlist>
5842 <listitem><para><filename>ksize.py</filename>: Reports
5843 component sizes for the kernel build objects.
5844 </para></listitem>
5845 <listitem><para><filename>dirsize.py</filename>: Reports
5846 component sizes for the root filesystem.</para></listitem>
5847 </itemizedlist>
5848 This next tool and command help you organize configuration
5849 fragments and view file dependencies in a human-readable form:
5850 <itemizedlist>
5851 <listitem><para><filename>merge_config.sh</filename>:
5852 Helps you manage configuration files and fragments
5853 within the kernel.
5854 With this tool, you can merge individual configuration
5855 fragments together.
5856 The tool allows you to make overrides and warns you
5857 of any missing configuration options.
5858 The tool is ideal for allowing you to iterate on
5859 configurations, create minimal configurations, and
5860 create configuration files for different machines
5861 without having to duplicate your process.</para>
5862 <para>The <filename>merge_config.sh</filename> script is
5863 part of the Linux Yocto kernel Git repositories
5864 (i.e. <filename>linux-yocto-3.14</filename>,
5865 <filename>linux-yocto-3.10</filename>,
5866 <filename>linux-yocto-3.8</filename>, and so forth)
5867 in the
5868 <filename>scripts/kconfig</filename> directory.</para>
5869 <para>For more information on configuration fragments,
5870 see the
5871 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#creating-config-fragments'>Creating Configuration Fragments</ulink>"
5872 section in the Yocto Project Linux Kernel Development
5873 Manual.
5874 </para></listitem>
5875 <listitem><para><filename>bitbake -u taskexp -g <replaceable>bitbake_target</replaceable></filename>:
5876 Using the BitBake command with these options brings up
5877 a Dependency Explorer from which you can view file
5878 dependencies.
5879 Understanding these dependencies allows you to make
5880 informed decisions when cutting out various pieces of the
5881 kernel and root filesystem.</para></listitem>
5882 </itemizedlist>
5883 </para>
5884 </section>
5885
5886 <section id='trim-the-root-filesystem'>
5887 <title>Trim the Root Filesystem</title>
5888
5889 <para>
5890 The root filesystem is made up of packages for booting,
5891 libraries, and applications.
5892 To change things, you can configure how the packaging happens,
5893 which changes the way you build them.
5894 You can also modify the filesystem itself or select a different
5895 filesystem.
5896 </para>
5897
5898 <para>
5899 First, find out what is hogging your root filesystem by running the
5900 <filename>dirsize.py</filename> script from your root directory:
5901 <literallayout class='monospaced'>
5902 $ cd <replaceable>root-directory-of-image</replaceable>
5903 $ dirsize.py 100000 > dirsize-100k.log
5904 $ cat dirsize-100k.log
5905 </literallayout>
5906 You can apply a filter to the script to ignore files under
5907 a certain size.
5908 The previous example filters out any files below 100 Kbytes.
5909 The sizes reported by the tool are uncompressed, and thus
5910 will be smaller by a relatively constant factor in a
5911 compressed root filesystem.
5912 When you examine your log file, you can focus on areas of the
5913 root filesystem that take up large amounts of memory.
5914 </para>
5915
5916 <para>
5917 You need to be sure that what you eliminate does not cripple
5918 the functionality you need.
5919 One way to see how packages relate to each other is by using
5920 the Dependency Explorer UI with the BitBake command:
5921 <literallayout class='monospaced'>
5922 $ cd <replaceable>image-directory</replaceable>
5923 $ bitbake -u taskexp -g <replaceable>image</replaceable>
5924 </literallayout>
5925 Use the interface to select potential packages you wish to
5926 eliminate and see their dependency relationships.
5927 </para>
5928
5929 <para>
5930 When deciding how to reduce the size, get rid of packages that
5931 result in minimal impact on the feature set.
5932 For example, you might not need a VGA display.
5933 Or, you might be able to get by with <filename>devtmpfs</filename>
5934 and <filename>mdev</filename> instead of
5935 <filename>udev</filename>.
5936 </para>
5937
5938 <para>
5939 Use your <filename>local.conf</filename> file to make changes.
5940 For example, to eliminate <filename>udev</filename> and
5941 <filename>glib</filename>, set the following in the
5942 local configuration file:
5943 <literallayout class='monospaced'>
5944 VIRTUAL-RUNTIME_dev_manager = ""
5945 </literallayout>
5946 </para>
5947
5948 <para>
5949 Finally, you should consider exactly the type of root
5950 filesystem you need to meet your needs while also reducing
5951 its size.
5952 For example, consider <filename>cramfs</filename>,
5953 <filename>squashfs</filename>, <filename>ubifs</filename>,
5954 <filename>ext2</filename>, or an <filename>initramfs</filename>
5955 using <filename>initramfs</filename>.
5956 Be aware that <filename>ext3</filename> requires a 1 Mbyte
5957 journal.
5958 If you are okay with running read-only, you do not need this
5959 journal.
5960 </para>
5961
5962 <note>
5963 After each round of elimination, you need to rebuild your
5964 system and then use the tools to see the effects of your
5965 reductions.
5966 </note>
5967 </section>
5968
5969 <section id='trim-the-kernel'>
5970 <title>Trim the Kernel</title>
5971
5972 <para>
5973 The kernel is built by including policies for hardware-independent
5974 aspects.
5975 What subsystems do you enable?
5976 For what architecture are you building?
5977 Which drivers do you build by default?
5978 <note>You can modify the kernel source if you want to help
5979 with boot time.
5980 </note>
5981 </para>
5982
5983 <para>
5984 Run the <filename>ksize.py</filename> script from the top-level
5985 Linux build directory to get an idea of what is making up
5986 the kernel:
5987 <literallayout class='monospaced'>
5988 $ cd <replaceable>top-level-linux-build-directory</replaceable>
5989 $ ksize.py > ksize.log
5990 $ cat ksize.log
5991 </literallayout>
5992 When you examine the log, you will see how much space is
5993 taken up with the built-in <filename>.o</filename> files for
5994 drivers, networking, core kernel files, filesystem, sound,
5995 and so forth.
5996 The sizes reported by the tool are uncompressed, and thus
5997 will be smaller by a relatively constant factor in a compressed
5998 kernel image.
5999 Look to reduce the areas that are large and taking up around
6000 the "90% rule."
6001 </para>
6002
6003 <para>
6004 To examine, or drill down, into any particular area, use the
6005 <filename>-d</filename> option with the script:
6006 <literallayout class='monospaced'>
6007 $ ksize.py -d > ksize.log
6008 </literallayout>
6009 Using this option breaks out the individual file information
6010 for each area of the kernel (e.g. drivers, networking, and
6011 so forth).
6012 </para>
6013
6014 <para>
6015 Use your log file to see what you can eliminate from the kernel
6016 based on features you can let go.
6017 For example, if you are not going to need sound, you do not
6018 need any drivers that support sound.
6019 </para>
6020
6021 <para>
6022 After figuring out what to eliminate, you need to reconfigure
6023 the kernel to reflect those changes during the next build.
6024 You could run <filename>menuconfig</filename> and make all your
6025 changes at once.
6026 However, that makes it difficult to see the effects of your
6027 individual eliminations and also makes it difficult to replicate
6028 the changes for perhaps another target device.
6029 A better method is to start with no configurations using
6030 <filename>allnoconfig</filename>, create configuration
6031 fragments for individual changes, and then manage the
6032 fragments into a single configuration file using
6033 <filename>merge_config.sh</filename>.
6034 The tool makes it easy for you to iterate using the
6035 configuration change and build cycle.
6036 </para>
6037
6038 <para>
6039 Each time you make configuration changes, you need to rebuild
6040 the kernel and check to see what impact your changes had on
6041 the overall size.
6042 </para>
6043 </section>
6044
6045 <section id='remove-package-management-requirements'>
6046 <title>Remove Package Management Requirements</title>
6047
6048 <para>
6049 Packaging requirements add size to the image.
6050 One way to reduce the size of the image is to remove all the
6051 packaging requirements from the image.
6052 This reduction includes both removing the package manager
6053 and its unique dependencies as well as removing the package
6054 management data itself.
6055 </para>
6056
6057 <para>
6058 To eliminate all the packaging requirements for an image,
6059 be sure that "package-management" is not part of your
6060 <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></ulink>
6061 statement for the image.
6062 When you remove this feature, you are removing the package
6063 manager as well as its dependencies from the root filesystem.
6064 </para>
6065 </section>
6066
6067 <section id='look-for-other-ways-to-minimize-size'>
6068 <title>Look for Other Ways to Minimize Size</title>
6069
6070 <para>
6071 Depending on your particular circumstances, other areas that you
6072 can trim likely exist.
6073 The key to finding these areas is through tools and methods
6074 described here combined with experimentation and iteration.
6075 Here are a couple of areas to experiment with:
6076 <itemizedlist>
6077 <listitem><para><filename>glibc</filename>:
6078 In general, follow this process:
6079 <orderedlist>
6080 <listitem><para>Remove <filename>glibc</filename>
6081 features from
6082 <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></ulink>
6083 that you think you do not need.</para></listitem>
6084 <listitem><para>Build your distribution.
6085 </para></listitem>
6086 <listitem><para>If the build fails due to missing
6087 symbols in a package, determine if you can
6088 reconfigure the package to not need those
6089 features.
6090 For example, change the configuration to not
6091 support wide character support as is done for
6092 <filename>ncurses</filename>.
6093 Or, if support for those characters is needed,
6094 determine what <filename>glibc</filename>
6095 features provide the support and restore the
6096 configuration.
6097 </para></listitem>
6098 <listitem><para>Rebuild and repeat the process.
6099 </para></listitem>
6100 </orderedlist></para></listitem>
6101 <listitem><para><filename>busybox</filename>:
6102 For BusyBox, use a process similar as described for
6103 <filename>glibc</filename>.
6104 A difference is you will need to boot the resulting
6105 system to see if you are able to do everything you
6106 expect from the running system.
6107 You need to be sure to integrate configuration fragments
6108 into Busybox because BusyBox handles its own core
6109 features and then allows you to add configuration
6110 fragments on top.
6111 </para></listitem>
6112 </itemizedlist>
6113 </para>
6114 </section>
6115
6116 <section id='iterate-on-the-process'>
6117 <title>Iterate on the Process</title>
6118
6119 <para>
6120 If you have not reached your goals on system size, you need
6121 to iterate on the process.
6122 The process is the same.
6123 Use the tools and see just what is taking up 90% of the root
6124 filesystem and the kernel.
6125 Decide what you can eliminate without limiting your device
6126 beyond what you need.
6127 </para>
6128
6129 <para>
6130 Depending on your system, a good place to look might be
6131 Busybox, which provides a stripped down
6132 version of Unix tools in a single, executable file.
6133 You might be able to drop virtual terminal services or perhaps
6134 ipv6.
6135 </para>
6136 </section>
6137 </section>
6138
6139 <section id='building-images-for-more-than-one-machine'>
6140 <title>Building Images for More than One Machine</title>
6141
6142 <para>
6143 A common scenario developers face is creating images for several
6144 different machines that use the same software environment.
6145 In this situation, it is tempting to set the
6146 tunings and optimization flags for each build specifically for
6147 the targeted hardware (i.e. "maxing out" the tunings).
6148 Doing so can considerably add to build times and package feed
6149 maintenance collectively for the machines.
6150 For example, selecting tunes that are extremely specific to a
6151 CPU core used in a system might enable some micro optimizations
6152 in GCC for that particular system but would otherwise not gain
6153 you much of a performance difference across the other systems
6154 as compared to using a more general tuning across all the builds
6155 (e.g. setting
6156 <ulink url='&YOCTO_DOCS_REF_URL;#var-DEFAULTTUNE'><filename>DEFAULTTUNE</filename></ulink>
6157 specifically for each machine's build).
6158 Rather than "max out" each build's tunings, you can take steps that
6159 cause the OpenEmbedded build system to reuse software across the
6160 various machines where it makes sense.
6161 </para>
6162
6163 <para>
6164 If build speed and package feed maintenance are considerations,
6165 you should consider the points in this section that can help you
6166 optimize your tunings to best consider build times and package
6167 feed maintenance.
6168 <itemizedlist>
6169 <listitem><para>
6170 <emphasis>Share the Build Directory:</emphasis>
6171 If at all possible, share the
6172 <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>
6173 across builds.
6174 The Yocto Project supports switching between different
6175 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
6176 values in the same <filename>TMPDIR</filename>.
6177 This practice is well supported and regularly used by
6178 developers when building for multiple machines.
6179 When you use the same <filename>TMPDIR</filename> for
6180 multiple machine builds, the OpenEmbedded build system can
6181 reuse the existing native and often cross-recipes for
6182 multiple machines.
6183 Thus, build time decreases.
6184 <note>
6185 If
6186 <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO'><filename>DISTRO</filename></ulink>
6187 settings change or fundamental configuration settings
6188 such as the filesystem layout, you need to work with
6189 a clean <filename>TMPDIR</filename>.
6190 Sharing <filename>TMPDIR</filename> under these
6191 circumstances might work but since it is not
6192 guaranteed, you should use a clean
6193 <filename>TMPDIR</filename>.
6194 </note>
6195 </para></listitem>
6196 <listitem><para>
6197 <emphasis>Enable the Appropriate Package Architecture:</emphasis>
6198 By default, the OpenEmbedded build system enables three
6199 levels of package architectures: "all", "tune" or "package",
6200 and "machine".
6201 Any given recipe usually selects one of these package
6202 architectures (types) for its output.
6203 Depending for what a given recipe creates packages, making
6204 sure you enable the appropriate package architecture can
6205 directly impact the build time.</para>
6206
6207 <para>A recipe that just generates scripts can enable
6208 "all" architecture because there are no binaries to build.
6209 To specifically enable "all" architecture, be sure your
6210 recipe inherits the
6211 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-allarch'><filename>allarch</filename></ulink>
6212 class.
6213 This class is useful for "all" architectures because it
6214 configures many variables so packages can be used across
6215 multiple architectures.</para>
6216
6217 <para>If your recipe needs to generate packages that are
6218 machine-specific or when one of the build or runtime
6219 dependencies is already machine-architecture dependent,
6220 which makes your recipe also machine-architecture dependent,
6221 make sure your recipe enables the "machine" package
6222 architecture through the
6223 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_ARCH'><filename>MACHINE_ARCH</filename></ulink>
6224 variable:
6225 <literallayout class='monospaced'>
6226 PACKAGE_ARCH = "${MACHINE_ARCH}"
6227 </literallayout>
6228 When you do not specifically enable a package
6229 architecture through the
6230 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_ARCH'><filename>PACKAGE_ARCH</filename></ulink>,
6231 The OpenEmbedded build system defaults to the
6232 <ulink url='&YOCTO_DOCS_REF_URL;#var-TUNE_PKGARCH'><filename>TUNE_PKGARCH</filename></ulink>
6233 setting:
6234 <literallayout class='monospaced'>
6235 PACKAGE_ARCH = "${TUNE_PKGARCH}"
6236 </literallayout>
6237 </para></listitem>
6238 <listitem><para>
6239 <emphasis>Choose a Generic Tuning File if Possible:</emphasis>
6240 Some tunes are more generic and can run on multiple targets
6241 (e.g. an <filename>armv5</filename> set of packages could
6242 run on <filename>armv6</filename> and
6243 <filename>armv7</filename> processors in most cases).
6244 Similarly, <filename>i486</filename> binaries could work
6245 on <filename>i586</filename> and higher processors.
6246 You should realize, however, that advances on newer
6247 processor versions would not be used.</para>
6248
6249 <para>If you select the same tune for several different
6250 machines, the OpenEmbedded build system reuses software
6251 previously built, thus speeding up the overall build time.
6252 Realize that even though a new sysroot for each machine is
6253 generated, the software is not recompiled and only one
6254 package feed exists.
6255 </para></listitem>
6256 <listitem><para>
6257 <emphasis>Manage Granular Level Packaging:</emphasis>
6258 Sometimes cases exist where injecting another level of
6259 package architecture beyond the three higher levels noted
6260 earlier can be useful.
6261 For example, consider how NXP (formerly Freescale) allows
6262 for the easy reuse of binary packages in their layer
6263 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/meta-freescale/'><filename>meta-freescale</filename></ulink>.
6264 In this example, the
6265 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/meta-freescale/tree/classes/fsl-dynamic-packagearch.bbclass'><filename>fsl-dynamic-packagearch</filename></ulink>
6266 class shares GPU packages for i.MX53 boards because
6267 all boards share the AMD GPU.
6268 The i.MX6-based boards can do the same because all boards
6269 share the Vivante GPU.
6270 This class inspects the BitBake datastore to identify if
6271 the package provides or depends on one of the
6272 sub-architecture values.
6273 If so, the class sets the
6274 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_ARCH'><filename>PACKAGE_ARCH</filename></ulink>
6275 value based on the <filename>MACHINE_SUBARCH</filename>
6276 value.
6277 If the package does not provide or depend on one of the
6278 sub-architecture values but it matches a value in the
6279 machine-specific filter, it sets
6280 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_ARCH'><filename>MACHINE_ARCH</filename></ulink>.
6281 This behavior reduces the number of packages built and
6282 saves build time by reusing binaries.
6283 </para></listitem>
6284 <listitem><para>
6285 <emphasis>Use Tools to Debug Issues:</emphasis>
6286 Sometimes you can run into situations where software is
6287 being rebuilt when you think it should not be.
6288 For example, the OpenEmbedded build system might not be
6289 using shared state between machines when you think it
6290 should be.
6291 These types of situations are usually due to references
6292 to machine-specific variables such as
6293 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>,
6294 <ulink url='&YOCTO_DOCS_REF_URL;#var-SERIAL_CONSOLES'><filename>SERIAL_CONSOLES</filename></ulink>,
6295 <ulink url='&YOCTO_DOCS_REF_URL;#var-XSERVER'><filename>XSERVER</filename></ulink>,
6296 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_FEATURES'><filename>MACHINE_FEATURES</filename></ulink>,
6297 and so forth in code that is supposed to only be
6298 tune-specific or when the recipe depends
6299 (<ulink url='&YOCTO_DOCS_REF_URL;#var-DEPENDS'><filename>DEPENDS</filename></ulink>,
6300 <ulink url='&YOCTO_DOCS_REF_URL;#var-RDEPENDS'><filename>RDEPENDS</filename></ulink>,
6301 <ulink url='&YOCTO_DOCS_REF_URL;#var-RRECOMMENDS'><filename>RRECOMMENDS</filename></ulink>,
6302 <ulink url='&YOCTO_DOCS_REF_URL;#var-RSUGGESTS'><filename>RSUGGESTS</filename></ulink>,
6303 and so forth) on some other recipe that already has
6304 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_ARCH'><filename>PACKAGE_ARCH</filename></ulink>
6305 defined as "${MACHINE_ARCH}".
6306 <note>
6307 Patches to fix any issues identified are most welcome
6308 as these issues occasionally do occur.
6309 </note></para>
6310
6311 <para>For such cases, you can use some tools to help you
6312 sort out the situation:
6313 <itemizedlist>
6314 <listitem><para>
6315 <emphasis><filename>sstate-diff-machines.sh</filename>:</emphasis>
6316 You can find this tool in the
6317 <filename>scripts</filename> directory of the
6318 Source Repositories.
6319 See the comments in the script for information on
6320 how to use the tool.
6321 </para></listitem>
6322 <listitem><para>
6323 <emphasis>BitBake's "-S printdiff" Option:</emphasis>
6324 Using this option causes BitBake to try to
6325 establish the closest signature match it can
6326 (e.g. in the shared state cache) and then run
6327 <filename>bitbake-diffsigs</filename> over the
6328 matches to determine the stamps and delta where
6329 these two stamp trees diverge.
6330 </para></listitem>
6331 </itemizedlist>
6332 </para></listitem>
6333 </itemizedlist>
6334 </para>
6335 </section>
6336
6337 <section id="building-software-from-an-external-source">
6338 <title>Building Software from an External Source</title>
6339
6340 <para>
6341 By default, the OpenEmbedded build system uses the
6342 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
6343 when building source code.
6344 The build process involves fetching the source files, unpacking
6345 them, and then patching them if necessary before the build takes
6346 place.
6347 </para>
6348
6349 <para>
6350 Situations exist where you might want to build software from source
6351 files that are external to and thus outside of the
6352 OpenEmbedded build system.
6353 For example, suppose you have a project that includes a new BSP with
6354 a heavily customized kernel.
6355 And, you want to minimize exposing the build system to the
6356 development team so that they can focus on their project and
6357 maintain everyone's workflow as much as possible.
6358 In this case, you want a kernel source directory on the development
6359 machine where the development occurs.
6360 You want the recipe's
6361 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
6362 variable to point to the external directory and use it as is, not
6363 copy it.
6364 </para>
6365
6366 <para>
6367 To build from software that comes from an external source, all you
6368 need to do is inherit the
6369 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-externalsrc'><filename>externalsrc</filename></ulink>
6370 class and then set the
6371 <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTERNALSRC'><filename>EXTERNALSRC</filename></ulink>
6372 variable to point to your external source code.
6373 Here are the statements to put in your
6374 <filename>local.conf</filename> file:
6375 <literallayout class='monospaced'>
6376 INHERIT += "externalsrc"
6377 EXTERNALSRC_pn-<replaceable>myrecipe</replaceable> = "<replaceable>path-to-your-source-tree</replaceable>"
6378 </literallayout>
6379 </para>
6380
6381 <para>
6382 This next example shows how to accomplish the same thing by setting
6383 <filename>EXTERNALSRC</filename> in the recipe itself or in the
6384 recipe's append file:
6385 <literallayout class='monospaced'>
6386 EXTERNALSRC = "<replaceable>path</replaceable>"
6387 EXTERNALSRC_BUILD = "<replaceable>path</replaceable>"
6388 </literallayout>
6389 <note>
6390 In order for these settings to take effect, you must globally
6391 or locally inherit the
6392 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-externalsrc'><filename>externalsrc</filename></ulink>
6393 class.
6394 </note>
6395 </para>
6396
6397 <para>
6398 By default, <filename>externalsrc.bbclass</filename> builds
6399 the source code in a directory separate from the external source
6400 directory as specified by
6401 <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTERNALSRC'><filename>EXTERNALSRC</filename></ulink>.
6402 If you need to have the source built in the same directory in
6403 which it resides, or some other nominated directory, you can set
6404 <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTERNALSRC_BUILD'><filename>EXTERNALSRC_BUILD</filename></ulink>
6405 to point to that directory:
6406 <literallayout class='monospaced'>
6407 EXTERNALSRC_BUILD_pn-<replaceable>myrecipe</replaceable> = "<replaceable>path-to-your-source-tree</replaceable>"
6408 </literallayout>
6409 </para>
6410 </section>
6411
6412 <section id="replicating-a-build-offline">
6413 <title>Replicating a Build Offline</title>
6414
6415 <para>
6416 It can be useful to take a "snapshot" of upstream sources
6417 used in a build and then use that "snapshot" later to
6418 replicate the build offline.
6419 To do so, you need to first prepare and populate your downloads
6420 directory your "snapshot" of files.
6421 Once your downloads directory is ready, you can use it at
6422 any time and from any machine to replicate your build.
6423 </para>
6424
6425 <para>
6426 Follow these steps to populate your Downloads directory:
6427 <orderedlist>
6428 <listitem><para>
6429 <emphasis>Create a Clean Downloads Directory:</emphasis>
6430 Start with an empty downloads directory
6431 (<ulink url='&YOCTO_DOCS_REF_URL;#var-DL_DIR'><filename>DL_DIR</filename></ulink>).
6432 You start with an empty downloads directory by either
6433 removing the files in the existing directory or by
6434 setting
6435 <filename>DL_DIR</filename> to point to either an
6436 empty location or one that does not yet exist.
6437 </para></listitem>
6438 <listitem><para>
6439 <emphasis>Generate Tarballs of the Source Git Repositories:</emphasis>
6440 Edit your <filename>local.conf</filename> configuration
6441 file as follows:
6442 <literallayout class='monospaced'>
6443 DL_DIR = "/home/<replaceable>your-download-dir</replaceable>/"
6444 BB_GENERATE_MIRROR_TARBALLS = "1"
6445 </literallayout>
6446 During the fetch process in the next step, BitBake
6447 gathers the source files and creates tarballs in
6448 the directory pointed to by <filename>DL_DIR</filename>.
6449 See the
6450 <ulink url='&YOCTO_DOCS_REF_URL;#var-BB_GENERATE_MIRROR_TARBALLS'><filename>BB_GENERATE_MIRROR_TARBALLS</filename></ulink>
6451 variable for more information.
6452 </para></listitem>
6453 <listitem><para>
6454 <emphasis>Populate Your Downloads Directory Without Building:</emphasis>
6455 Use BitBake to fetch your sources but inhibit the
6456 build:
6457 <literallayout class='monospaced'>
6458 $ bitbake <replaceable>target</replaceable> --runonly=fetch
6459 </literallayout>
6460 The downloads directory (i.e.
6461 <filename>${DL_DIR}</filename>) now has a "snapshot" of
6462 the source files in the form of tarballs, which can
6463 be used for the build.
6464 </para></listitem>
6465 <listitem><para>
6466 <emphasis>Optionally Remove Any Git or other SCM Subdirectories From the Downloads Directory:</emphasis>
6467 If you want, you can clean up your downloads directory
6468 by removing any Git or other Source Control Management
6469 (SCM) subdirectories such as
6470 <filename>${DL_DIR}/git2/*</filename>.
6471 The tarballs already contain these subdirectories.
6472 </para></listitem>
6473 </orderedlist>
6474 </para>
6475
6476 <para>
6477 Once your downloads directory has everything it needs regarding
6478 source files, you can create your "own-mirror" and build
6479 your target.
6480 Understand that you can use the files to build the target
6481 offline from any machine and at any time.
6482 </para>
6483
6484 <para>
6485 Follow these steps to build your target using the files in the
6486 downloads directory:
6487 <orderedlist>
6488 <listitem><para>
6489 <emphasis>Using Local Files Only:</emphasis>
6490 Inside your <filename>local.conf</filename> file, add
6491 the
6492 <ulink url='&YOCTO_DOCS_REF_URL;#var-SOURCE_MIRROR_URL'><filename>SOURCE_MIRROR_URL</filename></ulink>
6493 variable,
6494 inherit the <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-own-mirrors'><filename>own-mirrors</filename></ulink>
6495 class, and use the
6496 <ulink url='&YOCTO_DOCS_BB_URL;#var-bb-BB_NO_NETWORK'><filename>BB_NO_NETWORK</filename></ulink>
6497 variable to your <filename>local.conf</filename>.
6498 <literallayout class='monospaced'>
6499 SOURCE_MIRROR_URL ?= "file:///home/<replaceable>your-download-dir</replaceable>/"
6500 INHERIT += "own-mirrors"
6501 BB_NO_NETWORK = "1"
6502 </literallayout>
6503 The <filename>SOURCE_MIRROR_URL</filename> and
6504 <filename>own-mirror</filename> class set up the system
6505 to use the downloads directory as your "own mirror".
6506 Using the <filename>BB_NO_NETWORK</filename>
6507 variable makes sure that BitBake's fetching process
6508 in step 3 stays local, which means files from
6509 your "own-mirror" are used.
6510 </para></listitem>
6511 <listitem><para>
6512 <emphasis>Start With a Clean Build:</emphasis>
6513 You can start with a clean build by removing the
6514 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink><filename>}</filename>
6515 directory or using a new
6516 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
6517 </para></listitem>
6518 <listitem><para>
6519 <emphasis>Build Your Target:</emphasis>
6520 Use BitBake to build your target:
6521 <literallayout class='monospaced'>
6522 $ bitbake <replaceable>target</replaceable>
6523 </literallayout>
6524 The build completes using the known local "snapshot" of
6525 source files from your mirror.
6526 The resulting tarballs for your "snapshot" of source
6527 files are in the downloads directory.
6528 <note>
6529 <para>The offline build does not work if recipes
6530 attempt to find the latest version of software
6531 by setting
6532 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRCREV'><filename>SRCREV</filename></ulink>
6533 to
6534 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-AUTOREV'><filename>AUTOREV</filename></ulink><filename>}</filename>:
6535 <literallayout class='monospaced'>
6536 SRCREV = "${AUTOREV}"
6537 </literallayout>
6538 When a recipe sets
6539 <filename>SRCREV</filename> to
6540 <filename>${AUTOREV}</filename>, the build system
6541 accesses the network in an attempt to determine the
6542 latest version of software from the SCM.
6543 Typically, recipes that use
6544 <filename>AUTOREV</filename> are custom or
6545 modified recipes.
6546 Recipes that reside in public repositories
6547 usually do not use <filename>AUTOREV</filename>.
6548 </para>
6549
6550 <para>If you do have recipes that use
6551 <filename>AUTOREV</filename>, you can take steps to
6552 still use the recipes in an offline build.
6553 Do the following:
6554 <orderedlist>
6555 <listitem><para>
6556 Use a configuration generated by
6557 enabling
6558 <link linkend='maintaining-build-output-quality'>build history</link>.
6559 </para></listitem>
6560 <listitem><para>
6561 Use the
6562 <filename>buildhistory-collect-srcrevs</filename>
6563 command to collect the stored
6564 <filename>SRCREV</filename> values from
6565 the build's history.
6566 For more information on collecting these
6567 values, see the
6568 "<link linkend='build-history-package-information'>Build History Package Information</link>"
6569 section.
6570 </para></listitem>
6571 <listitem><para>
6572 Once you have the correct source
6573 revisions, you can modify those recipes
6574 to to set <filename>SRCREV</filename>
6575 to specific versions of the software.
6576 </para></listitem>
6577 </orderedlist>
6578 </para>
6579 </note>
6580 </para></listitem>
6581 </orderedlist>
6582 </para>
6583 </section>
6584 </section>
6585
6586 <section id='speeding-up-a-build'>
6587 <title>Speeding Up a Build</title>
6588
6589 <para>
6590 Build time can be an issue.
6591 By default, the build system uses simple controls to try and maximize
6592 build efficiency.
6593 In general, the default settings for all the following variables
6594 result in the most efficient build times when dealing with single
6595 socket systems (i.e. a single CPU).
6596 If you have multiple CPUs, you might try increasing the default
6597 values to gain more speed.
6598 See the descriptions in the glossary for each variable for more
6599 information:
6600 <itemizedlist>
6601 <listitem><para>
6602 <ulink url='&YOCTO_DOCS_REF_URL;#var-BB_NUMBER_THREADS'><filename>BB_NUMBER_THREADS</filename>:</ulink>
6603 The maximum number of threads BitBake simultaneously executes.
6604 </para></listitem>
6605 <listitem><para>
6606 <ulink url='&YOCTO_DOCS_BB_URL;#var-BB_NUMBER_PARSE_THREADS'><filename>BB_NUMBER_PARSE_THREADS</filename>:</ulink>
6607 The number of threads BitBake uses during parsing.
6608 </para></listitem>
6609 <listitem><para>
6610 <ulink url='&YOCTO_DOCS_REF_URL;#var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename>:</ulink>
6611 Extra options passed to the <filename>make</filename> command
6612 during the
6613 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-compile'><filename>do_compile</filename></ulink>
6614 task in order to specify parallel compilation on the
6615 local build host.
6616 </para></listitem>
6617 <listitem><para>
6618 <ulink url='&YOCTO_DOCS_REF_URL;#var-PARALLEL_MAKEINST'><filename>PARALLEL_MAKEINST</filename>:</ulink>
6619 Extra options passed to the <filename>make</filename> command
6620 during the
6621 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink>
6622 task in order to specify parallel installation on the
6623 local build host.
6624 </para></listitem>
6625 </itemizedlist>
6626 As mentioned, these variables all scale to the number of processor
6627 cores available on the build system.
6628 For single socket systems, this auto-scaling ensures that the build
6629 system fundamentally takes advantage of potential parallel operations
6630 during the build based on the build machine's capabilities.
6631 </para>
6632
6633 <para>
6634 Following are additional factors that can affect build speed:
6635 <itemizedlist>
6636 <listitem><para>
6637 File system type:
6638 The file system type that the build is being performed on can
6639 also influence performance.
6640 Using <filename>ext4</filename> is recommended as compared
6641 to <filename>ext2</filename> and <filename>ext3</filename>
6642 due to <filename>ext4</filename> improved features
6643 such as extents.
6644 </para></listitem>
6645 <listitem><para>
6646 Disabling the updating of access time using
6647 <filename>noatime</filename>:
6648 The <filename>noatime</filename> mount option prevents the
6649 build system from updating file and directory access times.
6650 </para></listitem>
6651 <listitem><para>
6652 Setting a longer commit:
6653 Using the "commit=" mount option increases the interval
6654 in seconds between disk cache writes.
6655 Changing this interval from the five second default to
6656 something longer increases the risk of data loss but decreases
6657 the need to write to the disk, thus increasing the build
6658 performance.
6659 </para></listitem>
6660 <listitem><para>
6661 Choosing the packaging backend:
6662 Of the available packaging backends, IPK is the fastest.
6663 Additionally, selecting a singular packaging backend also
6664 helps.
6665 </para></listitem>
6666 <listitem><para>
6667 Using <filename>tmpfs</filename> for
6668 <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>
6669 as a temporary file system:
6670 While this can help speed up the build, the benefits are
6671 limited due to the compiler using
6672 <filename>-pipe</filename>.
6673 The build system goes to some lengths to avoid
6674 <filename>sync()</filename> calls into the
6675 file system on the principle that if there was a significant
6676 failure, the
6677 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
6678 contents could easily be rebuilt.
6679 </para></listitem>
6680 <listitem><para>
6681 Inheriting the
6682 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-rm-work'><filename>rm_work</filename></ulink>
6683 class:
6684 Inheriting this class has shown to speed up builds due to
6685 significantly lower amounts of data stored in the data
6686 cache as well as on disk.
6687 Inheriting this class also makes cleanup of
6688 <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>
6689 faster, at the expense of being easily able to dive into the
6690 source code.
6691 File system maintainers have recommended that the fastest way
6692 to clean up large numbers of files is to reformat partitions
6693 rather than delete files due to the linear nature of
6694 partitions.
6695 This, of course, assumes you structure the disk partitions and
6696 file systems in a way that this is practical.
6697 </para></listitem>
6698 </itemizedlist>
6699 Aside from the previous list, you should keep some trade offs in
6700 mind that can help you speed up the build:
6701 <itemizedlist>
6702 <listitem><para>
6703 Remove items from
6704 <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></ulink>
6705 that you might not need.
6706 </para></listitem>
6707 <listitem><para>
6708 Exclude debug symbols and other debug information:
6709 If you do not need these symbols and other debug information,
6710 disabling the <filename>*-dbg</filename> package generation
6711 can speed up the build.
6712 You can disable this generation by setting the
6713 <ulink url='&YOCTO_DOCS_REF_URL;#var-INHIBIT_PACKAGE_DEBUG_SPLIT'><filename>INHIBIT_PACKAGE_DEBUG_SPLIT</filename></ulink>
6714 variable to "1".
6715 </para></listitem>
6716 <listitem><para>
6717 Disable static library generation for recipes derived from
6718 <filename>autoconf</filename> or <filename>libtool</filename>:
6719 Following is an example showing how to disable static
6720 libraries and still provide an override to handle exceptions:
6721 <literallayout class='monospaced'>
6722 STATICLIBCONF = "--disable-static"
6723 STATICLIBCONF_sqlite3-native = ""
6724 EXTRA_OECONF += "${STATICLIBCONF}"
6725 </literallayout>
6726 <note><title>Notes</title>
6727 <itemizedlist>
6728 <listitem><para>
6729 Some recipes need static libraries in order to work
6730 correctly (e.g. <filename>pseudo-native</filename>
6731 needs <filename>sqlite3-native</filename>).
6732 Overrides, as in the previous example, account for
6733 these kinds of exceptions.
6734 </para></listitem>
6735 <listitem><para>
6736 Some packages have packaging code that assumes the
6737 presence of the static libraries.
6738 If so, you might need to exclude them as well.
6739 </para></listitem>
6740 </itemizedlist>
6741 </note>
6742 </para></listitem>
6743 </itemizedlist>
6744 </para>
6745 </section>
6746
6747 <section id="platdev-working-with-libraries">
6748 <title>Working With Libraries</title>
6749
6750 <para>
6751 Libraries are an integral part of your system.
6752 This section describes some common practices you might find
6753 helpful when working with libraries to build your system:
6754 <itemizedlist>
6755 <listitem><para><link linkend='including-static-library-files'>How to include static library files</link>
6756 </para></listitem>
6757 <listitem><para><link linkend='combining-multiple-versions-library-files-into-one-image'>How to use the Multilib feature to combine multiple versions of library files into a single image</link>
6758 </para></listitem>
6759 <listitem><para><link linkend='installing-multiple-versions-of-the-same-library'>How to install multiple versions of the same library in parallel on the same system</link>
6760 </para></listitem>
6761 </itemizedlist>
6762 </para>
6763
6764 <section id='including-static-library-files'>
6765 <title>Including Static Library Files</title>
6766
6767 <para>
6768 If you are building a library and the library offers static linking, you can control
6769 which static library files (<filename>*.a</filename> files) get included in the
6770 built library.
6771 </para>
6772
6773 <para>
6774 The <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGES'><filename>PACKAGES</filename></ulink>
6775 and <ulink url='&YOCTO_DOCS_REF_URL;#var-FILES'><filename>FILES_*</filename></ulink>
6776 variables in the
6777 <filename>meta/conf/bitbake.conf</filename> configuration file define how files installed
6778 by the <filename>do_install</filename> task are packaged.
6779 By default, the <filename>PACKAGES</filename> variable includes
6780 <filename>${PN}-staticdev</filename>, which represents all static library files.
6781 <note>
6782 Some previously released versions of the Yocto Project
6783 defined the static library files through
6784 <filename>${PN}-dev</filename>.
6785 </note>
6786 Following is part of the BitBake configuration file, where
6787 you can see how the static library files are defined:
6788 <literallayout class='monospaced'>
6789 PACKAGE_BEFORE_PN ?= ""
6790 PACKAGES = "${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}"
6791 PACKAGES_DYNAMIC = "^${PN}-locale-.*"
6792 FILES = ""
6793
6794 FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*${SOLIBS} \
6795 ${sysconfdir} ${sharedstatedir} ${localstatedir} \
6796 ${base_bindir}/* ${base_sbindir}/* \
6797 ${base_libdir}/*${SOLIBS} \
6798 ${base_prefix}/lib/udev/rules.d ${prefix}/lib/udev/rules.d \
6799 ${datadir}/${BPN} ${libdir}/${BPN}/* \
6800 ${datadir}/pixmaps ${datadir}/applications \
6801 ${datadir}/idl ${datadir}/omf ${datadir}/sounds \
6802 ${libdir}/bonobo/servers"
6803
6804 FILES_${PN}-bin = "${bindir}/* ${sbindir}/*"
6805
6806 FILES_${PN}-doc = "${docdir} ${mandir} ${infodir} ${datadir}/gtk-doc \
6807 ${datadir}/gnome/help"
6808 SECTION_${PN}-doc = "doc"
6809
6810 FILES_SOLIBSDEV ?= "${base_libdir}/lib*${SOLIBSDEV} ${libdir}/lib*${SOLIBSDEV}"
6811 FILES_${PN}-dev = "${includedir} ${FILES_SOLIBSDEV} ${libdir}/*.la \
6812 ${libdir}/*.o ${libdir}/pkgconfig ${datadir}/pkgconfig \
6813 ${datadir}/aclocal ${base_libdir}/*.o \
6814 ${libdir}/${BPN}/*.la ${base_libdir}/*.la"
6815 SECTION_${PN}-dev = "devel"
6816 ALLOW_EMPTY_${PN}-dev = "1"
6817 RDEPENDS_${PN}-dev = "${PN} (= ${EXTENDPKGV})"
6818
6819 FILES_${PN}-staticdev = "${libdir}/*.a ${base_libdir}/*.a ${libdir}/${BPN}/*.a"
6820 SECTION_${PN}-staticdev = "devel"
6821 RDEPENDS_${PN}-staticdev = "${PN}-dev (= ${EXTENDPKGV})"
6822 </literallayout>
6823 </para>
6824 </section>
6825
6826 <section id="combining-multiple-versions-library-files-into-one-image">
6827 <title>Combining Multiple Versions of Library Files into One Image</title>
6828
6829 <para>
6830 The build system offers the ability to build libraries with different
6831 target optimizations or architecture formats and combine these together
6832 into one system image.
6833 You can link different binaries in the image
6834 against the different libraries as needed for specific use cases.
6835 This feature is called "Multilib."
6836 </para>
6837
6838 <para>
6839 An example would be where you have most of a system compiled in 32-bit
6840 mode using 32-bit libraries, but you have something large, like a database
6841 engine, that needs to be a 64-bit application and uses 64-bit libraries.
6842 Multilib allows you to get the best of both 32-bit and 64-bit libraries.
6843 </para>
6844
6845 <para>
6846 While the Multilib feature is most commonly used for 32 and 64-bit differences,
6847 the approach the build system uses facilitates different target optimizations.
6848 You could compile some binaries to use one set of libraries and other binaries
6849 to use a different set of libraries.
6850 The libraries could differ in architecture, compiler options, or other
6851 optimizations.
6852 </para>
6853
6854 <para>
6855 Several examples exist in the
6856 <filename>meta-skeleton</filename> layer found in the
6857 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>:
6858 <itemizedlist>
6859 <listitem><para><filename>conf/multilib-example.conf</filename>
6860 configuration file</para></listitem>
6861 <listitem><para><filename>conf/multilib-example2.conf</filename>
6862 configuration file</para></listitem>
6863 <listitem><para><filename>recipes-multilib/images/core-image-multilib-example.bb</filename>
6864 recipe</para></listitem>
6865 </itemizedlist>
6866 </para>
6867
6868 <section id='preparing-to-use-multilib'>
6869 <title>Preparing to Use Multilib</title>
6870
6871 <para>
6872 User-specific requirements drive the Multilib feature.
6873 Consequently, there is no one "out-of-the-box" configuration that likely
6874 exists to meet your needs.
6875 </para>
6876
6877 <para>
6878 In order to enable Multilib, you first need to ensure your recipe is
6879 extended to support multiple libraries.
6880 Many standard recipes are already extended and support multiple libraries.
6881 You can check in the <filename>meta/conf/multilib.conf</filename>
6882 configuration file in the
6883 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink> to see how this is
6884 done using the
6885 <ulink url='&YOCTO_DOCS_REF_URL;#var-BBCLASSEXTEND'><filename>BBCLASSEXTEND</filename></ulink>
6886 variable.
6887 Eventually, all recipes will be covered and this list will
6888 not be needed.
6889 </para>
6890
6891 <para>
6892 For the most part, the Multilib class extension works automatically to
6893 extend the package name from <filename>${PN}</filename> to
6894 <filename>${MLPREFIX}${PN}</filename>, where <filename>MLPREFIX</filename>
6895 is the particular multilib (e.g. "lib32-" or "lib64-").
6896 Standard variables such as
6897 <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPENDS'><filename>DEPENDS</filename></ulink>,
6898 <ulink url='&YOCTO_DOCS_REF_URL;#var-RDEPENDS'><filename>RDEPENDS</filename></ulink>,
6899 <ulink url='&YOCTO_DOCS_REF_URL;#var-RPROVIDES'><filename>RPROVIDES</filename></ulink>,
6900 <ulink url='&YOCTO_DOCS_REF_URL;#var-RRECOMMENDS'><filename>RRECOMMENDS</filename></ulink>,
6901 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGES'><filename>PACKAGES</filename></ulink>, and
6902 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGES_DYNAMIC'><filename>PACKAGES_DYNAMIC</filename></ulink>
6903 are automatically extended by the system.
6904 If you are extending any manual code in the recipe, you can use the
6905 <filename>${MLPREFIX}</filename> variable to ensure those names are extended
6906 correctly.
6907 This automatic extension code resides in <filename>multilib.bbclass</filename>.
6908 </para>
6909 </section>
6910
6911 <section id='using-multilib'>
6912 <title>Using Multilib</title>
6913
6914 <para>
6915 After you have set up the recipes, you need to define the actual
6916 combination of multiple libraries you want to build.
6917 You accomplish this through your <filename>local.conf</filename>
6918 configuration file in the
6919 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
6920 An example configuration would be as follows:
6921 <literallayout class='monospaced'>
6922 MACHINE = "qemux86-64"
6923 require conf/multilib.conf
6924 MULTILIBS = "multilib:lib32"
6925 DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
6926 IMAGE_INSTALL_append = " lib32-glib-2.0"
6927 </literallayout>
6928 This example enables an
6929 additional library named <filename>lib32</filename> alongside the
6930 normal target packages.
6931 When combining these "lib32" alternatives, the example uses "x86" for tuning.
6932 For information on this particular tuning, see
6933 <filename>meta/conf/machine/include/ia32/arch-ia32.inc</filename>.
6934 </para>
6935
6936 <para>
6937 The example then includes <filename>lib32-glib-2.0</filename>
6938 in all the images, which illustrates one method of including a
6939 multiple library dependency.
6940 You can use a normal image build to include this dependency,
6941 for example:
6942 <literallayout class='monospaced'>
6943 $ bitbake core-image-sato
6944 </literallayout>
6945 You can also build Multilib packages specifically with a command like this:
6946 <literallayout class='monospaced'>
6947 $ bitbake lib32-glib-2.0
6948 </literallayout>
6949 </para>
6950 </section>
6951
6952 <section id='additional-implementation-details'>
6953 <title>Additional Implementation Details</title>
6954
6955 <para>
6956 Generic implementation details as well as details that are
6957 specific to package management systems exist.
6958 Following are implementation details that exist regardless
6959 of the package management system:
6960 <itemizedlist>
6961 <listitem><para>The typical convention used for the
6962 class extension code as used by
6963 Multilib assumes that all package names specified
6964 in
6965 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGES'><filename>PACKAGES</filename></ulink>
6966 that contain <filename>${PN}</filename> have
6967 <filename>${PN}</filename> at the start of the name.
6968 When that convention is not followed and
6969 <filename>${PN}</filename> appears at
6970 the middle or the end of a name, problems occur.
6971 </para></listitem>
6972 <listitem><para>The
6973 <ulink url='&YOCTO_DOCS_REF_URL;#var-TARGET_VENDOR'><filename>TARGET_VENDOR</filename></ulink>
6974 value under Multilib will be extended to
6975 "-<replaceable>vendor</replaceable>ml<replaceable>multilib</replaceable>"
6976 (e.g. "-pokymllib32" for a "lib32" Multilib with
6977 Poky).
6978 The reason for this slightly unwieldy contraction
6979 is that any "-" characters in the vendor
6980 string presently break Autoconf's
6981 <filename>config.sub</filename>, and
6982 other separators are problematic for different
6983 reasons.
6984 </para></listitem>
6985 </itemizedlist>
6986 </para>
6987
6988 <para>
6989 For the RPM Package Management System, the following implementation details
6990 exist:
6991 <itemizedlist>
6992 <listitem><para>A unique architecture is defined for the Multilib packages,
6993 along with creating a unique deploy folder under
6994 <filename>tmp/deploy/rpm</filename> in the
6995 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
6996 For example, consider <filename>lib32</filename> in a
6997 <filename>qemux86-64</filename> image.
6998 The possible architectures in the system are "all", "qemux86_64",
6999 "lib32_qemux86_64", and "lib32_x86".</para></listitem>
7000 <listitem><para>The <filename>${MLPREFIX}</filename> variable is stripped from
7001 <filename>${PN}</filename> during RPM packaging.
7002 The naming for a normal RPM package and a Multilib RPM package in a
7003 <filename>qemux86-64</filename> system resolves to something similar to
7004 <filename>bash-4.1-r2.x86_64.rpm</filename> and
7005 <filename>bash-4.1.r2.lib32_x86.rpm</filename>, respectively.
7006 </para></listitem>
7007 <listitem><para>When installing a Multilib image, the RPM backend first
7008 installs the base image and then installs the Multilib libraries.
7009 </para></listitem>
7010 <listitem><para>The build system relies on RPM to resolve the identical files in the
7011 two (or more) Multilib packages.</para></listitem>
7012 </itemizedlist>
7013 </para>
7014
7015 <para>
7016 For the IPK Package Management System, the following implementation details exist:
7017 <itemizedlist>
7018 <listitem><para>The <filename>${MLPREFIX}</filename> is not stripped from
7019 <filename>${PN}</filename> during IPK packaging.
7020 The naming for a normal RPM package and a Multilib IPK package in a
7021 <filename>qemux86-64</filename> system resolves to something like
7022 <filename>bash_4.1-r2.x86_64.ipk</filename> and
7023 <filename>lib32-bash_4.1-rw_x86.ipk</filename>, respectively.
7024 </para></listitem>
7025 <listitem><para>The IPK deploy folder is not modified with
7026 <filename>${MLPREFIX}</filename> because packages with and without
7027 the Multilib feature can exist in the same folder due to the
7028 <filename>${PN}</filename> differences.</para></listitem>
7029 <listitem><para>IPK defines a sanity check for Multilib installation
7030 using certain rules for file comparison, overridden, etc.
7031 </para></listitem>
7032 </itemizedlist>
7033 </para>
7034 </section>
7035 </section>
7036
7037 <section id='installing-multiple-versions-of-the-same-library'>
7038 <title>Installing Multiple Versions of the Same Library</title>
7039
7040 <para>
7041 Situations can exist where you need to install and use
7042 multiple versions of the same library on the same system
7043 at the same time.
7044 These situations almost always exist when a library API
7045 changes and you have multiple pieces of software that
7046 depend on the separate versions of the library.
7047 To accommodate these situations, you can install multiple
7048 versions of the same library in parallel on the same system.
7049 </para>
7050
7051 <para>
7052 The process is straightforward as long as the libraries use
7053 proper versioning.
7054 With properly versioned libraries, all you need to do to
7055 individually specify the libraries is create separate,
7056 appropriately named recipes where the
7057 <ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink> part of the
7058 name includes a portion that differentiates each library version
7059 (e.g.the major part of the version number).
7060 Thus, instead of having a single recipe that loads one version
7061 of a library (e.g. <filename>clutter</filename>), you provide
7062 multiple recipes that result in different versions
7063 of the libraries you want.
7064 As an example, the following two recipes would allow the
7065 two separate versions of the <filename>clutter</filename>
7066 library to co-exist on the same system:
7067 <literallayout class='monospaced'>
7068 clutter-1.6_1.6.20.bb
7069 clutter-1.8_1.8.4.bb
7070 </literallayout>
7071 Additionally, if you have other recipes that depend on a given
7072 library, you need to use the
7073 <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPENDS'><filename>DEPENDS</filename></ulink>
7074 variable to create the dependency.
7075 Continuing with the same example, if you want to have a recipe
7076 depend on the 1.8 version of the <filename>clutter</filename>
7077 library, use the following in your recipe:
7078 <literallayout class='monospaced'>
7079 DEPENDS = "clutter-1.8"
7080 </literallayout>
7081 </para>
7082 </section>
7083 </section>
7084
7085 <section id='using-x32-psabi'>
7086 <title>Using x32 psABI</title>
7087
7088 <para>
7089 x32 processor-specific Application Binary Interface
7090 (<ulink url='https://software.intel.com/en-us/node/628948'>x32 psABI</ulink>)
7091 is a native 32-bit processor-specific ABI for
7092 <trademark class='registered'>Intel</trademark> 64 (x86-64)
7093 architectures.
7094 An ABI defines the calling conventions between functions in a
7095 processing environment.
7096 The interface determines what registers are used and what the
7097 sizes are for various C data types.
7098 </para>
7099
7100 <para>
7101 Some processing environments prefer using 32-bit applications even
7102 when running on Intel 64-bit platforms.
7103 Consider the i386 psABI, which is a very old 32-bit ABI for Intel
7104 64-bit platforms.
7105 The i386 psABI does not provide efficient use and access of the
7106 Intel 64-bit processor resources, leaving the system underutilized.
7107 Now consider the x86_64 psABI.
7108 This ABI is newer and uses 64-bits for data sizes and program
7109 pointers.
7110 The extra bits increase the footprint size of the programs,
7111 libraries, and also increases the memory and file system size
7112 requirements.
7113 Executing under the x32 psABI enables user programs to utilize CPU
7114 and system resources more efficiently while keeping the memory
7115 footprint of the applications low.
7116 Extra bits are used for registers but not for addressing mechanisms.
7117 </para>
7118
7119 <para>
7120 The Yocto Project supports the final specifications of x32 psABI
7121 as follows:
7122 <itemizedlist>
7123 <listitem><para>
7124 You can create packages and images in x32 psABI format on
7125 x86_64 architecture targets.
7126 </para></listitem>
7127 <listitem><para>
7128 You can successfully build recipes with the x32 toolchain.
7129 </para></listitem>
7130 <listitem><para>
7131 You can create and boot
7132 <filename>core-image-minimal</filename> and
7133 <filename>core-image-sato</filename> images.
7134 </para></listitem>
7135 <listitem><para>
7136 RPM Package Manager (RPM) support exists for x32 binaries.
7137 </para></listitem>
7138 <listitem><para>
7139 Support for large images exists.
7140 </para></listitem>
7141 </itemizedlist>
7142 </para>
7143
7144 <para>
7145 To use the x32 psABI, you need to edit your
7146 <filename>conf/local.conf</filename> configuration file as
7147 follows:
7148 <literallayout class='monospaced'>
7149 MACHINE = "qemux86-64"
7150 DEFAULTTUNE = "x86-64-x32"
7151 baselib = "${@d.getVar('BASE_LIB_tune-' + (d.getVar('DEFAULTTUNE') \
7152 or 'INVALID')) or 'lib'}"
7153 </literallayout>
7154 Once you have set up your configuration file, use BitBake to
7155 build an image that supports the x32 psABI.
7156 Here is an example:
7157 <literallayout class='monospaced'>
7158 $ bitbake core-image-sato
7159 </literallayout>
7160 </para>
7161 </section>
7162
7163 <section id='enabling-gobject-introspection-support'>
7164 <title>Enabling GObject Introspection Support</title>
7165
7166 <para>
7167 <ulink url='https://wiki.gnome.org/Projects/GObjectIntrospection'>GObject introspection</ulink>
7168 is the standard mechanism for accessing GObject-based software
7169 from runtime environments.
7170 GObject is a feature of the GLib library that provides an object
7171 framework for the GNOME desktop and related software.
7172 GObject Introspection adds information to GObject that allows
7173 objects created within it to be represented across different
7174 programming languages.
7175 If you want to construct GStreamer pipelines using Python, or
7176 control UPnP infrastructure using Javascript and GUPnP,
7177 GObject introspection is the only way to do it.
7178 </para>
7179
7180 <para>
7181 This section describes the Yocto Project support for generating
7182 and packaging GObject introspection data.
7183 GObject introspection data is a description of the
7184 API provided by libraries built on top of GLib framework,
7185 and, in particular, that framework's GObject mechanism.
7186 GObject Introspection Repository (GIR) files go to
7187 <filename>-dev</filename> packages,
7188 <filename>typelib</filename> files go to main packages as they
7189 are packaged together with libraries that are introspected.
7190 </para>
7191
7192 <para>
7193 The data is generated when building such a library, by linking
7194 the library with a small executable binary that asks the library
7195 to describe itself, and then executing the binary and
7196 processing its output.
7197 </para>
7198
7199 <para>
7200 Generating this data in a cross-compilation environment
7201 is difficult because the library is produced for the target
7202 architecture, but its code needs to be executed on the build host.
7203 This problem is solved with the OpenEmbedded build system by
7204 running the code through QEMU, which allows precisely that.
7205 Unfortunately, QEMU does not always work perfectly as mentioned
7206 in the
7207 "<link linkend='known-issues'>Known Issues</link>" section.
7208 </para>
7209
7210 <section id='enabling-the-generation-of-introspection-data'>
7211 <title>Enabling the Generation of Introspection Data</title>
7212
7213 <para>
7214 Enabling the generation of introspection data (GIR files)
7215 in your library package involves the following:
7216 <orderedlist>
7217 <listitem><para>
7218 Inherit the
7219 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-gobject-introspection'><filename>gobject-introspection</filename></ulink>
7220 class.
7221 </para></listitem>
7222 <listitem><para>
7223 Make sure introspection is not disabled anywhere in
7224 the recipe or from anything the recipe includes.
7225 Also, make sure that "gobject-introspection-data" is
7226 not in
7227 <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO_FEATURES_BACKFILL_CONSIDERED'><filename>DISTRO_FEATURES_BACKFILL_CONSIDERED</filename></ulink>
7228 and that "qemu-usermode" is not in
7229 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_FEATURES_BACKFILL_CONSIDERED'><filename>MACHINE_FEATURES_BACKFILL_CONSIDERED</filename></ulink>.
7230 If either of these conditions exist, nothing will
7231 happen.
7232 </para></listitem>
7233 <listitem><para>
7234 Try to build the recipe.
7235 If you encounter build errors that look like
7236 something is unable to find
7237 <filename>.so</filename> libraries, check where these
7238 libraries are located in the source tree and add
7239 the following to the recipe:
7240 <literallayout class='monospaced'>
7241 GIR_EXTRA_LIBS_PATH = "${B}/<replaceable>something</replaceable>/.libs"
7242 </literallayout>
7243 <note>
7244 See recipes in the <filename>oe-core</filename>
7245 repository that use that
7246 <filename>GIR_EXTRA_LIBS_PATH</filename> variable
7247 as an example.
7248 </note>
7249 </para></listitem>
7250 <listitem><para>
7251 Look for any other errors, which probably mean that
7252 introspection support in a package is not entirely
7253 standard, and thus breaks down in a cross-compilation
7254 environment.
7255 For such cases, custom-made fixes are needed.
7256 A good place to ask and receive help in these cases
7257 is the
7258 <ulink url='&YOCTO_DOCS_REF_URL;#resources-mailinglist'>Yocto Project mailing lists</ulink>.
7259 </para></listitem>
7260 </orderedlist>
7261 <note>
7262 Using a library that no longer builds against the latest
7263 Yocto Project release and prints introspection related
7264 errors is a good candidate for the previous procedure.
7265 </note>
7266 </para>
7267 </section>
7268
7269 <section id='disabling-the-generation-of-introspection-data'>
7270 <title>Disabling the Generation of Introspection Data</title>
7271
7272 <para>
7273 You might find that you do not want to generate
7274 introspection data.
7275 Or, perhaps QEMU does not work on your build host and
7276 target architecture combination.
7277 If so, you can use either of the following methods to
7278 disable GIR file generations:
7279 <itemizedlist>
7280 <listitem><para>
7281 Add the following to your distro configuration:
7282 <literallayout class='monospaced'>
7283 DISTRO_FEATURES_BACKFILL_CONSIDERED = "gobject-introspection-data"
7284 </literallayout>
7285 Adding this statement disables generating
7286 introspection data using QEMU but will still enable
7287 building introspection tools and libraries
7288 (i.e. building them does not require the use of QEMU).
7289 </para></listitem>
7290 <listitem><para>
7291 Add the following to your machine configuration:
7292 <literallayout class='monospaced'>
7293 MACHINE_FEATURES_BACKFILL_CONSIDERED = "qemu-usermode"
7294 </literallayout>
7295 Adding this statement disables the use of QEMU
7296 when building packages for your machine.
7297 Currently, this feature is used only by introspection
7298 recipes and has the same effect as the previously
7299 described option.
7300 <note>
7301 Future releases of the Yocto Project might have
7302 other features affected by this option.
7303 </note>
7304 </para></listitem>
7305 </itemizedlist>
7306 If you disable introspection data, you can still
7307 obtain it through other means such as copying the data
7308 from a suitable sysroot, or by generating it on the
7309 target hardware.
7310 The OpenEmbedded build system does not currently
7311 provide specific support for these techniques.
7312 </para>
7313 </section>
7314
7315 <section id='testing-that-introspection-works-in-an-image'>
7316 <title>Testing that Introspection Works in an Image</title>
7317
7318 <para>
7319 Use the following procedure to test if generating
7320 introspection data is working in an image:
7321 <orderedlist>
7322 <listitem><para>
7323 Make sure that "gobject-introspection-data" is not in
7324 <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO_FEATURES_BACKFILL_CONSIDERED'><filename>DISTRO_FEATURES_BACKFILL_CONSIDERED</filename></ulink>
7325 and that "qemu-usermode" is not in
7326 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_FEATURES_BACKFILL_CONSIDERED'><filename>MACHINE_FEATURES_BACKFILL_CONSIDERED</filename></ulink>.
7327 </para></listitem>
7328 <listitem><para>
7329 Build <filename>core-image-sato</filename>.
7330 </para></listitem>
7331 <listitem><para>
7332 Launch a Terminal and then start Python in the
7333 terminal.
7334 </para></listitem>
7335 <listitem><para>
7336 Enter the following in the terminal:
7337 <literallayout class='monospaced'>
7338 >>> from gi.repository import GLib
7339 >>> GLib.get_host_name()
7340 </literallayout>
7341 </para></listitem>
7342 <listitem><para>
7343 For something a little more advanced, enter the
7344 following:
7345 <literallayout class='monospaced'>
7346 http://python-gtk-3-tutorial.readthedocs.org/en/latest/introduction.html
7347 </literallayout>
7348 </para></listitem>
7349 </orderedlist>
7350 </para>
7351 </section>
7352
7353 <section id='known-issues'>
7354 <title>Known Issues</title>
7355
7356 <para>
7357 The following know issues exist for
7358 GObject Introspection Support:
7359 <itemizedlist>
7360 <listitem><para>
7361 <filename>qemu-ppc64</filename> immediately crashes.
7362 Consequently, you cannot build introspection data on
7363 that architecture.
7364 </para></listitem>
7365 <listitem><para>
7366 x32 is not supported by QEMU.
7367 Consequently, introspection data is disabled.
7368 </para></listitem>
7369 <listitem><para>
7370 musl causes transient GLib binaries to crash on
7371 assertion failures.
7372 Consequently, generating introspection data is
7373 disabled.
7374 </para></listitem>
7375 <listitem><para>
7376 Because QEMU is not able to run the binaries correctly,
7377 introspection is disabled for some specific packages
7378 under specific architectures (e.g.
7379 <filename>gcr</filename>,
7380 <filename>libsecret</filename>, and
7381 <filename>webkit</filename>).
7382 </para></listitem>
7383 <listitem><para>
7384 QEMU usermode might not work properly when running
7385 64-bit binaries under 32-bit host machines.
7386 In particular, "qemumips64" is known to not work under
7387 i686.
7388 </para></listitem>
7389 </itemizedlist>
7390 </para>
7391 </section>
7392 </section>
7393
7394 <section id='dev-optionally-using-an-external-toolchain'>
7395 <title>Optionally Using an External Toolchain</title>
7396
7397 <para>
7398 You might want to use an external toolchain as part of your
7399 development.
7400 If this is the case, the fundamental steps you need to accomplish
7401 are as follows:
7402 <itemizedlist>
7403 <listitem><para>
7404 Understand where the installed toolchain resides.
7405 For cases where you need to build the external toolchain,
7406 you would need to take separate steps to build and install
7407 the toolchain.
7408 </para></listitem>
7409 <listitem><para>
7410 Make sure you add the layer that contains the toolchain to
7411 your <filename>bblayers.conf</filename> file through the
7412 <ulink url='&YOCTO_DOCS_REF_URL;#var-BBLAYERS'><filename>BBLAYERS</filename></ulink>
7413 variable.
7414 </para></listitem>
7415 <listitem><para>
7416 Set the <filename>EXTERNAL_TOOLCHAIN</filename>
7417 variable in your <filename>local.conf</filename> file
7418 to the location in which you installed the toolchain.
7419 </para></listitem>
7420 </itemizedlist>
7421 A good example of an external toolchain used with the Yocto Project
7422 is <trademark class='registered'>Mentor Graphics</trademark>
7423 Sourcery G++ Toolchain.
7424 You can see information on how to use that particular layer in the
7425 <filename>README</filename> file at
7426 <ulink url='http://github.com/MentorEmbedded/meta-sourcery/'></ulink>.
7427 You can find further information by reading about the
7428 <ulink url='&YOCTO_DOCS_REF_URL;#var-TCMODE'><filename>TCMODE</filename></ulink>
7429 variable in the Yocto Project Reference Manual's variable glossary.
7430 </para>
7431 </section>
7432
7433 <section id='creating-partitioned-images-using-wic'>
7434 <title>Creating Partitioned Images Using Wic</title>
7435
7436 <para>
7437 Creating an image for a particular hardware target using the
7438 OpenEmbedded build system does not necessarily mean you can boot
7439 that image as is on your device.
7440 Physical devices accept and boot images in various ways depending
7441 on the specifics of the device.
7442 Usually, information about the hardware can tell you what image
7443 format the device requires.
7444 Should your device require multiple partitions on an SD card, flash,
7445 or an HDD, you can use the OpenEmbedded Image Creator,
7446 Wic, to create the properly partitioned image.
7447 </para>
7448
7449 <para>
7450 The <filename>wic</filename> command generates partitioned
7451 images from existing OpenEmbedded build artifacts.
7452 Image generation is driven by partitioning commands
7453 contained in an Openembedded kickstart file
7454 (<filename>.wks</filename>) specified either directly on
7455 the command line or as one of a selection of canned
7456 kickstart files as shown with the
7457 <filename>wic list images</filename> command in the
7458 "<link linkend='using-a-provided-kickstart-file'>Using an Existing Kickstart File</link>"
7459 section.
7460 When you apply the command to a given set of build
7461 artifacts, the result is an image or set of images that
7462 can be directly written onto media and used on a particular
7463 system.
7464 <note>
7465 For a kickstart file reference, see the
7466 "<ulink url='&YOCTO_DOCS_REF_URL;#ref-kickstart'>OpenEmbedded Kickstart (<filename>.wks</filename>) Reference</ulink>"
7467 Chapter in the Yocto Project Reference Manual.
7468 </note>
7469 </para>
7470
7471 <para>
7472 The <filename>wic</filename> command and the infrastructure
7473 it is based on is by definition incomplete.
7474 The purpose of the command is to allow the generation of
7475 customized images, and as such, was designed to be
7476 completely extensible through a plugin interface.
7477 See the
7478 "<link linkend='wic-using-the-wic-plugin-interface'>Using the Wic PlugIn Interface</link>"
7479 section for information on these plugins.
7480 </para>
7481
7482 <para>
7483 This section provides some background information on Wic,
7484 describes what you need to have in
7485 place to run the tool, provides instruction on how to use
7486 the Wic utility, provides information on using the Wic plugins
7487 interface, and provides several examples that show how to use
7488 Wic.
7489 </para>
7490
7491 <section id='wic-background'>
7492 <title>Background</title>
7493
7494 <para>
7495 This section provides some background on the Wic utility.
7496 While none of this information is required to use
7497 Wic, you might find it interesting.
7498 <itemizedlist>
7499 <listitem><para>
7500 The name "Wic" is derived from OpenEmbedded
7501 Image Creator (oeic).
7502 The "oe" diphthong in "oeic" was promoted to the
7503 letter "w", because "oeic" is both difficult to
7504 remember and to pronounce.
7505 </para></listitem>
7506 <listitem><para>
7507 Wic is loosely based on the
7508 Meego Image Creator (<filename>mic</filename>)
7509 framework.
7510 The Wic implementation has been
7511 heavily modified to make direct use of OpenEmbedded
7512 build artifacts instead of package installation and
7513 configuration, which are already incorporated within
7514 the OpenEmbedded artifacts.
7515 </para></listitem>
7516 <listitem><para>
7517 Wic is a completely independent
7518 standalone utility that initially provides
7519 easier-to-use and more flexible replacements for an
7520 existing functionality in OE-Core's
7521 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-image-live'><filename>image-live</filename></ulink>
7522 class.
7523 The difference between Wic and those examples is
7524 that with Wic the functionality of those scripts is
7525 implemented by a general-purpose partitioning language,
7526 which is based on Redhat kickstart syntax.
7527 </para></listitem>
7528 </itemizedlist>
7529 </para>
7530 </section>
7531
7532 <section id='wic-requirements'>
7533 <title>Requirements</title>
7534
7535 <para>
7536 In order to use the Wic utility with the OpenEmbedded Build
7537 system, your system needs to meet the following
7538 requirements:
7539 <itemizedlist>
7540 <listitem><para>
7541 The Linux distribution on your development host must
7542 support the Yocto Project.
7543 See the
7544 "<ulink url='&YOCTO_DOCS_REF_URL;#detailed-supported-distros'>Supported Linux Distributions</ulink>"
7545 section in the Yocto Project Reference Manual for
7546 the list of distributions that support the
7547 Yocto Project.
7548 </para></listitem>
7549 <listitem><para>
7550 The standard system utilities, such as
7551 <filename>cp</filename>, must be installed on your
7552 development host system.
7553 </para></listitem>
7554 <listitem><para>
7555 You must have sourced the build environment
7556 setup script (i.e.
7557 <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>)
7558 found in the
7559 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
7560 </para></listitem>
7561 <listitem><para>
7562 You need to have the build artifacts already
7563 available, which typically means that you must
7564 have already created an image using the
7565 Openembedded build system (e.g.
7566 <filename>core-image-minimal</filename>).
7567 While it might seem redundant to generate an image
7568 in order to create an image using
7569 Wic, the current version of
7570 Wic requires the artifacts
7571 in the form generated by the OpenEmbedded build
7572 system.
7573 </para></listitem>
7574 <listitem><para>
7575 You must build several native tools, which are
7576 built to run on the build system:
7577 <literallayout class='monospaced'>
7578 $ bitbake parted-native dosfstools-native mtools-native
7579 </literallayout>
7580 </para></listitem>
7581 <listitem><para>
7582 Include "wic" as part of the
7583 <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></ulink>
7584 variable.
7585 </para></listitem>
7586 <listitem><para>
7587 Include the name of the
7588 <ulink url='&YOCTO_DOCS_REF_URL;#openembedded-kickstart-wks-reference'>wic kickstart file</ulink>
7589 as part of the
7590 <ulink url='&YOCTO_DOCS_REF_URL;#var-WKS_FILE'><filename>WKS_FILE</filename></ulink>
7591 variable
7592 </para></listitem>
7593 </itemizedlist>
7594 </para>
7595 </section>
7596
7597 <section id='wic-getting-help'>
7598 <title>Getting Help</title>
7599
7600 <para>
7601 You can get general help for the <filename>wic</filename>
7602 command by entering the <filename>wic</filename> command
7603 by itself or by entering the command with a help argument
7604 as follows:
7605 <literallayout class='monospaced'>
7606 $ wic -h
7607 $ wic --help
7608 $ wic help
7609 </literallayout>
7610 </para>
7611
7612 <para>
7613 Currently, Wic supports seven commands:
7614 <filename>cp</filename>, <filename>create</filename>,
7615 <filename>help</filename>, <filename>list</filename>,
7616 <filename>ls</filename>, <filename>rm</filename>, and
7617 <filename>write</filename>.
7618 You can get help for all these commands except "help" by
7619 using the following form:
7620 <literallayout class='monospaced'>
7621 $ wic help <replaceable>command</replaceable>
7622 </literallayout>
7623 For example, the following command returns help for the
7624 <filename>write</filename> command:
7625 <literallayout class='monospaced'>
7626 $ wic help write
7627 </literallayout>
7628 </para>
7629
7630 <para>
7631 Wic supports help for three topics:
7632 <filename>overview</filename>,
7633 <filename>plugins</filename>, and
7634 <filename>kickstart</filename>.
7635 You can get help for any topic using the following form:
7636 <literallayout class='monospaced'>
7637 $ wic help <replaceable>topic</replaceable>
7638 </literallayout>
7639 For example, the following returns overview help for Wic:
7640 <literallayout class='monospaced'>
7641 $ wic help overview
7642 </literallayout>
7643 </para>
7644
7645 <para>
7646 One additional level of help exists for Wic.
7647 You can get help on individual images through the
7648 <filename>list</filename> command.
7649 You can use the <filename>list</filename> command to return the
7650 available Wic images as follows:
7651 <literallayout class='monospaced'>
7652 $ wic list images
7653 genericx86 Create an EFI disk image for genericx86*
7654 beaglebone-yocto Create SD card image for Beaglebone
7655 edgerouter Create SD card image for Edgerouter
7656 qemux86-directdisk Create a qemu machine 'pcbios' direct disk image
7657 directdisk-gpt Create a 'pcbios' direct disk image
7658 mkefidisk Create an EFI disk image
7659 directdisk Create a 'pcbios' direct disk image
7660 systemd-bootdisk Create an EFI disk image with systemd-boot
7661 mkhybridiso Create a hybrid ISO image
7662 sdimage-bootpart Create SD card image with a boot partition
7663 directdisk-multi-rootfs Create multi rootfs image using rootfs plugin
7664 directdisk-bootloader-config Create a 'pcbios' direct disk image with custom bootloader config
7665 </literallayout>
7666 Once you know the list of available Wic images, you can use
7667 <filename>help</filename> with the command to get help on a
7668 particular image.
7669 For example, the following command returns help on the
7670 "beaglebone-yocto" image:
7671 <literallayout class='monospaced'>
7672 $ wic list beaglebone-yocto help
7673
7674
7675 Creates a partitioned SD card image for Beaglebone.
7676 Boot files are located in the first vfat partition.
7677 </literallayout>
7678 </para>
7679 </section>
7680
7681 <section id='operational-modes'>
7682 <title>Operational Modes</title>
7683
7684 <para>
7685 You can use Wic in two different
7686 modes, depending on how much control you need for
7687 specifying the Openembedded build artifacts that are
7688 used for creating the image: Raw and Cooked:
7689 <itemizedlist>
7690 <listitem><para>
7691 <emphasis>Raw Mode:</emphasis>
7692 You explicitly specify build artifacts through
7693 Wic command-line arguments.
7694 </para></listitem>
7695 <listitem><para>
7696 <emphasis>Cooked Mode:</emphasis>
7697 The current
7698 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
7699 setting and image name are used to automatically
7700 locate and provide the build artifacts.
7701 You just supply a kickstart file and the name
7702 of the image from which to use artifacts.
7703 </para></listitem>
7704 </itemizedlist>
7705 </para>
7706
7707 <para>
7708 Regardless of the mode you use, you need to have the build
7709 artifacts ready and available.
7710 </para>
7711
7712 <section id='raw-mode'>
7713 <title>Raw Mode</title>
7714
7715 <para>
7716 Running Wic in raw mode allows you to specify all the
7717 partitions through the <filename>wic</filename>
7718 command line.
7719 The primary use for raw mode is if you have built
7720 your kernel outside of the Yocto Project
7721 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
7722 In other words, you can point to arbitrary kernel,
7723 root filesystem locations, and so forth.
7724 Contrast this behavior with cooked mode where Wic
7725 looks in the Build Directory (e.g.
7726 <filename>tmp/deploy/images/</filename><replaceable>machine</replaceable>).
7727 </para>
7728
7729 <para>
7730 The general form of the
7731 <filename>wic</filename> command in raw mode is:
7732 <literallayout class='monospaced'>
7733 $ wic create <replaceable>wks_file</replaceable> <replaceable>options</replaceable> ...
7734
7735 Where:
7736
7737 <replaceable>wks_file</replaceable>:
7738 An OpenEmbedded kickstart file. You can provide
7739 your own custom file or use a file from a set of
7740 existing files as described by further options.
7741
7742 optional arguments:
7743 -h, --help show this help message and exit
7744 -o <replaceable>OUTDIR</replaceable>, --outdir <replaceable>OUTDIR</replaceable>
7745 name of directory to create image in
7746 -e <replaceable>IMAGE_NAME</replaceable>, --image-name <replaceable>IMAGE_NAME</replaceable>
7747 name of the image to use the artifacts from e.g. core-
7748 image-sato
7749 -r <replaceable>ROOTFS_DIR</replaceable>, --rootfs-dir <replaceable>ROOTFS_DIR</replaceable>
7750 path to the /rootfs dir to use as the .wks rootfs
7751 source
7752 -b <replaceable>BOOTIMG_DIR</replaceable>, --bootimg-dir <replaceable>BOOTIMG_DIR</replaceable>
7753 path to the dir containing the boot artifacts (e.g.
7754 /EFI or /syslinux dirs) to use as the .wks bootimg
7755 source
7756 -k <replaceable>KERNEL_DIR</replaceable>, --kernel-dir <replaceable>KERNEL_DIR</replaceable>
7757 path to the dir containing the kernel to use in the
7758 .wks bootimg
7759 -n <replaceable>NATIVE_SYSROOT</replaceable>, --native-sysroot <replaceable>NATIVE_SYSROOT</replaceable>
7760 path to the native sysroot containing the tools to use
7761 to build the image
7762 -s, --skip-build-check
7763 skip the build check
7764 -f, --build-rootfs build rootfs
7765 -c {gzip,bzip2,xz}, --compress-with {gzip,bzip2,xz}
7766 compress image with specified compressor
7767 -m, --bmap generate .bmap
7768 --no-fstab-update Do not change fstab file.
7769 -v <replaceable>VARS_DIR</replaceable>, --vars <replaceable>VARS_DIR</replaceable>
7770 directory with &lt;image&gt;.env files that store bitbake
7771 variables
7772 -D, --debug output debug information
7773 </literallayout>
7774 <note>
7775 You do not need root privileges to run
7776 Wic.
7777 In fact, you should not run as root when using the
7778 utility.
7779 </note>
7780 </para>
7781 </section>
7782
7783 <section id='cooked-mode'>
7784 <title>Cooked Mode</title>
7785
7786 <para>
7787 Running Wic in cooked mode leverages off artifacts in
7788 the Build Directory.
7789 In other words, you do not have to specify kernel or
7790 root filesystem locations as part of the command.
7791 All you need to provide is a kickstart file and the
7792 name of the image from which to use artifacts by using
7793 the "-e" option.
7794 Wic looks in the Build Directory (e.g.
7795 <filename>tmp/deploy/images/</filename><replaceable>machine</replaceable>)
7796 for artifacts.
7797 </para>
7798
7799 <para>
7800 The general form of the <filename>wic</filename>
7801 command using Cooked Mode is as follows:
7802 <literallayout class='monospaced'>
7803 $ wic create <replaceable>wks_file</replaceable> -e <replaceable>IMAGE_NAME</replaceable>
7804
7805 Where:
7806
7807 <replaceable>wks_file</replaceable>:
7808 An OpenEmbedded kickstart file. You can provide
7809 your own custom file or use a file from a set of
7810 existing files provided with the Yocto Project
7811 release.
7812
7813 required argument:
7814 -e <replaceable>IMAGE_NAME</replaceable>, --image-name <replaceable>IMAGE_NAME</replaceable>
7815 name of the image to use the artifacts from e.g. core-
7816 image-sato
7817 </literallayout>
7818 </para>
7819 </section>
7820 </section>
7821
7822 <section id='using-a-provided-kickstart-file'>
7823 <title>Using an Existing Kickstart File</title>
7824
7825 <para>
7826 If you do not want to create your own kickstart file, you
7827 can use an existing file provided by the Wic installation.
7828 As shipped, kickstart files can be found in the
7829 Yocto Project
7830 <ulink url='&YOCTO_DOCS_OM_URL;#source-repositories'>Source Repositories</ulink>
7831 in the following two locations:
7832 <literallayout class='monospaced'>
7833 poky/meta-yocto-bsp/wic
7834 poky/scripts/lib/wic/canned-wks
7835 </literallayout>
7836 Use the following command to list the available kickstart
7837 files:
7838 <literallayout class='monospaced'>
7839 $ wic list images
7840 genericx86 Create an EFI disk image for genericx86*
7841 beaglebone-yocto Create SD card image for Beaglebone
7842 edgerouter Create SD card image for Edgerouter
7843 qemux86-directdisk Create a qemu machine 'pcbios' direct disk image
7844 directdisk-gpt Create a 'pcbios' direct disk image
7845 mkefidisk Create an EFI disk image
7846 directdisk Create a 'pcbios' direct disk image
7847 systemd-bootdisk Create an EFI disk image with systemd-boot
7848 mkhybridiso Create a hybrid ISO image
7849 sdimage-bootpart Create SD card image with a boot partition
7850 directdisk-multi-rootfs Create multi rootfs image using rootfs plugin
7851 directdisk-bootloader-config Create a 'pcbios' direct disk image with custom bootloader config
7852 </literallayout>
7853 When you use an existing file, you do not have to use the
7854 <filename>.wks</filename> extension.
7855 Here is an example in Raw Mode that uses the
7856 <filename>directdisk</filename> file:
7857 <literallayout class='monospaced'>
7858 $ wic create directdisk -r <replaceable>rootfs_dir</replaceable> -b <replaceable>bootimg_dir</replaceable> \
7859 -k <replaceable>kernel_dir</replaceable> -n <replaceable>native_sysroot</replaceable>
7860 </literallayout>
7861 </para>
7862
7863 <para>
7864 Here are the actual partition language commands
7865 used in the <filename>genericx86.wks</filename> file to
7866 generate an image:
7867 <literallayout class='monospaced'>
7868 # short-description: Create an EFI disk image for genericx86*
7869 # long-description: Creates a partitioned EFI disk image for genericx86* machines
7870 part /boot --source bootimg-efi --sourceparams="loader=grub-efi" --ondisk sda --label msdos --active --align 1024
7871 part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024 --use-uuid
7872 part swap --ondisk sda --size 44 --label swap1 --fstype=swap
7873
7874 bootloader --ptable gpt --timeout=5 --append="rootfstype=ext4 console=ttyS0,115200 console=tty0"
7875 </literallayout>
7876 </para>
7877 </section>
7878
7879 <section id='wic-using-the-wic-plugin-interface'>
7880 <title>Using the Wic Plugin Interface</title>
7881
7882 <para>
7883 You can extend and specialize Wic functionality by using
7884 Wic plugins.
7885 This section explains the Wic plugin interface.
7886 <note>
7887 Wic plugins consist of "source" and "imager" plugins.
7888 Imager plugins are beyond the scope of this section.
7889 </note>
7890 </para>
7891
7892 <para>
7893 Source plugins provide a mechanism to customize partition
7894 content during the Wic image generation process.
7895 You can use source plugins to map values that you specify
7896 using <filename>--source</filename> commands in kickstart
7897 files (i.e. <filename>*.wks</filename>) to a plugin
7898 implementation used to populate a given partition.
7899 <note>
7900 If you use plugins that have build-time dependencies
7901 (e.g. native tools, bootloaders, and so forth)
7902 when building a Wic image, you need to specify those
7903 dependencies using the
7904 <ulink url='&YOCTO_DOCS_REF_URL;#var-WKS_FILE_DEPENDS'><filename>WKS_FILE_DEPENDS</filename></ulink>
7905 variable.
7906 </note>
7907 </para>
7908
7909 <para>
7910 Source plugins are subclasses defined in plugin files.
7911 As shipped, the Yocto Project provides several plugin
7912 files.
7913 You can see the source plugin files that ship with the
7914 Yocto Project
7915 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/scripts/lib/wic/plugins/source'>here</ulink>.
7916 Each of these plugin files contains source plugins that
7917 are designed to populate a specific Wic image partition.
7918 </para>
7919
7920 <para>
7921 Source plugins are subclasses of the
7922 <filename>SourcePlugin</filename> class, which is
7923 defined in the
7924 <filename>poky/scripts/lib/wic/pluginbase.py</filename>
7925 file.
7926 For example, the <filename>BootimgEFIPlugin</filename>
7927 source plugin found in the
7928 <filename>bootimg-efi.py</filename> file is a subclass of
7929 the <filename>SourcePlugin</filename> class, which is found
7930 in the <filename>pluginbase.py</filename> file.
7931 </para>
7932
7933 <para>
7934 You can also implement source plugins in a layer outside
7935 of the Source Repositories (external layer).
7936 To do so, be sure that your plugin files are located in
7937 a directory whose path is
7938 <filename>scripts/lib/wic/plugins/source/</filename>
7939 within your external layer.
7940 When the plugin files are located there, the source
7941 plugins they contain are made available to Wic.
7942 </para>
7943
7944 <para>
7945 When the Wic implementation needs to invoke a
7946 partition-specific implementation, it looks for the plugin
7947 with the same name as the <filename>--source</filename>
7948 parameter used in the kickstart file given to that
7949 partition.
7950 For example, if the partition is set up using the following
7951 command in a kickstart file:
7952 <literallayout class='monospaced'>
7953 part /boot --source bootimg-pcbios --ondisk sda --label boot --active --align 1024
7954 </literallayout>
7955 The methods defined as class members of the matching
7956 source plugin (i.e. <filename>bootimg-pcbios</filename>)
7957 in the <filename>bootimg-pcbios.py</filename> plugin file
7958 are used.
7959 </para>
7960
7961 <para>
7962 To be more concrete, here is the corresponding plugin
7963 definition from the <filename>bootimg-pcbios.py</filename>
7964 file for the previous command along with an example
7965 method called by the Wic implementation when it needs to
7966 prepare a partition using an implementation-specific
7967 function:
7968 <literallayout class='monospaced'>
7969 .
7970 .
7971 .
7972 class BootimgPcbiosPlugin(SourcePlugin):
7973 """
7974 Create MBR boot partition and install syslinux on it.
7975 """
7976
7977 name = 'bootimg-pcbios'
7978 .
7979 .
7980 .
7981 @classmethod
7982 def do_prepare_partition(cls, part, source_params, creator, cr_workdir,
7983 oe_builddir, bootimg_dir, kernel_dir,
7984 rootfs_dir, native_sysroot):
7985 """
7986 Called to do the actual content population for a partition i.e. it
7987 'prepares' the partition to be incorporated into the image.
7988 In this case, prepare content for legacy bios boot partition.
7989 """
7990 .
7991 .
7992 .
7993 </literallayout>
7994 If a subclass (plugin) itself does not implement a
7995 particular function, Wic locates and uses the default
7996 version in the superclass.
7997 It is for this reason that all source plugins are derived
7998 from the <filename>SourcePlugin</filename> class.
7999 </para>
8000
8001 <para>
8002 The <filename>SourcePlugin</filename> class defined in
8003 the <filename>pluginbase.py</filename> file defines
8004 a set of methods that source plugins can implement or
8005 override.
8006 Any plugins (subclass of
8007 <filename>SourcePlugin</filename>) that do not implement
8008 a particular method inherit the implementation of the
8009 method from the <filename>SourcePlugin</filename> class.
8010 For more information, see the
8011 <filename>SourcePlugin</filename> class in the
8012 <filename>pluginbase.py</filename> file for details:
8013 </para>
8014
8015 <para>
8016 The following list describes the methods implemented in the
8017 <filename>SourcePlugin</filename> class:
8018 <itemizedlist>
8019 <listitem><para>
8020 <emphasis><filename>do_prepare_partition()</filename>:</emphasis>
8021 Called to populate a partition with actual content.
8022 In other words, the method prepares the final
8023 partition image that is incorporated into the
8024 disk image.
8025 </para></listitem>
8026 <listitem><para>
8027 <emphasis><filename>do_configure_partition()</filename>:</emphasis>
8028 Called before
8029 <filename>do_prepare_partition()</filename> to
8030 create custom configuration files for a partition
8031 (e.g. syslinux or grub configuration files).
8032 </para></listitem>
8033 <listitem><para>
8034 <emphasis><filename>do_install_disk()</filename>:</emphasis>
8035 Called after all partitions have been prepared and
8036 assembled into a disk image.
8037 This method provides a hook to allow finalization
8038 of a disk image (e.g. writing an MBR).
8039 </para></listitem>
8040 <listitem><para>
8041 <emphasis><filename>do_stage_partition()</filename>:</emphasis>
8042 Special content-staging hook called before
8043 <filename>do_prepare_partition()</filename>.
8044 This method is normally empty.</para>
8045
8046 <para>Typically, a partition just uses the passed-in
8047 parameters (e.g. the unmodified value of
8048 <filename>bootimg_dir</filename>).
8049 However, in some cases, things might need to be
8050 more tailored.
8051 As an example, certain files might additionally
8052 need to be taken from
8053 <filename>bootimg_dir + /boot</filename>.
8054 This hook allows those files to be staged in a
8055 customized fashion.
8056 <note>
8057 <filename>get_bitbake_var()</filename>
8058 allows you to access non-standard variables
8059 that you might want to use for this
8060 behavior.
8061 </note>
8062 </para></listitem>
8063 </itemizedlist>
8064 </para>
8065
8066 <para>
8067 You can extend the source plugin mechanism.
8068 To add more hooks, create more source plugin methods
8069 within <filename>SourcePlugin</filename> and the
8070 corresponding derived subclasses.
8071 The code that calls the plugin methods uses the
8072 <filename>plugin.get_source_plugin_methods()</filename>
8073 function to find the method or methods needed by the call.
8074 Retrieval of those methods is accomplished by filling up
8075 a dict with keys that contain the method names of interest.
8076 On success, these will be filled in with the actual
8077 methods.
8078 See the Wic implementation for examples and details.
8079 </para>
8080 </section>
8081
8082 <section id='wic-usage-examples'>
8083 <title>Examples</title>
8084
8085 <para>
8086 This section provides several examples that show how to use
8087 the Wic utility.
8088 All the examples assume the list of requirements in the
8089 "<link linkend='wic-requirements'>Requirements</link>"
8090 section have been met.
8091 The examples assume the previously generated image is
8092 <filename>core-image-minimal</filename>.
8093 </para>
8094
8095 <section id='generate-an-image-using-a-provided-kickstart-file'>
8096 <title>Generate an Image using an Existing Kickstart File</title>
8097
8098 <para>
8099 This example runs in Cooked Mode and uses the
8100 <filename>mkefidisk</filename> kickstart file:
8101 <literallayout class='monospaced'>
8102 $ wic create mkefidisk -e core-image-minimal
8103 INFO: Building wic-tools...
8104 .
8105 .
8106 .
8107 INFO: The new image(s) can be found here:
8108 ./mkefidisk-201804191017-sda.direct
8109
8110 The following build artifacts were used to create the image(s):
8111 ROOTFS_DIR: /home/stephano/build/master/build/tmp-glibc/work/qemux86-oe-linux/core-image-minimal/1.0-r0/rootfs
8112 BOOTIMG_DIR: /home/stephano/build/master/build/tmp-glibc/work/qemux86-oe-linux/core-image-minimal/1.0-r0/recipe-sysroot/usr/share
8113 KERNEL_DIR: /home/stephano/build/master/build/tmp-glibc/deploy/images/qemux86
8114 NATIVE_SYSROOT: /home/stephano/build/master/build/tmp-glibc/work/i586-oe-linux/wic-tools/1.0-r0/recipe-sysroot-native
8115
8116 INFO: The image(s) were created using OE kickstart file:
8117 /home/stephano/build/master/openembedded-core/scripts/lib/wic/canned-wks/mkefidisk.wks
8118 </literallayout>
8119 The previous example shows the easiest way to create
8120 an image by running in cooked mode and supplying
8121 a kickstart file and the "-e" option to point to the
8122 existing build artifacts.
8123 Your <filename>local.conf</filename> file needs to have
8124 the
8125 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
8126 variable set to the machine you are using, which is
8127 "qemux86" in this example.
8128 </para>
8129
8130 <para>
8131 Once the image builds, the output provides image
8132 location, artifact use, and kickstart file information.
8133 <note>
8134 You should always verify the details provided in the
8135 output to make sure that the image was indeed
8136 created exactly as expected.
8137 </note>
8138 </para>
8139
8140 <para>
8141 Continuing with the example, you can now write the
8142 image from the Build Directory onto a USB stick, or
8143 whatever media for which you built your image, and boot
8144 from the media.
8145 You can write the image by using
8146 <filename>bmaptool</filename> or
8147 <filename>dd</filename>:
8148 <literallayout class='monospaced'>
8149 $ oe-run-native bmaptool copy mkefidisk-201804191017-sda.direct /dev/sd<replaceable>X</replaceable>
8150 </literallayout>
8151 or
8152 <literallayout class='monospaced'>
8153 $ sudo dd if=mkefidisk-201804191017-sda.direct of=/dev/sd<replaceable>X</replaceable>
8154 </literallayout>
8155 <note>
8156 For more information on how to use the
8157 <filename>bmaptool</filename> to flash a device
8158 with an image, see the
8159 "<link linkend='flashing-images-using-bmaptool'>Flashing Images Using <filename>bmaptool</filename></link>"
8160 section.
8161 </note>
8162 </para>
8163 </section>
8164
8165 <section id='using-a-modified-kickstart-file'>
8166 <title>Using a Modified Kickstart File</title>
8167
8168 <para>
8169 Because partitioned image creation is driven by the
8170 kickstart file, it is easy to affect image creation by
8171 changing the parameters in the file.
8172 This next example demonstrates that through modification
8173 of the <filename>directdisk-gpt</filename> kickstart
8174 file.
8175 </para>
8176
8177 <para>
8178 As mentioned earlier, you can use the command
8179 <filename>wic list images</filename> to show the list
8180 of existing kickstart files.
8181 The directory in which the
8182 <filename>directdisk-gpt.wks</filename> file resides is
8183 <filename>scripts/lib/image/canned-wks/</filename>,
8184 which is located in the
8185 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
8186 (e.g. <filename>poky</filename>).
8187 Because available files reside in this directory,
8188 you can create and add your own custom files to the
8189 directory.
8190 Subsequent use of the
8191 <filename>wic list images</filename> command would then
8192 include your kickstart files.
8193 </para>
8194
8195 <para>
8196 In this example, the existing
8197 <filename>directdisk-gpt</filename> file already does
8198 most of what is needed.
8199 However, for the hardware in this example, the image
8200 will need to boot from <filename>sdb</filename> instead
8201 of <filename>sda</filename>, which is what the
8202 <filename>directdisk-gpt</filename> kickstart file
8203 uses.
8204 </para>
8205
8206 <para>
8207 The example begins by making a copy of the
8208 <filename>directdisk-gpt.wks</filename> file in the
8209 <filename>scripts/lib/image/canned-wks</filename>
8210 directory and then by changing the lines that specify
8211 the target disk from which to boot.
8212 <literallayout class='monospaced'>
8213 $ cp /home/stephano/poky/scripts/lib/wic/canned-wks/directdisk-gpt.wks \
8214 /home/stephano/poky/scripts/lib/wic/canned-wks/directdisksdb-gpt.wks
8215 </literallayout>
8216 Next, the example modifies the
8217 <filename>directdisksdb-gpt.wks</filename> file and
8218 changes all instances of
8219 "<filename>--ondisk sda</filename>" to
8220 "<filename>--ondisk sdb</filename>".
8221 The example changes the following two lines and leaves
8222 the remaining lines untouched:
8223 <literallayout class='monospaced'>
8224 part /boot --source bootimg-pcbios --ondisk sdb --label boot --active --align 1024
8225 part / --source rootfs --ondisk sdb --fstype=ext4 --label platform --align 1024 --use-uuid
8226 </literallayout>
8227 Once the lines are changed, the example generates the
8228 <filename>directdisksdb-gpt</filename> image.
8229 The command points the process at the
8230 <filename>core-image-minimal</filename> artifacts for
8231 the Next Unit of Computing (nuc)
8232 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
8233 the <filename>local.conf</filename>.
8234 <literallayout class='monospaced'>
8235 $ wic create directdisksdb-gpt -e core-image-minimal
8236 INFO: Building wic-tools...
8237 .
8238 .
8239 .
8240 Initialising tasks: 100% |#######################################| Time: 0:00:01
8241 NOTE: Executing SetScene Tasks
8242 NOTE: Executing RunQueue Tasks
8243 NOTE: Tasks Summary: Attempted 1161 tasks of which 1157 didn't need to be rerun and all succeeded.
8244 INFO: Creating image(s)...
8245
8246 INFO: The new image(s) can be found here:
8247 ./directdisksdb-gpt-201710090938-sdb.direct
8248
8249 The following build artifacts were used to create the image(s):
8250 ROOTFS_DIR: /home/stephano/build/master/build/tmp-glibc/work/qemux86-oe-linux/core-image-minimal/1.0-r0/rootfs
8251 BOOTIMG_DIR: /home/stephano/build/master/build/tmp-glibc/work/qemux86-oe-linux/core-image-minimal/1.0-r0/recipe-sysroot/usr/share
8252 KERNEL_DIR: /home/stephano/build/master/build/tmp-glibc/deploy/images/qemux86
8253 NATIVE_SYSROOT: /home/stephano/build/master/build/tmp-glibc/work/i586-oe-linux/wic-tools/1.0-r0/recipe-sysroot-native
8254
8255 INFO: The image(s) were created using OE kickstart file:
8256 /home/stephano/poky/scripts/lib/wic/canned-wks/directdisksdb-gpt.wks
8257 </literallayout>
8258 Continuing with the example, you can now directly
8259 <filename>dd</filename> the image to a USB stick, or
8260 whatever media for which you built your image,
8261 and boot the resulting media:
8262 <literallayout class='monospaced'>
8263 $ sudo dd if=directdisksdb-gpt-201710090938-sdb.direct of=/dev/sdb
8264 140966+0 records in
8265 140966+0 records out
8266 72174592 bytes (72 MB, 69 MiB) copied, 78.0282 s, 925 kB/s
8267 $ sudo eject /dev/sdb
8268 </literallayout>
8269 </para>
8270 </section>
8271
8272 <section id='using-a-modified-kickstart-file-and-running-in-raw-mode'>
8273 <title>Using a Modified Kickstart File and Running in Raw Mode</title>
8274
8275 <para>
8276 This next example manually specifies each build artifact
8277 (runs in Raw Mode) and uses a modified kickstart file.
8278 The example also uses the <filename>-o</filename> option
8279 to cause Wic to create the output
8280 somewhere other than the default output directory,
8281 which is the current directory:
8282 <literallayout class='monospaced'>
8283 $ wic create /home/stephano/my_yocto/test.wks -o /home/stephano/testwic \
8284 --rootfs-dir /home/stephano/build/master/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs \
8285 --bootimg-dir /home/stephano/build/master/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot/usr/share \
8286 --kernel-dir /home/stephano/build/master/build/tmp/deploy/images/qemux86 \
8287 --native-sysroot /home/stephano/build/master/build/tmp/work/i586-poky-linux/wic-tools/1.0-r0/recipe-sysroot-native
8288
8289 INFO: Creating image(s)...
8290
8291 INFO: The new image(s) can be found here:
8292 /home/stephano/testwic/test-201710091445-sdb.direct
8293
8294 The following build artifacts were used to create the image(s):
8295 ROOTFS_DIR: /home/stephano/build/master/build/tmp-glibc/work/qemux86-oe-linux/core-image-minimal/1.0-r0/rootfs
8296 BOOTIMG_DIR: /home/stephano/build/master/build/tmp-glibc/work/qemux86-oe-linux/core-image-minimal/1.0-r0/recipe-sysroot/usr/share
8297 KERNEL_DIR: /home/stephano/build/master/build/tmp-glibc/deploy/images/qemux86
8298 NATIVE_SYSROOT: /home/stephano/build/master/build/tmp-glibc/work/i586-oe-linux/wic-tools/1.0-r0/recipe-sysroot-native
8299
8300 INFO: The image(s) were created using OE kickstart file:
8301 /home/stephano/my_yocto/test.wks
8302 </literallayout>
8303 For this example,
8304 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
8305 did not have to be specified in the
8306 <filename>local.conf</filename> file since the
8307 artifact is manually specified.
8308 </para>
8309 </section>
8310
8311 <section id='using-wic-to-manipulate-an-image'>
8312 <title>Using Wic to Manipulate an Image</title>
8313
8314 <para>
8315 Wic image manipulation allows you to shorten turnaround
8316 time during image development.
8317 For example, you can use Wic to delete the kernel partition
8318 of a Wic image and then insert a newly built kernel.
8319 This saves you time from having to rebuild the entire image
8320 each time you modify the kernel.
8321 <note>
8322 In order to use Wic to manipulate a Wic image as in
8323 this example, your development machine must have the
8324 <filename>mtools</filename> package installed.
8325 </note>
8326 </para>
8327
8328 <para>
8329 The following example examines the contents of the Wic
8330 image, deletes the existing kernel, and then inserts a
8331 new kernel:
8332 <orderedlist>
8333 <listitem><para>
8334 <emphasis>List the Partitions:</emphasis>
8335 Use the <filename>wic ls</filename> command to list
8336 all the partitions in the Wic image:
8337 <literallayout class='monospaced'>
8338 $ wic ls tmp/deploy/images/qemux86/core-image-minimal-qemux86.wic
8339 Num Start End Size Fstype
8340 1 1048576 25041919 23993344 fat16
8341 2 25165824 72157183 46991360 ext4
8342 </literallayout>
8343 The previous output shows two partitions in the
8344 <filename>core-image-minimal-qemux86.wic</filename>
8345 image.
8346 </para></listitem>
8347 <listitem><para>
8348 <emphasis>Examine a Particular Partition:</emphasis>
8349 Use the <filename>wic ls</filename> command again
8350 but in a different form to examine a particular
8351 partition.
8352 <note>
8353 You can get command usage on any Wic command
8354 using the following form:
8355 <literallayout class='monospaced'>
8356 $ wic help <replaceable>command</replaceable>
8357 </literallayout>
8358 For example, the following command shows you
8359 the various ways to use the
8360 <filename>wic ls</filename> command:
8361 <literallayout class='monospaced'>
8362 $ wic help ls
8363 </literallayout>
8364 </note>
8365 The following command shows what is in Partition
8366 one:
8367 <literallayout class='monospaced'>
8368 $ wic ls tmp/deploy/images/qemux86/core-image-minimal-qemux86.wic:1
8369 Volume in drive : is boot
8370 Volume Serial Number is E894-1809
8371 Directory for ::/
8372
8373 libcom32 c32 186500 2017-10-09 16:06
8374 libutil c32 24148 2017-10-09 16:06
8375 syslinux cfg 220 2017-10-09 16:06
8376 vesamenu c32 27104 2017-10-09 16:06
8377 vmlinuz 6904608 2017-10-09 16:06
8378 5 files 7 142 580 bytes
8379 16 582 656 bytes free
8380 </literallayout>
8381 The previous output shows five files, with the
8382 <filename>vmlinuz</filename> being the kernel.
8383 <note>
8384 If you see the following error, you need to
8385 update or create a
8386 <filename>~/.mtoolsrc</filename> file and
8387 be sure to have the line "mtools_skip_check=1"
8388 in the file.
8389 Then, run the Wic command again:
8390 <literallayout class='monospaced'>
8391 ERROR: _exec_cmd: /usr/bin/mdir -i /tmp/wic-parttfokuwra ::/ returned '1' instead of 0
8392 output: Total number of sectors (47824) not a multiple of sectors per track (32)!
8393 Add mtools_skip_check=1 to your .mtoolsrc file to skip this test
8394 </literallayout>
8395 </note>
8396 </para></listitem>
8397 <listitem><para>
8398 <emphasis>Remove the Old Kernel:</emphasis>
8399 Use the <filename>wic rm</filename> command to
8400 remove the <filename>vmlinuz</filename> file
8401 (kernel):
8402 <literallayout class='monospaced'>
8403 $ wic rm tmp/deploy/images/qemux86/core-image-minimal-qemux86.wic:1/vmlinuz
8404 </literallayout>
8405 </para></listitem>
8406 <listitem><para>
8407 <emphasis>Add In the New Kernel:</emphasis>
8408 Use the <filename>wic cp</filename> command to
8409 add the updated kernel to the Wic image.
8410 Depending on how you built your kernel, it could
8411 be in different places.
8412 If you used <filename>devtool</filename> and
8413 an SDK to build your kernel, it resides in the
8414 <filename>tmp/work</filename> directory of the
8415 extensible SDK.
8416 If you used <filename>make</filename> to build the
8417 kernel, the kernel will be in the
8418 <filename>workspace/sources</filename> area.
8419 </para>
8420
8421 <para>The following example assumes
8422 <filename>devtool</filename> was used to build
8423 the kernel:
8424 <literallayout class='monospaced'>
8425 cp ~/poky_sdk/tmp/work/qemux86-poky-linux/linux-yocto/4.12.12+git999-r0/linux-yocto-4.12.12+git999/arch/x86/boot/bzImage \
8426 ~/poky/build/tmp/deploy/images/qemux86/core-image-minimal-qemux86.wic:1/vmlinuz
8427 </literallayout>
8428 Once the new kernel is added back into the image,
8429 you can use the <filename>dd</filename>
8430 command or
8431 <link linkend='flashing-images-using-bmaptool'><filename>bmaptool</filename></link>
8432 to flash your wic image onto an SD card
8433 or USB stick and test your target.
8434 <note>
8435 Using <filename>bmaptool</filename> is
8436 generally 10 to 20 times faster than using
8437 <filename>dd</filename>.
8438 </note>
8439 </para></listitem>
8440 </orderedlist>
8441 </para>
8442 </section>
8443 </section>
8444 </section>
8445
8446 <section id='flashing-images-using-bmaptool'>
8447 <title>Flashing Images Using <filename>bmaptool</filename></title>
8448
8449 <para>
8450 A fast and easy way to flash an image to a bootable device
8451 is to use Bmaptool, which is integrated into the OpenEmbedded
8452 build system.
8453 Bmaptool is a generic tool that creates a file's block map (bmap)
8454 and then uses that map to copy the file.
8455 As compared to traditional tools such as dd or cp, Bmaptool
8456 can copy (or flash) large files like raw system image files
8457 much faster.
8458 <note><title>Notes</title>
8459 <itemizedlist>
8460 <listitem><para>
8461 If you are using Ubuntu or Debian distributions, you
8462 can install the <filename>bmap-tools</filename> package
8463 using the following command and then use the tool
8464 without specifying <filename>PATH</filename> even from
8465 the root account:
8466 <literallayout class='monospaced'>
8467 $ sudo apt-get install bmap-tools
8468 </literallayout>
8469 </para></listitem>
8470 <listitem><para>
8471 If you are unable to install the
8472 <filename>bmap-tools</filename> package, you will
8473 need to build Bmaptool before using it.
8474 Use the following command:
8475 <literallayout class='monospaced'>
8476 $ bitbake bmap-tools-native
8477 </literallayout>
8478 </para></listitem>
8479 </itemizedlist>
8480 </note>
8481 </para>
8482
8483 <para>
8484 Following, is an example that shows how to flash a Wic image.
8485 Realize that while this example uses a Wic image, you can use
8486 Bmaptool to flash any type of image.
8487 Use these steps to flash an image using Bmaptool:
8488 <orderedlist>
8489 <listitem><para>
8490 <emphasis>Update your <filename>local.conf</filename> File:</emphasis>
8491 You need to have the following set in your
8492 <filename>local.conf</filename> file before building
8493 your image:
8494 <literallayout class='monospaced'>
8495 IMAGE_FSTYPES += "wic wic.bmap"
8496 </literallayout>
8497 </para></listitem>
8498 <listitem><para>
8499 <emphasis>Get Your Image:</emphasis>
8500 Either have your image ready (pre-built with the
8501 <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></ulink>
8502 setting previously mentioned) or take the step to build
8503 the image:
8504 <literallayout class='monospaced'>
8505 $ bitbake <replaceable>image</replaceable>
8506 </literallayout>
8507 </para></listitem>
8508 <listitem><para>
8509 <emphasis>Flash the Device:</emphasis>
8510 Flash the device with the image by using Bmaptool
8511 depending on your particular setup.
8512 The following commands assume the image resides in the
8513 Build Directory's <filename>deploy/images/</filename>
8514 area:
8515 <itemizedlist>
8516 <listitem><para>
8517 If you have write access to the media, use this
8518 command form:
8519 <literallayout class='monospaced'>
8520 $ oe-run-native bmap-tools-native bmaptool copy <replaceable>build-directory</replaceable>/tmp/deploy/images/<replaceable>machine</replaceable>/<replaceable>image</replaceable>.wic /dev/sd<replaceable>X</replaceable>
8521 </literallayout>
8522 </para></listitem>
8523 <listitem><para>
8524 If you do not have write access to the media, set
8525 your permissions first and then use the same
8526 command form:
8527 <literallayout class='monospaced'>
8528 $ sudo chmod 666 /dev/sd<replaceable>X</replaceable>
8529 $ oe-run-native bmap-tools-native bmaptool copy <replaceable>build-directory</replaceable>/tmp/deploy/images/<replaceable>machine</replaceable>/<replaceable>image</replaceable>.wic /dev/sd<replaceable>X</replaceable>
8530 </literallayout>
8531 </para></listitem>
8532 </itemizedlist>
8533 </para></listitem>
8534 </orderedlist>
8535 </para>
8536
8537 <para>
8538 For help on the <filename>bmaptool</filename> command, use the
8539 following command:
8540 <literallayout class='monospaced'>
8541 $ bmaptool --help
8542 </literallayout>
8543 </para>
8544 </section>
8545
8546 <section id='making-images-more-secure'>
8547 <title>Making Images More Secure</title>
8548
8549 <para>
8550 Security is of increasing concern for embedded devices.
8551 Consider the issues and problems discussed in just this
8552 sampling of work found across the Internet:
8553 <itemizedlist>
8554 <listitem><para><emphasis>
8555 "<ulink url='https://www.schneier.com/blog/archives/2014/01/security_risks_9.html'>Security Risks of Embedded Systems</ulink>"</emphasis>
8556 by Bruce Schneier
8557 </para></listitem>
8558 <listitem><para><emphasis>
8559 "<ulink url='http://census2012.sourceforge.net/paper.html'>Internet Census 2012</ulink>"</emphasis>
8560 by Carna Botnet</para></listitem>
8561 <listitem><para><emphasis>
8562 "<ulink url='http://elinux.org/images/6/6f/Security-issues.pdf'>Security Issues for Embedded Devices</ulink>"</emphasis>
8563 by Jake Edge
8564 </para></listitem>
8565 </itemizedlist>
8566 </para>
8567
8568 <para>
8569 When securing your image is of concern, there are steps, tools,
8570 and variables that you can consider to help you reach the
8571 security goals you need for your particular device.
8572 Not all situations are identical when it comes to making an
8573 image secure.
8574 Consequently, this section provides some guidance and suggestions
8575 for consideration when you want to make your image more secure.
8576 <note>
8577 Because the security requirements and risks are
8578 different for every type of device, this section cannot
8579 provide a complete reference on securing your custom OS.
8580 It is strongly recommended that you also consult other sources
8581 of information on embedded Linux system hardening and on
8582 security.
8583 </note>
8584 </para>
8585
8586 <section id='general-considerations'>
8587 <title>General Considerations</title>
8588
8589 <para>
8590 General considerations exist that help you create more
8591 secure images.
8592 You should consider the following suggestions to help
8593 make your device more secure:
8594 <itemizedlist>
8595 <listitem><para>
8596 Scan additional code you are adding to the system
8597 (e.g. application code) by using static analysis
8598 tools.
8599 Look for buffer overflows and other potential
8600 security problems.
8601 </para></listitem>
8602 <listitem><para>
8603 Pay particular attention to the security for
8604 any web-based administration interface.
8605 </para>
8606 <para>Web interfaces typically need to perform
8607 administrative functions and tend to need to run with
8608 elevated privileges.
8609 Thus, the consequences resulting from the interface's
8610 security becoming compromised can be serious.
8611 Look for common web vulnerabilities such as
8612 cross-site-scripting (XSS), unvalidated inputs,
8613 and so forth.</para>
8614 <para>As with system passwords, the default credentials
8615 for accessing a web-based interface should not be the
8616 same across all devices.
8617 This is particularly true if the interface is enabled
8618 by default as it can be assumed that many end-users
8619 will not change the credentials.
8620 </para></listitem>
8621 <listitem><para>
8622 Ensure you can update the software on the device to
8623 mitigate vulnerabilities discovered in the future.
8624 This consideration especially applies when your
8625 device is network-enabled.
8626 </para></listitem>
8627 <listitem><para>
8628 Ensure you remove or disable debugging functionality
8629 before producing the final image.
8630 For information on how to do this, see the
8631 "<link linkend='considerations-specific-to-the-openembedded-build-system'>Considerations Specific to the OpenEmbedded Build System</link>"
8632 section.
8633 </para></listitem>
8634 <listitem><para>
8635 Ensure you have no network services listening that
8636 are not needed.
8637 </para></listitem>
8638 <listitem><para>
8639 Remove any software from the image that is not needed.
8640 </para></listitem>
8641 <listitem><para>
8642 Enable hardware support for secure boot functionality
8643 when your device supports this functionality.
8644 </para></listitem>
8645 </itemizedlist>
8646 </para>
8647 </section>
8648
8649 <section id='security-flags'>
8650 <title>Security Flags</title>
8651
8652 <para>
8653 The Yocto Project has security flags that you can enable that
8654 help make your build output more secure.
8655 The security flags are in the
8656 <filename>meta/conf/distro/include/security_flags.inc</filename>
8657 file in your
8658 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
8659 (e.g. <filename>poky</filename>).
8660 <note>
8661 Depending on the recipe, certain security flags are enabled
8662 and disabled by default.
8663 </note>
8664 </para>
8665
8666 <para>
8667<!--
8668 The GCC/LD flags in <filename>security_flags.inc</filename>
8669 enable more secure code generation.
8670 By including the <filename>security_flags.inc</filename>
8671 file, you enable flags to the compiler and linker that cause
8672 them to generate more secure code.
8673 <note>
8674 The GCC/LD flags are enabled by default in the
8675 <filename>poky-lsb</filename> distribution.
8676 </note>
8677-->
8678 Use the following line in your
8679 <filename>local.conf</filename> file or in your custom
8680 distribution configuration file to enable the security
8681 compiler and linker flags for your build:
8682 <literallayout class='monospaced'>
8683 require conf/distro/include/security_flags.inc
8684 </literallayout>
8685 </para>
8686 </section>
8687
8688 <section id='considerations-specific-to-the-openembedded-build-system'>
8689 <title>Considerations Specific to the OpenEmbedded Build System</title>
8690
8691 <para>
8692 You can take some steps that are specific to the
8693 OpenEmbedded build system to make your images more secure:
8694 <itemizedlist>
8695 <listitem><para>
8696 Ensure "debug-tweaks" is not one of your selected
8697 <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></ulink>.
8698 When creating a new project, the default is to provide you
8699 with an initial <filename>local.conf</filename> file that
8700 enables this feature using the
8701 <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_IMAGE_FEATURES'><filename>EXTRA_IMAGE_FEATURES</filename></ulink> variable with the line:
8702 <literallayout class='monospaced'>
8703 EXTRA_IMAGE_FEATURES = "debug-tweaks"
8704 </literallayout>
8705 To disable that feature, simply comment out that line in your
8706 <filename>local.conf</filename> file, or
8707 make sure <filename>IMAGE_FEATURES</filename> does not contain
8708 "debug-tweaks" before producing your final image.
8709 Among other things, leaving this in place sets the
8710 root password as blank, which makes logging in for
8711 debugging or inspection easy during
8712 development but also means anyone can easily log in
8713 during production.
8714 </para></listitem>
8715 <listitem><para>
8716 It is possible to set a root password for the image
8717 and also to set passwords for any extra users you might
8718 add (e.g. administrative or service type users).
8719 When you set up passwords for multiple images or
8720 users, you should not duplicate passwords.
8721 </para>
8722 <para>
8723 To set up passwords, use the
8724 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-extrausers'><filename>extrausers</filename></ulink>
8725 class, which is the preferred method.
8726 For an example on how to set up both root and user
8727 passwords, see the
8728 "<ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-extrausers'><filename>extrausers.bbclass</filename></ulink>"
8729 section.
8730 <note>
8731 When adding extra user accounts or setting a
8732 root password, be cautious about setting the
8733 same password on every device.
8734 If you do this, and the password you have set
8735 is exposed, then every device is now potentially
8736 compromised.
8737 If you need this access but want to ensure
8738 security, consider setting a different,
8739 random password for each device.
8740 Typically, you do this as a separate step after
8741 you deploy the image onto the device.
8742 </note>
8743 </para></listitem>
8744 <listitem><para>
8745 Consider enabling a Mandatory Access Control (MAC)
8746 framework such as SMACK or SELinux and tuning it
8747 appropriately for your device's usage.
8748 You can find more information in the
8749 <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/meta-selinux/'><filename>meta-selinux</filename></ulink>
8750 layer.
8751 </para></listitem>
8752 </itemizedlist>
8753 </para>
8754
8755 <para>
8756 </para>
8757 </section>
8758
8759 <section id='tools-for-hardening-your-image'>
8760 <title>Tools for Hardening Your Image</title>
8761
8762 <para>
8763 The Yocto Project provides tools for making your image
8764 more secure.
8765 You can find these tools in the
8766 <filename>meta-security</filename> layer of the
8767 <ulink url='&YOCTO_GIT_URL;'>Yocto Project Source Repositories</ulink>.
8768 </para>
8769 </section>
8770 </section>
8771
8772 <section id='creating-your-own-distribution'>
8773 <title>Creating Your Own Distribution</title>
8774
8775 <para>
8776 When you build an image using the Yocto Project and
8777 do not alter any distribution
8778 <ulink url='&YOCTO_DOCS_REF_URL;#metadata'>Metadata</ulink>,
8779 you are creating a Poky distribution.
8780 If you wish to gain more control over package alternative
8781 selections, compile-time options, and other low-level
8782 configurations, you can create your own distribution.
8783 </para>
8784
8785 <para>
8786 To create your own distribution, the basic steps consist of
8787 creating your own distribution layer, creating your own
8788 distribution configuration file, and then adding any needed
8789 code and Metadata to the layer.
8790 The following steps provide some more detail:
8791 <itemizedlist>
8792 <listitem><para><emphasis>Create a layer for your new distro:</emphasis>
8793 Create your distribution layer so that you can keep your
8794 Metadata and code for the distribution separate.
8795 It is strongly recommended that you create and use your own
8796 layer for configuration and code.
8797 Using your own layer as compared to just placing
8798 configurations in a <filename>local.conf</filename>
8799 configuration file makes it easier to reproduce the same
8800 build configuration when using multiple build machines.
8801 See the
8802 "<link linkend='creating-a-general-layer-using-the-bitbake-layers-script'>Creating a General Layer Using the <filename>bitbake-layers</filename> Script</link>"
8803 section for information on how to quickly set up a layer.
8804 </para></listitem>
8805 <listitem><para><emphasis>Create the distribution configuration file:</emphasis>
8806 The distribution configuration file needs to be created in
8807 the <filename>conf/distro</filename> directory of your
8808 layer.
8809 You need to name it using your distribution name
8810 (e.g. <filename>mydistro.conf</filename>).
8811 <note>
8812 The
8813 <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO'><filename>DISTRO</filename></ulink>
8814 variable in your
8815 <filename>local.conf</filename> file determines the
8816 name of your distribution.
8817 </note></para>
8818 <para>You can split out parts of your configuration file
8819 into include files and then "require" them from within
8820 your distribution configuration file.
8821 Be sure to place the include files in the
8822 <filename>conf/distro/include</filename> directory of
8823 your layer.
8824 A common example usage of include files would be to
8825 separate out the selection of desired version and revisions
8826 for individual recipes.
8827</para>
8828 <para>Your configuration file needs to set the following
8829 required variables:
8830 <literallayout class='monospaced'>
8831 <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO_NAME'><filename>DISTRO_NAME</filename></ulink>
8832 <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO_VERSION'><filename>DISTRO_VERSION</filename></ulink>
8833 </literallayout>
8834 These following variables are optional and you typically
8835 set them from the distribution configuration file:
8836 <literallayout class='monospaced'>
8837 <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></ulink>
8838 <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO_EXTRA_RDEPENDS'><filename>DISTRO_EXTRA_RDEPENDS</filename></ulink>
8839 <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO_EXTRA_RRECOMMENDS'><filename>DISTRO_EXTRA_RRECOMMENDS</filename></ulink>
8840 <ulink url='&YOCTO_DOCS_REF_URL;#var-TCLIBC'><filename>TCLIBC</filename></ulink>
8841 </literallayout>
8842 <tip>
8843 If you want to base your distribution configuration file
8844 on the very basic configuration from OE-Core, you
8845 can use
8846 <filename>conf/distro/defaultsetup.conf</filename> as
8847 a reference and just include variables that differ
8848 as compared to <filename>defaultsetup.conf</filename>.
8849 Alternatively, you can create a distribution
8850 configuration file from scratch using the
8851 <filename>defaultsetup.conf</filename> file
8852 or configuration files from other distributions
8853 such as Poky or Angstrom as references.
8854 </tip></para></listitem>
8855 <listitem><para><emphasis>Provide miscellaneous variables:</emphasis>
8856 Be sure to define any other variables for which you want to
8857 create a default or enforce as part of the distribution
8858 configuration.
8859 You can include nearly any variable from the
8860 <filename>local.conf</filename> file.
8861 The variables you use are not limited to the list in the
8862 previous bulleted item.</para></listitem>
8863 <listitem><para><emphasis>Point to Your distribution configuration file:</emphasis>
8864 In your <filename>local.conf</filename> file in the
8865 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>,
8866 set your
8867 <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO'><filename>DISTRO</filename></ulink>
8868 variable to point to your distribution's configuration file.
8869 For example, if your distribution's configuration file is
8870 named <filename>mydistro.conf</filename>, then you point
8871 to it as follows:
8872 <literallayout class='monospaced'>
8873 DISTRO = "mydistro"
8874 </literallayout></para></listitem>
8875 <listitem><para><emphasis>Add more to the layer if necessary:</emphasis>
8876 Use your layer to hold other information needed for the
8877 distribution:
8878 <itemizedlist>
8879 <listitem><para>Add recipes for installing
8880 distro-specific configuration files that are not
8881 already installed by another recipe.
8882 If you have distro-specific configuration files
8883 that are included by an existing recipe, you should
8884 add an append file (<filename>.bbappend</filename>)
8885 for those.
8886 For general information and recommendations
8887 on how to add recipes to your layer, see the
8888 "<link linkend='creating-your-own-layer'>Creating Your Own Layer</link>"
8889 and
8890 "<link linkend='best-practices-to-follow-when-creating-layers'>Following Best Practices When Creating Layers</link>"
8891 sections.</para></listitem>
8892 <listitem><para>Add any image recipes that are specific
8893 to your distribution.</para></listitem>
8894 <listitem><para>Add a <filename>psplash</filename>
8895 append file for a branded splash screen.
8896 For information on append files, see the
8897 "<link linkend='using-bbappend-files'>Using .bbappend Files in Your Layer</link>"
8898 section.</para></listitem>
8899 <listitem><para>Add any other append files to make
8900 custom changes that are specific to individual
8901 recipes.</para></listitem>
8902 </itemizedlist></para></listitem>
8903 </itemizedlist>
8904 </para>
8905 </section>
8906
8907 <section id='creating-a-custom-template-configuration-directory'>
8908 <title>Creating a Custom Template Configuration Directory</title>
8909
8910 <para>
8911 If you are producing your own customized version
8912 of the build system for use by other users, you might
8913 want to customize the message shown by the setup script or
8914 you might want to change the template configuration files (i.e.
8915 <filename>local.conf</filename> and
8916 <filename>bblayers.conf</filename>) that are created in
8917 a new build directory.
8918 </para>
8919
8920 <para>
8921 The OpenEmbedded build system uses the environment variable
8922 <filename>TEMPLATECONF</filename> to locate the directory
8923 from which it gathers configuration information that ultimately
8924 ends up in the
8925 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
8926 <filename>conf</filename> directory.
8927 By default, <filename>TEMPLATECONF</filename> is set as
8928 follows in the <filename>poky</filename> repository:
8929 <literallayout class='monospaced'>
8930 TEMPLATECONF=${TEMPLATECONF:-meta-poky/conf}
8931 </literallayout>
8932 This is the directory used by the build system to find templates
8933 from which to build some key configuration files.
8934 If you look at this directory, you will see the
8935 <filename>bblayers.conf.sample</filename>,
8936 <filename>local.conf.sample</filename>, and
8937 <filename>conf-notes.txt</filename> files.
8938 The build system uses these files to form the respective
8939 <filename>bblayers.conf</filename> file,
8940 <filename>local.conf</filename> file, and display the list of
8941 BitBake targets when running the setup script.
8942 </para>
8943
8944 <para>
8945 To override these default configuration files with
8946 configurations you want used within every new
8947 Build Directory, simply set the
8948 <filename>TEMPLATECONF</filename> variable to your directory.
8949 The <filename>TEMPLATECONF</filename> variable is set in the
8950 <filename>.templateconf</filename> file, which is in the
8951 top-level
8952 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
8953 folder (e.g. <filename>poky</filename>).
8954 Edit the <filename>.templateconf</filename> so that it can locate
8955 your directory.
8956 </para>
8957
8958 <para>
8959 Best practices dictate that you should keep your
8960 template configuration directory in your custom distribution layer.
8961 For example, suppose you have a layer named
8962 <filename>meta-mylayer</filename> located in your home directory
8963 and you want your template configuration directory named
8964 <filename>myconf</filename>.
8965 Changing the <filename>.templateconf</filename> as follows
8966 causes the OpenEmbedded build system to look in your directory
8967 and base its configuration files on the
8968 <filename>*.sample</filename> configuration files it finds.
8969 The final configuration files (i.e.
8970 <filename>local.conf</filename> and
8971 <filename>bblayers.conf</filename> ultimately still end up in
8972 your Build Directory, but they are based on your
8973 <filename>*.sample</filename> files.
8974 <literallayout class='monospaced'>
8975 TEMPLATECONF=${TEMPLATECONF:-meta-mylayer/myconf}
8976 </literallayout>
8977 </para>
8978
8979 <para>
8980 Aside from the <filename>*.sample</filename> configuration files,
8981 the <filename>conf-notes.txt</filename> also resides in the
8982 default <filename>meta-poky/conf</filename> directory.
8983 The script that sets up the build environment
8984 (i.e.
8985 <ulink url="&YOCTO_DOCS_REF_URL;#structure-core-script"><filename>&OE_INIT_FILE;</filename></ulink>)
8986 uses this file to display BitBake targets as part of the script
8987 output.
8988 Customizing this <filename>conf-notes.txt</filename> file is a
8989 good way to make sure your list of custom targets appears
8990 as part of the script's output.
8991 </para>
8992
8993 <para>
8994 Here is the default list of targets displayed as a result of
8995 running either of the setup scripts:
8996 <literallayout class='monospaced'>
8997 You can now run 'bitbake &lt;target&gt;'
8998
8999 Common targets are:
9000 core-image-minimal
9001 core-image-sato
9002 meta-toolchain
9003 meta-ide-support
9004 </literallayout>
9005 </para>
9006
9007 <para>
9008 Changing the listed common targets is as easy as editing your
9009 version of <filename>conf-notes.txt</filename> in your
9010 custom template configuration directory and making sure you
9011 have <filename>TEMPLATECONF</filename> set to your directory.
9012 </para>
9013 </section>
9014
9015 <section id='dev-saving-memory-during-a-build'>
9016 <title>Conserving Disk Space During Builds</title>
9017
9018 <para>
9019 To help conserve disk space during builds, you can add the
9020 following statement to your project's
9021 <filename>local.conf</filename> configuration file found in the
9022 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>:
9023 <literallayout class='monospaced'>
9024 INHERIT += "rm_work"
9025 </literallayout>
9026 Adding this statement deletes the work directory used for building
9027 a recipe once the recipe is built.
9028 For more information on "rm_work", see the
9029 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-rm-work'><filename>rm_work</filename></ulink>
9030 class in the Yocto Project Reference Manual.
9031 </para>
9032 </section>
9033
9034 <section id='working-with-packages'>
9035 <title>Working with Packages</title>
9036
9037 <para>
9038 This section describes a few tasks that involve packages:
9039 <itemizedlist>
9040 <listitem><para>
9041 <link linkend='excluding-packages-from-an-image'>Excluding packages from an image</link>
9042 </para></listitem>
9043 <listitem><para>
9044 <link linkend='incrementing-a-binary-package-version'>Incrementing a binary package version</link>
9045 </para></listitem>
9046 <listitem><para>
9047 <link linkend='handling-optional-module-packaging'>Handling optional module packaging</link>
9048 </para></listitem>
9049 <listitem><para>
9050 <link linkend='using-runtime-package-management'>Using runtime package management</link>
9051 </para></listitem>
9052 <listitem><para>
9053 <link linkend='generating-and-using-signed-packages'>Generating and using signed packages</link>
9054 </para></listitem>
9055 <listitem><para>
9056 <link linkend='testing-packages-with-ptest'>Setting up and running package test (ptest)</link>
9057 </para></listitem>
9058 <listitem><para>
9059 <link linkend='creating-node-package-manager-npm-packages'>Creating node package manager (NPM) packages</link>
9060 </para></listitem>
9061 <listitem><para>
9062 <link linkend='adding-custom-metadata-to-packages'>Adding custom metadata to packages</link>
9063 </para></listitem>
9064 </itemizedlist>
9065 </para>
9066
9067 <section id='excluding-packages-from-an-image'>
9068 <title>Excluding Packages from an Image</title>
9069
9070 <para>
9071 You might find it necessary to prevent specific packages
9072 from being installed into an image.
9073 If so, you can use several variables to direct the build
9074 system to essentially ignore installing recommended packages
9075 or to not install a package at all.
9076 </para>
9077
9078 <para>
9079 The following list introduces variables you can use to
9080 prevent packages from being installed into your image.
9081 Each of these variables only works with IPK and RPM
9082 package types.
9083 Support for Debian packages does not exist.
9084 Also, you can use these variables from your
9085 <filename>local.conf</filename> file or attach them to a
9086 specific image recipe by using a recipe name override.
9087 For more detail on the variables, see the descriptions in the
9088 Yocto Project Reference Manual's glossary chapter.
9089 <itemizedlist>
9090 <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-BAD_RECOMMENDATIONS'><filename>BAD_RECOMMENDATIONS</filename></ulink>:
9091 Use this variable to specify "recommended-only"
9092 packages that you do not want installed.
9093 </para></listitem>
9094 <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-NO_RECOMMENDATIONS'><filename>NO_RECOMMENDATIONS</filename></ulink>:
9095 Use this variable to prevent all "recommended-only"
9096 packages from being installed.
9097 </para></listitem>
9098 <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_EXCLUDE'><filename>PACKAGE_EXCLUDE</filename></ulink>:
9099 Use this variable to prevent specific packages from
9100 being installed regardless of whether they are
9101 "recommended-only" or not.
9102 You need to realize that the build process could
9103 fail with an error when you
9104 prevent the installation of a package whose presence
9105 is required by an installed package.
9106 </para></listitem>
9107 </itemizedlist>
9108 </para>
9109 </section>
9110
9111 <section id='incrementing-a-binary-package-version'>
9112 <title>Incrementing a Package Version</title>
9113
9114 <para>
9115 This section provides some background on how binary package
9116 versioning is accomplished and presents some of the services,
9117 variables, and terminology involved.
9118 </para>
9119
9120 <para>
9121 In order to understand binary package versioning, you need
9122 to consider the following:
9123 <itemizedlist>
9124 <listitem><para>
9125 Binary Package: The binary package that is eventually
9126 built and installed into an image.
9127 </para></listitem>
9128 <listitem><para>
9129 Binary Package Version: The binary package version
9130 is composed of two components - a version and a
9131 revision.
9132 <note>
9133 Technically, a third component, the "epoch" (i.e.
9134 <ulink url='&YOCTO_DOCS_REF_URL;#var-PE'><filename>PE</filename></ulink>)
9135 is involved but this discussion for the most part
9136 ignores <filename>PE</filename>.
9137 </note>
9138 The version and revision are taken from the
9139 <ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>
9140 and
9141 <ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink>
9142 variables, respectively.
9143 </para></listitem>
9144 <listitem><para>
9145 <filename>PV</filename>: The recipe version.
9146 <filename>PV</filename> represents the version of the
9147 software being packaged.
9148 Do not confuse <filename>PV</filename> with the
9149 binary package version.
9150 </para></listitem>
9151 <listitem><para>
9152 <filename>PR</filename>: The recipe revision.
9153 </para></listitem>
9154 <listitem><para>
9155 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRCPV'><filename>SRCPV</filename></ulink>:
9156 The OpenEmbedded build system uses this string
9157 to help define the value of <filename>PV</filename>
9158 when the source code revision needs to be included
9159 in it.
9160 </para></listitem>
9161 <listitem><para>
9162 <ulink url='https://wiki.yoctoproject.org/wiki/PR_Service'>PR Service</ulink>:
9163 A network-based service that helps automate keeping
9164 package feeds compatible with existing package
9165 manager applications such as RPM, APT, and OPKG.
9166 </para></listitem>
9167 </itemizedlist>
9168 </para>
9169
9170 <para>
9171 Whenever the binary package content changes, the binary package
9172 version must change.
9173 Changing the binary package version is accomplished by changing
9174 or "bumping" the <filename>PR</filename> and/or
9175 <filename>PV</filename> values.
9176 Increasing these values occurs one of two ways:
9177 <itemizedlist>
9178 <listitem><para>Automatically using a Package Revision
9179 Service (PR Service).
9180 </para></listitem>
9181 <listitem><para>Manually incrementing the
9182 <filename>PR</filename> and/or
9183 <filename>PV</filename> variables.
9184 </para></listitem>
9185 </itemizedlist>
9186 </para>
9187
9188 <para>
9189 Given a primary challenge of any build system and its users
9190 is how to maintain a package feed that is compatible with
9191 existing package manager applications such as RPM, APT, and
9192 OPKG, using an automated system is much preferred over a
9193 manual system.
9194 In either system, the main requirement is that binary package
9195 version numbering increases in a linear fashion and that a
9196 number of version components exist that support that linear
9197 progression.
9198 For information on how to ensure package revisioning remains
9199 linear, see the
9200 "<link linkend='automatically-incrementing-a-binary-package-revision-number'>Automatically Incrementing a Binary Package Revision Number</link>"
9201 section.
9202 </para>
9203
9204 <para>
9205 The following three sections provide related information on the
9206 PR Service, the manual method for "bumping"
9207 <filename>PR</filename> and/or <filename>PV</filename>, and
9208 on how to ensure binary package revisioning remains linear.
9209 </para>
9210
9211 <section id='working-with-a-pr-service'>
9212 <title>Working With a PR Service</title>
9213
9214 <para>
9215 As mentioned, attempting to maintain revision numbers in the
9216 <ulink url='&YOCTO_DOCS_REF_URL;#metadata'>Metadata</ulink>
9217 is error prone, inaccurate, and causes problems for people
9218 submitting recipes.
9219 Conversely, the PR Service automatically generates
9220 increasing numbers, particularly the revision field,
9221 which removes the human element.
9222 <note>
9223 For additional information on using a PR Service, you
9224 can see the
9225 <ulink url='&YOCTO_WIKI_URL;/wiki/PR_Service'>PR Service</ulink>
9226 wiki page.
9227 </note>
9228 </para>
9229
9230 <para>
9231 The Yocto Project uses variables in order of
9232 decreasing priority to facilitate revision numbering (i.e.
9233 <ulink url='&YOCTO_DOCS_REF_URL;#var-PE'><filename>PE</filename></ulink>,
9234 <ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>, and
9235 <ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink>
9236 for epoch, version, and revision, respectively).
9237 The values are highly dependent on the policies and
9238 procedures of a given distribution and package feed.
9239 </para>
9240
9241 <para>
9242 Because the OpenEmbedded build system uses
9243 "<ulink url='&YOCTO_DOCS_OM_URL;#overview-checksums'>signatures</ulink>",
9244 which are unique to a given build, the build system
9245 knows when to rebuild packages.
9246 All the inputs into a given task are represented by a
9247 signature, which can trigger a rebuild when different.
9248 Thus, the build system itself does not rely on the
9249 <filename>PR</filename>, <filename>PV</filename>, and
9250 <filename>PE</filename> numbers to trigger a rebuild.
9251 The signatures, however, can be used to generate
9252 these values.
9253 </para>
9254
9255 <para>
9256 The PR Service works with both
9257 <filename>OEBasic</filename> and
9258 <filename>OEBasicHash</filename> generators.
9259 The value of <filename>PR</filename> bumps when the
9260 checksum changes and the different generator mechanisms
9261 change signatures under different circumstances.
9262 </para>
9263
9264 <para>
9265 As implemented, the build system includes values from
9266 the PR Service into the <filename>PR</filename> field as
9267 an addition using the form "<filename>.x</filename>" so
9268 <filename>r0</filename> becomes <filename>r0.1</filename>,
9269 <filename>r0.2</filename> and so forth.
9270 This scheme allows existing <filename>PR</filename> values
9271 to be used for whatever reasons, which include manual
9272 <filename>PR</filename> bumps, should it be necessary.
9273 </para>
9274
9275 <para>
9276 By default, the PR Service is not enabled or running.
9277 Thus, the packages generated are just "self consistent".
9278 The build system adds and removes packages and
9279 there are no guarantees about upgrade paths but images
9280 will be consistent and correct with the latest changes.
9281 </para>
9282
9283 <para>
9284 The simplest form for a PR Service is for it to exist
9285 for a single host development system that builds the
9286 package feed (building system).
9287 For this scenario, you can enable a local PR Service by
9288 setting
9289 <ulink url='&YOCTO_DOCS_REF_URL;#var-PRSERV_HOST'><filename>PRSERV_HOST</filename></ulink>
9290 in your <filename>local.conf</filename> file in the
9291 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>:
9292 <literallayout class='monospaced'>
9293 PRSERV_HOST = "localhost:0"
9294 </literallayout>
9295 Once the service is started, packages will automatically
9296 get increasing <filename>PR</filename> values and
9297 BitBake takes care of starting and stopping the server.
9298 </para>
9299
9300 <para>
9301 If you have a more complex setup where multiple host
9302 development systems work against a common, shared package
9303 feed, you have a single PR Service running and it is
9304 connected to each building system.
9305 For this scenario, you need to start the PR Service using
9306 the <filename>bitbake-prserv</filename> command:
9307 <literallayout class='monospaced'>
9308 bitbake-prserv --host <replaceable>ip</replaceable> --port <replaceable>port</replaceable> --start
9309 </literallayout>
9310 In addition to hand-starting the service, you need to
9311 update the <filename>local.conf</filename> file of each
9312 building system as described earlier so each system
9313 points to the server and port.
9314 </para>
9315
9316 <para>
9317 It is also recommended you use build history, which adds
9318 some sanity checks to binary package versions, in
9319 conjunction with the server that is running the PR Service.
9320 To enable build history, add the following to each building
9321 system's <filename>local.conf</filename> file:
9322 <literallayout class='monospaced'>
9323 # It is recommended to activate "buildhistory" for testing the PR service
9324 INHERIT += "buildhistory"
9325 BUILDHISTORY_COMMIT = "1"
9326 </literallayout>
9327 For information on build history, see the
9328 "<link linkend='maintaining-build-output-quality'>Maintaining Build Output Quality</link>"
9329 section.
9330 </para>
9331
9332 <note>
9333 <para>
9334 The OpenEmbedded build system does not maintain
9335 <filename>PR</filename> information as part of the
9336 shared state (sstate) packages.
9337 If you maintain an sstate feed, its expected that either
9338 all your building systems that contribute to the sstate
9339 feed use a shared PR Service, or you do not run a PR
9340 Service on any of your building systems.
9341 Having some systems use a PR Service while others do
9342 not leads to obvious problems.
9343 </para>
9344
9345 <para>
9346 For more information on shared state, see the
9347 "<ulink url='&YOCTO_DOCS_OM_URL;#shared-state-cache'>Shared State Cache</ulink>"
9348 section in the Yocto Project Overview and Concepts
9349 Manual.
9350 </para>
9351 </note>
9352 </section>
9353
9354 <section id='manually-bumping-pr'>
9355 <title>Manually Bumping PR</title>
9356
9357 <para>
9358 The alternative to setting up a PR Service is to manually
9359 "bump" the
9360 <ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink>
9361 variable.
9362 </para>
9363
9364 <para>
9365 If a committed change results in changing the package
9366 output, then the value of the PR variable needs to be
9367 increased (or "bumped") as part of that commit.
9368 For new recipes you should add the <filename>PR</filename>
9369 variable and set its initial value equal to "r0", which is
9370 the default.
9371 Even though the default value is "r0", the practice of
9372 adding it to a new recipe makes it harder to forget to bump
9373 the variable when you make changes to the recipe in future.
9374 </para>
9375
9376 <para>
9377 If you are sharing a common <filename>.inc</filename> file
9378 with multiple recipes, you can also use the
9379 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-INC_PR'>INC_PR</ulink></filename>
9380 variable to ensure that the recipes sharing the
9381 <filename>.inc</filename> file are rebuilt when the
9382 <filename>.inc</filename> file itself is changed.
9383 The <filename>.inc</filename> file must set
9384 <filename>INC_PR</filename> (initially to "r0"), and all
9385 recipes referring to it should set <filename>PR</filename>
9386 to "${INC_PR}.0" initially, incrementing the last number
9387 when the recipe is changed.
9388 If the <filename>.inc</filename> file is changed then its
9389 <filename>INC_PR</filename> should be incremented.
9390 </para>
9391
9392 <para>
9393 When upgrading the version of a binary package, assuming the
9394 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PV'>PV</ulink></filename>
9395 changes, the <filename>PR</filename> variable should be
9396 reset to "r0" (or "${INC_PR}.0" if you are using
9397 <filename>INC_PR</filename>).
9398 </para>
9399
9400 <para>
9401 Usually, version increases occur only to binary packages.
9402 However, if for some reason <filename>PV</filename> changes
9403 but does not increase, you can increase the
9404 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PE'>PE</ulink></filename>
9405 variable (Package Epoch).
9406 The <filename>PE</filename> variable defaults to "0".
9407 </para>
9408
9409 <para>
9410 Binary package version numbering strives to follow the
9411 <ulink url='http://www.debian.org/doc/debian-policy/ch-controlfields.html'>
9412 Debian Version Field Policy Guidelines</ulink>.
9413 These guidelines define how versions are compared and what
9414 "increasing" a version means.
9415 </para>
9416 </section>
9417
9418 <section id='automatically-incrementing-a-binary-package-revision-number'>
9419 <title>Automatically Incrementing a Package Version Number</title>
9420
9421 <para>
9422 When fetching a repository, BitBake uses the
9423 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRCREV'><filename>SRCREV</filename></ulink>
9424 variable to determine the specific source code revision
9425 from which to build.
9426 You set the <filename>SRCREV</filename> variable to
9427 <ulink url='&YOCTO_DOCS_REF_URL;#var-AUTOREV'><filename>AUTOREV</filename></ulink>
9428 to cause the OpenEmbedded build system to automatically use the
9429 latest revision of the software:
9430 <literallayout class='monospaced'>
9431 SRCREV = "${AUTOREV}"
9432 </literallayout>
9433 </para>
9434
9435 <para>
9436 Furthermore, you need to reference <filename>SRCPV</filename>
9437 in <filename>PV</filename> in order to automatically update
9438 the version whenever the revision of the source code
9439 changes.
9440 Here is an example:
9441 <literallayout class='monospaced'>
9442 PV = "1.0+git${SRCPV}"
9443 </literallayout>
9444 The OpenEmbedded build system substitutes
9445 <filename>SRCPV</filename> with the following:
9446 <literallayout class='monospaced'>
9447 AUTOINC+<replaceable>source_code_revision</replaceable>
9448 </literallayout>
9449 The build system replaces the <filename>AUTOINC</filename> with
9450 a number.
9451 The number used depends on the state of the PR Service:
9452 <itemizedlist>
9453 <listitem><para>
9454 If PR Service is enabled, the build system increments
9455 the number, which is similar to the behavior of
9456 <ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink>.
9457 This behavior results in linearly increasing package
9458 versions, which is desirable.
9459 Here is an example:
9460 <literallayout class='monospaced'>
9461 hello-world-git_0.0+git0+b6558dd387-r0.0_armv7a-neon.ipk
9462 hello-world-git_0.0+git1+dd2f5c3565-r0.0_armv7a-neon.ipk
9463 </literallayout>
9464 </para></listitem>
9465 <listitem><para>
9466 If PR Service is not enabled, the build system
9467 replaces the <filename>AUTOINC</filename>
9468 placeholder with zero (i.e. "0").
9469 This results in changing the package version since
9470 the source revision is included.
9471 However, package versions are not increased linearly.
9472 Here is an example:
9473 <literallayout class='monospaced'>
9474 hello-world-git_0.0+git0+b6558dd387-r0.0_armv7a-neon.ipk
9475 hello-world-git_0.0+git0+dd2f5c3565-r0.0_armv7a-neon.ipk
9476 </literallayout>
9477 </para></listitem>
9478 </itemizedlist>
9479 </para>
9480
9481 <para>
9482 In summary, the OpenEmbedded build system does not track the
9483 history of binary package versions for this purpose.
9484 <filename>AUTOINC</filename>, in this case, is comparable to
9485 <filename>PR</filename>.
9486 If PR server is not enabled, <filename>AUTOINC</filename>
9487 in the package version is simply replaced by "0".
9488 If PR server is enabled, the build system keeps track of the
9489 package versions and bumps the number when the package
9490 revision changes.
9491 </para>
9492 </section>
9493 </section>
9494
9495 <section id='handling-optional-module-packaging'>
9496 <title>Handling Optional Module Packaging</title>
9497
9498 <para>
9499 Many pieces of software split functionality into optional
9500 modules (or plugins) and the plugins that are built
9501 might depend on configuration options.
9502 To avoid having to duplicate the logic that determines what
9503 modules are available in your recipe or to avoid having
9504 to package each module by hand, the OpenEmbedded build system
9505 provides functionality to handle module packaging dynamically.
9506 </para>
9507
9508 <para>
9509 To handle optional module packaging, you need to do two things:
9510 <itemizedlist>
9511 <listitem><para>Ensure the module packaging is actually
9512 done.</para></listitem>
9513 <listitem><para>Ensure that any dependencies on optional
9514 modules from other recipes are satisfied by your recipe.
9515 </para></listitem>
9516 </itemizedlist>
9517 </para>
9518
9519 <section id='making-sure-the-packaging-is-done'>
9520 <title>Making Sure the Packaging is Done</title>
9521
9522 <para>
9523 To ensure the module packaging actually gets done, you use
9524 the <filename>do_split_packages</filename> function within
9525 the <filename>populate_packages</filename> Python function
9526 in your recipe.
9527 The <filename>do_split_packages</filename> function
9528 searches for a pattern of files or directories under a
9529 specified path and creates a package for each one it finds
9530 by appending to the
9531 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGES'><filename>PACKAGES</filename></ulink>
9532 variable and setting the appropriate values for
9533 <filename>FILES_packagename</filename>,
9534 <filename>RDEPENDS_packagename</filename>,
9535 <filename>DESCRIPTION_packagename</filename>, and so forth.
9536 Here is an example from the <filename>lighttpd</filename>
9537 recipe:
9538 <literallayout class='monospaced'>
9539 python populate_packages_prepend () {
9540 lighttpd_libdir = d.expand('${libdir}')
9541 do_split_packages(d, lighttpd_libdir, '^mod_(.*)\.so$',
9542 'lighttpd-module-%s', 'Lighttpd module for %s',
9543 extra_depends='')
9544 }
9545 </literallayout>
9546 The previous example specifies a number of things in the
9547 call to <filename>do_split_packages</filename>.
9548 <itemizedlist>
9549 <listitem><para>A directory within the files installed
9550 by your recipe through <filename>do_install</filename>
9551 in which to search.</para></listitem>
9552 <listitem><para>A regular expression used to match module
9553 files in that directory.
9554 In the example, note the parentheses () that mark
9555 the part of the expression from which the module
9556 name should be derived.</para></listitem>
9557 <listitem><para>A pattern to use for the package names.
9558 </para></listitem>
9559 <listitem><para>A description for each package.
9560 </para></listitem>
9561 <listitem><para>An empty string for
9562 <filename>extra_depends</filename>, which disables
9563 the default dependency on the main
9564 <filename>lighttpd</filename> package.
9565 Thus, if a file in <filename>${libdir}</filename>
9566 called <filename>mod_alias.so</filename> is found,
9567 a package called <filename>lighttpd-module-alias</filename>
9568 is created for it and the
9569 <ulink url='&YOCTO_DOCS_REF_URL;#var-DESCRIPTION'><filename>DESCRIPTION</filename></ulink>
9570 is set to "Lighttpd module for alias".</para></listitem>
9571 </itemizedlist>
9572 </para>
9573
9574 <para>
9575 Often, packaging modules is as simple as the previous
9576 example.
9577 However, more advanced options exist that you can use
9578 within <filename>do_split_packages</filename> to modify its
9579 behavior.
9580 And, if you need to, you can add more logic by specifying
9581 a hook function that is called for each package.
9582 It is also perfectly acceptable to call
9583 <filename>do_split_packages</filename> multiple times if
9584 you have more than one set of modules to package.
9585 </para>
9586
9587 <para>
9588 For more examples that show how to use
9589 <filename>do_split_packages</filename>, see the
9590 <filename>connman.inc</filename> file in the
9591 <filename>meta/recipes-connectivity/connman/</filename>
9592 directory of the <filename>poky</filename>
9593 <ulink url='&YOCTO_DOCS_OM_URL;#yocto-project-repositories'>source repository</ulink>.
9594 You can also find examples in
9595 <filename>meta/classes/kernel.bbclass</filename>.
9596 </para>
9597
9598 <para>
9599 Following is a reference that shows
9600 <filename>do_split_packages</filename> mandatory and
9601 optional arguments:
9602 <literallayout class='monospaced'>
9603 Mandatory arguments
9604
9605 root
9606 The path in which to search
9607 file_regex
9608 Regular expression to match searched files.
9609 Use parentheses () to mark the part of this
9610 expression that should be used to derive the
9611 module name (to be substituted where %s is
9612 used in other function arguments as noted below)
9613 output_pattern
9614 Pattern to use for the package names. Must
9615 include %s.
9616 description
9617 Description to set for each package. Must
9618 include %s.
9619
9620 Optional arguments
9621
9622 postinst
9623 Postinstall script to use for all packages
9624 (as a string)
9625 recursive
9626 True to perform a recursive search - default
9627 False
9628 hook
9629 A hook function to be called for every match.
9630 The function will be called with the following
9631 arguments (in the order listed):
9632
9633 f
9634 Full path to the file/directory match
9635 pkg
9636 The package name
9637 file_regex
9638 As above
9639 output_pattern
9640 As above
9641 modulename
9642 The module name derived using file_regex
9643
9644 extra_depends
9645 Extra runtime dependencies (RDEPENDS) to be
9646 set for all packages. The default value of None
9647 causes a dependency on the main package
9648 (${PN}) - if you do not want this, pass empty
9649 string '' for this parameter.
9650 aux_files_pattern
9651 Extra item(s) to be added to FILES for each
9652 package. Can be a single string item or a list
9653 of strings for multiple items. Must include %s.
9654 postrm
9655 postrm script to use for all packages (as a
9656 string)
9657 allow_dirs
9658 True to allow directories to be matched -
9659 default False
9660 prepend
9661 If True, prepend created packages to PACKAGES
9662 instead of the default False which appends them
9663 match_path
9664 match file_regex on the whole relative path to
9665 the root rather than just the file name
9666 aux_files_pattern_verbatim
9667 Extra item(s) to be added to FILES for each
9668 package, using the actual derived module name
9669 rather than converting it to something legal
9670 for a package name. Can be a single string item
9671 or a list of strings for multiple items. Must
9672 include %s.
9673 allow_links
9674 True to allow symlinks to be matched - default
9675 False
9676 summary
9677 Summary to set for each package. Must include %s;
9678 defaults to description if not set.
9679 </literallayout>
9680 </para>
9681 </section>
9682
9683 <section id='satisfying-dependencies'>
9684 <title>Satisfying Dependencies</title>
9685
9686 <para>
9687 The second part for handling optional module packaging
9688 is to ensure that any dependencies on optional modules
9689 from other recipes are satisfied by your recipe.
9690 You can be sure these dependencies are satisfied by
9691 using the
9692 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGES_DYNAMIC'><filename>PACKAGES_DYNAMIC</filename></ulink> variable.
9693 Here is an example that continues with the
9694 <filename>lighttpd</filename> recipe shown earlier:
9695 <literallayout class='monospaced'>
9696 PACKAGES_DYNAMIC = "lighttpd-module-.*"
9697 </literallayout>
9698 The name specified in the regular expression can of
9699 course be anything.
9700 In this example, it is <filename>lighttpd-module-</filename>
9701 and is specified as the prefix to ensure that any
9702 <ulink url='&YOCTO_DOCS_REF_URL;#var-RDEPENDS'><filename>RDEPENDS</filename></ulink>
9703 and <ulink url='&YOCTO_DOCS_REF_URL;#var-RRECOMMENDS'><filename>RRECOMMENDS</filename></ulink>
9704 on a package name starting with the prefix are satisfied
9705 during build time.
9706 If you are using <filename>do_split_packages</filename>
9707 as described in the previous section, the value you put in
9708 <filename>PACKAGES_DYNAMIC</filename> should correspond to
9709 the name pattern specified in the call to
9710 <filename>do_split_packages</filename>.
9711 </para>
9712 </section>
9713 </section>
9714
9715 <section id='using-runtime-package-management'>
9716 <title>Using Runtime Package Management</title>
9717
9718 <para>
9719 During a build, BitBake always transforms a recipe into one or
9720 more packages.
9721 For example, BitBake takes the <filename>bash</filename> recipe
9722 and produces a number of packages (e.g.
9723 <filename>bash</filename>, <filename>bash-bashbug</filename>,
9724 <filename>bash-completion</filename>,
9725 <filename>bash-completion-dbg</filename>,
9726 <filename>bash-completion-dev</filename>,
9727 <filename>bash-completion-extra</filename>,
9728 <filename>bash-dbg</filename>, and so forth).
9729 Not all generated packages are included in an image.
9730 </para>
9731
9732 <para>
9733 In several situations, you might need to update, add, remove,
9734 or query the packages on a target device at runtime
9735 (i.e. without having to generate a new image).
9736 Examples of such situations include:
9737 <itemizedlist>
9738 <listitem><para>
9739 You want to provide in-the-field updates to deployed
9740 devices (e.g. security updates).
9741 </para></listitem>
9742 <listitem><para>
9743 You want to have a fast turn-around development cycle
9744 for one or more applications that run on your device.
9745 </para></listitem>
9746 <listitem><para>
9747 You want to temporarily install the "debug" packages
9748 of various applications on your device so that
9749 debugging can be greatly improved by allowing
9750 access to symbols and source debugging.
9751 </para></listitem>
9752 <listitem><para>
9753 You want to deploy a more minimal package selection of
9754 your device but allow in-the-field updates to add a
9755 larger selection for customization.
9756 </para></listitem>
9757 </itemizedlist>
9758 </para>
9759
9760 <para>
9761 In all these situations, you have something similar to a more
9762 traditional Linux distribution in that in-field devices
9763 are able to receive pre-compiled packages from a server for
9764 installation or update.
9765 Being able to install these packages on a running,
9766 in-field device is what is termed "runtime package
9767 management".
9768 </para>
9769
9770 <para>
9771 In order to use runtime package management, you
9772 need a host or server machine that serves up the pre-compiled
9773 packages plus the required metadata.
9774 You also need package manipulation tools on the target.
9775 The build machine is a likely candidate to act as the server.
9776 However, that machine does not necessarily have to be the
9777 package server.
9778 The build machine could push its artifacts to another machine
9779 that acts as the server (e.g. Internet-facing).
9780 In fact, doing so is advantageous for a production
9781 environment as getting the packages away from the
9782 development system's build directory prevents accidental
9783 overwrites.
9784 </para>
9785
9786 <para>
9787 A simple build that targets just one device produces
9788 more than one package database.
9789 In other words, the packages produced by a build are separated
9790 out into a couple of different package groupings based on
9791 criteria such as the target's CPU architecture, the target
9792 board, or the C library used on the target.
9793 For example, a build targeting the <filename>qemux86</filename>
9794 device produces the following three package databases:
9795 <filename>noarch</filename>, <filename>i586</filename>, and
9796 <filename>qemux86</filename>.
9797 If you wanted your <filename>qemux86</filename> device to be
9798 aware of all the packages that were available to it,
9799 you would need to point it to each of these databases
9800 individually.
9801 In a similar way, a traditional Linux distribution usually is
9802 configured to be aware of a number of software repositories
9803 from which it retrieves packages.
9804 </para>
9805
9806 <para>
9807 Using runtime package management is completely optional and
9808 not required for a successful build or deployment in any
9809 way.
9810 But if you want to make use of runtime package management,
9811 you need to do a couple things above and beyond the basics.
9812 The remainder of this section describes what you need to do.
9813 </para>
9814
9815 <section id='runtime-package-management-build'>
9816 <title>Build Considerations</title>
9817
9818 <para>
9819 This section describes build considerations of which you
9820 need to be aware in order to provide support for runtime
9821 package management.
9822 </para>
9823
9824 <para>
9825 When BitBake generates packages, it needs to know
9826 what format or formats to use.
9827 In your configuration, you use the
9828 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></ulink>
9829 variable to specify the format:
9830 <orderedlist>
9831 <listitem><para>
9832 Open the <filename>local.conf</filename> file
9833 inside your
9834 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
9835 (e.g. <filename>~/poky/build/conf/local.conf</filename>).
9836 </para></listitem>
9837 <listitem><para>
9838 Select the desired package format as follows:
9839 <literallayout class='monospaced'>
9840 PACKAGE_CLASSES ?= "package_<replaceable>packageformat</replaceable>"
9841 </literallayout>
9842 where <replaceable>packageformat</replaceable>
9843 can be "ipk", "rpm", "deb", or "tar" which are the
9844 supported package formats.
9845 <note>
9846 Because the Yocto Project supports four
9847 different package formats, you can set the
9848 variable with more than one argument.
9849 However, the OpenEmbedded build system only
9850 uses the first argument when creating an image
9851 or Software Development Kit (SDK).
9852 </note>
9853 </para></listitem>
9854 </orderedlist>
9855 </para>
9856
9857 <para>
9858 If you would like your image to start off with a basic
9859 package database containing the packages in your current
9860 build as well as to have the relevant tools available on the
9861 target for runtime package management, you can include
9862 "package-management" in the
9863 <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></ulink>
9864 variable.
9865 Including "package-management" in this configuration
9866 variable ensures that when the image is assembled for your
9867 target, the image includes the currently-known package
9868 databases as well as the target-specific tools required
9869 for runtime package management to be performed on the
9870 target.
9871 However, this is not strictly necessary.
9872 You could start your image off without any databases
9873 but only include the required on-target package
9874 tool(s).
9875 As an example, you could include "opkg" in your
9876 <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></ulink>
9877 variable if you are using the IPK package format.
9878 You can then initialize your target's package database(s)
9879 later once your image is up and running.
9880 </para>
9881
9882 <para>
9883 Whenever you perform any sort of build step that can
9884 potentially generate a package or modify existing
9885 package, it is always a good idea to re-generate the
9886 package index after the build by using the following
9887 command:
9888 <literallayout class='monospaced'>
9889 $ bitbake package-index
9890 </literallayout>
9891 It might be tempting to build the package and the
9892 package index at the same time with a command such as
9893 the following:
9894 <literallayout class='monospaced'>
9895 $ bitbake <replaceable>some-package</replaceable> package-index
9896 </literallayout>
9897 Do not do this as BitBake does not schedule the package
9898 index for after the completion of the package you are
9899 building.
9900 Consequently, you cannot be sure of the package index
9901 including information for the package you just built.
9902 Thus, be sure to run the package update step separately
9903 after building any packages.
9904 </para>
9905
9906 <para>
9907 You can use the
9908 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_FEED_ARCHS'><filename>PACKAGE_FEED_ARCHS</filename></ulink>,
9909 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_FEED_BASE_PATHS'><filename>PACKAGE_FEED_BASE_PATHS</filename></ulink>,
9910 and
9911 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_FEED_URIS'><filename>PACKAGE_FEED_URIS</filename></ulink>
9912 variables to pre-configure target images to use a package
9913 feed.
9914 If you do not define these variables, then manual steps
9915 as described in the subsequent sections are necessary to
9916 configure the target.
9917 You should set these variables before building the image
9918 in order to produce a correctly configured image.
9919 </para>
9920
9921 <para>
9922 When your build is complete, your packages reside in the
9923 <filename>${TMPDIR}/deploy/<replaceable>packageformat</replaceable></filename>
9924 directory.
9925 For example, if
9926 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink><filename>}</filename>
9927 is <filename>tmp</filename> and your selected package type
9928 is RPM, then your RPM packages are available in
9929 <filename>tmp/deploy/rpm</filename>.
9930 </para>
9931 </section>
9932
9933 <section id='runtime-package-management-server'>
9934 <title>Host or Server Machine Setup</title>
9935
9936 <para>
9937 Although other protocols are possible, a server using HTTP
9938 typically serves packages.
9939 If you want to use HTTP, then set up and configure a
9940 web server such as Apache 2, lighttpd, or
9941 SimpleHTTPServer on the machine serving the packages.
9942 </para>
9943
9944 <para>
9945 To keep things simple, this section describes how to set
9946 up a SimpleHTTPServer web server to share package feeds
9947 from the developer's machine.
9948 Although this server might not be the best for a production
9949 environment, the setup is simple and straight forward.
9950 Should you want to use a different server more suited for
9951 production (e.g. Apache 2, Lighttpd, or Nginx), take the
9952 appropriate steps to do so.
9953 </para>
9954
9955 <para>
9956 From within the build directory where you have built an
9957 image based on your packaging choice (i.e. the
9958 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></ulink>
9959 setting), simply start the server.
9960 The following example assumes a build directory of
9961 <filename>~/poky/build/tmp/deploy/rpm</filename> and a
9962 <filename>PACKAGE_CLASSES</filename> setting of
9963 "package_rpm":
9964 <literallayout class='monospaced'>
9965 $ cd ~/poky/build/tmp/deploy/rpm
9966 $ python -m SimpleHTTPServer
9967 </literallayout>
9968 </para>
9969 </section>
9970
9971 <section id='runtime-package-management-target'>
9972 <title>Target Setup</title>
9973
9974 <para>
9975 Setting up the target differs depending on the
9976 package management system.
9977 This section provides information for RPM, IPK, and DEB.
9978 </para>
9979
9980 <section id='runtime-package-management-target-rpm'>
9981 <title>Using RPM</title>
9982
9983 <para>
9984 The
9985 <ulink url='https://en.wikipedia.org/wiki/DNF_(software)'>Dandified Packaging Tool</ulink>
9986 (DNF) performs runtime package management of RPM
9987 packages.
9988 In order to use DNF for runtime package management,
9989 you must perform an initial setup on the target
9990 machine for cases where the
9991 <filename>PACKAGE_FEED_*</filename> variables were not
9992 set as part of the image that is running on the
9993 target.
9994 This means if you built your image and did not not use
9995 these variables as part of the build and your image is
9996 now running on the target, you need to perform the
9997 steps in this section if you want to use runtime
9998 package management.
9999 <note>
10000 For information on the
10001 <filename>PACKAGE_FEED_*</filename> variables, see
10002 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_FEED_ARCHS'><filename>PACKAGE_FEED_ARCHS</filename></ulink>,
10003 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_FEED_BASE_PATHS'><filename>PACKAGE_FEED_BASE_PATHS</filename></ulink>,
10004 and
10005 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_FEED_URIS'><filename>PACKAGE_FEED_URIS</filename></ulink>
10006 in the Yocto Project Reference Manual variables
10007 glossary.
10008 </note>
10009 </para>
10010
10011 <para>
10012 On the target, you must inform DNF that package
10013 databases are available.
10014 You do this by creating a file named
10015 <filename>/etc/yum.repos.d/oe-packages.repo</filename>
10016 and defining the <filename>oe-packages</filename>.
10017 </para>
10018
10019 <para>
10020 As an example, assume the target is able to use the
10021 following package databases:
10022 <filename>all</filename>, <filename>i586</filename>,
10023 and <filename>qemux86</filename> from a server named
10024 <filename>my.server</filename>.
10025 The specifics for setting up the web server are up to
10026 you.
10027 The critical requirement is that the URIs in the
10028 target repository configuration point to the
10029 correct remote location for the feeds.
10030 <note><title>Tip</title>
10031 For development purposes, you can point the web
10032 server to the build system's
10033 <filename>deploy</filename> directory.
10034 However, for production use, it is better to copy
10035 the package directories to a location outside of
10036 the build area and use that location.
10037 Doing so avoids situations where the build system
10038 overwrites or changes the
10039 <filename>deploy</filename> directory.
10040 </note>
10041 </para>
10042
10043 <para>
10044 When telling DNF where to look for the package
10045 databases, you must declare individual locations
10046 per architecture or a single location used for all
10047 architectures.
10048 You cannot do both:
10049 <itemizedlist>
10050 <listitem><para>
10051 <emphasis>Create an Explicit List of Architectures:</emphasis>
10052 Define individual base URLs to identify where
10053 each package database is located:
10054 <literallayout class='monospaced'>
10055 [oe-packages]
10056 baseurl=http://my.server/rpm/i586 http://my.server/rpm/qemux86 http://my.server/rpm/all
10057 </literallayout>
10058 This example informs DNF about individual
10059 package databases for all three architectures.
10060 </para></listitem>
10061 <listitem><para>
10062 <emphasis>Create a Single (Full) Package Index:</emphasis>
10063 Define a single base URL that identifies where
10064 a full package database is located:
10065 <literallayout class='monospaced'>
10066 [oe-packages]
10067 baseurl=http://my.server/rpm
10068 </literallayout>
10069 This example informs DNF about a single package
10070 database that contains all the package index
10071 information for all supported architectures.
10072 </para></listitem>
10073 </itemizedlist>
10074 </para>
10075
10076 <para>
10077 Once you have informed DNF where to find the package
10078 databases, you need to fetch them:
10079 <literallayout class='monospaced'>
10080 # dnf makecache
10081 </literallayout>
10082 DNF is now able to find, install, and upgrade packages
10083 from the specified repository or repositories.
10084 <note>
10085 See the
10086 <ulink url='http://dnf.readthedocs.io/en/latest/'>DNF documentation</ulink>
10087 for additional information.
10088 </note>
10089 </para>
10090 </section>
10091
10092 <section id='runtime-package-management-target-ipk'>
10093 <title>Using IPK</title>
10094
10095 <para>
10096 The <filename>opkg</filename> application performs
10097 runtime package management of IPK packages.
10098 You must perform an initial setup for
10099 <filename>opkg</filename> on the target machine
10100 if the
10101 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_FEED_ARCHS'><filename>PACKAGE_FEED_ARCHS</filename></ulink>,
10102 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_FEED_BASE_PATHS'><filename>PACKAGE_FEED_BASE_PATHS</filename></ulink>, and
10103 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_FEED_URIS'><filename>PACKAGE_FEED_URIS</filename></ulink>
10104 variables have not been set or the target image was
10105 built before the variables were set.
10106 </para>
10107
10108 <para>
10109 The <filename>opkg</filename> application uses
10110 configuration files to find available package
10111 databases.
10112 Thus, you need to create a configuration file inside
10113 the <filename>/etc/opkg/</filename> direction, which
10114 informs <filename>opkg</filename> of any repository
10115 you want to use.
10116 </para>
10117
10118 <para>
10119 As an example, suppose you are serving packages from a
10120 <filename>ipk/</filename> directory containing the
10121 <filename>i586</filename>,
10122 <filename>all</filename>, and
10123 <filename>qemux86</filename> databases through an
10124 HTTP server named <filename>my.server</filename>.
10125 On the target, create a configuration file
10126 (e.g. <filename>my_repo.conf</filename>) inside the
10127 <filename>/etc/opkg/</filename> directory containing
10128 the following:
10129 <literallayout class='monospaced'>
10130 src/gz all http://my.server/ipk/all
10131 src/gz i586 http://my.server/ipk/i586
10132 src/gz qemux86 http://my.server/ipk/qemux86
10133 </literallayout>
10134 Next, instruct <filename>opkg</filename> to fetch
10135 the repository information:
10136 <literallayout class='monospaced'>
10137 # opkg update
10138 </literallayout>
10139 The <filename>opkg</filename> application is now able
10140 to find, install, and upgrade packages from the
10141 specified repository.
10142 </para>
10143 </section>
10144
10145 <section id='runtime-package-management-target-deb'>
10146 <title>Using DEB</title>
10147
10148 <para>
10149 The <filename>apt</filename> application performs
10150 runtime package management of DEB packages.
10151 This application uses a source list file to find
10152 available package databases.
10153 You must perform an initial setup for
10154 <filename>apt</filename> on the target machine
10155 if the
10156 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_FEED_ARCHS'><filename>PACKAGE_FEED_ARCHS</filename></ulink>,
10157 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_FEED_BASE_PATHS'><filename>PACKAGE_FEED_BASE_PATHS</filename></ulink>, and
10158 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_FEED_URIS'><filename>PACKAGE_FEED_URIS</filename></ulink>
10159 variables have not been set or the target image was
10160 built before the variables were set.
10161 </para>
10162
10163 <para>
10164 To inform <filename>apt</filename> of the repository
10165 you want to use, you might create a list file (e.g.
10166 <filename>my_repo.list</filename>) inside the
10167 <filename>/etc/apt/sources.list.d/</filename>
10168 directory.
10169 As an example, suppose you are serving packages from a
10170 <filename>deb/</filename> directory containing the
10171 <filename>i586</filename>,
10172 <filename>all</filename>, and
10173 <filename>qemux86</filename> databases through an
10174 HTTP server named <filename>my.server</filename>.
10175 The list file should contain:
10176 <literallayout class='monospaced'>
10177 deb http://my.server/deb/all ./
10178 deb http://my.server/deb/i586 ./
10179 deb http://my.server/deb/qemux86 ./
10180 </literallayout>
10181 Next, instruct the <filename>apt</filename>
10182 application to fetch the repository information:
10183 <literallayout class='monospaced'>
10184 # apt-get update
10185 </literallayout>
10186 After this step, <filename>apt</filename> is able
10187 to find, install, and upgrade packages from the
10188 specified repository.
10189 </para>
10190 </section>
10191 </section>
10192 </section>
10193
10194 <section id='generating-and-using-signed-packages'>
10195 <title>Generating and Using Signed Packages</title>
10196 <para>
10197 In order to add security to RPM packages used during a build,
10198 you can take steps to securely sign them.
10199 Once a signature is verified, the OpenEmbedded build system
10200 can use the package in the build.
10201 If security fails for a signed package, the build system
10202 aborts the build.
10203 </para>
10204
10205 <para>
10206 This section describes how to sign RPM packages during a build
10207 and how to use signed package feeds (repositories) when
10208 doing a build.
10209 </para>
10210
10211 <section id='signing-rpm-packages'>
10212 <title>Signing RPM Packages</title>
10213
10214 <para>
10215 To enable signing RPM packages, you must set up the
10216 following configurations in either your
10217 <filename>local.config</filename> or
10218 <filename>distro.config</filename> file:
10219 <literallayout class='monospaced'>
10220 # Inherit sign_rpm.bbclass to enable signing functionality
10221 INHERIT += " sign_rpm"
10222 # Define the GPG key that will be used for signing.
10223 RPM_GPG_NAME = "<replaceable>key_name</replaceable>"
10224 # Provide passphrase for the key
10225 RPM_GPG_PASSPHRASE = "<replaceable>passphrase</replaceable>"
10226 </literallayout>
10227 <note>
10228 Be sure to supply appropriate values for both
10229 <replaceable>key_name</replaceable> and
10230 <replaceable>passphrase</replaceable>
10231 </note>
10232 Aside from the
10233 <filename>RPM_GPG_NAME</filename> and
10234 <filename>RPM_GPG_PASSPHRASE</filename> variables in the
10235 previous example, two optional variables related to signing
10236 exist:
10237 <itemizedlist>
10238 <listitem><para>
10239 <emphasis><filename>GPG_BIN</filename>:</emphasis>
10240 Specifies a <filename>gpg</filename> binary/wrapper
10241 that is executed when the package is signed.
10242 </para></listitem>
10243 <listitem><para>
10244 <emphasis><filename>GPG_PATH</filename>:</emphasis>
10245 Specifies the <filename>gpg</filename> home
10246 directory used when the package is signed.
10247 </para></listitem>
10248 </itemizedlist>
10249 </para>
10250 </section>
10251
10252 <section id='processing-package-feeds'>
10253 <title>Processing Package Feeds</title>
10254
10255 <para>
10256 In addition to being able to sign RPM packages, you can
10257 also enable signed package feeds for IPK and RPM packages.
10258 </para>
10259
10260 <para>
10261 The steps you need to take to enable signed package feed
10262 use are similar to the steps used to sign RPM packages.
10263 You must define the following in your
10264 <filename>local.config</filename> or
10265 <filename>distro.config</filename> file:
10266 <literallayout class='monospaced'>
10267 INHERIT += "sign_package_feed"
10268 PACKAGE_FEED_GPG_NAME = "<replaceable>key_name</replaceable>"
10269 PACKAGE_FEED_GPG_PASSPHRASE_FILE = "<replaceable>path_to_file_containing_passphrase</replaceable>"
10270 </literallayout>
10271 For signed package feeds, the passphrase must exist in a
10272 separate file, which is pointed to by the
10273 <filename>PACKAGE_FEED_GPG_PASSPHRASE_FILE</filename>
10274 variable.
10275 Regarding security, keeping a plain text passphrase out of
10276 the configuration is more secure.
10277 </para>
10278
10279 <para>
10280 Aside from the
10281 <filename>PACKAGE_FEED_GPG_NAME</filename> and
10282 <filename>PACKAGE_FEED_GPG_PASSPHRASE_FILE</filename>
10283 variables, three optional variables related to signed
10284 package feeds exist:
10285 <itemizedlist>
10286 <listitem><para>
10287 <emphasis><filename>GPG_BIN</filename>:</emphasis>
10288 Specifies a <filename>gpg</filename> binary/wrapper
10289 that is executed when the package is signed.
10290 </para></listitem>
10291 <listitem><para>
10292 <emphasis><filename>GPG_PATH</filename>:</emphasis>
10293 Specifies the <filename>gpg</filename> home
10294 directory used when the package is signed.
10295 </para></listitem>
10296 <listitem><para>
10297 <emphasis><filename>PACKAGE_FEED_GPG_SIGNATURE_TYPE</filename>:</emphasis>
10298 Specifies the type of <filename>gpg</filename>
10299 signature.
10300 This variable applies only to RPM and IPK package
10301 feeds.
10302 Allowable values for the
10303 <filename>PACKAGE_FEED_GPG_SIGNATURE_TYPE</filename>
10304 are "ASC", which is the default and specifies ascii
10305 armored, and "BIN", which specifies binary.
10306 </para></listitem>
10307 </itemizedlist>
10308 </para>
10309 </section>
10310 </section>
10311
10312 <section id='testing-packages-with-ptest'>
10313 <title>Testing Packages With ptest</title>
10314
10315 <para>
10316 A Package Test (ptest) runs tests against packages built
10317 by the OpenEmbedded build system on the target machine.
10318 A ptest contains at least two items: the actual test, and
10319 a shell script (<filename>run-ptest</filename>) that starts
10320 the test.
10321 The shell script that starts the test must not contain
10322 the actual test - the script only starts the test.
10323 On the other hand, the test can be anything from a simple
10324 shell script that runs a binary and checks the output to
10325 an elaborate system of test binaries and data files.
10326 </para>
10327
10328 <para>
10329 The test generates output in the format used by
10330 Automake:
10331 <literallayout class='monospaced'>
10332 <replaceable>result</replaceable>: <replaceable>testname</replaceable>
10333 </literallayout>
10334 where the result can be <filename>PASS</filename>,
10335 <filename>FAIL</filename>, or <filename>SKIP</filename>,
10336 and the testname can be any identifying string.
10337 </para>
10338
10339 <para>
10340 For a list of Yocto Project recipes that are already
10341 enabled with ptest, see the
10342 <ulink url='https://wiki.yoctoproject.org/wiki/Ptest'>Ptest</ulink>
10343 wiki page.
10344 <note>
10345 A recipe is "ptest-enabled" if it inherits the
10346 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-ptest'><filename>ptest</filename></ulink>
10347 class.
10348 </note>
10349 </para>
10350
10351 <section id='adding-ptest-to-your-build'>
10352 <title>Adding ptest to Your Build</title>
10353
10354 <para>
10355 To add package testing to your build, add the
10356 <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></ulink>
10357 and <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_IMAGE_FEATURES'><filename>EXTRA_IMAGE_FEATURES</filename></ulink>
10358 variables to your <filename>local.conf</filename> file,
10359 which is found in the
10360 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>:
10361 <literallayout class='monospaced'>
10362 DISTRO_FEATURES_append = " ptest"
10363 EXTRA_IMAGE_FEATURES += "ptest-pkgs"
10364 </literallayout>
10365 Once your build is complete, the ptest files are installed
10366 into the
10367 <filename>/usr/lib/<replaceable>package</replaceable>/ptest</filename>
10368 directory within the image, where
10369 <filename><replaceable>package</replaceable></filename>
10370 is the name of the package.
10371 </para>
10372 </section>
10373
10374 <section id='running-ptest'>
10375 <title>Running ptest</title>
10376
10377 <para>
10378 The <filename>ptest-runner</filename> package installs a
10379 shell script that loops through all installed ptest test
10380 suites and runs them in sequence.
10381 Consequently, you might want to add this package to
10382 your image.
10383 </para>
10384 </section>
10385
10386 <section id='getting-your-package-ready'>
10387 <title>Getting Your Package Ready</title>
10388
10389 <para>
10390 In order to enable a recipe to run installed ptests
10391 on target hardware,
10392 you need to prepare the recipes that build the packages
10393 you want to test.
10394 Here is what you have to do for each recipe:
10395 <itemizedlist>
10396 <listitem><para><emphasis>Be sure the recipe
10397 inherits the
10398 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-ptest'><filename>ptest</filename></ulink>
10399 class:</emphasis>
10400 Include the following line in each recipe:
10401 <literallayout class='monospaced'>
10402 inherit ptest
10403 </literallayout>
10404 </para></listitem>
10405 <listitem><para><emphasis>Create <filename>run-ptest</filename>:</emphasis>
10406 This script starts your test.
10407 Locate the script where you will refer to it
10408 using
10409 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>.
10410 Here is an example that starts a test for
10411 <filename>dbus</filename>:
10412 <literallayout class='monospaced'>
10413 #!/bin/sh
10414 cd test
10415 make -k runtest-TESTS
10416 </literallayout>
10417 </para></listitem>
10418 <listitem><para><emphasis>Ensure dependencies are
10419 met:</emphasis>
10420 If the test adds build or runtime dependencies
10421 that normally do not exist for the package
10422 (such as requiring "make" to run the test suite),
10423 use the
10424 <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPENDS'><filename>DEPENDS</filename></ulink>
10425 and
10426 <ulink url='&YOCTO_DOCS_REF_URL;#var-RDEPENDS'><filename>RDEPENDS</filename></ulink>
10427 variables in your recipe in order for the package
10428 to meet the dependencies.
10429 Here is an example where the package has a runtime
10430 dependency on "make":
10431 <literallayout class='monospaced'>
10432 RDEPENDS_${PN}-ptest += "make"
10433 </literallayout>
10434 </para></listitem>
10435 <listitem><para><emphasis>Add a function to build the
10436 test suite:</emphasis>
10437 Not many packages support cross-compilation of
10438 their test suites.
10439 Consequently, you usually need to add a
10440 cross-compilation function to the package.
10441 </para>
10442
10443 <para>Many packages based on Automake compile and
10444 run the test suite by using a single command
10445 such as <filename>make check</filename>.
10446 However, the host <filename>make check</filename>
10447 builds and runs on the same computer, while
10448 cross-compiling requires that the package is built
10449 on the host but executed for the target
10450 architecture (though often, as in the case for
10451 ptest, the execution occurs on the host).
10452 The built version of Automake that ships with the
10453 Yocto Project includes a patch that separates
10454 building and execution.
10455 Consequently, packages that use the unaltered,
10456 patched version of <filename>make check</filename>
10457 automatically cross-compiles.</para>
10458 <para>Regardless, you still must add a
10459 <filename>do_compile_ptest</filename> function to
10460 build the test suite.
10461 Add a function similar to the following to your
10462 recipe:
10463 <literallayout class='monospaced'>
10464 do_compile_ptest() {
10465 oe_runmake buildtest-TESTS
10466 }
10467 </literallayout>
10468 </para></listitem>
10469 <listitem><para><emphasis>Ensure special configurations
10470 are set:</emphasis>
10471 If the package requires special configurations
10472 prior to compiling the test code, you must
10473 insert a <filename>do_configure_ptest</filename>
10474 function into the recipe.
10475 </para></listitem>
10476 <listitem><para><emphasis>Install the test
10477 suite:</emphasis>
10478 The <filename>ptest</filename> class
10479 automatically copies the file
10480 <filename>run-ptest</filename> to the target and
10481 then runs make <filename>install-ptest</filename>
10482 to run the tests.
10483 If this is not enough, you need to create a
10484 <filename>do_install_ptest</filename> function and
10485 make sure it gets called after the
10486 "make install-ptest" completes.
10487 </para></listitem>
10488 </itemizedlist>
10489 </para>
10490 </section>
10491 </section>
10492
10493 <section id='creating-node-package-manager-npm-packages'>
10494 <title>Creating Node Package Manager (NPM) Packages</title>
10495
10496 <para>
10497 <ulink url='https://en.wikipedia.org/wiki/Npm_(software)'>NPM</ulink>
10498 is a package manager for the JavaScript programming
10499 language.
10500 The Yocto Project supports the NPM
10501 <ulink url='&YOCTO_DOCS_BB_URL;#bb-fetchers'>fetcher</ulink>.
10502 You can use this fetcher in combination with
10503 <ulink url='&YOCTO_DOCS_REF_URL;#ref-devtool-reference'><filename>devtool</filename></ulink>
10504 to create recipes that produce NPM packages.
10505 </para>
10506
10507 <para>
10508 Two workflows exist that allow you to create NPM packages
10509 using <filename>devtool</filename>: the NPM registry modules
10510 method and the NPM project code method.
10511 <note>
10512 While it is possible to create NPM recipes manually,
10513 using <filename>devtool</filename> is far simpler.
10514 </note>
10515 Additionally, some requirements and caveats exist.
10516 </para>
10517
10518 <section id='npm-package-creation-requirements'>
10519 <title>Requirements and Caveats</title>
10520
10521 <para>
10522 You need to be aware of the following before using
10523 <filename>devtool</filename> to create NPM packages:
10524 <itemizedlist>
10525 <listitem><para>
10526 Of the two methods that you can use
10527 <filename>devtool</filename> to create NPM
10528 packages, the registry approach is slightly
10529 simpler.
10530 However, you might consider the project
10531 approach because you do not have to publish
10532 your module in the NPM registry
10533 (<ulink url='https://docs.npmjs.com/misc/registry'><filename>npm-registry</filename></ulink>),
10534 which is NPM's public registry.
10535 </para></listitem>
10536 <listitem><para>
10537 Be familiar with
10538 <ulink url='&YOCTO_DOCS_REF_URL;#ref-devtool-reference'><filename>devtool</filename></ulink>.
10539 </para></listitem>
10540 <listitem><para>
10541 The NPM host tools need the native
10542 <filename>nodejs-npm</filename> package, which
10543 is part of the OpenEmbedded environment.
10544 You need to get the package by cloning the
10545 <ulink url='https://github.com/openembedded/meta-openembedded'></ulink>
10546 repository out of GitHub.
10547 Be sure to add the path to your local copy to
10548 your <filename>bblayers.conf</filename> file.
10549 </para></listitem>
10550 <listitem><para>
10551 <filename>devtool</filename> cannot detect
10552 native libraries in module dependencies.
10553 Consequently, you must manually add packages
10554 to your recipe.
10555 </para></listitem>
10556 <listitem><para>
10557 While deploying NPM packages,
10558 <filename>devtool</filename> cannot determine
10559 which dependent packages are missing on the
10560 target (e.g. the node runtime
10561 <filename>nodejs</filename>).
10562 Consequently, you need to find out what
10563 files are missing and be sure they are on the
10564 target.
10565 </para></listitem>
10566 <listitem><para>
10567 Although you might not need NPM to run your
10568 node package, it is useful to have NPM on your
10569 target.
10570 The NPM package name is
10571 <filename>nodejs-npm</filename>.
10572 </para></listitem>
10573 </itemizedlist>
10574 </para>
10575 </section>
10576
10577 <section id='npm-using-the-registry-modules-method'>
10578 <title>Using the Registry Modules Method</title>
10579
10580 <para>
10581 This section presents an example that uses the
10582 <filename>cute-files</filename> module, which is a
10583 file browser web application.
10584 <note>
10585 You must know the <filename>cute-files</filename>
10586 module version.
10587 </note>
10588 </para>
10589
10590 <para>
10591 The first thing you need to do is use
10592 <filename>devtool</filename> and the NPM fetcher to
10593 create the recipe:
10594 <literallayout class='monospaced'>
10595 $ devtool add "npm://registry.npmjs.org;package=cute-files;version=1.0.2"
10596 </literallayout>
10597 The <filename>devtool add</filename> command runs
10598 <filename>recipetool create</filename> and uses the
10599 same fetch URI to download each dependency and capture
10600 license details where possible.
10601 The result is a generated recipe.
10602 </para>
10603
10604 <para>
10605 The recipe file is fairly simple and contains every
10606 license that <filename>recipetool</filename> finds
10607 and includes the licenses in the recipe's
10608 <ulink url='&YOCTO_DOCS_REF_URL;#var-LIC_FILES_CHKSUM'><filename>LIC_FILES_CHKSUM</filename></ulink>
10609 variables.
10610 You need to examine the variables and look for those
10611 with "unknown" in the
10612 <ulink url='&YOCTO_DOCS_REF_URL;#var-LICENSE'><filename>LICENSE</filename></ulink>
10613 field.
10614 You need to track down the license information for
10615 "unknown" modules and manually add the information to the
10616 recipe.
10617 </para>
10618
10619 <para>
10620 <filename>recipetool</filename> creates a "shrinkwrap" file
10621 for your recipe.
10622 Shrinkwrap files capture the version of all dependent
10623 modules.
10624 Many packages do not provide shrinkwrap files.
10625 <filename>recipetool</filename> create a shrinkwrap
10626 file as it runs.
10627 <note>
10628 A package is created for each sub-module.
10629 This policy is the only practical way to have the
10630 licenses for all of the dependencies represented
10631 in the license manifest of the image.
10632 </note>
10633 </para>
10634
10635 <para>
10636 The <filename>devtool edit-recipe</filename> command
10637 lets you take a look at the recipe:
10638 <literallayout class='monospaced'>
10639 $ devtool edit-recipe cute-files
10640 SUMMARY = "Turn any folder on your computer into a cute file browser, available on the local network."
10641 LICENSE = "MIT &amp; ISC &amp; Unknown"
10642 LIC_FILES_CHKSUM = "file://LICENSE;md5=71d98c0a1db42956787b1909c74a86ca \
10643 file://node_modules/toidentifier/LICENSE;md5=1a261071a044d02eb6f2bb47f51a3502 \
10644 file://node_modules/debug/LICENSE;md5=ddd815a475e7338b0be7a14d8ee35a99 \
10645 ...
10646
10647 SRC_URI = " \
10648 npm://registry.npmjs.org/;package=cute-files;version=${PV} \
10649 npmsw://${THISDIR}/${BPN}/npm-shrinkwrap.json \
10650 "
10651
10652 S = "${WORKDIR}/npm"
10653
10654 inherit npm
10655
10656 LICENSE_${PN} = "MIT"
10657 LICENSE_${PN}-accepts = "MIT"
10658 LICENSE_${PN}-array-flatten = "MIT"
10659 ...
10660 LICENSE_${PN}-vary = "MIT"
10661 </literallayout>
10662 Three key points exist in the previous example:
10663 <itemizedlist>
10664 <listitem><para>
10665 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
10666 uses the NPM scheme so that the NPM fetcher
10667 is used.
10668 </para></listitem>
10669 <listitem><para>
10670 <filename>recipetool</filename> collects all
10671 the license information.
10672 If a sub-module's license is unavailable,
10673 the sub-module's name appears in the comments.
10674 </para></listitem>
10675 <listitem><para>
10676 The <filename>inherit npm</filename> statement
10677 causes the
10678 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-npm'><filename>npm</filename></ulink>
10679 class to package up all the modules.
10680 </para></listitem>
10681 </itemizedlist>
10682 </para>
10683
10684 <para>
10685 You can run the following command to build the
10686 <filename>cute-files</filename> package:
10687 <literallayout class='monospaced'>
10688 $ devtool build cute-files
10689 </literallayout>
10690 Remember that <filename>nodejs</filename> must be
10691 installed on the target before your package.
10692 </para>
10693
10694 <para>
10695 Assuming 192.168.7.2 for the target's IP address, use
10696 the following command to deploy your package:
10697 <literallayout class='monospaced'>
10698 $ devtool deploy-target -s cute-files root@192.168.7.2
10699 </literallayout>
10700 Once the package is installed on the target, you can
10701 test the application:
10702 <note>
10703 Because of a know issue, you cannot simply run
10704 <filename>cute-files</filename> as you would if you
10705 had run <filename>npm install</filename>.
10706 </note>
10707 <literallayout class='monospaced'>
10708 $ cd /usr/lib/node_modules/cute-files
10709 $ node cute-files.js
10710 </literallayout>
10711 On a browser, go to
10712 <filename>http://192.168.7.2:3000</filename> and you
10713 see the following:
10714 <imagedata fileref="figures/cute-files-npm-example.png" align="center" width="6in" depth="4in" />
10715 </para>
10716
10717 <para>
10718 You can find the recipe in
10719 <filename>workspace/recipes/cute-files</filename>.
10720 You can use the recipe in any layer you choose.
10721 </para>
10722 </section>
10723
10724 <section id='npm-using-the-npm-projects-method'>
10725 <title>Using the NPM Projects Code Method</title>
10726
10727 <para>
10728 Although it is useful to package modules already in the
10729 NPM registry, adding <filename>node.js</filename> projects
10730 under development is a more common developer use case.
10731 </para>
10732
10733 <para>
10734 This section covers the NPM projects code method, which is
10735 very similar to the "registry" approach described in the
10736 previous section.
10737 In the NPM projects method, you provide
10738 <filename>devtool</filename> with an URL that points to the
10739 source files.
10740 </para>
10741
10742 <para>
10743 Replicating the same example, (i.e.
10744 <filename>cute-files</filename>) use the following command:
10745 <literallayout class='monospaced'>
10746 $ devtool add https://github.com/martinaglv/cute-files.git
10747 </literallayout>
10748 The recipe this command generates is very similar to the
10749 recipe created in the previous section.
10750 However, the <filename>SRC_URI</filename> looks like the
10751 following:
10752 <literallayout class='monospaced'>
10753 SRC_URI = " \
10754 git://github.com/martinaglv/cute-files.git;protocol=https \
10755 npmsw://${THISDIR}/${BPN}/npm-shrinkwrap.json \
10756 "
10757 </literallayout>
10758 In this example, the main module is taken from the Git
10759 repository and dependents are taken from the NPM registry.
10760 Other than those differences, the recipe is basically the
10761 same between the two methods.
10762 You can build and deploy the package exactly as described
10763 in the previous section that uses the registry modules
10764 method.
10765 </para>
10766 </section>
10767 </section>
10768
10769 <section id='adding-custom-metadata-to-packages'>
10770 <title>Adding custom metadata to packages</title>
10771
10772 <para>
10773 The variable <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_ADD_METADATA'><filename>PACKAGE_ADD_METADATA</filename></ulink>
10774 can be used to add additional metadata to packages. This is
10775 reflected in the package control/spec file. To take the ipk
10776 format for example, the CONTROL file stored inside would
10777 contain the additional metadata as additional lines.
10778 </para>
10779
10780 <para>
10781 The variable can be used in multiple ways, including using
10782 suffixes to set it for a specific package type and/or package.
10783 Note that the order of precedence is the same as this list:
10784 <itemizedlist>
10785 <listitem><para>
10786 <filename>PACKAGE_ADD_METADATA_&lt;PKGTYPE&gt;_&lt;PN&gt;</filename>
10787 </para></listitem>
10788 <listitem><para>
10789 <filename>PACKAGE_ADD_METADATA_&lt;PKGTYPE&gt;</filename>
10790 </para></listitem>
10791 <listitem><para>
10792 <filename>PACKAGE_ADD_METADATA_&lt;PN&gt;</filename>
10793 </para></listitem>
10794 <listitem><para>
10795 <filename>PACKAGE_ADD_METADATA</filename>
10796 </para></listitem>
10797 </itemizedlist>
10798 &lt;PKGTYPE&gt; is a parameter and expected to be a
10799 distinct name of specific package type:
10800 <itemizedlist>
10801 <listitem><para>IPK for .ipk packages</para></listitem>
10802 <listitem><para>DEB for .deb packages</para></listitem>
10803 <listitem><para>RPM for .rpm packages</para></listitem>
10804 </itemizedlist>
10805 &lt;PN&gt; is a parameter and expected to be a package name.
10806 </para>
10807
10808 <para>
10809 The variable can contain multiple [one-line] metadata fields
10810 separated by the literal sequence '\n'. The separator can be
10811 redefined using the variable flag <filename>separator</filename>.
10812 </para>
10813
10814 <para>
10815 The following is an example that adds two custom fields for
10816 ipk packages:
10817 <literallayout class='monospaced'>
10818 PACKAGE_ADD_METADATA_IPK = "Vendor: CustomIpk\nGroup: Applications/Spreadsheets"
10819 </literallayout>
10820 </para>
10821 </section>
10822
10823 </section>
10824
10825 <section id='efficiently-fetching-source-files-during-a-build'>
10826 <title>Efficiently Fetching Source Files During a Build</title>
10827
10828 <para>
10829 The OpenEmbedded build system works with source files located
10830 through the
10831 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
10832 variable.
10833 When you build something using BitBake, a big part of the operation
10834 is locating and downloading all the source tarballs.
10835 For images, downloading all the source for various packages can
10836 take a significant amount of time.
10837 </para>
10838
10839 <para>
10840 This section shows you how you can use mirrors to speed up
10841 fetching source files and how you can pre-fetch files all of which
10842 leads to more efficient use of resources and time.
10843 </para>
10844
10845 <section id='setting-up-effective-mirrors'>
10846 <title>Setting up Effective Mirrors</title>
10847
10848 <para>
10849 A good deal that goes into a Yocto Project
10850 build is simply downloading all of the source tarballs.
10851 Maybe you have been working with another build system
10852 (OpenEmbedded or Angstrom) for which you have built up a
10853 sizable directory of source tarballs.
10854 Or, perhaps someone else has such a directory for which you
10855 have read access.
10856 If so, you can save time by adding statements to your
10857 configuration file so that the build process checks local
10858 directories first for existing tarballs before checking the
10859 Internet.
10860 </para>
10861
10862 <para>
10863 Here is an efficient way to set it up in your
10864 <filename>local.conf</filename> file:
10865 <literallayout class='monospaced'>
10866 SOURCE_MIRROR_URL ?= "file:///home/you/your-download-dir/"
10867 INHERIT += "own-mirrors"
10868 BB_GENERATE_MIRROR_TARBALLS = "1"
10869 # BB_NO_NETWORK = "1"
10870 </literallayout>
10871 </para>
10872
10873 <para>
10874 In the previous example, the
10875 <ulink url='&YOCTO_DOCS_REF_URL;#var-BB_GENERATE_MIRROR_TARBALLS'><filename>BB_GENERATE_MIRROR_TARBALLS</filename></ulink>
10876 variable causes the OpenEmbedded build system to generate
10877 tarballs of the Git repositories and store them in the
10878 <ulink url='&YOCTO_DOCS_REF_URL;#var-DL_DIR'><filename>DL_DIR</filename></ulink>
10879 directory.
10880 Due to performance reasons, generating and storing these
10881 tarballs is not the build system's default behavior.
10882 </para>
10883
10884 <para>
10885 You can also use the
10886 <ulink url='&YOCTO_DOCS_REF_URL;#var-PREMIRRORS'><filename>PREMIRRORS</filename></ulink>
10887 variable.
10888 For an example, see the variable's glossary entry in the
10889 Yocto Project Reference Manual.
10890 </para>
10891 </section>
10892
10893 <section id='getting-source-files-and-suppressing-the-build'>
10894 <title>Getting Source Files and Suppressing the Build</title>
10895
10896 <para>
10897 Another technique you can use to ready yourself for a
10898 successive string of build operations, is to pre-fetch
10899 all the source files without actually starting a build.
10900 This technique lets you work through any download issues
10901 and ultimately gathers all the source files into your
10902 download directory
10903 <ulink url='&YOCTO_DOCS_REF_URL;#structure-build-downloads'><filename>build/downloads</filename></ulink>,
10904 which is located with
10905 <ulink url='&YOCTO_DOCS_REF_URL;#var-DL_DIR'><filename>DL_DIR</filename></ulink>.
10906 </para>
10907
10908 <para>
10909 Use the following BitBake command form to fetch all the
10910 necessary sources without starting the build:
10911 <literallayout class='monospaced'>
10912 $ bitbake <replaceable>target</replaceable> --runall=fetch
10913 </literallayout>
10914 This variation of the BitBake command guarantees that you
10915 have all the sources for that BitBake target should you
10916 disconnect from the Internet and want to do the build
10917 later offline.
10918 </para>
10919 </section>
10920 </section>
10921
10922 <section id="selecting-an-initialization-manager">
10923 <title>Selecting an Initialization Manager</title>
10924
10925 <para>
10926 By default, the Yocto Project uses SysVinit as the initialization
10927 manager.
10928 However, support also exists for systemd,
10929 which is a full replacement for init with
10930 parallel starting of services, reduced shell overhead and other
10931 features that are used by many distributions.
10932 </para>
10933
10934 <para>
10935 Within the system, SysVinit treats system components as services.
10936 These services are maintained as shell scripts stored in the
10937 <filename>/etc/init.d/</filename> directory.
10938 Services organize into different run levels.
10939 This organization is maintained by putting links to the services
10940 in the <filename>/etc/rcN.d/</filename> directories, where
10941 <replaceable>N/</replaceable> is one of the following options:
10942 "S", "0", "1", "2", "3", "4", "5", or "6".
10943 <note>
10944 Each runlevel has a dependency on the previous runlevel.
10945 This dependency allows the services to work properly.
10946 </note>
10947 </para>
10948
10949 <para>
10950 In comparison, systemd treats components as units.
10951 Using units is a broader concept as compared to using a service.
10952 A unit includes several different types of entities.
10953 Service is one of the types of entities.
10954 The runlevel concept in SysVinit corresponds to the concept of a
10955 target in systemd, where target is also a type of supported unit.
10956 </para>
10957
10958 <para>
10959 In a SysVinit-based system, services load sequentially (i.e. one
10960 by one) during and parallelization is not supported.
10961 With systemd, services start in parallel.
10962 Needless to say, the method can have an impact on system startup
10963 performance.
10964 </para>
10965
10966 <para>
10967 If you want to use SysVinit, you do
10968 not have to do anything.
10969 But, if you want to use systemd, you must
10970 take some steps as described in the following sections.
10971 </para>
10972
10973 <section id='using-systemd-exclusively'>
10974 <title>Using systemd Exclusively</title>
10975
10976 <para>
10977 Set these variables in your distribution configuration
10978 file as follows:
10979 <literallayout class='monospaced'>
10980 DISTRO_FEATURES_append = " systemd"
10981 VIRTUAL-RUNTIME_init_manager = "systemd"
10982 </literallayout>
10983 You can also prevent the SysVinit
10984 distribution feature from
10985 being automatically enabled as follows:
10986 <literallayout class='monospaced'>
10987 DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
10988 </literallayout>
10989 Doing so removes any redundant SysVinit scripts.
10990 </para>
10991
10992 <para>
10993 To remove initscripts from your image altogether,
10994 set this variable also:
10995 <literallayout class='monospaced'>
10996 VIRTUAL-RUNTIME_initscripts = ""
10997 </literallayout>
10998 </para>
10999
11000 <para>
11001 For information on the backfill variable, see
11002 <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO_FEATURES_BACKFILL_CONSIDERED'><filename>DISTRO_FEATURES_BACKFILL_CONSIDERED</filename></ulink>.
11003 </para>
11004 </section>
11005
11006 <section id='using-systemd-for-the-main-image-and-using-sysvinit-for-the-rescue-image'>
11007 <title>Using systemd for the Main Image and Using SysVinit for the Rescue Image</title>
11008
11009 <para>
11010 Set these variables in your distribution configuration
11011 file as follows:
11012 <literallayout class='monospaced'>
11013 DISTRO_FEATURES_append = " systemd"
11014 VIRTUAL-RUNTIME_init_manager = "systemd"
11015 </literallayout>
11016 Doing so causes your main image to use the
11017 <filename>packagegroup-core-boot.bb</filename> recipe and
11018 systemd.
11019 The rescue/minimal image cannot use this package group.
11020 However, it can install SysVinit
11021 and the appropriate packages will have support for both
11022 systemd and SysVinit.
11023 </para>
11024 </section>
11025 </section>
11026
11027 <section id="selecting-dev-manager">
11028 <title>Selecting a Device Manager</title>
11029
11030 <para>
11031 The Yocto Project provides multiple ways to manage the device
11032 manager (<filename>/dev</filename>):
11033 <itemizedlist>
11034 <listitem><para><emphasis>Persistent and Pre-Populated<filename>/dev</filename>:</emphasis>
11035 For this case, the <filename>/dev</filename> directory
11036 is persistent and the required device nodes are created
11037 during the build.
11038 </para></listitem>
11039 <listitem><para><emphasis>Use <filename>devtmpfs</filename> with a Device Manager:</emphasis>
11040 For this case, the <filename>/dev</filename> directory
11041 is provided by the kernel as an in-memory file system and
11042 is automatically populated by the kernel at runtime.
11043 Additional configuration of device nodes is done in user
11044 space by a device manager like
11045 <filename>udev</filename> or
11046 <filename>busybox-mdev</filename>.
11047 </para></listitem>
11048 </itemizedlist>
11049 </para>
11050
11051 <section id="static-dev-management">
11052 <title>Using Persistent and Pre-Populated<filename>/dev</filename></title>
11053
11054 <para>
11055 To use the static method for device population, you need to
11056 set the
11057 <ulink url='&YOCTO_DOCS_REF_URL;#var-USE_DEVFS'><filename>USE_DEVFS</filename></ulink>
11058 variable to "0" as follows:
11059 <literallayout class='monospaced'>
11060 USE_DEVFS = "0"
11061 </literallayout>
11062 </para>
11063
11064 <para>
11065 The content of the resulting <filename>/dev</filename>
11066 directory is defined in a Device Table file.
11067 The
11068 <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_DEVICE_TABLES'><filename>IMAGE_DEVICE_TABLES</filename></ulink>
11069 variable defines the Device Table to use and should be set
11070 in the machine or distro configuration file.
11071 Alternatively, you can set this variable in your
11072 <filename>local.conf</filename> configuration file.
11073 </para>
11074
11075 <para>
11076 If you do not define the
11077 <filename>IMAGE_DEVICE_TABLES</filename> variable, the default
11078 <filename>device_table-minimal.txt</filename> is used:
11079 <literallayout class='monospaced'>
11080 IMAGE_DEVICE_TABLES = "device_table-mymachine.txt"
11081 </literallayout>
11082 </para>
11083
11084 <para>
11085 The population is handled by the <filename>makedevs</filename>
11086 utility during image creation:
11087 </para>
11088 </section>
11089
11090 <section id="devtmpfs-dev-management">
11091 <title>Using <filename>devtmpfs</filename> and a Device Manager</title>
11092
11093 <para>
11094 To use the dynamic method for device population, you need to
11095 use (or be sure to set) the
11096 <ulink url='&YOCTO_DOCS_REF_URL;#var-USE_DEVFS'><filename>USE_DEVFS</filename></ulink>
11097 variable to "1", which is the default:
11098 <literallayout class='monospaced'>
11099 USE_DEVFS = "1"
11100 </literallayout>
11101 With this setting, the resulting <filename>/dev</filename>
11102 directory is populated by the kernel using
11103 <filename>devtmpfs</filename>.
11104 Make sure the corresponding kernel configuration variable
11105 <filename>CONFIG_DEVTMPFS</filename> is set when building
11106 you build a Linux kernel.
11107 </para>
11108
11109 <para>
11110 All devices created by <filename>devtmpfs</filename> will be
11111 owned by <filename>root</filename> and have permissions
11112 <filename>0600</filename>.
11113 </para>
11114
11115 <para>
11116 To have more control over the device nodes, you can use a
11117 device manager like <filename>udev</filename> or
11118 <filename>busybox-mdev</filename>.
11119 You choose the device manager by defining the
11120 <filename>VIRTUAL-RUNTIME_dev_manager</filename> variable
11121 in your machine or distro configuration file.
11122 Alternatively, you can set this variable in your
11123 <filename>local.conf</filename> configuration file:
11124 <literallayout class='monospaced'>
11125 VIRTUAL-RUNTIME_dev_manager = "udev"
11126
11127 # Some alternative values
11128 # VIRTUAL-RUNTIME_dev_manager = "busybox-mdev"
11129 # VIRTUAL-RUNTIME_dev_manager = "systemd"
11130 </literallayout>
11131 </para>
11132 </section>
11133 </section>
11134
11135 <section id="platdev-appdev-srcrev">
11136 <title>Using an External SCM</title>
11137
11138 <para>
11139 If you're working on a recipe that pulls from an external Source
11140 Code Manager (SCM), it is possible to have the OpenEmbedded build
11141 system notice new recipe changes added to the SCM and then build
11142 the resulting packages that depend on the new recipes by using
11143 the latest versions.
11144 This only works for SCMs from which it is possible to get a
11145 sensible revision number for changes.
11146 Currently, you can do this with Apache Subversion (SVN), Git, and
11147 Bazaar (BZR) repositories.
11148 </para>
11149
11150 <para>
11151 To enable this behavior, the
11152 <ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>
11153 of the recipe needs to reference
11154 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRCPV'><filename>SRCPV</filename></ulink>.
11155 Here is an example:
11156 <literallayout class='monospaced'>
11157 PV = "1.2.3+git${SRCPV}"
11158 </literallayout>
11159 Then, you can add the following to your
11160 <filename>local.conf</filename>:
11161 <literallayout class='monospaced'>
11162 SRCREV_pn-<replaceable>PN</replaceable> = "${AUTOREV}"
11163 </literallayout>
11164 <ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink>
11165 is the name of the recipe for which you want to enable automatic source
11166 revision updating.
11167 </para>
11168
11169 <para>
11170 If you do not want to update your local configuration file, you can
11171 add the following directly to the recipe to finish enabling
11172 the feature:
11173 <literallayout class='monospaced'>
11174 SRCREV = "${AUTOREV}"
11175 </literallayout>
11176 </para>
11177
11178 <para>
11179 The Yocto Project provides a distribution named
11180 <filename>poky-bleeding</filename>, whose configuration
11181 file contains the line:
11182 <literallayout class='monospaced'>
11183 require conf/distro/include/poky-floating-revisions.inc
11184 </literallayout>
11185 This line pulls in the listed include file that contains
11186 numerous lines of exactly that form:
11187 <literallayout class='monospaced'>
11188 #SRCREV_pn-opkg-native ?= "${AUTOREV}"
11189 #SRCREV_pn-opkg-sdk ?= "${AUTOREV}"
11190 #SRCREV_pn-opkg ?= "${AUTOREV}"
11191 #SRCREV_pn-opkg-utils-native ?= "${AUTOREV}"
11192 #SRCREV_pn-opkg-utils ?= "${AUTOREV}"
11193 SRCREV_pn-gconf-dbus ?= "${AUTOREV}"
11194 SRCREV_pn-matchbox-common ?= "${AUTOREV}"
11195 SRCREV_pn-matchbox-config-gtk ?= "${AUTOREV}"
11196 SRCREV_pn-matchbox-desktop ?= "${AUTOREV}"
11197 SRCREV_pn-matchbox-keyboard ?= "${AUTOREV}"
11198 SRCREV_pn-matchbox-panel-2 ?= "${AUTOREV}"
11199 SRCREV_pn-matchbox-themes-extra ?= "${AUTOREV}"
11200 SRCREV_pn-matchbox-terminal ?= "${AUTOREV}"
11201 SRCREV_pn-matchbox-wm ?= "${AUTOREV}"
11202 SRCREV_pn-settings-daemon ?= "${AUTOREV}"
11203 SRCREV_pn-screenshot ?= "${AUTOREV}"
11204 .
11205 .
11206 .
11207 </literallayout>
11208 These lines allow you to experiment with building a
11209 distribution that tracks the latest development source
11210 for numerous packages.
11211 <note><title>Caution</title>
11212 The <filename>poky-bleeding</filename> distribution
11213 is not tested on a regular basis.
11214 Keep this in mind if you use it.
11215 </note>
11216 </para>
11217 </section>
11218
11219 <section id='creating-a-read-only-root-filesystem'>
11220 <title>Creating a Read-Only Root Filesystem</title>
11221
11222 <para>
11223 Suppose, for security reasons, you need to disable
11224 your target device's root filesystem's write permissions
11225 (i.e. you need a read-only root filesystem).
11226 Or, perhaps you are running the device's operating system
11227 from a read-only storage device.
11228 For either case, you can customize your image for
11229 that behavior.
11230 </para>
11231
11232 <note>
11233 Supporting a read-only root filesystem requires that the system and
11234 applications do not try to write to the root filesystem.
11235 You must configure all parts of the target system to write
11236 elsewhere, or to gracefully fail in the event of attempting to
11237 write to the root filesystem.
11238 </note>
11239
11240 <section id='creating-the-root-filesystem'>
11241 <title>Creating the Root Filesystem</title>
11242
11243 <para>
11244 To create the read-only root filesystem, simply add the
11245 "read-only-rootfs" feature to your image, normally in one of two ways.
11246 The first way is to add the "read-only-rootfs" image feature
11247 in the image's recipe file via the
11248 <filename>IMAGE_FEATURES</filename> variable:
11249 <literallayout class='monospaced'>
11250 IMAGE_FEATURES += "read-only-rootfs"
11251 </literallayout>
11252 As an alternative, you can add the same feature from within your
11253 build directory's <filename>local.conf</filename> file with the
11254 associated <filename>EXTRA_IMAGE_FEATURES</filename> variable, as in:
11255 <literallayout class='monospaced'>
11256 EXTRA_IMAGE_FEATURES = "read-only-rootfs"
11257 </literallayout>
11258 </para>
11259
11260 <para>
11261 For more information on how to use these variables, see the
11262 "<link linkend='usingpoky-extend-customimage-imagefeatures'>Customizing Images Using Custom <filename>IMAGE_FEATURES</filename> and <filename>EXTRA_IMAGE_FEATURES</filename></link>"
11263 section.
11264 For information on the variables, see
11265 <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></ulink>
11266 and <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_IMAGE_FEATURES'><filename>EXTRA_IMAGE_FEATURES</filename></ulink>.
11267 </para>
11268 </section>
11269
11270 <section id='post-installation-scripts'>
11271 <title>Post-Installation Scripts</title>
11272
11273 <para>
11274 It is very important that you make sure all
11275 post-Installation (<filename>pkg_postinst</filename>) scripts
11276 for packages that are installed into the image can be run
11277 at the time when the root filesystem is created during the
11278 build on the host system.
11279 These scripts cannot attempt to run during first-boot on the
11280 target device.
11281 With the "read-only-rootfs" feature enabled,
11282 the build system checks during root filesystem creation to make
11283 sure all post-installation scripts succeed.
11284 If any of these scripts still need to be run after the root
11285 filesystem is created, the build immediately fails.
11286 These build-time checks ensure that the build fails
11287 rather than the target device fails later during its
11288 initial boot operation.
11289 </para>
11290
11291 <para>
11292 Most of the common post-installation scripts generated by the
11293 build system for the out-of-the-box Yocto Project are engineered
11294 so that they can run during root filesystem creation
11295 (e.g. post-installation scripts for caching fonts).
11296 However, if you create and add custom scripts, you need
11297 to be sure they can be run during this file system creation.
11298 </para>
11299
11300 <para>
11301 Here are some common problems that prevent
11302 post-installation scripts from running during root filesystem
11303 creation:
11304 <itemizedlist>
11305 <listitem><para>
11306 <emphasis>Not using $D in front of absolute
11307 paths:</emphasis>
11308 The build system defines
11309 <filename>$</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-D'><filename>D</filename></ulink>
11310 when the root filesystem is created.
11311 Furthermore, <filename>$D</filename> is blank when the
11312 script is run on the target device.
11313 This implies two purposes for <filename>$D</filename>:
11314 ensuring paths are valid in both the host and target
11315 environments, and checking to determine which
11316 environment is being used as a method for taking
11317 appropriate actions.
11318 </para></listitem>
11319 <listitem><para>
11320 <emphasis>Attempting to run processes that are
11321 specific to or dependent on the target
11322 architecture:</emphasis>
11323 You can work around these attempts by using native
11324 tools, which run on the host system,
11325 to accomplish the same tasks, or
11326 by alternatively running the processes under QEMU,
11327 which has the <filename>qemu_run_binary</filename>
11328 function.
11329 For more information, see the
11330 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-qemu'><filename>qemu</filename></ulink>
11331 class.</para></listitem>
11332 </itemizedlist>
11333 </para>
11334 </section>
11335
11336 <section id='areas-with-write-access'>
11337 <title>Areas With Write Access</title>
11338
11339 <para>
11340 With the "read-only-rootfs" feature enabled,
11341 any attempt by the target to write to the root filesystem at
11342 runtime fails.
11343 Consequently, you must make sure that you configure processes
11344 and applications that attempt these types of writes do so
11345 to directories with write access (e.g.
11346 <filename>/tmp</filename> or <filename>/var/run</filename>).
11347 </para>
11348 </section>
11349 </section>
11350
11351
11352
11353
11354 <section id='maintaining-build-output-quality'>
11355 <title>Maintaining Build Output Quality</title>
11356
11357 <para>
11358 Many factors can influence the quality of a build.
11359 For example, if you upgrade a recipe to use a new version of an
11360 upstream software package or you experiment with some new
11361 configuration options, subtle changes can occur that you might
11362 not detect until later.
11363 Consider the case where your recipe is using a newer version of
11364 an upstream package.
11365 In this case, a new version of a piece of software might
11366 introduce an optional dependency on another library, which is
11367 auto-detected.
11368 If that library has already been built when the software is
11369 building, the software will link to the built library and that
11370 library will be pulled into your image along with the new
11371 software even if you did not want the library.
11372 </para>
11373
11374 <para>
11375 The
11376 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-buildhistory'><filename>buildhistory</filename></ulink>
11377 class exists to help you maintain the quality of your build
11378 output.
11379 You can use the class to highlight unexpected and possibly
11380 unwanted changes in the build output.
11381 When you enable build history, it records information about the
11382 contents of each package and image and then commits that
11383 information to a local Git repository where you can examine
11384 the information.
11385 </para>
11386
11387 <para>
11388 The remainder of this section describes the following:
11389 <itemizedlist>
11390 <listitem><para>
11391 How you can enable and disable build history
11392 </para></listitem>
11393 <listitem><para>
11394 How to understand what the build history contains
11395 </para></listitem>
11396 <listitem><para>
11397 How to limit the information used for build history
11398 </para></listitem>
11399 <listitem><para>
11400 How to examine the build history from both a
11401 command-line and web interface
11402 </para></listitem>
11403 </itemizedlist>
11404 </para>
11405
11406 <section id='enabling-and-disabling-build-history'>
11407 <title>Enabling and Disabling Build History</title>
11408
11409 <para>
11410 Build history is disabled by default.
11411 To enable it, add the following <filename>INHERIT</filename>
11412 statement and set the
11413 <ulink url='&YOCTO_DOCS_REF_URL;#var-BUILDHISTORY_COMMIT'><filename>BUILDHISTORY_COMMIT</filename></ulink>
11414 variable to "1" at the end of your
11415 <filename>conf/local.conf</filename> file found in the
11416 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>:
11417 <literallayout class='monospaced'>
11418 INHERIT += "buildhistory"
11419 BUILDHISTORY_COMMIT = "1"
11420 </literallayout>
11421 Enabling build history as previously described causes the
11422 OpenEmbedded build system to collect build output information
11423 and commit it as a single commit to a local
11424 <ulink url='&YOCTO_DOCS_OM_URL;#git'>Git</ulink>
11425 repository.
11426 <note>
11427 Enabling build history increases your build times slightly,
11428 particularly for images, and increases the amount of disk
11429 space used during the build.
11430 </note>
11431 </para>
11432
11433 <para>
11434 You can disable build history by removing the previous
11435 statements from your <filename>conf/local.conf</filename>
11436 file.
11437 </para>
11438 </section>
11439
11440 <section id='understanding-what-the-build-history-contains'>
11441 <title>Understanding What the Build History Contains</title>
11442
11443 <para>
11444 Build history information is kept in
11445 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-TOPDIR'><filename>TOPDIR</filename></ulink><filename>}/buildhistory</filename>
11446 in the Build Directory as defined by the
11447 <ulink url='&YOCTO_DOCS_REF_URL;#var-BUILDHISTORY_DIR'><filename>BUILDHISTORY_DIR</filename></ulink>
11448 variable.
11449 The following is an example abbreviated listing:
11450 <imagedata fileref="figures/buildhistory.png" align="center" width="6in" depth="4in" />
11451 </para>
11452
11453 <para>
11454 At the top level, a <filename>metadata-revs</filename>
11455 file exists that lists the revisions of the repositories for
11456 the enabled layers when the build was produced.
11457 The rest of the data splits into separate
11458 <filename>packages</filename>, <filename>images</filename>
11459 and <filename>sdk</filename> directories, the contents of
11460 which are described as follows.
11461 </para>
11462
11463 <section id='build-history-package-information'>
11464 <title>Build History Package Information</title>
11465
11466 <para>
11467 The history for each package contains a text file that has
11468 name-value pairs with information about the package.
11469 For example,
11470 <filename>buildhistory/packages/i586-poky-linux/busybox/busybox/latest</filename>
11471 contains the following:
11472 <literallayout class='monospaced'>
11473 PV = 1.22.1
11474 PR = r32
11475 RPROVIDES =
11476 RDEPENDS = glibc (>= 2.20) update-alternatives-opkg
11477 RRECOMMENDS = busybox-syslog busybox-udhcpc update-rc.d
11478 PKGSIZE = 540168
11479 FILES = /usr/bin/* /usr/sbin/* /usr/lib/busybox/* /usr/lib/lib*.so.* \
11480 /etc /com /var /bin/* /sbin/* /lib/*.so.* /lib/udev/rules.d \
11481 /usr/lib/udev/rules.d /usr/share/busybox /usr/lib/busybox/* \
11482 /usr/share/pixmaps /usr/share/applications /usr/share/idl \
11483 /usr/share/omf /usr/share/sounds /usr/lib/bonobo/servers
11484 FILELIST = /bin/busybox /bin/busybox.nosuid /bin/busybox.suid /bin/sh \
11485 /etc/busybox.links.nosuid /etc/busybox.links.suid
11486 </literallayout>
11487 Most of these name-value pairs correspond to variables
11488 used to produce the package.
11489 The exceptions are <filename>FILELIST</filename>, which
11490 is the actual list of files in the package, and
11491 <filename>PKGSIZE</filename>, which is the total size of
11492 files in the package in bytes.
11493 </para>
11494
11495 <para>
11496 A file also exists that corresponds to the recipe from
11497 which the package came (e.g.
11498 <filename>buildhistory/packages/i586-poky-linux/busybox/latest</filename>):
11499 <literallayout class='monospaced'>
11500 PV = 1.22.1
11501 PR = r32
11502 DEPENDS = initscripts kern-tools-native update-rc.d-native \
11503 virtual/i586-poky-linux-compilerlibs virtual/i586-poky-linux-gcc \
11504 virtual/libc virtual/update-alternatives
11505 PACKAGES = busybox-ptest busybox-httpd busybox-udhcpd busybox-udhcpc \
11506 busybox-syslog busybox-mdev busybox-hwclock busybox-dbg \
11507 busybox-staticdev busybox-dev busybox-doc busybox-locale busybox
11508 </literallayout>
11509 </para>
11510
11511 <para>
11512 Finally, for those recipes fetched from a version control
11513 system (e.g., Git), a file exists that lists source
11514 revisions that are specified in the recipe and lists
11515 the actual revisions used during the build.
11516 Listed and actual revisions might differ when
11517 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRCREV'><filename>SRCREV</filename></ulink>
11518 is set to
11519 ${<ulink url='&YOCTO_DOCS_REF_URL;#var-AUTOREV'><filename>AUTOREV</filename></ulink>}.
11520 Here is an example assuming
11521 <filename>buildhistory/packages/qemux86-poky-linux/linux-yocto/latest_srcrev</filename>):
11522 <literallayout class='monospaced'>
11523 # SRCREV_machine = "38cd560d5022ed2dbd1ab0dca9642e47c98a0aa1"
11524 SRCREV_machine = "38cd560d5022ed2dbd1ab0dca9642e47c98a0aa1"
11525 # SRCREV_meta = "a227f20eff056e511d504b2e490f3774ab260d6f"
11526 SRCREV_meta = "a227f20eff056e511d504b2e490f3774ab260d6f"
11527 </literallayout>
11528 You can use the
11529 <filename>buildhistory-collect-srcrevs</filename>
11530 command with the <filename>-a</filename> option to
11531 collect the stored <filename>SRCREV</filename> values
11532 from build history and report them in a format suitable for
11533 use in global configuration (e.g.,
11534 <filename>local.conf</filename> or a distro include file)
11535 to override floating <filename>AUTOREV</filename> values
11536 to a fixed set of revisions.
11537 Here is some example output from this command:
11538 <literallayout class='monospaced'>
11539 $ buildhistory-collect-srcrevs -a
11540 # i586-poky-linux
11541 SRCREV_pn-glibc = "b8079dd0d360648e4e8de48656c5c38972621072"
11542 SRCREV_pn-glibc-initial = "b8079dd0d360648e4e8de48656c5c38972621072"
11543 SRCREV_pn-opkg-utils = "53274f087565fd45d8452c5367997ba6a682a37a"
11544 SRCREV_pn-kmod = "fd56638aed3fe147015bfa10ed4a5f7491303cb4"
11545 # x86_64-linux
11546 SRCREV_pn-gtk-doc-stub-native = "1dea266593edb766d6d898c79451ef193eb17cfa"
11547 SRCREV_pn-dtc-native = "65cc4d2748a2c2e6f27f1cf39e07a5dbabd80ebf"
11548 SRCREV_pn-update-rc.d-native = "eca680ddf28d024954895f59a241a622dd575c11"
11549 SRCREV_glibc_pn-cross-localedef-native = "b8079dd0d360648e4e8de48656c5c38972621072"
11550 SRCREV_localedef_pn-cross-localedef-native = "c833367348d39dad7ba018990bfdaffaec8e9ed3"
11551 SRCREV_pn-prelink-native = "faa069deec99bf61418d0bab831c83d7c1b797ca"
11552 SRCREV_pn-opkg-utils-native = "53274f087565fd45d8452c5367997ba6a682a37a"
11553 SRCREV_pn-kern-tools-native = "23345b8846fe4bd167efdf1bd8a1224b2ba9a5ff"
11554 SRCREV_pn-kmod-native = "fd56638aed3fe147015bfa10ed4a5f7491303cb4"
11555 # qemux86-poky-linux
11556 SRCREV_machine_pn-linux-yocto = "38cd560d5022ed2dbd1ab0dca9642e47c98a0aa1"
11557 SRCREV_meta_pn-linux-yocto = "a227f20eff056e511d504b2e490f3774ab260d6f"
11558 # all-poky-linux
11559 SRCREV_pn-update-rc.d = "eca680ddf28d024954895f59a241a622dd575c11"
11560 </literallayout>
11561 <note>
11562 Here are some notes on using the
11563 <filename>buildhistory-collect-srcrevs</filename>
11564 command:
11565 <itemizedlist>
11566 <listitem><para>
11567 By default, only values where the
11568 <filename>SRCREV</filename> was not hardcoded
11569 (usually when <filename>AUTOREV</filename>
11570 is used) are reported.
11571 Use the <filename>-a</filename> option to
11572 see all <filename>SRCREV</filename> values.
11573 </para></listitem>
11574 <listitem><para>
11575 The output statements might not have any effect
11576 if overrides are applied elsewhere in the
11577 build system configuration.
11578 Use the <filename>-f</filename> option to add
11579 the <filename>forcevariable</filename> override
11580 to each output line if you need to work around
11581 this restriction.
11582 </para></listitem>
11583 <listitem><para>
11584 The script does apply special handling when
11585 building for multiple machines.
11586 However, the script does place a comment before
11587 each set of values that specifies which
11588 triplet to which they belong as previously
11589 shown (e.g.,
11590 <filename>i586-poky-linux</filename>).
11591 </para></listitem>
11592 </itemizedlist>
11593 </note>
11594 </para>
11595 </section>
11596
11597 <section id='build-history-image-information'>
11598 <title>Build History Image Information</title>
11599
11600 <para>
11601 The files produced for each image are as follows:
11602 <itemizedlist>
11603 <listitem><para>
11604 <filename>image-files:</filename>
11605 A directory containing selected files from the root
11606 filesystem.
11607 The files are defined by
11608 <ulink url='&YOCTO_DOCS_REF_URL;#var-BUILDHISTORY_IMAGE_FILES'><filename>BUILDHISTORY_IMAGE_FILES</filename></ulink>.
11609 </para></listitem>
11610 <listitem><para>
11611 <filename>build-id.txt:</filename>
11612 Human-readable information about the build
11613 configuration and metadata source revisions.
11614 This file contains the full build header as printed
11615 by BitBake.
11616 </para></listitem>
11617 <listitem><para>
11618 <filename>*.dot:</filename>
11619 Dependency graphs for the image that are
11620 compatible with <filename>graphviz</filename>.
11621 </para></listitem>
11622 <listitem><para>
11623 <filename>files-in-image.txt:</filename>
11624 A list of files in the image with permissions,
11625 owner, group, size, and symlink information.
11626 </para></listitem>
11627 <listitem><para>
11628 <filename>image-info.txt:</filename>
11629 A text file containing name-value pairs with
11630 information about the image.
11631 See the following listing example for more
11632 information.
11633 </para></listitem>
11634 <listitem><para>
11635 <filename>installed-package-names.txt:</filename>
11636 A list of installed packages by name only.
11637 </para></listitem>
11638 <listitem><para>
11639 <filename>installed-package-sizes.txt:</filename>
11640 A list of installed packages ordered by size.
11641 </para></listitem>
11642 <listitem><para>
11643 <filename>installed-packages.txt:</filename>
11644 A list of installed packages with full package
11645 filenames.
11646 </para></listitem>
11647 </itemizedlist>
11648 <note>
11649 Installed package information is able to be gathered
11650 and produced even if package management is disabled
11651 for the final image.
11652 </note>
11653 </para>
11654
11655 <para>
11656 Here is an example of <filename>image-info.txt</filename>:
11657 <literallayout class='monospaced'>
11658 DISTRO = poky
11659 DISTRO_VERSION = 1.7
11660 USER_CLASSES = buildstats image-mklibs image-prelink
11661 IMAGE_CLASSES = image_types
11662 IMAGE_FEATURES = debug-tweaks
11663 IMAGE_LINGUAS =
11664 IMAGE_INSTALL = packagegroup-core-boot run-postinsts
11665 BAD_RECOMMENDATIONS =
11666 NO_RECOMMENDATIONS =
11667 PACKAGE_EXCLUDE =
11668 ROOTFS_POSTPROCESS_COMMAND = write_package_manifest; license_create_manifest; \
11669 write_image_manifest ; buildhistory_list_installed_image ; \
11670 buildhistory_get_image_installed ; ssh_allow_empty_password; \
11671 postinst_enable_logging; rootfs_update_timestamp ; ssh_disable_dns_lookup ;
11672 IMAGE_POSTPROCESS_COMMAND = buildhistory_get_imageinfo ;
11673 IMAGESIZE = 6900
11674 </literallayout>
11675 Other than <filename>IMAGESIZE</filename>, which is the
11676 total size of the files in the image in Kbytes, the
11677 name-value pairs are variables that may have influenced the
11678 content of the image.
11679 This information is often useful when you are trying to
11680 determine why a change in the package or file
11681 listings has occurred.
11682 </para>
11683 </section>
11684
11685 <section id='using-build-history-to-gather-image-information-only'>
11686 <title>Using Build History to Gather Image Information Only</title>
11687
11688 <para>
11689 As you can see, build history produces image information,
11690 including dependency graphs, so you can see why something
11691 was pulled into the image.
11692 If you are just interested in this information and not
11693 interested in collecting specific package or SDK
11694 information, you can enable writing only image information
11695 without any history by adding the following to your
11696 <filename>conf/local.conf</filename> file found in the
11697 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>:
11698 <literallayout class='monospaced'>
11699 INHERIT += "buildhistory"
11700 BUILDHISTORY_COMMIT = "0"
11701 BUILDHISTORY_FEATURES = "image"
11702 </literallayout>
11703 Here, you set the
11704 <ulink url='&YOCTO_DOCS_REF_URL;#var-BUILDHISTORY_FEATURES'><filename>BUILDHISTORY_FEATURES</filename></ulink>
11705 variable to use the image feature only.
11706 </para>
11707 </section>
11708
11709 <section id='build-history-sdk-information'>
11710 <title>Build History SDK Information</title>
11711
11712 <para>
11713 Build history collects similar information on the contents
11714 of SDKs
11715 (e.g. <filename>bitbake -c populate_sdk imagename</filename>)
11716 as compared to information it collects for images.
11717 Furthermore, this information differs depending on whether
11718 an extensible or standard SDK is being produced.
11719 </para>
11720
11721 <para>
11722 The following list shows the files produced for SDKs:
11723 <itemizedlist>
11724 <listitem><para>
11725 <filename>files-in-sdk.txt:</filename>
11726 A list of files in the SDK with permissions,
11727 owner, group, size, and symlink information.
11728 This list includes both the host and target parts
11729 of the SDK.
11730 </para></listitem>
11731 <listitem><para>
11732 <filename>sdk-info.txt:</filename>
11733 A text file containing name-value pairs with
11734 information about the SDK.
11735 See the following listing example for more
11736 information.
11737 </para></listitem>
11738 <listitem><para>
11739 <filename>sstate-task-sizes.txt:</filename>
11740 A text file containing name-value pairs with
11741 information about task group sizes
11742 (e.g. <filename>do_populate_sysroot</filename>
11743 tasks have a total size).
11744 The <filename>sstate-task-sizes.txt</filename> file
11745 exists only when an extensible SDK is created.
11746 </para></listitem>
11747 <listitem><para>
11748 <filename>sstate-package-sizes.txt:</filename>
11749 A text file containing name-value pairs with
11750 information for the shared-state packages and
11751 sizes in the SDK.
11752 The <filename>sstate-package-sizes.txt</filename>
11753 file exists only when an extensible SDK is created.
11754 </para></listitem>
11755 <listitem><para>
11756 <filename>sdk-files:</filename>
11757 A folder that contains copies of the files
11758 mentioned in
11759 <filename>BUILDHISTORY_SDK_FILES</filename> if the
11760 files are present in the output.
11761 Additionally, the default value of
11762 <filename>BUILDHISTORY_SDK_FILES</filename> is
11763 specific to the extensible SDK although you can
11764 set it differently if you would like to pull in
11765 specific files from the standard SDK.</para>
11766
11767 <para>The default files are
11768 <filename>conf/local.conf</filename>,
11769 <filename>conf/bblayers.conf</filename>,
11770 <filename>conf/auto.conf</filename>,
11771 <filename>conf/locked-sigs.inc</filename>, and
11772 <filename>conf/devtool.conf</filename>.
11773 Thus, for an extensible SDK, these files get
11774 copied into the <filename>sdk-files</filename>
11775 directory.
11776 </para></listitem>
11777 <listitem><para>
11778 The following information appears under
11779 each of the <filename>host</filename>
11780 and <filename>target</filename> directories
11781 for the portions of the SDK that run on the host
11782 and on the target, respectively:
11783 <note>
11784 The following files for the most part are empty
11785 when producing an extensible SDK because this
11786 type of SDK is not constructed from packages
11787 as is the standard SDK.
11788 </note>
11789 <itemizedlist>
11790 <listitem><para>
11791 <filename>depends.dot:</filename>
11792 Dependency graph for the SDK that is
11793 compatible with
11794 <filename>graphviz</filename>.
11795 </para></listitem>
11796 <listitem><para>
11797 <filename>installed-package-names.txt:</filename>
11798 A list of installed packages by name only.
11799 </para></listitem>
11800 <listitem><para>
11801 <filename>installed-package-sizes.txt:</filename>
11802 A list of installed packages ordered by size.
11803 </para></listitem>
11804 <listitem><para>
11805 <filename>installed-packages.txt:</filename>
11806 A list of installed packages with full
11807 package filenames.
11808 </para></listitem>
11809 </itemizedlist>
11810 </para></listitem>
11811 </itemizedlist>
11812 </para>
11813
11814 <para>
11815 Here is an example of <filename>sdk-info.txt</filename>:
11816 <literallayout class='monospaced'>
11817 DISTRO = poky
11818 DISTRO_VERSION = 1.3+snapshot-20130327
11819 SDK_NAME = poky-glibc-i686-arm
11820 SDK_VERSION = 1.3+snapshot
11821 SDKMACHINE =
11822 SDKIMAGE_FEATURES = dev-pkgs dbg-pkgs
11823 BAD_RECOMMENDATIONS =
11824 SDKSIZE = 352712
11825 </literallayout>
11826 Other than <filename>SDKSIZE</filename>, which is the
11827 total size of the files in the SDK in Kbytes, the
11828 name-value pairs are variables that might have influenced
11829 the content of the SDK.
11830 This information is often useful when you are trying to
11831 determine why a change in the package or file listings
11832 has occurred.
11833 </para>
11834 </section>
11835
11836 <section id='examining-build-history-information'>
11837 <title>Examining Build History Information</title>
11838
11839 <para>
11840 You can examine build history output from the command
11841 line or from a web interface.
11842 </para>
11843
11844 <para>
11845 To see any changes that have occurred (assuming you have
11846 <ulink url='&YOCTO_DOCS_REF_URL;#var-BUILDHISTORY_COMMIT'><filename>BUILDHISTORY_COMMIT</filename></ulink><filename>&nbsp;= "1"</filename>),
11847 you can simply use any Git command that allows you to
11848 view the history of a repository.
11849 Here is one method:
11850 <literallayout class='monospaced'>
11851 $ git log -p
11852 </literallayout>
11853 You need to realize, however, that this method does show
11854 changes that are not significant (e.g. a package's size
11855 changing by a few bytes).
11856 </para>
11857
11858 <para>
11859 A command-line tool called
11860 <filename>buildhistory-diff</filename> does exist, though,
11861 that queries the Git repository and prints just the
11862 differences that might be significant in human-readable
11863 form.
11864 Here is an example:
11865 <literallayout class='monospaced'>
11866 $ ~/poky/poky/scripts/buildhistory-diff . HEAD^
11867 Changes to images/qemux86_64/glibc/core-image-minimal (files-in-image.txt):
11868 /etc/anotherpkg.conf was added
11869 /sbin/anotherpkg was added
11870 * (installed-package-names.txt):
11871 * anotherpkg was added
11872 Changes to images/qemux86_64/glibc/core-image-minimal (installed-package-names.txt):
11873 anotherpkg was added
11874 packages/qemux86_64-poky-linux/v86d: PACKAGES: added "v86d-extras"
11875 * PR changed from "r0" to "r1"
11876 * PV changed from "0.1.10" to "0.1.12"
11877 packages/qemux86_64-poky-linux/v86d/v86d: PKGSIZE changed from 110579 to 144381 (+30%)
11878 * PR changed from "r0" to "r1"
11879 * PV changed from "0.1.10" to "0.1.12"
11880 </literallayout>
11881 <note>
11882 The <filename>buildhistory-diff</filename> tool
11883 requires the <filename>GitPython</filename> package.
11884 Be sure to install it using Pip3 as follows:
11885 <literallayout class='monospaced'>
11886 $ pip3 install GitPython --user
11887 </literallayout>
11888 Alternatively, you can install
11889 <filename>python3-git</filename> using the appropriate
11890 distribution package manager (e.g.
11891 <filename>apt-get</filename>, <filename>dnf</filename>,
11892 or <filename>zipper</filename>).
11893 </note>
11894 </para>
11895
11896 <para>
11897 To see changes to the build history using a web interface,
11898 follow the instruction in the <filename>README</filename>
11899 file here.
11900 <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/buildhistory-web/'></ulink>.
11901 </para>
11902
11903 <para>
11904 Here is a sample screenshot of the interface:
11905 <imagedata fileref="figures/buildhistory-web.png" align="center" scalefit="1" width="130%" contentdepth="130%" />
11906 </para>
11907 </section>
11908 </section>
11909 </section>
11910
11911 <section id="performing-automated-runtime-testing">
11912 <title>Performing Automated Runtime Testing</title>
11913
11914 <para>
11915 The OpenEmbedded build system makes available a series of automated
11916 tests for images to verify runtime functionality.
11917 You can run these tests on either QEMU or actual target hardware.
11918 Tests are written in Python making use of the
11919 <filename>unittest</filename> module, and the majority of them
11920 run commands on the target system over SSH.
11921 This section describes how you set up the environment to use these
11922 tests, run available tests, and write and add your own tests.
11923 </para>
11924
11925 <para>
11926 For information on the test and QA infrastructure available
11927 within the Yocto Project, see the
11928 "<ulink url='&YOCTO_DOCS_REF_URL;#testing-and-quality-assurance'>Testing and Quality Assurance</ulink>"
11929 section in the Yocto Project Reference Manual.
11930 </para>
11931
11932 <section id='enabling-tests'>
11933 <title>Enabling Tests</title>
11934
11935 <para>
11936 Depending on whether you are planning to run tests using
11937 QEMU or on the hardware, you have to take
11938 different steps to enable the tests.
11939 See the following subsections for information on how to
11940 enable both types of tests.
11941 </para>
11942
11943 <section id='qemu-image-enabling-tests'>
11944 <title>Enabling Runtime Tests on QEMU</title>
11945
11946 <para>
11947 In order to run tests, you need to do the following:
11948 <itemizedlist>
11949 <listitem><para><emphasis>Set up to avoid interaction
11950 with <filename>sudo</filename> for networking:</emphasis>
11951 To accomplish this, you must do one of the
11952 following:
11953 <itemizedlist>
11954 <listitem><para>Add
11955 <filename>NOPASSWD</filename> for your user
11956 in <filename>/etc/sudoers</filename> either for
11957 all commands or just for
11958 <filename>runqemu-ifup</filename>.
11959 You must provide the full path as that can
11960 change if you are using multiple clones of the
11961 source repository.
11962 <note>
11963 On some distributions, you also need to
11964 comment out "Defaults requiretty" in
11965 <filename>/etc/sudoers</filename>.
11966 </note></para></listitem>
11967 <listitem><para>Manually configure a tap interface
11968 for your system.</para></listitem>
11969 <listitem><para>Run as root the script in
11970 <filename>scripts/runqemu-gen-tapdevs</filename>,
11971 which should generate a list of tap devices.
11972 This is the option typically chosen for
11973 Autobuilder-type environments.
11974 <note><title>Notes</title>
11975 <itemizedlist>
11976 <listitem><para>
11977 Be sure to use an absolute path
11978 when calling this script
11979 with sudo.
11980 </para></listitem>
11981 <listitem><para>
11982 The package recipe
11983 <filename>qemu-helper-native</filename>
11984 is required to run this script.
11985 Build the package using the
11986 following command:
11987 <literallayout class='monospaced'>
11988 $ bitbake qemu-helper-native
11989 </literallayout>
11990 </para></listitem>
11991 </itemizedlist>
11992 </note>
11993 </para></listitem>
11994 </itemizedlist></para></listitem>
11995 <listitem><para><emphasis>Set the
11996 <filename>DISPLAY</filename> variable:</emphasis>
11997 You need to set this variable so that you have an X
11998 server available (e.g. start
11999 <filename>vncserver</filename> for a headless machine).
12000 </para></listitem>
12001 <listitem><para><emphasis>Be sure your host's firewall
12002 accepts incoming connections from
12003 192.168.7.0/24:</emphasis>
12004 Some of the tests (in particular DNF tests) start
12005 an HTTP server on a random high number port,
12006 which is used to serve files to the target.
12007 The DNF module serves
12008 <filename>${WORKDIR}/oe-rootfs-repo</filename>
12009 so it can run DNF channel commands.
12010 That means your host's firewall
12011 must accept incoming connections from 192.168.7.0/24,
12012 which is the default IP range used for tap devices
12013 by <filename>runqemu</filename>.</para></listitem>
12014 <listitem><para><emphasis>Be sure your host has the
12015 correct packages installed:</emphasis>
12016 Depending your host's distribution, you need
12017 to have the following packages installed:
12018 <itemizedlist>
12019 <listitem><para>Ubuntu and Debian:
12020 <filename>sysstat</filename> and
12021 <filename>iproute2</filename>
12022 </para></listitem>
12023 <listitem><para>OpenSUSE:
12024 <filename>sysstat</filename> and
12025 <filename>iproute2</filename>
12026 </para></listitem>
12027 <listitem><para>Fedora:
12028 <filename>sysstat</filename> and
12029 <filename>iproute</filename>
12030 </para></listitem>
12031 <listitem><para>CentOS:
12032 <filename>sysstat</filename> and
12033 <filename>iproute</filename>
12034 </para></listitem>
12035 </itemizedlist>
12036 </para></listitem>
12037 </itemizedlist>
12038 </para>
12039
12040 <para>
12041 Once you start running the tests, the following happens:
12042 <orderedlist>
12043 <listitem><para>A copy of the root filesystem is written
12044 to <filename>${WORKDIR}/testimage</filename>.
12045 </para></listitem>
12046 <listitem><para>The image is booted under QEMU using the
12047 standard <filename>runqemu</filename> script.
12048 </para></listitem>
12049 <listitem><para>A default timeout of 500 seconds occurs
12050 to allow for the boot process to reach the login prompt.
12051 You can change the timeout period by setting
12052 <ulink url='&YOCTO_DOCS_REF_URL;#var-TEST_QEMUBOOT_TIMEOUT'><filename>TEST_QEMUBOOT_TIMEOUT</filename></ulink>
12053 in the <filename>local.conf</filename> file.
12054 </para></listitem>
12055 <listitem><para>Once the boot process is reached and the
12056 login prompt appears, the tests run.
12057 The full boot log is written to
12058 <filename>${WORKDIR}/testimage/qemu_boot_log</filename>.
12059 </para></listitem>
12060 <listitem><para>Each test module loads in the order found
12061 in <filename>TEST_SUITES</filename>.
12062 You can find the full output of the commands run over
12063 SSH in
12064 <filename>${WORKDIR}/testimgage/ssh_target_log</filename>.
12065 </para></listitem>
12066 <listitem><para>If no failures occur, the task running the
12067 tests ends successfully.
12068 You can find the output from the
12069 <filename>unittest</filename> in the task log at
12070 <filename>${WORKDIR}/temp/log.do_testimage</filename>.
12071 </para></listitem>
12072 </orderedlist>
12073 </para>
12074 </section>
12075
12076 <section id='hardware-image-enabling-tests'>
12077 <title>Enabling Runtime Tests on Hardware</title>
12078
12079 <para>
12080 The OpenEmbedded build system can run tests on real
12081 hardware, and for certain devices it can also deploy
12082 the image to be tested onto the device beforehand.
12083 </para>
12084
12085 <para>
12086 For automated deployment, a "master image" is installed
12087 onto the hardware once as part of setup.
12088 Then, each time tests are to be run, the following
12089 occurs:
12090 <orderedlist>
12091 <listitem><para>The master image is booted into and
12092 used to write the image to be tested to
12093 a second partition.
12094 </para></listitem>
12095 <listitem><para>The device is then rebooted using an
12096 external script that you need to provide.
12097 </para></listitem>
12098 <listitem><para>The device boots into the image to be
12099 tested.
12100 </para></listitem>
12101 </orderedlist>
12102 </para>
12103
12104 <para>
12105 When running tests (independent of whether the image
12106 has been deployed automatically or not), the device is
12107 expected to be connected to a network on a
12108 pre-determined IP address.
12109 You can either use static IP addresses written into
12110 the image, or set the image to use DHCP and have your
12111 DHCP server on the test network assign a known IP address
12112 based on the MAC address of the device.
12113 </para>
12114
12115 <para>
12116 In order to run tests on hardware, you need to set
12117 <filename>TEST_TARGET</filename> to an appropriate value.
12118 For QEMU, you do not have to change anything, the default
12119 value is "qemu".
12120 For running tests on hardware, the following options exist:
12121 <itemizedlist>
12122 <listitem><para><emphasis>"simpleremote":</emphasis>
12123 Choose "simpleremote" if you are going to
12124 run tests on a target system that is already
12125 running the image to be tested and is available
12126 on the network.
12127 You can use "simpleremote" in conjunction
12128 with either real hardware or an image running
12129 within a separately started QEMU or any
12130 other virtual machine manager.
12131 </para></listitem>
12132 <listitem><para><emphasis>"SystemdbootTarget":</emphasis>
12133 Choose "SystemdbootTarget" if your hardware is
12134 an EFI-based machine with
12135 <filename>systemd-boot</filename> as bootloader and
12136 <filename>core-image-testmaster</filename>
12137 (or something similar) is installed.
12138 Also, your hardware under test must be in a
12139 DHCP-enabled network that gives it the same IP
12140 address for each reboot.</para>
12141 <para>If you choose "SystemdbootTarget", there are
12142 additional requirements and considerations.
12143 See the
12144 "<link linkend='selecting-systemdboottarget'>Selecting SystemdbootTarget</link>"
12145 section, which follows, for more information.
12146 </para></listitem>
12147 <listitem><para><emphasis>"BeagleBoneTarget":</emphasis>
12148 Choose "BeagleBoneTarget" if you are deploying
12149 images and running tests on the BeagleBone
12150 "Black" or original "White" hardware.
12151 For information on how to use these tests, see the
12152 comments at the top of the BeagleBoneTarget
12153 <filename>meta-yocto-bsp/lib/oeqa/controllers/beaglebonetarget.py</filename>
12154 file.
12155 </para></listitem>
12156 <listitem><para><emphasis>"EdgeRouterTarget":</emphasis>
12157 Choose "EdgeRouterTarget" is you are deploying
12158 images and running tests on the Ubiquiti Networks
12159 EdgeRouter Lite.
12160 For information on how to use these tests, see the
12161 comments at the top of the EdgeRouterTarget
12162 <filename>meta-yocto-bsp/lib/oeqa/controllers/edgeroutertarget.py</filename>
12163 file.
12164 </para></listitem>
12165 <listitem><para><emphasis>"GrubTarget":</emphasis>
12166 Choose the "supports deploying images and running
12167 tests on any generic PC that boots using GRUB.
12168 For information on how to use these tests, see the
12169 comments at the top of the GrubTarget
12170 <filename>meta-yocto-bsp/lib/oeqa/controllers/grubtarget.py</filename>
12171 file.
12172 </para></listitem>
12173 <listitem><para><emphasis>"<replaceable>your-target</replaceable>":</emphasis>
12174 Create your own custom target if you want to run
12175 tests when you are deploying images and running
12176 tests on a custom machine within your BSP layer.
12177 To do this, you need to add a Python unit that
12178 defines the target class under
12179 <filename>lib/oeqa/controllers/</filename> within
12180 your layer.
12181 You must also provide an empty
12182 <filename>__init__.py</filename>.
12183 For examples, see files in
12184 <filename>meta-yocto-bsp/lib/oeqa/controllers/</filename>.
12185 </para></listitem>
12186 </itemizedlist>
12187 </para>
12188 </section>
12189
12190 <section id='selecting-systemdboottarget'>
12191 <title>Selecting SystemdbootTarget</title>
12192
12193 <para>
12194 If you did not set <filename>TEST_TARGET</filename> to
12195 "SystemdbootTarget", then you do not need any information
12196 in this section.
12197 You can skip down to the
12198 "<link linkend='qemu-image-running-tests'>Running Tests</link>"
12199 section.
12200 </para>
12201
12202 <para>
12203 If you did set <filename>TEST_TARGET</filename> to
12204 "SystemdbootTarget", you also need to perform a one-time
12205 setup of your master image by doing the following:
12206 <orderedlist>
12207 <listitem><para><emphasis>Set <filename>EFI_PROVIDER</filename>:</emphasis>
12208 Be sure that <filename>EFI_PROVIDER</filename>
12209 is as follows:
12210 <literallayout class='monospaced'>
12211 EFI_PROVIDER = "systemd-boot"
12212 </literallayout>
12213 </para></listitem>
12214 <listitem><para><emphasis>Build the master image:</emphasis>
12215 Build the <filename>core-image-testmaster</filename>
12216 image.
12217 The <filename>core-image-testmaster</filename>
12218 recipe is provided as an example for a
12219 "master" image and you can customize the image
12220 recipe as you would any other recipe.
12221 </para>
12222 <para>Here are the image recipe requirements:
12223 <itemizedlist>
12224 <listitem><para>Inherits
12225 <filename>core-image</filename>
12226 so that kernel modules are installed.
12227 </para></listitem>
12228 <listitem><para>Installs normal linux utilities
12229 not busybox ones (e.g.
12230 <filename>bash</filename>,
12231 <filename>coreutils</filename>,
12232 <filename>tar</filename>,
12233 <filename>gzip</filename>, and
12234 <filename>kmod</filename>).
12235 </para></listitem>
12236 <listitem><para>Uses a custom
12237 Initial RAM Disk (initramfs) image with a
12238 custom installer.
12239 A normal image that you can install usually
12240 creates a single rootfs partition.
12241 This image uses another installer that
12242 creates a specific partition layout.
12243 Not all Board Support Packages (BSPs)
12244 can use an installer.
12245 For such cases, you need to manually create
12246 the following partition layout on the
12247 target:
12248 <itemizedlist>
12249 <listitem><para>First partition mounted
12250 under <filename>/boot</filename>,
12251 labeled "boot".
12252 </para></listitem>
12253 <listitem><para>The main rootfs
12254 partition where this image gets
12255 installed, which is mounted under
12256 <filename>/</filename>.
12257 </para></listitem>
12258 <listitem><para>Another partition
12259 labeled "testrootfs" where test
12260 images get deployed.
12261 </para></listitem>
12262 </itemizedlist>
12263 </para></listitem>
12264 </itemizedlist>
12265 </para></listitem>
12266 <listitem><para><emphasis>Install image:</emphasis>
12267 Install the image that you just built on the target
12268 system.
12269 </para></listitem>
12270 </orderedlist>
12271 </para>
12272
12273 <para>
12274 The final thing you need to do when setting
12275 <filename>TEST_TARGET</filename> to "SystemdbootTarget" is
12276 to set up the test image:
12277 <orderedlist>
12278 <listitem><para><emphasis>Set up your <filename>local.conf</filename> file:</emphasis>
12279 Make sure you have the following statements in
12280 your <filename>local.conf</filename> file:
12281 <literallayout class='monospaced'>
12282 IMAGE_FSTYPES += "tar.gz"
12283 INHERIT += "testimage"
12284 TEST_TARGET = "SystemdbootTarget"
12285 TEST_TARGET_IP = "192.168.2.3"
12286 </literallayout>
12287 </para></listitem>
12288 <listitem><para><emphasis>Build your test image:</emphasis>
12289 Use BitBake to build the image:
12290 <literallayout class='monospaced'>
12291 $ bitbake core-image-sato
12292 </literallayout>
12293 </para></listitem>
12294 </orderedlist>
12295 </para>
12296 </section>
12297
12298 <section id='power-control'>
12299 <title>Power Control</title>
12300
12301 <para>
12302 For most hardware targets other than "simpleremote",
12303 you can control power:
12304 <itemizedlist>
12305 <listitem><para>
12306 You can use
12307 <filename>TEST_POWERCONTROL_CMD</filename>
12308 together with
12309 <filename>TEST_POWERCONTROL_EXTRA_ARGS</filename>
12310 as a command that runs on the host and does power
12311 cycling.
12312 The test code passes one argument to that command:
12313 off, on or cycle (off then on).
12314 Here is an example that could appear in your
12315 <filename>local.conf</filename> file:
12316 <literallayout class='monospaced'>
12317 TEST_POWERCONTROL_CMD = "powercontrol.exp test 10.11.12.1 nuc1"
12318 </literallayout>
12319 In this example, the expect script does the
12320 following:
12321 <literallayout class='monospaced'>
12322 ssh test@10.11.12.1 "pyctl nuc1 <replaceable>arg</replaceable>"
12323 </literallayout>
12324 It then runs a Python script that controls power
12325 for a label called <filename>nuc1</filename>.
12326 <note>
12327 You need to customize
12328 <filename>TEST_POWERCONTROL_CMD</filename>
12329 and
12330 <filename>TEST_POWERCONTROL_EXTRA_ARGS</filename>
12331 for your own setup.
12332 The one requirement is that it accepts
12333 "on", "off", and "cycle" as the last argument.
12334 </note>
12335 </para></listitem>
12336 <listitem><para>
12337 When no command is defined, it connects to the
12338 device over SSH and uses the classic reboot command
12339 to reboot the device.
12340 Classic reboot is fine as long as the machine
12341 actually reboots (i.e. the SSH test has not
12342 failed).
12343 It is useful for scenarios where you have a simple
12344 setup, typically with a single board, and where
12345 some manual interaction is okay from time to time.
12346 </para></listitem>
12347 </itemizedlist>
12348 If you have no hardware to automatically perform power
12349 control but still wish to experiment with automated
12350 hardware testing, you can use the dialog-power-control
12351 script that shows a dialog prompting you to perform the
12352 required power action.
12353 This script requires either KDialog or Zenity to be
12354 installed.
12355 To use this script, set the
12356 <ulink url='&YOCTO_DOCS_REF_URL;#var-TEST_POWERCONTROL_CMD'><filename>TEST_POWERCONTROL_CMD</filename></ulink>
12357 variable as follows:
12358 <literallayout class='monospaced'>
12359 TEST_POWERCONTROL_CMD = "${COREBASE}/scripts/contrib/dialog-power-control"
12360 </literallayout>
12361 </para>
12362 </section>
12363
12364 <section id='serial-console-connection'>
12365 <title>Serial Console Connection</title>
12366
12367 <para>
12368 For test target classes requiring a serial console
12369 to interact with the bootloader (e.g. BeagleBoneTarget,
12370 EdgeRouterTarget, and GrubTarget), you need to
12371 specify a command to use to connect to the serial console
12372 of the target machine by using the
12373 <ulink url='&YOCTO_DOCS_REF_URL;#var-TEST_SERIALCONTROL_CMD'><filename>TEST_SERIALCONTROL_CMD</filename></ulink>
12374 variable and optionally the
12375 <ulink url='&YOCTO_DOCS_REF_URL;#var-TEST_SERIALCONTROL_EXTRA_ARGS'><filename>TEST_SERIALCONTROL_EXTRA_ARGS</filename></ulink>
12376 variable.
12377 </para>
12378
12379 <para>
12380 These cases could be a serial terminal program if the
12381 machine is connected to a local serial port, or a
12382 <filename>telnet</filename> or
12383 <filename>ssh</filename> command connecting to a remote
12384 console server.
12385 Regardless of the case, the command simply needs to
12386 connect to the serial console and forward that connection
12387 to standard input and output as any normal terminal
12388 program does.
12389 For example, to use the picocom terminal program on
12390 serial device <filename>/dev/ttyUSB0</filename>
12391 at 115200bps, you would set the variable as follows:
12392 <literallayout class='monospaced'>
12393 TEST_SERIALCONTROL_CMD = "picocom /dev/ttyUSB0 -b 115200"
12394 </literallayout>
12395 For local devices where the serial port device disappears
12396 when the device reboots, an additional "serdevtry" wrapper
12397 script is provided.
12398 To use this wrapper, simply prefix the terminal command
12399 with
12400 <filename>${COREBASE}/scripts/contrib/serdevtry</filename>:
12401 <literallayout class='monospaced'>
12402 TEST_SERIALCONTROL_CMD = "${COREBASE}/scripts/contrib/serdevtry picocom -b
12403115200 /dev/ttyUSB0"
12404 </literallayout>
12405 </para>
12406 </section>
12407 </section>
12408
12409 <section id="qemu-image-running-tests">
12410 <title>Running Tests</title>
12411
12412 <para>
12413 You can start the tests automatically or manually:
12414 <itemizedlist>
12415 <listitem><para><emphasis>Automatically running tests:</emphasis>
12416 To run the tests automatically after the
12417 OpenEmbedded build system successfully creates an image,
12418 first set the
12419 <ulink url='&YOCTO_DOCS_REF_URL;#var-TESTIMAGE_AUTO'><filename>TESTIMAGE_AUTO</filename></ulink>
12420 variable to "1" in your <filename>local.conf</filename>
12421 file in the
12422 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>:
12423 <literallayout class='monospaced'>
12424 TESTIMAGE_AUTO = "1"
12425 </literallayout>
12426 Next, build your image.
12427 If the image successfully builds, the tests run:
12428 <literallayout class='monospaced'>
12429 bitbake core-image-sato
12430 </literallayout></para></listitem>
12431 <listitem><para><emphasis>Manually running tests:</emphasis>
12432 To manually run the tests, first globally inherit the
12433 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-testimage*'><filename>testimage</filename></ulink>
12434 class by editing your <filename>local.conf</filename>
12435 file:
12436 <literallayout class='monospaced'>
12437 INHERIT += "testimage"
12438 </literallayout>
12439 Next, use BitBake to run the tests:
12440 <literallayout class='monospaced'>
12441 bitbake -c testimage <replaceable>image</replaceable>
12442 </literallayout></para></listitem>
12443 </itemizedlist>
12444 </para>
12445
12446 <para>
12447 All test files reside in
12448 <filename>meta/lib/oeqa/runtime</filename> in the
12449 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
12450 A test name maps directly to a Python module.
12451 Each test module may contain a number of individual tests.
12452 Tests are usually grouped together by the area
12453 tested (e.g tests for systemd reside in
12454 <filename>meta/lib/oeqa/runtime/systemd.py</filename>).
12455 </para>
12456
12457 <para>
12458 You can add tests to any layer provided you place them in the
12459 proper area and you extend
12460 <ulink url='&YOCTO_DOCS_REF_URL;#var-BBPATH'><filename>BBPATH</filename></ulink>
12461 in the <filename>local.conf</filename> file as normal.
12462 Be sure that tests reside in
12463 <filename><replaceable>layer</replaceable>/lib/oeqa/runtime</filename>.
12464 <note>
12465 Be sure that module names do not collide with module names
12466 used in the default set of test modules in
12467 <filename>meta/lib/oeqa/runtime</filename>.
12468 </note>
12469 </para>
12470
12471 <para>
12472 You can change the set of tests run by appending or overriding
12473 <ulink url='&YOCTO_DOCS_REF_URL;#var-TEST_SUITES'><filename>TEST_SUITES</filename></ulink>
12474 variable in <filename>local.conf</filename>.
12475 Each name in <filename>TEST_SUITES</filename> represents a
12476 required test for the image.
12477 Test modules named within <filename>TEST_SUITES</filename>
12478 cannot be skipped even if a test is not suitable for an image
12479 (e.g. running the RPM tests on an image without
12480 <filename>rpm</filename>).
12481 Appending "auto" to <filename>TEST_SUITES</filename> causes the
12482 build system to try to run all tests that are suitable for the
12483 image (i.e. each test module may elect to skip itself).
12484 </para>
12485
12486 <para>
12487 The order you list tests in <filename>TEST_SUITES</filename>
12488 is important and influences test dependencies.
12489 Consequently, tests that depend on other tests should be added
12490 after the test on which they depend.
12491 For example, since the <filename>ssh</filename> test
12492 depends on the
12493 <filename>ping</filename> test, "ssh" needs to come after
12494 "ping" in the list.
12495 The test class provides no re-ordering or dependency handling.
12496 <note>
12497 Each module can have multiple classes with multiple test
12498 methods.
12499 And, Python <filename>unittest</filename> rules apply.
12500 </note>
12501 </para>
12502
12503 <para>
12504 Here are some things to keep in mind when running tests:
12505 <itemizedlist>
12506 <listitem><para>The default tests for the image are defined
12507 as:
12508 <literallayout class='monospaced'>
12509 DEFAULT_TEST_SUITES_pn-<replaceable>image</replaceable> = "ping ssh df connman syslog xorg scp vnc date rpm dnf dmesg"
12510 </literallayout></para></listitem>
12511 <listitem><para>Add your own test to the list of the
12512 by using the following:
12513 <literallayout class='monospaced'>
12514 TEST_SUITES_append = " mytest"
12515 </literallayout></para></listitem>
12516 <listitem><para>Run a specific list of tests as follows:
12517 <literallayout class='monospaced'>
12518 TEST_SUITES = "test1 test2 test3"
12519 </literallayout>
12520 Remember, order is important.
12521 Be sure to place a test that is dependent on another test
12522 later in the order.</para></listitem>
12523 </itemizedlist>
12524 </para>
12525 </section>
12526
12527 <section id="exporting-tests">
12528 <title>Exporting Tests</title>
12529
12530 <para>
12531 You can export tests so that they can run independently of
12532 the build system.
12533 Exporting tests is required if you want to be able to hand
12534 the test execution off to a scheduler.
12535 You can only export tests that are defined in
12536 <ulink url='&YOCTO_DOCS_REF_URL;#var-TEST_SUITES'><filename>TEST_SUITES</filename></ulink>.
12537 </para>
12538
12539 <para>
12540 If your image is already built, make sure the following are set
12541 in your <filename>local.conf</filename> file:
12542 <literallayout class='monospaced'>
12543 INHERIT +="testexport"
12544 TEST_TARGET_IP = "<replaceable>IP-address-for-the-test-target</replaceable>"
12545 TEST_SERVER_IP = "<replaceable>IP-address-for-the-test-server</replaceable>"
12546 </literallayout>
12547 You can then export the tests with the following BitBake
12548 command form:
12549 <literallayout class='monospaced'>
12550 $ bitbake <replaceable>image</replaceable> -c testexport
12551 </literallayout>
12552 Exporting the tests places them in the
12553 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
12554 in
12555 <filename>tmp/testexport/</filename><replaceable>image</replaceable>,
12556 which is controlled by the
12557 <filename>TEST_EXPORT_DIR</filename> variable.
12558 </para>
12559
12560 <para>
12561 You can now run the tests outside of the build environment:
12562 <literallayout class='monospaced'>
12563 $ cd tmp/testexport/<replaceable>image</replaceable>
12564 $ ./runexported.py testdata.json
12565 </literallayout>
12566 </para>
12567
12568 <para>
12569 Here is a complete example that shows IP addresses and uses
12570 the <filename>core-image-sato</filename> image:
12571 <literallayout class='monospaced'>
12572 INHERIT +="testexport"
12573 TEST_TARGET_IP = "192.168.7.2"
12574 TEST_SERVER_IP = "192.168.7.1"
12575 </literallayout>
12576 Use BitBake to export the tests:
12577 <literallayout class='monospaced'>
12578 $ bitbake core-image-sato -c testexport
12579 </literallayout>
12580 Run the tests outside of the build environment using the
12581 following:
12582 <literallayout class='monospaced'>
12583 $ cd tmp/testexport/core-image-sato
12584 $ ./runexported.py testdata.json
12585 </literallayout>
12586 </para>
12587 </section>
12588
12589 <section id="qemu-image-writing-new-tests">
12590 <title>Writing New Tests</title>
12591
12592 <para>
12593 As mentioned previously, all new test files need to be in the
12594 proper place for the build system to find them.
12595 New tests for additional functionality outside of the core
12596 should be added to the layer that adds the functionality, in
12597 <filename><replaceable>layer</replaceable>/lib/oeqa/runtime</filename>
12598 (as long as
12599 <ulink url='&YOCTO_DOCS_REF_URL;#var-BBPATH'><filename>BBPATH</filename></ulink>
12600 is extended in the layer's
12601 <filename>layer.conf</filename> file as normal).
12602 Just remember the following:
12603 <itemizedlist>
12604 <listitem><para>Filenames need to map directly to test
12605 (module) names.
12606 </para></listitem>
12607 <listitem><para>Do not use module names that
12608 collide with existing core tests.
12609 </para></listitem>
12610 <listitem><para>Minimally, an empty
12611 <filename>__init__.py</filename> file must exist
12612 in the runtime directory.
12613 </para></listitem>
12614 </itemizedlist>
12615 </para>
12616
12617 <para>
12618 To create a new test, start by copying an existing module
12619 (e.g. <filename>syslog.py</filename> or
12620 <filename>gcc.py</filename> are good ones to use).
12621 Test modules can use code from
12622 <filename>meta/lib/oeqa/utils</filename>, which are helper
12623 classes.
12624 </para>
12625
12626 <note>
12627 Structure shell commands such that you rely on them and they
12628 return a single code for success.
12629 Be aware that sometimes you will need to parse the output.
12630 See the <filename>df.py</filename> and
12631 <filename>date.py</filename> modules for examples.
12632 </note>
12633
12634 <para>
12635 You will notice that all test classes inherit
12636 <filename>oeRuntimeTest</filename>, which is found in
12637 <filename>meta/lib/oetest.py</filename>.
12638 This base class offers some helper attributes, which are
12639 described in the following sections:
12640 </para>
12641
12642 <section id='qemu-image-writing-tests-class-methods'>
12643 <title>Class Methods</title>
12644
12645 <para>
12646 Class methods are as follows:
12647 <itemizedlist>
12648 <listitem><para><emphasis><filename>hasPackage(pkg)</filename>:</emphasis>
12649 Returns "True" if <filename>pkg</filename> is in the
12650 installed package list of the image, which is based
12651 on the manifest file that is generated during the
12652 <filename>do_rootfs</filename> task.
12653 </para></listitem>
12654 <listitem><para><emphasis><filename>hasFeature(feature)</filename>:</emphasis>
12655 Returns "True" if the feature is in
12656 <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></ulink>
12657 or
12658 <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></ulink>.
12659 </para></listitem>
12660 </itemizedlist>
12661 </para>
12662 </section>
12663
12664 <section id='qemu-image-writing-tests-class-attributes'>
12665 <title>Class Attributes</title>
12666
12667 <para>
12668 Class attributes are as follows:
12669 <itemizedlist>
12670 <listitem><para><emphasis><filename>pscmd</filename>:</emphasis>
12671 Equals "ps -ef" if <filename>procps</filename> is
12672 installed in the image.
12673 Otherwise, <filename>pscmd</filename> equals
12674 "ps" (busybox).
12675 </para></listitem>
12676 <listitem><para><emphasis><filename>tc</filename>:</emphasis>
12677 The called test context, which gives access to the
12678 following attributes:
12679 <itemizedlist>
12680 <listitem><para><emphasis><filename>d</filename>:</emphasis>
12681 The BitBake datastore, which allows you to
12682 use stuff such as
12683 <filename>oeRuntimeTest.tc.d.getVar("VIRTUAL-RUNTIME_init_manager")</filename>.
12684 </para></listitem>
12685 <listitem><para><emphasis><filename>testslist</filename> and <filename>testsrequired</filename>:</emphasis>
12686 Used internally.
12687 The tests do not need these.
12688 </para></listitem>
12689 <listitem><para><emphasis><filename>filesdir</filename>:</emphasis>
12690 The absolute path to
12691 <filename>meta/lib/oeqa/runtime/files</filename>,
12692 which contains helper files for tests meant
12693 for copying on the target such as small
12694 files written in C for compilation.
12695 </para></listitem>
12696 <listitem><para><emphasis><filename>target</filename>:</emphasis>
12697 The target controller object used to deploy
12698 and start an image on a particular target
12699 (e.g. Qemu, SimpleRemote, and
12700 SystemdbootTarget).
12701 Tests usually use the following:
12702 <itemizedlist>
12703 <listitem><para><emphasis><filename>ip</filename>:</emphasis>
12704 The target's IP address.
12705 </para></listitem>
12706 <listitem><para><emphasis><filename>server_ip</filename>:</emphasis>
12707 The host's IP address, which is
12708 usually used by the DNF test
12709 suite.
12710 </para></listitem>
12711 <listitem><para><emphasis><filename>run(cmd, timeout=None)</filename>:</emphasis>
12712 The single, most used method.
12713 This command is a wrapper for:
12714 <filename>ssh root@host "cmd"</filename>.
12715 The command returns a tuple:
12716 (status, output), which are what
12717 their names imply - the return code
12718 of "cmd" and whatever output
12719 it produces.
12720 The optional timeout argument
12721 represents the number of seconds the
12722 test should wait for "cmd" to
12723 return.
12724 If the argument is "None", the
12725 test uses the default instance's
12726 timeout period, which is 300
12727 seconds.
12728 If the argument is "0", the test
12729 runs until the command returns.
12730 </para></listitem>
12731 <listitem><para><emphasis><filename>copy_to(localpath, remotepath)</filename>:</emphasis>
12732 <filename>scp localpath root@ip:remotepath</filename>.
12733 </para></listitem>
12734 <listitem><para><emphasis><filename>copy_from(remotepath, localpath)</filename>:</emphasis>
12735 <filename>scp root@host:remotepath localpath</filename>.
12736 </para></listitem>
12737 </itemizedlist></para></listitem>
12738 </itemizedlist></para></listitem>
12739 </itemizedlist>
12740 </para>
12741 </section>
12742
12743 <section id='qemu-image-writing-tests-instance-attributes'>
12744 <title>Instance Attributes</title>
12745
12746 <para>
12747 A single instance attribute exists, which is
12748 <filename>target</filename>.
12749 The <filename>target</filename> instance attribute is
12750 identical to the class attribute of the same name, which
12751 is described in the previous section.
12752 This attribute exists as both an instance and class
12753 attribute so tests can use
12754 <filename>self.target.run(cmd)</filename> in instance
12755 methods instead of
12756 <filename>oeRuntimeTest.tc.target.run(cmd)</filename>.
12757 </para>
12758 </section>
12759 </section>
12760
12761 <section id='installing-packages-in-the-dut-without-the-package-manager'>
12762 <title>Installing Packages in the DUT Without the Package Manager</title>
12763
12764 <para>
12765 When a test requires a package built by BitBake, it is possible
12766 to install that package.
12767 Installing the package does not require a package manager be
12768 installed in the device under test (DUT).
12769 It does, however, require an SSH connection and the target must
12770 be using the <filename>sshcontrol</filename> class.
12771 <note>
12772 This method uses <filename>scp</filename> to copy files
12773 from the host to the target, which causes permissions and
12774 special attributes to be lost.
12775 </note>
12776 </para>
12777
12778 <para>
12779 A JSON file is used to define the packages needed by a test.
12780 This file must be in the same path as the file used to define
12781 the tests.
12782 Furthermore, the filename must map directly to the test
12783 module name with a <filename>.json</filename> extension.
12784 </para>
12785
12786 <para>
12787 The JSON file must include an object with the test name as
12788 keys of an object or an array.
12789 This object (or array of objects) uses the following data:
12790 <itemizedlist>
12791 <listitem><para>"pkg" - A mandatory string that is the
12792 name of the package to be installed.
12793 </para></listitem>
12794 <listitem><para>"rm" - An optional boolean, which defaults
12795 to "false", that specifies to remove the package after
12796 the test.
12797 </para></listitem>
12798 <listitem><para>"extract" - An optional boolean, which
12799 defaults to "false", that specifies if the package must
12800 be extracted from the package format.
12801 When set to "true", the package is not automatically
12802 installed into the DUT.
12803 </para></listitem>
12804 </itemizedlist>
12805 </para>
12806
12807 <para>
12808 Following is an example JSON file that handles test "foo"
12809 installing package "bar" and test "foobar" installing
12810 packages "foo" and "bar".
12811 Once the test is complete, the packages are removed from the
12812 DUT.
12813 <literallayout class='monospaced'>
12814 {
12815 "foo": {
12816 "pkg": "bar"
12817 },
12818 "foobar": [
12819 {
12820 "pkg": "foo",
12821 "rm": true
12822 },
12823 {
12824 "pkg": "bar",
12825 "rm": true
12826 }
12827 ]
12828 }
12829 </literallayout>
12830 </para>
12831 </section>
12832 </section>
12833
12834 <section id='usingpoky-debugging-tools-and-techniques'>
12835 <title>Debugging Tools and Techniques</title>
12836
12837 <para>
12838 The exact method for debugging build failures depends on the nature
12839 of the problem and on the system's area from which the bug
12840 originates.
12841 Standard debugging practices such as comparison against the last
12842 known working version with examination of the changes and the
12843 re-application of steps to identify the one causing the problem are
12844 valid for the Yocto Project just as they are for any other system.
12845 Even though it is impossible to detail every possible potential
12846 failure, this section provides some general tips to aid in
12847 debugging given a variety of situations.
12848 <note><title>Tip</title>
12849 A useful feature for debugging is the error reporting tool.
12850 Configuring the Yocto Project to use this tool causes the
12851 OpenEmbedded build system to produce error reporting commands as
12852 part of the console output.
12853 You can enter the commands after the build completes to log
12854 error information into a common database, that can help you
12855 figure out what might be going wrong.
12856 For information on how to enable and use this feature, see the
12857 "<link linkend='using-the-error-reporting-tool'>Using the Error Reporting Tool</link>"
12858 section.
12859 </note>
12860 </para>
12861
12862 <para>
12863 The following list shows the debugging topics in the remainder of
12864 this section:
12865 <itemizedlist>
12866 <listitem><para>
12867 "<link linkend='dev-debugging-viewing-logs-from-failed-tasks'>Viewing Logs from Failed Tasks</link>"
12868 describes how to find and view logs from tasks that
12869 failed during the build process.
12870 </para></listitem>
12871 <listitem><para>
12872 "<link linkend='dev-debugging-viewing-variable-values'>Viewing Variable Values</link>"
12873 describes how to use the BitBake <filename>-e</filename>
12874 option to examine variable values after a recipe has been
12875 parsed.
12876 </para></listitem>
12877 <listitem><para>
12878 "<link linkend='viewing-package-information-with-oe-pkgdata-util'>Viewing Package Information with <filename>oe-pkgdata-util</filename></link>"
12879 describes how to use the
12880 <filename>oe-pkgdata-util</filename> utility to query
12881 <ulink url='&YOCTO_DOCS_REF_URL;#var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></ulink>
12882 and display package-related information for built
12883 packages.
12884 </para></listitem>
12885 <listitem><para>
12886 "<link linkend='dev-viewing-dependencies-between-recipes-and-tasks'>Viewing Dependencies Between Recipes and Tasks</link>"
12887 describes how to use the BitBake <filename>-g</filename>
12888 option to display recipe dependency information used
12889 during the build.
12890 </para></listitem>
12891 <listitem><para>
12892 "<link linkend='dev-viewing-task-variable-dependencies'>Viewing Task Variable Dependencies</link>"
12893 describes how to use the
12894 <filename>bitbake-dumpsig</filename> command in
12895 conjunction with key subdirectories in the
12896 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
12897 to determine variable dependencies.
12898 </para></listitem>
12899 <listitem><para>
12900 "<link linkend='dev-debugging-taskrunning'>Running Specific Tasks</link>"
12901 describes how to use several BitBake options (e.g.
12902 <filename>-c</filename>, <filename>-C</filename>, and
12903 <filename>-f</filename>) to run specific tasks in the
12904 build chain.
12905 It can be useful to run tasks "out-of-order" when trying
12906 isolate build issues.
12907 </para></listitem>
12908 <listitem><para>
12909 "<link linkend='dev-debugging-bitbake'>General BitBake Problems</link>"
12910 describes how to use BitBake's <filename>-D</filename>
12911 debug output option to reveal more about what BitBake is
12912 doing during the build.
12913 </para></listitem>
12914 <listitem><para>
12915 "<link linkend='dev-debugging-buildfile'>Building with No Dependencies</link>"
12916 describes how to use the BitBake <filename>-b</filename>
12917 option to build a recipe while ignoring dependencies.
12918 </para></listitem>
12919 <listitem><para>
12920 "<link linkend='recipe-logging-mechanisms'>Recipe Logging Mechanisms</link>"
12921 describes how to use the many recipe logging functions
12922 to produce debugging output and report errors and warnings.
12923 </para></listitem>
12924 <listitem><para>
12925 "<link linkend='debugging-parallel-make-races'>Debugging Parallel Make Races</link>"
12926 describes how to debug situations where the build consists
12927 of several parts that are run simultaneously and when the
12928 output or result of one part is not ready for use with a
12929 different part of the build that depends on that output.
12930 </para></listitem>
12931 <listitem><para>
12932 "<link linkend='platdev-gdb-remotedebug'>Debugging With the GNU Project Debugger (GDB) Remotely</link>"
12933 describes how to use GDB to allow you to examine running
12934 programs, which can help you fix problems.
12935 </para></listitem>
12936 <listitem><para>
12937 "<link linkend='debugging-with-the-gnu-project-debugger-gdb-on-the-target'>Debugging with the GNU Project Debugger (GDB) on the Target</link>"
12938 describes how to use GDB directly on target hardware for
12939 debugging.
12940 </para></listitem>
12941 <listitem><para>
12942 "<link linkend='dev-other-debugging-others'>Other Debugging Tips</link>"
12943 describes miscellaneous debugging tips that can be useful.
12944 </para></listitem>
12945 </itemizedlist>
12946 </para>
12947
12948 <section id='dev-debugging-viewing-logs-from-failed-tasks'>
12949 <title>Viewing Logs from Failed Tasks</title>
12950
12951 <para>
12952 You can find the log for a task in the file
12953 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink><filename>}/temp/log.do_</filename><replaceable>taskname</replaceable>.
12954 For example, the log for the
12955 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-compile'><filename>do_compile</filename></ulink>
12956 task of the QEMU minimal image for the x86 machine
12957 (<filename>qemux86</filename>) might be in
12958 <filename>tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/temp/log.do_compile</filename>.
12959 To see the commands
12960 <ulink url='&YOCTO_DOCS_REF_URL;#bitbake-term'>BitBake</ulink>
12961 ran to generate a log, look at the corresponding
12962 <filename>run.do_</filename><replaceable>taskname</replaceable>
12963 file in the same directory.
12964 </para>
12965
12966 <para>
12967 <filename>log.do_</filename><replaceable>taskname</replaceable>
12968 and
12969 <filename>run.do_</filename><replaceable>taskname</replaceable>
12970 are actually symbolic links to
12971 <filename>log.do_</filename><replaceable>taskname</replaceable><filename>.</filename><replaceable>pid</replaceable>
12972 and
12973 <filename>log.run_</filename><replaceable>taskname</replaceable><filename>.</filename><replaceable>pid</replaceable>,
12974 where <replaceable>pid</replaceable> is the PID the task had
12975 when it ran.
12976 The symlinks always point to the files corresponding to the most
12977 recent run.
12978 </para>
12979 </section>
12980
12981 <section id='dev-debugging-viewing-variable-values'>
12982 <title>Viewing Variable Values</title>
12983
12984 <para>
12985 Sometimes you need to know the value of a variable as a
12986 result of BitBake's parsing step.
12987 This could be because some unexpected behavior occurred
12988 in your project.
12989 Perhaps an attempt to
12990 <ulink url='&YOCTO_DOCS_BB_URL;#modifying-existing-variables'>modify a variable</ulink>
12991 did not work out as expected.
12992 </para>
12993
12994 <para>
12995 BitBake's <filename>-e</filename> option is used to display
12996 variable values after parsing.
12997 The following command displays the variable values after the
12998 configuration files (i.e. <filename>local.conf</filename>,
12999 <filename>bblayers.conf</filename>,
13000 <filename>bitbake.conf</filename> and so forth) have been
13001 parsed:
13002 <literallayout class='monospaced'>
13003 $ bitbake -e
13004 </literallayout>
13005 The following command displays variable values after a specific
13006 recipe has been parsed.
13007 The variables include those from the configuration as well:
13008 <literallayout class='monospaced'>
13009 $ bitbake -e recipename
13010 </literallayout>
13011 <note><para>
13012 Each recipe has its own private set of variables
13013 (datastore).
13014 Internally, after parsing the configuration, a copy of the
13015 resulting datastore is made prior to parsing each recipe.
13016 This copying implies that variables set in one recipe will
13017 not be visible to other recipes.</para>
13018
13019 <para>Likewise, each task within a recipe gets a private
13020 datastore based on the recipe datastore, which means that
13021 variables set within one task will not be visible to
13022 other tasks.</para>
13023 </note>
13024 </para>
13025
13026 <para>
13027 In the output of <filename>bitbake -e</filename>, each
13028 variable is preceded by a description of how the variable
13029 got its value, including temporary values that were later
13030 overriden.
13031 This description also includes variable flags (varflags) set on
13032 the variable.
13033 The output can be very helpful during debugging.
13034 </para>
13035
13036 <para>
13037 Variables that are exported to the environment are preceded by
13038 <filename>export</filename> in the output of
13039 <filename>bitbake -e</filename>.
13040 See the following example:
13041 <literallayout class='monospaced'>
13042 export CC="i586-poky-linux-gcc -m32 -march=i586 --sysroot=/home/ulf/poky/build/tmp/sysroots/qemux86"
13043 </literallayout>
13044 </para>
13045
13046 <para>
13047 In addition to variable values, the output of the
13048 <filename>bitbake -e</filename> and
13049 <filename>bitbake -e</filename>&nbsp;<replaceable>recipe</replaceable>
13050 commands includes the following information:
13051 <itemizedlist>
13052 <listitem><para>
13053 The output starts with a tree listing all configuration
13054 files and classes included globally, recursively listing
13055 the files they include or inherit in turn.
13056 Much of the behavior of the OpenEmbedded build system
13057 (including the behavior of the
13058 <ulink url='&YOCTO_DOCS_REF_URL;#normal-recipe-build-tasks'>normal recipe build tasks</ulink>)
13059 is implemented in the
13060 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-base'><filename>base</filename></ulink>
13061 class and the classes it inherits, rather than being
13062 built into BitBake itself.
13063 </para></listitem>
13064 <listitem><para>
13065 After the variable values, all functions appear in the
13066 output.
13067 For shell functions, variables referenced within the
13068 function body are expanded.
13069 If a function has been modified using overrides or
13070 using override-style operators like
13071 <filename>_append</filename> and
13072 <filename>_prepend</filename>, then the final assembled
13073 function body appears in the output.
13074 </para></listitem>
13075 </itemizedlist>
13076 </para>
13077 </section>
13078
13079 <section id='viewing-package-information-with-oe-pkgdata-util'>
13080 <title>Viewing Package Information with <filename>oe-pkgdata-util</filename></title>
13081
13082 <para>
13083 You can use the <filename>oe-pkgdata-util</filename>
13084 command-line utility to query
13085 <ulink url='&YOCTO_DOCS_REF_URL;#var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></ulink>
13086 and display various package-related information.
13087 When you use the utility, you must use it to view information
13088 on packages that have already been built.
13089 </para>
13090
13091 <para>
13092 Following are a few of the available
13093 <filename>oe-pkgdata-util</filename> subcommands.
13094 <note>
13095 You can use the standard * and ? globbing wildcards as part
13096 of package names and paths.
13097 </note>
13098 <itemizedlist>
13099 <listitem><para>
13100 <filename>oe-pkgdata-util list-pkgs [</filename><replaceable>pattern</replaceable><filename>]</filename>:
13101 Lists all packages that have been built, optionally
13102 limiting the match to packages that match
13103 <replaceable>pattern</replaceable>.
13104 </para></listitem>
13105 <listitem><para>
13106 <filename>oe-pkgdata-util list-pkg-files&nbsp;</filename><replaceable>package</replaceable><filename>&nbsp;...</filename>:
13107 Lists the files and directories contained in the given
13108 packages.
13109 <note>
13110 <para>
13111 A different way to view the contents of a package is
13112 to look at the
13113 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink><filename>}/packages-split</filename>
13114 directory of the recipe that generates the
13115 package.
13116 This directory is created by the
13117 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-package'><filename>do_package</filename></ulink>
13118 task and has one subdirectory for each package the
13119 recipe generates, which contains the files stored in
13120 that package.</para>
13121 <para>
13122 If you want to inspect the
13123 <filename>${WORKDIR}/packages-split</filename>
13124 directory, make sure that
13125 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-rm-work'><filename>rm_work</filename></ulink>
13126 is not enabled when you build the recipe.
13127 </para>
13128 </note>
13129 </para></listitem>
13130 <listitem><para>
13131 <filename>oe-pkgdata-util find-path&nbsp;</filename><replaceable>path</replaceable><filename>&nbsp;...</filename>:
13132 Lists the names of the packages that contain the given
13133 paths.
13134 For example, the following tells us that
13135 <filename>/usr/share/man/man1/make.1</filename>
13136 is contained in the <filename>make-doc</filename>
13137 package:
13138 <literallayout class='monospaced'>
13139 $ oe-pkgdata-util find-path /usr/share/man/man1/make.1
13140 make-doc: /usr/share/man/man1/make.1
13141 </literallayout>
13142 </para></listitem>
13143 <listitem><para>
13144 <filename>oe-pkgdata-util lookup-recipe&nbsp;</filename><replaceable>package</replaceable><filename>&nbsp;...</filename>:
13145 Lists the name of the recipes that
13146 produce the given packages.
13147 </para></listitem>
13148 </itemizedlist>
13149 </para>
13150
13151 <para>
13152 For more information on the <filename>oe-pkgdata-util</filename>
13153 command, use the help facility:
13154 <literallayout class='monospaced'>
13155 $ oe-pkgdata-util &dash;&dash;help
13156 $ oe-pkgdata-util <replaceable>subcommand</replaceable> --help
13157 </literallayout>
13158 </para>
13159 </section>
13160
13161 <section id='dev-viewing-dependencies-between-recipes-and-tasks'>
13162 <title>Viewing Dependencies Between Recipes and Tasks</title>
13163
13164 <para>
13165 Sometimes it can be hard to see why BitBake wants to build other
13166 recipes before the one you have specified.
13167 Dependency information can help you understand why a recipe is
13168 built.
13169 </para>
13170
13171 <para>
13172 To generate dependency information for a recipe, run the
13173 following command:
13174 <literallayout class='monospaced'>
13175 $ bitbake -g <replaceable>recipename</replaceable>
13176 </literallayout>
13177 This command writes the following files in the current
13178 directory:
13179 <itemizedlist>
13180 <listitem><para>
13181 <filename>pn-buildlist</filename>: A list of
13182 recipes/targets involved in building
13183 <replaceable>recipename</replaceable>.
13184 "Involved" here means that at least one task from the
13185 recipe needs to run when building
13186 <replaceable>recipename</replaceable> from scratch.
13187 Targets that are in
13188 <ulink url='&YOCTO_DOCS_REF_URL;#var-ASSUME_PROVIDED'><filename>ASSUME_PROVIDED</filename></ulink>
13189 are not listed.
13190 </para></listitem>
13191 <listitem><para>
13192 <filename>task-depends.dot</filename>: A graph showing
13193 dependencies between tasks.
13194 </para></listitem>
13195 </itemizedlist>
13196 </para>
13197
13198 <para>
13199 The graphs are in
13200 <ulink url='https://en.wikipedia.org/wiki/DOT_%28graph_description_language%29'>DOT</ulink>
13201 format and can be converted to images (e.g. using the
13202 <filename>dot</filename> tool from
13203 <ulink url='http://www.graphviz.org/'>Graphviz</ulink>).
13204 <note><title>Notes</title>
13205 <itemizedlist>
13206 <listitem><para>
13207 DOT files use a plain text format.
13208 The graphs generated using the
13209 <filename>bitbake -g</filename> command are often so
13210 large as to be difficult to read without special
13211 pruning (e.g. with Bitbake's
13212 <filename>-I</filename> option) and processing.
13213 Despite the form and size of the graphs, the
13214 corresponding <filename>.dot</filename> files can
13215 still be possible to read and provide useful
13216 information.
13217 </para>
13218
13219 <para>As an example, the
13220 <filename>task-depends.dot</filename> file contains
13221 lines such as the following:
13222 <literallayout class='monospaced'>
13223 "libxslt.do_configure" -> "libxml2.do_populate_sysroot"
13224 </literallayout>
13225 The above example line reveals that the
13226 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-configure'><filename>do_configure</filename></ulink>
13227 task in <filename>libxslt</filename> depends on the
13228 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-populate_sysroot'><filename>do_populate_sysroot</filename></ulink>
13229 task in <filename>libxml2</filename>, which is a
13230 normal
13231 <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPENDS'><filename>DEPENDS</filename></ulink>
13232 dependency between the two recipes.
13233 </para></listitem>
13234 <listitem><para>
13235 For an example of how <filename>.dot</filename>
13236 files can be processed, see the
13237 <filename>scripts/contrib/graph-tool</filename>
13238 Python script, which finds and displays paths
13239 between graph nodes.
13240 </para></listitem>
13241 </itemizedlist>
13242 </note>
13243 </para>
13244
13245 <para>
13246 You can use a different method to view dependency information
13247 by using the following command:
13248 <literallayout class='monospaced'>
13249 $ bitbake -g -u taskexp <replaceable>recipename</replaceable>
13250 </literallayout>
13251 This command displays a GUI window from which you can view
13252 build-time and runtime dependencies for the recipes involved in
13253 building <replaceable>recipename</replaceable>.
13254 </para>
13255 </section>
13256
13257 <section id='dev-viewing-task-variable-dependencies'>
13258 <title>Viewing Task Variable Dependencies</title>
13259
13260 <para>
13261 As mentioned in the
13262 "<ulink url='&YOCTO_DOCS_BB_URL;#checksums'>Checksums (Signatures)</ulink>"
13263 section of the BitBake User Manual, BitBake tries to
13264 automatically determine what variables a task depends on so
13265 that it can rerun the task if any values of the variables
13266 change.
13267 This determination is usually reliable.
13268 However, if you do things like construct variable names at
13269 runtime, then you might have to manually declare dependencies
13270 on those variables using <filename>vardeps</filename> as
13271 described in the
13272 "<ulink url='&YOCTO_DOCS_BB_URL;#variable-flags'>Variable Flags</ulink>"
13273 section of the BitBake User Manual.
13274 </para>
13275
13276 <para>
13277 If you are unsure whether a variable dependency is being
13278 picked up automatically for a given task, you can list the
13279 variable dependencies BitBake has determined by doing the
13280 following:
13281 <orderedlist>
13282 <listitem><para>
13283 Build the recipe containing the task:
13284 <literallayout class='monospaced'>
13285 $ bitbake <replaceable>recipename</replaceable>
13286 </literallayout>
13287 </para></listitem>
13288 <listitem><para>
13289 Inside the
13290 <ulink url='&YOCTO_DOCS_REF_URL;#var-STAMPS_DIR'><filename>STAMPS_DIR</filename></ulink>
13291 directory, find the signature data
13292 (<filename>sigdata</filename>) file that corresponds
13293 to the task.
13294 The <filename>sigdata</filename> files contain a pickled
13295 Python database of all the metadata that went into
13296 creating the input checksum for the task.
13297 As an example, for the
13298 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-fetch'><filename>do_fetch</filename></ulink>
13299 task of the <filename>db</filename> recipe, the
13300 <filename>sigdata</filename> file might be found in the
13301 following location:
13302 <literallayout class='monospaced'>
13303 ${BUILDDIR}/tmp/stamps/i586-poky-linux/db/6.0.30-r1.do_fetch.sigdata.7c048c18222b16ff0bcee2000ef648b1
13304 </literallayout>
13305 For tasks that are accelerated through the shared state
13306 (<ulink url='&YOCTO_DOCS_OM_URL;#shared-state-cache'>sstate</ulink>)
13307 cache, an additional <filename>siginfo</filename> file
13308 is written into
13309 <ulink url='&YOCTO_DOCS_REF_URL;#var-SSTATE_DIR'><filename>SSTATE_DIR</filename></ulink>
13310 along with the cached task output.
13311 The <filename>siginfo</filename> files contain exactly
13312 the same information as <filename>sigdata</filename>
13313 files.
13314 </para></listitem>
13315 <listitem><para>
13316 Run <filename>bitbake-dumpsig</filename> on the
13317 <filename>sigdata</filename> or
13318 <filename>siginfo</filename> file.
13319 Here is an example:
13320 <literallayout class='monospaced'>
13321 $ bitbake-dumpsig ${BUILDDIR}/tmp/stamps/i586-poky-linux/db/6.0.30-r1.do_fetch.sigdata.7c048c18222b16ff0bcee2000ef648b1
13322 </literallayout>
13323 In the output of the above command, you will find a
13324 line like the following, which lists all the (inferred)
13325 variable dependencies for the task.
13326 This list also includes indirect dependencies from
13327 variables depending on other variables, recursively.
13328 <literallayout class='monospaced'>
13329 Task dependencies: ['PV', 'SRCREV', 'SRC_URI', 'SRC_URI[md5sum]', 'SRC_URI[sha256sum]', 'base_do_fetch']
13330 </literallayout>
13331 <note>
13332 Functions (e.g. <filename>base_do_fetch</filename>)
13333 also count as variable dependencies.
13334 These functions in turn depend on the variables they
13335 reference.
13336 </note>
13337 The output of <filename>bitbake-dumpsig</filename> also
13338 includes the value each variable had, a list of
13339 dependencies for each variable, and
13340 <ulink url='&YOCTO_DOCS_BB_URL;#var-BB_HASHBASE_WHITELIST'><filename>BB_HASHBASE_WHITELIST</filename></ulink>
13341 information.
13342 </para></listitem>
13343 </orderedlist>
13344 </para>
13345
13346 <para>
13347 There is also a <filename>bitbake-diffsigs</filename> command
13348 for comparing two <filename>siginfo</filename> or
13349 <filename>sigdata</filename> files.
13350 This command can be helpful when trying to figure out what
13351 changed between two versions of a task.
13352 If you call <filename>bitbake-diffsigs</filename> with just one
13353 file, the command behaves like
13354 <filename>bitbake-dumpsig</filename>.
13355 </para>
13356
13357 <para>
13358 You can also use BitBake to dump out the signature construction
13359 information without executing tasks by using either of the
13360 following BitBake command-line options:
13361 <literallayout class='monospaced'>
13362 &dash;&dash;dump-signatures=<replaceable>SIGNATURE_HANDLER</replaceable>
13363 -S <replaceable>SIGNATURE_HANDLER</replaceable>
13364 </literallayout>
13365 <note>
13366 Two common values for
13367 <replaceable>SIGNATURE_HANDLER</replaceable> are "none" and
13368 "printdiff", which dump only the signature or compare the
13369 dumped signature with the cached one, respectively.
13370 </note>
13371 Using BitBake with either of these options causes BitBake to
13372 dump out <filename>sigdata</filename> files in the
13373 <filename>stamps</filename> directory for every task it would
13374 have executed instead of building the specified target package.
13375 </para>
13376 </section>
13377
13378 <section id='dev-viewing-metadata-used-to-create-the-input-signature-of-a-shared-state-task'>
13379 <title>Viewing Metadata Used to Create the Input Signature of a Shared State Task</title>
13380
13381 <para>
13382 Seeing what metadata went into creating the input signature
13383 of a shared state (sstate) task can be a useful debugging
13384 aid.
13385 This information is available in signature information
13386 (<filename>siginfo</filename>) files in
13387 <ulink url='&YOCTO_DOCS_REF_URL;#var-SSTATE_DIR'><filename>SSTATE_DIR</filename></ulink>.
13388 For information on how to view and interpret information in
13389 <filename>siginfo</filename> files, see the
13390 "<link linkend='dev-viewing-task-variable-dependencies'>Viewing Task Variable Dependencies</link>"
13391 section.
13392 </para>
13393
13394 <para>
13395 For conceptual information on shared state, see the
13396 "<ulink url='&YOCTO_DOCS_OM_URL;#shared-state'>Shared State</ulink>"
13397 section in the Yocto Project Overview and Concepts Manual.
13398 </para>
13399 </section>
13400
13401 <section id='dev-invalidating-shared-state-to-force-a-task-to-run'>
13402 <title>Invalidating Shared State to Force a Task to Run</title>
13403
13404 <para>
13405 The OpenEmbedded build system uses
13406 <ulink url='&YOCTO_DOCS_OM_URL;#overview-checksums'>checksums</ulink>
13407 and
13408 <ulink url='&YOCTO_DOCS_OM_URL;#shared-state'>shared state</ulink>
13409 cache to avoid unnecessarily rebuilding tasks.
13410 Collectively, this scheme is known as "shared state code."
13411 </para>
13412
13413 <para>
13414 As with all schemes, this one has some drawbacks.
13415 It is possible that you could make implicit changes to your
13416 code that the checksum calculations do not take into
13417 account.
13418 These implicit changes affect a task's output but do not
13419 trigger the shared state code into rebuilding a recipe.
13420 Consider an example during which a tool changes its output.
13421 Assume that the output of <filename>rpmdeps</filename>
13422 changes.
13423 The result of the change should be that all the
13424 <filename>package</filename> and
13425 <filename>package_write_rpm</filename> shared state cache
13426 items become invalid.
13427 However, because the change to the output is
13428 external to the code and therefore implicit,
13429 the associated shared state cache items do not become
13430 invalidated.
13431 In this case, the build process uses the cached items
13432 rather than running the task again.
13433 Obviously, these types of implicit changes can cause
13434 problems.
13435 </para>
13436
13437 <para>
13438 To avoid these problems during the build, you need to
13439 understand the effects of any changes you make.
13440 Realize that changes you make directly to a function
13441 are automatically factored into the checksum calculation.
13442 Thus, these explicit changes invalidate the associated
13443 area of shared state cache.
13444 However, you need to be aware of any implicit changes that
13445 are not obvious changes to the code and could affect
13446 the output of a given task.
13447 </para>
13448
13449 <para>
13450 When you identify an implicit change, you can easily
13451 take steps to invalidate the cache and force the tasks
13452 to run.
13453 The steps you can take are as simple as changing a
13454 function's comments in the source code.
13455 For example, to invalidate package shared state files,
13456 change the comment statements of
13457 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-package'><filename>do_package</filename></ulink>
13458 or the comments of one of the functions it calls.
13459 Even though the change is purely cosmetic, it causes the
13460 checksum to be recalculated and forces the build system to
13461 run the task again.
13462 <note>
13463 For an example of a commit that makes a cosmetic
13464 change to invalidate shared state, see this
13465 <ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/commit/meta/classes/package.bbclass?id=737f8bbb4f27b4837047cb9b4fbfe01dfde36d54'>commit</ulink>.
13466 </note>
13467 </para>
13468 </section>
13469
13470 <section id='dev-debugging-taskrunning'>
13471 <title>Running Specific Tasks</title>
13472
13473 <para>
13474 Any given recipe consists of a set of tasks.
13475 The standard BitBake behavior in most cases is:
13476 <filename>do_fetch</filename>,
13477 <filename>do_unpack</filename>,
13478 <filename>do_patch</filename>,
13479 <filename>do_configure</filename>,
13480 <filename>do_compile</filename>,
13481 <filename>do_install</filename>,
13482 <filename>do_package</filename>,
13483 <filename>do_package_write_*</filename>, and
13484 <filename>do_build</filename>.
13485 The default task is <filename>do_build</filename> and any tasks
13486 on which it depends build first.
13487 Some tasks, such as <filename>do_devshell</filename>, are not
13488 part of the default build chain.
13489 If you wish to run a task that is not part of the default build
13490 chain, you can use the <filename>-c</filename> option in
13491 BitBake.
13492 Here is an example:
13493 <literallayout class='monospaced'>
13494 $ bitbake matchbox-desktop -c devshell
13495 </literallayout>
13496 </para>
13497
13498 <para>
13499 The <filename>-c</filename> option respects task dependencies,
13500 which means that all other tasks (including tasks from other
13501 recipes) that the specified task depends on will be run before
13502 the task.
13503 Even when you manually specify a task to run with
13504 <filename>-c</filename>, BitBake will only run the task if it
13505 considers it "out of date".
13506 See the
13507 "<ulink url='&YOCTO_DOCS_OM_URL;#stamp-files-and-the-rerunning-of-tasks'>Stamp Files and the Rerunning of Tasks</ulink>"
13508 section in the Yocto Project Overview and Concepts Manual for
13509 how BitBake determines whether a task is "out of date".
13510 </para>
13511
13512 <para>
13513 If you want to force an up-to-date task to be rerun (e.g.
13514 because you made manual modifications to the recipe's
13515 <ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink>
13516 that you want to try out), then you can use the
13517 <filename>-f</filename> option.
13518 <note>
13519 The reason <filename>-f</filename> is never required when
13520 running the
13521 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-devshell'><filename>do_devshell</filename></ulink>
13522 task is because the
13523 <filename>[</filename><ulink url='&YOCTO_DOCS_BB_URL;#variable-flags'><filename>nostamp</filename></ulink><filename>]</filename>
13524 variable flag is already set for the task.
13525 </note>
13526 The following example shows one way you can use the
13527 <filename>-f</filename> option:
13528 <literallayout class='monospaced'>
13529 $ bitbake matchbox-desktop
13530 .
13531 .
13532 make some changes to the source code in the work directory
13533 .
13534 .
13535 $ bitbake matchbox-desktop -c compile -f
13536 $ bitbake matchbox-desktop
13537 </literallayout>
13538 </para>
13539
13540 <para>
13541 This sequence first builds and then recompiles
13542 <filename>matchbox-desktop</filename>.
13543 The last command reruns all tasks (basically the packaging
13544 tasks) after the compile.
13545 BitBake recognizes that the <filename>do_compile</filename>
13546 task was rerun and therefore understands that the other tasks
13547 also need to be run again.
13548 </para>
13549
13550 <para>
13551 Another, shorter way to rerun a task and all
13552 <ulink url='&YOCTO_DOCS_REF_URL;#normal-recipe-build-tasks'>normal recipe build tasks</ulink>
13553 that depend on it is to use the <filename>-C</filename>
13554 option.
13555 <note>
13556 This option is upper-cased and is separate from the
13557 <filename>-c</filename> option, which is lower-cased.
13558 </note>
13559 Using this option invalidates the given task and then runs the
13560 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-build'><filename>do_build</filename></ulink>
13561 task, which is the default task if no task is given, and the
13562 tasks on which it depends.
13563 You could replace the final two commands in the previous example
13564 with the following single command:
13565 <literallayout class='monospaced'>
13566 $ bitbake matchbox-desktop -C compile
13567 </literallayout>
13568 Internally, the <filename>-f</filename> and
13569 <filename>-C</filename> options work by tainting (modifying) the
13570 input checksum of the specified task.
13571 This tainting indirectly causes the task and its
13572 dependent tasks to be rerun through the normal task dependency
13573 mechanisms.
13574 <note>
13575 BitBake explicitly keeps track of which tasks have been
13576 tainted in this fashion, and will print warnings such as the
13577 following for builds involving such tasks:
13578 <literallayout class='monospaced'>
13579 WARNING: /home/ulf/poky/meta/recipes-sato/matchbox-desktop/matchbox-desktop_2.1.bb.do_compile is tainted from a forced run
13580 </literallayout>
13581 The purpose of the warning is to let you know that the work
13582 directory and build output might not be in the clean state
13583 they would be in for a "normal" build, depending on what
13584 actions you took.
13585 To get rid of such warnings, you can remove the work
13586 directory and rebuild the recipe, as follows:
13587 <literallayout class='monospaced'>
13588 $ bitbake matchbox-desktop -c clean
13589 $ bitbake matchbox-desktop
13590 </literallayout>
13591 </note>
13592 </para>
13593
13594 <para>
13595 You can view a list of tasks in a given package by running the
13596 <filename>do_listtasks</filename> task as follows:
13597 <literallayout class='monospaced'>
13598 $ bitbake matchbox-desktop -c listtasks
13599 </literallayout>
13600 The results appear as output to the console and are also in the
13601 file <filename>${WORKDIR}/temp/log.do_listtasks</filename>.
13602 </para>
13603 </section>
13604
13605 <section id='dev-debugging-bitbake'>
13606 <title>General BitBake Problems</title>
13607
13608 <para>
13609 You can see debug output from BitBake by using the
13610 <filename>-D</filename> option.
13611 The debug output gives more information about what BitBake
13612 is doing and the reason behind it.
13613 Each <filename>-D</filename> option you use increases the
13614 logging level.
13615 The most common usage is <filename>-DDD</filename>.
13616 </para>
13617
13618 <para>
13619 The output from
13620 <filename>bitbake -DDD -v</filename> <replaceable>targetname</replaceable>
13621 can reveal why BitBake chose a certain version of a package or
13622 why BitBake picked a certain provider.
13623 This command could also help you in a situation where you think
13624 BitBake did something unexpected.
13625 </para>
13626 </section>
13627
13628 <section id='dev-debugging-buildfile'>
13629 <title>Building with No Dependencies</title>
13630
13631 <para>
13632 To build a specific recipe (<filename>.bb</filename> file),
13633 you can use the following command form:
13634 <literallayout class='monospaced'>
13635 $ bitbake -b <replaceable>somepath</replaceable>/<replaceable>somerecipe</replaceable>.bb
13636 </literallayout>
13637 This command form does not check for dependencies.
13638 Consequently, you should use it only when you know existing
13639 dependencies have been met.
13640 <note>
13641 You can also specify fragments of the filename.
13642 In this case, BitBake checks for a unique match.
13643 </note>
13644 </para>
13645 </section>
13646
13647 <section id='recipe-logging-mechanisms'>
13648 <title>Recipe Logging Mechanisms</title>
13649
13650 <para>
13651 The Yocto Project provides several logging functions for
13652 producing debugging output and reporting errors and warnings.
13653 For Python functions, the following logging functions exist.
13654 All of these functions log to
13655 <filename>${T}/log.do_</filename><replaceable>task</replaceable>,
13656 and can also log to standard output (stdout) with the right
13657 settings:
13658 <itemizedlist>
13659 <listitem><para>
13660 <filename>bb.plain(</filename><replaceable>msg</replaceable><filename>)</filename>:
13661 Writes <replaceable>msg</replaceable> as is to the
13662 log while also logging to stdout.
13663 </para></listitem>
13664 <listitem><para>
13665 <filename>bb.note(</filename><replaceable>msg</replaceable><filename>)</filename>:
13666 Writes "NOTE: <replaceable>msg</replaceable>" to the
13667 log.
13668 Also logs to stdout if BitBake is called with "-v".
13669 </para></listitem>
13670 <listitem><para>
13671 <filename>bb.debug(</filename><replaceable>level</replaceable><filename>,&nbsp;</filename><replaceable>msg</replaceable><filename>)</filename>:
13672 Writes "DEBUG: <replaceable>msg</replaceable>" to the
13673 log.
13674 Also logs to stdout if the log level is greater than or
13675 equal to <replaceable>level</replaceable>.
13676 See the
13677 "<ulink url='&YOCTO_DOCS_BB_URL;#usage-and-syntax'>-D</ulink>"
13678 option in the BitBake User Manual for more information.
13679 </para></listitem>
13680 <listitem><para>
13681 <filename>bb.warn(</filename><replaceable>msg</replaceable><filename>)</filename>:
13682 Writes "WARNING: <replaceable>msg</replaceable>" to the
13683 log while also logging to stdout.
13684 </para></listitem>
13685 <listitem><para>
13686 <filename>bb.error(</filename><replaceable>msg</replaceable><filename>)</filename>:
13687 Writes "ERROR: <replaceable>msg</replaceable>" to the
13688 log while also logging to standard out (stdout).
13689 <note>
13690 Calling this function does not cause the task to fail.
13691 </note>
13692 </para></listitem>
13693 <listitem><para>
13694 <filename>bb.fatal(</filename><replaceable>msg</replaceable><filename>)</filename>:
13695 This logging function is similar to
13696 <filename>bb.error(</filename><replaceable>msg</replaceable><filename>)</filename>
13697 but also causes the calling task to fail.
13698 <note>
13699 <filename>bb.fatal()</filename> raises an exception,
13700 which means you do not need to put a "return"
13701 statement after the function.
13702 </note>
13703 </para></listitem>
13704 </itemizedlist>
13705 </para>
13706
13707 <para>
13708 The same logging functions are also available in shell
13709 functions, under the names
13710 <filename>bbplain</filename>, <filename>bbnote</filename>,
13711 <filename>bbdebug</filename>, <filename>bbwarn</filename>,
13712 <filename>bberror</filename>, and <filename>bbfatal</filename>.
13713 The
13714 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-logging'><filename>logging</filename></ulink>
13715 class implements these functions.
13716 See that class in the
13717 <filename>meta/classes</filename> folder of the
13718 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
13719 for information.
13720 </para>
13721
13722 <section id='logging-with-python'>
13723 <title>Logging With Python</title>
13724
13725 <para>
13726 When creating recipes using Python and inserting code that
13727 handles build logs, keep in mind the goal is to have
13728 informative logs while keeping the console as "silent" as
13729 possible.
13730 Also, if you want status messages in the log, use the
13731 "debug" loglevel.
13732 </para>
13733
13734 <para>
13735 Following is an example written in Python.
13736 The code handles logging for a function that determines the
13737 number of tasks needed to be run.
13738 See the
13739 "<ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-listtasks'><filename>do_listtasks</filename></ulink>"
13740 section for additional information:
13741 <literallayout class='monospaced'>
13742 python do_listtasks() {
13743 bb.debug(2, "Starting to figure out the task list")
13744 if noteworthy_condition:
13745 bb.note("There are 47 tasks to run")
13746 bb.debug(2, "Got to point xyz")
13747 if warning_trigger:
13748 bb.warn("Detected warning_trigger, this might be a problem later.")
13749 if recoverable_error:
13750 bb.error("Hit recoverable_error, you really need to fix this!")
13751 if fatal_error:
13752 bb.fatal("fatal_error detected, unable to print the task list")
13753 bb.plain("The tasks present are abc")
13754 bb.debug(2, "Finished figuring out the tasklist")
13755 }
13756 </literallayout>
13757 </para>
13758 </section>
13759
13760 <section id='logging-with-bash'>
13761 <title>Logging With Bash</title>
13762
13763 <para>
13764 When creating recipes using Bash and inserting code that
13765 handles build logs, you have the same goals - informative
13766 with minimal console output.
13767 The syntax you use for recipes written in Bash is similar
13768 to that of recipes written in Python described in the
13769 previous section.
13770 </para>
13771
13772 <para>
13773 Following is an example written in Bash.
13774 The code logs the progress of the <filename>do_my_function</filename> function.
13775 <literallayout class='monospaced'>
13776 do_my_function() {
13777 bbdebug 2 "Running do_my_function"
13778 if [ exceptional_condition ]; then
13779 bbnote "Hit exceptional_condition"
13780 fi
13781 bbdebug 2 "Got to point xyz"
13782 if [ warning_trigger ]; then
13783 bbwarn "Detected warning_trigger, this might cause a problem later."
13784 fi
13785 if [ recoverable_error ]; then
13786 bberror "Hit recoverable_error, correcting"
13787 fi
13788 if [ fatal_error ]; then
13789 bbfatal "fatal_error detected"
13790 fi
13791 bbdebug 2 "Completed do_my_function"
13792 }
13793 </literallayout>
13794 </para>
13795 </section>
13796 </section>
13797
13798 <section id='debugging-parallel-make-races'>
13799 <title>Debugging Parallel Make Races</title>
13800
13801 <para>
13802 A parallel <filename>make</filename> race occurs when the build
13803 consists of several parts that are run simultaneously and
13804 a situation occurs when the output or result of one
13805 part is not ready for use with a different part of the build
13806 that depends on that output.
13807 Parallel make races are annoying and can sometimes be difficult
13808 to reproduce and fix.
13809 However, some simple tips and tricks exist that can help
13810 you debug and fix them.
13811 This section presents a real-world example of an error
13812 encountered on the Yocto Project autobuilder and the process
13813 used to fix it.
13814 <note>
13815 If you cannot properly fix a <filename>make</filename> race
13816 condition, you can work around it by clearing either the
13817 <ulink url='&YOCTO_DOCS_REF_URL;#var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></ulink>
13818 or
13819 <ulink url='&YOCTO_DOCS_REF_URL;#var-PARALLEL_MAKEINST'><filename>PARALLEL_MAKEINST</filename></ulink>
13820 variables.
13821 </note>
13822 </para>
13823
13824 <section id='the-failure'>
13825 <title>The Failure</title>
13826
13827 <para>
13828 For this example, assume that you are building an image that
13829 depends on the "neard" package.
13830 And, during the build, BitBake runs into problems and
13831 creates the following output.
13832 <note>
13833 This example log file has longer lines artificially
13834 broken to make the listing easier to read.
13835 </note>
13836 If you examine the output or the log file, you see the
13837 failure during <filename>make</filename>:
13838 <literallayout class='monospaced'>
13839 | DEBUG: SITE files ['endian-little', 'bit-32', 'ix86-common', 'common-linux', 'common-glibc', 'i586-linux', 'common']
13840 | DEBUG: Executing shell function do_compile
13841 | NOTE: make -j 16
13842 | make --no-print-directory all-am
13843 | /bin/mkdir -p include/near
13844 | /bin/mkdir -p include/near
13845 | /bin/mkdir -p include/near
13846 | ln -s /home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86/build/build/tmp/work/i586-poky-linux/neard/
13847 0.14-r0/neard-0.14/include/types.h include/near/types.h
13848 | ln -s /home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86/build/build/tmp/work/i586-poky-linux/neard/
13849 0.14-r0/neard-0.14/include/log.h include/near/log.h
13850 | ln -s /home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86/build/build/tmp/work/i586-poky-linux/neard/
13851 0.14-r0/neard-0.14/include/plugin.h include/near/plugin.h
13852 | /bin/mkdir -p include/near
13853 | /bin/mkdir -p include/near
13854 | /bin/mkdir -p include/near
13855 | ln -s /home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86/build/build/tmp/work/i586-poky-linux/neard/
13856 0.14-r0/neard-0.14/include/tag.h include/near/tag.h
13857 | /bin/mkdir -p include/near
13858 | ln -s /home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86/build/build/tmp/work/i586-poky-linux/neard/
13859 0.14-r0/neard-0.14/include/adapter.h include/near/adapter.h
13860 | /bin/mkdir -p include/near
13861 | ln -s /home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86/build/build/tmp/work/i586-poky-linux/neard/
13862 0.14-r0/neard-0.14/include/ndef.h include/near/ndef.h
13863 | ln -s /home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86/build/build/tmp/work/i586-poky-linux/neard/
13864 0.14-r0/neard-0.14/include/tlv.h include/near/tlv.h
13865 | /bin/mkdir -p include/near
13866 | /bin/mkdir -p include/near
13867 | ln -s /home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86/build/build/tmp/work/i586-poky-linux/neard/
13868 0.14-r0/neard-0.14/include/setting.h include/near/setting.h
13869 | /bin/mkdir -p include/near
13870 | /bin/mkdir -p include/near
13871 | /bin/mkdir -p include/near
13872 | ln -s /home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86/build/build/tmp/work/i586-poky-linux/neard/
13873 0.14-r0/neard-0.14/include/device.h include/near/device.h
13874 | ln -s /home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86/build/build/tmp/work/i586-poky-linux/neard/
13875 0.14-r0/neard-0.14/include/nfc_copy.h include/near/nfc_copy.h
13876 | ln -s /home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86/build/build/tmp/work/i586-poky-linux/neard/
13877 0.14-r0/neard-0.14/include/snep.h include/near/snep.h
13878 | ln -s /home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86/build/build/tmp/work/i586-poky-linux/neard/
13879 0.14-r0/neard-0.14/include/version.h include/near/version.h
13880 | ln -s /home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86/build/build/tmp/work/i586-poky-linux/neard/
13881 0.14-r0/neard-0.14/include/dbus.h include/near/dbus.h
13882 | ./src/genbuiltin nfctype1 nfctype2 nfctype3 nfctype4 p2p > src/builtin.h
13883 | i586-poky-linux-gcc -m32 -march=i586 --sysroot=/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86/
13884 build/build/tmp/sysroots/qemux86 -DHAVE_CONFIG_H -I. -I./include -I./src -I./gdbus -I/home/pokybuild/
13885 yocto-autobuilder/yocto-slave/nightly-x86/build/build/tmp/sysroots/qemux86/usr/include/glib-2.0
13886 -I/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86/build/build/tmp/sysroots/qemux86/usr/
13887 lib/glib-2.0/include -I/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86/build/build/
13888 tmp/sysroots/qemux86/usr/include/dbus-1.0 -I/home/pokybuild/yocto-autobuilder/yocto-slave/
13889 nightly-x86/build/build/tmp/sysroots/qemux86/usr/lib/dbus-1.0/include -I/home/pokybuild/yocto-autobuilder/
13890 yocto-slave/nightly-x86/build/build/tmp/sysroots/qemux86/usr/include/libnl3
13891 -DNEAR_PLUGIN_BUILTIN -DPLUGINDIR=\""/usr/lib/near/plugins"\"
13892 -DCONFIGDIR=\""/etc/neard\"" -O2 -pipe -g -feliminate-unused-debug-types -c
13893 -o tools/snep-send.o tools/snep-send.c
13894 | In file included from tools/snep-send.c:16:0:
13895 | tools/../src/near.h:41:23: fatal error: near/dbus.h: No such file or directory
13896 | #include &lt;near/dbus.h&gt;
13897 | ^
13898 | compilation terminated.
13899 | make[1]: *** [tools/snep-send.o] Error 1
13900 | make[1]: *** Waiting for unfinished jobs....
13901 | make: *** [all] Error 2
13902 | ERROR: oe_runmake failed
13903 </literallayout>
13904 </para>
13905 </section>
13906
13907 <section id='reproducing-the-error'>
13908 <title>Reproducing the Error</title>
13909
13910 <para>
13911 Because race conditions are intermittent, they do not
13912 manifest themselves every time you do the build.
13913 In fact, most times the build will complete without problems
13914 even though the potential race condition exists.
13915 Thus, once the error surfaces, you need a way to reproduce
13916 it.
13917 </para>
13918
13919 <para>
13920 In this example, compiling the "neard" package is causing
13921 the problem.
13922 So the first thing to do is build "neard" locally.
13923 Before you start the build, set the
13924 <ulink url='&YOCTO_DOCS_REF_URL;#var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></ulink>
13925 variable in your <filename>local.conf</filename> file to
13926 a high number (e.g. "-j 20").
13927 Using a high value for <filename>PARALLEL_MAKE</filename>
13928 increases the chances of the race condition showing up:
13929 <literallayout class='monospaced'>
13930 $ bitbake neard
13931 </literallayout>
13932 </para>
13933
13934 <para>
13935 Once the local build for "neard" completes, start a
13936 <filename>devshell</filename> build:
13937 <literallayout class='monospaced'>
13938 $ bitbake neard -c devshell
13939 </literallayout>
13940 For information on how to use a
13941 <filename>devshell</filename>, see the
13942 "<link linkend='platdev-appdev-devshell'>Using a Development Shell</link>"
13943 section.
13944 </para>
13945
13946 <para>
13947 In the <filename>devshell</filename>, do the following:
13948 <literallayout class='monospaced'>
13949 $ make clean
13950 $ make tools/snep-send.o
13951 </literallayout>
13952 The <filename>devshell</filename> commands cause the failure
13953 to clearly be visible.
13954 In this case, a missing dependency exists for the "neard"
13955 Makefile target.
13956 Here is some abbreviated, sample output with the
13957 missing dependency clearly visible at the end:
13958 <literallayout class='monospaced'>
13959 i586-poky-linux-gcc -m32 -march=i586 --sysroot=/home/scott-lenovo/......
13960 .
13961 .
13962 .
13963 tools/snep-send.c
13964 In file included from tools/snep-send.c:16:0:
13965 tools/../src/near.h:41:23: fatal error: near/dbus.h: No such file or directory
13966 #include &lt;near/dbus.h&gt;
13967 ^
13968 compilation terminated.
13969 make: *** [tools/snep-send.o] Error 1
13970 $
13971 </literallayout>
13972 </para>
13973 </section>
13974
13975 <section id='creating-a-patch-for-the-fix'>
13976 <title>Creating a Patch for the Fix</title>
13977
13978 <para>
13979 Because there is a missing dependency for the Makefile
13980 target, you need to patch the
13981 <filename>Makefile.am</filename> file, which is generated
13982 from <filename>Makefile.in</filename>.
13983 You can use Quilt to create the patch:
13984 <literallayout class='monospaced'>
13985 $ quilt new parallelmake.patch
13986 Patch patches/parallelmake.patch is now on top
13987 $ quilt add Makefile.am
13988 File Makefile.am added to patch patches/parallelmake.patch
13989 </literallayout>
13990 For more information on using Quilt, see the
13991 "<link linkend='using-a-quilt-workflow'>Using Quilt in Your Workflow</link>"
13992 section.
13993 </para>
13994
13995 <para>
13996 At this point you need to make the edits to
13997 <filename>Makefile.am</filename> to add the missing
13998 dependency.
13999 For our example, you have to add the following line
14000 to the file:
14001 <literallayout class='monospaced'>
14002 tools/snep-send.$(OBJEXT): include/near/dbus.h
14003 </literallayout>
14004 </para>
14005
14006 <para>
14007 Once you have edited the file, use the
14008 <filename>refresh</filename> command to create the patch:
14009 <literallayout class='monospaced'>
14010 $ quilt refresh
14011 Refreshed patch patches/parallelmake.patch
14012 </literallayout>
14013 Once the patch file exists, you need to add it back to the
14014 originating recipe folder.
14015 Here is an example assuming a top-level
14016 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
14017 named <filename>poky</filename>:
14018 <literallayout class='monospaced'>
14019 $ cp patches/parallelmake.patch poky/meta/recipes-connectivity/neard/neard
14020 </literallayout>
14021 The final thing you need to do to implement the fix in the
14022 build is to update the "neard" recipe (i.e.
14023 <filename>neard-0.14.bb</filename>) so that the
14024 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
14025 statement includes the patch file.
14026 The recipe file is in the folder above the patch.
14027 Here is what the edited <filename>SRC_URI</filename>
14028 statement would look like:
14029 <literallayout class='monospaced'>
14030 SRC_URI = "${KERNELORG_MIRROR}/linux/network/nfc/${BPN}-${PV}.tar.xz \
14031 file://neard.in \
14032 file://neard.service.in \
14033 file://parallelmake.patch \
14034 "
14035 </literallayout>
14036 </para>
14037
14038 <para>
14039 With the patch complete and moved to the correct folder and
14040 the <filename>SRC_URI</filename> statement updated, you can
14041 exit the <filename>devshell</filename>:
14042 <literallayout class='monospaced'>
14043 $ exit
14044 </literallayout>
14045 </para>
14046 </section>
14047
14048 <section id='testing-the-build'>
14049 <title>Testing the Build</title>
14050
14051 <para>
14052 With everything in place, you can get back to trying the
14053 build again locally:
14054 <literallayout class='monospaced'>
14055 $ bitbake neard
14056 </literallayout>
14057 This build should succeed.
14058 </para>
14059
14060 <para>
14061 Now you can open up a <filename>devshell</filename> again
14062 and repeat the clean and make operations as follows:
14063 <literallayout class='monospaced'>
14064 $ bitbake neard -c devshell
14065 $ make clean
14066 $ make tools/snep-send.o
14067 </literallayout>
14068 The build should work without issue.
14069 </para>
14070
14071 <para>
14072 As with all solved problems, if they originated upstream,
14073 you need to submit the fix for the recipe in OE-Core and
14074 upstream so that the problem is taken care of at its
14075 source.
14076 See the
14077 "<link linkend='how-to-submit-a-change'>Submitting a Change to the Yocto Project</link>"
14078 section for more information.
14079 </para>
14080 </section>
14081 </section>
14082
14083 <section id="platdev-gdb-remotedebug">
14084 <title>Debugging With the GNU Project Debugger (GDB) Remotely</title>
14085
14086 <para>
14087 GDB allows you to examine running programs, which in turn helps
14088 you to understand and fix problems.
14089 It also allows you to perform post-mortem style analysis of
14090 program crashes.
14091 GDB is available as a package within the Yocto Project and is
14092 installed in SDK images by default.
14093 See the
14094 "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>"
14095 chapter in the Yocto Project Reference Manual for a description of
14096 these images.
14097 You can find information on GDB at
14098 <ulink url="http://sourceware.org/gdb/"/>.
14099 <note><title>Tip</title>
14100 For best results, install debug (<filename>-dbg</filename>)
14101 packages for the applications you are going to debug.
14102 Doing so makes extra debug symbols available that give you
14103 more meaningful output.
14104 </note>
14105 </para>
14106
14107 <para>
14108 Sometimes, due to memory or disk space constraints, it is not
14109 possible to use GDB directly on the remote target to debug
14110 applications.
14111 These constraints arise because GDB needs to load the debugging
14112 information and the binaries of the process being debugged.
14113 Additionally, GDB needs to perform many computations to locate
14114 information such as function names, variable names and values,
14115 stack traces and so forth - even before starting the debugging
14116 process.
14117 These extra computations place more load on the target system
14118 and can alter the characteristics of the program being debugged.
14119 </para>
14120
14121 <para>
14122 To help get past the previously mentioned constraints, you can
14123 use gdbserver, which runs on the remote target and does not
14124 load any debugging information from the debugged process.
14125 Instead, a GDB instance processes the debugging information that
14126 is run on a remote computer - the host GDB.
14127 The host GDB then sends control commands to gdbserver to make
14128 it stop or start the debugged program, as well as read or write
14129 memory regions of that debugged program.
14130 All the debugging information loaded and processed as well
14131 as all the heavy debugging is done by the host GDB.
14132 Offloading these processes gives the gdbserver running on the
14133 target a chance to remain small and fast.
14134 </para>
14135
14136 <para>
14137 Because the host GDB is responsible for loading the debugging
14138 information and for doing the necessary processing to make
14139 actual debugging happen, you have to make sure the host can
14140 access the unstripped binaries complete with their debugging
14141 information and also be sure the target is compiled with no
14142 optimizations.
14143 The host GDB must also have local access to all the libraries
14144 used by the debugged program.
14145 Because gdbserver does not need any local debugging information,
14146 the binaries on the remote target can remain stripped.
14147 However, the binaries must also be compiled without optimization
14148 so they match the host's binaries.
14149 </para>
14150
14151 <para>
14152 To remain consistent with GDB documentation and terminology,
14153 the binary being debugged on the remote target machine is
14154 referred to as the "inferior" binary.
14155 For documentation on GDB see the
14156 <ulink url="http://sourceware.org/gdb/documentation/">GDB site</ulink>.
14157 </para>
14158
14159 <para>
14160 The following steps show you how to debug using the GNU project
14161 debugger.
14162 <orderedlist>
14163 <listitem><para>
14164 <emphasis>Configure your build system to construct the
14165 companion debug filesystem:</emphasis></para>
14166
14167 <para>In your <filename>local.conf</filename> file, set
14168 the following:
14169 <literallayout class='monospaced'>
14170 IMAGE_GEN_DEBUGFS = "1"
14171 IMAGE_FSTYPES_DEBUGFS = "tar.bz2"
14172 </literallayout>
14173 These options cause the OpenEmbedded build system
14174 to generate a special companion filesystem fragment,
14175 which contains the matching source and debug symbols to
14176 your deployable filesystem.
14177 The build system does this by looking at what is in the
14178 deployed filesystem, and pulling the corresponding
14179 <filename>-dbg</filename> packages.</para>
14180
14181 <para>The companion debug filesystem is not a complete
14182 filesystem, but only contains the debug fragments.
14183 This filesystem must be combined with the full filesystem
14184 for debugging.
14185 Subsequent steps in this procedure show how to combine
14186 the partial filesystem with the full filesystem.
14187 </para></listitem>
14188 <listitem><para>
14189 <emphasis>Configure the system to include gdbserver in
14190 the target filesystem:</emphasis></para>
14191
14192 <para>Make the following addition in either your
14193 <filename>local.conf</filename> file or in an image
14194 recipe:
14195 <literallayout class='monospaced'>
14196 IMAGE_INSTALL_append = " gdbserver"
14197 </literallayout>
14198 The change makes sure the <filename>gdbserver</filename>
14199 package is included.
14200 </para></listitem>
14201 <listitem><para>
14202 <emphasis>Build the environment:</emphasis></para>
14203
14204 <para>Use the following command to construct the image
14205 and the companion Debug Filesystem:
14206 <literallayout class='monospaced'>
14207 $ bitbake <replaceable>image</replaceable>
14208 </literallayout>
14209 Build the cross GDB component and make it available
14210 for debugging.
14211 Build the SDK that matches the image.
14212 Building the SDK is best for a production build
14213 that can be used later for debugging, especially
14214 during long term maintenance:
14215 <literallayout class='monospaced'>
14216 $ bitbake -c populate_sdk <replaceable>image</replaceable>
14217 </literallayout></para>
14218
14219 <para>Alternatively, you can build the minimal
14220 toolchain components that match the target.
14221 Doing so creates a smaller than typical SDK and only
14222 contains a minimal set of components with which to
14223 build simple test applications, as well as run the
14224 debugger:
14225 <literallayout class='monospaced'>
14226 $ bitbake meta-toolchain
14227 </literallayout></para>
14228
14229 <para>A final method is to build Gdb itself within
14230 the build system:
14231 <literallayout class='monospaced'>
14232 $ bitbake gdb-cross-<replaceable>architecture</replaceable>
14233 </literallayout>
14234 Doing so produces a temporary copy of
14235 <filename>cross-gdb</filename> you can use for
14236 debugging during development.
14237 While this is the quickest approach, the two previous
14238 methods in this step are better when considering
14239 long-term maintenance strategies.
14240 <note>
14241 If you run
14242 <filename>bitbake gdb-cross</filename>, the
14243 OpenEmbedded build system suggests the actual
14244 image (e.g. <filename>gdb-cross-i586</filename>).
14245 The suggestion is usually the actual name you want
14246 to use.
14247 </note>
14248 </para></listitem>
14249 <listitem><para>
14250 <emphasis>Set up the</emphasis>&nbsp;<filename>debugfs</filename></para>
14251
14252 <para>Run the following commands to set up the
14253 <filename>debugfs</filename>:
14254 <literallayout class='monospaced'>
14255 $ mkdir debugfs
14256 $ cd debugfs
14257 $ tar xvfj <replaceable>build-dir</replaceable>/tmp-glibc/deploy/images/<replaceable>machine</replaceable>/<replaceable>image</replaceable>.rootfs.tar.bz2
14258 $ tar xvfj <replaceable>build-dir</replaceable>/tmp-glibc/deploy/images/<replaceable>machine</replaceable>/<replaceable>image</replaceable>-dbg.rootfs.tar.bz2
14259 </literallayout>
14260 </para></listitem>
14261 <listitem><para>
14262 <emphasis>Set up GDB</emphasis></para>
14263
14264 <para>Install the SDK (if you built one) and then
14265 source the correct environment file.
14266 Sourcing the environment file puts the SDK in your
14267 <filename>PATH</filename> environment variable.</para>
14268
14269 <para>If you are using the build system, Gdb is
14270 located in
14271 <replaceable>build-dir</replaceable>/tmp/sysroots/<replaceable>host</replaceable>/usr/bin/<replaceable>architecture</replaceable>/<replaceable>architecture</replaceable>-gdb
14272 </para></listitem>
14273 <listitem><para>
14274 <emphasis>Boot the target:</emphasis></para>
14275
14276 <para>For information on how to run QEMU, see the
14277 <ulink url='http://wiki.qemu.org/Documentation/GettingStartedDevelopers'>QEMU Documentation</ulink>.
14278 <note>
14279 Be sure to verify that your host can access the
14280 target via TCP.
14281 </note>
14282 </para></listitem>
14283 <listitem><para>
14284 <emphasis>Debug a program:</emphasis></para>
14285
14286 <para>Debugging a program involves running gdbserver
14287 on the target and then running Gdb on the host.
14288 The example in this step debugs
14289 <filename>gzip</filename>:
14290 <literallayout class='monospaced'>
14291 root@qemux86:~# gdbserver localhost:1234 /bin/gzip —help
14292 </literallayout>
14293 For additional gdbserver options, see the
14294 <ulink url='https://www.gnu.org/software/gdb/documentation/'>GDB Server Documentation</ulink>.
14295 </para>
14296
14297 <para>After running gdbserver on the target, you need
14298 to run Gdb on the host and configure it and connect to
14299 the target.
14300 Use these commands:
14301 <literallayout class='monospaced'>
14302 $ cd <replaceable>directory-holding-the-debugfs-directory</replaceable>
14303 $ <replaceable>arch</replaceable>-gdb
14304
14305 (gdb) set sysroot debugfs
14306 (gdb) set substitute-path /usr/src/debug debugfs/usr/src/debug
14307 (gdb) target remote <replaceable>IP-of-target</replaceable>:1234
14308 </literallayout>
14309 At this point, everything should automatically load
14310 (i.e. matching binaries, symbols and headers).
14311 <note>
14312 The Gdb <filename>set</filename> commands in the
14313 previous example can be placed into the users
14314 <filename>~/.gdbinit</filename> file.
14315 Upon starting, Gdb automatically runs whatever
14316 commands are in that file.
14317 </note>
14318 </para></listitem>
14319 <listitem><para>
14320 <emphasis>Deploying without a full image
14321 rebuild:</emphasis></para>
14322
14323 <para>In many cases, during development you want a
14324 quick method to deploy a new binary to the target and
14325 debug it, without waiting for a full image build.
14326 </para>
14327
14328 <para>One approach to solving this situation is to
14329 just build the component you want to debug.
14330 Once you have built the component, copy the
14331 executable directly to both the target and the
14332 host <filename>debugfs</filename>.</para>
14333
14334 <para>If the binary is processed through the debug
14335 splitting in OpenEmbedded, you should also
14336 copy the debug items (i.e. <filename>.debug</filename>
14337 contents and corresponding
14338 <filename>/usr/src/debug</filename> files)
14339 from the work directory.
14340 Here is an example:
14341 <literallayout class='monospaced'>
14342 $ bitbake bash
14343 $ bitbake -c devshell bash
14344 $ cd ..
14345 $ scp packages-split/bash/bin/bash <replaceable>target</replaceable>:/bin/bash
14346 $ cp -a packages-split/bash-dbg/* <replaceable>path</replaceable>/debugfs
14347 </literallayout>
14348 </para></listitem>
14349 </orderedlist>
14350 </para>
14351 </section>
14352
14353 <section id='debugging-with-the-gnu-project-debugger-gdb-on-the-target'>
14354 <title>Debugging with the GNU Project Debugger (GDB) on the Target</title>
14355
14356 <para>
14357 The previous section addressed using GDB remotely for debugging
14358 purposes, which is the most usual case due to the inherent
14359 hardware limitations on many embedded devices.
14360 However, debugging in the target hardware itself is also
14361 possible with more powerful devices.
14362 This section describes what you need to do in order to support
14363 using GDB to debug on the target hardware.
14364 </para>
14365
14366 <para>
14367 To support this kind of debugging, you need do the following:
14368 <itemizedlist>
14369 <listitem><para>
14370 Ensure that GDB is on the target.
14371 You can do this by adding "gdb" to
14372 <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></ulink>:
14373 <literallayout class='monospaced'>
14374 IMAGE_INSTALL_append = " gdb"
14375 </literallayout>
14376 Alternatively, you can add "tools-debug" to
14377 <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></ulink>:
14378 <literallayout class='monospaced'>
14379 IMAGE_FEATURES_append = " tools-debug"
14380 </literallayout>
14381 </para></listitem>
14382 <listitem><para>
14383 Ensure that debug symbols are present.
14384 You can make sure these symbols are present by
14385 installing <filename>-dbg</filename>:
14386 <literallayout class='monospaced'>
14387 IMAGE_INSTALL_append = " <replaceable>packagename</replaceable>-dbg"
14388 </literallayout>
14389 Alternatively, you can do the following to include all
14390 the debug symbols:
14391 <literallayout class='monospaced'>
14392 IMAGE_FEATURES_append = " dbg-pkgs"
14393 </literallayout>
14394 </para></listitem>
14395 </itemizedlist>
14396 <note>
14397 To improve the debug information accuracy, you can reduce
14398 the level of optimization used by the compiler.
14399 For example, when adding the following line to your
14400 <filename>local.conf</filename> file, you will reduce
14401 optimization from
14402 <ulink url='&YOCTO_DOCS_REF_URL;#var-FULL_OPTIMIZATION'><filename>FULL_OPTIMIZATION</filename></ulink>
14403 of "-O2" to
14404 <ulink url='&YOCTO_DOCS_REF_URL;#var-DEBUG_OPTIMIZATION'><filename>DEBUG_OPTIMIZATION</filename></ulink>
14405 of "-O -fno-omit-frame-pointer":
14406 <literallayout class='monospaced'>
14407 DEBUG_BUILD = "1"
14408 </literallayout>
14409 Consider that this will reduce the application's performance
14410 and is recommended only for debugging purposes.
14411 </note>
14412 </para>
14413 </section>
14414
14415 <section id='dev-other-debugging-others'>
14416 <title>Other Debugging Tips</title>
14417
14418 <para>
14419 Here are some other tips that you might find useful:
14420 <itemizedlist>
14421 <listitem><para>
14422 When adding new packages, it is worth watching for
14423 undesirable items making their way into compiler command
14424 lines.
14425 For example, you do not want references to local system
14426 files like
14427 <filename>/usr/lib/</filename> or
14428 <filename>/usr/include/</filename>.
14429 </para></listitem>
14430 <listitem><para>
14431 If you want to remove the <filename>psplash</filename>
14432 boot splashscreen,
14433 add <filename>psplash=false</filename> to the kernel
14434 command line.
14435 Doing so prevents <filename>psplash</filename> from
14436 loading and thus allows you to see the console.
14437 It is also possible to switch out of the splashscreen by
14438 switching the virtual console (e.g. Fn+Left or Fn+Right
14439 on a Zaurus).
14440 </para></listitem>
14441 <listitem><para>
14442 Removing
14443 <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>
14444 (usually <filename>tmp/</filename>, within the
14445 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>)
14446 can often fix temporary build issues.
14447 Removing <filename>TMPDIR</filename> is usually a
14448 relatively cheap operation, because task output will be
14449 cached in
14450 <ulink url='&YOCTO_DOCS_REF_URL;#var-SSTATE_DIR'><filename>SSTATE_DIR</filename></ulink>
14451 (usually <filename>sstate-cache/</filename>, which is
14452 also in the Build Directory).
14453 <note>
14454 Removing <filename>TMPDIR</filename> might be a
14455 workaround rather than a fix.
14456 Consequently, trying to determine the underlying
14457 cause of an issue before removing the directory is
14458 a good idea.
14459 </note>
14460 </para></listitem>
14461 <listitem><para>
14462 Understanding how a feature is used in practice within
14463 existing recipes can be very helpful.
14464 It is recommended that you configure some method that
14465 allows you to quickly search through files.</para>
14466
14467 <para>Using GNU Grep, you can use the following shell
14468 function to recursively search through common
14469 recipe-related files, skipping binary files,
14470 <filename>.git</filename> directories, and the
14471 Build Directory (assuming its name starts with
14472 "build"):
14473 <literallayout class='monospaced'>
14474 g() {
14475 grep -Ir \
14476 --exclude-dir=.git \
14477 --exclude-dir='build*' \
14478 --include='*.bb*' \
14479 --include='*.inc*' \
14480 --include='*.conf*' \
14481 --include='*.py*' \
14482 "$@"
14483 }
14484 </literallayout>
14485 Following are some usage examples:
14486 <literallayout class='monospaced'>
14487 $ g FOO # Search recursively for "FOO"
14488 $ g -i foo # Search recursively for "foo", ignoring case
14489 $ g -w FOO # Search recursively for "FOO" as a word, ignoring e.g. "FOOBAR"
14490 </literallayout>
14491 If figuring out how some feature works requires a lot of
14492 searching, it might indicate that the documentation
14493 should be extended or improved.
14494 In such cases, consider filing a documentation bug using
14495 the Yocto Project implementation of
14496 <ulink url='https://bugzilla.yoctoproject.org/'>Bugzilla</ulink>.
14497 For information on how to submit a bug against
14498 the Yocto Project, see the Yocto Project Bugzilla
14499 <ulink url='&YOCTO_WIKI_URL;/wiki/Bugzilla_Configuration_and_Bug_Tracking'>wiki page</ulink>
14500 and the
14501 "<link linkend='submitting-a-defect-against-the-yocto-project'>Submitting a Defect Against the Yocto Project</link>"
14502 section.
14503 <note>
14504 The manuals might not be the right place to document
14505 variables that are purely internal and have a
14506 limited scope (e.g. internal variables used to
14507 implement a single <filename>.bbclass</filename>
14508 file).
14509 </note>
14510 </para></listitem>
14511 </itemizedlist>
14512 </para>
14513 </section>
14514 </section>
14515
14516 <section id='making-changes-to-the-yocto-project'>
14517 <title>Making Changes to the Yocto Project</title>
14518
14519 <para>
14520 Because the Yocto Project is an open-source, community-based
14521 project, you can effect changes to the project.
14522 This section presents procedures that show you how to submit
14523 a defect against the project and how to submit a change.
14524 </para>
14525
14526 <section id='submitting-a-defect-against-the-yocto-project'>
14527 <title>Submitting a Defect Against the Yocto Project</title>
14528
14529 <para>
14530 Use the Yocto Project implementation of
14531 <ulink url='http://www.bugzilla.org/about/'>Bugzilla</ulink>
14532 to submit a defect (bug) against the Yocto Project.
14533 For additional information on this implementation of Bugzilla see the
14534 "<ulink url='&YOCTO_DOCS_REF_URL;#resources-bugtracker'>Yocto Project Bugzilla</ulink>"
14535 section in the Yocto Project Reference Manual.
14536 For more detail on any of the following steps, see the Yocto Project
14537 <ulink url='&YOCTO_WIKI_URL;/wiki/Bugzilla_Configuration_and_Bug_Tracking'>Bugzilla wiki page</ulink>.
14538 </para>
14539
14540 <para>
14541 Use the following general steps to submit a bug"
14542
14543 <orderedlist>
14544 <listitem><para>
14545 Open the Yocto Project implementation of
14546 <ulink url='&YOCTO_BUGZILLA_URL;'>Bugzilla</ulink>.
14547 </para></listitem>
14548 <listitem><para>
14549 Click "File a Bug" to enter a new bug.
14550 </para></listitem>
14551 <listitem><para>
14552 Choose the appropriate "Classification", "Product", and
14553 "Component" for which the bug was found.
14554 Bugs for the Yocto Project fall into one of several
14555 classifications, which in turn break down into several
14556 products and components.
14557 For example, for a bug against the
14558 <filename>meta-intel</filename> layer, you would choose
14559 "Build System, Metadata &amp; Runtime", "BSPs", and
14560 "bsps-meta-intel", respectively.
14561 </para></listitem>
14562 <listitem><para>
14563 Choose the "Version" of the Yocto Project for which you found
14564 the bug (e.g. &DISTRO;).
14565 </para></listitem>
14566 <listitem><para>
14567 Determine and select the "Severity" of the bug.
14568 The severity indicates how the bug impacted your work.
14569 </para></listitem>
14570 <listitem><para>
14571 Choose the "Hardware" that the bug impacts.
14572 </para></listitem>
14573 <listitem><para>
14574 Choose the "Architecture" that the bug impacts.
14575 </para></listitem>
14576 <listitem><para>
14577 Choose a "Documentation change" item for the bug.
14578 Fixing a bug might or might not affect the Yocto Project
14579 documentation.
14580 If you are unsure of the impact to the documentation, select
14581 "Don't Know".
14582 </para></listitem>
14583 <listitem><para>
14584 Provide a brief "Summary" of the bug.
14585 Try to limit your summary to just a line or two and be sure
14586 to capture the essence of the bug.
14587 </para></listitem>
14588 <listitem><para>
14589 Provide a detailed "Description" of the bug.
14590 You should provide as much detail as you can about the context,
14591 behavior, output, and so forth that surrounds the bug.
14592 You can even attach supporting files for output from logs by
14593 using the "Add an attachment" button.
14594 </para></listitem>
14595 <listitem><para>
14596 Click the "Submit Bug" button submit the bug.
14597 A new Bugzilla number is assigned to the bug and the defect
14598 is logged in the bug tracking system.
14599 </para></listitem>
14600 </orderedlist>
14601 Once you file a bug, the bug is processed by the Yocto Project Bug
14602 Triage Team and further details concerning the bug are assigned
14603 (e.g. priority and owner).
14604 You are the "Submitter" of the bug and any further categorization,
14605 progress, or comments on the bug result in Bugzilla sending you an
14606 automated email concerning the particular change or progress to the
14607 bug.
14608 </para>
14609 </section>
14610
14611 <section id='how-to-submit-a-change'>
14612 <title>Submitting a Change to the Yocto Project</title>
14613
14614 <para>
14615 Contributions to the Yocto Project and OpenEmbedded are very welcome.
14616 Because the system is extremely configurable and flexible, we recognize
14617 that developers will want to extend, configure or optimize it for
14618 their specific uses.
14619 </para>
14620
14621 <para>
14622 The Yocto Project uses a mailing list and a patch-based workflow
14623 that is similar to the Linux kernel but contains important
14624 differences.
14625 In general, a mailing list exists through which you can submit
14626 patches.
14627 You should send patches to the appropriate mailing list so that they
14628 can be reviewed and merged by the appropriate maintainer.
14629 The specific mailing list you need to use depends on the
14630 location of the code you are changing.
14631 Each component (e.g. layer) should have a
14632 <filename>README</filename> file that indicates where to send
14633 the changes and which process to follow.
14634 </para>
14635
14636 <para>
14637 You can send the patch to the mailing list using whichever approach
14638 you feel comfortable with to generate the patch.
14639 Once sent, the patch is usually reviewed by the community at large.
14640 If somebody has concerns with the patch, they will usually voice
14641 their concern over the mailing list.
14642 If a patch does not receive any negative reviews, the maintainer of
14643 the affected layer typically takes the patch, tests it, and then
14644 based on successful testing, merges the patch.
14645 </para>
14646
14647 <para id='figuring-out-the-mailing-list-to-use'>
14648 The "poky" repository, which is the Yocto Project's reference build
14649 environment, is a hybrid repository that contains several
14650 individual pieces (e.g. BitBake, Metadata, documentation,
14651 and so forth) built using the combo-layer tool.
14652 The upstream location used for submitting changes varies by
14653 component:
14654 <itemizedlist>
14655 <listitem><para>
14656 <emphasis>Core Metadata:</emphasis>
14657 Send your patch to the
14658 <ulink url='http://lists.openembedded.org/mailman/listinfo/openembedded-core'>openembedded-core</ulink>
14659 mailing list. For example, a change to anything under
14660 the <filename>meta</filename> or
14661 <filename>scripts</filename> directories should be sent
14662 to this mailing list.
14663 </para></listitem>
14664 <listitem><para>
14665 <emphasis>BitBake:</emphasis>
14666 For changes to BitBake (i.e. anything under the
14667 <filename>bitbake</filename> directory), send your patch
14668 to the
14669 <ulink url='http://lists.openembedded.org/mailman/listinfo/bitbake-devel'>bitbake-devel</ulink>
14670 mailing list.
14671 </para></listitem>
14672 <listitem><para>
14673 <emphasis>"meta-*" trees:</emphasis>
14674 These trees contain Metadata.
14675 Use the
14676 <ulink url='https://lists.yoctoproject.org/listinfo/poky'>poky</ulink>
14677 mailing list.
14678 </para></listitem>
14679 </itemizedlist>
14680 </para>
14681
14682 <para>
14683 For changes to other layers hosted in the Yocto Project source
14684 repositories (i.e. <filename>yoctoproject.org</filename>), tools,
14685 and the Yocto Project documentation, use the
14686 <ulink url='https://lists.yoctoproject.org/listinfo/yocto'>Yocto Project</ulink>
14687 general mailing list.
14688 <note>
14689 Sometimes a layer's documentation specifies to use a
14690 particular mailing list.
14691 If so, use that list.
14692 </note>
14693 For additional recipes that do not fit into the core Metadata, you
14694 should determine which layer the recipe should go into and submit
14695 the change in the manner recommended by the documentation (e.g.
14696 the <filename>README</filename> file) supplied with the layer.
14697 If in doubt, please ask on the Yocto general mailing list or on
14698 the openembedded-devel mailing list.
14699 </para>
14700
14701 <para>
14702 You can also push a change upstream and request a maintainer to
14703 pull the change into the component's upstream repository.
14704 You do this by pushing to a contribution repository that is upstream.
14705 See the
14706 "<ulink url='&YOCTO_DOCS_OM_URL;#gs-git-workflows-and-the-yocto-project'>Git Workflows and the Yocto Project</ulink>"
14707 section in the Yocto Project Overview and Concepts Manual for additional
14708 concepts on working in the Yocto Project development environment.
14709 </para>
14710
14711 <para>
14712 Two commonly used testing repositories exist for
14713 OpenEmbedded-Core:
14714 <itemizedlist>
14715 <listitem><para>
14716 <emphasis>"ross/mut" branch:</emphasis>
14717 The "mut" (master-under-test) tree
14718 exists in the <filename>poky-contrib</filename> repository
14719 in the
14720 <ulink url='&YOCTO_GIT_URL;'>Yocto Project source repositories</ulink>.
14721 </para></listitem>
14722 <listitem><para>
14723 <emphasis>"master-next" branch:</emphasis>
14724 This branch is part of the main
14725 "poky" repository in the Yocto Project source repositories.
14726 </para></listitem>
14727 </itemizedlist>
14728 Maintainers use these branches to test submissions prior to merging
14729 patches.
14730 Thus, you can get an idea of the status of a patch based on
14731 whether the patch has been merged into one of these branches.
14732 <note>
14733 This system is imperfect and changes can sometimes get lost in the
14734 flow.
14735 Asking about the status of a patch or change is reasonable if the
14736 change has been idle for a while with no feedback.
14737 The Yocto Project does have plans to use
14738 <ulink url='https://en.wikipedia.org/wiki/Patchwork_(software)'>Patchwork</ulink>
14739 to track the status of patches and also to automatically preview
14740 patches.
14741 </note>
14742 </para>
14743
14744 <para>
14745 The following sections provide procedures for submitting a change.
14746 </para>
14747
14748 <section id='pushing-a-change-upstream'>
14749 <title>Using Scripts to Push a Change Upstream and Request a Pull</title>
14750
14751 <para>
14752 Follow this procedure to push a change to an upstream "contrib"
14753 Git repository:
14754 <note>
14755 You can find general Git information on how to push a change
14756 upstream in the
14757 <ulink url='http://git-scm.com/book/en/v2/Distributed-Git-Distributed-Workflows'>Git Community Book</ulink>.
14758 </note>
14759 <orderedlist>
14760 <listitem><para>
14761 <emphasis>Make Your Changes Locally:</emphasis>
14762 Make your changes in your local Git repository.
14763 You should make small, controlled, isolated changes.
14764 Keeping changes small and isolated aids review,
14765 makes merging/rebasing easier and keeps the change
14766 history clean should anyone need to refer to it in
14767 future.
14768 </para></listitem>
14769 <listitem><para>
14770 <emphasis>Stage Your Changes:</emphasis>
14771 Stage your changes by using the <filename>git add</filename>
14772 command on each file you changed.
14773 </para></listitem>
14774 <listitem><para id='making-sure-you-have-correct-commit-information'>
14775 <emphasis>Commit Your Changes:</emphasis>
14776 Commit the change by using the
14777 <filename>git commit</filename> command.
14778 Make sure your commit information follows standards by
14779 following these accepted conventions:
14780 <itemizedlist>
14781 <listitem><para>
14782 Be sure to include a "Signed-off-by:" line in the
14783 same style as required by the Linux kernel.
14784 Adding this line signifies that you, the submitter,
14785 have agreed to the Developer's Certificate of
14786 Origin 1.1 as follows:
14787 <literallayout class='monospaced'>
14788 Developer's Certificate of Origin 1.1
14789
14790 By making a contribution to this project, I certify that:
14791
14792 (a) The contribution was created in whole or in part by me and I
14793 have the right to submit it under the open source license
14794 indicated in the file; or
14795
14796 (b) The contribution is based upon previous work that, to the best
14797 of my knowledge, is covered under an appropriate open source
14798 license and I have the right under that license to submit that
14799 work with modifications, whether created in whole or in part
14800 by me, under the same open source license (unless I am
14801 permitted to submit under a different license), as indicated
14802 in the file; or
14803
14804 (c) The contribution was provided directly to me by some other
14805 person who certified (a), (b) or (c) and I have not modified
14806 it.
14807
14808 (d) I understand and agree that this project and the contribution
14809 are public and that a record of the contribution (including all
14810 personal information I submit with it, including my sign-off) is
14811 maintained indefinitely and may be redistributed consistent with
14812 this project or the open source license(s) involved.
14813 </literallayout>
14814 </para></listitem>
14815 <listitem><para>
14816 Provide a single-line summary of the change.
14817 and,
14818 if more explanation is needed, provide more
14819 detail in the body of the commit.
14820 This summary is typically viewable in the
14821 "shortlist" of changes.
14822 Thus, providing something short and descriptive
14823 that gives the reader a summary of the change is
14824 useful when viewing a list of many commits.
14825 You should prefix this short description with the
14826 recipe name (if changing a recipe), or else with
14827 the short form path to the file being changed.
14828 </para></listitem>
14829 <listitem><para>
14830 For the body of the commit message, provide
14831 detailed information that describes what you
14832 changed, why you made the change, and the approach
14833 you used.
14834 It might also be helpful if you mention how you
14835 tested the change.
14836 Provide as much detail as you can in the body of
14837 the commit message.
14838 <note>
14839 You do not need to provide a more detailed
14840 explanation of a change if the change is
14841 minor to the point of the single line
14842 summary providing all the information.
14843 </note>
14844 </para></listitem>
14845 <listitem><para>
14846 If the change addresses a specific bug or issue
14847 that is associated with a bug-tracking ID,
14848 include a reference to that ID in your detailed
14849 description.
14850 For example, the Yocto Project uses a specific
14851 convention for bug references - any commit that
14852 addresses a specific bug should use the following
14853 form for the detailed description.
14854 Be sure to use the actual bug-tracking ID from
14855 Bugzilla for
14856 <replaceable>bug-id</replaceable>:
14857 <literallayout class='monospaced'>
14858 Fixes [YOCTO #<replaceable>bug-id</replaceable>]
14859
14860 <replaceable>detailed description of change</replaceable>
14861 </literallayout>
14862 </para></listitem>
14863 </itemizedlist>
14864 </para></listitem>
14865 <listitem><para>
14866 <emphasis>Push Your Commits to a "Contrib" Upstream:</emphasis>
14867 If you have arranged for permissions to push to an
14868 upstream contrib repository, push the change to that
14869 repository:
14870 <literallayout class='monospaced'>
14871 $ git push <replaceable>upstream_remote_repo</replaceable> <replaceable>local_branch_name</replaceable>
14872 </literallayout>
14873 For example, suppose you have permissions to push into the
14874 upstream <filename>meta-intel-contrib</filename>
14875 repository and you are working in a local branch named
14876 <replaceable>your_name</replaceable><filename>/README</filename>.
14877 The following command pushes your local commits to the
14878 <filename>meta-intel-contrib</filename> upstream
14879 repository and puts the commit in a branch named
14880 <replaceable>your_name</replaceable><filename>/README</filename>:
14881 <literallayout class='monospaced'>
14882 $ git push meta-intel-contrib <replaceable>your_name</replaceable>/README
14883 </literallayout>
14884 </para></listitem>
14885 <listitem><para id='push-determine-who-to-notify'>
14886 <emphasis>Determine Who to Notify:</emphasis>
14887 Determine the maintainer or the mailing list
14888 that you need to notify for the change.</para>
14889
14890 <para>Before submitting any change, you need to be sure
14891 who the maintainer is or what mailing list that you need
14892 to notify.
14893 Use either these methods to find out:
14894 <itemizedlist>
14895 <listitem><para>
14896 <emphasis>Maintenance File:</emphasis>
14897 Examine the <filename>maintainers.inc</filename>
14898 file, which is located in the
14899 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
14900 at
14901 <filename>meta/conf/distro/include</filename>,
14902 to see who is responsible for code.
14903 </para></listitem>
14904 <listitem><para>
14905 <emphasis>Search by File:</emphasis>
14906 Using <ulink url='&YOCTO_DOCS_OM_URL;#git'>Git</ulink>,
14907 you can enter the following command to bring up a
14908 short list of all commits against a specific file:
14909 <literallayout class='monospaced'>
14910 git shortlog -- <replaceable>filename</replaceable>
14911 </literallayout>
14912 Just provide the name of the file for which you
14913 are interested.
14914 The information returned is not ordered by history
14915 but does include a list of everyone who has
14916 committed grouped by name.
14917 From the list, you can see who is responsible for
14918 the bulk of the changes against the file.
14919 </para></listitem>
14920 <listitem><para>
14921 <emphasis>Examine the List of Mailing Lists:</emphasis>
14922 For a list of the Yocto Project and related mailing
14923 lists, see the
14924 "<ulink url='&YOCTO_DOCS_REF_URL;#resources-mailinglist'>Mailing lists</ulink>"
14925 section in the Yocto Project Reference Manual.
14926 </para></listitem>
14927 </itemizedlist>
14928 </para></listitem>
14929 <listitem><para>
14930 <emphasis>Make a Pull Request:</emphasis>
14931 Notify the maintainer or the mailing list that you have
14932 pushed a change by making a pull request.</para>
14933
14934 <para>The Yocto Project provides two scripts that
14935 conveniently let you generate and send pull requests to the
14936 Yocto Project.
14937 These scripts are <filename>create-pull-request</filename>
14938 and <filename>send-pull-request</filename>.
14939 You can find these scripts in the
14940 <filename>scripts</filename> directory within the
14941 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
14942 (e.g. <filename>~/poky/scripts</filename>).
14943 </para>
14944
14945 <para>Using these scripts correctly formats the requests
14946 without introducing any whitespace or HTML formatting.
14947 The maintainer that receives your patches either directly
14948 or through the mailing list needs to be able to save and
14949 apply them directly from your emails.
14950 Using these scripts is the preferred method for sending
14951 patches.</para>
14952
14953 <para>First, create the pull request.
14954 For example, the following command runs the script,
14955 specifies the upstream repository in the contrib directory
14956 into which you pushed the change, and provides a subject
14957 line in the created patch files:
14958 <literallayout class='monospaced'>
14959 $ ~/poky/scripts/create-pull-request -u meta-intel-contrib -s "Updated Manual Section Reference in README"
14960 </literallayout>
14961 Running this script forms
14962 <filename>*.patch</filename> files in a folder named
14963 <filename>pull-</filename><replaceable>PID</replaceable>
14964 in the current directory.
14965 One of the patch files is a cover letter.</para>
14966
14967 <para>Before running the
14968 <filename>send-pull-request</filename> script, you must
14969 edit the cover letter patch to insert information about
14970 your change.
14971 After editing the cover letter, send the pull request.
14972 For example, the following command runs the script and
14973 specifies the patch directory and email address.
14974 In this example, the email address is a mailing list:
14975 <literallayout class='monospaced'>
14976 $ ~/poky/scripts/send-pull-request -p ~/meta-intel/pull-10565 -t meta-intel@yoctoproject.org
14977 </literallayout>
14978 You need to follow the prompts as the script is
14979 interactive.
14980 <note>
14981 For help on using these scripts, simply provide the
14982 <filename>-h</filename> argument as follows:
14983 <literallayout class='monospaced'>
14984 $ poky/scripts/create-pull-request -h
14985 $ poky/scripts/send-pull-request -h
14986 </literallayout>
14987 </note>
14988 </para></listitem>
14989 </orderedlist>
14990 </para>
14991 </section>
14992
14993 <section id='submitting-a-patch'>
14994 <title>Using Email to Submit a Patch</title>
14995
14996 <para>
14997 You can submit patches without using the
14998 <filename>create-pull-request</filename> and
14999 <filename>send-pull-request</filename> scripts described in the
15000 previous section.
15001 However, keep in mind, the preferred method is to use the scripts.
15002 </para>
15003
15004 <para>
15005 Depending on the components changed, you need to submit the email
15006 to a specific mailing list.
15007 For some guidance on which mailing list to use, see the
15008 <link linkend='figuring-out-the-mailing-list-to-use'>list</link>
15009 at the beginning of this section.
15010 For a description of all the available mailing lists, see the
15011 "<ulink url='&YOCTO_DOCS_REF_URL;#resources-mailinglist'>Mailing Lists</ulink>"
15012 section in the Yocto Project Reference Manual.
15013 </para>
15014
15015 <para>
15016 Here is the general procedure on how to submit a patch through
15017 email without using the scripts:
15018 <orderedlist>
15019 <listitem><para>
15020 <emphasis>Make Your Changes Locally:</emphasis>
15021 Make your changes in your local Git repository.
15022 You should make small, controlled, isolated changes.
15023 Keeping changes small and isolated aids review,
15024 makes merging/rebasing easier and keeps the change
15025 history clean should anyone need to refer to it in
15026 future.
15027 </para></listitem>
15028 <listitem><para>
15029 <emphasis>Stage Your Changes:</emphasis>
15030 Stage your changes by using the <filename>git add</filename>
15031 command on each file you changed.
15032 </para></listitem>
15033 <listitem><para>
15034 <emphasis>Commit Your Changes:</emphasis>
15035 Commit the change by using the
15036 <filename>git commit --signoff</filename> command.
15037 Using the <filename>--signoff</filename> option identifies
15038 you as the person making the change and also satisfies
15039 the Developer's Certificate of Origin (DCO) shown earlier.
15040 </para>
15041
15042 <para>When you form a commit, you must follow certain
15043 standards established by the Yocto Project development
15044 team.
15045 See
15046 <link linkend='making-sure-you-have-correct-commit-information'>Step 3</link>
15047 in the previous section for information on how to
15048 provide commit information that meets Yocto Project
15049 commit message standards.
15050 </para></listitem>
15051 <listitem><para>
15052 <emphasis>Format the Commit:</emphasis>
15053 Format the commit into an email message.
15054 To format commits, use the
15055 <filename>git format-patch</filename> command.
15056 When you provide the command, you must include a revision
15057 list or a number of patches as part of the command.
15058 For example, either of these two commands takes your most
15059 recent single commit and formats it as an email message in
15060 the current directory:
15061 <literallayout class='monospaced'>
15062 $ git format-patch -1
15063 </literallayout>
15064 or
15065 <literallayout class='monospaced'>
15066 $ git format-patch HEAD~
15067 </literallayout></para>
15068
15069 <para>After the command is run, the current directory
15070 contains a numbered <filename>.patch</filename> file for
15071 the commit.</para>
15072
15073 <para>If you provide several commits as part of the
15074 command, the <filename>git format-patch</filename> command
15075 produces a series of numbered files in the current
15076 directory – one for each commit.
15077 If you have more than one patch, you should also use the
15078 <filename>--cover</filename> option with the command,
15079 which generates a cover letter as the first "patch" in
15080 the series.
15081 You can then edit the cover letter to provide a
15082 description for the series of patches.
15083 For information on the
15084 <filename>git format-patch</filename> command,
15085 see <filename>GIT_FORMAT_PATCH(1)</filename> displayed
15086 using the <filename>man git-format-patch</filename>
15087 command.
15088 <note>
15089 If you are or will be a frequent contributor to the
15090 Yocto Project or to OpenEmbedded, you might consider
15091 requesting a contrib area and the necessary associated
15092 rights.
15093 </note>
15094 </para></listitem>
15095 <listitem><para>
15096 <emphasis>Import the Files Into Your Mail Client:</emphasis>
15097 Import the files into your mail client by using the
15098 <filename>git send-email</filename> command.
15099 <note>
15100 In order to use <filename>git send-email</filename>,
15101 you must have the proper Git packages installed on
15102 your host.
15103 For Ubuntu, Debian, and Fedora the package is
15104 <filename>git-email</filename>.
15105 </note></para>
15106
15107 <para>The <filename>git send-email</filename> command
15108 sends email by using a local or remote Mail Transport Agent
15109 (MTA) such as <filename>msmtp</filename>,
15110 <filename>sendmail</filename>, or through a direct
15111 <filename>smtp</filename> configuration in your Git
15112 <filename>~/.gitconfig</filename> file.
15113 If you are submitting patches through email only, it is
15114 very important that you submit them without any whitespace
15115 or HTML formatting that either you or your mailer
15116 introduces.
15117 The maintainer that receives your patches needs to be able
15118 to save and apply them directly from your emails.
15119 A good way to verify that what you are sending will be
15120 applicable by the maintainer is to do a dry run and send
15121 them to yourself and then save and apply them as the
15122 maintainer would.</para>
15123
15124 <para>The <filename>git send-email</filename> command is
15125 the preferred method for sending your patches using
15126 email since there is no risk of compromising whitespace
15127 in the body of the message, which can occur when you use
15128 your own mail client.
15129 The command also has several options that let you
15130 specify recipients and perform further editing of the
15131 email message.
15132 For information on how to use the
15133 <filename>git send-email</filename> command,
15134 see <filename>GIT-SEND-EMAIL(1)</filename> displayed using
15135 the <filename>man git-send-email</filename> command.
15136 </para></listitem>
15137 </orderedlist>
15138 </para>
15139 </section>
15140 </section>
15141 </section>
15142
15143 <section id='working-with-licenses'>
15144 <title>Working With Licenses</title>
15145
15146 <para>
15147 As mentioned in the
15148 "<ulink url='&YOCTO_DOCS_OM_URL;#licensing'>Licensing</ulink>"
15149 section in the Yocto Project Overview and Concepts Manual,
15150 open source projects are open to the public and they
15151 consequently have different licensing structures in place.
15152 This section describes the mechanism by which the
15153 <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>
15154 tracks changes to licensing text and covers how to maintain open
15155 source license compliance during your project's lifecycle.
15156 The section also describes how to enable commercially licensed
15157 recipes, which by default are disabled.
15158 </para>
15159
15160 <section id="usingpoky-configuring-LIC_FILES_CHKSUM">
15161 <title>Tracking License Changes</title>
15162
15163 <para>
15164 The license of an upstream project might change in the future.
15165 In order to prevent these changes going unnoticed, the
15166 <ulink url='&YOCTO_DOCS_REF_URL;#var-LIC_FILES_CHKSUM'><filename>LIC_FILES_CHKSUM</filename></ulink>
15167 variable tracks changes to the license text. The checksums are
15168 validated at the end of the configure step, and if the
15169 checksums do not match, the build will fail.
15170 </para>
15171
15172 <section id="usingpoky-specifying-LIC_FILES_CHKSUM">
15173 <title>Specifying the <filename>LIC_FILES_CHKSUM</filename> Variable</title>
15174
15175 <para>
15176 The <filename>LIC_FILES_CHKSUM</filename>
15177 variable contains checksums of the license text in the
15178 source code for the recipe.
15179 Following is an example of how to specify
15180 <filename>LIC_FILES_CHKSUM</filename>:
15181 <literallayout class='monospaced'>
15182 LIC_FILES_CHKSUM = "file://COPYING;md5=xxxx \
15183 file://licfile1.txt;beginline=5;endline=29;md5=yyyy \
15184 file://licfile2.txt;endline=50;md5=zzzz \
15185 ..."
15186 </literallayout>
15187 <note><title>Notes</title>
15188 <itemizedlist>
15189 <listitem><para>
15190 When using "beginline" and "endline", realize
15191 that line numbering begins with one and not
15192 zero.
15193 Also, the included lines are inclusive (i.e.
15194 lines five through and including 29 in the
15195 previous example for
15196 <filename>licfile1.txt</filename>).
15197 </para></listitem>
15198 <listitem><para>
15199 When a license check fails, the selected license
15200 text is included as part of the QA message.
15201 Using this output, you can determine the exact
15202 start and finish for the needed license text.
15203 </para></listitem>
15204 </itemizedlist>
15205 </note>
15206 </para>
15207
15208 <para>
15209 The build system uses the
15210 <ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink>
15211 variable as the default directory when searching files
15212 listed in <filename>LIC_FILES_CHKSUM</filename>.
15213 The previous example employs the default directory.
15214 </para>
15215
15216 <para>
15217 Consider this next example:
15218 <literallayout class='monospaced'>
15219 LIC_FILES_CHKSUM = "file://src/ls.c;beginline=5;endline=16;\
15220 md5=bb14ed3c4cda583abc85401304b5cd4e"
15221 LIC_FILES_CHKSUM = "file://${WORKDIR}/license.html;md5=5c94767cedb5d6987c902ac850ded2c6"
15222 </literallayout>
15223 </para>
15224
15225 <para>
15226 The first line locates a file in
15227 <filename>${S}/src/ls.c</filename> and isolates lines five
15228 through 16 as license text.
15229 The second line refers to a file in
15230 <ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink>.
15231 </para>
15232
15233 <para>
15234 Note that <filename>LIC_FILES_CHKSUM</filename> variable is
15235 mandatory for all recipes, unless the
15236 <filename>LICENSE</filename> variable is set to "CLOSED".
15237 </para>
15238 </section>
15239
15240 <section id="usingpoky-LIC_FILES_CHKSUM-explanation-of-syntax">
15241 <title>Explanation of Syntax</title>
15242
15243 <para>
15244 As mentioned in the previous section, the
15245 <filename>LIC_FILES_CHKSUM</filename> variable lists all
15246 the important files that contain the license text for the
15247 source code.
15248 It is possible to specify a checksum for an entire file,
15249 or a specific section of a file (specified by beginning and
15250 ending line numbers with the "beginline" and "endline"
15251 parameters, respectively).
15252 The latter is useful for source files with a license
15253 notice header, README documents, and so forth.
15254 If you do not use the "beginline" parameter, then it is
15255 assumed that the text begins on the first line of the file.
15256 Similarly, if you do not use the "endline" parameter,
15257 it is assumed that the license text ends with the last
15258 line of the file.
15259 </para>
15260
15261 <para>
15262 The "md5" parameter stores the md5 checksum of the license
15263 text.
15264 If the license text changes in any way as compared to
15265 this parameter then a mismatch occurs.
15266 This mismatch triggers a build failure and notifies
15267 the developer.
15268 Notification allows the developer to review and address
15269 the license text changes.
15270 Also note that if a mismatch occurs during the build,
15271 the correct md5 checksum is placed in the build log and
15272 can be easily copied to the recipe.
15273 </para>
15274
15275 <para>
15276 There is no limit to how many files you can specify using
15277 the <filename>LIC_FILES_CHKSUM</filename> variable.
15278 Generally, however, every project requires a few
15279 specifications for license tracking.
15280 Many projects have a "COPYING" file that stores the
15281 license information for all the source code files.
15282 This practice allows you to just track the "COPYING"
15283 file as long as it is kept up to date.
15284 <note><title>Tips</title>
15285 <itemizedlist>
15286 <listitem><para>
15287 If you specify an empty or invalid "md5"
15288 parameter,
15289 <ulink url='&YOCTO_DOCS_REF_URL;#bitbake-term'>BitBake</ulink>
15290 returns an md5 mis-match
15291 error and displays the correct "md5" parameter
15292 value during the build.
15293 The correct parameter is also captured in
15294 the build log.
15295 </para></listitem>
15296 <listitem><para>
15297 If the whole file contains only license text,
15298 you do not need to use the "beginline" and
15299 "endline" parameters.
15300 </para></listitem>
15301 </itemizedlist>
15302 </note>
15303 </para>
15304 </section>
15305 </section>
15306
15307 <section id="enabling-commercially-licensed-recipes">
15308 <title>Enabling Commercially Licensed Recipes</title>
15309
15310 <para>
15311 By default, the OpenEmbedded build system disables
15312 components that have commercial or other special licensing
15313 requirements.
15314 Such requirements are defined on a
15315 recipe-by-recipe basis through the
15316 <ulink url='&YOCTO_DOCS_REF_URL;#var-LICENSE_FLAGS'><filename>LICENSE_FLAGS</filename></ulink>
15317 variable definition in the affected recipe.
15318 For instance, the
15319 <filename>poky/meta/recipes-multimedia/gstreamer/gst-plugins-ugly</filename>
15320 recipe contains the following statement:
15321 <literallayout class='monospaced'>
15322 LICENSE_FLAGS = "commercial"
15323 </literallayout>
15324 Here is a slightly more complicated example that contains both
15325 an explicit recipe name and version (after variable expansion):
15326 <literallayout class='monospaced'>
15327 LICENSE_FLAGS = "license_${PN}_${PV}"
15328 </literallayout>
15329 In order for a component restricted by a
15330 <filename>LICENSE_FLAGS</filename> definition to be enabled and
15331 included in an image, it needs to have a matching entry in the
15332 global
15333 <ulink url='&YOCTO_DOCS_REF_URL;#var-LICENSE_FLAGS_WHITELIST'><filename>LICENSE_FLAGS_WHITELIST</filename></ulink>
15334 variable, which is a variable typically defined in your
15335 <filename>local.conf</filename> file.
15336 For example, to enable the
15337 <filename>poky/meta/recipes-multimedia/gstreamer/gst-plugins-ugly</filename>
15338 package, you could add either the string
15339 "commercial_gst-plugins-ugly" or the more general string
15340 "commercial" to <filename>LICENSE_FLAGS_WHITELIST</filename>.
15341 See the
15342 "<link linkend='license-flag-matching'>License Flag Matching</link>"
15343 section for a full
15344 explanation of how <filename>LICENSE_FLAGS</filename> matching
15345 works.
15346 Here is the example:
15347 <literallayout class='monospaced'>
15348 LICENSE_FLAGS_WHITELIST = "commercial_gst-plugins-ugly"
15349 </literallayout>
15350 Likewise, to additionally enable the package built from the
15351 recipe containing
15352 <filename>LICENSE_FLAGS = "license_${PN}_${PV}"</filename>,
15353 and assuming that the actual recipe name was
15354 <filename>emgd_1.10.bb</filename>, the following string would
15355 enable that package as well as the original
15356 <filename>gst-plugins-ugly</filename> package:
15357 <literallayout class='monospaced'>
15358 LICENSE_FLAGS_WHITELIST = "commercial_gst-plugins-ugly license_emgd_1.10"
15359 </literallayout>
15360 As a convenience, you do not need to specify the complete
15361 license string in the whitelist for every package.
15362 You can use an abbreviated form, which consists
15363 of just the first portion or portions of the license
15364 string before the initial underscore character or characters.
15365 A partial string will match any license that contains the
15366 given string as the first portion of its license.
15367 For example, the following whitelist string will also match
15368 both of the packages previously mentioned as well as any other
15369 packages that have licenses starting with "commercial" or
15370 "license".
15371 <literallayout class='monospaced'>
15372 LICENSE_FLAGS_WHITELIST = "commercial license"
15373 </literallayout>
15374 </para>
15375
15376 <section id="license-flag-matching">
15377 <title>License Flag Matching</title>
15378
15379 <para>
15380 License flag matching allows you to control what recipes
15381 the OpenEmbedded build system includes in the build.
15382 Fundamentally, the build system attempts to match
15383 <filename>LICENSE_FLAGS</filename> strings found in recipes
15384 against <filename>LICENSE_FLAGS_WHITELIST</filename>
15385 strings found in the whitelist.
15386 A match causes the build system to include a recipe in the
15387 build, while failure to find a match causes the build
15388 system to exclude a recipe.
15389 </para>
15390
15391 <para>
15392 In general, license flag matching is simple.
15393 However, understanding some concepts will help you
15394 correctly and effectively use matching.
15395 </para>
15396
15397 <para>
15398 Before a flag
15399 defined by a particular recipe is tested against the
15400 contents of the whitelist, the expanded string
15401 <filename>_${PN}</filename> is appended to the flag.
15402 This expansion makes each
15403 <filename>LICENSE_FLAGS</filename> value recipe-specific.
15404 After expansion, the string is then matched against the
15405 whitelist.
15406 Thus, specifying
15407 <filename>LICENSE_FLAGS = "commercial"</filename>
15408 in recipe "foo", for example, results in the string
15409 <filename>"commercial_foo"</filename>.
15410 And, to create a match, that string must appear in the
15411 whitelist.
15412 </para>
15413
15414 <para>
15415 Judicious use of the <filename>LICENSE_FLAGS</filename>
15416 strings and the contents of the
15417 <filename>LICENSE_FLAGS_WHITELIST</filename> variable
15418 allows you a lot of flexibility for including or excluding
15419 recipes based on licensing.
15420 For example, you can broaden the matching capabilities by
15421 using license flags string subsets in the whitelist.
15422 <note>
15423 When using a string subset, be sure to use the part of
15424 the expanded string that precedes the appended
15425 underscore character (e.g.
15426 <filename>usethispart_1.3</filename>,
15427 <filename>usethispart_1.4</filename>, and so forth).
15428 </note>
15429 For example, simply specifying the string "commercial" in
15430 the whitelist matches any expanded
15431 <filename>LICENSE_FLAGS</filename> definition that starts
15432 with the string "commercial" such as "commercial_foo" and
15433 "commercial_bar", which are the strings the build system
15434 automatically generates for hypothetical recipes named
15435 "foo" and "bar" assuming those recipes simply specify the
15436 following:
15437 <literallayout class='monospaced'>
15438 LICENSE_FLAGS = "commercial"
15439 </literallayout>
15440 Thus, you can choose to exhaustively
15441 enumerate each license flag in the whitelist and
15442 allow only specific recipes into the image, or
15443 you can use a string subset that causes a broader range of
15444 matches to allow a range of recipes into the image.
15445 </para>
15446
15447 <para>
15448 This scheme works even if the
15449 <filename>LICENSE_FLAGS</filename> string already
15450 has <filename>_${PN}</filename> appended.
15451 For example, the build system turns the license flag
15452 "commercial_1.2_foo" into "commercial_1.2_foo_foo" and
15453 would match both the general "commercial" and the specific
15454 "commercial_1.2_foo" strings found in the whitelist, as
15455 expected.
15456 </para>
15457
15458 <para>
15459 Here are some other scenarios:
15460 <itemizedlist>
15461 <listitem><para>
15462 You can specify a versioned string in the recipe
15463 such as "commercial_foo_1.2" in a "foo" recipe.
15464 The build system expands this string to
15465 "commercial_foo_1.2_foo".
15466 Combine this license flag with a whitelist that has
15467 the string "commercial" and you match the flag
15468 along with any other flag that starts with the
15469 string "commercial".
15470 </para></listitem>
15471 <listitem><para>
15472 Under the same circumstances, you can use
15473 "commercial_foo" in the whitelist and the build
15474 system not only matches "commercial_foo_1.2" but
15475 also matches any license flag with the string
15476 "commercial_foo", regardless of the version.
15477 </para></listitem>
15478 <listitem><para>
15479 You can be very specific and use both the
15480 package and version parts in the whitelist (e.g.
15481 "commercial_foo_1.2") to specifically match a
15482 versioned recipe.
15483 </para></listitem>
15484 </itemizedlist>
15485 </para>
15486 </section>
15487
15488 <section id="other-variables-related-to-commercial-licenses">
15489 <title>Other Variables Related to Commercial Licenses</title>
15490
15491 <para>
15492 Other helpful variables related to commercial
15493 license handling exist and are defined in the
15494 <filename>poky/meta/conf/distro/include/default-distrovars.inc</filename> file:
15495 <literallayout class='monospaced'>
15496 COMMERCIAL_AUDIO_PLUGINS ?= ""
15497 COMMERCIAL_VIDEO_PLUGINS ?= ""
15498 </literallayout>
15499 If you want to enable these components, you can do so by
15500 making sure you have statements similar to the following
15501 in your <filename>local.conf</filename> configuration file:
15502 <literallayout class='monospaced'>
15503 COMMERCIAL_AUDIO_PLUGINS = "gst-plugins-ugly-mad \
15504 gst-plugins-ugly-mpegaudioparse"
15505 COMMERCIAL_VIDEO_PLUGINS = "gst-plugins-ugly-mpeg2dec \
15506 gst-plugins-ugly-mpegstream gst-plugins-bad-mpegvideoparse"
15507 LICENSE_FLAGS_WHITELIST = "commercial_gst-plugins-ugly commercial_gst-plugins-bad commercial_qmmp"
15508 </literallayout>
15509 Of course, you could also create a matching whitelist
15510 for those components using the more general "commercial"
15511 in the whitelist, but that would also enable all the
15512 other packages with <filename>LICENSE_FLAGS</filename>
15513 containing "commercial", which you may or may not want:
15514 <literallayout class='monospaced'>
15515 LICENSE_FLAGS_WHITELIST = "commercial"
15516 </literallayout>
15517 </para>
15518
15519 <para>
15520 Specifying audio and video plugins as part of the
15521 <filename>COMMERCIAL_AUDIO_PLUGINS</filename> and
15522 <filename>COMMERCIAL_VIDEO_PLUGINS</filename> statements
15523 (along with the enabling
15524 <filename>LICENSE_FLAGS_WHITELIST</filename>) includes the
15525 plugins or components into built images, thus adding
15526 support for media formats or components.
15527 </para>
15528 </section>
15529 </section>
15530
15531 <section id='maintaining-open-source-license-compliance-during-your-products-lifecycle'>
15532 <title>Maintaining Open Source License Compliance During Your Product's Lifecycle</title>
15533
15534 <para>
15535 One of the concerns for a development organization using open source
15536 software is how to maintain compliance with various open source
15537 licensing during the lifecycle of the product.
15538 While this section does not provide legal advice or
15539 comprehensively cover all scenarios, it does
15540 present methods that you can use to
15541 assist you in meeting the compliance requirements during a software
15542 release.
15543 </para>
15544
15545 <para>
15546 With hundreds of different open source licenses that the Yocto
15547 Project tracks, it is difficult to know the requirements of each
15548 and every license.
15549 However, the requirements of the major FLOSS licenses can begin
15550 to be covered by
15551 assuming that three main areas of concern exist:
15552 <itemizedlist>
15553 <listitem><para>Source code must be provided.</para></listitem>
15554 <listitem><para>License text for the software must be
15555 provided.</para></listitem>
15556 <listitem><para>Compilation scripts and modifications to the
15557 source code must be provided.
15558 </para></listitem>
15559 </itemizedlist>
15560 There are other requirements beyond the scope of these
15561 three and the methods described in this section
15562 (e.g. the mechanism through which source code is distributed).
15563 </para>
15564
15565 <para>
15566 As different organizations have different methods of complying with
15567 open source licensing, this section is not meant to imply that
15568 there is only one single way to meet your compliance obligations,
15569 but rather to describe one method of achieving compliance.
15570 The remainder of this section describes methods supported to meet the
15571 previously mentioned three requirements.
15572 Once you take steps to meet these requirements,
15573 and prior to releasing images, sources, and the build system,
15574 you should audit all artifacts to ensure completeness.
15575 <note>
15576 The Yocto Project generates a license manifest during
15577 image creation that is located
15578 in <filename>${DEPLOY_DIR}/licenses/<replaceable>image_name-datestamp</replaceable></filename>
15579 to assist with any audits.
15580 </note>
15581 </para>
15582
15583 <section id='providing-the-source-code'>
15584 <title>Providing the Source Code</title>
15585
15586 <para>
15587 Compliance activities should begin before you generate the
15588 final image.
15589 The first thing you should look at is the requirement that
15590 tops the list for most compliance groups - providing
15591 the source.
15592 The Yocto Project has a few ways of meeting this
15593 requirement.
15594 </para>
15595
15596 <para>
15597 One of the easiest ways to meet this requirement is
15598 to provide the entire
15599 <ulink url='&YOCTO_DOCS_REF_URL;#var-DL_DIR'><filename>DL_DIR</filename></ulink>
15600 used by the build.
15601 This method, however, has a few issues.
15602 The most obvious is the size of the directory since it includes
15603 all sources used in the build and not just the source used in
15604 the released image.
15605 It will include toolchain source, and other artifacts, which
15606 you would not generally release.
15607 However, the more serious issue for most companies is accidental
15608 release of proprietary software.
15609 The Yocto Project provides an
15610 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-archiver'><filename>archiver</filename></ulink>
15611 class to help avoid some of these concerns.
15612 </para>
15613
15614 <para>
15615 Before you employ <filename>DL_DIR</filename> or the
15616 <filename>archiver</filename> class, you need to decide how
15617 you choose to provide source.
15618 The source <filename>archiver</filename> class can generate
15619 tarballs and SRPMs and can create them with various levels of
15620 compliance in mind.
15621 </para>
15622
15623 <para>
15624 One way of doing this (but certainly not the only way) is to
15625 release just the source as a tarball.
15626 You can do this by adding the following to the
15627 <filename>local.conf</filename> file found in the
15628 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>:
15629 <literallayout class='monospaced'>
15630 INHERIT += "archiver"
15631 ARCHIVER_MODE[src] = "original"
15632 </literallayout>
15633 During the creation of your image, the source from all
15634 recipes that deploy packages to the image is placed within
15635 subdirectories of
15636 <filename>DEPLOY_DIR/sources</filename> based on the
15637 <ulink url='&YOCTO_DOCS_REF_URL;#var-LICENSE'><filename>LICENSE</filename></ulink>
15638 for each recipe.
15639 Releasing the entire directory enables you to comply with
15640 requirements concerning providing the unmodified source.
15641 It is important to note that the size of the directory can
15642 get large.
15643 </para>
15644
15645 <para>
15646 A way to help mitigate the size issue is to only release
15647 tarballs for licenses that require the release of
15648 source.
15649 Let us assume you are only concerned with GPL code as
15650 identified by running the following script:
15651 <literallayout class='monospaced'>
15652 # Script to archive a subset of packages matching specific license(s)
15653 # Source and license files are copied into sub folders of package folder
15654 # Must be run from build folder
15655 #!/bin/bash
15656 src_release_dir="source-release"
15657 mkdir -p $src_release_dir
15658 for a in tmp/deploy/sources/*; do
15659 for d in $a/*; do
15660 # Get package name from path
15661 p=`basename $d`
15662 p=${p%-*}
15663 p=${p%-*}
15664 # Only archive GPL packages (update *GPL* regex for your license check)
15665 numfiles=`ls tmp/deploy/licenses/$p/*GPL* 2> /dev/null | wc -l`
15666 if [ $numfiles -gt 1 ]; then
15667 echo Archiving $p
15668 mkdir -p $src_release_dir/$p/source
15669 cp $d/* $src_release_dir/$p/source 2> /dev/null
15670 mkdir -p $src_release_dir/$p/license
15671 cp tmp/deploy/licenses/$p/* $src_release_dir/$p/license 2> /dev/null
15672 fi
15673 done
15674 done
15675 </literallayout>
15676 At this point, you could create a tarball from the
15677 <filename>gpl_source_release</filename> directory and
15678 provide that to the end user.
15679 This method would be a step toward achieving compliance
15680 with section 3a of GPLv2 and with section 6 of GPLv3.
15681 </para>
15682 </section>
15683
15684 <section id='providing-license-text'>
15685 <title>Providing License Text</title>
15686
15687 <para>
15688 One requirement that is often overlooked is inclusion
15689 of license text.
15690 This requirement also needs to be dealt with prior to
15691 generating the final image.
15692 Some licenses require the license text to accompany
15693 the binary.
15694 You can achieve this by adding the following to your
15695 <filename>local.conf</filename> file:
15696 <literallayout class='monospaced'>
15697 COPY_LIC_MANIFEST = "1"
15698 COPY_LIC_DIRS = "1"
15699 LICENSE_CREATE_PACKAGE = "1"
15700 </literallayout>
15701 Adding these statements to the configuration file ensures
15702 that the licenses collected during package generation
15703 are included on your image.
15704 <note>
15705 <para>Setting all three variables to "1" results in the
15706 image having two copies of the same license file.
15707 One copy resides in
15708 <filename>/usr/share/common-licenses</filename> and
15709 the other resides in
15710 <filename>/usr/share/license</filename>.</para>
15711
15712 <para>The reason for this behavior is because
15713 <ulink url='&YOCTO_DOCS_REF_URL;#var-COPY_LIC_DIRS'><filename>COPY_LIC_DIRS</filename></ulink>
15714 and
15715 <ulink url='&YOCTO_DOCS_REF_URL;#var-COPY_LIC_MANIFEST'><filename>COPY_LIC_MANIFEST</filename></ulink>
15716 add a copy of the license when the image is built but do
15717 not offer a path for adding licenses for newly installed
15718 packages to an image.
15719 <ulink url='&YOCTO_DOCS_REF_URL;#var-LICENSE_CREATE_PACKAGE'><filename>LICENSE_CREATE_PACKAGE</filename></ulink>
15720 adds a separate package and an upgrade path for adding
15721 licenses to an image.</para>
15722 </note>
15723 </para>
15724
15725 <para>
15726 As the source <filename>archiver</filename> class has already
15727 archived the original
15728 unmodified source that contains the license files,
15729 you would have already met the requirements for inclusion
15730 of the license information with source as defined by the GPL
15731 and other open source licenses.
15732 </para>
15733 </section>
15734
15735 <section id='providing-compilation-scripts-and-source-code-modifications'>
15736 <title>Providing Compilation Scripts and Source Code Modifications</title>
15737
15738 <para>
15739 At this point, we have addressed all we need to
15740 prior to generating the image.
15741 The next two requirements are addressed during the final
15742 packaging of the release.
15743 </para>
15744
15745 <para>
15746 By releasing the version of the OpenEmbedded build system
15747 and the layers used during the build, you will be providing both
15748 compilation scripts and the source code modifications in one
15749 step.
15750 </para>
15751
15752 <para>
15753 If the deployment team has a
15754 <ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP layer</ulink>
15755 and a distro layer, and those those layers are used to patch,
15756 compile, package, or modify (in any way) any open source
15757 software included in your released images, you
15758 might be required to release those layers under section 3 of
15759 GPLv2 or section 1 of GPLv3.
15760 One way of doing that is with a clean
15761 checkout of the version of the Yocto Project and layers used
15762 during your build.
15763 Here is an example:
15764 <literallayout class='monospaced'>
15765 # We built using the &DISTRO_NAME_NO_CAP; branch of the poky repo
15766 $ git clone -b &DISTRO_NAME_NO_CAP; git://git.yoctoproject.org/poky
15767 $ cd poky
15768 # We built using the release_branch for our layers
15769 $ git clone -b release_branch git://git.mycompany.com/meta-my-bsp-layer
15770 $ git clone -b release_branch git://git.mycompany.com/meta-my-software-layer
15771 # clean up the .git repos
15772 $ find . -name ".git" -type d -exec rm -rf {} \;
15773 </literallayout>
15774 One thing a development organization might want to consider
15775 for end-user convenience is to modify
15776 <filename>meta-poky/conf/bblayers.conf.sample</filename> to
15777 ensure that when the end user utilizes the released build
15778 system to build an image, the development organization's
15779 layers are included in the <filename>bblayers.conf</filename>
15780 file automatically:
15781 <literallayout class='monospaced'>
15782 # POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
15783 # changes incompatibly
15784 POKY_BBLAYERS_CONF_VERSION = "2"
15785
15786 BBPATH = "${TOPDIR}"
15787 BBFILES ?= ""
15788
15789 BBLAYERS ?= " \
15790 ##OEROOT##/meta \
15791 ##OEROOT##/meta-poky \
15792 ##OEROOT##/meta-yocto-bsp \
15793 ##OEROOT##/meta-mylayer \
15794 "
15795 </literallayout>
15796 Creating and providing an archive of the
15797 <ulink url='&YOCTO_DOCS_REF_URL;#metadata'>Metadata</ulink>
15798 layers (recipes, configuration files, and so forth)
15799 enables you to meet your
15800 requirements to include the scripts to control compilation
15801 as well as any modifications to the original source.
15802 </para>
15803 </section>
15804 </section>
15805
15806 <section id='copying-licenses-that-do-not-exist'>
15807 <title>Copying Licenses that Do Not Exist</title>
15808
15809 <para>
15810 Some packages, such as the linux-firmware package, have many
15811 licenses that are not in any way common.
15812 You can avoid adding a lot of these types of common license
15813 files, which are only applicable to a specific package, by using
15814 the
15815 <ulink url='&YOCTO_DOCS_REF_URL;#var-NO_GENERIC_LICENSE'><filename>NO_GENERIC_LICENSE</filename></ulink>
15816 variable.
15817 Using this variable also avoids QA errors when you use a
15818 non-common, non-CLOSED license in a recipe.
15819 </para>
15820
15821 <para>
15822 The following is an example that uses the
15823 <filename>LICENSE.Abilis.txt</filename>
15824 file as the license from the fetched source:
15825 <literallayout class='monospaced'>
15826 NO_GENERIC_LICENSE[Firmware-Abilis] = "LICENSE.Abilis.txt"
15827 </literallayout>
15828 </para>
15829 </section>
15830 </section>
15831
15832 <section id='using-the-error-reporting-tool'>
15833 <title>Using the Error Reporting Tool</title>
15834
15835 <para>
15836 The error reporting tool allows you to
15837 submit errors encountered during builds to a central database.
15838 Outside of the build environment, you can use a web interface to
15839 browse errors, view statistics, and query for errors.
15840 The tool works using a client-server system where the client
15841 portion is integrated with the installed Yocto Project
15842 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
15843 (e.g. <filename>poky</filename>).
15844 The server receives the information collected and saves it in a
15845 database.
15846 </para>
15847
15848 <para>
15849 A live instance of the error reporting server exists at
15850 <ulink url='http://errors.yoctoproject.org'></ulink>.
15851 This server exists so that when you want to get help with
15852 build failures, you can submit all of the information on the
15853 failure easily and then point to the URL in your bug report
15854 or send an email to the mailing list.
15855 <note>
15856 If you send error reports to this server, the reports become
15857 publicly visible.
15858 </note>
15859 </para>
15860
15861 <section id='enabling-and-using-the-tool'>
15862 <title>Enabling and Using the Tool</title>
15863
15864 <para>
15865 By default, the error reporting tool is disabled.
15866 You can enable it by inheriting the
15867 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-report-error'><filename>report-error</filename></ulink>
15868 class by adding the following statement to the end of
15869 your <filename>local.conf</filename> file in your
15870 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
15871 <literallayout class='monospaced'>
15872 INHERIT += "report-error"
15873 </literallayout>
15874 </para>
15875
15876 <para>
15877 By default, the error reporting feature stores information in
15878 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-LOG_DIR'><filename>LOG_DIR</filename></ulink><filename>}/error-report</filename>.
15879 However, you can specify a directory to use by adding the following
15880 to your <filename>local.conf</filename> file:
15881 <literallayout class='monospaced'>
15882 ERR_REPORT_DIR = "path"
15883 </literallayout>
15884 Enabling error reporting causes the build process to collect
15885 the errors and store them in a file as previously described.
15886 When the build system encounters an error, it includes a
15887 command as part of the console output.
15888 You can run the command to send the error file to the server.
15889 For example, the following command sends the errors to an
15890 upstream server:
15891 <literallayout class='monospaced'>
15892 $ send-error-report /home/brandusa/project/poky/build/tmp/log/error-report/error_report_201403141617.txt
15893 </literallayout>
15894 In the previous example, the errors are sent to a public
15895 database available at
15896 <ulink url='http://errors.yoctoproject.org'></ulink>, which is
15897 used by the entire community.
15898 If you specify a particular server, you can send the errors
15899 to a different database.
15900 Use the following command for more information on available
15901 options:
15902 <literallayout class='monospaced'>
15903 $ send-error-report --help
15904 </literallayout>
15905 </para>
15906
15907 <para>
15908 When sending the error file, you are prompted to review the
15909 data being sent as well as to provide a name and optional
15910 email address.
15911 Once you satisfy these prompts, the command returns a link
15912 from the server that corresponds to your entry in the database.
15913 For example, here is a typical link:
15914 <literallayout class='monospaced'>
15915 http://errors.yoctoproject.org/Errors/Details/9522/
15916 </literallayout>
15917 Following the link takes you to a web interface where you can
15918 browse, query the errors, and view statistics.
15919 </para>
15920 </section>
15921
15922 <section id='disabling-the-tool'>
15923 <title>Disabling the Tool</title>
15924
15925 <para>
15926 To disable the error reporting feature, simply remove or comment
15927 out the following statement from the end of your
15928 <filename>local.conf</filename> file in your
15929 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
15930 <literallayout class='monospaced'>
15931 INHERIT += "report-error"
15932 </literallayout>
15933 </para>
15934 </section>
15935
15936 <section id='setting-up-your-own-error-reporting-server'>
15937 <title>Setting Up Your Own Error Reporting Server</title>
15938
15939 <para>
15940 If you want to set up your own error reporting server, you
15941 can obtain the code from the Git repository at
15942 <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/error-report-web/'></ulink>.
15943 Instructions on how to set it up are in the README document.
15944 </para>
15945 </section>
15946 </section>
15947
15948 <section id="dev-using-wayland-and-weston">
15949 <title>Using Wayland and Weston</title>
15950
15951 <para>
15952 <ulink url='http://en.wikipedia.org/wiki/Wayland_(display_server_protocol)'>Wayland</ulink>
15953 is a computer display server protocol that
15954 provides a method for compositing window managers to communicate
15955 directly with applications and video hardware and expects them to
15956 communicate with input hardware using other libraries.
15957 Using Wayland with supporting targets can result in better control
15958 over graphics frame rendering than an application might otherwise
15959 achieve.
15960 </para>
15961
15962 <para>
15963 The Yocto Project provides the Wayland protocol libraries and the
15964 reference
15965 <ulink url='http://en.wikipedia.org/wiki/Wayland_(display_server_protocol)#Weston'>Weston</ulink>
15966 compositor as part of its release.
15967 You can find the integrated packages in the
15968 <filename>meta</filename> layer of the
15969 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
15970 Specifically, you can find the recipes that build both Wayland
15971 and Weston at <filename>meta/recipes-graphics/wayland</filename>.
15972 </para>
15973
15974 <para>
15975 You can build both the Wayland and Weston packages for use only
15976 with targets that accept the
15977 <ulink url='https://en.wikipedia.org/wiki/Mesa_(computer_graphics)'>Mesa 3D and Direct Rendering Infrastructure</ulink>,
15978 which is also known as Mesa DRI.
15979 This implies that you cannot build and use the packages if your
15980 target uses, for example, the
15981 <trademark class='registered'>Intel</trademark> Embedded Media
15982 and Graphics Driver
15983 (<trademark class='registered'>Intel</trademark> EMGD) that
15984 overrides Mesa DRI.
15985 <note>
15986 Due to lack of EGL support, Weston 1.0.3 will not run
15987 directly on the emulated QEMU hardware.
15988 However, this version of Weston will run under X emulation
15989 without issues.
15990 </note>
15991 </para>
15992
15993 <para>
15994 This section describes what you need to do to implement Wayland and
15995 use the Weston compositor when building an image for a supporting
15996 target.
15997 </para>
15998
15999 <section id="enabling-wayland-in-an-image">
16000 <title>Enabling Wayland in an Image</title>
16001
16002 <para>
16003 To enable Wayland, you need to enable it to be built and enable
16004 it to be included (installed) in the image.
16005 </para>
16006
16007 <section id="enable-building">
16008 <title>Building</title>
16009
16010 <para>
16011 To cause Mesa to build the <filename>wayland-egl</filename>
16012 platform and Weston to build Wayland with Kernel Mode
16013 Setting
16014 (<ulink url='https://wiki.archlinux.org/index.php/Kernel_Mode_Setting'>KMS</ulink>)
16015 support, include the "wayland" flag in the
16016 <ulink url="&YOCTO_DOCS_REF_URL;#var-DISTRO_FEATURES"><filename>DISTRO_FEATURES</filename></ulink>
16017 statement in your <filename>local.conf</filename> file:
16018 <literallayout class='monospaced'>
16019 DISTRO_FEATURES_append = " wayland"
16020 </literallayout>
16021 <note>
16022 If X11 has been enabled elsewhere, Weston will build
16023 Wayland with X11 support
16024 </note>
16025 </para>
16026 </section>
16027
16028 <section id="enable-installation-in-an-image">
16029 <title>Installing</title>
16030
16031 <para>
16032 To install the Wayland feature into an image, you must
16033 include the following
16034 <ulink url='&YOCTO_DOCS_REF_URL;#var-CORE_IMAGE_EXTRA_INSTALL'><filename>CORE_IMAGE_EXTRA_INSTALL</filename></ulink>
16035 statement in your <filename>local.conf</filename> file:
16036 <literallayout class='monospaced'>
16037 CORE_IMAGE_EXTRA_INSTALL += "wayland weston"
16038 </literallayout>
16039 </para>
16040 </section>
16041 </section>
16042
16043 <section id="running-weston">
16044 <title>Running Weston</title>
16045
16046 <para>
16047 To run Weston inside X11, enabling it as described earlier and
16048 building a Sato image is sufficient.
16049 If you are running your image under Sato, a Weston Launcher
16050 appears in the "Utility" category.
16051 </para>
16052
16053 <para>
16054 Alternatively, you can run Weston through the command-line
16055 interpretor (CLI), which is better suited for development work.
16056 To run Weston under the CLI, you need to do the following after
16057 your image is built:
16058 <orderedlist>
16059 <listitem><para>
16060 Run these commands to export
16061 <filename>XDG_RUNTIME_DIR</filename>:
16062 <literallayout class='monospaced'>
16063 mkdir -p /tmp/$USER-weston
16064 chmod 0700 /tmp/$USER-weston
16065 export XDG_RUNTIME_DIR=/tmp/$USER-weston
16066 </literallayout>
16067 </para></listitem>
16068 <listitem><para>
16069 Launch Weston in the shell:
16070 <literallayout class='monospaced'>
16071 weston
16072 </literallayout></para></listitem>
16073 </orderedlist>
16074 </para>
16075 </section>
16076 </section>
16077</chapter>
16078
16079<!--
16080vim: expandtab tw=80 ts=4
16081-->
diff --git a/documentation/dev-manual/dev-manual-customization.xsl b/documentation/dev-manual/dev-manual-customization.xsl
deleted file mode 100644
index 6b16bcabf9..0000000000
--- a/documentation/dev-manual/dev-manual-customization.xsl
+++ /dev/null
@@ -1,29 +0,0 @@
1<?xml version='1.0'?>
2<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
3
4<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
5
6 <xsl:import href="http://downloads.yoctoproject.org/mirror/docbook-mirror/docbook-xsl-1.76.1/xhtml/docbook.xsl" />
7
8<!--
9
10 <xsl:import href="../template/1.76.1/docbook-xsl-1.76.1/xhtml/docbook.xsl" />
11
12 <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.76.1/xhtml/docbook.xsl" />
13
14-->
15
16 <xsl:include href="../template/permalinks.xsl"/>
17 <xsl:include href="../template/section.title.xsl"/>
18 <xsl:include href="../template/component.title.xsl"/>
19 <xsl:include href="../template/division.title.xsl"/>
20 <xsl:include href="../template/formal.object.heading.xsl"/>
21
22 <xsl:param name="html.stylesheet" select="'dev-style.css'" />
23 <xsl:param name="chapter.autolabel" select="1" />
24 <xsl:param name="appendix.autolabel" select="A" />
25 <xsl:param name="section.autolabel" select="1" />
26 <xsl:param name="section.label.includes.component.label" select="1" />
27 <xsl:param name="generate.id.attributes" select="1" />
28
29</xsl:stylesheet>
diff --git a/documentation/dev-manual/dev-manual-intro.xml b/documentation/dev-manual/dev-manual-intro.xml
deleted file mode 100644
index 38de5e4f53..0000000000
--- a/documentation/dev-manual/dev-manual-intro.xml
+++ /dev/null
@@ -1,104 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='dev-manual-intro'>
7
8<title>The Yocto Project Development Tasks Manual</title>
9 <section id='dev-welcome'>
10 <title>Welcome</title>
11
12 <para>
13 Welcome to the Yocto Project Development Tasks Manual!
14 This manual provides relevant procedures necessary for developing
15 in the Yocto Project environment (i.e. developing embedded Linux
16 images and user-space applications that run on targeted devices).
17 The manual groups related procedures into higher-level sections.
18 Procedures can consist of high-level steps or low-level steps
19 depending on the topic.
20 </para>
21
22 <para>
23 This manual provides the following:
24 <itemizedlist>
25 <listitem><para>
26 Procedures that help you get going with the Yocto Project.
27 For example, procedures that show you how to set up
28 a build host and work with the Yocto Project
29 source repositories.
30 </para></listitem>
31 <listitem><para>
32 Procedures that show you how to submit changes to the
33 Yocto Project.
34 Changes can be improvements, new features, or bug
35 fixes.
36 </para></listitem>
37 <listitem><para>
38 Procedures related to "everyday" tasks you perform while
39 developing images and applications using the Yocto
40 Project.
41 For example, procedures to create a layer, customize an
42 image, write a new recipe, and so forth.
43 </para></listitem>
44 </itemizedlist>
45 </para>
46
47 <para>
48 This manual does not provide the following:
49 <itemizedlist>
50 <listitem><para>
51 Redundant Step-by-step Instructions:
52 For example, the
53 <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
54 manual contains detailed instructions on how to install an
55 SDK, which is used to develop applications for target
56 hardware.
57 </para></listitem>
58 <listitem><para>
59 Reference or Conceptual Material:
60 This type of material resides in an appropriate reference
61 manual.
62 For example, system variables are documented in the
63 <ulink url='&YOCTO_DOCS_REF_URL;'>Yocto Project Reference Manual</ulink>.
64 </para></listitem>
65 <listitem><para>
66 Detailed Public Information Not Specific to the
67 Yocto Project:
68 For example, exhaustive information on how to use the
69 Source Control Manager Git is better covered with Internet
70 searches and official Git Documentation than through the
71 Yocto Project documentation.
72 </para></listitem>
73 </itemizedlist>
74 </para>
75 </section>
76
77 <section id='other-information'>
78 <title>Other Information</title>
79
80 <para>
81 Because this manual presents information for many different
82 topics, supplemental information is recommended for full
83 comprehension.
84 For introductory information on the Yocto Project, see the
85 <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink>.
86 If you want to build an image with no knowledge of Yocto Project
87 as a way of quickly testing it out, see the
88 <ulink url='&YOCTO_DOCS_BRIEF_URL;'>Yocto Project Quick Build</ulink>
89 document.
90 </para>
91
92 <para>
93 For a comprehensive list of links and other documentation, see the
94 "<ulink url='&YOCTO_DOCS_REF_URL;#resources-links-and-related-documentation'>Links and Related Documentation</ulink>"
95 section in the Yocto Project Reference Manual.
96 </para>
97
98 <para>
99 </para>
100 </section>
101</chapter>
102<!--
103vim: expandtab tw=80 ts=4
104-->
diff --git a/documentation/dev-manual/dev-manual-qemu.xml b/documentation/dev-manual/dev-manual-qemu.xml
deleted file mode 100644
index 1a526dd2f5..0000000000
--- a/documentation/dev-manual/dev-manual-qemu.xml
+++ /dev/null
@@ -1,691 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='dev-manual-qemu'>
7
8<title>Using the Quick EMUlator (QEMU)</title>
9
10 <para>
11 The Yocto Project uses an implementation of the Quick EMUlator (QEMU)
12 Open Source project as part of the Yocto Project development "tool
13 set".
14 This chapter provides both procedures that show you how to use the
15 Quick EMUlator (QEMU) and other QEMU information helpful for
16 development purposes.
17 </para>
18
19 <section id='qemu-dev-overview'>
20 <title>Overview</title>
21
22 <para>
23 Within the context of the Yocto Project, QEMU is an
24 emulator and virtualization machine that allows you to run a
25 complete image you have built using the Yocto Project as just
26 another task on your build system.
27 QEMU is useful for running and testing images and applications on
28 supported Yocto Project architectures without having actual
29 hardware.
30 Among other things, the Yocto Project uses QEMU to run automated
31 Quality Assurance (QA) tests on final images shipped with each
32 release.
33 <note>
34 This implementation is not the same as QEMU in general.
35 </note>
36 This section provides a brief reference for the Yocto Project
37 implementation of QEMU.
38 </para>
39
40 <para>
41 For official information and documentation on QEMU in general, see
42 the following references:
43 <itemizedlist>
44 <listitem><para>
45 <emphasis><ulink url='http://wiki.qemu.org/Main_Page'>QEMU Website</ulink>:</emphasis>
46 The official website for the QEMU Open Source project.
47 </para></listitem>
48 <listitem><para>
49 <emphasis><ulink url='http://wiki.qemu.org/Manual'>Documentation</ulink>:</emphasis>
50 The QEMU user manual.
51 </para></listitem>
52 </itemizedlist>
53 </para>
54 </section>
55
56 <section id='qemu-running-qemu'>
57 <title>Running QEMU</title>
58
59 <para>
60 To use QEMU, you need to have QEMU installed and initialized as
61 well as have the proper artifacts (i.e. image files and root
62 filesystems) available.
63 Follow these general steps to run QEMU:
64 <orderedlist>
65 <listitem><para>
66 <emphasis>Install QEMU:</emphasis>
67 QEMU is made available with the Yocto Project a number of
68 ways.
69 One method is to install a Software Development Kit (SDK).
70 See
71 "<ulink url='&YOCTO_DOCS_SDK_URL;#the-qemu-emulator'>The QEMU Emulator</ulink>"
72 section in the Yocto Project Application Development and
73 the Extensible Software Development Kit (eSDK) manual
74 for information on how to install QEMU.
75 </para></listitem>
76 <listitem><para>
77 <emphasis>Setting Up the Environment:</emphasis>
78 How you set up the QEMU environment depends on how you
79 installed QEMU:
80 <itemizedlist>
81 <listitem><para>
82 If you cloned the <filename>poky</filename>
83 repository or you downloaded and unpacked a
84 Yocto Project release tarball, you can source
85 the build environment script (i.e.
86 <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>):
87 <literallayout class='monospaced'>
88 $ cd ~/poky
89 $ source oe-init-build-env
90 </literallayout>
91 </para></listitem>
92 <listitem><para>
93 If you installed a cross-toolchain, you can
94 run the script that initializes the toolchain.
95 For example, the following commands run the
96 initialization script from the default
97 <filename>poky_sdk</filename> directory:
98 <literallayout class='monospaced'>
99 . ~/poky_sdk/environment-setup-core2-64-poky-linux
100 </literallayout>
101 </para></listitem>
102 </itemizedlist>
103 </para></listitem>
104 <listitem><para>
105 <emphasis>Ensure the Artifacts are in Place:</emphasis>
106 You need to be sure you have a pre-built kernel that
107 will boot in QEMU.
108 You also need the target root filesystem for your target
109 machine's architecture:
110 <itemizedlist>
111 <listitem><para>
112 If you have previously built an image for QEMU
113 (e.g. <filename>qemux86</filename>,
114 <filename>qemuarm</filename>, and so forth),
115 then the artifacts are in place in your
116 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
117 </para></listitem>
118 <listitem><para>
119 If you have not built an image, you can go to the
120 <ulink url='&YOCTO_MACHINES_DL_URL;'>machines/qemu</ulink>
121 area and download a pre-built image that matches
122 your architecture and can be run on QEMU.
123 </para></listitem>
124 </itemizedlist></para>
125
126 <para>See the
127 "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-extracting-the-root-filesystem'>Extracting the Root Filesystem</ulink>"
128 section in the Yocto Project Application Development and
129 the Extensible Software Development Kit (eSDK) manual
130 for information on how to extract a root filesystem.
131 </para></listitem>
132 <listitem><para>
133 <emphasis>Run QEMU:</emphasis>
134 The basic <filename>runqemu</filename> command syntax is as
135 follows:
136 <literallayout class='monospaced'>
137 $ runqemu [<replaceable>option</replaceable> ] [...]
138 </literallayout>
139 Based on what you provide on the command line,
140 <filename>runqemu</filename> does a good job of figuring
141 out what you are trying to do.
142 For example, by default, QEMU looks for the most recently
143 built image according to the timestamp when it needs to
144 look for an image.
145 Minimally, through the use of options, you must provide
146 either a machine name, a virtual machine image
147 (<filename>*wic.vmdk</filename>), or a kernel image
148 (<filename>*.bin</filename>).</para>
149
150 <para>Here are some additional examples to help illustrate
151 further QEMU:
152 <itemizedlist>
153 <listitem><para>
154 This example starts QEMU with
155 <replaceable>MACHINE</replaceable> set to "qemux86-64".
156 Assuming a standard
157 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>,
158 <filename>runqemu</filename> automatically finds the
159 <filename>bzImage-qemux86-64.bin</filename> image file and
160 the
161 <filename>core-image-minimal-qemux86-64-20200218002850.rootfs.ext4</filename>
162 (assuming the current build created a
163 <filename>core-image-minimal</filename> image).
164 <note>
165 When more than one image with the same name exists, QEMU finds
166 and uses the most recently built image according to the
167 timestamp.
168 </note>
169 <literallayout class='monospaced'>
170 $ runqemu qemux86-64
171 </literallayout>
172 </para></listitem>
173 <listitem><para>
174 This example produces the exact same results as the
175 previous example.
176 This command, however, specifically provides the image
177 and root filesystem type.
178 <literallayout class='monospaced'>
179 $ runqemu qemux86-64 core-image-minimal ext4
180 </literallayout>
181 </para></listitem>
182 <listitem><para>
183 This example specifies to boot an initial RAM disk image
184 and to enable audio in QEMU.
185 For this case, <filename>runqemu</filename> set the
186 internal variable <filename>FSTYPE</filename> to
187 "cpio.gz".
188 Also, for audio to be enabled, an appropriate driver must
189 be installed (see the previous description for the
190 <filename>audio</filename> option for more information).
191 <literallayout class='monospaced'>
192 $ runqemu qemux86-64 ramfs audio
193 </literallayout>
194 </para></listitem>
195 <listitem><para>
196 This example does not provide enough information for
197 QEMU to launch.
198 While the command does provide a root filesystem type, it
199 must also minimally provide a
200 <replaceable>MACHINE</replaceable>,
201 <replaceable>KERNEL</replaceable>, or
202 <replaceable>VM</replaceable> option.
203 <literallayout class='monospaced'>
204 $ runqemu ext4
205 </literallayout>
206 </para></listitem>
207 <listitem><para>
208 This example specifies to boot a virtual machine
209 image (<filename>.wic.vmdk</filename> file).
210 From the <filename>.wic.vmdk</filename>,
211 <filename>runqemu</filename> determines the QEMU
212 architecture (<replaceable>MACHINE</replaceable>) to be
213 "qemux86-64" and the root filesystem type to be "vmdk".
214 <literallayout class='monospaced'>
215 $ runqemu /home/scott-lenovo/vm/core-image-minimal-qemux86-64.wic.vmdk
216 </literallayout>
217 </para></listitem>
218 </itemizedlist>
219 </para></listitem>
220 </orderedlist>
221 </para>
222 </section>
223
224 <section id='switching-between-consoles'>
225 <title>Switching Between Consoles</title>
226
227 <para>
228 When booting or running QEMU, you can switch between
229 supported consoles by using
230 Ctrl+Alt+<replaceable>number</replaceable>.
231 For example, Ctrl+Alt+3 switches you to the serial console
232 as long as that console is enabled.
233 Being able to switch consoles is helpful, for example, if
234 the main QEMU console breaks for some reason.
235 <note>
236 Usually, "2" gets you to the main console and "3"
237 gets you to the serial console.
238 </note>
239 </para>
240 </section>
241
242 <section id='removing-the-splash-screen'>
243 <title>Removing the Splash Screen</title>
244
245 <para>
246 You can remove the splash screen when QEMU is booting by
247 using Alt+left.
248 Removing the splash screen allows you to see what is
249 happening in the background.
250 </para>
251 </section>
252
253 <section id='disabling-the-cursor-grab'>
254 <title>Disabling the Cursor Grab</title>
255
256 <para>
257 The default QEMU integration captures the cursor within the
258 main window.
259 It does this since standard mouse devices only provide
260 relative input and not absolute coordinates.
261 You then have to break out of the grab using the "Ctrl+Alt"
262 key combination.
263 However, the Yocto Project's integration of QEMU enables
264 the wacom USB touch pad driver by default to allow input
265 of absolute coordinates.
266 This default means that the mouse can enter and leave the
267 main window without the grab taking effect leading to a
268 better user experience.
269 </para>
270 </section>
271
272 <section id='qemu-running-under-a-network-file-system-nfs-server'>
273 <title>Running Under a Network File System (NFS) Server</title>
274
275 <para>
276 One method for running QEMU is to run it on an NFS server.
277 This is useful when you need to access the same file system
278 from both the build and the emulated system at the same time.
279 It is also worth noting that the system does not need root
280 privileges to run.
281 It uses a user space NFS server to avoid that.
282 Follow these steps to set up for running QEMU using an NFS
283 server.
284 <orderedlist>
285 <listitem><para>
286 <emphasis>Extract a Root Filesystem:</emphasis>
287 Once you are able to run QEMU in your environment, you can
288 use the <filename>runqemu-extract-sdk</filename> script,
289 which is located in the <filename>scripts</filename>
290 directory along with the <filename>runqemu</filename>
291 script.</para>
292
293 <para>The <filename>runqemu-extract-sdk</filename> takes a
294 root filesystem tarball and extracts it into a location
295 that you specify.
296 Here is an example that takes a file system and
297 extracts it to a directory named
298 <filename>test-nfs</filename>:
299 <literallayout class='monospaced'>
300 runqemu-extract-sdk ./tmp/deploy/images/qemux86-64/core-image-sato-qemux86-64.tar.bz2 test-nfs
301 </literallayout>
302 </para></listitem>
303 <listitem><para>
304 <emphasis>Start QEMU:</emphasis>
305 Once you have extracted the file system, you can run
306 <filename>runqemu</filename> normally with the additional
307 location of the file system.
308 You can then also make changes to the files within
309 <filename>./test-nfs</filename> and see those changes
310 appear in the image in real time.
311 Here is an example using the <filename>qemux86</filename>
312 image:
313 <literallayout class='monospaced'>
314 runqemu qemux86-64 ./test-nfs
315 </literallayout>
316 </para></listitem>
317 </orderedlist>
318 <note>
319 <para>
320 Should you need to start, stop, or restart the NFS share,
321 you can use the following commands:
322 <itemizedlist>
323 <listitem><para>
324 The following command starts the NFS share:
325 <literallayout class='monospaced'>
326 runqemu-export-rootfs start <replaceable>file-system-location</replaceable>
327 </literallayout>
328 </para></listitem>
329 <listitem><para>
330 The following command stops the NFS share:
331 <literallayout class='monospaced'>
332 runqemu-export-rootfs stop <replaceable>file-system-location</replaceable>
333 </literallayout>
334 </para></listitem>
335 <listitem><para>
336 The following command restarts the NFS share:
337 <literallayout class='monospaced'>
338 runqemu-export-rootfs restart <replaceable>file-system-location</replaceable>
339 </literallayout>
340 </para></listitem>
341 </itemizedlist>
342 </para>
343 </note>
344 </para>
345 </section>
346
347 <section id='qemu-kvm-cpu-compatibility'>
348 <title>QEMU CPU Compatibility Under KVM</title>
349
350 <para>
351 By default, the QEMU build compiles for and targets 64-bit and x86
352 <trademark class='registered'>Intel</trademark> <trademark class='trademark'>Core</trademark>2
353 Duo processors and 32-bit x86
354 <trademark class='registered'>Intel</trademark> <trademark class='registered'>Pentium</trademark>
355 II processors.
356 QEMU builds for and targets these CPU types because they display
357 a broad range of CPU feature compatibility with many commonly
358 used CPUs.
359 </para>
360
361 <para>
362 Despite this broad range of compatibility, the CPUs could support
363 a feature that your host CPU does not support.
364 Although this situation is not a problem when QEMU uses software
365 emulation of the feature, it can be a problem when QEMU is
366 running with KVM enabled.
367 Specifically, software compiled with a certain CPU feature crashes
368 when run on a CPU under KVM that does not support that feature.
369 To work around this problem, you can override QEMU's runtime CPU
370 setting by changing the <filename>QB_CPU_KVM</filename>
371 variable in <filename>qemuboot.conf</filename> in the
372 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory's</ulink>
373 <filename>deploy/image</filename> directory.
374 This setting specifies a <filename>-cpu</filename> option
375 passed into QEMU in the <filename>runqemu</filename> script.
376 Running <filename>qemu -cpu help</filename> returns a list of
377 available supported CPU types.
378 </para>
379 </section>
380
381 <section id='qemu-dev-performance'>
382 <title>QEMU Performance</title>
383
384 <para>
385 Using QEMU to emulate your hardware can result in speed issues
386 depending on the target and host architecture mix.
387 For example, using the <filename>qemux86</filename> image in the
388 emulator on an Intel-based 32-bit (x86) host machine is fast
389 because the target and host architectures match.
390 On the other hand, using the <filename>qemuarm</filename> image
391 on the same Intel-based host can be slower.
392 But, you still achieve faithful emulation of ARM-specific issues.
393 </para>
394
395 <para>
396 To speed things up, the QEMU images support using
397 <filename>distcc</filename> to call a cross-compiler outside the
398 emulated system.
399 If you used <filename>runqemu</filename> to start QEMU, and the
400 <filename>distccd</filename> application is present on the host
401 system, any BitBake cross-compiling toolchain available from the
402 build system is automatically used from within QEMU simply by
403 calling <filename>distcc</filename>.
404 You can accomplish this by defining the cross-compiler variable
405 (e.g. <filename>export CC="distcc"</filename>).
406 Alternatively, if you are using a suitable SDK image or the
407 appropriate stand-alone toolchain is present, the toolchain is
408 also automatically used.
409 <note>
410 Several mechanisms exist that let you connect to the system
411 running on the QEMU emulator:
412 <itemizedlist>
413 <listitem><para>
414 QEMU provides a framebuffer interface that makes
415 standard consoles available.
416 </para></listitem>
417 <listitem><para>
418 Generally, headless embedded devices have a serial port.
419 If so, you can configure the operating system of the
420 running image to use that port to run a console.
421 The connection uses standard IP networking.
422 </para></listitem>
423 <listitem><para>
424 SSH servers exist in some QEMU images.
425 The <filename>core-image-sato</filename> QEMU image
426 has a Dropbear secure shell (SSH) server that runs
427 with the root password disabled.
428 The <filename>core-image-full-cmdline</filename> and
429 <filename>core-image-lsb</filename> QEMU images
430 have OpenSSH instead of Dropbear.
431 Including these SSH servers allow you to use standard
432 <filename>ssh</filename> and <filename>scp</filename>
433 commands.
434 The <filename>core-image-minimal</filename> QEMU image,
435 however, contains no SSH server.
436 </para></listitem>
437 <listitem><para>
438 You can use a provided, user-space NFS server to boot
439 the QEMU session using a local copy of the root
440 filesystem on the host.
441 In order to make this connection, you must extract a
442 root filesystem tarball by using the
443 <filename>runqemu-extract-sdk</filename> command.
444 After running the command, you must then point the
445 <filename>runqemu</filename>
446 script to the extracted directory instead of a root
447 filesystem image file.
448 See the
449 "<link linkend='qemu-running-under-a-network-file-system-nfs-server'>Running Under a Network File System (NFS) Server</link>"
450 section for more information.
451 </para></listitem>
452 </itemizedlist>
453 </note>
454 </para>
455 </section>
456
457 <section id='qemu-dev-command-line-syntax'>
458 <title>QEMU Command-Line Syntax</title>
459
460 <para>
461 The basic <filename>runqemu</filename> command syntax is as
462 follows:
463 <literallayout class='monospaced'>
464 $ runqemu [<replaceable>option</replaceable> ] [...]
465 </literallayout>
466 Based on what you provide on the command line,
467 <filename>runqemu</filename> does a good job of figuring out what
468 you are trying to do.
469 For example, by default, QEMU looks for the most recently built
470 image according to the timestamp when it needs to look for an
471 image.
472 Minimally, through the use of options, you must provide either
473 a machine name, a virtual machine image
474 (<filename>*wic.vmdk</filename>), or a kernel image
475 (<filename>*.bin</filename>).
476 </para>
477
478 <para>
479 Following is the command-line help output for the
480 <filename>runqemu</filename> command:
481 <literallayout class='monospaced'>
482 $ runqemu --help
483
484 Usage: you can run this script with any valid combination
485 of the following environment variables (in any order):
486 KERNEL - the kernel image file to use
487 ROOTFS - the rootfs image file or nfsroot directory to use
488 MACHINE - the machine name (optional, autodetected from KERNEL filename if unspecified)
489 Simplified QEMU command-line options can be passed with:
490 nographic - disable video console
491 serial - enable a serial console on /dev/ttyS0
492 slirp - enable user networking, no root privileges is required
493 kvm - enable KVM when running x86/x86_64 (VT-capable CPU required)
494 kvm-vhost - enable KVM with vhost when running x86/x86_64 (VT-capable CPU required)
495 publicvnc - enable a VNC server open to all hosts
496 audio - enable audio
497 [*/]ovmf* - OVMF firmware file or base name for booting with UEFI
498 tcpserial=&lt;port&gt; - specify tcp serial port number
499 biosdir=&lt;dir&gt; - specify custom bios dir
500 biosfilename=&lt;filename&gt; - specify bios filename
501 qemuparams=&lt;xyz&gt; - specify custom parameters to QEMU
502 bootparams=&lt;xyz&gt; - specify custom kernel parameters during boot
503 help, -h, --help: print this text
504
505 Examples:
506 runqemu
507 runqemu qemuarm
508 runqemu tmp/deploy/images/qemuarm
509 runqemu tmp/deploy/images/qemux86/&lt;qemuboot.conf&gt;
510 runqemu qemux86-64 core-image-sato ext4
511 runqemu qemux86-64 wic-image-minimal wic
512 runqemu path/to/bzImage-qemux86.bin path/to/nfsrootdir/ serial
513 runqemu qemux86 iso/hddimg/wic.vmdk/wic.qcow2/wic.vdi/ramfs/cpio.gz...
514 runqemu qemux86 qemuparams="-m 256"
515 runqemu qemux86 bootparams="psplash=false"
516 runqemu path/to/&lt;image&gt;-&lt;machine&gt;.wic
517 runqemu path/to/&lt;image&gt;-&lt;machine&gt;.wic.vmdk
518 </literallayout>
519 </para>
520 </section>
521
522 <section id='qemu-dev-runqemu-command-line-options'>
523 <title><filename>runqemu</filename> Command-Line Options</title>
524
525 <para>
526 Following is a description of <filename>runqemu</filename>
527 options you can provide on the command line:
528 <note><title>Tip</title>
529 If you do provide some "illegal" option combination or perhaps
530 you do not provide enough in the way of options,
531 <filename>runqemu</filename> provides appropriate error
532 messaging to help you correct the problem.
533 </note>
534 <itemizedlist>
535 <listitem><para>
536 <replaceable>QEMUARCH</replaceable>:
537 The QEMU machine architecture, which must be "qemuarm",
538 "qemuarm64", "qemumips", "qemumips64", "qemuppc",
539 "qemux86", or "qemux86-64".
540 </para></listitem>
541 <listitem><para>
542 <filename><replaceable>VM</replaceable></filename>:
543 The virtual machine image, which must be a
544 <filename>.wic.vmdk</filename> file.
545 Use this option when you want to boot a
546 <filename>.wic.vmdk</filename> image.
547 The image filename you provide must contain one of the
548 following strings: "qemux86-64", "qemux86", "qemuarm",
549 "qemumips64", "qemumips", "qemuppc", or "qemush4".
550 </para></listitem>
551 <listitem><para>
552 <replaceable>ROOTFS</replaceable>:
553 A root filesystem that has one of the following
554 filetype extensions: "ext2", "ext3", "ext4", "jffs2",
555 "nfs", or "btrfs".
556 If the filename you provide for this option uses "nfs", it
557 must provide an explicit root filesystem path.
558 </para></listitem>
559 <listitem><para>
560 <replaceable>KERNEL</replaceable>:
561 A kernel image, which is a <filename>.bin</filename> file.
562 When you provide a <filename>.bin</filename> file,
563 <filename>runqemu</filename> detects it and assumes the
564 file is a kernel image.
565 </para></listitem>
566 <listitem><para>
567 <replaceable>MACHINE</replaceable>:
568 The architecture of the QEMU machine, which must be one
569 of the following: "qemux86", "qemux86-64", "qemuarm",
570 "qemuarm64", "qemumips", "qemumips64", or "qemuppc".
571 The <replaceable>MACHINE</replaceable> and
572 <replaceable>QEMUARCH</replaceable> options are basically
573 identical.
574 If you do not provide a <replaceable>MACHINE</replaceable>
575 option, <filename>runqemu</filename> tries to determine
576 it based on other options.
577 </para></listitem>
578 <listitem><para>
579 <filename>ramfs</filename>:
580 Indicates you are booting an initial RAM disk (initramfs)
581 image, which means the <filename>FSTYPE</filename> is
582 <filename>cpio.gz</filename>.
583 </para></listitem>
584 <listitem><para>
585 <filename>iso</filename>:
586 Indicates you are booting an ISO image, which means the
587 <filename>FSTYPE</filename> is
588 <filename>.iso</filename>.
589 </para></listitem>
590 <listitem><para>
591 <filename>nographic</filename>:
592 Disables the video console, which sets the console to
593 "ttys0".
594 This option is useful when you have logged into a server
595 and you do not want to disable forwarding from the
596 X Window System (X11) to your workstation or laptop.
597 </para></listitem>
598 <listitem><para>
599 <filename>serial</filename>:
600 Enables a serial console on
601 <filename>/dev/ttyS0</filename>.
602 </para></listitem>
603 <listitem><para>
604 <filename>biosdir</filename>:
605 Establishes a custom directory for BIOS, VGA BIOS and
606 keymaps.
607 </para></listitem>
608 <listitem><para>
609 <filename>biosfilename</filename>:
610 Establishes a custom BIOS name.
611 </para></listitem>
612 <listitem><para>
613 <filename>qemuparams=\"<replaceable>xyz</replaceable>\"</filename>:
614 Specifies custom QEMU parameters.
615 Use this option to pass options other than the simple
616 "kvm" and "serial" options.
617 </para></listitem>
618 <listitem><para><filename>bootparams=\"<replaceable>xyz</replaceable>\"</filename>:
619 Specifies custom boot parameters for the kernel.
620 </para></listitem>
621 <listitem><para>
622 <filename>audio</filename>:
623 Enables audio in QEMU.
624 The <replaceable>MACHINE</replaceable> option must be
625 either "qemux86" or "qemux86-64" in order for audio to be
626 enabled.
627 Additionally, the <filename>snd_intel8x0</filename>
628 or <filename>snd_ens1370</filename> driver must be
629 installed in linux guest.
630 </para></listitem>
631 <listitem><para>
632 <filename>slirp</filename>:
633 Enables "slirp" networking, which is a different way
634 of networking that does not need root access
635 but also is not as easy to use or comprehensive
636 as the default.
637 </para></listitem>
638 <listitem><para id='kvm-cond'>
639 <filename>kvm</filename>:
640 Enables KVM when running "qemux86" or "qemux86-64"
641 QEMU architectures.
642 For KVM to work, all the following conditions must be met:
643 <itemizedlist>
644 <listitem><para>
645 Your <replaceable>MACHINE</replaceable> must be either
646qemux86" or "qemux86-64".
647 </para></listitem>
648 <listitem><para>
649 Your build host has to have the KVM modules
650 installed, which are
651 <filename>/dev/kvm</filename>.
652 </para></listitem>
653 <listitem><para>
654 The build host <filename>/dev/kvm</filename>
655 directory has to be both writable and readable.
656 </para></listitem>
657 </itemizedlist>
658 </para></listitem>
659 <listitem><para>
660 <filename>kvm-vhost</filename>:
661 Enables KVM with VHOST support when running "qemux86"
662 or "qemux86-64" QEMU architectures.
663 For KVM with VHOST to work, the following conditions must
664 be met:
665 <itemizedlist>
666 <listitem><para>
667 <link linkend='kvm-cond'>kvm</link> option
668 conditions must be met.
669 </para></listitem>
670 <listitem><para>
671 Your build host has to have virtio net device, which
672 are <filename>/dev/vhost-net</filename>.
673 </para></listitem>
674 <listitem><para>
675 The build host <filename>/dev/vhost-net</filename>
676 directory has to be either readable or writable
677 and "slirp-enabled".
678 </para></listitem>
679 </itemizedlist>
680 </para></listitem>
681 <listitem><para>
682 <filename>publicvnc</filename>:
683 Enables a VNC server open to all hosts.
684 </para></listitem>
685 </itemizedlist>
686 </para>
687 </section>
688</chapter>
689<!--
690vim: expandtab tw=80 ts=4
691-->
diff --git a/documentation/dev-manual/dev-manual-start.xml b/documentation/dev-manual/dev-manual-start.xml
deleted file mode 100644
index 9ff9ac4c8f..0000000000
--- a/documentation/dev-manual/dev-manual-start.xml
+++ /dev/null
@@ -1,1288 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='dev-manual-start'>
7
8<title>Setting Up to Use the Yocto Project</title>
9
10<para>
11 This chapter provides guidance on how to prepare to use the
12 Yocto Project.
13 You can learn about creating a team environment that develops using the
14 Yocto Project, how to set up a
15 <ulink url='&YOCTO_DOCS_REF_URL;#hardware-build-system-term'>build host</ulink>,
16 how to locate Yocto Project source repositories, and how to create local
17 Git repositories.
18</para>
19
20<section id="usingpoky-changes-collaborate">
21 <title>Creating a Team Development Environment</title>
22
23 <para>
24 It might not be immediately clear how you can use the Yocto
25 Project in a team development environment, or how to scale it for a
26 large team of developers.
27 You can adapt the Yocto Project to many different use cases and
28 scenarios;
29 however, this flexibility could cause difficulties if you are trying
30 to create a working setup that scales effectively.
31 </para>
32
33 <para>
34 To help you understand how to set up this type of environment,
35 this section presents a procedure that gives you information
36 that can help you get the results you want.
37 The procedure is high-level and presents some of the project's most
38 successful experiences, practices, solutions, and available
39 technologies that have proved to work well in the past;
40 however, keep in mind, the procedure here is simply a starting point.
41 You can build off these steps and customize the procedure to fit any
42 particular working environment and set of practices.
43 <orderedlist>
44 <listitem><para>
45 <emphasis>Determine Who is Going to be Developing:</emphasis>
46 You first need to understand who is going to be doing anything
47 related to the Yocto Project and determine their roles.
48 Making this determination is essential to completing
49 subsequent steps, which are to get your equipment together
50 and set up your development environment's hardware topology.
51 </para>
52
53 <para>The following roles exist:
54 <itemizedlist>
55 <listitem><para>
56 <emphasis>Application Developer:</emphasis>
57 This type of developer does application level work
58 on top of an existing software stack.
59 </para></listitem>
60 <listitem><para>
61 <emphasis>Core System Developer:</emphasis>
62 This type of developer works on the contents of the
63 operating system image itself.
64 </para></listitem>
65 <listitem><para>
66 <emphasis>Build Engineer:</emphasis>
67 This type of developer manages Autobuilders and
68 releases. Depending on the specifics of the environment,
69 not all situations might need a Build Engineer.
70 </para></listitem>
71 <listitem><para>
72 <emphasis>Test Engineer:</emphasis>
73 This type of developer creates and manages automated
74 tests that are used to ensure all application and
75 core system development meets desired quality
76 standards.
77 </para></listitem>
78 </itemizedlist>
79 </para></listitem>
80 <listitem><para>
81 <emphasis>Gather the Hardware:</emphasis>
82 Based on the size and make-up of the team, get the hardware
83 together.
84 Ideally, any development, build, or test engineer uses
85 a system that runs a supported Linux distribution.
86 These systems, in general, should be high performance
87 (e.g. dual, six-core Xeons with 24 Gbytes of RAM and plenty
88 of disk space).
89 You can help ensure efficiency by having any machines used
90 for testing or that run Autobuilders be as high performance
91 as possible.
92 <note>
93 Given sufficient processing power, you might also consider
94 building Yocto Project development containers to be run
95 under Docker, which is described later.
96 </note>
97 </para></listitem>
98 <listitem><para>
99 <emphasis>Understand the Hardware Topology of the Environment:</emphasis>
100 Once you understand the hardware involved and the make-up
101 of the team, you can understand the hardware topology of the
102 development environment.
103 You can get a visual idea of the machines and their roles
104 across the development environment.
105
106<!--
107 The following figure shows a moderately sized Yocto Project
108 development environment.
109
110 <para role="writernotes">
111 Need figure.</para>
112-->
113
114 </para></listitem>
115 <listitem><para>
116 <emphasis>Use Git as Your Source Control Manager (SCM):</emphasis>
117 Keeping your
118 <ulink url='&YOCTO_DOCS_REF_URL;#metadata'>Metadata</ulink>
119 (i.e. recipes, configuration files, classes, and so forth)
120 and any software you are developing under the control of an SCM
121 system that is compatible with the OpenEmbedded build system
122 is advisable.
123 Of all of the SCMs supported by BitBake, the Yocto Project team strongly
124 recommends using
125 <ulink url='&YOCTO_DOCS_OM_URL;#git'>Git</ulink>.
126 Git is a distributed system that is easy to back up,
127 allows you to work remotely, and then connects back to the
128 infrastructure.
129 <note>
130 For information about BitBake, see the
131 <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>.
132 </note></para>
133
134 <para>It is relatively easy to set up Git services and create
135 infrastructure like
136 <ulink url='&YOCTO_GIT_URL;'>http://git.yoctoproject.org</ulink>,
137 which is based on server software called
138 <filename>gitolite</filename> with <filename>cgit</filename>
139 being used to generate the web interface that lets you view the
140 repositories.
141 The <filename>gitolite</filename> software identifies users
142 using SSH keys and allows branch-based access controls to
143 repositories that you can control as little or as much as
144 necessary.
145 <note>
146 The setup of these services is beyond the scope of this
147 manual.
148 However, sites such as the following exist that describe
149 how to perform setup:
150 <itemizedlist>
151 <listitem><para>
152 <ulink url='http://git-scm.com/book/ch4-8.html'>Git documentation</ulink>:
153 Describes how to install
154 <filename>gitolite</filename> on the server.
155 </para></listitem>
156 <listitem><para>
157 <ulink url='http://gitolite.com'>Gitolite</ulink>:
158 Information for <filename>gitolite</filename>.
159 </para></listitem>
160 <listitem><para>
161 <ulink url='https://git.wiki.kernel.org/index.php/Interfaces,_frontends,_and_tools'>Interfaces, frontends, and tools</ulink>:
162 Documentation on how to create interfaces and
163 frontends for Git.
164 </para></listitem>
165 </itemizedlist>
166 </note>
167 </para></listitem>
168 <listitem><para>
169 <emphasis>Set up the Application Development Machines:</emphasis>
170 As mentioned earlier, application developers are creating
171 applications on top of existing software stacks.
172 Following are some best practices for setting up machines
173 used for application development:
174 <itemizedlist>
175 <listitem><para>
176 Use a pre-built toolchain that contains the software
177 stack itself.
178 Then, develop the application code on top of the
179 stack.
180 This method works well for small numbers of relatively
181 isolated applications.
182 </para></listitem>
183 <listitem><para>
184 Keep your cross-development toolchains updated.
185 You can do this through provisioning either as new
186 toolchain downloads or as updates through a package
187 update mechanism using <filename>opkg</filename>
188 to provide updates to an existing toolchain.
189 The exact mechanics of how and when to do this depend
190 on local policy.
191 </para></listitem>
192 <listitem><para>
193 Use multiple toolchains installed locally into
194 different locations to allow development across
195 versions.
196 </para></listitem>
197 </itemizedlist>
198 </para></listitem>
199 <listitem><para>
200 <emphasis>Set up the Core Development Machines:</emphasis>
201 As mentioned earlier, core developers work on the contents of
202 the operating system itself.
203 Following are some best practices for setting up machines
204 used for developing images:
205 <itemizedlist>
206 <listitem><para>
207 Have the
208 <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>
209 available on the developer workstations so developers
210 can run their own builds and directly rebuild the
211 software stack.
212 </para></listitem>
213 <listitem><para>
214 Keep the core system unchanged as much as
215 possible and do your work in layers on top of the
216 core system.
217 Doing so gives you a greater level of portability when
218 upgrading to new versions of the core system or Board
219 Support Packages (BSPs).
220 </para></listitem>
221 <listitem><para>
222 Share layers amongst the developers of a
223 particular project and contain the policy configuration
224 that defines the project.
225 </para></listitem>
226 </itemizedlist>
227 </para></listitem>
228 <listitem><para>
229 <emphasis>Set up an Autobuilder:</emphasis>
230 Autobuilders are often the core of the development
231 environment.
232 It is here that changes from individual developers are brought
233 together and centrally tested.
234 Based on this automated build and test environment, subsequent
235 decisions about releases can be made.
236 Autobuilders also allow for "continuous integration" style
237 testing of software components and regression identification
238 and tracking.</para>
239
240 <para>See "<ulink url='http://autobuilder.yoctoproject.org'>Yocto Project Autobuilder</ulink>"
241 for more information and links to buildbot.
242 The Yocto Project team has found this implementation
243 works well in this role.
244 A public example of this is the Yocto Project
245 Autobuilders, which the Yocto Project team uses to test the
246 overall health of the project.</para>
247
248 <para>The features of this system are:
249 <itemizedlist>
250 <listitem><para>
251 Highlights when commits break the build.
252 </para></listitem>
253 <listitem><para>
254 Populates an
255 <ulink url='&YOCTO_DOCS_OM_URL;#shared-state-cache'>sstate cache</ulink>
256 from which developers can pull rather than requiring
257 local builds.
258 </para></listitem>
259 <listitem><para>
260 Allows commit hook triggers, which trigger builds when
261 commits are made.
262 </para></listitem>
263 <listitem><para>
264 Allows triggering of automated image booting
265 and testing under the QuickEMUlator (QEMU).
266 </para></listitem>
267 <listitem><para>
268 Supports incremental build testing and
269 from-scratch builds.
270 </para></listitem>
271 <listitem><para>
272 Shares output that allows developer
273 testing and historical regression investigation.
274 </para></listitem>
275 <listitem><para>
276 Creates output that can be used for releases.
277 </para></listitem>
278 <listitem><para>
279 Allows scheduling of builds so that resources
280 can be used efficiently.
281 </para></listitem>
282 </itemizedlist>
283 </para></listitem>
284 <listitem><para>
285 <emphasis>Set up Test Machines:</emphasis>
286 Use a small number of shared, high performance systems
287 for testing purposes.
288 Developers can use these systems for wider, more
289 extensive testing while they continue to develop
290 locally using their primary development system.
291 </para></listitem>
292 <listitem><para>
293 <emphasis>Document Policies and Change Flow:</emphasis>
294 The Yocto Project uses a hierarchical structure and a
295 pull model.
296 Scripts exist to create and send pull requests
297 (i.e. <filename>create-pull-request</filename> and
298 <filename>send-pull-request</filename>).
299 This model is in line with other open source projects where
300 maintainers are responsible for specific areas of the project
301 and a single maintainer handles the final "top-of-tree" merges.
302 <note>
303 You can also use a more collective push model.
304 The <filename>gitolite</filename> software supports both the
305 push and pull models quite easily.
306 </note></para>
307
308 <para>As with any development environment, it is important
309 to document the policy used as well as any main project
310 guidelines so they are understood by everyone.
311 It is also a good idea to have well-structured
312 commit messages, which are usually a part of a project's
313 guidelines.
314 Good commit messages are essential when looking back in time and
315 trying to understand why changes were made.</para>
316
317 <para>If you discover that changes are needed to the core
318 layer of the project, it is worth sharing those with the
319 community as soon as possible.
320 Chances are if you have discovered the need for changes,
321 someone else in the community needs them also.
322 </para></listitem>
323 <listitem><para>
324 <emphasis>Development Environment Summary:</emphasis>
325 Aside from the previous steps, some best practices exist
326 within the Yocto Project development environment.
327 Consider the following:
328 <itemizedlist>
329 <listitem><para>
330 Use
331 <ulink url='&YOCTO_DOCS_OM_URL;#git'>Git</ulink>
332 as the source control system.
333 </para></listitem>
334 <listitem><para>
335 Maintain your Metadata in layers that make sense
336 for your situation.
337 See the
338 "<ulink url='&YOCTO_DOCS_OM_URL;#the-yocto-project-layer-model'>The Yocto Project Layer Model</ulink>"
339 section in the Yocto Project Overview and Concepts
340 Manual and the
341 "<link linkend='understanding-and-creating-layers'>Understanding and Creating Layers</link>"
342 section for more information on layers.
343 </para></listitem>
344 <listitem><para>
345 Separate the project's Metadata and code by using
346 separate Git repositories.
347 See the
348 "<ulink url='&YOCTO_DOCS_OM_URL;#yocto-project-repositories'>Yocto Project Source Repositories</ulink>"
349 section in the Yocto Project Overview and Concepts
350 Manual for information on these repositories.
351 See the
352 "<link linkend='locating-yocto-project-source-files'>Locating Yocto Project Source Files</link>"
353 section for information on how to set up local Git
354 repositories for related upstream Yocto Project
355 Git repositories.
356 </para></listitem>
357 <listitem><para>
358 Set up the directory for the shared state cache
359 (<ulink url='&YOCTO_DOCS_REF_URL;#var-SSTATE_DIR'><filename>SSTATE_DIR</filename></ulink>)
360 where it makes sense.
361 For example, set up the sstate cache on a system used
362 by developers in the same organization and share the
363 same source directories on their machines.
364 </para></listitem>
365 <listitem><para>
366 Set up an Autobuilder and have it populate the
367 sstate cache and source directories.
368 </para></listitem>
369 <listitem><para>
370 The Yocto Project community encourages you
371 to send patches to the project to fix bugs or add
372 features.
373 If you do submit patches, follow the project commit
374 guidelines for writing good commit messages.
375 See the "<link linkend='how-to-submit-a-change'>Submitting a Change to the Yocto Project</link>"
376 section.
377 </para></listitem>
378 <listitem><para>
379 Send changes to the core sooner than later
380 as others are likely to run into the same issues.
381 For some guidance on mailing lists to use, see the list
382 in the
383 "<link linkend='how-to-submit-a-change'>Submitting a Change to the Yocto Project</link>"
384 section.
385 For a description of the available mailing lists, see
386 the
387 "<ulink url='&YOCTO_DOCS_REF_URL;#resources-mailinglist'>Mailing Lists</ulink>"
388 section in the Yocto Project Reference Manual.
389 </para></listitem>
390 </itemizedlist>
391 </para></listitem>
392 </orderedlist>
393 </para>
394</section>
395
396<section id='dev-preparing-the-build-host'>
397 <title>Preparing the Build Host</title>
398
399 <para>
400 This section provides procedures to set up a system to be used as your
401 <ulink url='&YOCTO_DOCS_REF_URL;#hardware-build-system-term'>build host</ulink>
402 for development using the Yocto Project.
403 Your build host can be a native Linux machine (recommended), it can
404 be a machine (Linux, Mac, or Windows) that uses
405 <ulink url='https://github.com/crops/poky-container'>CROPS</ulink>,
406 which leverages
407 <ulink url='https://www.docker.com/'>Docker Containers</ulink> or it can
408 be a Windows machine capable of running Windows Subsystem For Linux v2 (WSL).
409 <note>
410 The Yocto Project is not compatible with
411 <ulink url='https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux'>Windows Subsystem for Linux v1</ulink>.
412 It is compatible but not officially supported nor validated with WSLv2.
413 If you still decide to use WSL please upgrade to
414 <ulink url='https://docs.microsoft.com/en-us/windows/wsl/wsl2-install'>WSLv2</ulink>.
415 </note>
416 </para>
417
418 <para>
419 Once your build host is set up to use the Yocto Project,
420 further steps are necessary depending on what you want to
421 accomplish.
422 See the following references for information on how to prepare for
423 Board Support Package (BSP) development and kernel development:
424 <itemizedlist>
425 <listitem><para>
426 <emphasis>BSP Development:</emphasis>
427 See the
428 "<ulink url='&YOCTO_DOCS_BSP_URL;#preparing-your-build-host-to-work-with-bsp-layers'>Preparing Your Build Host to Work With BSP Layers</ulink>"
429 section in the Yocto Project Board Support Package (BSP)
430 Developer's Guide.
431 </para></listitem>
432 <listitem><para>
433 <emphasis>Kernel Development:</emphasis>
434 See the
435 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#preparing-the-build-host-to-work-on-the-kernel'>Preparing the Build Host to Work on the Kernel</ulink>"
436 section in the Yocto Project Linux Kernel Development Manual.
437 </para></listitem>
438 </itemizedlist>
439 </para>
440
441 <section id='setting-up-a-native-linux-host'>
442 <title>Setting Up a Native Linux Host</title>
443
444 <para>
445 Follow these steps to prepare a native Linux machine as your
446 Yocto Project Build Host:
447 <orderedlist>
448 <listitem><para>
449 <emphasis>Use a Supported Linux Distribution:</emphasis>
450 You should have a reasonably current Linux-based host
451 system.
452 You will have the best results with a recent release of
453 Fedora, openSUSE, Debian, Ubuntu, RHEL or CentOS as these
454 releases are frequently tested against the Yocto Project
455 and officially supported.
456 For a list of the distributions under validation and their
457 status, see the
458 "<ulink url='&YOCTO_DOCS_REF_URL;#detailed-supported-distros'>Supported Linux Distributions</ulink>" section
459 in the Yocto Project Reference Manual and the wiki page at
460 <ulink url='&YOCTO_WIKI_URL;/wiki/Distribution_Support'>Distribution Support</ulink>.
461 </para></listitem>
462 <listitem><para>
463 <emphasis>Have Enough Free Memory:</emphasis>
464 Your system should have at least 50 Gbytes of free disk
465 space for building images.
466 </para></listitem>
467 <listitem><para>
468 <emphasis>Meet Minimal Version Requirements:</emphasis>
469 The OpenEmbedded build system should be able to run on any
470 modern distribution that has the following versions for
471 Git, tar, Python and gcc.
472 <itemizedlist>
473 <listitem><para>
474 Git 1.8.3.1 or greater
475 </para></listitem>
476 <listitem><para>
477 tar 1.28 or greater
478 </para></listitem>
479 <listitem><para>
480 Python 3.5.0 or greater.
481 </para></listitem>
482 <listitem><para>
483 gcc 5.0 or greater.
484 </para></listitem>
485 </itemizedlist>
486 If your build host does not meet any of these three listed
487 version requirements, you can take steps to prepare the
488 system so that you can still use the Yocto Project.
489 See the
490 "<ulink url='&YOCTO_DOCS_REF_URL;#required-git-tar-python-and-gcc-versions'>Required Git, tar, Python and gcc Versions</ulink>"
491 section in the Yocto Project Reference Manual for
492 information.
493 </para></listitem>
494 <listitem><para>
495 <emphasis>Install Development Host Packages:</emphasis>
496 Required development host packages vary depending on your
497 build host and what you want to do with the Yocto
498 Project.
499 Collectively, the number of required packages is large
500 if you want to be able to cover all cases.</para>
501
502 <para>For lists of required packages for all scenarios,
503 see the
504 "<ulink url='&YOCTO_DOCS_REF_URL;#required-packages-for-the-build-host'>Required Packages for the Build Host</ulink>"
505 section in the Yocto Project Reference Manual.
506 </para></listitem>
507 </orderedlist>
508 Once you have completed the previous steps, you are ready to
509 continue using a given development path on your native Linux
510 machine.
511 If you are going to use BitBake, see the
512 "<link linkend='cloning-the-poky-repository'>Cloning the <filename>poky</filename> Repository</link>"
513 section.
514 If you are going to use the Extensible SDK, see the
515 "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-extensible'>Using the Extensible SDK</ulink>"
516 Chapter in the Yocto Project Application Development and the
517 Extensible Software Development Kit (eSDK) manual.
518 If you want to work on the kernel, see the
519 <ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;'>Yocto Project Linux Kernel Development Manual</ulink>.
520 If you are going to use Toaster, see the
521 "<ulink url='&YOCTO_DOCS_TOAST_URL;#toaster-manual-setup-and-use'>Setting Up and Using Toaster</ulink>"
522 section in the Toaster User Manual.
523 </para>
524 </section>
525
526 <section id='setting-up-to-use-crops'>
527 <title>Setting Up to Use CROss PlatformS (CROPS)</title>
528
529 <para>
530 With
531 <ulink url='https://github.com/crops/poky-container'>CROPS</ulink>,
532 which leverages
533 <ulink url='https://www.docker.com/'>Docker Containers</ulink>,
534 you can create a Yocto Project development environment that
535 is operating system agnostic.
536 You can set up a container in which you can develop using the
537 Yocto Project on a Windows, Mac, or Linux machine.
538 </para>
539
540 <para>
541 Follow these general steps to prepare a Windows, Mac, or Linux
542 machine as your Yocto Project build host:
543 <orderedlist>
544 <listitem><para>
545 <emphasis>Determine What Your Build Host Needs:</emphasis>
546 <ulink url='https://www.docker.com/what-docker'>Docker</ulink>
547 is a software container platform that you need to install
548 on the build host.
549 Depending on your build host, you might have to install
550 different software to support Docker containers.
551 Go to the Docker installation page and read about the
552 platform requirements in
553 "<ulink url='https://docs.docker.com/install/#supported-platforms'>Supported Platforms</ulink>"
554 your build host needs to run containers.
555 </para></listitem>
556 <listitem><para>
557 <emphasis>Choose What To Install:</emphasis>
558 Depending on whether or not your build host meets system
559 requirements, you need to install "Docker CE Stable" or
560 the "Docker Toolbox".
561 Most situations call for Docker CE.
562 However, if you have a build host that does not meet
563 requirements (e.g. Pre-Windows 10 or Windows 10 "Home"
564 version), you must install Docker Toolbox instead.
565 </para></listitem>
566 <listitem><para>
567 <emphasis>Go to the Install Site for Your Platform:</emphasis>
568 Click the link for the Docker edition associated with
569 your build host's native software.
570 For example, if your build host is running Microsoft
571 Windows Version 10 and you want the Docker CE Stable
572 edition, click that link under "Supported Platforms".
573 </para></listitem>
574 <listitem><para>
575 <emphasis>Install the Software:</emphasis>
576 Once you have understood all the pre-requisites, you can
577 download and install the appropriate software.
578 Follow the instructions for your specific machine and
579 the type of the software you need to install:
580 <itemizedlist>
581 <listitem><para>
582 Install
583 <ulink url='https://docs.docker.com/docker-for-windows/install/#install-docker-for-windows-desktop-app'>Docker CE for Windows</ulink>
584 for Windows build hosts that meet requirements.
585 </para></listitem>
586 <listitem><para>
587 Install
588 <ulink url='https://docs.docker.com/docker-for-mac/install/#install-and-run-docker-for-mac'>Docker CE for Macs</ulink>
589 for Mac build hosts that meet requirements.
590 </para></listitem>
591 <listitem><para>
592 Install
593 <ulink url='https://docs.docker.com/toolbox/toolbox_install_windows/'>Docker Toolbox for Windows</ulink>
594 for Windows build hosts that do not meet Docker
595 requirements.
596 </para></listitem>
597 <listitem><para>
598 Install
599 <ulink url='https://docs.docker.com/toolbox/toolbox_install_mac/'>Docker Toolbox for MacOS</ulink>
600 for Mac build hosts that do not meet Docker
601 requirements.
602 </para></listitem>
603 <listitem><para>
604 Install
605 <ulink url='https://docs.docker.com/install/linux/docker-ce/centos/'>Docker CE for CentOS</ulink>
606 for Linux build hosts running the CentOS
607 distribution.
608 </para></listitem>
609 <listitem><para>
610 Install
611 <ulink url='https://docs.docker.com/install/linux/docker-ce/debian/'>Docker CE for Debian</ulink>
612 for Linux build hosts running the Debian
613 distribution.
614 </para></listitem>
615 <listitem><para>
616 Install
617 <ulink url='https://docs.docker.com/install/linux/docker-ce/fedora/'>Docker CE for Fedora</ulink>
618 for Linux build hosts running the Fedora
619 distribution.
620 </para></listitem>
621 <listitem><para>
622 Install
623 <ulink url='https://docs.docker.com/install/linux/docker-ce/ubuntu/'>Docker CE for Ubuntu</ulink>
624 for Linux build hosts running the Ubuntu
625 distribution.
626 </para></listitem>
627 </itemizedlist>
628 </para></listitem>
629 <listitem><para>
630 <emphasis>Optionally Orient Yourself With Docker:</emphasis>
631 If you are unfamiliar with Docker and the container
632 concept, you can learn more here -
633 <ulink url='https://docs.docker.com/get-started/'></ulink>.
634 </para></listitem>
635 <listitem><para>
636 <emphasis>Launch Docker or Docker Toolbox:</emphasis>
637 You should be able to launch Docker or the Docker Toolbox
638 and have a terminal shell on your development host.
639 </para></listitem>
640 <listitem><para>
641 <emphasis>Set Up the Containers to Use the Yocto Project:</emphasis>
642 Go to
643 <ulink url='https://github.com/crops/docker-win-mac-docs/wiki'></ulink>
644 and follow the directions for your particular
645 build host (i.e. Linux, Mac, or Windows).</para>
646
647 <para>Once you complete the setup instructions for your
648 machine, you have the Poky, Extensible SDK, and Toaster
649 containers available.
650 You can click those links from the page and learn more
651 about using each of those containers.
652 </para></listitem>
653 </orderedlist>
654 Once you have a container set up, everything is in place to
655 develop just as if you were running on a native Linux machine.
656 If you are going to use the Poky container, see the
657 "<link linkend='cloning-the-poky-repository'>Cloning the <filename>poky</filename> Repository</link>"
658 section.
659 If you are going to use the Extensible SDK container, see the
660 "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-extensible'>Using the Extensible SDK</ulink>"
661 Chapter in the Yocto Project Application Development and the
662 Extensible Software Development Kit (eSDK) manual.
663 If you are going to use the Toaster container, see the
664 "<ulink url='&YOCTO_DOCS_TOAST_URL;#toaster-manual-setup-and-use'>Setting Up and Using Toaster</ulink>"
665 section in the Toaster User Manual.
666 </para>
667 </section>
668
669 <section id='setting-up-to-use-wsl'>
670 <title>Setting Up to Use Windows Subsystem For Linux (WSLv2)</title>
671
672 <para>
673 With <ulink url='https://docs.microsoft.com/en-us/windows/wsl/wsl2-about'>
674 Windows Subsystem for Linux (WSLv2)</ulink>, you can create a
675 Yocto Project development environment that allows you to build
676 on Windows. You can set up a Linux distribution inside Windows
677 in which you can develop using the Yocto Project.
678 </para>
679
680 <para>
681 Follow these general steps to prepare a Windows machine using WSLv2
682 as your Yocto Project build host:
683 <orderedlist>
684 <listitem><para>
685 <emphasis>Make sure your Windows 10 machine is capable of running WSLv2:</emphasis>
686
687 WSLv2 is only available for Windows 10 builds > 18917. To
688 check which build version you are running, you may open a
689 command prompt on Windows and execute the command "ver".
690 <literallayout class='monospaced'>
691 C:\Users\myuser> ver
692
693 Microsoft Windows [Version 10.0.19041.153]
694 </literallayout>
695 If your build is capable of running WSLv2 you may continue,
696 for more information on this subject or instructions on how
697 to upgrade to WSLv2 visit <ulink url='https://docs.microsoft.com/en-us/windows/wsl/wsl2-install'>Windows 10 WSLv2</ulink>
698 </para></listitem>
699 <listitem><para>
700 <emphasis>Install the Linux distribution of your choice inside Windows 10:</emphasis>
701 Once you know your version of Windows 10 supports WSLv2,
702 you can install the distribution of your choice from the
703 Microsoft Store.
704 Open the Microsoft Store and search for Linux. While there
705 are several Linux distributions available, the assumption
706 is that your pick will be one of the distributions supported
707 by the Yocto Project as stated on the instructions for
708 using a native Linux host.
709 After making your selection, simply click "Get" to download
710 and install the distribution.
711 </para></listitem>
712 <listitem><para>
713 <emphasis>Check your Linux distribution is using WSLv2:</emphasis>
714 Open a Windows PowerShell and run:
715 <literallayout class='monospaced'>
716 C:\WINDOWS\system32> wsl -l -v
717 NAME STATE VERSION
718 *Ubuntu Running 2
719 </literallayout>
720 Note the version column which says the WSL version being used by
721 your distribution, on compatible systems, this can be changed back
722 at any point in time.
723 </para></listitem>
724 <listitem><para>
725 <emphasis>Optionally Orient Yourself on WSL:</emphasis>
726 If you are unfamiliar with WSL, you can learn more here -
727 <ulink url='https://docs.microsoft.com/en-us/windows/wsl/wsl2-about'></ulink>.
728 </para></listitem>
729 <listitem><para>
730 <emphasis>Launch your WSL Distibution:</emphasis>
731 From the Windows start menu simply launch your WSL distribution
732 just like any other application.
733 </para></listitem>
734 <listitem><para>
735 <emphasis>Optimize your WSLv2 storage often:</emphasis>
736 Due to the way storage is handled on WSLv2, the storage
737 space used by the undelying Linux distribution is not
738 reflected immedately, and since bitbake heavily uses
739 storage, after several builds, you may be unaware you
740 are running out of space. WSLv2 uses a VHDX file for
741 storage, this issue can be easily avoided by manually
742 optimizing this file often, this can be done in the
743 following way:
744 <orderedlist>
745 <listitem><para>
746 <emphasis>Find the location of your VHDX file:</emphasis>
747 First you need to find the distro app package directory,
748 to achieve this open a Windows Powershell as Administrator
749 and run:
750 <literallayout class='monospaced'>
751 C:\WINDOWS\system32> Get-AppxPackage -Name "*Ubuntu*" | Select PackageFamilyName
752 PackageFamilyName
753 -----------------
754 CanonicalGroupLimited.UbuntuonWindows_79abcdefgh
755 </literallayout>
756 You should now replace the <replaceable>PackageFamilyName</replaceable>
757 and your <replaceable>user</replaceable> on the following
758 path to find your VHDX file: <filename>C:\Users\user\AppData\Local\Packages\PackageFamilyName\LocalState\</filename>
759 For example:
760 <literallayout class='monospaced'>
761 ls C:\Users\myuser\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79abcdefgh\LocalState\
762 Mode LastWriteTime Length Name
763 -a---- 3/14/2020 9:52 PM 57418973184 ext4.vhdx
764 </literallayout>
765 Your VHDX file path is: <filename>C:\Users\myuser\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79abcdefgh\LocalState\ext4.vhdx</filename>
766 </para></listitem>
767 <listitem><para><emphasis>Optimize your VHDX file:</emphasis>
768 Open a Windows Powershell as Administrator to optimize
769 your VHDX file, shutting down WSL first:
770 <literallayout class='monospaced'>
771 C:\WINDOWS\system32> wsl --shutdown
772 C:\WINDOWS\system32> optimize-vhd -Path C:\Users\myuser\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79abcdefgh\LocalState\ext4.vhdx -Mode full
773 </literallayout>
774 A progress bar should be shown while optimizing the VHDX file,
775 and storage should now be reflected correctly on the Windows
776 Explorer.
777 </para></listitem>
778 </orderedlist>
779 </para></listitem>
780 </orderedlist>
781 <note>
782 The current implementation of WSLv2 does not have out-of-the-box
783 access to external devices such as those connected through a
784 USB port, but it automatically mounts your <filename>C:</filename>
785 drive on <filename>/mnt/c/</filename> (and others), which
786 you can use to share deploy artifacts to be later flashed on
787 hardware through Windows, but your build directory should not
788 reside inside this mountpoint.
789 </note>
790 Once you have WSLv2 set up, everything is in place to
791 develop just as if you were running on a native Linux machine.
792 If you are going to use the Extensible SDK container, see the
793 "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-extensible'>Using the Extensible SDK</ulink>"
794 Chapter in the Yocto Project Application Development and the
795 Extensible Software Development Kit (eSDK) manual.
796 If you are going to use the Toaster container, see the
797 "<ulink url='&YOCTO_DOCS_TOAST_URL;#toaster-manual-setup-and-use'>Setting Up and Using Toaster</ulink>"
798 section in the Toaster User Manual.
799 </para>
800 </section>
801</section>
802
803<section id='locating-yocto-project-source-files'>
804 <title>Locating Yocto Project Source Files</title>
805
806 <para>
807 This section shows you how to locate, fetch and configure the source
808 files you'll need to work with the Yocto Project.
809 <note><title>Notes</title>
810 <itemizedlist>
811 <listitem><para>
812 For concepts and introductory information about Git as it
813 is used in the Yocto Project, see the
814 "<ulink url='&YOCTO_DOCS_OM_URL;#git'>Git</ulink>"
815 section in the Yocto Project Overview and Concepts Manual.
816 </para></listitem>
817 <listitem><para>
818 For concepts on Yocto Project source repositories, see the
819 "<ulink url='&YOCTO_DOCS_OM_URL;#yocto-project-repositories'>Yocto Project Source Repositories</ulink>"
820 section in the Yocto Project Overview and Concepts Manual."
821 </para></listitem>
822 </itemizedlist>
823 </note>
824 </para>
825
826 <section id='accessing-source-repositories'>
827 <title>Accessing Source Repositories</title>
828
829 <para>
830 Working from a copy of the upstream Yocto Project
831 <ulink url='&YOCTO_DOCS_OM_URL;#source-repositories'>Source Repositories</ulink>
832 is the preferred method for obtaining and using a Yocto Project
833 release.
834 You can view the Yocto Project Source Repositories at
835 <ulink url='&YOCTO_GIT_URL;'></ulink>.
836 In particular, you can find the
837 <filename>poky</filename> repository at
838 <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/poky/'></ulink>.
839 </para>
840
841 <para>
842 Use the following procedure to locate the latest upstream copy of
843 the <filename>poky</filename> Git repository:
844 <orderedlist>
845 <listitem><para>
846 <emphasis>Access Repositories:</emphasis>
847 Open a browser and go to
848 <ulink url='&YOCTO_GIT_URL;'></ulink> to access the
849 GUI-based interface into the Yocto Project source
850 repositories.
851 </para></listitem>
852 <listitem><para>
853 <emphasis>Select the Repository:</emphasis>
854 Click on the repository in which you are interested (e.g.
855 <filename>poky</filename>).
856 </para></listitem>
857 <listitem><para>
858 <emphasis>Find the URL Used to Clone the Repository:</emphasis>
859 At the bottom of the page, note the URL used to
860 <ulink url='&YOCTO_DOCS_OM_URL;#git-commands-clone'>clone</ulink>
861 that repository (e.g.
862 <filename>&YOCTO_GIT_URL;/poky</filename>).
863 <note>
864 For information on cloning a repository, see the
865 "<link linkend='cloning-the-poky-repository'>Cloning the <filename>poky</filename> Repository</link>"
866 section.
867 </note>
868 </para></listitem>
869 </orderedlist>
870 </para>
871 </section>
872
873 <section id='accessing-index-of-releases'>
874 <title>Accessing Index of Releases</title>
875
876 <para>
877 Yocto Project maintains an Index of Releases area that contains
878 related files that contribute to the Yocto Project.
879 Rather than Git repositories, these files are tarballs that
880 represent snapshots in time of a given component.
881 <note><title>Tip</title>
882 The recommended method for accessing Yocto Project
883 components is to use Git to clone the upstream repository and
884 work from within that locally cloned repository.
885 The procedure in this section exists should you desire a
886 tarball snapshot of any given component.
887 </note>
888 Follow these steps to locate and download a particular tarball:
889 <orderedlist>
890 <listitem><para>
891 <emphasis>Access the Index of Releases:</emphasis>
892 Open a browser and go to
893 <ulink url='&YOCTO_DL_URL;/releases'></ulink> to access the
894 Index of Releases.
895 The list represents released components (e.g.
896 <filename>bitbake</filename>,
897 <filename>sato</filename>, and so on).
898 <note>
899 The <filename>yocto</filename> directory contains the
900 full array of released Poky tarballs.
901 The <filename>poky</filename> directory in the
902 Index of Releases was historically used for very
903 early releases and exists now only for retroactive
904 completeness.
905 </note>
906 </para></listitem>
907 <listitem><para>
908 <emphasis>Select a Component:</emphasis>
909 Click on any released component in which you are interested
910 (e.g. <filename>yocto</filename>).
911 </para></listitem>
912 <listitem><para>
913 <emphasis>Find the Tarball:</emphasis>
914 Drill down to find the associated tarball.
915 For example, click on <filename>yocto-&DISTRO;</filename> to
916 view files associated with the Yocto Project &DISTRO;
917 release (e.g. <filename>poky-&DISTRO_NAME_NO_CAP;-&POKYVERSION;.tar.bz2</filename>,
918 which is the released Poky tarball).
919 </para></listitem>
920 <listitem><para>
921 <emphasis>Download the Tarball:</emphasis>
922 Click the tarball to download and save a snapshot of the
923 given component.
924 </para></listitem>
925 </orderedlist>
926 </para>
927 </section>
928
929 <section id='using-the-downloads-page'>
930 <title>Using the Downloads Page</title>
931
932 <para>
933 The
934 <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink>
935 uses a "DOWNLOADS" page from which you can locate and download
936 tarballs of any Yocto Project release.
937 Rather than Git repositories, these files represent snapshot
938 tarballs similar to the tarballs located in the Index of Releases
939 described in the
940 "<link linkend='accessing-index-of-releases'>Accessing Index of Releases</link>"
941 section.
942 <note><title>Tip</title>
943 The recommended method for accessing Yocto Project
944 components is to use Git to clone a repository and work from
945 within that local repository.
946 The procedure in this section exists should you desire a
947 tarball snapshot of any given component.
948 </note>
949 <orderedlist>
950 <listitem><para>
951 <emphasis>Go to the Yocto Project Website:</emphasis>
952 Open The
953 <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink>
954 in your browser.
955 </para></listitem>
956 <listitem><para>
957 <emphasis>Get to the Downloads Area:</emphasis>
958 Select the "DOWNLOADS" item from the pull-down
959 "SOFTWARE" tab menu near the top of the page.
960 </para></listitem>
961 <listitem><para>
962 <emphasis>Select a Yocto Project Release:</emphasis>
963 Use the menu next to "RELEASE" to display and choose
964 a recent or past supported Yocto Project release
965 (e.g. &DISTRO_NAME_NO_CAP;,
966 &DISTRO_NAME_NO_CAP_MINUS_ONE;, and so forth).
967 <note><title>Tip</title>
968 For a "map" of Yocto Project releases to version
969 numbers, see the
970 <ulink url='https://wiki.yoctoproject.org/wiki/Releases'>Releases</ulink>
971 wiki page.
972 </note>
973 You can use the "RELEASE ARCHIVE" link to reveal a menu of
974 all Yocto Project releases.
975 </para></listitem>
976 <listitem><para>
977 <emphasis>Download Tools or Board Support Packages (BSPs):</emphasis>
978 From the "DOWNLOADS" page, you can download tools or
979 BSPs as well.
980 Just scroll down the page and look for what you need.
981 </para></listitem>
982 </orderedlist>
983 </para>
984 </section>
985
986 <section id='accessing-nightly-builds'>
987 <title>Accessing Nightly Builds</title>
988
989 <para>
990 Yocto Project maintains an area for nightly builds that contains
991 tarball releases at <ulink url='&YOCTO_AB_NIGHTLY_URL;'/>.
992 These builds include Yocto Project releases ("poky"),
993 toolchains, and builds for supported machines.
994 </para>
995
996 <para>
997 Should you ever want to access a nightly build of a particular
998 Yocto Project component, use the following procedure:
999 <orderedlist>
1000 <listitem><para>
1001 <emphasis>Locate the Index of Nightly Builds:</emphasis>
1002 Open a browser and go to
1003 <ulink url='&YOCTO_AB_NIGHTLY_URL;'/> to access the
1004 Nightly Builds.
1005 </para></listitem>
1006 <listitem><para>
1007 <emphasis>Select a Date:</emphasis>
1008 Click on the date in which you are interested.
1009 If you want the latest builds, use "CURRENT".
1010 </para></listitem>
1011 <listitem><para>
1012 <emphasis>Select a Build:</emphasis>
1013 Choose the area in which you are interested.
1014 For example, if you are looking for the most recent
1015 toolchains, select the "toolchain" link.
1016 </para></listitem>
1017 <listitem><para>
1018 <emphasis>Find the Tarball:</emphasis>
1019 Drill down to find the associated tarball.
1020 </para></listitem>
1021 <listitem><para>
1022 <emphasis>Download the Tarball:</emphasis>
1023 Click the tarball to download and save a snapshot of the
1024 given component.
1025 </para></listitem>
1026 </orderedlist>
1027 </para>
1028 </section>
1029</section>
1030
1031<section id='cloning-and-checking-out-branches'>
1032 <title>Cloning and Checking Out Branches</title>
1033
1034 <para>
1035 To use the Yocto Project for development, you need a release locally
1036 installed on your development system.
1037 This locally installed set of files is referred to as the
1038 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
1039 in the Yocto Project documentation.
1040 </para>
1041
1042 <para>
1043 The preferred method of creating your Source Directory is by using
1044 <ulink url='&YOCTO_DOCS_OM_URL;#git'>Git</ulink> to clone a local
1045 copy of the upstream <filename>poky</filename> repository.
1046 Working from a cloned copy of the upstream repository allows you
1047 to contribute back into the Yocto Project or to simply work with
1048 the latest software on a development branch.
1049 Because Git maintains and creates an upstream repository with
1050 a complete history of changes and you are working with a local
1051 clone of that repository, you have access to all the Yocto
1052 Project development branches and tag names used in the upstream
1053 repository.
1054 </para>
1055
1056 <section id='cloning-the-poky-repository'>
1057 <title>Cloning the <filename>poky</filename> Repository</title>
1058
1059 <para>
1060 Follow these steps to create a local version of the
1061 upstream
1062 <ulink url='&YOCTO_DOCS_REF_URL;#poky'><filename>poky</filename></ulink>
1063 Git repository.
1064 <orderedlist>
1065 <listitem><para>
1066 <emphasis>Set Your Directory:</emphasis>
1067 Change your working directory to where you want to
1068 create your local copy of
1069 <filename>poky</filename>.
1070 </para></listitem>
1071 <listitem><para>
1072 <emphasis>Clone the Repository:</emphasis>
1073 The following example command clones the
1074 <filename>poky</filename> repository and uses
1075 the default name "poky" for your local repository:
1076 <literallayout class='monospaced'>
1077 $ git clone git://git.yoctoproject.org/poky
1078 Cloning into 'poky'...
1079 remote: Counting objects: 432160, done.
1080 remote: Compressing objects: 100% (102056/102056), done.
1081 remote: Total 432160 (delta 323116), reused 432037 (delta 323000)
1082 Receiving objects: 100% (432160/432160), 153.81 MiB | 8.54 MiB/s, done.
1083 Resolving deltas: 100% (323116/323116), done.
1084 Checking connectivity... done.
1085 </literallayout>
1086 Unless you specify a specific development branch or
1087 tag name, Git clones the "master" branch, which results
1088 in a snapshot of the latest development changes for
1089 "master".
1090 For information on how to check out a specific
1091 development branch or on how to check out a local
1092 branch based on a tag name, see the
1093 "<link linkend='checking-out-by-branch-in-poky'>Checking Out By Branch in Poky</link>"
1094 and
1095 <link linkend='checkout-out-by-tag-in-poky'>Checking Out By Tag in Poky</link>"
1096 sections, respectively.</para>
1097
1098 <para>Once the local repository is created, you can
1099 change to that directory and check its status.
1100 Here, the single "master" branch exists on your system
1101 and by default, it is checked out:
1102 <literallayout class='monospaced'>
1103 $ cd ~/poky
1104 $ git status
1105 On branch master
1106 Your branch is up-to-date with 'origin/master'.
1107 nothing to commit, working directory clean
1108 $ git branch
1109 * master
1110 </literallayout>
1111 Your local repository of poky is identical to the
1112 upstream poky repository at the time from which it was
1113 cloned.
1114 As you work with the local branch, you can periodically
1115 use the <filename>git pull &dash;&dash;rebase</filename>
1116 command to be sure you are up-to-date with the upstream
1117 branch.
1118 </para></listitem>
1119 </orderedlist>
1120 </para>
1121 </section>
1122
1123 <section id='checking-out-by-branch-in-poky'>
1124 <title>Checking Out by Branch in Poky</title>
1125
1126 <para>
1127 When you clone the upstream poky repository, you have access to
1128 all its development branches.
1129 Each development branch in a repository is unique as it forks
1130 off the "master" branch.
1131 To see and use the files of a particular development branch
1132 locally, you need to know the branch name and then specifically
1133 check out that development branch.
1134 <note>
1135 Checking out an active development branch by branch name
1136 gives you a snapshot of that particular branch at the time
1137 you check it out.
1138 Further development on top of the branch that occurs after
1139 check it out can occur.
1140 </note>
1141 <orderedlist>
1142 <listitem><para>
1143 <emphasis>Switch to the Poky Directory:</emphasis>
1144 If you have a local poky Git repository, switch to that
1145 directory.
1146 If you do not have the local copy of poky, see the
1147 "<link linkend='cloning-the-poky-repository'>Cloning the <filename>poky</filename> Repository</link>"
1148 section.
1149 </para></listitem>
1150 <listitem><para>
1151 <emphasis>Determine Existing Branch Names:</emphasis>
1152 <literallayout class='monospaced'>
1153 $ git branch -a
1154 * master
1155 remotes/origin/1.1_M1
1156 remotes/origin/1.1_M2
1157 remotes/origin/1.1_M3
1158 remotes/origin/1.1_M4
1159 remotes/origin/1.2_M1
1160 remotes/origin/1.2_M2
1161 remotes/origin/1.2_M3
1162 .
1163 .
1164 .
1165 remotes/origin/thud
1166 remotes/origin/thud-next
1167 remotes/origin/warrior
1168 remotes/origin/warrior-next
1169 remotes/origin/zeus
1170 remotes/origin/zeus-next
1171 ... and so on ...
1172 </literallayout>
1173 </para></listitem>
1174 <listitem><para>
1175 <emphasis>Check out the Branch:</emphasis>
1176 Check out the development branch in which you want to work.
1177 For example, to access the files for the Yocto Project
1178 &DISTRO; Release (&DISTRO_NAME;), use the following command:
1179 <literallayout class='monospaced'>
1180 $ git checkout -b &DISTRO_NAME_NO_CAP; origin/&DISTRO_NAME_NO_CAP;
1181 Branch &DISTRO_NAME_NO_CAP; set up to track remote branch &DISTRO_NAME_NO_CAP; from origin.
1182 Switched to a new branch '&DISTRO_NAME_NO_CAP;'
1183 </literallayout>
1184 The previous command checks out the "&DISTRO_NAME_NO_CAP;"
1185 development branch and reports that the branch is tracking
1186 the upstream "origin/&DISTRO_NAME_NO_CAP;" branch.</para>
1187
1188 <para>The following command displays the branches
1189 that are now part of your local poky repository.
1190 The asterisk character indicates the branch that is
1191 currently checked out for work:
1192 <literallayout class='monospaced'>
1193 $ git branch
1194 master
1195 * &DISTRO_NAME_NO_CAP;
1196 </literallayout>
1197 </para></listitem>
1198 </orderedlist>
1199 </para>
1200 </section>
1201
1202 <section id='checkout-out-by-tag-in-poky'>
1203 <title>Checking Out by Tag in Poky</title>
1204
1205 <para>
1206 Similar to branches, the upstream repository uses tags
1207 to mark specific commits associated with significant points in
1208 a development branch (i.e. a release point or stage of a
1209 release).
1210 You might want to set up a local branch based on one of those
1211 points in the repository.
1212 The process is similar to checking out by branch name except you
1213 use tag names.
1214 <note>
1215 Checking out a branch based on a tag gives you a
1216 stable set of files not affected by development on the
1217 branch above the tag.
1218 </note>
1219 <orderedlist>
1220 <listitem><para>
1221 <emphasis>Switch to the Poky Directory:</emphasis>
1222 If you have a local poky Git repository, switch to that
1223 directory.
1224 If you do not have the local copy of poky, see the
1225 "<link linkend='cloning-the-poky-repository'>Cloning the <filename>poky</filename> Repository</link>"
1226 section.
1227 </para></listitem>
1228 <listitem><para>
1229 <emphasis>Fetch the Tag Names:</emphasis>
1230 To checkout the branch based on a tag name, you need to
1231 fetch the upstream tags into your local repository:
1232 <literallayout class='monospaced'>
1233 $ git fetch --tags
1234 $
1235 </literallayout>
1236 </para></listitem>
1237 <listitem><para>
1238 <emphasis>List the Tag Names:</emphasis>
1239 You can list the tag names now:
1240 <literallayout class='monospaced'>
1241 $ git tag
1242 1.1_M1.final
1243 1.1_M1.rc1
1244 1.1_M1.rc2
1245 1.1_M2.final
1246 1.1_M2.rc1
1247 .
1248 .
1249 .
1250 yocto-2.5
1251 yocto-2.5.1
1252 yocto-2.5.2
1253 yocto-2.5.3
1254 yocto-2.6
1255 yocto-2.6.1
1256 yocto-2.6.2
1257 yocto-2.7
1258 yocto_1.5_M5.rc8
1259 </literallayout>
1260 </para></listitem>
1261 <listitem><para>
1262 <emphasis>Check out the Branch:</emphasis>
1263 <literallayout class='monospaced'>
1264 $ git checkout tags/&DISTRO_REL_TAG; -b my_yocto_&DISTRO;
1265 Switched to a new branch 'my_yocto_&DISTRO;'
1266 $ git branch
1267 master
1268 * my_yocto_&DISTRO;
1269 </literallayout>
1270 The previous command creates and checks out a local
1271 branch named "my_yocto_&DISTRO;", which is based on
1272 the commit in the upstream poky repository that has
1273 the same tag.
1274 In this example, the files you have available locally
1275 as a result of the <filename>checkout</filename>
1276 command are a snapshot of the
1277 "&DISTRO_NAME_NO_CAP;" development branch at the point
1278 where Yocto Project &DISTRO; was released.
1279 </para></listitem>
1280 </orderedlist>
1281 </para>
1282 </section>
1283</section>
1284
1285</chapter>
1286<!--
1287vim: expandtab tw=80 ts=4
1288-->
diff --git a/documentation/dev-manual/dev-manual.xml b/documentation/dev-manual/dev-manual.xml
deleted file mode 100755
index 66439930e4..0000000000
--- a/documentation/dev-manual/dev-manual.xml
+++ /dev/null
@@ -1,195 +0,0 @@
1<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<book id='dev-manual' lang='en'
7 xmlns:xi="http://www.w3.org/2003/XInclude"
8 xmlns="http://docbook.org/ns/docbook"
9 >
10 <bookinfo>
11
12 <mediaobject>
13 <imageobject>
14 <imagedata fileref='figures/dev-title.png'
15 format='SVG'
16 align='left' scalefit='1' width='100%'/>
17 </imageobject>
18 </mediaobject>
19
20 <title>
21 Yocto Project Development Tasks Manual
22 </title>
23
24 <authorgroup>
25 <author>
26 <affiliation>
27 <orgname>&ORGNAME;</orgname>
28 </affiliation>
29 <email>&ORGEMAIL;</email>
30 </author>
31 </authorgroup>
32
33 <revhistory>
34 <revision>
35 <revnumber>1.1</revnumber>
36 <date>October 2011</date>
37 <revremark>The initial document released with the Yocto Project 1.1 Release.</revremark>
38 </revision>
39 <revision>
40 <revnumber>1.2</revnumber>
41 <date>April 2012</date>
42 <revremark>Released with the Yocto Project 1.2 Release.</revremark>
43 </revision>
44 <revision>
45 <revnumber>1.3</revnumber>
46 <date>October 2012</date>
47 <revremark>Released with the Yocto Project 1.3 Release.</revremark>
48 </revision>
49 <revision>
50 <revnumber>1.4</revnumber>
51 <date>April 2013</date>
52 <revremark>Released with the Yocto Project 1.4 Release.</revremark>
53 </revision>
54 <revision>
55 <revnumber>1.5</revnumber>
56 <date>October 2013</date>
57 <revremark>Released with the Yocto Project 1.5 Release.</revremark>
58 </revision>
59 <revision>
60 <revnumber>1.6</revnumber>
61 <date>April 2014</date>
62 <revremark>Released with the Yocto Project 1.6 Release.</revremark>
63 </revision>
64 <revision>
65 <revnumber>1.7</revnumber>
66 <date>October 2014</date>
67 <revremark>Released with the Yocto Project 1.7 Release.</revremark>
68 </revision>
69 <revision>
70 <revnumber>1.8</revnumber>
71 <date>April 2015</date>
72 <revremark>Released with the Yocto Project 1.8 Release.</revremark>
73 </revision>
74 <revision>
75 <revnumber>2.0</revnumber>
76 <date>October 2015</date>
77 <revremark>Released with the Yocto Project 2.0 Release.</revremark>
78 </revision>
79 <revision>
80 <revnumber>2.1</revnumber>
81 <date>April 2016</date>
82 <revremark>Released with the Yocto Project 2.1 Release.</revremark>
83 </revision>
84 <revision>
85 <revnumber>2.2</revnumber>
86 <date>October 2016</date>
87 <revremark>Released with the Yocto Project 2.2 Release.</revremark>
88 </revision>
89 <revision>
90 <revnumber>2.3</revnumber>
91 <date>May 2017</date>
92 <revremark>Released with the Yocto Project 2.3 Release.</revremark>
93 </revision>
94 <revision>
95 <revnumber>2.4</revnumber>
96 <date>October 2017</date>
97 <revremark>Released with the Yocto Project 2.4 Release.</revremark>
98 </revision>
99 <revision>
100 <revnumber>2.5</revnumber>
101 <date>May 2018</date>
102 <revremark>Released with the Yocto Project 2.5 Release.</revremark>
103 </revision>
104 <revision>
105 <revnumber>2.6</revnumber>
106 <date>November 2018</date>
107 <revremark>Released with the Yocto Project 2.6 Release.</revremark>
108 </revision>
109 <revision>
110 <revnumber>2.7</revnumber>
111 <date>May 2019</date>
112 <revremark>Released with the Yocto Project 2.7 Release.</revremark>
113 </revision>
114 <revision>
115 <revnumber>3.0</revnumber>
116 <date>October 2019</date>
117 <revremark>Released with the Yocto Project 3.0 Release.</revremark>
118 </revision>
119 <revision>
120 <revnumber>3.1</revnumber>
121 <date>&REL_MONTH_YEAR;</date>
122 <revremark>Released with the Yocto Project 3.1 Release.</revremark>
123 </revision>
124 </revhistory>
125
126 <copyright>
127 <year>&COPYRIGHT_YEAR;</year>
128 <holder>Linux Foundation</holder>
129 </copyright>
130
131 <legalnotice>
132 <para>
133 Permission is granted to copy, distribute and/or modify this document under
134 the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-sa/2.0/uk/">
135 Creative Commons Attribution-Share Alike 2.0 UK: England &amp; Wales</ulink> as published by
136 Creative Commons.
137 </para>
138 <note><title>Manual Notes</title>
139 <itemizedlist>
140 <listitem><para>
141 This version of the
142 <emphasis>Yocto Project Development Tasks Manual</emphasis>
143 is for the &YOCTO_DOC_VERSION; release of the
144 Yocto Project.
145 To be sure you have the latest version of the manual
146 for this release, go to the
147 <ulink url='&YOCTO_DOCS_URL;'>Yocto Project documentation page</ulink>
148 and select the manual from that site.
149 Manuals from the site are more up-to-date than manuals
150 derived from the Yocto Project released TAR files.
151 </para></listitem>
152 <listitem><para>
153 If you located this manual through a web search, the
154 version of the manual might not be the one you want
155 (e.g. the search might have returned a manual much
156 older than the Yocto Project version with which you
157 are working).
158 You can see all Yocto Project major releases by
159 visiting the
160 <ulink url='&YOCTO_WIKI_URL;/wiki/Releases'>Releases</ulink>
161 page.
162 If you need a version of this manual for a different
163 Yocto Project release, visit the
164 <ulink url='&YOCTO_DOCS_URL;'>Yocto Project documentation page</ulink>
165 and select the manual set by using the
166 "ACTIVE RELEASES DOCUMENTATION" or "DOCUMENTS ARCHIVE"
167 pull-down menus.
168 </para></listitem>
169 <listitem>
170 <para>
171 To report any inaccuracies or problems with this
172 (or any other Yocto Project) manual, send an email to
173 the Yocto Project documentation mailing list at
174 <filename>docs@lists.yoctoproject.org</filename> or
175 log into the freenode <filename>#yocto</filename> channel.
176 </para>
177 </listitem>
178 </itemizedlist>
179 </note>
180 </legalnotice>
181
182 </bookinfo>
183
184 <xi:include href="dev-manual-intro.xml"/>
185
186 <xi:include href="dev-manual-start.xml"/>
187
188 <xi:include href="dev-manual-common-tasks.xml"/>
189
190 <xi:include href="dev-manual-qemu.xml"/>
191
192</book>
193<!--
194vim: expandtab tw=80 ts=4
195-->
diff --git a/documentation/dev-manual/dev-style.css b/documentation/dev-manual/dev-style.css
deleted file mode 100644
index 331c7c54d4..0000000000
--- a/documentation/dev-manual/dev-style.css
+++ /dev/null
@@ -1,991 +0,0 @@
1/*
2
3 SPDX-License-Identifier: CC-BY-2.0-UK
4
5 Generic XHTML / DocBook XHTML CSS Stylesheet.
6
7 Browser wrangling and typographic design by
8 Oyvind Kolas / pippin@gimp.org
9
10 Customised for Poky by
11 Matthew Allum / mallum@o-hand.com
12
13 Thanks to:
14 Liam R. E. Quin
15 William Skaggs
16 Jakub Steiner
17
18 Structure
19 ---------
20
21 The stylesheet is divided into the following sections:
22
23 Positioning
24 Margins, paddings, width, font-size, clearing.
25 Decorations
26 Borders, style
27 Colors
28 Colors
29 Graphics
30 Graphical backgrounds
31 Nasty IE tweaks
32 Workarounds needed to make it work in internet explorer,
33 currently makes the stylesheet non validating, but up until
34 this point it is validating.
35 Mozilla extensions
36 Transparency for footer
37 Rounded corners on boxes
38
39*/
40
41
42 /*************** /
43 / Positioning /
44/ ***************/
45
46body {
47 font-family: Verdana, Sans, sans-serif;
48
49 min-width: 640px;
50 width: 80%;
51 margin: 0em auto;
52 padding: 2em 5em 5em 5em;
53 color: #333;
54}
55
56h1,h2,h3,h4,h5,h6,h7 {
57 font-family: Arial, Sans;
58 color: #00557D;
59 clear: both;
60}
61
62h1 {
63 font-size: 2em;
64 text-align: left;
65 padding: 0em 0em 0em 0em;
66 margin: 2em 0em 0em 0em;
67}
68
69h2.subtitle {
70 margin: 0.10em 0em 3.0em 0em;
71 padding: 0em 0em 0em 0em;
72 font-size: 1.8em;
73 padding-left: 20%;
74 font-weight: normal;
75 font-style: italic;
76}
77
78h2 {
79 margin: 2em 0em 0.66em 0em;
80 padding: 0.5em 0em 0em 0em;
81 font-size: 1.5em;
82 font-weight: bold;
83}
84
85h3.subtitle {
86 margin: 0em 0em 1em 0em;
87 padding: 0em 0em 0em 0em;
88 font-size: 142.14%;
89 text-align: right;
90}
91
92h3 {
93 margin: 1em 0em 0.5em 0em;
94 padding: 1em 0em 0em 0em;
95 font-size: 140%;
96 font-weight: bold;
97}
98
99h4 {
100 margin: 1em 0em 0.5em 0em;
101 padding: 1em 0em 0em 0em;
102 font-size: 120%;
103 font-weight: bold;
104}
105
106h5 {
107 margin: 1em 0em 0.5em 0em;
108 padding: 1em 0em 0em 0em;
109 font-size: 110%;
110 font-weight: bold;
111}
112
113h6 {
114 margin: 1em 0em 0em 0em;
115 padding: 1em 0em 0em 0em;
116 font-size: 110%;
117 font-weight: bold;
118}
119
120.authorgroup {
121 background-color: transparent;
122 background-repeat: no-repeat;
123 padding-top: 256px;
124 background-image: url("figures/dev-title.png");
125 background-position: left top;
126 margin-top: -256px;
127 padding-right: 50px;
128 margin-left: 0px;
129 text-align: right;
130 width: 740px;
131}
132
133h3.author {
134 margin: 0em 0me 0em 0em;
135 padding: 0em 0em 0em 0em;
136 font-weight: normal;
137 font-size: 100%;
138 color: #333;
139 clear: both;
140}
141
142.author tt.email {
143 font-size: 66%;
144}
145
146.titlepage hr {
147 width: 0em;
148 clear: both;
149}
150
151.revhistory {
152 padding-top: 2em;
153 clear: both;
154}
155
156.toc,
157.list-of-tables,
158.list-of-examples,
159.list-of-figures {
160 padding: 1.33em 0em 2.5em 0em;
161 color: #00557D;
162}
163
164.toc p,
165.list-of-tables p,
166.list-of-figures p,
167.list-of-examples p {
168 padding: 0em 0em 0em 0em;
169 padding: 0em 0em 0.3em;
170 margin: 1.5em 0em 0em 0em;
171}
172
173.toc p b,
174.list-of-tables p b,
175.list-of-figures p b,
176.list-of-examples p b{
177 font-size: 100.0%;
178 font-weight: bold;
179}
180
181.toc dl,
182.list-of-tables dl,
183.list-of-figures dl,
184.list-of-examples dl {
185 margin: 0em 0em 0.5em 0em;
186 padding: 0em 0em 0em 0em;
187}
188
189.toc dt {
190 margin: 0em 0em 0em 0em;
191 padding: 0em 0em 0em 0em;
192}
193
194.toc dd {
195 margin: 0em 0em 0em 2.6em;
196 padding: 0em 0em 0em 0em;
197}
198
199div.glossary dl,
200div.variablelist dl {
201}
202
203.glossary dl dt,
204.variablelist dl dt,
205.variablelist dl dt span.term {
206 font-weight: normal;
207 width: 20em;
208 text-align: right;
209}
210
211.variablelist dl dt {
212 margin-top: 0.5em;
213}
214
215.glossary dl dd,
216.variablelist dl dd {
217 margin-top: -1em;
218 margin-left: 25.5em;
219}
220
221.glossary dd p,
222.variablelist dd p {
223 margin-top: 0em;
224 margin-bottom: 1em;
225}
226
227
228div.calloutlist table td {
229 padding: 0em 0em 0em 0em;
230 margin: 0em 0em 0em 0em;
231}
232
233div.calloutlist table td p {
234 margin-top: 0em;
235 margin-bottom: 1em;
236}
237
238div p.copyright {
239 text-align: left;
240}
241
242div.legalnotice p.legalnotice-title {
243 margin-bottom: 0em;
244}
245
246p {
247 line-height: 1.5em;
248 margin-top: 0em;
249
250}
251
252dl {
253 padding-top: 0em;
254}
255
256hr {
257 border: solid 1px;
258}
259
260
261.mediaobject,
262.mediaobjectco {
263 text-align: center;
264}
265
266img {
267 border: none;
268}
269
270ul {
271 padding: 0em 0em 0em 1.5em;
272}
273
274ul li {
275 padding: 0em 0em 0em 0em;
276}
277
278ul li p {
279 text-align: left;
280}
281
282table {
283 width :100%;
284}
285
286th {
287 padding: 0.25em;
288 text-align: left;
289 font-weight: normal;
290 vertical-align: top;
291}
292
293td {
294 padding: 0.25em;
295 vertical-align: top;
296}
297
298p a[id] {
299 margin: 0px;
300 padding: 0px;
301 display: inline;
302 background-image: none;
303}
304
305a {
306 text-decoration: underline;
307 color: #444;
308}
309
310pre {
311 overflow: auto;
312}
313
314a:hover {
315 text-decoration: underline;
316 /*font-weight: bold;*/
317}
318
319/* This style defines how the permalink character
320 appears by itself and when hovered over with
321 the mouse. */
322
323[alt='Permalink'] { color: #eee; }
324[alt='Permalink']:hover { color: black; }
325
326
327div.informalfigure,
328div.informalexample,
329div.informaltable,
330div.figure,
331div.table,
332div.example {
333 margin: 1em 0em;
334 padding: 1em;
335 page-break-inside: avoid;
336}
337
338
339div.informalfigure p.title b,
340div.informalexample p.title b,
341div.informaltable p.title b,
342div.figure p.title b,
343div.example p.title b,
344div.table p.title b{
345 padding-top: 0em;
346 margin-top: 0em;
347 font-size: 100%;
348 font-weight: normal;
349}
350
351.mediaobject .caption,
352.mediaobject .caption p {
353 text-align: center;
354 font-size: 80%;
355 padding-top: 0.5em;
356 padding-bottom: 0.5em;
357}
358
359.epigraph {
360 padding-left: 55%;
361 margin-bottom: 1em;
362}
363
364.epigraph p {
365 text-align: left;
366}
367
368.epigraph .quote {
369 font-style: italic;
370}
371.epigraph .attribution {
372 font-style: normal;
373 text-align: right;
374}
375
376span.application {
377 font-style: italic;
378}
379
380.programlisting {
381 font-family: monospace;
382 font-size: 80%;
383 white-space: pre;
384 margin: 1.33em 0em;
385 padding: 1.33em;
386}
387
388.tip,
389.warning,
390.caution,
391.note {
392 margin-top: 1em;
393 margin-bottom: 1em;
394
395}
396
397/* force full width of table within div */
398.tip table,
399.warning table,
400.caution table,
401.note table {
402 border: none;
403 width: 100%;
404}
405
406
407.tip table th,
408.warning table th,
409.caution table th,
410.note table th {
411 padding: 0.8em 0.0em 0.0em 0.0em;
412 margin : 0em 0em 0em 0em;
413}
414
415.tip p,
416.warning p,
417.caution p,
418.note p {
419 margin-top: 0.5em;
420 margin-bottom: 0.5em;
421 padding-right: 1em;
422 text-align: left;
423}
424
425.acronym {
426 text-transform: uppercase;
427}
428
429b.keycap,
430.keycap {
431 padding: 0.09em 0.3em;
432 margin: 0em;
433}
434
435.itemizedlist li {
436 clear: none;
437}
438
439.filename {
440 font-size: medium;
441 font-family: Courier, monospace;
442}
443
444
445div.navheader, div.heading{
446 position: absolute;
447 left: 0em;
448 top: 0em;
449 width: 100%;
450 background-color: #cdf;
451 width: 100%;
452}
453
454div.navfooter, div.footing{
455 position: fixed;
456 left: 0em;
457 bottom: 0em;
458 background-color: #eee;
459 width: 100%;
460}
461
462
463div.navheader td,
464div.navfooter td {
465 font-size: 66%;
466}
467
468div.navheader table th {
469 /*font-family: Georgia, Times, serif;*/
470 /*font-size: x-large;*/
471 font-size: 80%;
472}
473
474div.navheader table {
475 border-left: 0em;
476 border-right: 0em;
477 border-top: 0em;
478 width: 100%;
479}
480
481div.navfooter table {
482 border-left: 0em;
483 border-right: 0em;
484 border-bottom: 0em;
485 width: 100%;
486}
487
488div.navheader table td a,
489div.navfooter table td a {
490 color: #777;
491 text-decoration: none;
492}
493
494/* normal text in the footer */
495div.navfooter table td {
496 color: black;
497}
498
499div.navheader table td a:visited,
500div.navfooter table td a:visited {
501 color: #444;
502}
503
504
505/* links in header and footer */
506div.navheader table td a:hover,
507div.navfooter table td a:hover {
508 text-decoration: underline;
509 background-color: transparent;
510 color: #33a;
511}
512
513div.navheader hr,
514div.navfooter hr {
515 display: none;
516}
517
518
519.qandaset tr.question td p {
520 margin: 0em 0em 1em 0em;
521 padding: 0em 0em 0em 0em;
522}
523
524.qandaset tr.answer td p {
525 margin: 0em 0em 1em 0em;
526 padding: 0em 0em 0em 0em;
527}
528.answer td {
529 padding-bottom: 1.5em;
530}
531
532.emphasis {
533 font-weight: bold;
534}
535
536
537 /************* /
538 / decorations /
539/ *************/
540
541.titlepage {
542}
543
544.part .title {
545}
546
547.subtitle {
548 border: none;
549}
550
551/*
552h1 {
553 border: none;
554}
555
556h2 {
557 border-top: solid 0.2em;
558 border-bottom: solid 0.06em;
559}
560
561h3 {
562 border-top: 0em;
563 border-bottom: solid 0.06em;
564}
565
566h4 {
567 border: 0em;
568 border-bottom: solid 0.06em;
569}
570
571h5 {
572 border: 0em;
573}
574*/
575
576.programlisting {
577 border: solid 1px;
578}
579
580div.figure,
581div.table,
582div.informalfigure,
583div.informaltable,
584div.informalexample,
585div.example {
586 border: 1px solid;
587}
588
589
590
591.tip,
592.warning,
593.caution,
594.note {
595 border: 1px solid;
596}
597
598.tip table th,
599.warning table th,
600.caution table th,
601.note table th {
602 border-bottom: 1px solid;
603}
604
605.question td {
606 border-top: 1px solid black;
607}
608
609.answer {
610}
611
612
613b.keycap,
614.keycap {
615 border: 1px solid;
616}
617
618
619div.navheader, div.heading{
620 border-bottom: 1px solid;
621}
622
623
624div.navfooter, div.footing{
625 border-top: 1px solid;
626}
627
628 /********* /
629 / colors /
630/ *********/
631
632body {
633 color: #333;
634 background: white;
635}
636
637a {
638 background: transparent;
639}
640
641a:hover {
642 background-color: #dedede;
643}
644
645
646h1,
647h2,
648h3,
649h4,
650h5,
651h6,
652h7,
653h8 {
654 background-color: transparent;
655}
656
657hr {
658 border-color: #aaa;
659}
660
661
662.tip, .warning, .caution, .note {
663 border-color: #fff;
664}
665
666
667.tip table th,
668.warning table th,
669.caution table th,
670.note table th {
671 border-bottom-color: #fff;
672}
673
674
675.warning {
676 background-color: #f0f0f2;
677}
678
679.caution {
680 background-color: #f0f0f2;
681}
682
683.tip {
684 background-color: #f0f0f2;
685}
686
687.note {
688 background-color: #f0f0f2;
689}
690
691.glossary dl dt,
692.variablelist dl dt,
693.variablelist dl dt span.term {
694 color: #044;
695}
696
697div.figure,
698div.table,
699div.example,
700div.informalfigure,
701div.informaltable,
702div.informalexample {
703 border-color: #aaa;
704}
705
706pre.programlisting {
707 color: black;
708 background-color: #fff;
709 border-color: #aaa;
710 border-width: 2px;
711}
712
713.guimenu,
714.guilabel,
715.guimenuitem {
716 background-color: #eee;
717}
718
719
720b.keycap,
721.keycap {
722 background-color: #eee;
723 border-color: #999;
724}
725
726
727div.navheader {
728 border-color: black;
729}
730
731
732div.navfooter {
733 border-color: black;
734}
735
736.writernotes {
737 color: red;
738}
739
740
741 /*********** /
742 / graphics /
743/ ***********/
744
745/*
746body {
747 background-image: url("images/body_bg.jpg");
748 background-attachment: fixed;
749}
750
751.navheader,
752.note,
753.tip {
754 background-image: url("images/note_bg.jpg");
755 background-attachment: fixed;
756}
757
758.warning,
759.caution {
760 background-image: url("images/warning_bg.jpg");
761 background-attachment: fixed;
762}
763
764.figure,
765.informalfigure,
766.example,
767.informalexample,
768.table,
769.informaltable {
770 background-image: url("images/figure_bg.jpg");
771 background-attachment: fixed;
772}
773
774*/
775h1,
776h2,
777h3,
778h4,
779h5,
780h6,
781h7{
782}
783
784/*
785Example of how to stick an image as part of the title.
786
787div.article .titlepage .title
788{
789 background-image: url("figures/white-on-black.png");
790 background-position: center;
791 background-repeat: repeat-x;
792}
793*/
794
795div.preface .titlepage .title,
796div.colophon .title,
797div.chapter .titlepage .title,
798div.article .titlepage .title
799{
800}
801
802div.section div.section .titlepage .title,
803div.sect2 .titlepage .title {
804 background: none;
805}
806
807
808h1.title {
809 background-color: transparent;
810 background-repeat: no-repeat;
811 height: 256px;
812 text-indent: -9000px;
813 overflow:hidden;
814}
815
816h2.subtitle {
817 background-color: transparent;
818 text-indent: -9000px;
819 overflow:hidden;
820 width: 0px;
821 display: none;
822}
823
824 /*************************************** /
825 / pippin.gimp.org specific alterations /
826/ ***************************************/
827
828/*
829div.heading, div.navheader {
830 color: #777;
831 font-size: 80%;
832 padding: 0;
833 margin: 0;
834 text-align: left;
835 position: absolute;
836 top: 0px;
837 left: 0px;
838 width: 100%;
839 height: 50px;
840 background: url('/gfx/heading_bg.png') transparent;
841 background-repeat: repeat-x;
842 background-attachment: fixed;
843 border: none;
844}
845
846div.heading a {
847 color: #444;
848}
849
850div.footing, div.navfooter {
851 border: none;
852 color: #ddd;
853 font-size: 80%;
854 text-align:right;
855
856 width: 100%;
857 padding-top: 10px;
858 position: absolute;
859 bottom: 0px;
860 left: 0px;
861
862 background: url('/gfx/footing_bg.png') transparent;
863}
864*/
865
866
867
868 /****************** /
869 / nasty ie tweaks /
870/ ******************/
871
872/*
873div.heading, div.navheader {
874 width:expression(document.body.clientWidth + "px");
875}
876
877div.footing, div.navfooter {
878 width:expression(document.body.clientWidth + "px");
879 margin-left:expression("-5em");
880}
881body {
882 padding:expression("4em 5em 0em 5em");
883}
884*/
885
886 /**************************************** /
887 / mozilla vendor specific css extensions /
888/ ****************************************/
889/*
890div.navfooter, div.footing{
891 -moz-opacity: 0.8em;
892}
893
894div.figure,
895div.table,
896div.informalfigure,
897div.informaltable,
898div.informalexample,
899div.example,
900.tip,
901.warning,
902.caution,
903.note {
904 -moz-border-radius: 0.5em;
905}
906
907b.keycap,
908.keycap {
909 -moz-border-radius: 0.3em;
910}
911*/
912
913table tr td table tr td {
914 display: none;
915}
916
917
918hr {
919 display: none;
920}
921
922table {
923 border: 0em;
924}
925
926 .photo {
927 float: right;
928 margin-left: 1.5em;
929 margin-bottom: 1.5em;
930 margin-top: 0em;
931 max-width: 17em;
932 border: 1px solid gray;
933 padding: 3px;
934 background: white;
935}
936 .seperator {
937 padding-top: 2em;
938 clear: both;
939 }
940
941 #validators {
942 margin-top: 5em;
943 text-align: right;
944 color: #777;
945 }
946 @media print {
947 body {
948 font-size: 8pt;
949 }
950 .noprint {
951 display: none;
952 }
953 }
954
955
956.tip,
957.note {
958 background: #f0f0f2;
959 color: #333;
960 padding: 20px;
961 margin: 20px;
962}
963
964.tip h3,
965.note h3 {
966 padding: 0em;
967 margin: 0em;
968 font-size: 2em;
969 font-weight: bold;
970 color: #333;
971}
972
973.tip a,
974.note a {
975 color: #333;
976 text-decoration: underline;
977}
978
979.footnote {
980 font-size: small;
981 color: #333;
982}
983
984/* Changes the announcement text */
985.tip h3,
986.warning h3,
987.caution h3,
988.note h3 {
989 font-size:large;
990 color: #00557D;
991}
diff --git a/documentation/kernel-dev/kernel-dev-advanced.xml b/documentation/kernel-dev/kernel-dev-advanced.xml
deleted file mode 100644
index 37177966bf..0000000000
--- a/documentation/kernel-dev/kernel-dev-advanced.xml
+++ /dev/null
@@ -1,1257 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='kernel-dev-advanced'>
7<title>Working with Advanced Metadata (<filename>yocto-kernel-cache</filename>)</title>
8
9<section id='kernel-dev-advanced-overview'>
10 <title>Overview</title>
11
12 <para>
13 In addition to supporting configuration fragments and patches, the
14 Yocto Project kernel tools also support rich
15 <ulink url='&YOCTO_DOCS_REF_URL;#metadata'>Metadata</ulink> that you can
16 use to define complex policies and Board Support Package (BSP) support.
17 The purpose of the Metadata and the tools that manage it is
18 to help you manage the complexity of the configuration and sources
19 used to support multiple BSPs and Linux kernel types.
20 </para>
21
22 <para>
23 Kernel Metadata exists in many places.
24 One area in the Yocto Project
25 <ulink url='&YOCTO_DOCS_OM_URL;#source-repositories'>Source Repositories</ulink>
26 is the <filename>yocto-kernel-cache</filename> Git repository.
27 You can find this repository grouped under the "Yocto Linux Kernel"
28 heading in the
29 <ulink url='&YOCTO_GIT_URL;'>Yocto Project Source Repositories</ulink>.
30 </para>
31
32 <para>
33 Kernel development tools ("kern-tools") exist also in the Yocto
34 Project Source Repositories under the "Yocto Linux Kernel" heading
35 in the <filename>yocto-kernel-tools</filename> Git repository.
36 The recipe that builds these tools is
37 <filename>meta/recipes-kernel/kern-tools/kern-tools-native_git.bb</filename>
38 in the
39 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
40 (e.g. <filename>poky</filename>).
41 </para>
42</section>
43
44<section id='using-kernel-metadata-in-a-recipe'>
45 <title>Using Kernel Metadata in a Recipe</title>
46
47 <para>
48 As mentioned in the introduction, the Yocto Project contains kernel
49 Metadata, which is located in the
50 <filename>yocto-kernel-cache</filename> Git repository.
51 This Metadata defines Board Support Packages (BSPs) that
52 correspond to definitions in linux-yocto recipes for corresponding BSPs.
53 A BSP consists of an aggregation of kernel policy and enabled
54 hardware-specific features.
55 The BSP can be influenced from within the linux-yocto recipe.
56 <note>
57 A Linux kernel recipe that contains kernel Metadata (e.g.
58 inherits from the <filename>linux-yocto.inc</filename> file)
59 is said to be a "linux-yocto style" recipe.
60 </note>
61 </para>
62
63 <para>
64 Every linux-yocto style recipe must define the
65 <ulink url='&YOCTO_DOCS_REF_URL;#var-KMACHINE'><filename>KMACHINE</filename></ulink>
66 variable.
67 This variable is typically set to the same value as the
68 <filename>MACHINE</filename> variable, which is used by
69 <ulink url='&YOCTO_DOCS_REF_URL;#bitbake-term'>BitBake</ulink>.
70 However, in some cases, the variable might instead refer to the
71 underlying platform of the <filename>MACHINE</filename>.
72 </para>
73
74 <para>
75 Multiple BSPs can reuse the same <filename>KMACHINE</filename>
76 name if they are built using the same BSP description.
77 Multiple Corei7-based BSPs could share the same "intel-corei7-64"
78 value for <filename>KMACHINE</filename>.
79 It is important to realize that <filename>KMACHINE</filename> is
80 just for kernel mapping, while <filename>MACHINE</filename>
81 is the machine type within a BSP Layer.
82 Even with this distinction, however, these two variables can hold
83 the same value.
84 See the <link linkend='bsp-descriptions'>BSP Descriptions</link>
85 section for more information.
86 </para>
87
88 <para>
89 Every linux-yocto style recipe must also indicate the Linux kernel
90 source repository branch used to build the Linux kernel.
91 The <ulink url='&YOCTO_DOCS_REF_URL;#var-KBRANCH'><filename>KBRANCH</filename></ulink>
92 variable must be set to indicate the branch.
93 <note>
94 You can use the <filename>KBRANCH</filename> value to define an
95 alternate branch typically with a machine override as shown here
96 from the <filename>meta-yocto-bsp</filename> layer:
97 <literallayout class='monospaced'>
98 KBRANCH_edgerouter = "standard/edgerouter"
99 </literallayout>
100 </note>
101 </para>
102
103 <para>
104 The linux-yocto style recipes can optionally define the following
105 variables:
106 <literallayout class='monospaced'>
107 KERNEL_FEATURES
108 LINUX_KERNEL_TYPE
109 </literallayout>
110 </para>
111
112 <para>
113 <ulink url='&YOCTO_DOCS_REF_URL;#var-LINUX_KERNEL_TYPE'><filename>LINUX_KERNEL_TYPE</filename></ulink>
114 defines the kernel type to be
115 used in assembling the configuration.
116 If you do not specify a <filename>LINUX_KERNEL_TYPE</filename>,
117 it defaults to "standard".
118 Together with <filename>KMACHINE</filename>,
119 <filename>LINUX_KERNEL_TYPE</filename> defines the search
120 arguments used by the kernel tools to find the
121 appropriate description within the kernel Metadata with which to
122 build out the sources and configuration.
123 The linux-yocto recipes define "standard", "tiny", and "preempt-rt"
124 kernel types.
125 See the "<link linkend='kernel-types'>Kernel Types</link>" section
126 for more information on kernel types.
127 </para>
128
129 <para>
130 During the build, the kern-tools search for the BSP description
131 file that most closely matches the <filename>KMACHINE</filename>
132 and <filename>LINUX_KERNEL_TYPE</filename> variables passed in from the
133 recipe.
134 The tools use the first BSP description it finds that match
135 both variables.
136 If the tools cannot find a match, they issue a warning.
137 </para>
138
139 <para>
140 The tools first search for the <filename>KMACHINE</filename> and
141 then for the <filename>LINUX_KERNEL_TYPE</filename>.
142 If the tools cannot find a partial match, they will use the
143 sources from the <filename>KBRANCH</filename> and any configuration
144 specified in the
145 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>.
146 </para>
147
148 <para>
149 You can use the
150 <ulink url='&YOCTO_DOCS_REF_URL;#var-KERNEL_FEATURES'><filename>KERNEL_FEATURES</filename></ulink>
151 variable
152 to include features (configuration fragments, patches, or both) that
153 are not already included by the <filename>KMACHINE</filename> and
154 <filename>LINUX_KERNEL_TYPE</filename> variable combination.
155 For example, to include a feature specified as
156 "features/netfilter/netfilter.scc",
157 specify:
158 <literallayout class='monospaced'>
159 KERNEL_FEATURES += "features/netfilter/netfilter.scc"
160 </literallayout>
161 To include a feature called "cfg/sound.scc" just for the
162 <filename>qemux86</filename> machine, specify:
163 <literallayout class='monospaced'>
164 KERNEL_FEATURES_append_qemux86 = " cfg/sound.scc"
165 </literallayout>
166 The value of the entries in <filename>KERNEL_FEATURES</filename>
167 are dependent on their location within the kernel Metadata itself.
168 The examples here are taken from the
169 <filename>yocto-kernel-cache</filename> repository.
170 Each branch of this repository contains "features" and "cfg"
171 subdirectories at the top-level.
172 For more information, see the
173 "<link linkend='kernel-metadata-syntax'>Kernel Metadata Syntax</link>"
174 section.
175 </para>
176</section>
177
178<section id='kernel-metadata-syntax'>
179 <title>Kernel Metadata Syntax</title>
180
181 <para>
182 The kernel Metadata consists of three primary types of files:
183 <filename>scc</filename>
184 <footnote>
185 <para>
186 <filename>scc</filename> stands for Series Configuration
187 Control, but the naming has less significance in the
188 current implementation of the tooling than it had in the
189 past.
190 Consider <filename>scc</filename> files to be description files.
191 </para>
192 </footnote>
193 description files, configuration fragments, and patches.
194 The <filename>scc</filename> files define variables and include or
195 otherwise reference any of the three file types.
196 The description files are used to aggregate all types of kernel
197 Metadata into
198 what ultimately describes the sources and the configuration required
199 to build a Linux kernel tailored to a specific machine.
200 </para>
201
202 <para>
203 The <filename>scc</filename> description files are used to define two
204 fundamental types of kernel Metadata:
205 <itemizedlist>
206 <listitem><para>Features</para></listitem>
207 <listitem><para>Board Support Packages (BSPs)</para></listitem>
208 </itemizedlist>
209 </para>
210
211 <para>
212 Features aggregate sources in the form of patches and configuration
213 fragments into a modular reusable unit.
214 You can use features to implement conceptually separate kernel
215 Metadata descriptions such as pure configuration fragments,
216 simple patches, complex features, and kernel types.
217 <link linkend='kernel-types'>Kernel types</link> define general
218 kernel features and policy to be reused in the BSPs.
219 </para>
220
221 <para>
222 BSPs define hardware-specific features and aggregate them with kernel
223 types to form the final description of what will be assembled and built.
224 </para>
225
226 <para>
227 While the kernel Metadata syntax does not enforce any logical
228 separation of configuration fragments, patches, features or kernel
229 types, best practices dictate a logical separation of these types
230 of Metadata.
231 The following Metadata file hierarchy is recommended:
232 <literallayout class='monospaced'>
233 <replaceable>base</replaceable>/
234 bsp/
235 cfg/
236 features/
237 ktypes/
238 patches/
239 </literallayout>
240 </para>
241
242 <para>
243 The <filename>bsp</filename> directory contains the
244 <link linkend='bsp-descriptions'>BSP descriptions</link>.
245 The remaining directories all contain "features".
246 Separating <filename>bsp</filename> from the rest of the structure
247 aids conceptualizing intended usage.
248 </para>
249
250 <para>
251 Use these guidelines to help place your <filename>scc</filename>
252 description files within the structure:
253 <itemizedlist>
254 <listitem><para>If your file contains
255 only configuration fragments, place the file in the
256 <filename>cfg</filename> directory.</para></listitem>
257 <listitem><para>If your file contains
258 only source-code fixes, place the file in the
259 <filename>patches</filename> directory.</para></listitem>
260 <listitem><para>If your file encapsulates
261 a major feature, often combining sources and configurations,
262 place the file in <filename>features</filename> directory.
263 </para></listitem>
264 <listitem><para>If your file aggregates
265 non-hardware configuration and patches in order to define a
266 base kernel policy or major kernel type to be reused across
267 multiple BSPs, place the file in <filename>ktypes</filename>
268 directory.
269 </para></listitem>
270 </itemizedlist>
271 </para>
272
273 <para>
274 These distinctions can easily become blurred - especially as
275 out-of-tree features slowly merge upstream over time.
276 Also, remember that how the description files are placed is
277 a purely logical organization and has no impact on the functionality
278 of the kernel Metadata.
279 There is no impact because all of <filename>cfg</filename>,
280 <filename>features</filename>, <filename>patches</filename>, and
281 <filename>ktypes</filename>, contain "features" as far as the kernel
282 tools are concerned.
283 </para>
284
285 <para>
286 Paths used in kernel Metadata files are relative to
287 <replaceable>base</replaceable>, which is either
288 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>
289 if you are creating Metadata in
290 <link linkend='recipe-space-metadata'>recipe-space</link>,
291 or the top level of
292 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/yocto-kernel-cache/tree/'><filename>yocto-kernel-cache</filename></ulink>
293 if you are creating
294 <link linkend='metadata-outside-the-recipe-space'>Metadata outside of the recipe-space</link>.
295 </para>
296
297 <section id='configuration'>
298 <title>Configuration</title>
299
300 <para>
301 The simplest unit of kernel Metadata is the configuration-only
302 feature.
303 This feature consists of one or more Linux kernel configuration
304 parameters in a configuration fragment file
305 (<filename>.cfg</filename>) and a <filename>.scc</filename> file
306 that describes the fragment.
307 </para>
308
309 <para>
310 As an example, consider the Symmetric Multi-Processing (SMP)
311 fragment used with the <filename>linux-yocto-4.12</filename>
312 kernel as defined outside of the recipe space (i.e.
313 <filename>yocto-kernel-cache</filename>).
314 This Metadata consists of two files: <filename>smp.scc</filename>
315 and <filename>smp.cfg</filename>.
316 You can find these files in the <filename>cfg</filename> directory
317 of the <filename>yocto-4.12</filename> branch in the
318 <filename>yocto-kernel-cache</filename> Git repository:
319 <literallayout class='monospaced'>
320 cfg/smp.scc:
321 define KFEATURE_DESCRIPTION "Enable SMP for 32 bit builds"
322 define KFEATURE_COMPATIBILITY all
323
324 kconf hardware smp.cfg
325
326 cfg/smp.cfg:
327 CONFIG_SMP=y
328 CONFIG_SCHED_SMT=y
329 # Increase default NR_CPUS from 8 to 64 so that platform with
330 # more than 8 processors can be all activated at boot time
331 CONFIG_NR_CPUS=64
332 # The following is needed when setting NR_CPUS to something
333 # greater than 8 on x86 architectures, it should be automatically
334 # disregarded by Kconfig when using a different arch
335 CONFIG_X86_BIGSMP=y
336 </literallayout>
337 You can find general information on configuration fragment files in
338 the
339 "<link linkend='creating-config-fragments'>Creating Configuration Fragments</link>"
340 section.
341 </para>
342
343 <para>
344 Within the <filename>smp.scc</filename> file, the
345 <ulink url='&YOCTO_DOCS_REF_URL;#var-KFEATURE_DESCRIPTION'><filename>KFEATURE_DESCRIPTION</filename></ulink>
346 statement provides a short description of the fragment.
347 Higher level kernel tools use this description.
348 </para>
349
350 <para>
351 Also within the <filename>smp.scc</filename> file, the
352 <filename>kconf</filename> command includes the
353 actual configuration fragment in an <filename>.scc</filename>
354 file, and the "hardware" keyword identifies the fragment as
355 being hardware enabling, as opposed to general policy,
356 which would use the "non-hardware" keyword.
357 The distinction is made for the benefit of the configuration
358 validation tools, which warn you if a hardware fragment
359 overrides a policy set by a non-hardware fragment.
360 <note>
361 The description file can include multiple
362 <filename>kconf</filename> statements, one per fragment.
363 </note>
364 </para>
365
366 <para>
367 As described in the
368 "<link linkend='validating-configuration'>Validating Configuration</link>"
369 section, you can use the following BitBake command to audit your
370 configuration:
371 <literallayout class='monospaced'>
372 $ bitbake linux-yocto -c kernel_configcheck -f
373 </literallayout>
374 </para>
375 </section>
376
377 <section id='patches'>
378 <title>Patches</title>
379
380 <para>
381 Patch descriptions are very similar to configuration fragment
382 descriptions, which are described in the previous section.
383 However, instead of a <filename>.cfg</filename> file, these
384 descriptions work with source patches (i.e.
385 <filename>.patch</filename> files).
386 </para>
387
388 <para>
389 A typical patch includes a description file and the patch itself.
390 As an example, consider the build patches used with the
391 <filename>linux-yocto-4.12</filename> kernel as defined outside of
392 the recipe space (i.e. <filename>yocto-kernel-cache</filename>).
393 This Metadata consists of several files:
394 <filename>build.scc</filename> and a set of
395 <filename>*.patch</filename> files.
396 You can find these files in the <filename>patches/build</filename>
397 directory of the <filename>yocto-4.12</filename> branch in the
398 <filename>yocto-kernel-cache</filename> Git repository.
399 </para>
400
401 <para>
402 The following listings show the <filename>build.scc</filename>
403 file and part of the
404 <filename>modpost-mask-trivial-warnings.patch</filename> file:
405 <literallayout class='monospaced'>
406 patches/build/build.scc:
407 patch arm-serialize-build-targets.patch
408 patch powerpc-serialize-image-targets.patch
409 patch kbuild-exclude-meta-directory-from-distclean-processi.patch
410
411 # applied by kgit
412 # patch kbuild-add-meta-files-to-the-ignore-li.patch
413
414 patch modpost-mask-trivial-warnings.patch
415 patch menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch
416
417 patches/build/modpost-mask-trivial-warnings.patch:
418 From bd48931bc142bdd104668f3a062a1f22600aae61 Mon Sep 17 00:00:00 2001
419 From: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
420 Date: Sun, 25 Jan 2009 17:58:09 -0500
421 Subject: [PATCH] modpost: mask trivial warnings
422
423 Newer HOSTCC will complain about various stdio fcns because
424 .
425 .
426 .
427 char *dump_write = NULL, *files_source = NULL;
428 int opt;
429 --
430 2.10.1
431
432 generated by cgit v0.10.2 at 2017-09-28 15:23:23 (GMT)
433 </literallayout>
434 The description file can include multiple patch statements where
435 each statement handles a single patch.
436 In the example <filename>build.scc</filename> file, five patch
437 statements exist for the five patches in the directory.
438 </para>
439
440 <para>
441 You can create a typical <filename>.patch</filename> file using
442 <filename>diff -Nurp</filename> or
443 <filename>git format-patch</filename> commands.
444 For information on how to create patches, see the
445 "<link linkend='using-devtool-to-patch-the-kernel'>Using <filename>devtool</filename> to Patch the Kernel</link>"
446 and
447 "<link linkend='using-traditional-kernel-development-to-patch-the-kernel'>Using Traditional Kernel Development to Patch the Kernel</link>"
448 sections.
449 </para>
450 </section>
451
452 <section id='features'>
453 <title>Features</title>
454
455 <para>
456 Features are complex kernel Metadata types that consist
457 of configuration fragments, patches, and possibly other feature
458 description files.
459 As an example, consider the following generic listing:
460 <literallayout class='monospaced'>
461 features/<replaceable>myfeature</replaceable>.scc
462 define KFEATURE_DESCRIPTION "Enable <replaceable>myfeature</replaceable>"
463
464 patch 0001-<replaceable>myfeature</replaceable>-core.patch
465 patch 0002-<replaceable>myfeature</replaceable>-interface.patch
466
467 include cfg/<replaceable>myfeature</replaceable>_dependency.scc
468 kconf non-hardware <replaceable>myfeature</replaceable>.cfg
469 </literallayout>
470 This example shows how the <filename>patch</filename> and
471 <filename>kconf</filename> commands are used as well as
472 how an additional feature description file is included with
473 the <filename>include</filename> command.
474 </para>
475
476 <para>
477 Typically, features are less granular than configuration
478 fragments and are more likely than configuration fragments
479 and patches to be the types of things you want to specify
480 in the <filename>KERNEL_FEATURES</filename> variable of the
481 Linux kernel recipe.
482 See the "<link linkend='using-kernel-metadata-in-a-recipe'>Using Kernel Metadata in a Recipe</link>"
483 section earlier in the manual.
484 </para>
485 </section>
486
487 <section id='kernel-types'>
488 <title>Kernel Types</title>
489
490 <para>
491 A kernel type defines a high-level kernel policy by
492 aggregating non-hardware configuration fragments with
493 patches you want to use when building a Linux kernel of a
494 specific type (e.g. a real-time kernel).
495 Syntactically, kernel types are no different than features
496 as described in the "<link linkend='features'>Features</link>"
497 section.
498 The
499 <ulink url='&YOCTO_DOCS_REF_URL;#var-LINUX_KERNEL_TYPE'><filename>LINUX_KERNEL_TYPE</filename></ulink>
500 variable in the kernel recipe selects the kernel type.
501 For example, in the <filename>linux-yocto_4.12.bb</filename>
502 kernel recipe found in
503 <filename>poky/meta/recipes-kernel/linux</filename>, a
504 <ulink url='&YOCTO_DOCS_BB_URL;#require-inclusion'><filename>require</filename></ulink>
505 directive includes the
506 <filename>poky/meta/recipes-kernel/linux/linux-yocto.inc</filename>
507 file, which has the following statement that defines the default
508 kernel type:
509 <literallayout class='monospaced'>
510 LINUX_KERNEL_TYPE ??= "standard"
511 </literallayout>
512 </para>
513
514 <para>
515 Another example would be the real-time kernel (i.e.
516 <filename>linux-yocto-rt_4.12.bb</filename>).
517 This kernel recipe directly sets the kernel type as follows:
518 <literallayout class='monospaced'>
519 LINUX_KERNEL_TYPE = "preempt-rt"
520 </literallayout>
521 <note>
522 You can find kernel recipes in the
523 <filename>meta/recipes-kernel/linux</filename> directory of the
524 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
525 (e.g. <filename>poky/meta/recipes-kernel/linux/linux-yocto_4.12.bb</filename>).
526 See the "<link linkend='using-kernel-metadata-in-a-recipe'>Using Kernel Metadata in a Recipe</link>"
527 section for more information.
528 </note>
529 </para>
530
531 <para>
532 Three kernel types ("standard", "tiny", and "preempt-rt") are
533 supported for Linux Yocto kernels:
534 <itemizedlist>
535 <listitem><para>"standard":
536 Includes the generic Linux kernel policy of the Yocto
537 Project linux-yocto kernel recipes.
538 This policy includes, among other things, which file
539 systems, networking options, core kernel features, and
540 debugging and tracing options are supported.
541 </para></listitem>
542 <listitem><para>"preempt-rt":
543 Applies the <filename>PREEMPT_RT</filename>
544 patches and the configuration options required to
545 build a real-time Linux kernel.
546 This kernel type inherits from the "standard" kernel type.
547 </para></listitem>
548 <listitem><para>"tiny":
549 Defines a bare minimum configuration meant to serve as a
550 base for very small Linux kernels.
551 The "tiny" kernel type is independent from the "standard"
552 configuration.
553 Although the "tiny" kernel type does not currently include
554 any source changes, it might in the future.
555 </para></listitem>
556 </itemizedlist>
557 </para>
558
559 <para>
560 For any given kernel type, the Metadata is defined by the
561 <filename>.scc</filename> (e.g. <filename>standard.scc</filename>).
562 Here is a partial listing for the <filename>standard.scc</filename>
563 file, which is found in the <filename>ktypes/standard</filename>
564 directory of the <filename>yocto-kernel-cache</filename> Git
565 repository:
566 <literallayout class='monospaced'>
567 # Include this kernel type fragment to get the standard features and
568 # configuration values.
569
570 # Note: if only the features are desired, but not the configuration
571 # then this should be included as:
572 # include ktypes/standard/standard.scc nocfg
573 # if no chained configuration is desired, include it as:
574 # include ktypes/standard/standard.scc nocfg inherit
575
576
577
578 include ktypes/base/base.scc
579 branch standard
580
581 kconf non-hardware standard.cfg
582
583 include features/kgdb/kgdb.scc
584 .
585 .
586 .
587
588 include cfg/net/ip6_nf.scc
589 include cfg/net/bridge.scc
590
591 include cfg/systemd.scc
592
593 include features/rfkill/rfkill.scc
594 </literallayout>
595 </para>
596
597 <para>
598 As with any <filename>.scc</filename> file, a
599 kernel type definition can aggregate other
600 <filename>.scc</filename> files with
601 <filename>include</filename> commands.
602 These definitions can also directly pull in
603 configuration fragments and patches with the
604 <filename>kconf</filename> and <filename>patch</filename>
605 commands, respectively.
606 </para>
607
608 <note>
609 It is not strictly necessary to create a kernel type
610 <filename>.scc</filename> file.
611 The Board Support Package (BSP) file can implicitly define
612 the kernel type using a <filename>define
613 <ulink url='&YOCTO_DOCS_REF_URL;#var-KTYPE'>KTYPE</ulink> myktype</filename>
614 line.
615 See the "<link linkend='bsp-descriptions'>BSP Descriptions</link>"
616 section for more information.
617 </note>
618 </section>
619
620 <section id='bsp-descriptions'>
621 <title>BSP Descriptions</title>
622
623 <para>
624 BSP descriptions (i.e. <filename>*.scc</filename> files)
625 combine kernel types with hardware-specific features.
626 The hardware-specific Metadata is typically defined
627 independently in the BSP layer, and then aggregated with each
628 supported kernel type.
629 <note>
630 For BSPs supported by the Yocto Project, the BSP description
631 files are located in the <filename>bsp</filename> directory
632 of the
633 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/yocto-kernel-cache/tree/bsp'><filename>yocto-kernel-cache</filename></ulink>
634 repository organized under the "Yocto Linux Kernel" heading
635 in the
636 <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi'>Yocto Project Source Repositories</ulink>.
637 </note>
638 </para>
639
640 <para>
641 This section overviews the BSP description structure, the
642 aggregation concepts, and presents a detailed example using
643 a BSP supported by the Yocto Project (i.e. BeagleBone Board).
644 For complete information on BSP layer file hierarchy, see the
645 <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>.
646 </para>
647
648 <section id='bsp-description-file-overview'>
649 <title>Overview</title>
650
651 <para>
652 For simplicity, consider the following root BSP layer
653 description files for the BeagleBone board.
654 These files employ both a structure and naming convention
655 for consistency.
656 The naming convention for the file is as follows:
657 <literallayout class='monospaced'>
658 <replaceable>bsp_root_name</replaceable>-<replaceable>kernel_type</replaceable>.scc
659 </literallayout>
660 Here are some example root layer BSP filenames for the
661 BeagleBone Board BSP, which is supported by the Yocto Project:
662 <literallayout class='monospaced'>
663 beaglebone-standard.scc
664 beaglebone-preempt-rt.scc
665 </literallayout>
666 Each file uses the root name (i.e "beaglebone") BSP name
667 followed by the kernel type.
668 </para>
669
670 <para>
671 Examine the <filename>beaglebone-standard.scc</filename>
672 file:
673 <literallayout class='monospaced'>
674 define KMACHINE beaglebone
675 define KTYPE standard
676 define KARCH arm
677
678 include ktypes/standard/standard.scc
679 branch beaglebone
680
681 include beaglebone.scc
682
683 # default policy for standard kernels
684 include features/latencytop/latencytop.scc
685 include features/profiling/profiling.scc
686 </literallayout>
687 Every top-level BSP description file should define the
688 <ulink url='&YOCTO_DOCS_REF_URL;#var-KMACHINE'><filename>KMACHINE</filename></ulink>,
689 <ulink url='&YOCTO_DOCS_REF_URL;#var-KTYPE'><filename>KTYPE</filename></ulink>,
690 and <ulink url='&YOCTO_DOCS_REF_URL;#var-KARCH'><filename>KARCH</filename></ulink>
691 variables.
692 These variables allow the OpenEmbedded build system to identify
693 the description as meeting the criteria set by the recipe being
694 built.
695 This example supports the "beaglebone" machine for the
696 "standard" kernel and the "arm" architecture.
697 </para>
698
699 <para>
700 Be aware that a hard link between the
701 <filename>KTYPE</filename> variable and a kernel type
702 description file does not exist.
703 Thus, if you do not have the kernel type defined in your kernel
704 Metadata as it is here, you only need to ensure that the
705 <ulink url='&YOCTO_DOCS_REF_URL;#var-LINUX_KERNEL_TYPE'><filename>LINUX_KERNEL_TYPE</filename></ulink>
706 variable in the kernel recipe and the
707 <filename>KTYPE</filename> variable in the BSP description
708 file match.
709 </para>
710
711 <para>
712 To separate your kernel policy from your hardware configuration,
713 you include a kernel type (<filename>ktype</filename>), such as
714 "standard".
715 In the previous example, this is done using the following:
716 <literallayout class='monospaced'>
717 include ktypes/standard/standard.scc
718 </literallayout>
719 This file aggregates all the configuration fragments, patches,
720 and features that make up your standard kernel policy.
721 See the "<link linkend='kernel-types'>Kernel Types</link>"
722 section for more information.
723 </para>
724
725 <para>
726 To aggregate common configurations and features specific to the
727 kernel for <replaceable>mybsp</replaceable>, use the following:
728 <literallayout class='monospaced'>
729 include <replaceable>mybsp</replaceable>.scc
730 </literallayout>
731 You can see that in the BeagleBone example with the following:
732 <literallayout class='monospaced'>
733 include beaglebone.scc
734 </literallayout>
735 For information on how to break a complete
736 <filename>.config</filename> file into the various
737 configuration fragments, see the
738 "<link linkend='creating-config-fragments'>Creating Configuration Fragments</link>"
739 section.
740 </para>
741
742 <para>
743 Finally, if you have any configurations specific to the
744 hardware that are not in a <filename>*.scc</filename> file,
745 you can include them as follows:
746 <literallayout class='monospaced'>
747 kconf hardware <replaceable>mybsp</replaceable>-<replaceable>extra</replaceable>.cfg
748 </literallayout>
749 The BeagleBone example does not include these types of
750 configurations.
751 However, the Malta 32-bit board does ("mti-malta32").
752 Here is the <filename>mti-malta32-le-standard.scc</filename>
753 file:
754 <literallayout class='monospaced'>
755 define KMACHINE mti-malta32-le
756 define KMACHINE qemumipsel
757 define KTYPE standard
758 define KARCH mips
759
760 include ktypes/standard/standard.scc
761 branch mti-malta32
762
763 include mti-malta32.scc
764 kconf hardware mti-malta32-le.cfg
765 </literallayout>
766 </para>
767 </section>
768
769 <section id='bsp-description-file-example-minnow'>
770 <title>Example</title>
771
772 <para>
773 Many real-world examples are more complex.
774 Like any other <filename>.scc</filename> file, BSP
775 descriptions can aggregate features.
776 Consider the Minnow BSP definition given the
777 <filename>linux-yocto-4.4</filename> branch of the
778 <filename>yocto-kernel-cache</filename> (i.e.
779 <filename>yocto-kernel-cache/bsp/minnow/minnow.scc</filename>):
780 <note>
781 Although the Minnow Board BSP is unused, the Metadata
782 remains and is being used here just as an example.
783 </note>
784 <literallayout class='monospaced'>
785 include cfg/x86.scc
786 include features/eg20t/eg20t.scc
787 include cfg/dmaengine.scc
788 include features/power/intel.scc
789 include cfg/efi.scc
790 include features/usb/ehci-hcd.scc
791 include features/usb/ohci-hcd.scc
792 include features/usb/usb-gadgets.scc
793 include features/usb/touchscreen-composite.scc
794 include cfg/timer/hpet.scc
795 include features/leds/leds.scc
796 include features/spi/spidev.scc
797 include features/i2c/i2cdev.scc
798 include features/mei/mei-txe.scc
799
800 # Earlyprintk and port debug requires 8250
801 kconf hardware cfg/8250.cfg
802
803 kconf hardware minnow.cfg
804 kconf hardware minnow-dev.cfg
805 </literallayout>
806 </para>
807
808 <para>
809 The <filename>minnow.scc</filename> description file includes
810 a hardware configuration fragment
811 (<filename>minnow.cfg</filename>) specific to the Minnow
812 BSP as well as several more general configuration
813 fragments and features enabling hardware found on the
814 machine.
815 This <filename>minnow.scc</filename> description file is then
816 included in each of the three
817 "minnow" description files for the supported kernel types
818 (i.e. "standard", "preempt-rt", and "tiny").
819 Consider the "minnow" description for the "standard" kernel
820 type (i.e. <filename>minnow-standard.scc</filename>:
821 <literallayout class='monospaced'>
822 define KMACHINE minnow
823 define KTYPE standard
824 define KARCH i386
825
826 include ktypes/standard
827
828 include minnow.scc
829
830 # Extra minnow configs above the minimal defined in minnow.scc
831 include cfg/efi-ext.scc
832 include features/media/media-all.scc
833 include features/sound/snd_hda_intel.scc
834
835 # The following should really be in standard.scc
836 # USB live-image support
837 include cfg/usb-mass-storage.scc
838 include cfg/boot-live.scc
839
840 # Basic profiling
841 include features/latencytop/latencytop.scc
842 include features/profiling/profiling.scc
843
844 # Requested drivers that don't have an existing scc
845 kconf hardware minnow-drivers-extra.cfg
846 </literallayout>
847 The <filename>include</filename> command midway through the file
848 includes the <filename>minnow.scc</filename> description that
849 defines all enabled hardware for the BSP that is common to
850 all kernel types.
851 Using this command significantly reduces duplication.
852 </para>
853
854 <para>
855 Now consider the "minnow" description for the "tiny" kernel
856 type (i.e. <filename>minnow-tiny.scc</filename>):
857 <literallayout class='monospaced'>
858 define KMACHINE minnow
859 define KTYPE tiny
860 define KARCH i386
861
862 include ktypes/tiny
863
864 include minnow.scc
865 </literallayout>
866 As you might expect, the "tiny" description includes quite a
867 bit less.
868 In fact, it includes only the minimal policy defined by the
869 "tiny" kernel type and the hardware-specific configuration
870 required for booting the machine along with the most basic
871 functionality of the system as defined in the base "minnow"
872 description file.
873 </para>
874
875 <para>
876 Notice again the three critical variables:
877 <ulink url='&YOCTO_DOCS_REF_URL;#var-KMACHINE'><filename>KMACHINE</filename></ulink>,
878 <ulink url='&YOCTO_DOCS_REF_URL;#var-KTYPE'><filename>KTYPE</filename></ulink>,
879 and
880 <ulink url='&YOCTO_DOCS_REF_URL;#var-KARCH'><filename>KARCH</filename></ulink>.
881 Of these variables, only <filename>KTYPE</filename>
882 has changed to specify the "tiny" kernel type.
883 </para>
884 </section>
885 </section>
886</section>
887
888<section id='kernel-metadata-location'>
889 <title>Kernel Metadata Location</title>
890
891 <para>
892 Kernel Metadata always exists outside of the kernel tree either
893 defined in a kernel recipe (recipe-space) or outside of the recipe.
894 Where you choose to define the Metadata depends on what you want
895 to do and how you intend to work.
896 Regardless of where you define the kernel Metadata, the syntax used
897 applies equally.
898 </para>
899
900 <para>
901 If you are unfamiliar with the Linux kernel and only wish
902 to apply a configuration and possibly a couple of patches provided to
903 you by others, the recipe-space method is recommended.
904 This method is also a good approach if you are working with Linux kernel
905 sources you do not control or if you just do not want to maintain a
906 Linux kernel Git repository on your own.
907 For partial information on how you can define kernel Metadata in
908 the recipe-space, see the
909 "<link linkend='modifying-an-existing-recipe'>Modifying an Existing Recipe</link>"
910 section.
911 </para>
912
913 <para>
914 Conversely, if you are actively developing a kernel and are already
915 maintaining a Linux kernel Git repository of your own, you might find
916 it more convenient to work with kernel Metadata kept outside the
917 recipe-space.
918 Working with Metadata in this area can make iterative development of
919 the Linux kernel more efficient outside of the BitBake environment.
920 </para>
921
922 <section id='recipe-space-metadata'>
923 <title>Recipe-Space Metadata</title>
924
925 <para>
926 When stored in recipe-space, the kernel Metadata files reside in a
927 directory hierarchy below
928 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>.
929 For a linux-yocto recipe or for a Linux kernel recipe derived
930 by copying and modifying
931 <filename>oe-core/meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb</filename>
932 to a recipe in your layer, <filename>FILESEXTRAPATHS</filename>
933 is typically set to
934 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-THISDIR'><filename>THISDIR</filename></ulink><filename>}/${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink><filename>}</filename>.
935 See the "<link linkend='modifying-an-existing-recipe'>Modifying an Existing Recipe</link>"
936 section for more information.
937 </para>
938
939 <para>
940 Here is an example that shows a trivial tree of kernel Metadata
941 stored in recipe-space within a BSP layer:
942 <literallayout class='monospaced'>
943 meta-<replaceable>my_bsp_layer</replaceable>/
944 `-- recipes-kernel
945 `-- linux
946 `-- linux-yocto
947 |-- bsp-standard.scc
948 |-- bsp.cfg
949 `-- standard.cfg
950 </literallayout>
951 </para>
952
953 <para>
954 When the Metadata is stored in recipe-space, you must take
955 steps to ensure BitBake has the necessary information to decide
956 what files to fetch and when they need to be fetched again.
957 It is only necessary to specify the <filename>.scc</filename>
958 files on the
959 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>.
960 BitBake parses them and fetches any files referenced in the
961 <filename>.scc</filename> files by the <filename>include</filename>,
962 <filename>patch</filename>, or <filename>kconf</filename> commands.
963 Because of this, it is necessary to bump the recipe
964 <ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink>
965 value when changing the content of files not explicitly listed
966 in the <filename>SRC_URI</filename>.
967 </para>
968
969 <para>
970 If the BSP description is in recipe space, you cannot simply list
971 the <filename>*.scc</filename> in the <filename>SRC_URI</filename>
972 statement.
973 You need to use the following form from your kernel append file:
974 <literallayout class='monospaced'>
975 SRC_URI_append_<replaceable>myplatform</replaceable> = " \
976 file://<replaceable>myplatform</replaceable>;type=kmeta;destsuffix=<replaceable>myplatform</replaceable> \
977 "
978 </literallayout>
979 </para>
980 </section>
981
982 <section id='metadata-outside-the-recipe-space'>
983 <title>Metadata Outside the Recipe-Space</title>
984
985 <para>
986 When stored outside of the recipe-space, the kernel Metadata
987 files reside in a separate repository.
988 The OpenEmbedded build system adds the Metadata to the build as
989 a "type=kmeta" repository through the
990 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
991 variable.
992 As an example, consider the following <filename>SRC_URI</filename>
993 statement from the <filename>linux-yocto_4.12.bb</filename>
994 kernel recipe:
995 <literallayout class='monospaced'>
996 SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.12.git;name=machine;branch=${KBRANCH}; \
997 git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.12;destsuffix=${KMETA}"
998 </literallayout>
999 <filename>${KMETA}</filename>, in this context, is simply used to
1000 name the directory into which the Git fetcher places the Metadata.
1001 This behavior is no different than any multi-repository
1002 <filename>SRC_URI</filename> statement used in a recipe (e.g.
1003 see the previous section).
1004 </para>
1005
1006 <para>
1007 You can keep kernel Metadata in a "kernel-cache", which is a
1008 directory containing configuration fragments.
1009 As with any Metadata kept outside the recipe-space, you simply
1010 need to use the <filename>SRC_URI</filename> statement with the
1011 "type=kmeta" attribute.
1012 Doing so makes the kernel Metadata available during the
1013 configuration phase.
1014 </para>
1015
1016 <para>
1017 If you modify the Metadata, you must not forget to update the
1018 <filename>SRCREV</filename> statements in the kernel's recipe.
1019 In particular, you need to update the
1020 <filename>SRCREV_meta</filename> variable to match the commit in
1021 the <filename>KMETA</filename> branch you wish to use.
1022 Changing the data in these branches and not updating the
1023 <filename>SRCREV</filename> statements to match will cause the
1024 build to fetch an older commit.
1025 </para>
1026 </section>
1027</section>
1028
1029<section id='organizing-your-source'>
1030 <title>Organizing Your Source</title>
1031
1032 <para>
1033 Many recipes based on the <filename>linux-yocto-custom.bb</filename>
1034 recipe use Linux kernel sources that have only a single
1035 branch - "master".
1036 This type of repository structure is fine for linear development
1037 supporting a single machine and architecture.
1038 However, if you work with multiple boards and architectures,
1039 a kernel source repository with multiple branches is more
1040 efficient.
1041 For example, suppose you need a series of patches for one board to boot.
1042 Sometimes, these patches are works-in-progress or fundamentally wrong,
1043 yet they are still necessary for specific boards.
1044 In these situations, you most likely do not want to include these
1045 patches in every kernel you build (i.e. have the patches as part of
1046 the lone "master" branch).
1047 It is situations like these that give rise to multiple branches used
1048 within a Linux kernel sources Git repository.
1049 </para>
1050
1051 <para>
1052 Repository organization strategies exist that maximize source reuse,
1053 remove redundancy, and logically order your changes.
1054 This section presents strategies for the following cases:
1055 <itemizedlist>
1056 <listitem><para>Encapsulating patches in a feature description
1057 and only including the patches in the BSP descriptions of
1058 the applicable boards.</para></listitem>
1059 <listitem><para>Creating a machine branch in your
1060 kernel source repository and applying the patches on that
1061 branch only.</para></listitem>
1062 <listitem><para>Creating a feature branch in your
1063 kernel source repository and merging that branch into your
1064 BSP when needed.</para></listitem>
1065 </itemizedlist>
1066 </para>
1067
1068 <para>
1069 The approach you take is entirely up to you
1070 and depends on what works best for your development model.
1071 </para>
1072
1073 <section id='encapsulating-patches'>
1074 <title>Encapsulating Patches</title>
1075
1076 <para>
1077 if you are reusing patches from an external tree and are not
1078 working on the patches, you might find the encapsulated feature
1079 to be appropriate.
1080 Given this scenario, you do not need to create any branches in the
1081 source repository.
1082 Rather, you just take the static patches you need and encapsulate
1083 them within a feature description.
1084 Once you have the feature description, you simply include that into
1085 the BSP description as described in the
1086 "<link linkend='bsp-descriptions'>BSP Descriptions</link>"
1087 section.
1088 </para>
1089
1090 <para>
1091 You can find information on how to create patches and BSP
1092 descriptions in the "<link linkend='patches'>Patches</link>" and
1093 "<link linkend='bsp-descriptions'>BSP Descriptions</link>"
1094 sections.
1095 </para>
1096 </section>
1097
1098 <section id='machine-branches'>
1099 <title>Machine Branches</title>
1100
1101 <para>
1102 When you have multiple machines and architectures to support,
1103 or you are actively working on board support, it is more
1104 efficient to create branches in the repository based on
1105 individual machines.
1106 Having machine branches allows common source to remain in the
1107 "master" branch with any features specific to a machine stored
1108 in the appropriate machine branch.
1109 This organization method frees you from continually reintegrating
1110 your patches into a feature.
1111 </para>
1112
1113 <para>
1114 Once you have a new branch, you can set up your kernel Metadata
1115 to use the branch a couple different ways.
1116 In the recipe, you can specify the new branch as the
1117 <filename>KBRANCH</filename> to use for the board as
1118 follows:
1119 <literallayout class='monospaced'>
1120 KBRANCH = "mynewbranch"
1121 </literallayout>
1122 Another method is to use the <filename>branch</filename> command
1123 in the BSP description:
1124 <literallayout class='monospaced'>
1125 mybsp.scc:
1126 define KMACHINE mybsp
1127 define KTYPE standard
1128 define KARCH i386
1129 include standard.scc
1130
1131 branch mynewbranch
1132
1133 include mybsp-hw.scc
1134 </literallayout>
1135 </para>
1136
1137 <para>
1138 If you find yourself with numerous branches, you might consider
1139 using a hierarchical branching system similar to what the
1140 Yocto Linux Kernel Git repositories use:
1141 <literallayout class='monospaced'>
1142 <replaceable>common</replaceable>/<replaceable>kernel_type</replaceable>/<replaceable>machine</replaceable>
1143 </literallayout>
1144 </para>
1145
1146 <para>
1147 If you had two kernel types, "standard" and "small" for
1148 instance, three machines, and <replaceable>common</replaceable>
1149 as <filename>mydir</filename>, the branches in your
1150 Git repository might look like this:
1151 <literallayout class='monospaced'>
1152 mydir/base
1153 mydir/standard/base
1154 mydir/standard/machine_a
1155 mydir/standard/machine_b
1156 mydir/standard/machine_c
1157 mydir/small/base
1158 mydir/small/machine_a
1159 </literallayout>
1160 </para>
1161
1162 <para>
1163 This organization can help clarify the branch relationships.
1164 In this case, <filename>mydir/standard/machine_a</filename>
1165 includes everything in <filename>mydir/base</filename> and
1166 <filename>mydir/standard/base</filename>.
1167 The "standard" and "small" branches add sources specific to those
1168 kernel types that for whatever reason are not appropriate for the
1169 other branches.
1170 <note>
1171 The "base" branches are an artifact of the way Git manages
1172 its data internally on the filesystem: Git will not allow you
1173 to use <filename>mydir/standard</filename> and
1174 <filename>mydir/standard/machine_a</filename> because it
1175 would have to create a file and a directory named "standard".
1176 </note>
1177 </para>
1178 </section>
1179
1180 <section id='feature-branches'>
1181 <title>Feature Branches</title>
1182
1183 <para>
1184 When you are actively developing new features, it can be more
1185 efficient to work with that feature as a branch, rather than
1186 as a set of patches that have to be regularly updated.
1187 The Yocto Project Linux kernel tools provide for this with
1188 the <filename>git merge</filename> command.
1189 </para>
1190
1191 <para>
1192 To merge a feature branch into a BSP, insert the
1193 <filename>git merge</filename> command after any
1194 <filename>branch</filename> commands:
1195 <literallayout class='monospaced'>
1196 mybsp.scc:
1197 define KMACHINE mybsp
1198 define KTYPE standard
1199 define KARCH i386
1200 include standard.scc
1201
1202 branch mynewbranch
1203 git merge myfeature
1204
1205 include mybsp-hw.scc
1206 </literallayout>
1207 </para>
1208 </section>
1209</section>
1210
1211<section id='scc-reference'>
1212 <title>SCC Description File Reference</title>
1213
1214 <para>
1215 This section provides a brief reference for the commands you can use
1216 within an SCC description file (<filename>.scc</filename>):
1217 <itemizedlist>
1218 <listitem><para>
1219 <filename>branch [ref]</filename>:
1220 Creates a new branch relative to the current branch
1221 (typically <filename>${KTYPE}</filename>) using
1222 the currently checked-out branch, or "ref" if specified.
1223 </para></listitem>
1224 <listitem><para>
1225 <filename>define</filename>:
1226 Defines variables, such as
1227 <ulink url='&YOCTO_DOCS_REF_URL;#var-KMACHINE'><filename>KMACHINE</filename></ulink>,
1228 <ulink url='&YOCTO_DOCS_REF_URL;#var-KTYPE'><filename>KTYPE</filename></ulink>,
1229 <ulink url='&YOCTO_DOCS_REF_URL;#var-KARCH'><filename>KARCH</filename></ulink>,
1230 and
1231 <ulink url='&YOCTO_DOCS_REF_URL;#var-KFEATURE_DESCRIPTION'><filename>KFEATURE_DESCRIPTION</filename></ulink>.
1232 </para></listitem>
1233 <listitem><para>
1234 <filename>include SCC_FILE</filename>:
1235 Includes an SCC file in the current file.
1236 The file is parsed as if you had inserted it inline.
1237 </para></listitem>
1238 <listitem><para>
1239 <filename>kconf [hardware|non-hardware] CFG_FILE</filename>:
1240 Queues a configuration fragment for merging into the final
1241 Linux <filename>.config</filename> file.</para></listitem>
1242 <listitem><para>
1243 <filename>git merge GIT_BRANCH</filename>:
1244 Merges the feature branch into the current branch.
1245 </para></listitem>
1246 <listitem><para>
1247 <filename>patch PATCH_FILE</filename>:
1248 Applies the patch to the current Git branch.
1249 </para></listitem>
1250 </itemizedlist>
1251 </para>
1252</section>
1253
1254</chapter>
1255<!--
1256vim: expandtab tw=80 ts=4
1257-->
diff --git a/documentation/kernel-dev/kernel-dev-common.xml b/documentation/kernel-dev/kernel-dev-common.xml
deleted file mode 100644
index 8e8a6dbed4..0000000000
--- a/documentation/kernel-dev/kernel-dev-common.xml
+++ /dev/null
@@ -1,2730 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='kernel-dev-common'>
7<title>Common Tasks</title>
8
9 <para>
10 This chapter presents several common tasks you perform when you
11 work with the Yocto Project Linux kernel.
12 These tasks include preparing your host development system for
13 kernel development, preparing a layer, modifying an existing recipe,
14 patching the kernel, configuring the kernel, iterative development,
15 working with your own sources, and incorporating out-of-tree modules.
16 <note>
17 The examples presented in this chapter work with the Yocto Project
18 2.4 Release and forward.
19 </note>
20 </para>
21
22 <section id='preparing-the-build-host-to-work-on-the-kernel'>
23 <title>Preparing the Build Host to Work on the Kernel</title>
24
25 <para>
26 Before you can do any kernel development, you need to be
27 sure your build host is set up to use the Yocto Project.
28 For information on how to get set up, see the
29 "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-preparing-the-build-host'>Preparing the Build Host</ulink>"
30 section in the Yocto Project Development Tasks Manual.
31 Part of preparing the system is creating a local Git
32 repository of the
33 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
34 (<filename>poky</filename>) on your system.
35 Follow the steps in the
36 "<ulink url='&YOCTO_DOCS_DEV_URL;#cloning-the-poky-repository'>Cloning the <filename>poky</filename> Repository</ulink>"
37 section in the Yocto Project Development Tasks Manual to set up your
38 Source Directory.
39 <note>
40 Be sure you check out the appropriate development branch or
41 you create your local branch by checking out a specific tag
42 to get the desired version of Yocto Project.
43 See the
44 "<ulink url='&YOCTO_DOCS_DEV_URL;#checking-out-by-branch-in-poky'>Checking Out by Branch in Poky</ulink>"
45 and
46 "<ulink url='&YOCTO_DOCS_DEV_URL;#checkout-out-by-tag-in-poky'>Checking Out by Tag in Poky</ulink>"
47 sections in the Yocto Project Development Tasks Manual for more
48 information.
49 </note>
50 </para>
51
52 <para>
53 Kernel development is best accomplished using
54 <ulink url='&YOCTO_DOCS_SDK_URL;#using-devtool-in-your-sdk-workflow'><filename>devtool</filename></ulink>
55 and not through traditional kernel workflow methods.
56 The remainder of this section provides information for both
57 scenarios.
58 </para>
59
60 <section id='getting-ready-to-develop-using-devtool'>
61 <title>Getting Ready to Develop Using <filename>devtool</filename></title>
62
63 <para>
64 Follow these steps to prepare to update the kernel image using
65 <filename>devtool</filename>.
66 Completing this procedure leaves you with a clean kernel image
67 and ready to make modifications as described in the
68 "<link linkend='using-devtool-to-patch-the-kernel'>Using <filename>devtool</filename> to Patch the Kernel</link>"
69 section:
70 <orderedlist>
71 <listitem><para>
72 <emphasis>Initialize the BitBake Environment:</emphasis>
73 Before building an extensible SDK, you need to
74 initialize the BitBake build environment by sourcing the
75 build environment script
76 (i.e. <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>oe-init-build-env</filename></ulink>):
77 <literallayout class='monospaced'>
78 $ cd ~/poky
79 $ source oe-init-build-env
80 </literallayout>
81 <note>
82 The previous commands assume the
83 <ulink url='&YOCTO_DOCS_OM_URL;#source-repositories'>Source Repositories</ulink>
84 (i.e. <filename>poky</filename>) have been cloned
85 using Git and the local repository is named
86 "poky".
87 </note>
88 </para></listitem>
89 <listitem><para>
90 <emphasis>Prepare Your <filename>local.conf</filename> File:</emphasis>
91 By default, the
92 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
93 variable is set to "qemux86-64", which is fine if you are
94 building for the QEMU emulator in 64-bit mode.
95 However, if you are not, you need to set the
96 <filename>MACHINE</filename> variable appropriately in
97 your <filename>conf/local.conf</filename> file found in
98 the
99 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
100 (i.e. <filename>~/poky/build</filename> in this
101 example).</para>
102
103 <para>Also, since you are preparing to work on the
104 kernel image, you need to set the
105 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS'><filename>MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS</filename></ulink>
106 variable to include kernel modules.</para>
107
108 <para>In this example we wish to build for qemux86 so
109 we must set the <filename>MACHINE</filename> variable
110 to "qemux86" and also add the "kernel-modules". As described
111 we do this by appending to <filename>conf/local.conf</filename>:
112 <literallayout class='monospaced'>
113 MACHINE = "qemux86"
114 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-modules"
115 </literallayout>
116 </para></listitem>
117 <listitem><para>
118 <emphasis>Create a Layer for Patches:</emphasis>
119 You need to create a layer to hold patches created
120 for the kernel image.
121 You can use the
122 <filename>bitbake-layers create-layer</filename>
123 command as follows:
124 <literallayout class='monospaced'>
125 $ cd ~/poky/build
126 $ bitbake-layers create-layer ../../meta-mylayer
127 NOTE: Starting bitbake server...
128 Add your new layer with 'bitbake-layers add-layer ../../meta-mylayer'
129 $
130 </literallayout>
131 <note>
132 For background information on working with
133 common and BSP layers, see the
134 "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
135 section in the Yocto Project Development Tasks
136 Manual and the
137 "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>"
138 section in the Yocto Project Board Support (BSP)
139 Developer's Guide, respectively.
140 For information on how to use the
141 <filename>bitbake-layers create-layer</filename>
142 command to quickly set up a layer, see the
143 "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-general-layer-using-the-bitbake-layers-script'>Creating a General Layer Using the <filename>bitbake-layers</filename> Script</ulink>"
144 section in the Yocto Project Development Tasks
145 Manual.
146 </note>
147 </para></listitem>
148 <listitem><para>
149 <emphasis>Inform the BitBake Build Environment About
150 Your Layer:</emphasis>
151 As directed when you created your layer, you need to
152 add the layer to the
153 <ulink url='&YOCTO_DOCS_REF_URL;#var-BBLAYERS'><filename>BBLAYERS</filename></ulink>
154 variable in the <filename>bblayers.conf</filename> file
155 as follows:
156 <literallayout class='monospaced'>
157 $ cd ~/poky/build
158 $ bitbake-layers add-layer ../../meta-mylayer
159 NOTE: Starting bitbake server...
160 $
161 </literallayout>
162 </para></listitem>
163 <listitem><para>
164 <emphasis>Build the Extensible SDK:</emphasis>
165 Use BitBake to build the extensible SDK specifically
166 for use with images to be run using QEMU:
167 <literallayout class='monospaced'>
168 $ cd ~/poky/build
169 $ bitbake core-image-minimal -c populate_sdk_ext
170 </literallayout>
171 Once the build finishes, you can find the SDK installer
172 file (i.e. <filename>*.sh</filename> file) in the
173 following directory:
174 <literallayout class='monospaced'>
175 ~/poky/build/tmp/deploy/sdk
176 </literallayout>
177 For this example, the installer file is named
178 <filename>poky-glibc-x86_64-core-image-minimal-i586-toolchain-ext-&DISTRO;.sh</filename>
179 </para></listitem>
180 <listitem><para>
181 <emphasis>Install the Extensible SDK:</emphasis>
182 Use the following command to install the SDK.
183 For this example, install the SDK in the default
184 <filename>~/poky_sdk</filename> directory:
185 <literallayout class='monospaced'>
186 $ cd ~/poky/build/tmp/deploy/sdk
187 $ ./poky-glibc-x86_64-core-image-minimal-i586-toolchain-ext-&DISTRO;.sh
188 Poky (Yocto Project Reference Distro) Extensible SDK installer version &DISTRO;
189 ============================================================================
190 Enter target directory for SDK (default: ~/poky_sdk):
191 You are about to install the SDK to "/home/scottrif/poky_sdk". Proceed [Y/n]? Y
192 Extracting SDK......................................done
193 Setting it up...
194 Extracting buildtools...
195 Preparing build system...
196 Parsing recipes: 100% |#################################################################| Time: 0:00:52
197 Initializing tasks: 100% |############## ###############################################| Time: 0:00:04
198 Checking sstate mirror object availability: 100% |######################################| Time: 0:00:00
199 Parsing recipes: 100% |#################################################################| Time: 0:00:33
200 Initializing tasks: 100% |##############################################################| Time: 0:00:00
201 done
202 SDK has been successfully set up and is ready to be used.
203 Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.
204 $ . /home/scottrif/poky_sdk/environment-setup-i586-poky-linux
205 </literallayout>
206 </para></listitem>
207 <listitem><para id='setting-up-the-esdk-terminal'>
208 <emphasis>Set Up a New Terminal to Work With the
209 Extensible SDK:</emphasis>
210 You must set up a new terminal to work with the SDK.
211 You cannot use the same BitBake shell used to build the
212 installer.</para>
213
214 <para>After opening a new shell, run the SDK environment
215 setup script as directed by the output from installing
216 the SDK:
217 <literallayout class='monospaced'>
218 $ source ~/poky_sdk/environment-setup-i586-poky-linux
219 "SDK environment now set up; additionally you may now run devtool to perform development tasks.
220 Run devtool --help for further details.
221 </literallayout>
222 <note>
223 If you get a warning about attempting to use the
224 extensible SDK in an environment set up to run
225 BitBake, you did not use a new shell.
226 </note>
227 </para></listitem>
228 <listitem><para>
229 <emphasis>Build the Clean Image:</emphasis>
230 The final step in preparing to work on the kernel is to
231 build an initial image using
232 <filename>devtool</filename> in the new terminal you
233 just set up and initialized for SDK work:
234 <literallayout class='monospaced'>
235 $ devtool build-image
236 Parsing recipes: 100% |##########################################| Time: 0:00:05
237 Parsing of 830 .bb files complete (0 cached, 830 parsed). 1299 targets, 47 skipped, 0 masked, 0 errors.
238 WARNING: No packages to add, building image core-image-minimal unmodified
239 Loading cache: 100% |############################################| Time: 0:00:00
240 Loaded 1299 entries from dependency cache.
241 NOTE: Resolving any missing task queue dependencies
242 Initializing tasks: 100% |#######################################| Time: 0:00:07
243 Checking sstate mirror object availability: 100% |###############| Time: 0:00:00
244 NOTE: Executing SetScene Tasks
245 NOTE: Executing RunQueue Tasks
246 NOTE: Tasks Summary: Attempted 2866 tasks of which 2604 didn't need to be rerun and all succeeded.
247 NOTE: Successfully built core-image-minimal. You can find output files in /home/scottrif/poky_sdk/tmp/deploy/images/qemux86
248 </literallayout>
249 If you were building for actual hardware and not for
250 emulation, you could flash the image to a USB stick
251 on <filename>/dev/sdd</filename> and boot your device.
252 For an example that uses a Minnowboard, see the
253 <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/KernelDevelopmentWithEsdk'>TipsAndTricks/KernelDevelopmentWithEsdk</ulink>
254 Wiki page.
255 </para></listitem>
256 </orderedlist>
257 </para>
258
259 <para>
260 At this point you have set up to start making modifications to
261 the kernel by using the extensible SDK.
262 For a continued example, see the
263 "<link linkend='using-devtool-to-patch-the-kernel'>Using <filename>devtool</filename> to Patch the Kernel</link>"
264 section.
265 </para>
266 </section>
267
268 <section id='getting-ready-for-traditional-kernel-development'>
269 <title>Getting Ready for Traditional Kernel Development</title>
270
271 <para>
272 Getting ready for traditional kernel development using the Yocto
273 Project involves many of the same steps as described in the
274 previous section.
275 However, you need to establish a local copy of the kernel source
276 since you will be editing these files.
277 </para>
278
279 <para>
280 Follow these steps to prepare to update the kernel image using
281 traditional kernel development flow with the Yocto Project.
282 Completing this procedure leaves you ready to make modifications
283 to the kernel source as described in the
284 "<link linkend='using-traditional-kernel-development-to-patch-the-kernel'>Using Traditional Kernel Development to Patch the Kernel</link>"
285 section:
286 <orderedlist>
287 <listitem><para>
288 <emphasis>Initialize the BitBake Environment:</emphasis>
289 Before you can do anything using BitBake, you need to
290 initialize the BitBake build environment by sourcing the
291 build environment script
292 (i.e. <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>oe-init-build-env</filename></ulink>).
293 Also, for this example, be sure that the local branch
294 you have checked out for <filename>poky</filename> is
295 the Yocto Project &DISTRO_NAME; branch.
296 If you need to checkout out the &DISTRO_NAME; branch,
297 see the
298 "<ulink url='&YOCTO_DOCS_DEV_URL;#checking-out-by-branch-in-poky'>Checking out by Branch in Poky</ulink>"
299 section in the Yocto Project Development Tasks Manual.
300 <literallayout class='monospaced'>
301 $ cd ~/poky
302 $ git branch
303 master
304 * &DISTRO_NAME;
305 $ source oe-init-build-env
306 </literallayout>
307 <note>
308 The previous commands assume the
309 <ulink url='&YOCTO_DOCS_OM_URL;#source-repositories'>Source Repositories</ulink>
310 (i.e. <filename>poky</filename>) have been cloned
311 using Git and the local repository is named
312 "poky".
313 </note>
314 </para></listitem>
315 <listitem><para>
316 <emphasis>Prepare Your <filename>local.conf</filename>
317 File:</emphasis>
318 By default, the
319 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
320 variable is set to "qemux86-64", which is fine if you are
321 building for the QEMU emulator in 64-bit mode.
322 However, if you are not, you need to set the
323 <filename>MACHINE</filename> variable appropriately in
324 your <filename>conf/local.conf</filename> file found
325 in the
326 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
327 (i.e. <filename>~/poky/build</filename> in this
328 example).</para>
329
330 <para>Also, since you are preparing to work on the
331 kernel image, you need to set the
332 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS'><filename>MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS</filename></ulink>
333 variable to include kernel modules.</para>
334
335 <para>In this example we wish to build for qemux86 so
336 we must set the <filename>MACHINE</filename> variable
337 to "qemux86" and also add the "kernel-modules". As described
338 we do this by appending to <filename>conf/local.conf</filename>:
339 <literallayout class='monospaced'>
340 MACHINE = "qemux86"
341 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-modules"
342 </literallayout>
343 </para></listitem>
344 <listitem><para>
345 <emphasis>Create a Layer for Patches:</emphasis>
346 You need to create a layer to hold patches created
347 for the kernel image.
348 You can use the
349 <filename>bitbake-layers create-layer</filename>
350 command as follows:
351 <literallayout class='monospaced'>
352 $ cd ~/poky/build
353 $ bitbake-layers create-layer ../../meta-mylayer
354 NOTE: Starting bitbake server...
355 Add your new layer with 'bitbake-layers add-layer ../../meta-mylayer'
356 </literallayout>
357 <note>
358 For background information on working with
359 common and BSP layers, see the
360 "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
361 section in the Yocto Project Development Tasks
362 Manual and the
363 "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>"
364 section in the Yocto Project Board Support (BSP)
365 Developer's Guide, respectively.
366 For information on how to use the
367 <filename>bitbake-layers create-layer</filename>
368 command to quickly set up a layer, see the
369 "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-general-layer-using-the-bitbake-layers-script'>Creating a General Layer Using the <filename>bitbake-layers</filename> Script</ulink>"
370 section in the Yocto Project Development Tasks
371 Manual.
372 </note>
373 </para></listitem>
374 <listitem><para>
375 <emphasis>Inform the BitBake Build Environment About
376 Your Layer:</emphasis>
377 As directed when you created your layer, you need to add
378 the layer to the
379 <ulink url='&YOCTO_DOCS_REF_URL;#var-BBLAYERS'><filename>BBLAYERS</filename></ulink>
380 variable in the <filename>bblayers.conf</filename> file
381 as follows:
382 <literallayout class='monospaced'>
383 $ cd ~/poky/build
384 $ bitbake-layers add-layer ../../meta-mylayer
385 NOTE: Starting bitbake server ...
386 $
387 </literallayout>
388 </para></listitem>
389 <listitem><para>
390 <emphasis>Create a Local Copy of the Kernel Git
391 Repository:</emphasis>
392 You can find Git repositories of supported Yocto Project
393 kernels organized under "Yocto Linux Kernel" in the
394 Yocto Project Source Repositories at
395 <ulink url='&YOCTO_GIT_URL;'></ulink>.
396 </para>
397
398 <para>
399 For simplicity, it is recommended that you create your
400 copy of the kernel Git repository outside of the
401 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>,
402 which is usually named <filename>poky</filename>.
403 Also, be sure you are in the
404 <filename>standard/base</filename> branch.
405 </para>
406
407 <para>
408 The following commands show how to create a local copy
409 of the <filename>linux-yocto-4.12</filename> kernel and
410 be in the <filename>standard/base</filename> branch.
411 <note>
412 The <filename>linux-yocto-4.12</filename> kernel
413 can be used with the Yocto Project 2.4 release
414 and forward.
415 You cannot use the
416 <filename>linux-yocto-4.12</filename> kernel with
417 releases prior to Yocto Project 2.4:
418 </note>
419 <literallayout class='monospaced'>
420 $ cd ~
421 $ git clone git://git.yoctoproject.org/linux-yocto-4.12 --branch standard/base
422 Cloning into 'linux-yocto-4.12'...
423 remote: Counting objects: 6097195, done.
424 remote: Compressing objects: 100% (901026/901026), done.
425 remote: Total 6097195 (delta 5152604), reused 6096847 (delta 5152256)
426 Receiving objects: 100% (6097195/6097195), 1.24 GiB | 7.81 MiB/s, done.
427 Resolving deltas: 100% (5152604/5152604), done.
428 Checking connectivity... done.
429 Checking out files: 100% (59846/59846), done.
430 </literallayout>
431 </para></listitem>
432 <listitem><para>
433 <emphasis>Create a Local Copy of the Kernel Cache Git
434 Repository:</emphasis>
435 For simplicity, it is recommended that you create your
436 copy of the kernel cache Git repository outside of the
437 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>,
438 which is usually named <filename>poky</filename>.
439 Also, for this example, be sure you are in the
440 <filename>yocto-4.12</filename> branch.
441 </para>
442
443 <para>
444 The following commands show how to create a local copy
445 of the <filename>yocto-kernel-cache</filename> and
446 be in the <filename>yocto-4.12</filename> branch:
447 <literallayout class='monospaced'>
448 $ cd ~
449 $ git clone git://git.yoctoproject.org/yocto-kernel-cache --branch yocto-4.12
450 Cloning into 'yocto-kernel-cache'...
451 remote: Counting objects: 22639, done.
452 remote: Compressing objects: 100% (9761/9761), done.
453 remote: Total 22639 (delta 12400), reused 22586 (delta 12347)
454 Receiving objects: 100% (22639/22639), 22.34 MiB | 6.27 MiB/s, done.
455 Resolving deltas: 100% (12400/12400), done.
456 Checking connectivity... done.
457 </literallayout>
458 </para></listitem>
459 </orderedlist>
460 </para>
461
462 <para>
463 At this point, you are ready to start making modifications to
464 the kernel using traditional kernel development steps.
465 For a continued example, see the
466 "<link linkend='using-traditional-kernel-development-to-patch-the-kernel'>Using Traditional Kernel Development to Patch the Kernel</link>"
467 section.
468 </para>
469 </section>
470 </section>
471
472 <section id='creating-and-preparing-a-layer'>
473 <title>Creating and Preparing a Layer</title>
474
475 <para>
476 If you are going to be modifying kernel recipes, it is recommended
477 that you create and prepare your own layer in which to do your
478 work.
479 Your layer contains its own
480 <ulink url='&YOCTO_DOCS_REF_URL;#bitbake-term'>BitBake</ulink>
481 append files (<filename>.bbappend</filename>) and provides a
482 convenient mechanism to create your own recipe files
483 (<filename>.bb</filename>) as well as store and use kernel
484 patch files.
485 For background information on working with layers, see the
486 "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
487 section in the Yocto Project Development Tasks Manual.
488 <note><title>Tip</title>
489 The Yocto Project comes with many tools that simplify
490 tasks you need to perform.
491 One such tool is the
492 <filename>bitbake-layers create-layer</filename>
493 command, which simplifies creating a new layer.
494 See the
495 "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-general-layer-using-the-bitbake-layers-script'>Creating a General Layer Using the <filename>bitbake-layers</filename> Script</ulink>"
496 section in the Yocto Project Development Tasks Manual for
497 information on how to use this script to quick set up a
498 new layer.
499 </note>
500 </para>
501
502 <para>
503 To better understand the layer you create for kernel development,
504 the following section describes how to create a layer
505 without the aid of tools.
506 These steps assume creation of a layer named
507 <filename>mylayer</filename> in your home directory:
508 <orderedlist>
509 <listitem><para>
510 <emphasis>Create Structure</emphasis>:
511 Create the layer's structure:
512 <literallayout class='monospaced'>
513 $ cd $HOME
514 $ mkdir meta-mylayer
515 $ mkdir meta-mylayer/conf
516 $ mkdir meta-mylayer/recipes-kernel
517 $ mkdir meta-mylayer/recipes-kernel/linux
518 $ mkdir meta-mylayer/recipes-kernel/linux/linux-yocto
519 </literallayout>
520 The <filename>conf</filename> directory holds your
521 configuration files, while the
522 <filename>recipes-kernel</filename> directory holds your
523 append file and eventual patch files.
524 </para></listitem>
525 <listitem><para>
526 <emphasis>Create the Layer Configuration File</emphasis>:
527 Move to the <filename>meta-mylayer/conf</filename>
528 directory and create the <filename>layer.conf</filename>
529 file as follows:
530 <literallayout class='monospaced'>
531 # We have a conf and classes directory, add to BBPATH
532 BBPATH .= ":${LAYERDIR}"
533
534 # We have recipes-* directories, add to BBFILES
535 BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
536 ${LAYERDIR}/recipes-*/*/*.bbappend"
537
538 BBFILE_COLLECTIONS += "mylayer"
539 BBFILE_PATTERN_mylayer = "^${LAYERDIR}/"
540 BBFILE_PRIORITY_mylayer = "5"
541 </literallayout>
542 Notice <filename>mylayer</filename> as part of the last
543 three statements.
544 </para></listitem>
545 <listitem><para>
546 <emphasis>Create the Kernel Recipe Append File</emphasis>:
547 Move to the
548 <filename>meta-mylayer/recipes-kernel/linux</filename>
549 directory and create the kernel's append file.
550 This example uses the
551 <filename>linux-yocto-4.12</filename> kernel.
552 Thus, the name of the append file is
553 <filename>linux-yocto_4.12.bbappend</filename>:
554 <literallayout class='monospaced'>
555 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
556
557 SRC_URI_append = " file://<replaceable>patch-file-one</replaceable>"
558 SRC_URI_append = " file://<replaceable>patch-file-two</replaceable>"
559 SRC_URI_append = " file://<replaceable>patch-file-three</replaceable>"
560 </literallayout>
561 The
562 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>
563 and
564 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
565 statements enable the OpenEmbedded build system to find
566 patch files.
567 For more information on using append files, see the
568 "<ulink url='&YOCTO_DOCS_DEV_URL;#using-bbappend-files'>Using .bbappend Files in Your Layer</ulink>"
569 section in the Yocto Project Development Tasks Manual.
570 </para></listitem>
571 </orderedlist>
572 </para>
573 </section>
574
575 <section id='modifying-an-existing-recipe'>
576 <title>Modifying an Existing Recipe</title>
577
578 <para>
579 In many cases, you can customize an existing linux-yocto recipe to
580 meet the needs of your project.
581 Each release of the Yocto Project provides a few Linux
582 kernel recipes from which you can choose.
583 These are located in the
584 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
585 in <filename>meta/recipes-kernel/linux</filename>.
586 </para>
587
588 <para>
589 Modifying an existing recipe can consist of the following:
590 <itemizedlist>
591 <listitem><para>Creating the append file</para></listitem>
592 <listitem><para>Applying patches</para></listitem>
593 <listitem><para>Changing the configuration</para></listitem>
594 </itemizedlist>
595 </para>
596
597 <para>
598 Before modifying an existing recipe, be sure that you have created
599 a minimal, custom layer from which you can work.
600 See the
601 "<link linkend='creating-and-preparing-a-layer'>Creating and Preparing a Layer</link>"
602 section for information.
603 </para>
604
605 <section id='creating-the-append-file'>
606 <title>Creating the Append File</title>
607
608 <para>
609 You create this file in your custom layer.
610 You also name it accordingly based on the linux-yocto recipe
611 you are using.
612 For example, if you are modifying the
613 <filename>meta/recipes-kernel/linux/linux-yocto_4.12.bb</filename>
614 recipe, the append file will typically be located as follows
615 within your custom layer:
616 <literallayout class='monospaced'>
617 <replaceable>your-layer</replaceable>/recipes-kernel/linux/linux-yocto_4.12.bbappend
618 </literallayout>
619 The append file should initially extend the
620 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESPATH'><filename>FILESPATH</filename></ulink>
621 search path by prepending the directory that contains your
622 files to the
623 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>
624 variable as follows:
625 <literallayout class='monospaced'>
626 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
627 </literallayout>
628 The path <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-THISDIR'><filename>THISDIR</filename></ulink><filename>}/${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink><filename>}</filename>
629 expands to "linux-yocto" in the current directory for this
630 example.
631 If you add any new files that modify the kernel recipe and you
632 have extended <filename>FILESPATH</filename> as
633 described above, you must place the files in your layer in the
634 following area:
635 <literallayout class='monospaced'>
636 <replaceable>your-layer</replaceable>/recipes-kernel/linux/linux-yocto/
637 </literallayout>
638 <note>If you are working on a new machine Board Support Package
639 (BSP), be sure to refer to the
640 <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>.
641 </note>
642 </para>
643
644 <para>
645 As an example, consider the following append file
646 used by the BSPs in <filename>meta-yocto-bsp</filename>:
647 <literallayout class='monospaced'>
648 meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.12.bbappend
649 </literallayout>
650 The following listing shows the file.
651 Be aware that the actual commit ID strings in this
652 example listing might be different than the actual strings
653 in the file from the <filename>meta-yocto-bsp</filename>
654 layer upstream.
655 <literallayout class='monospaced'>
656 KBRANCH_genericx86 = "standard/base"
657 KBRANCH_genericx86-64 = "standard/base"
658
659 KMACHINE_genericx86 ?= "common-pc"
660 KMACHINE_genericx86-64 ?= "common-pc-64"
661 KBRANCH_edgerouter = "standard/edgerouter"
662 KBRANCH_beaglebone = "standard/beaglebone"
663
664 SRCREV_machine_genericx86 ?= "d09f2ce584d60ecb7890550c22a80c48b83c2e19"
665 SRCREV_machine_genericx86-64 ?= "d09f2ce584d60ecb7890550c22a80c48b83c2e19"
666 SRCREV_machine_edgerouter ?= "b5c8cfda2dfe296410d51e131289fb09c69e1e7d"
667 SRCREV_machine_beaglebone ?= "b5c8cfda2dfe296410d51e131289fb09c69e1e7d"
668
669
670 COMPATIBLE_MACHINE_genericx86 = "genericx86"
671 COMPATIBLE_MACHINE_genericx86-64 = "genericx86-64"
672 COMPATIBLE_MACHINE_edgerouter = "edgerouter"
673 COMPATIBLE_MACHINE_beaglebone = "beaglebone"
674
675 LINUX_VERSION_genericx86 = "4.12.7"
676 LINUX_VERSION_genericx86-64 = "4.12.7"
677 LINUX_VERSION_edgerouter = "4.12.10"
678 LINUX_VERSION_beaglebone = "4.12.10"
679 </literallayout>
680 This append file contains statements used to support
681 several BSPs that ship with the Yocto Project.
682 The file defines machines using the
683 <ulink url='&YOCTO_DOCS_REF_URL;#var-COMPATIBLE_MACHINE'><filename>COMPATIBLE_MACHINE</filename></ulink>
684 variable and uses the
685 <ulink url='&YOCTO_DOCS_REF_URL;#var-KMACHINE'><filename>KMACHINE</filename></ulink>
686 variable to ensure the machine name used by the OpenEmbedded
687 build system maps to the machine name used by the Linux Yocto
688 kernel.
689 The file also uses the optional
690 <ulink url='&YOCTO_DOCS_REF_URL;#var-KBRANCH'><filename>KBRANCH</filename></ulink>
691 variable to ensure the build process uses the
692 appropriate kernel branch.
693 </para>
694
695 <para>
696 Although this particular example does not use it, the
697 <ulink url='&YOCTO_DOCS_REF_URL;#var-KERNEL_FEATURES'><filename>KERNEL_FEATURES</filename></ulink>
698 variable could be used to enable features specific to
699 the kernel.
700 The append file points to specific commits in the
701 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
702 Git repository and the <filename>meta</filename> Git repository
703 branches to identify the exact kernel needed to build the
704 BSP.
705 </para>
706
707 <para>
708 One thing missing in this particular BSP, which you will
709 typically need when developing a BSP, is the kernel
710 configuration file (<filename>.config</filename>) for your BSP.
711 When developing a BSP, you probably have a kernel configuration
712 file or a set of kernel configuration files that, when taken
713 together, define the kernel configuration for your BSP.
714 You can accomplish this definition by putting the configurations
715 in a file or a set of files inside a directory located at the
716 same level as your kernel's append file and having the same
717 name as the kernel's main recipe file.
718 With all these conditions met, simply reference those files in
719 the
720 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
721 statement in the append file.
722 </para>
723
724 <para>
725 For example, suppose you had some configuration options
726 in a file called <filename>network_configs.cfg</filename>.
727 You can place that file inside a directory named
728 <filename>linux-yocto</filename> and then add
729 a <filename>SRC_URI</filename> statement such as the
730 following to the append file.
731 When the OpenEmbedded build system builds the kernel, the
732 configuration options are picked up and applied.
733 <literallayout class='monospaced'>
734 SRC_URI += "file://network_configs.cfg"
735 </literallayout>
736 </para>
737
738 <para>
739 To group related configurations into multiple files, you
740 perform a similar procedure.
741 Here is an example that groups separate configurations
742 specifically for Ethernet and graphics into their own
743 files and adds the configurations by using a
744 <filename>SRC_URI</filename> statement like the following
745 in your append file:
746 <literallayout class='monospaced'>
747 SRC_URI += "file://myconfig.cfg \
748 file://eth.cfg \
749 file://gfx.cfg"
750 </literallayout>
751 </para>
752
753 <para>
754 Another variable you can use in your kernel recipe append
755 file is the
756 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>
757 variable.
758 When you use this statement, you are extending the locations
759 used by the OpenEmbedded system to look for files and
760 patches as the recipe is processed.
761 </para>
762
763 <note>
764 <para>
765 Other methods exist to accomplish grouping and defining
766 configuration options.
767 For example, if you are working with a local clone of the
768 kernel repository, you could checkout the kernel's
769 <filename>meta</filename> branch, make your changes, and
770 then push the changes to the local bare clone of the
771 kernel.
772 The result is that you directly add configuration options
773 to the <filename>meta</filename> branch for your BSP.
774 The configuration options will likely end up in that
775 location anyway if the BSP gets added to the Yocto Project.
776 </para>
777
778 <para>
779 In general, however, the Yocto Project maintainers take
780 care of moving the <filename>SRC_URI</filename>-specified
781 configuration options to the kernel's
782 <filename>meta</filename> branch.
783 Not only is it easier for BSP developers to not have to
784 worry about putting those configurations in the branch,
785 but having the maintainers do it allows them to apply
786 'global' knowledge about the kinds of common configuration
787 options multiple BSPs in the tree are typically using.
788 This allows for promotion of common configurations into
789 common features.
790 </para>
791 </note>
792 </section>
793
794 <section id='applying-patches'>
795 <title>Applying Patches</title>
796
797 <para>
798 If you have a single patch or a small series of patches
799 that you want to apply to the Linux kernel source, you
800 can do so just as you would with any other recipe.
801 You first copy the patches to the path added to
802 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>
803 in your <filename>.bbappend</filename> file as described in
804 the previous section, and then reference them in
805 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
806 statements.
807 </para>
808
809 <para>
810 For example, you can apply a three-patch series by adding the
811 following lines to your linux-yocto
812 <filename>.bbappend</filename> file in your layer:
813 <literallayout class='monospaced'>
814 SRC_URI += "file://0001-first-change.patch"
815 SRC_URI += "file://0002-second-change.patch"
816 SRC_URI += "file://0003-third-change.patch"
817 </literallayout>
818 The next time you run BitBake to build the Linux kernel,
819 BitBake detects the change in the recipe and fetches and
820 applies the patches before building the kernel.
821 </para>
822
823 <para>
824 For a detailed example showing how to patch the kernel using
825 <filename>devtool</filename>, see the
826 "<link linkend='using-devtool-to-patch-the-kernel'>Using <filename>devtool</filename> to Patch the Kernel</link>"
827 and
828 "<link linkend='using-traditional-kernel-development-to-patch-the-kernel'>Using Traditional Kernel Development to Patch the Kernel</link>"
829 sections.
830 </para>
831 </section>
832
833 <section id='changing-the-configuration'>
834 <title>Changing the Configuration</title>
835
836 <para>
837 You can make wholesale or incremental changes to the final
838 <filename>.config</filename> file used for the eventual
839 Linux kernel configuration by including a
840 <filename>defconfig</filename> file and by specifying
841 configuration fragments in the
842 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
843 to be applied to that file.
844 </para>
845
846 <para>
847 If you have a complete, working Linux kernel
848 <filename>.config</filename>
849 file you want to use for the configuration, as before, copy
850 that file to the appropriate <filename>${PN}</filename>
851 directory in your layer's
852 <filename>recipes-kernel/linux</filename> directory,
853 and rename the copied file to "defconfig".
854 Then, add the following lines to the linux-yocto
855 <filename>.bbappend</filename> file in your layer:
856 <literallayout class='monospaced'>
857 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
858 SRC_URI += "file://defconfig"
859 </literallayout>
860 The <filename>SRC_URI</filename> tells the build system how to
861 search for the file, while the
862 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>
863 extends the
864 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESPATH'><filename>FILESPATH</filename></ulink>
865 variable (search directories) to include the
866 <filename>${PN}</filename> directory you created to hold the
867 configuration changes.
868 </para>
869
870 <note>
871 The build system applies the configurations from the
872 <filename>defconfig</filename> file before applying any
873 subsequent configuration fragments.
874 The final kernel configuration is a combination of the
875 configurations in the <filename>defconfig</filename> file and
876 any configuration fragments you provide.
877 You need to realize that if you have any configuration
878 fragments, the build system applies these on top of and
879 after applying the existing <filename>defconfig</filename>
880 file configurations.
881 </note>
882
883 <para>
884 Generally speaking, the preferred approach is to determine the
885 incremental change you want to make and add that as a
886 configuration fragment.
887 For example, if you want to add support for a basic serial
888 console, create a file named <filename>8250.cfg</filename> in
889 the <filename>${PN}</filename> directory with the following
890 content (without indentation):
891 <literallayout class='monospaced'>
892 CONFIG_SERIAL_8250=y
893 CONFIG_SERIAL_8250_CONSOLE=y
894 CONFIG_SERIAL_8250_PCI=y
895 CONFIG_SERIAL_8250_NR_UARTS=4
896 CONFIG_SERIAL_8250_RUNTIME_UARTS=4
897 CONFIG_SERIAL_CORE=y
898 CONFIG_SERIAL_CORE_CONSOLE=y
899 </literallayout>
900 Next, include this configuration fragment and extend the
901 <filename>FILESPATH</filename> variable in your
902 <filename>.bbappend</filename> file:
903 <literallayout class='monospaced'>
904 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
905 SRC_URI += "file://8250.cfg"
906 </literallayout>
907 The next time you run BitBake to build the Linux kernel, BitBake
908 detects the change in the recipe and fetches and applies the
909 new configuration before building the kernel.
910 </para>
911
912 <para>
913 For a detailed example showing how to configure the kernel,
914 see the
915 "<link linkend='configuring-the-kernel'>Configuring the Kernel</link>"
916 section.
917 </para>
918 </section>
919
920 <section id='using-an-in-tree-defconfig-file'>
921 <title>Using an "In-Tree"&nbsp;&nbsp;<filename>defconfig</filename> File</title>
922
923 <para>
924 It might be desirable to have kernel configuration fragment
925 support through a <filename>defconfig</filename> file that
926 is pulled from the kernel source tree for the configured
927 machine.
928 By default, the OpenEmbedded build system looks for
929 <filename>defconfig</filename> files in the layer used for
930 Metadata, which is "out-of-tree", and then configures them
931 using the following:
932 <literallayout class='monospaced'>
933 SRC_URI += "file://defconfig"
934 </literallayout>
935 If you do not want to maintain copies of
936 <filename>defconfig</filename> files in your layer but would
937 rather allow users to use the default configuration from the
938 kernel tree and still be able to add configuration fragments
939 to the
940 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
941 through, for example, append files, you can direct the
942 OpenEmbedded build system to use a
943 <filename>defconfig</filename> file that is "in-tree".
944 </para>
945
946 <para>
947 To specify an "in-tree" <filename>defconfig</filename> file,
948 use the following statement form:
949 <literallayout class='monospaced'>
950 KBUILD_DEFCONFIG_<replaceable>KMACHINE</replaceable> ?= <replaceable>defconfig_file</replaceable>
951 </literallayout>
952 Here is an example that assigns the
953 <filename>KBUILD_DEFCONFIG</filename> variable based on
954 "raspberrypi2" and provides the path to the "in-tree"
955 <filename>defconfig</filename> file
956 to be used for a Raspberry Pi 2,
957 which is based on the Broadcom 2708/2709 chipset:
958 <literallayout class='monospaced'>
959 KBUILD_DEFCONFIG_raspberrypi2 ?= "bcm2709_defconfig"
960 </literallayout>
961 </para>
962
963 <para>
964 Aside from modifying your kernel recipe and providing your own
965 <filename>defconfig</filename> file, you need to be sure no
966 files or statements set <filename>SRC_URI</filename> to use a
967 <filename>defconfig</filename> other than your "in-tree"
968 file (e.g. a kernel's
969 <filename>linux-</filename><replaceable>machine</replaceable><filename>.inc</filename>
970 file).
971 In other words, if the build system detects a statement
972 that identifies an "out-of-tree"
973 <filename>defconfig</filename> file, that statement
974 will override your
975 <filename>KBUILD_DEFCONFIG</filename> variable.
976 </para>
977
978 <para>
979 See the
980 <ulink url='&YOCTO_DOCS_REF_URL;#var-KBUILD_DEFCONFIG'><filename>KBUILD_DEFCONFIG</filename></ulink>
981 variable description for more information.
982 </para>
983 </section>
984 </section>
985
986 <section id="using-devtool-to-patch-the-kernel">
987 <title>Using <filename>devtool</filename> to Patch the Kernel</title>
988
989 <para>
990 The steps in this procedure show you how you can patch the
991 kernel using the extensible SDK and <filename>devtool</filename>.
992 <note>
993 Before attempting this procedure, be sure you have performed
994 the steps to get ready for updating the kernel as described
995 in the
996 "<link linkend='getting-ready-to-develop-using-devtool'>Getting Ready to Develop Using <filename>devtool</filename></link>"
997 section.
998 </note>
999 </para>
1000
1001 <para>
1002 Patching the kernel involves changing or adding configurations
1003 to an existing kernel, changing or adding recipes to the kernel
1004 that are needed to support specific hardware features, or even
1005 altering the source code itself.
1006 </para>
1007
1008 <para>
1009 This example creates a simple patch by adding some QEMU emulator
1010 console output at boot time through <filename>printk</filename>
1011 statements in the kernel's <filename>calibrate.c</filename> source
1012 code file.
1013 Applying the patch and booting the modified image causes the added
1014 messages to appear on the emulator's console.
1015 The example is a continuation of the setup procedure found in
1016 the
1017 "<link linkend='getting-ready-to-develop-using-devtool'>Getting Ready to Develop Using <filename>devtool</filename></link>"
1018 Section.
1019 <orderedlist>
1020 <listitem><para>
1021 <emphasis>Check Out the Kernel Source Files:</emphasis>
1022 First you must use <filename>devtool</filename> to checkout
1023 the kernel source code in its workspace.
1024 Be sure you are in the terminal set up to do work
1025 with the extensible SDK.
1026 <note>
1027 See this
1028 <link linkend='setting-up-the-esdk-terminal'>step</link>
1029 in the
1030 "<link linkend='getting-ready-to-develop-using-devtool'>Getting Ready to Develop Using <filename>devtool</filename></link>"
1031 section for more information.
1032 </note>
1033 Use the following <filename>devtool</filename> command
1034 to check out the code:
1035 <literallayout class='monospaced'>
1036 $ devtool modify linux-yocto
1037 </literallayout>
1038 <note>
1039 During the checkout operation, a bug exists that could
1040 cause errors such as the following to appear:
1041 <literallayout class='monospaced'>
1042 ERROR: Taskhash mismatch 2c793438c2d9f8c3681fd5f7bc819efa versus
1043 be3a89ce7c47178880ba7bf6293d7404 for
1044 /path/to/esdk/layers/poky/meta/recipes-kernel/linux/linux-yocto_4.10.bb.do_unpack
1045 </literallayout>
1046 You can safely ignore these messages.
1047 The source code is correctly checked out.
1048 </note>
1049 </para></listitem>
1050 <listitem><para>
1051 <emphasis>Edit the Source Files</emphasis>
1052 Follow these steps to make some simple changes to the source
1053 files:
1054 <orderedlist>
1055 <listitem><para>
1056 <emphasis>Change the working directory</emphasis>:
1057 In the previous step, the output noted where you can find
1058 the source files (e.g.
1059 <filename>~/poky_sdk/workspace/sources/linux-yocto</filename>).
1060 Change to where the kernel source code is before making
1061 your edits to the <filename>calibrate.c</filename> file:
1062 <literallayout class='monospaced'>
1063 $ cd ~/poky_sdk/workspace/sources/linux-yocto
1064 </literallayout>
1065 </para></listitem>
1066 <listitem><para>
1067 <emphasis>Edit the source file</emphasis>:
1068 Edit the <filename>init/calibrate.c</filename> file to have
1069 the following changes:
1070 <literallayout class='monospaced'>
1071 void calibrate_delay(void)
1072 {
1073 unsigned long lpj;
1074 static bool printed;
1075 int this_cpu = smp_processor_id();
1076
1077 printk("*************************************\n");
1078 printk("* *\n");
1079 printk("* HELLO YOCTO KERNEL *\n");
1080 printk("* *\n");
1081 printk("*************************************\n");
1082
1083 if (per_cpu(cpu_loops_per_jiffy, this_cpu)) {
1084 .
1085 .
1086 .
1087 </literallayout>
1088 </para></listitem>
1089 </orderedlist>
1090 </para></listitem>
1091 <listitem><para>
1092 <emphasis>Build the Updated Kernel Source:</emphasis>
1093 To build the updated kernel source, use
1094 <filename>devtool</filename>:
1095 <literallayout class='monospaced'>
1096 $ devtool build linux-yocto
1097 </literallayout>
1098 </para></listitem>
1099 <listitem><para>
1100 <emphasis>Create the Image With the New Kernel:</emphasis>
1101 Use the <filename>devtool build-image</filename> command
1102 to create a new image that has the new kernel.
1103 <note>
1104 If the image you originally created resulted in a Wic
1105 file, you can use an alternate method to create the new
1106 image with the updated kernel.
1107 For an example, see the steps in the
1108 <ulink url='https://wiki.yoctoproject.org/wiki/TipsAndTricks/KernelDevelopmentWithEsdk'>TipsAndTricks/KernelDevelopmentWithEsdk</ulink>
1109 Wiki Page.
1110 </note>
1111 <literallayout class='monospaced'>
1112 $ cd ~
1113 $ devtool build-image core-image-minimal
1114 </literallayout>
1115 </para></listitem>
1116 <listitem><para>
1117 <emphasis>Test the New Image:</emphasis>
1118 For this example, you can run the new image using QEMU
1119 to verify your changes:
1120 <orderedlist>
1121 <listitem><para>
1122 <emphasis>Boot the image</emphasis>:
1123 Boot the modified image in the QEMU emulator
1124 using this command:
1125 <literallayout class='monospaced'>
1126 $ runqemu qemux86
1127 </literallayout>
1128 </para></listitem>
1129 <listitem><para>
1130 <emphasis>Verify the changes</emphasis>:
1131 Log into the machine using <filename>root</filename>
1132 with no password and then use the following shell
1133 command to scroll through the console's boot output.
1134 <literallayout class='monospaced'>
1135 # dmesg | less
1136 </literallayout>
1137 You should see the results of your
1138 <filename>printk</filename> statements
1139 as part of the output when you scroll down the
1140 console window.
1141 </para></listitem>
1142 </orderedlist>
1143 </para></listitem>
1144 <listitem><para>
1145 <emphasis>Stage and commit your changes</emphasis>:
1146 Within your eSDK terminal, change your working directory to
1147 where you modified the <filename>calibrate.c</filename>
1148 file and use these Git commands to stage and commit your
1149 changes:
1150 <literallayout class='monospaced'>
1151 $ cd ~/poky_sdk/workspace/sources/linux-yocto
1152 $ git status
1153 $ git add init/calibrate.c
1154 $ git commit -m "calibrate: Add printk example"
1155 </literallayout>
1156 </para></listitem>
1157 <listitem><para>
1158 <emphasis>Export the Patches and Create an Append File:</emphasis>
1159 To export your commits as patches and create a
1160 <filename>.bbappend</filename> file, use the following
1161 command in the terminal used to work with the extensible
1162 SDK.
1163 This example uses the previously established layer named
1164 <filename>meta-mylayer</filename>.
1165 <note>
1166 See Step 3 of the
1167 "<link linkend='getting-ready-to-develop-using-devtool'>Getting Ready to Develop Using devtool</link>"
1168 section for information on setting up this layer.
1169 </note>
1170 <literallayout class='monospaced'>
1171 $ devtool finish linux-yocto ~/meta-mylayer
1172 </literallayout>
1173 Once the command finishes, the patches and the
1174 <filename>.bbappend</filename> file are located in the
1175 <filename>~/meta-mylayer/recipes-kernel/linux</filename>
1176 directory.
1177 </para></listitem>
1178 <listitem><para>
1179 <emphasis>Build the Image With Your Modified Kernel:</emphasis>
1180 You can now build an image that includes your kernel
1181 patches.
1182 Execute the following command from your
1183 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
1184 in the terminal set up to run BitBake:
1185 <literallayout class='monospaced'>
1186 $ cd ~/poky/build
1187 $ bitbake core-image-minimal
1188 </literallayout>
1189 </para></listitem>
1190 </orderedlist>
1191 </para>
1192 </section>
1193
1194 <section id="using-traditional-kernel-development-to-patch-the-kernel">
1195 <title>Using Traditional Kernel Development to Patch the Kernel</title>
1196
1197 <para>
1198 The steps in this procedure show you how you can patch the
1199 kernel using traditional kernel development (i.e. not using
1200 <filename>devtool</filename> and the extensible SDK as
1201 described in the
1202 "<link linkend='using-devtool-to-patch-the-kernel'>Using <filename>devtool</filename> to Patch the Kernel</link>"
1203 section).
1204 <note>
1205 Before attempting this procedure, be sure you have performed
1206 the steps to get ready for updating the kernel as described
1207 in the
1208 "<link linkend='getting-ready-for-traditional-kernel-development'>Getting Ready for Traditional Kernel Development</link>"
1209 section.
1210 </note>
1211 </para>
1212
1213 <para>
1214 Patching the kernel involves changing or adding configurations
1215 to an existing kernel, changing or adding recipes to the kernel
1216 that are needed to support specific hardware features, or even
1217 altering the source code itself.
1218 </para>
1219
1220 <para>
1221 The example in this section creates a simple patch by adding some
1222 QEMU emulator console output at boot time through
1223 <filename>printk</filename> statements in the kernel's
1224 <filename>calibrate.c</filename> source code file.
1225 Applying the patch and booting the modified image causes the added
1226 messages to appear on the emulator's console.
1227 The example is a continuation of the setup procedure found in
1228 the
1229 "<link linkend='getting-ready-for-traditional-kernel-development'>Getting Ready for Traditional Kernel Development</link>"
1230 Section.
1231 <orderedlist>
1232 <listitem><para>
1233 <emphasis>Edit the Source Files</emphasis>
1234 Prior to this step, you should have used Git to create a
1235 local copy of the repository for your kernel.
1236 Assuming you created the repository as directed in the
1237 "<link linkend='getting-ready-for-traditional-kernel-development'>Getting Ready for Traditional Kernel Development</link>"
1238 section, use the following commands to edit the
1239 <filename>calibrate.c</filename> file:
1240 <orderedlist>
1241 <listitem><para>
1242 <emphasis>Change the working directory</emphasis>:
1243 You need to locate the source files in the
1244 local copy of the kernel Git repository:
1245 Change to where the kernel source code is before making
1246 your edits to the <filename>calibrate.c</filename> file:
1247 <literallayout class='monospaced'>
1248 $ cd ~/linux-yocto-4.12/init
1249 </literallayout>
1250 </para></listitem>
1251 <listitem><para>
1252 <emphasis>Edit the source file</emphasis>:
1253 Edit the <filename>calibrate.c</filename> file to have
1254 the following changes:
1255 <literallayout class='monospaced'>
1256 void calibrate_delay(void)
1257 {
1258 unsigned long lpj;
1259 static bool printed;
1260 int this_cpu = smp_processor_id();
1261
1262 printk("*************************************\n");
1263 printk("* *\n");
1264 printk("* HELLO YOCTO KERNEL *\n");
1265 printk("* *\n");
1266 printk("*************************************\n");
1267
1268 if (per_cpu(cpu_loops_per_jiffy, this_cpu)) {
1269 .
1270 .
1271 .
1272 </literallayout>
1273 </para></listitem>
1274 </orderedlist>
1275 </para></listitem>
1276 <listitem><para>
1277 <emphasis>Stage and Commit Your Changes:</emphasis>
1278 Use standard Git commands to stage and commit the changes
1279 you just made:
1280 <literallayout class='monospaced'>
1281 $ git add calibrate.c
1282 $ git commit -m "calibrate.c - Added some printk statements"
1283 </literallayout>
1284 If you do not stage and commit your changes, the OpenEmbedded
1285 Build System will not pick up the changes.
1286 </para></listitem>
1287 <listitem><para>
1288 <emphasis>Update Your <filename>local.conf</filename> File
1289 to Point to Your Source Files:</emphasis>
1290 In addition to your <filename>local.conf</filename> file
1291 specifying to use "kernel-modules" and the "qemux86"
1292 machine, it must also point to the updated kernel source
1293 files.
1294 Add
1295 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
1296 and
1297 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRCREV'><filename>SRCREV</filename></ulink>
1298 statements similar to the following to your
1299 <filename>local.conf</filename>:
1300 <literallayout class='monospaced'>
1301 $ cd ~/poky/build/conf
1302 </literallayout>
1303 Add the following to the <filename>local.conf</filename>:
1304 <literallayout class='monospaced'>
1305 SRC_URI_pn-linux-yocto = "git:///<replaceable>path-to</replaceable>/linux-yocto-4.12;protocol=file;name=machine;branch=standard/base; \
1306 git:///<replaceable>path-to</replaceable>/yocto-kernel-cache;protocol=file;type=kmeta;name=meta;branch=yocto-4.12;destsuffix=${KMETA}"
1307 SRCREV_meta_qemux86 = "${AUTOREV}"
1308 SRCREV_machine_qemux86 = "${AUTOREV}"
1309 </literallayout>
1310 <note>
1311 Be sure to replace
1312 <replaceable>path-to</replaceable> with the pathname
1313 to your local Git repositories.
1314 Also, you must be sure to specify the correct branch
1315 and machine types.
1316 For this example, the branch is
1317 <filename>standard/base</filename> and the machine is
1318 "qemux86".
1319 </note>
1320 </para></listitem>
1321 <listitem><para>
1322 <emphasis>Build the Image:</emphasis>
1323 With the source modified, your changes staged and
1324 committed, and the <filename>local.conf</filename> file
1325 pointing to the kernel files, you can now use BitBake to
1326 build the image:
1327 <literallayout class='monospaced'>
1328 $ cd ~/poky/build
1329 $ bitbake core-image-minimal
1330 </literallayout>
1331 </para></listitem>
1332 <listitem><para>
1333 <emphasis>Boot the image</emphasis>:
1334 Boot the modified image in the QEMU emulator
1335 using this command.
1336 When prompted to login to the QEMU console, use "root"
1337 with no password:
1338 <literallayout class='monospaced'>
1339 $ cd ~/poky/build
1340 $ runqemu qemux86
1341 </literallayout>
1342 </para></listitem>
1343 <listitem><para>
1344 <emphasis>Look for Your Changes:</emphasis>
1345 As QEMU booted, you might have seen your changes rapidly
1346 scroll by.
1347 If not, use these commands to see your changes:
1348 <literallayout class='monospaced'>
1349 # dmesg | less
1350 </literallayout>
1351 You should see the results of your
1352 <filename>printk</filename> statements
1353 as part of the output when you scroll down the
1354 console window.
1355 </para></listitem>
1356 <listitem><para>
1357 <emphasis>Generate the Patch File:</emphasis>
1358 Once you are sure that your patch works correctly, you
1359 can generate a <filename>*.patch</filename> file in the
1360 kernel source repository:
1361 <literallayout class='monospaced'>
1362 $ cd ~/linux-yocto-4.12/init
1363 $ git format-patch -1
1364 0001-calibrate.c-Added-some-printk-statements.patch
1365 </literallayout>
1366 </para></listitem>
1367 <listitem><para>
1368 <emphasis>Move the Patch File to Your Layer:</emphasis>
1369 In order for subsequent builds to pick up patches, you
1370 need to move the patch file you created in the previous
1371 step to your layer <filename>meta-mylayer</filename>.
1372 For this example, the layer created earlier is located
1373 in your home directory as <filename>meta-mylayer</filename>.
1374 When the layer was created using the
1375 <filename>yocto-create</filename> script, no additional
1376 hierarchy was created to support patches.
1377 Before moving the patch file, you need to add additional
1378 structure to your layer using the following commands:
1379 <literallayout class='monospaced'>
1380 $ cd ~/meta-mylayer
1381 $ mkdir recipes-kernel
1382 $ mkdir recipes-kernel/linux
1383 $ mkdir recipes-kernel/linux/linux-yocto
1384 </literallayout>
1385 Once you have created this hierarchy in your layer, you can
1386 move the patch file using the following command:
1387 <literallayout class='monospaced'>
1388 $ mv ~/linux-yocto-4.12/init/0001-calibrate.c-Added-some-printk-statements.patch ~/meta-mylayer/recipes-kernel/linux/linux-yocto
1389 </literallayout>
1390 </para></listitem>
1391 <listitem><para>
1392 <emphasis>Create the Append File:</emphasis>
1393 Finally, you need to create the
1394 <filename>linux-yocto_4.12.bbappend</filename> file and
1395 insert statements that allow the OpenEmbedded build
1396 system to find the patch.
1397 The append file needs to be in your layer's
1398 <filename>recipes-kernel/linux</filename>
1399 directory and it must be named
1400 <filename>linux-yocto_4.12.bbappend</filename> and have
1401 the following contents:
1402 <literallayout class='monospaced'>
1403 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
1404
1405 SRC_URI_append = " file://0001-calibrate.c-Added-some-printk-statements.patch"
1406 </literallayout>
1407 The
1408 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>
1409 and
1410 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
1411 statements enable the OpenEmbedded build system to find
1412 the patch file.</para>
1413
1414 <para>For more information on append files and patches,
1415 see the
1416 "<link linkend='creating-the-append-file'>Creating the Append File</link>"
1417 and
1418 "<link linkend='applying-patches'>Applying Patches</link>"
1419 sections.
1420 You can also see the
1421 "<ulink url='&YOCTO_DOCS_DEV_URL;#using-bbappend-files'>Using .bbappend Files in Your Layer"</ulink>"
1422 section in the Yocto Project Development Tasks Manual.
1423 <note>
1424 To build <filename>core-image-minimal</filename>
1425 again and see the effects of your patch, you can
1426 essentially eliminate the temporary source files
1427 saved in <filename>poky/build/tmp/work/...</filename>
1428 and residual effects of the build by entering the
1429 following sequence of commands:
1430 <literallayout class='monospaced'>
1431 $ cd ~/poky/build
1432 $ bitbake -c cleanall yocto-linux
1433 $ bitbake core-image-minimal -c cleanall
1434 $ bitbake core-image-minimal
1435 $ runqemu qemux86
1436 </literallayout>
1437 </note>
1438 </para></listitem>
1439 </orderedlist>
1440 </para>
1441 </section>
1442
1443 <section id='configuring-the-kernel'>
1444 <title>Configuring the Kernel</title>
1445
1446 <para>
1447 Configuring the Yocto Project kernel consists of making sure the
1448 <filename>.config</filename> file has all the right information
1449 in it for the image you are building.
1450 You can use the <filename>menuconfig</filename> tool and
1451 configuration fragments to make sure your
1452 <filename>.config</filename> file is just how you need it.
1453 You can also save known configurations in a
1454 <filename>defconfig</filename> file that the build system can use
1455 for kernel configuration.
1456 </para>
1457
1458 <para>
1459 This section describes how to use <filename>menuconfig</filename>,
1460 create and use configuration fragments, and how to interactively
1461 modify your <filename>.config</filename> file to create the
1462 leanest kernel configuration file possible.
1463 </para>
1464
1465 <para>
1466 For more information on kernel configuration, see the
1467 "<link linkend='changing-the-configuration'>Changing the Configuration</link>"
1468 section.
1469 </para>
1470
1471 <section id='using-menuconfig'>
1472 <title>Using&nbsp;&nbsp;<filename>menuconfig</filename></title>
1473
1474 <para>
1475 The easiest way to define kernel configurations is to set
1476 them through the <filename>menuconfig</filename> tool.
1477 This tool provides an interactive method with which
1478 to set kernel configurations.
1479 For general information on <filename>menuconfig</filename>, see
1480 <ulink url='http://en.wikipedia.org/wiki/Menuconfig'></ulink>.
1481 </para>
1482
1483 <para>
1484 To use the <filename>menuconfig</filename> tool in the Yocto
1485 Project development environment, you must do the following:
1486 <itemizedlist>
1487 <listitem><para>
1488 Because you launch <filename>menuconfig</filename>
1489 using BitBake, you must be sure to set up your
1490 environment by running the
1491 <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
1492 script found in the
1493 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
1494 </para></listitem>
1495 <listitem><para>
1496 You must be sure of the state of your build's
1497 configuration in the
1498 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
1499 </para></listitem>
1500 <listitem><para>
1501 Your build host must have the following two packages
1502 installed:
1503 <literallayout class='monospaced'>
1504 libncurses5-dev
1505 libtinfo-dev
1506 </literallayout>
1507 </para></listitem>
1508 </itemizedlist>
1509 </para>
1510
1511 <para>
1512 The following commands initialize the BitBake environment,
1513 run the
1514 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-kernel_configme'><filename>do_kernel_configme</filename></ulink>
1515 task, and launch <filename>menuconfig</filename>.
1516 These commands assume the Source Directory's top-level folder
1517 is <filename>~/poky</filename>:
1518 <literallayout class='monospaced'>
1519 $ cd poky
1520 $ source oe-init-build-env
1521 $ bitbake linux-yocto -c kernel_configme -f
1522 $ bitbake linux-yocto -c menuconfig
1523 </literallayout>
1524 Once <filename>menuconfig</filename> comes up, its standard
1525 interface allows you to interactively examine and configure
1526 all the kernel configuration parameters.
1527 After making your changes, simply exit the tool and save your
1528 changes to create an updated version of the
1529 <filename>.config</filename> configuration file.
1530 <note>
1531 You can use the entire <filename>.config</filename> file
1532 as the <filename>defconfig</filename> file.
1533 For information on <filename>defconfig</filename> files,
1534 see the
1535 "<link linkend='changing-the-configuration'>Changing the Configuration</link>",
1536 "<link linkend='using-an-in-tree-defconfig-file'>Using an In-Tree <filename>defconfig</filename> File</link>,
1537 and
1538 "<link linkend='creating-a-defconfig-file'>Creating a <filename>defconfig</filename> File</link>"
1539 sections.
1540 </note>
1541 </para>
1542
1543 <para>
1544 Consider an example that configures the "CONFIG_SMP" setting
1545 for the <filename>linux-yocto-4.12</filename> kernel.
1546 <note>
1547 The OpenEmbedded build system recognizes this kernel as
1548 <filename>linux-yocto</filename> through Metadata (e.g.
1549 <ulink url='&YOCTO_DOCS_REF_URL;#var-PREFERRED_VERSION'><filename>PREFERRED_VERSION</filename></ulink><filename>_linux-yocto ?= "12.4%"</filename>).
1550 </note>
1551 Once <filename>menuconfig</filename> launches, use the
1552 interface to navigate through the selections to find the
1553 configuration settings in which you are interested.
1554 For this example, you deselect "CONFIG_SMP" by clearing the
1555 "Symmetric Multi-Processing Support" option.
1556 Using the interface, you can find the option under
1557 "Processor Type and Features".
1558 To deselect "CONFIG_SMP", use the arrow keys to
1559 highlight "Symmetric Multi-Processing Support" and enter "N"
1560 to clear the asterisk.
1561 When you are finished, exit out and save the change.
1562 </para>
1563
1564 <para>
1565 Saving the selections updates the <filename>.config</filename>
1566 configuration file.
1567 This is the file that the OpenEmbedded build system uses to
1568 configure the kernel during the build.
1569 You can find and examine this file in the Build Directory in
1570 <filename>tmp/work/</filename>.
1571 The actual <filename>.config</filename> is located in the
1572 area where the specific kernel is built.
1573 For example, if you were building a Linux Yocto kernel based
1574 on the <filename>linux-yocto-4.12</filename> kernel and you
1575 were building a QEMU image targeted for
1576 <filename>x86</filename> architecture, the
1577 <filename>.config</filename> file would be:
1578 <literallayout class='monospaced'>
1579 poky/build/tmp/work/qemux86-poky-linux/linux-yocto/4.12.12+gitAUTOINC+eda4d18...
1580 ...967-r0/linux-qemux86-standard-build/.config
1581 </literallayout>
1582 <note>
1583 The previous example directory is artificially split and
1584 many of the characters in the actual filename are omitted
1585 in order to make it more readable.
1586 Also, depending on the kernel you are using, the exact
1587 pathname might differ.
1588 </note>
1589 </para>
1590
1591 <para>
1592 Within the <filename>.config</filename> file, you can see the
1593 kernel settings.
1594 For example, the following entry shows that symmetric
1595 multi-processor support is not set:
1596 <literallayout class='monospaced'>
1597 # CONFIG_SMP is not set
1598 </literallayout>
1599 </para>
1600
1601 <para>
1602 A good method to isolate changed configurations is to use a
1603 combination of the <filename>menuconfig</filename> tool and
1604 simple shell commands.
1605 Before changing configurations with
1606 <filename>menuconfig</filename>, copy the existing
1607 <filename>.config</filename> and rename it to something else,
1608 use <filename>menuconfig</filename> to make as many changes as
1609 you want and save them, then compare the renamed configuration
1610 file against the newly created file.
1611 You can use the resulting differences as your base to create
1612 configuration fragments to permanently save in your kernel
1613 layer.
1614 <note>
1615 Be sure to make a copy of the <filename>.config</filename>
1616 file and do not just rename it.
1617 The build system needs an existing
1618 <filename>.config</filename> file from which to work.
1619 </note>
1620 </para>
1621 </section>
1622
1623 <section id='creating-a-defconfig-file'>
1624 <title>Creating a&nbsp;&nbsp;<filename>defconfig</filename> File</title>
1625
1626 <para>
1627 A <filename>defconfig</filename> file in the context of
1628 the Yocto Project is often a <filename>.config</filename>
1629 file that is copied from a build or a
1630 <filename>defconfig</filename> taken from the kernel tree
1631 and moved into recipe space.
1632 You can use a <filename>defconfig</filename> file
1633 to retain a known set of kernel configurations from which the
1634 OpenEmbedded build system can draw to create the final
1635 <filename>.config</filename> file.
1636 <note>
1637 Out-of-the-box, the Yocto Project never ships a
1638 <filename>defconfig</filename> or
1639 <filename>.config</filename> file.
1640 The OpenEmbedded build system creates the final
1641 <filename>.config</filename> file used to configure the
1642 kernel.
1643 </note>
1644 </para>
1645
1646 <para>
1647 To create a <filename>defconfig</filename>, start with a
1648 complete, working Linux kernel <filename>.config</filename>
1649 file.
1650 Copy that file to the appropriate
1651 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink><filename>}</filename>
1652 directory in your layer's
1653 <filename>recipes-kernel/linux</filename> directory, and rename
1654 the copied file to "defconfig" (e.g.
1655 <filename>~/meta-mylayer/recipes-kernel/linux/linux-yocto/defconfig</filename>).
1656 Then, add the following lines to the linux-yocto
1657 <filename>.bbappend</filename> file in your layer:
1658 <literallayout class='monospaced'>
1659 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
1660 SRC_URI += "file://defconfig"
1661 </literallayout>
1662 The
1663 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
1664 tells the build system how to search for the file, while the
1665 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>
1666 extends the
1667 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESPATH'><filename>FILESPATH</filename></ulink>
1668 variable (search directories) to include the
1669 <filename>${PN}</filename> directory you created to hold the
1670 configuration changes.
1671 <note>
1672 The build system applies the configurations from the
1673 <filename>defconfig</filename> file before applying any
1674 subsequent configuration fragments.
1675 The final kernel configuration is a combination of the
1676 configurations in the <filename>defconfig</filename>
1677 file and any configuration fragments you provide.
1678 You need to realize that if you have any configuration
1679 fragments, the build system applies these on top of and
1680 after applying the existing defconfig file configurations.
1681 </note>
1682 For more information on configuring the kernel, see the
1683 "<link linkend='changing-the-configuration'>Changing the Configuration</link>"
1684 section.
1685 </para>
1686 </section>
1687
1688 <section id='creating-config-fragments'>
1689 <title>Creating Configuration Fragments</title>
1690
1691 <para>
1692 Configuration fragments are simply kernel options that
1693 appear in a file placed where the OpenEmbedded build system
1694 can find and apply them.
1695 The build system applies configuration fragments after
1696 applying configurations from a <filename>defconfig</filename>
1697 file.
1698 Thus, the final kernel configuration is a combination of the
1699 configurations in the <filename>defconfig</filename>
1700 file and then any configuration fragments you provide.
1701 The build system applies fragments on top of and
1702 after applying the existing defconfig file configurations.
1703 </para>
1704
1705 <para>
1706 Syntactically, the configuration statement is identical to
1707 what would appear in the <filename>.config</filename> file,
1708 which is in the
1709 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
1710 <note>
1711 For more information about where the
1712 <filename>.config</filename> file is located, see the
1713 example in the
1714 "<link linkend='using-menuconfig'>Using <filename>menuconfig</filename></link>"
1715 section.
1716 </note>
1717 </para>
1718
1719 <para>
1720 It is simple to create a configuration fragment.
1721 One method is to use shell commands.
1722 For example, issuing the following from the shell creates a
1723 configuration fragment file named
1724 <filename>my_smp.cfg</filename> that enables multi-processor
1725 support within the kernel:
1726 <literallayout class='monospaced'>
1727 $ echo "CONFIG_SMP=y" >> my_smp.cfg
1728 </literallayout>
1729 <note>
1730 All configuration fragment files must use the
1731 <filename>.cfg</filename> extension in order for the
1732 OpenEmbedded build system to recognize them as a
1733 configuration fragment.
1734 </note>
1735 </para>
1736
1737 <para>
1738 Another method is to create a configuration fragment using the
1739 differences between two configuration files: one previously
1740 created and saved, and one freshly created using the
1741 <filename>menuconfig</filename> tool.
1742 </para>
1743
1744 <para>
1745 To create a configuration fragment using this method, follow
1746 these steps:
1747 <orderedlist>
1748 <listitem><para>
1749 <emphasis>Complete a Build Through Kernel Configuration:</emphasis>
1750 Complete a build at least through the kernel
1751 configuration task as follows:
1752 <literallayout class='monospaced'>
1753 $ bitbake linux-yocto -c kernel_configme -f
1754 </literallayout>
1755 This step ensures that you create a
1756 <filename>.config</filename> file from a known state.
1757 Because situations exist where your build state might
1758 become unknown, it is best to run this task prior
1759 to starting <filename>menuconfig</filename>.
1760 </para></listitem>
1761 <listitem><para>
1762 <emphasis>Launch <filename>menuconfig</filename>:</emphasis>
1763 Run the <filename>menuconfig</filename> command:
1764 <literallayout class='monospaced'>
1765 $ bitbake linux-yocto -c menuconfig
1766 </literallayout>
1767 </para></listitem>
1768 <listitem><para>
1769 <emphasis>Create the Configuration Fragment:</emphasis>
1770 Run the <filename>diffconfig</filename>
1771 command to prepare a configuration fragment.
1772 The resulting file <filename>fragment.cfg</filename>
1773 is placed in the
1774 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink><filename>}</filename> directory:
1775 <literallayout class='monospaced'>
1776 $ bitbake linux-yocto -c diffconfig
1777 </literallayout>
1778 </para></listitem>
1779 </orderedlist>
1780 </para>
1781
1782 <para>
1783 The <filename>diffconfig</filename> command creates a file
1784 that is a list of Linux kernel <filename>CONFIG_</filename>
1785 assignments.
1786 See the "<link linkend='changing-the-configuration'>Changing the Configuration</link>"
1787 section for additional information on how to use the output
1788 as a configuration fragment.
1789 <note>
1790 You can also use this method to create configuration
1791 fragments for a BSP.
1792 See the "<link linkend='bsp-descriptions'>BSP Descriptions</link>"
1793 section for more information.
1794 </note>
1795 </para>
1796
1797 <para>
1798 Where do you put your configuration fragment files?
1799 You can place these files in an area pointed to by
1800 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
1801 as directed by your <filename>bblayers.conf</filename> file,
1802 which is located in your layer.
1803 The OpenEmbedded build system picks up the configuration and
1804 adds it to the kernel's configuration.
1805 For example, suppose you had a set of configuration options
1806 in a file called <filename>myconfig.cfg</filename>.
1807 If you put that file inside a directory named
1808 <filename>linux-yocto</filename> that resides in the same
1809 directory as the kernel's append file within your layer
1810 and then add the following statements to the kernel's append
1811 file, those configuration options will be picked up and applied
1812 when the kernel is built:
1813 <literallayout class='monospaced'>
1814 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
1815 SRC_URI += "file://myconfig.cfg"
1816 </literallayout>
1817 </para>
1818
1819 <para>
1820 As mentioned earlier, you can group related configurations
1821 into multiple files and name them all in the
1822 <filename>SRC_URI</filename> statement as well.
1823 For example, you could group separate configurations
1824 specifically for Ethernet and graphics into their own files
1825 and add those by using a <filename>SRC_URI</filename> statement
1826 like the following in your append file:
1827 <literallayout class='monospaced'>
1828 SRC_URI += "file://myconfig.cfg \
1829 file://eth.cfg \
1830 file://gfx.cfg"
1831 </literallayout>
1832 </para>
1833 </section>
1834
1835 <section id='validating-configuration'>
1836 <title>Validating Configuration</title>
1837
1838 <para>
1839 You can use the
1840 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-kernel_configcheck'><filename>do_kernel_configcheck</filename></ulink>
1841 task to provide configuration validation:
1842 <literallayout class='monospaced'>
1843 $ bitbake linux-yocto -c kernel_configcheck -f
1844 </literallayout>
1845 Running this task produces warnings for when a
1846 requested configuration does not appear in the final
1847 <filename>.config</filename> file or when you override a
1848 policy configuration in a hardware configuration fragment.
1849 </para>
1850
1851 <para>
1852 In order to run this task, you must have an existing
1853 <filename>.config</filename> file.
1854 See the
1855 "<link linkend='using-menuconfig'>Using <filename>menuconfig</filename></link>"
1856 section for information on how to create a configuration file.
1857 </para>
1858
1859 <para>
1860 Following is sample output from the
1861 <filename>do_kernel_configcheck</filename> task:
1862 <literallayout class='monospaced'>
1863 Loading cache: 100% |########################################################| Time: 0:00:00
1864 Loaded 1275 entries from dependency cache.
1865 NOTE: Resolving any missing task queue dependencies
1866
1867 Build Configuration:
1868 .
1869 .
1870 .
1871
1872 NOTE: Executing SetScene Tasks
1873 NOTE: Executing RunQueue Tasks
1874 WARNING: linux-yocto-4.12.12+gitAUTOINC+eda4d18ce4_16de014967-r0 do_kernel_configcheck:
1875 [kernel config]: specified values did not make it into the kernel's final configuration:
1876
1877 ---------- CONFIG_X86_TSC -----------------
1878 Config: CONFIG_X86_TSC
1879 From: /home/scottrif/poky/build/tmp/work-shared/qemux86/kernel-source/.kernel-meta/configs/standard/bsp/common-pc/common-pc-cpu.cfg
1880 Requested value: CONFIG_X86_TSC=y
1881 Actual value:
1882
1883
1884 ---------- CONFIG_X86_BIGSMP -----------------
1885 Config: CONFIG_X86_BIGSMP
1886 From: /home/scottrif/poky/build/tmp/work-shared/qemux86/kernel-source/.kernel-meta/configs/standard/cfg/smp.cfg
1887 /home/scottrif/poky/build/tmp/work-shared/qemux86/kernel-source/.kernel-meta/configs/standard/defconfig
1888 Requested value: # CONFIG_X86_BIGSMP is not set
1889 Actual value:
1890
1891
1892 ---------- CONFIG_NR_CPUS -----------------
1893 Config: CONFIG_NR_CPUS
1894 From: /home/scottrif/poky/build/tmp/work-shared/qemux86/kernel-source/.kernel-meta/configs/standard/cfg/smp.cfg
1895 /home/scottrif/poky/build/tmp/work-shared/qemux86/kernel-source/.kernel-meta/configs/standard/bsp/common-pc/common-pc.cfg
1896 /home/scottrif/poky/build/tmp/work-shared/qemux86/kernel-source/.kernel-meta/configs/standard/defconfig
1897 Requested value: CONFIG_NR_CPUS=8
1898 Actual value: CONFIG_NR_CPUS=1
1899
1900
1901 ---------- CONFIG_SCHED_SMT -----------------
1902 Config: CONFIG_SCHED_SMT
1903 From: /home/scottrif/poky/build/tmp/work-shared/qemux86/kernel-source/.kernel-meta/configs/standard/cfg/smp.cfg
1904 /home/scottrif/poky/build/tmp/work-shared/qemux86/kernel-source/.kernel-meta/configs/standard/defconfig
1905 Requested value: CONFIG_SCHED_SMT=y
1906 Actual value:
1907
1908
1909
1910 NOTE: Tasks Summary: Attempted 288 tasks of which 285 didn't need to be rerun and all succeeded.
1911
1912 Summary: There were 3 WARNING messages shown.
1913 </literallayout>
1914 <note>
1915 The previous output example has artificial line breaks
1916 to make it more readable.
1917 </note>
1918 </para>
1919
1920 <para>
1921 The output describes the various problems that you can
1922 encounter along with where to find the offending configuration
1923 items.
1924 You can use the information in the logs to adjust your
1925 configuration files and then repeat the
1926 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-kernel_configme'><filename>do_kernel_configme</filename></ulink>
1927 and
1928 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-kernel_configcheck'><filename>do_kernel_configcheck</filename></ulink>
1929 tasks until they produce no warnings.
1930 </para>
1931
1932 <para>
1933 For more information on how to use the
1934 <filename>menuconfig</filename> tool, see the
1935 "<link linkend='using-menuconfig'>Using <filename>menuconfig</filename></link>"
1936 section.
1937 </para>
1938 </section>
1939
1940 <section id='fine-tuning-the-kernel-configuration-file'>
1941 <title>Fine-Tuning the Kernel Configuration File</title>
1942
1943 <para>
1944 You can make sure the <filename>.config</filename> file is as
1945 lean or efficient as possible by reading the output of the
1946 kernel configuration fragment audit, noting any issues, making
1947 changes to correct the issues, and then repeating.
1948 </para>
1949
1950 <para>
1951 As part of the kernel build process, the
1952 <filename>do_kernel_configcheck</filename> task runs.
1953 This task validates the kernel configuration by checking the
1954 final <filename>.config</filename> file against the input
1955 files.
1956 During the check, the task produces warning messages for the
1957 following issues:
1958 <itemizedlist>
1959 <listitem><para>
1960 Requested options that did not make the final
1961 <filename>.config</filename> file.
1962 </para></listitem>
1963 <listitem><para>
1964 Configuration items that appear twice in the same
1965 configuration fragment.
1966 </para></listitem>
1967 <listitem><para>
1968 Configuration items tagged as "required" that were
1969 overridden.
1970 </para></listitem>
1971 <listitem><para>
1972 A board overrides a non-board specific option.
1973 </para></listitem>
1974 <listitem><para>
1975 Listed options not valid for the kernel being
1976 processed.
1977 In other words, the option does not appear anywhere.
1978 </para></listitem>
1979 </itemizedlist>
1980 <note>
1981 The <filename>do_kernel_configcheck</filename> task can
1982 also optionally report if an option is overridden during
1983 processing.
1984 </note>
1985 </para>
1986
1987 <para>
1988 For each output warning, a message points to the file
1989 that contains a list of the options and a pointer to the
1990 configuration fragment that defines them.
1991 Collectively, the files are the key to streamlining the
1992 configuration.
1993 </para>
1994
1995 <para>
1996 To streamline the configuration, do the following:
1997 <orderedlist>
1998 <listitem><para>
1999 <emphasis>Use a Working Configuration:</emphasis>
2000 Start with a full configuration that you
2001 know works.
2002 Be sure the configuration builds and boots
2003 successfully.
2004 Use this configuration file as your baseline.
2005 </para></listitem>
2006 <listitem><para>
2007 <emphasis>Run Configure and Check Tasks:</emphasis>
2008 Separately run the
2009 <filename>do_kernel_configme</filename> and
2010 <filename>do_kernel_configcheck</filename> tasks:
2011 <literallayout class='monospaced'>
2012 $ bitbake linux-yocto -c kernel_configme -f
2013 $ bitbake linux-yocto -c kernel_configcheck -f
2014 </literallayout>
2015 </para></listitem>
2016 <listitem><para>
2017 <emphasis>Process the Results:</emphasis>
2018 Take the resulting list of files from the
2019 <filename>do_kernel_configcheck</filename> task
2020 warnings and do the following:
2021 <itemizedlist>
2022 <listitem><para>
2023 Drop values that are redefined in the fragment
2024 but do not change the final
2025 <filename>.config</filename> file.
2026 </para></listitem>
2027 <listitem><para>
2028 Analyze and potentially drop values from the
2029 <filename>.config</filename> file that override
2030 required configurations.
2031 </para></listitem>
2032 <listitem><para>
2033 Analyze and potentially remove non-board
2034 specific options.
2035 </para></listitem>
2036 <listitem><para>
2037 Remove repeated and invalid options.
2038 </para></listitem>
2039 </itemizedlist>
2040 </para></listitem>
2041 <listitem><para>
2042 <emphasis>Re-Run Configure and Check Tasks:</emphasis>
2043 After you have worked through the output of the kernel
2044 configuration audit, you can re-run the
2045 <filename>do_kernel_configme</filename> and
2046 <filename>do_kernel_configcheck</filename> tasks to
2047 see the results of your changes.
2048 If you have more issues, you can deal with them as
2049 described in the previous step.
2050 </para></listitem>
2051 </orderedlist>
2052 </para>
2053
2054 <para>
2055 Iteratively working through steps two through four eventually
2056 yields a minimal, streamlined configuration file.
2057 Once you have the best <filename>.config</filename>, you can
2058 build the Linux Yocto kernel.
2059 </para>
2060 </section>
2061 </section>
2062
2063 <section id='expanding-variables'>
2064 <title>Expanding Variables</title>
2065
2066 <para>
2067 Sometimes it is helpful to determine what a variable expands
2068 to during a build.
2069 You can do examine the values of variables by examining the
2070 output of the <filename>bitbake -e</filename> command.
2071 The output is long and is more easily managed in a text file,
2072 which allows for easy searches:
2073 <literallayout class='monospaced'>
2074 $ bitbake -e virtual/kernel > <replaceable>some_text_file</replaceable>
2075 </literallayout>
2076 Within the text file, you can see exactly how each variable is
2077 expanded and used by the OpenEmbedded build system.
2078 </para>
2079 </section>
2080
2081 <section id='working-with-a-dirty-kernel-version-string'>
2082 <title>Working with a "Dirty" Kernel Version String</title>
2083
2084 <para>
2085 If you build a kernel image and the version string has a
2086 "+" or a "-dirty" at the end, uncommitted modifications exist
2087 in the kernel's source directory.
2088 Follow these steps to clean up the version string:
2089 <orderedlist>
2090 <listitem><para>
2091 <emphasis>Discover the Uncommitted Changes:</emphasis>
2092 Go to the kernel's locally cloned Git repository
2093 (source directory) and use the following Git command
2094 to list the files that have been changed, added, or
2095 removed:
2096 <literallayout class='monospaced'>
2097 $ git status
2098 </literallayout>
2099 </para></listitem>
2100 <listitem><para>
2101 <emphasis>Commit the Changes:</emphasis>
2102 You should commit those changes to the kernel source
2103 tree regardless of whether or not you will save,
2104 export, or use the changes:
2105 <literallayout class='monospaced'>
2106 $ git add
2107 $ git commit -s -a -m "getting rid of -dirty"
2108 </literallayout>
2109 </para></listitem>
2110 <listitem><para>
2111 <emphasis>Rebuild the Kernel Image:</emphasis>
2112 Once you commit the changes, rebuild the kernel.</para>
2113
2114 <para>Depending on your particular kernel development
2115 workflow, the commands you use to rebuild the
2116 kernel might differ.
2117 For information on building the kernel image when
2118 using <filename>devtool</filename>, see the
2119 "<link linkend='using-devtool-to-patch-the-kernel'>Using <filename>devtool</filename> to Patch the Kernel</link>"
2120 section.
2121 For information on building the kernel image when
2122 using Bitbake, see the
2123 "<link linkend='using-traditional-kernel-development-to-patch-the-kernel'>Using Traditional Kernel Development to Patch the Kernel</link>"
2124 section.
2125 </para></listitem>
2126 </orderedlist>
2127 </para>
2128 </section>
2129
2130 <section id='working-with-your-own-sources'>
2131 <title>Working With Your Own Sources</title>
2132
2133 <para>
2134 If you cannot work with one of the Linux kernel
2135 versions supported by existing linux-yocto recipes, you can
2136 still make use of the Yocto Project Linux kernel tooling by
2137 working with your own sources.
2138 When you use your own sources, you will not be able to
2139 leverage the existing kernel
2140 <ulink url='&YOCTO_DOCS_REF_URL;#metadata'>Metadata</ulink> and
2141 stabilization work of the linux-yocto sources.
2142 However, you will be able to manage your own Metadata in the same
2143 format as the linux-yocto sources.
2144 Maintaining format compatibility facilitates converging with
2145 linux-yocto on a future, mutually-supported kernel version.
2146 </para>
2147
2148 <para>
2149 To help you use your own sources, the Yocto Project provides a
2150 linux-yocto custom recipe
2151 (<filename>linux-yocto-custom.bb</filename>) that uses
2152 <filename>kernel.org</filename> sources
2153 and the Yocto Project Linux kernel tools for managing
2154 kernel Metadata.
2155 You can find this recipe in the
2156 <filename>poky</filename> Git repository of the
2157 Yocto Project <ulink url='&YOCTO_GIT_URL;'>Source Repository</ulink>
2158 at:
2159 <literallayout class="monospaced">
2160 poky/meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb
2161 </literallayout>
2162 </para>
2163
2164 <para>
2165 Here are some basic steps you can use to work with your own
2166 sources:
2167 <orderedlist>
2168 <listitem><para>
2169 <emphasis>Create a Copy of the Kernel Recipe:</emphasis>
2170 Copy the <filename>linux-yocto-custom.bb</filename>
2171 recipe to your layer and give it a meaningful name.
2172 The name should include the version of the Yocto Linux
2173 kernel you are using (e.g.
2174 <filename>linux-yocto-myproject_4.12.bb</filename>,
2175 where "4.12" is the base version of the Linux kernel
2176 with which you would be working).
2177 </para></listitem>
2178 <listitem><para>
2179 <emphasis>Create a Directory for Your Patches:</emphasis>
2180 In the same directory inside your layer, create a matching
2181 directory to store your patches and configuration files
2182 (e.g. <filename>linux-yocto-myproject</filename>).
2183 </para></listitem>
2184 <listitem><para>
2185 <emphasis>Ensure You Have Configurations:</emphasis>
2186 Make sure you have either a <filename>defconfig</filename>
2187 file or configuration fragment files in your layer.
2188 When you use the <filename>linux-yocto-custom.bb</filename>
2189 recipe, you must specify a configuration.
2190 If you do not have a <filename>defconfig</filename> file,
2191 you can run the following:
2192 <literallayout class='monospaced'>
2193 $ make defconfig
2194 </literallayout>
2195 After running the command, copy the resulting
2196 <filename>.config</filename> file to the
2197 <filename>files</filename> directory in your layer
2198 as "defconfig" and then add it to the
2199 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
2200 variable in the recipe.</para>
2201
2202 <para>Running the <filename>make defconfig</filename>
2203 command results in the default configuration for your
2204 architecture as defined by your kernel.
2205 However, no guarantee exists that this configuration is
2206 valid for your use case, or that your board will even boot.
2207 This is particularly true for non-x86 architectures.</para>
2208
2209 <para>To use non-x86 <filename>defconfig</filename> files,
2210 you need to be more specific and find one that matches your
2211 board (i.e. for arm, you look in
2212 <filename>arch/arm/configs</filename> and use the one that
2213 is the best starting point for your board).
2214 </para></listitem>
2215 <listitem><para>
2216 <emphasis>Edit the Recipe:</emphasis>
2217 Edit the following variables in your recipe as appropriate
2218 for your project:
2219 <itemizedlist>
2220 <listitem><para>
2221 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>:
2222 The <filename>SRC_URI</filename> should specify
2223 a Git repository that uses one of the supported Git
2224 fetcher protocols (i.e. <filename>file</filename>,
2225 <filename>git</filename>, <filename>http</filename>,
2226 and so forth).
2227 The <filename>SRC_URI</filename> variable should
2228 also specify either a <filename>defconfig</filename>
2229 file or some configuration fragment files.
2230 The skeleton recipe provides an example
2231 <filename>SRC_URI</filename> as a syntax reference.
2232 </para></listitem>
2233 <listitem><para>
2234 <ulink url='&YOCTO_DOCS_REF_URL;#var-LINUX_VERSION'><filename>LINUX_VERSION</filename></ulink>:
2235 The Linux kernel version you are using (e.g.
2236 "4.12").
2237 </para></listitem>
2238 <listitem><para>
2239 <ulink url='&YOCTO_DOCS_REF_URL;#var-LINUX_VERSION_EXTENSION'><filename>LINUX_VERSION_EXTENSION</filename></ulink>:
2240 The Linux kernel
2241 <filename>CONFIG_LOCALVERSION</filename> that is
2242 compiled into the resulting kernel and visible
2243 through the <filename>uname</filename> command.
2244 </para></listitem>
2245 <listitem><para>
2246 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRCREV'><filename>SRCREV</filename></ulink>:
2247 The commit ID from which you want to build.
2248 </para></listitem>
2249 <listitem><para>
2250 <ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink>:
2251 Treat this variable the same as you would in any
2252 other recipe.
2253 Increment the variable to indicate to the
2254 OpenEmbedded build system that the recipe has
2255 changed.
2256 </para></listitem>
2257 <listitem><para>
2258 <ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>:
2259 The default <filename>PV</filename> assignment is
2260 typically adequate.
2261 It combines the <filename>LINUX_VERSION</filename>
2262 with the Source Control Manager (SCM) revision
2263 as derived from the
2264 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRCPV'><filename>SRCPV</filename></ulink>
2265 variable.
2266 The combined results are a string with the
2267 following form:
2268 <literallayout class='monospaced'>
2269 3.19.11+git1+68a635bf8dfb64b02263c1ac80c948647cc76d5f_1+218bd8d2022b9852c60d32f0d770931e3cf343e2
2270 </literallayout>
2271 While lengthy, the extra verbosity in
2272 <filename>PV</filename> helps ensure you are using
2273 the exact sources from which you intend to build.
2274 </para></listitem>
2275 <listitem><para>
2276 <ulink url='&YOCTO_DOCS_REF_URL;#var-COMPATIBLE_MACHINE'><filename>COMPATIBLE_MACHINE</filename></ulink>:
2277 A list of the machines supported by your new recipe.
2278 This variable in the example recipe is set
2279 by default to a regular expression that matches
2280 only the empty string, "(^$)".
2281 This default setting triggers an explicit build
2282 failure.
2283 You must change it to match a list of the machines
2284 that your new recipe supports.
2285 For example, to support the
2286 <filename>qemux86</filename> and
2287 <filename>qemux86-64</filename> machines, use
2288 the following form:
2289 <literallayout class='monospaced'>
2290 COMPATIBLE_MACHINE = "qemux86|qemux86-64"
2291 </literallayout>
2292 </para></listitem>
2293 </itemizedlist>
2294 </para></listitem>
2295 <listitem><para>
2296 <emphasis>Customize Your Recipe as Needed:</emphasis>
2297 Provide further customizations to your recipe
2298 as needed just as you would customize an existing
2299 linux-yocto recipe.
2300 See the
2301 "<link linkend='modifying-an-existing-recipe'>Modifying an Existing Recipe</link>"
2302 section for information.
2303 </para></listitem>
2304 </orderedlist>
2305 </para>
2306 </section>
2307
2308 <section id='working-with-out-of-tree-modules'>
2309 <title>Working with Out-of-Tree Modules</title>
2310
2311 <para>
2312 This section describes steps to build out-of-tree modules on
2313 your target and describes how to incorporate out-of-tree modules
2314 in the build.
2315 </para>
2316
2317 <section id='building-out-of-tree-modules-on-the-target'>
2318 <title>Building Out-of-Tree Modules on the Target</title>
2319
2320 <para>
2321 While the traditional Yocto Project development model would be
2322 to include kernel modules as part of the normal build
2323 process, you might find it useful to build modules on the
2324 target.
2325 This could be the case if your target system is capable
2326 and powerful enough to handle the necessary compilation.
2327 Before deciding to build on your target, however, you should
2328 consider the benefits of using a proper cross-development
2329 environment from your build host.
2330 </para>
2331
2332 <para>
2333 If you want to be able to build out-of-tree modules on
2334 the target, there are some steps you need to take
2335 on the target that is running your SDK image.
2336 Briefly, the <filename>kernel-dev</filename> package
2337 is installed by default on all
2338 <filename>*.sdk</filename> images and the
2339 <filename>kernel-devsrc</filename> package is installed
2340 on many of the <filename>*.sdk</filename> images.
2341 However, you need to create some scripts prior to
2342 attempting to build the out-of-tree modules on the target
2343 that is running that image.
2344 </para>
2345
2346 <para>
2347 Prior to attempting to build the out-of-tree modules,
2348 you need to be on the target as root and you need to
2349 change to the <filename>/usr/src/kernel</filename> directory.
2350 Next, <filename>make</filename> the scripts:
2351 <literallayout class='monospaced'>
2352 # cd /usr/src/kernel
2353 # make scripts
2354 </literallayout>
2355 Because all SDK image recipes include
2356 <filename>dev-pkgs</filename>, the
2357 <filename>kernel-dev</filename> packages will be installed
2358 as part of the SDK image and the
2359 <filename>kernel-devsrc</filename> packages will be installed
2360 as part of applicable SDK images.
2361 The SDK uses the scripts when building out-of-tree
2362 modules.
2363 Once you have switched to that directory and created the
2364 scripts, you should be able to build your out-of-tree modules
2365 on the target.
2366 </para>
2367 </section>
2368
2369 <section id='incorporating-out-of-tree-modules'>
2370 <title>Incorporating Out-of-Tree Modules</title>
2371
2372 <para>
2373 While it is always preferable to work with sources integrated
2374 into the Linux kernel sources, if you need an external kernel
2375 module, the <filename>hello-mod.bb</filename> recipe is
2376 available as a template from which you can create your
2377 own out-of-tree Linux kernel module recipe.
2378 </para>
2379
2380 <para>
2381 This template recipe is located in the
2382 <filename>poky</filename> Git repository of the
2383 Yocto Project <ulink url='&YOCTO_GIT_URL;'>Source Repository</ulink>
2384 at:
2385 <literallayout class="monospaced">
2386 poky/meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb
2387 </literallayout>
2388 </para>
2389
2390 <para>
2391 To get started, copy this recipe to your layer and give it a
2392 meaningful name (e.g. <filename>mymodule_1.0.bb</filename>).
2393 In the same directory, create a new directory named
2394 <filename>files</filename> where you can store any source files,
2395 patches, or other files necessary for building
2396 the module that do not come with the sources.
2397 Finally, update the recipe as needed for the module.
2398 Typically, you will need to set the following variables:
2399 <itemizedlist>
2400 <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-DESCRIPTION'><filename>DESCRIPTION</filename></ulink>
2401 </para></listitem>
2402 <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-LICENSE'><filename>LICENSE*</filename></ulink>
2403 </para></listitem>
2404 <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
2405 </para></listitem>
2406 <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>
2407 </para></listitem>
2408 </itemizedlist>
2409 </para>
2410
2411 <para>
2412 Depending on the build system used by the module sources,
2413 you might need to make some adjustments.
2414 For example, a typical module <filename>Makefile</filename>
2415 looks much like the one provided with the
2416 <filename>hello-mod</filename> template:
2417 <literallayout class='monospaced'>
2418 obj-m := hello.o
2419
2420 SRC := $(shell pwd)
2421
2422 all:
2423 $(MAKE) -C $(KERNEL_SRC) M=$(SRC)
2424
2425 modules_install:
2426 $(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install
2427 ...
2428 </literallayout>
2429 </para>
2430
2431 <para>
2432 The important point to note here is the
2433 <ulink url='&YOCTO_DOCS_REF_URL;#var-KERNEL_SRC'><filename>KERNEL_SRC</filename></ulink>
2434 variable.
2435 The
2436 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-module'><filename>module</filename></ulink>
2437 class sets this variable and the
2438 <ulink url='&YOCTO_DOCS_REF_URL;#var-KERNEL_PATH'><filename>KERNEL_PATH</filename></ulink>
2439 variable to
2440 <filename>${<ulink url='&YOCTO_DOCS_REF_URL;#var-STAGING_KERNEL_DIR'><filename>STAGING_KERNEL_DIR</filename></ulink>}</filename>
2441 with the necessary Linux kernel build information to build
2442 modules.
2443 If your module <filename>Makefile</filename> uses a different
2444 variable, you might want to override the
2445 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-compile'><filename>do_compile</filename></ulink>
2446 step, or create a patch to
2447 the <filename>Makefile</filename> to work with the more typical
2448 <filename>KERNEL_SRC</filename> or
2449 <filename>KERNEL_PATH</filename> variables.
2450 </para>
2451
2452 <para>
2453 After you have prepared your recipe, you will likely want to
2454 include the module in your images.
2455 To do this, see the documentation for the following variables in
2456 the Yocto Project Reference Manual and set one of them
2457 appropriately for your machine configuration file:
2458 <itemizedlist>
2459 <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_ESSENTIAL_EXTRA_RDEPENDS'><filename>MACHINE_ESSENTIAL_EXTRA_RDEPENDS</filename></ulink>
2460 </para></listitem>
2461 <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS'><filename>MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS</filename></ulink>
2462 </para></listitem>
2463 <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_EXTRA_RDEPENDS'><filename>MACHINE_EXTRA_RDEPENDS</filename></ulink>
2464 </para></listitem>
2465 <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_EXTRA_RRECOMMENDS'><filename>MACHINE_EXTRA_RRECOMMENDS</filename></ulink>
2466 </para></listitem>
2467 </itemizedlist>
2468 </para>
2469
2470 <para>
2471 Modules are often not required for boot and can be excluded from
2472 certain build configurations.
2473 The following allows for the most flexibility:
2474 <literallayout class='monospaced'>
2475 MACHINE_EXTRA_RRECOMMENDS += "kernel-module-mymodule"
2476 </literallayout>
2477 The value is derived by appending the module filename without
2478 the <filename>.ko</filename> extension to the string
2479 "kernel-module-".
2480 </para>
2481
2482 <para>
2483 Because the variable is
2484 <ulink url='&YOCTO_DOCS_REF_URL;#var-RRECOMMENDS'><filename>RRECOMMENDS</filename></ulink>
2485 and not a
2486 <ulink url='&YOCTO_DOCS_REF_URL;#var-RDEPENDS'><filename>RDEPENDS</filename></ulink>
2487 variable, the build will not fail if this module is not
2488 available to include in the image.
2489 </para>
2490 </section>
2491 </section>
2492
2493
2494 <section id='inspecting-changes-and-commits'>
2495 <title>Inspecting Changes and Commits</title>
2496
2497 <para>
2498 A common question when working with a kernel is:
2499 "What changes have been applied to this tree?"
2500 Rather than using "grep" across directories to see what has
2501 changed, you can use Git to inspect or search the kernel tree.
2502 Using Git is an efficient way to see what has changed in the tree.
2503 </para>
2504
2505 <section id='what-changed-in-a-kernel'>
2506 <title>What Changed in a Kernel?</title>
2507
2508 <para>
2509 Following are a few examples that show how to use Git
2510 commands to examine changes.
2511 These examples are by no means the only way to see changes.
2512 <note>
2513 In the following examples, unless you provide a commit
2514 range, <filename>kernel.org</filename> history is blended
2515 with Yocto Project kernel changes.
2516 You can form ranges by using branch names from the
2517 kernel tree as the upper and lower commit markers with
2518 the Git commands.
2519 You can see the branch names through the web interface
2520 to the Yocto Project source repositories at
2521 <ulink url='&YOCTO_GIT_URL;'></ulink>.
2522 </note>
2523 To see a full range of the changes, use the
2524 <filename>git whatchanged</filename> command and specify a
2525 commit range for the branch
2526 (<replaceable>commit</replaceable><filename>..</filename><replaceable>commit</replaceable>).
2527 </para>
2528
2529 <para>
2530 Here is an example that looks at what has changed in the
2531 <filename>emenlow</filename> branch of the
2532 <filename>linux-yocto-3.19</filename> kernel.
2533 The lower commit range is the commit associated with the
2534 <filename>standard/base</filename> branch, while
2535 the upper commit range is the commit associated with the
2536 <filename>standard/emenlow</filename> branch.
2537 <literallayout class='monospaced'>
2538 $ git whatchanged origin/standard/base..origin/standard/emenlow
2539 </literallayout>
2540 </para>
2541
2542 <para>
2543 To see short, one line summaries of changes use the
2544 <filename>git log</filename> command:
2545 <literallayout class='monospaced'>
2546 $ git log --oneline origin/standard/base..origin/standard/emenlow
2547 </literallayout>
2548 </para>
2549
2550 <para>
2551 Use this command to see code differences for the changes:
2552 <literallayout class='monospaced'>
2553 $ git diff origin/standard/base..origin/standard/emenlow
2554 </literallayout>
2555 </para>
2556
2557 <para>
2558 Use this command to see the commit log messages and the
2559 text differences:
2560 <literallayout class='monospaced'>
2561 $ git show origin/standard/base..origin/standard/emenlow
2562 </literallayout>
2563 </para>
2564
2565 <para>
2566 Use this command to create individual patches for
2567 each change.
2568 Here is an example that that creates patch files for each
2569 commit and places them in your <filename>Documents</filename>
2570 directory:
2571 <literallayout class='monospaced'>
2572 $ git format-patch -o $HOME/Documents origin/standard/base..origin/standard/emenlow
2573 </literallayout>
2574 </para>
2575 </section>
2576
2577 <section id='showing-a-particular-feature-or-branch-change'>
2578 <title>Showing a Particular Feature or Branch Change</title>
2579
2580 <para>
2581 Tags in the Yocto Project kernel tree divide changes for
2582 significant features or branches.
2583 The <filename>git show</filename>&nbsp;<replaceable>tag</replaceable>
2584 command shows changes based on a tag.
2585 Here is an example that shows <filename>systemtap</filename>
2586 changes:
2587 <literallayout class='monospaced'>
2588 $ git show systemtap
2589 </literallayout>
2590 You can use the
2591 <filename>git branch --contains</filename>&nbsp;<replaceable>tag</replaceable>
2592 command to show the branches that contain a particular feature.
2593 This command shows the branches that contain the
2594 <filename>systemtap</filename> feature:
2595 <literallayout class='monospaced'>
2596 $ git branch --contains systemtap
2597 </literallayout>
2598 </para>
2599 </section>
2600 </section>
2601
2602 <section id='adding-recipe-space-kernel-features'>
2603 <title>Adding Recipe-Space Kernel Features</title>
2604
2605 <para>
2606 You can add kernel features in the
2607 <link linkend='recipe-space-metadata'>recipe-space</link> by
2608 using the
2609 <ulink url='&YOCTO_DOCS_REF_URL;#var-KERNEL_FEATURES'><filename>KERNEL_FEATURES</filename></ulink>
2610 variable and by specifying the feature's <filename>.scc</filename>
2611 file path in the
2612 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
2613 statement.
2614 When you add features using this method, the OpenEmbedded build
2615 system checks to be sure the features are present.
2616 If the features are not present, the build stops.
2617 Kernel features are the last elements processed for configuring
2618 and patching the kernel.
2619 Therefore, adding features in this manner is a way
2620 to enforce specific features are present and enabled
2621 without needing to do a full audit of any other layer's additions
2622 to the <filename>SRC_URI</filename> statement.
2623 </para>
2624
2625 <para>
2626 You add a kernel feature by providing the feature as part of the
2627 <filename>KERNEL_FEATURES</filename> variable and by providing the
2628 path to the feature's <filename>.scc</filename> file, which is
2629 relative to the root of the kernel Metadata.
2630 The OpenEmbedded build system searches all forms of kernel
2631 Metadata on the <filename>SRC_URI</filename> statement regardless
2632 of whether the Metadata is in the "kernel-cache", system kernel
2633 Metadata, or a recipe-space Metadata (i.e. part of the kernel
2634 recipe).
2635 See the
2636 "<link linkend='kernel-metadata-location'>Kernel Metadata Location</link>"
2637 section for additional information.
2638 </para>
2639
2640 <para>
2641 When you specify the feature's <filename>.scc</filename> file
2642 on the <filename>SRC_URI</filename> statement, the OpenEmbedded
2643 build system adds the directory of that
2644 <filename>.scc</filename> file along with all its subdirectories
2645 to the kernel feature search path.
2646 Because subdirectories are searched, you can reference a single
2647 <filename>.scc</filename> file in the
2648 <filename>SRC_URI</filename> statement to reference multiple kernel
2649 features.
2650 </para>
2651
2652 <para>
2653 Consider the following example that adds the "test.scc" feature
2654 to the build.
2655 <orderedlist>
2656 <listitem><para>
2657 <emphasis>Create the Feature File:</emphasis>
2658 Create a <filename>.scc</filename> file and locate it
2659 just as you would any other patch file,
2660 <filename>.cfg</filename> file, or fetcher item
2661 you specify in the <filename>SRC_URI</filename>
2662 statement.
2663 <note><title>Notes</title>
2664 <itemizedlist>
2665 <listitem><para>
2666 You must add the directory of the
2667 <filename>.scc</filename> file to the fetcher's
2668 search path in the same manner as you would
2669 add a <filename>.patch</filename> file.
2670 </para></listitem>
2671 <listitem><para>
2672 You can create additional
2673 <filename>.scc</filename> files beneath the
2674 directory that contains the file you are
2675 adding.
2676 All subdirectories are searched during the
2677 build as potential feature directories.
2678 </para></listitem>
2679 </itemizedlist>
2680 </note>
2681 Continuing with the example, suppose the "test.scc"
2682 feature you are adding has a
2683 <filename>test.scc</filename> file in the following
2684 directory:
2685 <literallayout class='monospaced'>
2686 <replaceable>my_recipe</replaceable>
2687 |
2688 +-linux-yocto
2689 |
2690 +-test.cfg
2691 +-test.scc
2692 </literallayout>
2693 In this example, the <filename>linux-yocto</filename>
2694 directory has both the feature
2695 <filename>test.scc</filename> file and a similarly
2696 named configuration fragment file
2697 <filename>test.cfg</filename>.
2698 </para></listitem>
2699 <listitem><para>
2700 <emphasis>Add the Feature File to <filename>SRC_URI</filename>:</emphasis>
2701 Add the <filename>.scc</filename> file to the
2702 recipe's <filename>SRC_URI</filename> statement:
2703 <literallayout class='monospaced'>
2704 SRC_URI_append = " file://test.scc"
2705 </literallayout>
2706 The leading space before the path is important as the
2707 path is appended to the existing path.
2708 </para></listitem>
2709 <listitem><para>
2710 <emphasis>Specify the Feature as a Kernel Feature:</emphasis>
2711 Use the <filename>KERNEL_FEATURES</filename> statement
2712 to specify the feature as a kernel feature:
2713 <literallayout class='monospaced'>
2714 KERNEL_FEATURES_append = " test.scc"
2715 </literallayout>
2716 The OpenEmbedded build system processes the kernel feature
2717 when it builds the kernel.
2718 <note>
2719 If other features are contained below "test.scc",
2720 then their directories are relative to the directory
2721 containing the <filename>test.scc</filename> file.
2722 </note>
2723 </para></listitem>
2724 </orderedlist>
2725 </para>
2726 </section>
2727</chapter>
2728<!--
2729vim: expandtab tw=80 ts=4
2730-->
diff --git a/documentation/kernel-dev/kernel-dev-concepts-appx.xml b/documentation/kernel-dev/kernel-dev-concepts-appx.xml
deleted file mode 100644
index bf0c525caf..0000000000
--- a/documentation/kernel-dev/kernel-dev-concepts-appx.xml
+++ /dev/null
@@ -1,622 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<appendix id='kernel-dev-concepts-appx'>
7<title>Advanced Kernel Concepts</title>
8
9 <section id='kernel-big-picture'>
10 <title>Yocto Project Kernel Development and Maintenance</title>
11
12 <para>
13 Kernels available through the Yocto Project (Yocto Linux kernels),
14 like other kernels, are based off the Linux kernel releases from
15 <ulink url='http://www.kernel.org'></ulink>.
16 At the beginning of a major Linux kernel development cycle, the
17 Yocto Project team chooses a Linux kernel based on factors such as
18 release timing, the anticipated release timing of final upstream
19 <filename>kernel.org</filename> versions, and Yocto Project
20 feature requirements.
21 Typically, the Linux kernel chosen is in the final stages of
22 development by the Linux community.
23 In other words, the Linux kernel is in the release candidate
24 or "rc" phase and has yet to reach final release.
25 But, by being in the final stages of external development, the
26 team knows that the <filename>kernel.org</filename> final release
27 will clearly be within the early stages of the Yocto Project
28 development window.
29 </para>
30
31 <para>
32 This balance allows the Yocto Project team to deliver the most
33 up-to-date Yocto Linux kernel possible, while still ensuring that
34 the team has a stable official release for the baseline Linux
35 kernel version.
36 </para>
37
38 <para>
39 As implied earlier, the ultimate source for Yocto Linux kernels
40 are released kernels from <filename>kernel.org</filename>.
41 In addition to a foundational kernel from
42 <filename>kernel.org</filename>, the available Yocto Linux kernels
43 contain a mix of important new mainline developments, non-mainline
44 developments (when no alternative exists), Board Support Package
45 (BSP) developments, and custom features.
46 These additions result in a commercially released Yocto
47 Project Linux kernel that caters to specific embedded designer
48 needs for targeted hardware.
49 </para>
50
51 <para>
52 You can find a web interface to the Yocto Linux kernels in the
53 <ulink url='&YOCTO_DOCS_OM_URL;#source-repositories'>Source Repositories</ulink>
54 at
55 <ulink url='&YOCTO_GIT_URL;'></ulink>.
56 If you look at the interface, you will see to the left a
57 grouping of Git repositories titled "Yocto Linux Kernel".
58 Within this group, you will find several Linux Yocto kernels
59 developed and included with Yocto Project releases:
60 <itemizedlist>
61 <listitem><para>
62 <emphasis><filename>linux-yocto-4.1</filename>:</emphasis>
63 The stable Yocto Project kernel to use with the Yocto
64 Project Release 2.0.
65 This kernel is based on the Linux 4.1 released kernel.
66 </para></listitem>
67 <listitem><para>
68 <emphasis><filename>linux-yocto-4.4</filename>:</emphasis>
69 The stable Yocto Project kernel to use with the Yocto
70 Project Release 2.1.
71 This kernel is based on the Linux 4.4 released kernel.
72 </para></listitem>
73 <listitem><para>
74 <emphasis><filename>linux-yocto-4.6</filename>:</emphasis>
75 A temporary kernel that is not tied to any Yocto Project
76 release.
77 </para></listitem>
78 <listitem><para>
79 <emphasis><filename>linux-yocto-4.8</filename>:</emphasis>
80 The stable yocto Project kernel to use with the Yocto
81 Project Release 2.2.
82 </para></listitem>
83 <listitem><para>
84 <emphasis><filename>linux-yocto-4.9</filename>:</emphasis>
85 The stable Yocto Project kernel to use with the Yocto
86 Project Release 2.3.
87 This kernel is based on the Linux 4.9 released kernel.
88 </para></listitem>
89 <listitem><para>
90 <emphasis><filename>linux-yocto-4.10</filename>:</emphasis>
91 The default stable Yocto Project kernel to use with the
92 Yocto Project Release 2.3.
93 This kernel is based on the Linux 4.10 released kernel.
94 </para></listitem>
95 <listitem><para>
96 <emphasis><filename>linux-yocto-4.12</filename>:</emphasis>
97 The default stable Yocto Project kernel to use with the
98 Yocto Project Release 2.4.
99 This kernel is based on the Linux 4.12 released kernel.
100 </para></listitem>
101 <listitem><para>
102 <emphasis><filename>yocto-kernel-cache</filename>:</emphasis>
103 The <filename>linux-yocto-cache</filename> contains
104 patches and configurations for the linux-yocto kernel
105 tree.
106 This repository is useful when working on the linux-yocto
107 kernel.
108 For more information on this "Advanced Kernel Metadata",
109 see the
110 "<link linkend='kernel-dev-advanced'>Working With Advanced Metadata (<filename>yocto-kernel-cache</filename>)</link>"
111 Chapter.
112 </para></listitem>
113 <listitem><para>
114 <emphasis><filename>linux-yocto-dev</filename>:</emphasis>
115 A development kernel based on the latest upstream release
116 candidate available.
117 </para></listitem>
118 </itemizedlist>
119 <note><title>Notes</title>
120 Long Term Support Initiative (LTSI) for Yocto Linux
121 kernels is as follows:
122 <itemizedlist>
123 <listitem><para>
124 For Yocto Project releases 1.7, 1.8, and 2.0,
125 the LTSI kernel is
126 <filename>linux-yocto-3.14</filename>.
127 </para></listitem>
128 <listitem><para>
129 For Yocto Project releases 2.1, 2.2, and 2.3,
130 the LTSI kernel is <filename>linux-yocto-4.1</filename>.
131 </para></listitem>
132 <listitem><para>
133 For Yocto Project release 2.4, the LTSI kernel is
134 <filename>linux-yocto-4.9</filename>
135 </para></listitem>
136 <listitem><para>
137 <filename>linux-yocto-4.4</filename> is an LTS
138 kernel.
139 </para></listitem>
140 </itemizedlist>
141 </note>
142 </para>
143
144 <para>
145 Once a Yocto Linux kernel is officially released, the Yocto
146 Project team goes into their next development cycle, or upward
147 revision (uprev) cycle, while still continuing maintenance on the
148 released kernel.
149 It is important to note that the most sustainable and stable way
150 to include feature development upstream is through a kernel uprev
151 process.
152 Back-porting hundreds of individual fixes and minor features from
153 various kernel versions is not sustainable and can easily
154 compromise quality.
155 </para>
156
157 <para>
158 During the uprev cycle, the Yocto Project team uses an ongoing
159 analysis of Linux kernel development, BSP support, and release
160 timing to select the best possible <filename>kernel.org</filename>
161 Linux kernel version on which to base subsequent Yocto Linux
162 kernel development.
163 The team continually monitors Linux community kernel development
164 to look for significant features of interest.
165 The team does consider back-porting large features if they have a
166 significant advantage.
167 User or community demand can also trigger a back-port or creation
168 of new functionality in the Yocto Project baseline kernel during
169 the uprev cycle.
170 </para>
171
172 <para>
173 Generally speaking, every new Linux kernel both adds features and
174 introduces new bugs.
175 These consequences are the basic properties of upstream
176 Linux kernel development and are managed by the Yocto Project
177 team's Yocto Linux kernel development strategy.
178 It is the Yocto Project team's policy to not back-port minor
179 features to the released Yocto Linux kernel.
180 They only consider back-porting significant technological
181 jumps &dash; and, that is done after a complete gap analysis.
182 The reason for this policy is that back-porting any small to
183 medium sized change from an evolving Linux kernel can easily
184 create mismatches, incompatibilities and very subtle errors.
185 </para>
186
187 <para>
188 The policies described in this section result in both a stable
189 and a cutting edge Yocto Linux kernel that mixes forward ports of
190 existing Linux kernel features and significant and critical new
191 functionality.
192 Forward porting Linux kernel functionality into the Yocto Linux
193 kernels available through the Yocto Project can be thought of as
194 a "micro uprev."
195 The many "micro uprevs" produce a Yocto Linux kernel version with
196 a mix of important new mainline, non-mainline, BSP developments
197 and feature integrations.
198 This Yocto Linux kernel gives insight into new features and
199 allows focused amounts of testing to be done on the kernel,
200 which prevents surprises when selecting the next major uprev.
201 The quality of these cutting edge Yocto Linux kernels is evolving
202 and the kernels are used in leading edge feature and BSP
203 development.
204 </para>
205 </section>
206
207 <section id='yocto-linux-kernel-architecture-and-branching-strategies'>
208 <title>Yocto Linux Kernel Architecture and Branching Strategies</title>
209
210 <para>
211 As mentioned earlier, a key goal of the Yocto Project is
212 to present the developer with a kernel that has a clear and
213 continuous history that is visible to the user.
214 The architecture and mechanisms, in particular the branching
215 strategies, used achieve that goal in a manner similar to
216 upstream Linux kernel development in
217 <filename>kernel.org</filename>.
218 </para>
219
220 <para>
221 You can think of a Yocto Linux kernel as consisting of a
222 baseline Linux kernel with added features logically structured
223 on top of the baseline.
224 The features are tagged and organized by way of a branching
225 strategy implemented by the Yocto Project team using the
226 Source Code Manager (SCM) Git.
227 <note><title>Notes</title>
228 <itemizedlist>
229 <listitem><para>
230 Git is the obvious SCM for meeting the Yocto Linux
231 kernel organizational and structural goals described
232 in this section.
233 Not only is Git the SCM for Linux kernel development in
234 <filename>kernel.org</filename> but, Git continues to
235 grow in popularity and supports many different work
236 flows, front-ends and management techniques.
237 </para></listitem>
238 <listitem><para>
239 You can find documentation on Git at
240 <ulink url='http://git-scm.com/documentation'></ulink>.
241 You can also get an introduction to Git as it
242 applies to the Yocto Project in the
243 "<ulink url='&YOCTO_DOCS_OM_URL;#git'>Git</ulink>"
244 section in the Yocto Project Overview and Concepts
245 Manual.
246 The latter reference provides an overview of
247 Git and presents a minimal set of Git commands
248 that allows you to be functional using Git.
249 You can use as much, or as little, of what Git
250 has to offer to accomplish what you need for your
251 project.
252 You do not have to be a "Git Expert" in order to
253 use it with the Yocto Project.
254 </para></listitem>
255 </itemizedlist>
256 </note>
257 </para>
258
259 <para>
260 Using Git's tagging and branching features, the Yocto Project
261 team creates kernel branches at points where functionality is
262 no longer shared and thus, needs to be isolated.
263 For example, board-specific incompatibilities would require
264 different functionality and would require a branch to
265 separate the features.
266 Likewise, for specific kernel features, the same branching
267 strategy is used.
268 </para>
269
270 <para>
271 This "tree-like" architecture results in a structure that has
272 features organized to be specific for particular functionality,
273 single kernel types, or a subset of kernel types.
274 Thus, the user has the ability to see the added features and the
275 commits that make up those features.
276 In addition to being able to see added features, the user
277 can also view the history of what made up the baseline
278 Linux kernel.
279 </para>
280
281 <para>
282 Another consequence of this strategy results in not having to
283 store the same feature twice internally in the tree.
284 Rather, the kernel team stores the unique differences required
285 to apply the feature onto the kernel type in question.
286 <note>
287 The Yocto Project team strives to place features in the tree
288 such that features can be shared by all boards and kernel
289 types where possible.
290 However, during development cycles or when large features
291 are merged, the team cannot always follow this practice.
292 In those cases, the team uses isolated branches to merge
293 features.
294 </note>
295 </para>
296
297 <para>
298 BSP-specific code additions are handled in a similar manner to
299 kernel-specific additions.
300 Some BSPs only make sense given certain kernel types.
301 So, for these types, the team creates branches off the end
302 of that kernel type for all of the BSPs that are supported on
303 that kernel type.
304 From the perspective of the tools that create the BSP branch,
305 the BSP is really no different than a feature.
306 Consequently, the same branching strategy applies to BSPs as
307 it does to kernel features.
308 So again, rather than store the BSP twice, the team only
309 stores the unique differences for the BSP across the supported
310 multiple kernels.
311 </para>
312
313 <para>
314 While this strategy can result in a tree with a significant number
315 of branches, it is important to realize that from the developer's
316 point of view, there is a linear path that travels from the
317 baseline <filename>kernel.org</filename>, through a select
318 group of features and ends with their BSP-specific commits.
319 In other words, the divisions of the kernel are transparent and
320 are not relevant to the developer on a day-to-day basis.
321 From the developer's perspective, this path is the "master" branch
322 in Git terms.
323 The developer does not need to be aware of the existence of any
324 other branches at all.
325 Of course, value exists in the having these branches in the tree,
326 should a person decide to explore them.
327 For example, a comparison between two BSPs at either the commit
328 level or at the line-by-line code <filename>diff</filename> level
329 is now a trivial operation.
330 </para>
331
332 <para>
333 The following illustration shows the conceptual Yocto
334 Linux kernel.
335 <imagedata fileref="figures/kernel-architecture-overview.png" width="6in" depth="7in" align="center" scale="100" />
336 </para>
337
338 <para>
339 In the illustration, the "Kernel.org Branch Point" marks the
340 specific spot (or Linux kernel release) from which the
341 Yocto Linux kernel is created.
342 From this point forward in the tree, features and differences
343 are organized and tagged.
344 </para>
345
346 <para>
347 The "Yocto Project Baseline Kernel" contains functionality that
348 is common to every kernel type and BSP that is organized
349 further along in the tree.
350 Placing these common features in the tree this way means
351 features do not have to be duplicated along individual
352 branches of the tree structure.
353 </para>
354
355 <para>
356 From the "Yocto Project Baseline Kernel", branch points represent
357 specific functionality for individual Board Support Packages
358 (BSPs) as well as real-time kernels.
359 The illustration represents this through three BSP-specific
360 branches and a real-time kernel branch.
361 Each branch represents some unique functionality for the BSP
362 or for a real-time Yocto Linux kernel.
363 </para>
364
365 <para>
366 In this example structure, the "Real-time (rt) Kernel" branch has
367 common features for all real-time Yocto Linux kernels and
368 contains more branches for individual BSP-specific real-time
369 kernels.
370 The illustration shows three branches as an example.
371 Each branch points the way to specific, unique features for a
372 respective real-time kernel as they apply to a given BSP.
373 </para>
374
375 <para>
376 The resulting tree structure presents a clear path of markers
377 (or branches) to the developer that, for all practical
378 purposes, is the Yocto Linux kernel needed for any given set of
379 requirements.
380 <note>
381 Keep in mind the figure does not take into account all the
382 supported Yocto Linux kernels, but rather shows a single
383 generic kernel just for conceptual purposes.
384 Also keep in mind that this structure represents the Yocto
385 Project
386 <ulink url='&YOCTO_DOCS_OM_URL;#source-repositories'>Source Repositories</ulink>
387 that are either pulled from during the build or established
388 on the host development system prior to the build by either
389 cloning a particular kernel's Git repository or by
390 downloading and unpacking a tarball.
391 </note>
392 </para>
393
394 <para>
395 Working with the kernel as a structured tree follows recognized
396 community best practices.
397 In particular, the kernel as shipped with the product, should be
398 considered an "upstream source" and viewed as a series of
399 historical and documented modifications (commits).
400 These modifications represent the development and stabilization
401 done by the Yocto Project kernel development team.
402 </para>
403
404 <para>
405 Because commits only change at significant release points in the
406 product life cycle, developers can work on a branch created
407 from the last relevant commit in the shipped Yocto Project Linux
408 kernel.
409 As mentioned previously, the structure is transparent to the
410 developer because the kernel tree is left in this state after
411 cloning and building the kernel.
412 </para>
413 </section>
414
415 <section id='kernel-build-file-hierarchy'>
416 <title>Kernel Build File Hierarchy</title>
417
418 <para>
419 Upstream storage of all the available kernel source code is
420 one thing, while representing and using the code on your host
421 development system is another.
422 Conceptually, you can think of the kernel source repositories
423 as all the source files necessary for all the supported
424 Yocto Linux kernels.
425 As a developer, you are just interested in the source files
426 for the kernel on which you are working.
427 And, furthermore, you need them available on your host system.
428 </para>
429
430 <para>
431 Kernel source code is available on your host system several
432 different ways:
433 <itemizedlist>
434 <listitem><para>
435 <emphasis>Files Accessed While using <filename>devtool</filename>:</emphasis>
436 <filename>devtool</filename>, which is available with the
437 Yocto Project, is the preferred method by which to
438 modify the kernel.
439 See the
440 "<link linkend='kernel-modification-workflow'>Kernel Modification Workflow</link>"
441 section.
442 </para></listitem>
443 <listitem><para>
444 <emphasis>Cloned Repository:</emphasis>
445 If you are working in the kernel all the time, you probably
446 would want to set up your own local Git repository of the
447 Yocto Linux kernel tree.
448 For information on how to clone a Yocto Linux kernel
449 Git repository, see the
450 "<link linkend='preparing-the-build-host-to-work-on-the-kernel'>Preparing the Build Host to Work on the Kernel</link>"
451 section.
452 </para></listitem>
453 <listitem><para>
454 <emphasis>Temporary Source Files from a Build:</emphasis>
455 If you just need to make some patches to the kernel using
456 a traditional BitBake workflow (i.e. not using the
457 <filename>devtool</filename>), you can access temporary
458 kernel source files that were extracted and used during
459 a kernel build.
460 </para></listitem>
461 </itemizedlist>
462 </para>
463
464 <para>
465 The temporary kernel source files resulting from a build using
466 BitBake have a particular hierarchy.
467 When you build the kernel on your development system, all files
468 needed for the build are taken from the source repositories
469 pointed to by the
470 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
471 variable and gathered in a temporary work area where they are
472 subsequently used to create the unique kernel.
473 Thus, in a sense, the process constructs a local source tree
474 specific to your kernel from which to generate the new kernel
475 image.
476 </para>
477
478 <para>
479 The following figure shows the temporary file structure
480 created on your host system when you build the kernel using
481 Bitbake.
482 This
483 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
484 contains all the source files used during the build.
485 <imagedata fileref="figures/kernel-overview-2-generic.png"
486 width="6in" depth="5in" align="center" scale="100" />
487 </para>
488
489 <para>
490 Again, for additional information on the Yocto Project kernel's
491 architecture and its branching strategy, see the
492 "<link linkend='yocto-linux-kernel-architecture-and-branching-strategies'>Yocto Linux Kernel Architecture and Branching Strategies</link>"
493 section.
494 You can also reference the
495 "<link linkend='using-devtool-to-patch-the-kernel'>Using <filename>devtool</filename> to Patch the Kernel</link>"
496 and
497 "<link linkend='using-traditional-kernel-development-to-patch-the-kernel'>Using Traditional Kernel Development to Patch the Kernel</link>"
498 sections for detailed example that modifies the kernel.
499 </para>
500 </section>
501
502 <section id='determining-hardware-and-non-hardware-features-for-the-kernel-configuration-audit-phase'>
503 <title>Determining Hardware and Non-Hardware Features for the Kernel Configuration Audit Phase</title>
504
505 <para>
506 This section describes part of the kernel configuration audit
507 phase that most developers can ignore.
508 For general information on kernel configuration including
509 <filename>menuconfig</filename>, <filename>defconfig</filename>
510 files, and configuration fragments, see the
511 "<link linkend='configuring-the-kernel'>Configuring the Kernel</link>"
512 section.
513 </para>
514
515 <para>
516 During this part of the audit phase, the contents of the final
517 <filename>.config</filename> file are compared against the
518 fragments specified by the system.
519 These fragments can be system fragments, distro fragments,
520 or user-specified configuration elements.
521 Regardless of their origin, the OpenEmbedded build system
522 warns the user if a specific option is not included in the
523 final kernel configuration.
524 </para>
525
526 <para>
527 By default, in order to not overwhelm the user with
528 configuration warnings, the system only reports missing
529 "hardware" options as they could result in a boot
530 failure or indicate that important hardware is not available.
531 </para>
532
533 <para>
534 To determine whether or not a given option is "hardware" or
535 "non-hardware", the kernel Metadata in
536 <filename>yocto-kernel-cache</filename> contains files that
537 classify individual or groups of options as either hardware
538 or non-hardware.
539 To better show this, consider a situation where the
540 <filename>yocto-kernel-cache</filename> contains the following
541 files:
542 <literallayout class='monospaced'>
543 yocto-kernel-cache/features/drm-psb/hardware.cfg
544 yocto-kernel-cache/features/kgdb/hardware.cfg
545 yocto-kernel-cache/ktypes/base/hardware.cfg
546 yocto-kernel-cache/bsp/mti-malta32/hardware.cfg
547 yocto-kernel-cache/bsp/qemu-ppc32/hardware.cfg
548 yocto-kernel-cache/bsp/qemuarma9/hardware.cfg
549 yocto-kernel-cache/bsp/mti-malta64/hardware.cfg
550 yocto-kernel-cache/bsp/arm-versatile-926ejs/hardware.cfg
551 yocto-kernel-cache/bsp/common-pc/hardware.cfg
552 yocto-kernel-cache/bsp/common-pc-64/hardware.cfg
553 yocto-kernel-cache/features/rfkill/non-hardware.cfg
554 yocto-kernel-cache/ktypes/base/non-hardware.cfg
555 yocto-kernel-cache/features/aufs/non-hardware.kcf
556 yocto-kernel-cache/features/ocf/non-hardware.kcf
557 yocto-kernel-cache/ktypes/base/non-hardware.kcf
558 yocto-kernel-cache/ktypes/base/hardware.kcf
559 yocto-kernel-cache/bsp/qemu-ppc32/hardware.kcf
560 </literallayout>
561 The following list provides explanations for the various
562 files:
563 <itemizedlist>
564 <listitem><para>
565 <filename>hardware.kcf</filename>:
566 Specifies a list of kernel Kconfig files that contain
567 hardware options only.
568 </para></listitem>
569 <listitem><para>
570 <filename>non-hardware.kcf</filename>:
571 Specifies a list of kernel Kconfig files that contain
572 non-hardware options only.
573 </para></listitem>
574 <listitem><para>
575 <filename>hardware.cfg</filename>:
576 Specifies a list of kernel <filename>CONFIG_</filename>
577 options that are hardware, regardless of whether or not
578 they are within a Kconfig file specified by a hardware
579 or non-hardware Kconfig file (i.e.
580 <filename>hardware.kcf</filename> or
581 <filename>non-hardware.kcf</filename>).
582 </para></listitem>
583 <listitem><para>
584 <filename>non-hardware.cfg</filename>:
585 Specifies a list of kernel <filename>CONFIG_</filename>
586 options that are not hardware, regardless of whether or
587 not they are within a Kconfig file specified by a
588 hardware or non-hardware Kconfig file (i.e.
589 <filename>hardware.kcf</filename> or
590 <filename>non-hardware.kcf</filename>).
591 </para></listitem>
592 </itemizedlist>
593 Here is a specific example using the
594 <filename>kernel-cache/bsp/mti-malta32/hardware.cfg</filename>:
595 <literallayout class='monospaced'>
596 CONFIG_SERIAL_8250
597 CONFIG_SERIAL_8250_CONSOLE
598 CONFIG_SERIAL_8250_NR_UARTS
599 CONFIG_SERIAL_8250_PCI
600 CONFIG_SERIAL_CORE
601 CONFIG_SERIAL_CORE_CONSOLE
602 CONFIG_VGA_ARB
603 </literallayout>
604 The kernel configuration audit automatically detects these
605 files (hence the names must be exactly the ones discussed here),
606 and uses them as inputs when generating warnings about the
607 final <filename>.config</filename> file.
608 </para>
609
610 <para>
611 A user-specified kernel Metadata repository, or recipe space
612 feature, can use these same files to classify options that are
613 found within its <filename>.cfg</filename> files as hardware
614 or non-hardware, to prevent the OpenEmbedded build system from
615 producing an error or warning when an option is not in the
616 final <filename>.config</filename> file.
617 </para>
618 </section>
619</appendix>
620<!--
621vim: expandtab tw=80 ts=4
622-->
diff --git a/documentation/kernel-dev/kernel-dev-customization.xsl b/documentation/kernel-dev/kernel-dev-customization.xsl
deleted file mode 100644
index 88bf7c678a..0000000000
--- a/documentation/kernel-dev/kernel-dev-customization.xsl
+++ /dev/null
@@ -1,28 +0,0 @@
1<?xml version='1.0'?>
2<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
3
4<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
5
6 <xsl:import href="http://downloads.yoctoproject.org/mirror/docbook-mirror/docbook-xsl-1.76.1/xhtml/docbook.xsl" />
7
8<!--
9
10 <xsl:import href="../template/1.76.1/docbook-xsl-1.76.1/xhtml/docbook.xsl" />
11
12 <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.76.1/xhtml/docbook.xsl" />
13
14-->
15
16 <xsl:include href="../template/permalinks.xsl"/>
17 <xsl:include href="../template/section.title.xsl"/>
18 <xsl:include href="../template/component.title.xsl"/>
19 <xsl:include href="../template/division.title.xsl"/>
20 <xsl:include href="../template/formal.object.heading.xsl"/>
21
22 <xsl:param name="html.stylesheet" select="'kernel-dev-style.css'" />
23 <xsl:param name="chapter.autolabel" select="1" />
24 <xsl:param name="appendix.autolabel">A</xsl:param>
25 <xsl:param name="section.autolabel" select="1" />
26 <xsl:param name="section.label.includes.component.label" select="1" />
27
28</xsl:stylesheet>
diff --git a/documentation/kernel-dev/kernel-dev-faq.xml b/documentation/kernel-dev/kernel-dev-faq.xml
deleted file mode 100644
index d76f0a4e32..0000000000
--- a/documentation/kernel-dev/kernel-dev-faq.xml
+++ /dev/null
@@ -1,143 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<appendix id='kernel-dev-faq'>
7<title>Kernel Development FAQ</title>
8
9<section id='kernel-dev-faq-section'>
10 <title>Common Questions and Solutions</title>
11
12 <para>
13 The following lists some solutions for common questions.
14
15
16 <qandaset>
17 <qandaentry>
18 <question>
19 <para>
20 How do I use my own Linux kernel <filename>.config</filename>
21 file?
22 </para>
23 </question>
24 <answer>
25 <para>
26 Refer to the "<link linkend='changing-the-configuration'>Changing the Configuration</link>"
27 section for information.
28 </para>
29 </answer>
30 </qandaentry>
31
32 <qandaentry>
33 <question>
34 <para>
35 How do I create configuration fragments?
36 </para>
37 </question>
38 <answer>
39 <para>
40 Refer to the
41 "<link linkend='creating-config-fragments'>Creating Configuration Fragments</link>"
42 section for information.
43 </para>
44 </answer>
45 </qandaentry>
46
47 <qandaentry>
48 <question>
49 <para>
50 How do I use my own Linux kernel sources?
51 </para>
52 </question>
53 <answer>
54 <para>
55 Refer to the "<link linkend='working-with-your-own-sources'>Working With Your Own Sources</link>"
56 section for information.
57 </para>
58 </answer>
59 </qandaentry>
60
61 <qandaentry>
62 <question>
63 <para>
64 How do I install/not-install the kernel image on the rootfs?
65 </para>
66 </question>
67 <answer>
68 <para>
69 The kernel image (e.g. <filename>vmlinuz</filename>) is provided
70 by the <filename>kernel-image</filename> package.
71 Image recipes depend on <filename>kernel-base</filename>.
72 To specify whether or not the kernel
73 image is installed in the generated root filesystem, override
74 <filename>RDEPENDS_kernel-base</filename> to include or not
75 include "kernel-image".</para>
76 <para>See the
77 "<ulink url='&YOCTO_DOCS_DEV_URL;#using-bbappend-files'>Using .bbappend Files in Your Layer</ulink>"
78 section in the Yocto Project Development Tasks Manual
79 for information on how to use an append file to
80 override metadata.
81 </para>
82 </answer>
83 </qandaentry>
84
85 <qandaentry>
86 <question>
87 <para>
88 How do I install a specific kernel module?
89 </para>
90 </question>
91 <answer>
92 <para>
93 Linux kernel modules are packaged individually.
94 To ensure a specific kernel module is included in an image,
95 include it in the appropriate machine
96 <ulink url='&YOCTO_DOCS_REF_URL;#var-RRECOMMENDS'><filename>RRECOMMENDS</filename></ulink>
97 variable.</para>
98 <para>These other variables are useful for installing specific
99 modules:
100 <literallayout class='monospaced'>
101 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_ESSENTIAL_EXTRA_RDEPENDS'><filename>MACHINE_ESSENTIAL_EXTRA_RDEPENDS</filename></ulink>
102 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS'><filename>MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS</filename></ulink>
103 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_EXTRA_RDEPENDS'><filename>MACHINE_EXTRA_RDEPENDS</filename></ulink>
104 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_EXTRA_RRECOMMENDS'><filename>MACHINE_EXTRA_RRECOMMENDS</filename></ulink>
105 </literallayout>
106 For example, set the following in the <filename>qemux86.conf</filename>
107 file to include the <filename>ab123</filename> kernel modules
108 with images built for the <filename>qemux86</filename> machine:
109 <literallayout class='monospaced'>
110 MACHINE_EXTRA_RRECOMMENDS += "kernel-module-ab123"
111 </literallayout>
112 For more information, see the
113 "<link linkend='incorporating-out-of-tree-modules'>Incorporating Out-of-Tree Modules</link>"
114 section.
115 </para>
116 </answer>
117 </qandaentry>
118
119 <qandaentry>
120 <question>
121 <para>
122 How do I change the Linux kernel command line?
123 </para>
124 </question>
125 <answer>
126 <para>
127 The Linux kernel command line is typically specified in
128 the machine config using the <filename>APPEND</filename> variable.
129 For example, you can add some helpful debug information doing
130 the following:
131 <literallayout class='monospaced'>
132 APPEND += "printk.time=y initcall_debug debug"
133 </literallayout>
134 </para>
135 </answer>
136 </qandaentry>
137 </qandaset>
138 </para>
139</section>
140</appendix>
141<!--
142vim: expandtab tw=80 ts=4
143-->
diff --git a/documentation/kernel-dev/kernel-dev-intro.xml b/documentation/kernel-dev/kernel-dev-intro.xml
deleted file mode 100644
index 7c1ea0e510..0000000000
--- a/documentation/kernel-dev/kernel-dev-intro.xml
+++ /dev/null
@@ -1,260 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='kernel-dev-intro'>
7<title>Introduction</title>
8
9<section id='kernel-dev-overview'>
10 <title>Overview</title>
11
12 <para>
13 Regardless of how you intend to make use of the Yocto Project,
14 chances are you will work with the Linux kernel.
15 This manual describes how to set up your build host to support
16 kernel development, introduces the kernel development process,
17 provides background information on the Yocto Linux kernel
18 <ulink url='&YOCTO_DOCS_REF_URL;#metadata'>Metadata</ulink>,
19 describes common tasks you can perform using the kernel tools,
20 shows you how to use the kernel Metadata needed to work with
21 the kernel inside the Yocto Project, and provides insight into how
22 the Yocto Project team develops and maintains Yocto Linux kernel
23 Git repositories and Metadata.
24 </para>
25
26 <para>
27 Each Yocto Project release has a set of Yocto Linux kernel recipes,
28 whose Git repositories you can view in the Yocto
29 <ulink url='&YOCTO_GIT_URL;'>Source Repositories</ulink> under
30 the "Yocto Linux Kernel" heading.
31 New recipes for the release track the latest Linux kernel
32 upstream developments from
33 <ulink url='http://www.kernel.org'></ulink> and introduce
34 newly-supported platforms.
35 Previous recipes in the release are refreshed and supported for at
36 least one additional Yocto Project release.
37 As they align, these previous releases are updated to include the
38 latest from the Long Term Support Initiative (LTSI) project.
39 You can learn more about Yocto Linux kernels and LTSI in the
40 "<link linkend='kernel-big-picture'>Yocto Project Kernel Development and Maintenance</link>"
41 section.
42 </para>
43
44 <para>
45 Also included is a Yocto Linux kernel development recipe
46 (<filename>linux-yocto-dev.bb</filename>) should you want to work
47 with the very latest in upstream Yocto Linux kernel development and
48 kernel Metadata development.
49 <note>
50 For more on Yocto Linux kernels, see the
51 "<link linkend='kernel-big-picture'>Yocto Project Kernel Development and Maintenance</link>
52 section.
53 </note>
54 </para>
55
56 <para>
57 The Yocto Project also provides a powerful set of kernel
58 tools for managing Yocto Linux kernel sources and configuration data.
59 You can use these tools to make a single configuration change,
60 apply multiple patches, or work with your own kernel sources.
61 </para>
62
63 <para>
64 In particular, the kernel tools allow you to generate configuration
65 fragments that specify only what you must, and nothing more.
66 Configuration fragments only need to contain the highest level
67 visible <filename>CONFIG</filename> options as presented by the
68 Yocto Linux kernel <filename>menuconfig</filename> system.
69 Contrast this against a complete Yocto Linux kernel
70 <filename>.config</filename> file, which includes all the automatically
71 selected <filename>CONFIG</filename> options.
72 This efficiency reduces your maintenance effort and allows you
73 to further separate your configuration in ways that make sense for
74 your project.
75 A common split separates policy and hardware.
76 For example, all your kernels might support the
77 <filename>proc</filename> and <filename>sys</filename> filesystems,
78 but only specific boards require sound, USB, or specific drivers.
79 Specifying these configurations individually allows you to aggregate
80 them together as needed, but maintains them in only one place.
81 Similar logic applies to separating source changes.
82 </para>
83
84 <para>
85 If you do not maintain your own kernel sources and need to make
86 only minimal changes to the sources, the released recipes provide a
87 vetted base upon which to layer your changes.
88 Doing so allows you to benefit from the continual kernel
89 integration and testing performed during development of the
90 Yocto Project.
91 </para>
92
93 <para>
94 If, instead, you have a very specific Linux kernel source tree
95 and are unable to align with one of the official Yocto Linux kernel
96 recipes, an alternative exists by which you can use the Yocto
97 Project Linux kernel tools with your own kernel sources.
98 </para>
99
100 <para>
101 The remainder of this manual provides instructions for completing
102 specific Linux kernel development tasks.
103 These instructions assume you are comfortable working with
104 <ulink url='http://openembedded.org/wiki/Bitbake'>BitBake</ulink>
105 recipes and basic open-source development tools.
106 Understanding these concepts will facilitate the process of working
107 with the kernel recipes.
108 If you find you need some additional background, please be sure to
109 review and understand the following documentation:
110 <itemizedlist>
111 <listitem><para>
112 <ulink url='&YOCTO_DOCS_BRIEF_URL;'>Yocto Project Quick Build</ulink>
113 document.
114 </para></listitem>
115 <listitem><para>
116 <ulink url='&YOCTO_DOCS_OM_URL;'>Yocto Project Overview and Concepts Manual</ulink>.
117 </para></listitem>
118 <listitem><para>
119 <ulink url='&YOCTO_DOCS_SDK_URL;#using-devtool-in-your-sdk-workflow'><filename>devtool</filename> workflow</ulink>
120 as described in the Yocto Project Application Development and
121 the Extensible Software Development Kit (eSDK) manual.
122 </para></listitem>
123 <listitem><para>
124 The
125 "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
126 section in the Yocto Project Development Tasks Manual.
127 </para></listitem>
128 <listitem><para>
129 The
130 "<link linkend='kernel-modification-workflow'>Kernel Modification Workflow</link>"
131 section.
132 </para></listitem>
133 </itemizedlist>
134 </para>
135</section>
136
137<section id='kernel-modification-workflow'>
138 <title>Kernel Modification Workflow</title>
139
140 <para>
141 Kernel modification involves changing the Yocto Project kernel,
142 which could involve changing configuration options as well as adding
143 new kernel recipes.
144 Configuration changes can be added in the form of configuration
145 fragments, while recipe modification comes through the kernel's
146 <filename>recipes-kernel</filename> area in a kernel layer you create.
147 </para>
148
149 <para>
150 This section presents a high-level overview of the Yocto Project
151 kernel modification workflow.
152 The illustration and accompanying list provide general information
153 and references for further information.
154 <imagedata fileref="figures/kernel-dev-flow.png"
155 width="9in" depth="5in" align="center" scalefit="1" />
156 </para>
157
158 <para>
159 <orderedlist>
160 <listitem><para>
161
162
163 <emphasis>Set up Your Host Development System to Support
164 Development Using the Yocto Project</emphasis>:
165 See the
166 "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-manual-start'>Setting Up the Development Host to Use the Yocto Project</ulink>"
167 section in the Yocto Project Development Tasks Manual for
168 options on how to get a build host ready to use the Yocto
169 Project.
170 </para></listitem>
171 <listitem><para>
172 <emphasis>Set Up Your Host Development System for Kernel Development:</emphasis>
173 It is recommended that you use <filename>devtool</filename>
174 and an extensible SDK for kernel development.
175 Alternatively, you can use traditional kernel development
176 methods with the Yocto Project.
177 Either way, there are steps you need to take to get the
178 development environment ready.</para>
179
180 <para>Using <filename>devtool</filename> and the eSDK requires
181 that you have a clean build of the image and that you are
182 set up with the appropriate eSDK.
183 For more information, see the
184 "<link linkend='getting-ready-to-develop-using-devtool'>Getting Ready to Develop Using <filename>devtool</filename></link>"
185 section.</para>
186
187 <para>Using traditional kernel development requires that you
188 have the kernel source available in an isolated local Git
189 repository.
190 For more information, see the
191 "<link linkend='getting-ready-for-traditional-kernel-development'>Getting Ready for Traditional Kernel Development</link>"
192 section.
193 </para></listitem>
194 <listitem><para>
195 <emphasis>Make Changes to the Kernel Source Code if
196 applicable:</emphasis>
197 Modifying the kernel does not always mean directly
198 changing source files.
199 However, if you have to do this, you make the changes to the
200 files in the eSDK's Build Directory if you are using
201 <filename>devtool</filename>.
202 For more information, see the
203 "<link linkend='using-devtool-to-patch-the-kernel'>Using <filename>devtool</filename> to Patch the Kernel</link>"
204 section.</para>
205
206 <para>If you are using traditional kernel development, you
207 edit the source files in the kernel's local Git repository.
208 For more information, see the
209 "<link linkend='using-traditional-kernel-development-to-patch-the-kernel'>Using Traditional Kernel Development to Patch the Kernel</link>"
210 section.
211 </para></listitem>
212 <listitem><para>
213 <emphasis>Make Kernel Configuration Changes if
214 Applicable:</emphasis>
215 If your situation calls for changing the kernel's
216 configuration, you can use
217 <link linkend='using-menuconfig'><filename>menuconfig</filename></link>,
218 which allows you to interactively develop and test the
219 configuration changes you are making to the kernel.
220 Saving changes you make with <filename>menuconfig</filename>
221 updates the kernel's <filename>.config</filename> file.
222 <note><title>Warning</title>
223 Try to resist the temptation to directly edit an
224 existing <filename>.config</filename> file, which is
225 found in the Build Directory among the source code
226 used for the build.
227 Doing so, can produce unexpected results when the
228 OpenEmbedded build system regenerates the configuration
229 file.
230 </note>
231 Once you are satisfied with the configuration
232 changes made using <filename>menuconfig</filename>
233 and you have saved them, you can directly compare the
234 resulting <filename>.config</filename> file against an
235 existing original and gather those changes into a
236 <link linkend='creating-config-fragments'>configuration fragment file</link>
237 to be referenced from within the kernel's
238 <filename>.bbappend</filename> file.</para>
239
240 <para>Additionally, if you are working in a BSP layer
241 and need to modify the BSP's kernel's configuration,
242 you can use <filename>menuconfig</filename>.
243 </para></listitem>
244 <listitem><para>
245 <emphasis>Rebuild the Kernel Image With Your Changes:</emphasis>
246 Rebuilding the kernel image applies your changes.
247 Depending on your target hardware, you can verify your changes
248 on actual hardware or perhaps QEMU.
249 </para></listitem>
250 </orderedlist>
251 The remainder of this developer's guide covers common tasks typically
252 used during kernel development, advanced Metadata usage, and Yocto Linux
253 kernel maintenance concepts.
254 </para>
255</section>
256
257</chapter>
258<!--
259vim: expandtab tw=80 ts=4
260-->
diff --git a/documentation/kernel-dev/kernel-dev-maint-appx.xml b/documentation/kernel-dev/kernel-dev-maint-appx.xml
deleted file mode 100644
index 3d9c7c66fd..0000000000
--- a/documentation/kernel-dev/kernel-dev-maint-appx.xml
+++ /dev/null
@@ -1,357 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<appendix id='kernel-dev-maint-appx'>
7<title>Kernel Maintenance</title>
8
9 <section id='tree-construction'>
10 <title>Tree Construction</title>
11
12 <para>
13 This section describes construction of the Yocto Project kernel
14 source repositories as accomplished by the Yocto Project team to
15 create Yocto Linux kernel repositories.
16 These kernel repositories are found under the heading "Yocto Linux
17 Kernel" at
18 <ulink url='&YOCTO_GIT_URL;'>&YOCTO_GIT_URL;</ulink>
19 and are shipped as part of a Yocto Project release.
20 The team creates these repositories by compiling and executing the
21 set of feature descriptions for every BSP and feature in the
22 product.
23 Those feature descriptions list all necessary patches,
24 configurations, branches, tags, and feature divisions found in a
25 Yocto Linux kernel.
26 Thus, the Yocto Project Linux kernel repository (or tree) and
27 accompanying Metadata in the
28 <filename>yocto-kernel-cache</filename> are built.
29 </para>
30
31 <para>
32 The existence of these repositories allow you to access and clone a
33 particular Yocto Project Linux kernel repository and use it to
34 build images based on their configurations and features.
35 </para>
36
37 <para>
38 You can find the files used to describe all the valid features and
39 BSPs in the Yocto Project Linux kernel in any clone of the Yocto
40 Project Linux kernel source repository and
41 <filename>yocto-kernel-cache</filename> Git trees.
42 For example, the following commands clone the Yocto Project
43 baseline Linux kernel that branches off
44 <filename>linux.org</filename> version 4.12 and the
45 <filename>yocto-kernel-cache</filename>, which contains stores of
46 kernel Metadata:
47 <literallayout class='monospaced'>
48 $ git clone git://git.yoctoproject.org/linux-yocto-4.12
49 $ git clone git://git.yoctoproject.org/linux-kernel-cache
50 </literallayout>
51 For more information on how to set up a local Git repository of
52 the Yocto Project Linux kernel files, see the
53 "<link linkend='preparing-the-build-host-to-work-on-the-kernel'>Preparing the Build Host to Work on the Kernel</link>"
54 section.
55 </para>
56
57 <para>
58 Once you have cloned the kernel Git repository and the
59 cache of Metadata on your local machine, you can discover the
60 branches that are available in the repository using the following
61 Git command:
62 <literallayout class='monospaced'>
63 $ git branch -a
64 </literallayout>
65 Checking out a branch allows you to work with a particular
66 Yocto Linux kernel.
67 For example, the following commands check out the
68 "standard/beagleboard" branch of the Yocto Linux kernel repository
69 and the "yocto-4.12" branch of the
70 <filename>yocto-kernel-cache</filename> repository:
71 <literallayout class='monospaced'>
72 $ cd ~/linux-yocto-4.12
73 $ git checkout -b my-kernel-4.12 remotes/origin/standard/beagleboard
74 $ cd ~/linux-kernel-cache
75 $ git checkout -b my-4.12-metadata remotes/origin/yocto-4.12
76 </literallayout>
77 <note>
78 Branches in the <filename>yocto-kernel-cache</filename>
79 repository correspond to Yocto Linux kernel versions
80 (e.g. "yocto-4.12", "yocto-4.10", "yocto-4.9", and so forth).
81 </note>
82 Once you have checked out and switched to appropriate branches,
83 you can see a snapshot of all the kernel source files used to
84 used to build that particular Yocto Linux kernel for a
85 particular board.
86 </para>
87
88 <para>
89 To see the features and configurations for a particular Yocto
90 Linux kernel, you need to examine the
91 <filename>yocto-kernel-cache</filename> Git repository.
92 As mentioned, branches in the
93 <filename>yocto-kernel-cache</filename> repository correspond to
94 Yocto Linux kernel versions (e.g. <filename>yocto-4.12</filename>).
95 Branches contain descriptions in the form of
96 <filename>.scc</filename> and <filename>.cfg</filename> files.
97 </para>
98
99 <para>
100 You should realize, however, that browsing your local
101 <filename>yocto-kernel-cache</filename> repository for feature
102 descriptions and patches is not an effective way to determine what
103 is in a particular kernel branch.
104 Instead, you should use Git directly to discover the changes in
105 a branch.
106 Using Git is an efficient and flexible way to inspect changes to
107 the kernel.
108 <note>
109 Ground up reconstruction of the complete kernel tree is an
110 action only taken by the Yocto Project team during an active
111 development cycle.
112 When you create a clone of the kernel Git repository, you are
113 simply making it efficiently available for building and
114 development.
115 </note>
116 </para>
117
118 <para>
119 The following steps describe what happens when the Yocto Project
120 Team constructs the Yocto Project kernel source Git repository
121 (or tree) found at
122 <ulink url='&YOCTO_GIT_URL;'></ulink> given the
123 introduction of a new top-level kernel feature or BSP.
124 The following actions effectively provide the Metadata
125 and create the tree that includes the new feature, patch, or BSP:
126 <orderedlist>
127 <listitem><para>
128 <emphasis>Pass Feature to the OpenEmbedded Build System:</emphasis>
129 A top-level kernel feature is passed to the kernel build
130 subsystem.
131 Normally, this feature is a BSP for a particular kernel
132 type.
133 </para></listitem>
134 <listitem><para>
135 <emphasis>Locate Feature:</emphasis>
136 The file that describes the top-level feature is located
137 by searching these system directories:
138 <itemizedlist>
139 <listitem><para>
140 The in-tree kernel-cache directories, which are
141 located in the
142 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/yocto-kernel-cache/tree/bsp'><filename>yocto-kernel-cache</filename></ulink>
143 repository organized under the "Yocto Linux Kernel"
144 heading in the
145 <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi'>Yocto Project Source Repositories</ulink>.
146 </para></listitem>
147 <listitem><para>
148 Areas pointed to by <filename>SRC_URI</filename>
149 statements found in kernel recipes
150 </para></listitem>
151 </itemizedlist>
152 For a typical build, the target of the search is a
153 feature description in an <filename>.scc</filename> file
154 whose name follows this format (e.g.
155 <filename>beaglebone-standard.scc</filename> and
156 <filename>beaglebone-preempt-rt.scc</filename>):
157 <literallayout class='monospaced'>
158 <replaceable>bsp_root_name</replaceable>-<replaceable>kernel_type</replaceable>.scc
159 </literallayout>
160 </para></listitem>
161 <listitem><para>
162 <emphasis>Expand Feature:</emphasis>
163 Once located, the feature description is either expanded
164 into a simple script of actions, or into an existing
165 equivalent script that is already part of the shipped
166 kernel.
167 </para></listitem>
168 <listitem><para>
169 <emphasis>Append Extra Features:</emphasis>
170 Extra features are appended to the top-level feature
171 description.
172 These features can come from the
173 <ulink url='&YOCTO_DOCS_REF_URL;#var-KERNEL_FEATURES'><filename>KERNEL_FEATURES</filename></ulink>
174 variable in recipes.
175 </para></listitem>
176 <listitem><para>
177 <emphasis>Locate, Expand, and Append Each Feature:</emphasis>
178 Each extra feature is located, expanded and appended to
179 the script as described in step three.
180 </para></listitem>
181 <listitem><para>
182 <emphasis>Execute the Script:</emphasis>
183 The script is executed to produce files
184 <filename>.scc</filename> and <filename>.cfg</filename>
185 files in appropriate directories of the
186 <filename>yocto-kernel-cache</filename> repository.
187 These files are descriptions of all the branches, tags,
188 patches and configurations that need to be applied to the
189 base Git repository to completely create the
190 source (build) branch for the new BSP or feature.
191 </para></listitem>
192 <listitem><para>
193 <emphasis>Clone Base Repository:</emphasis>
194 The base repository is cloned, and the actions
195 listed in the <filename>yocto-kernel-cache</filename>
196 directories are applied to the tree.
197 </para></listitem>
198 <listitem><para>
199 <emphasis>Perform Cleanup:</emphasis>
200 The Git repositories are left with the desired branches
201 checked out and any required branching, patching and
202 tagging has been performed.
203 </para></listitem>
204 </orderedlist>
205 </para>
206
207 <para>
208 The kernel tree and cache are ready for developer consumption to
209 be locally cloned, configured, and built into a Yocto Project
210 kernel specific to some target hardware.
211 <note><title>Notes</title>
212 <itemizedlist>
213 <listitem><para>
214 The generated <filename>yocto-kernel-cache</filename>
215 repository adds to the kernel as shipped with the Yocto
216 Project release.
217 Any add-ons and configuration data are applied to the
218 end of an existing branch.
219 The full repository generation that is found in the
220 official Yocto Project kernel repositories at
221 <ulink url='&YOCTO_GIT_URL;'>http://git.yoctoproject.org</ulink>
222 is the combination of all supported boards and
223 configurations.
224 </para></listitem>
225 <listitem><para>
226 The technique the Yocto Project team uses is flexible
227 and allows for seamless blending of an immutable
228 history with additional patches specific to a
229 deployment.
230 Any additions to the kernel become an integrated part
231 of the branches.
232 </para></listitem>
233 <listitem><para>
234 The full kernel tree that you see on
235 <ulink url='&YOCTO_GIT_URL;'></ulink> is
236 generated through repeating the above steps for all
237 valid BSPs.
238 The end result is a branched, clean history tree that
239 makes up the kernel for a given release.
240 You can see the script (<filename>kgit-scc</filename>)
241 responsible for this in the
242 <ulink url='&YOCTO_GIT_URL;/cgit.cgi/yocto-kernel-tools/tree/tools'><filename>yocto-kernel-tools</filename></ulink>
243 repository.
244 </para></listitem>
245 <listitem><para>
246 The steps used to construct the full kernel tree are
247 the same steps that BitBake uses when it builds a
248 kernel image.
249 </para></listitem>
250 </itemizedlist>
251 </note>
252 </para>
253 </section>
254
255 <section id='build-strategy'>
256 <title>Build Strategy</title>
257
258 <para>
259 Once you have cloned a Yocto Linux kernel repository and the
260 cache repository (<filename>yocto-kernel-cache</filename>) onto
261 your development system, you can consider the compilation phase
262 of kernel development, which is building a kernel image.
263 Some prerequisites exist that are validated by the build process
264 before compilation starts:
265 </para>
266
267 <itemizedlist>
268 <listitem><para>
269 The
270 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
271 points to the kernel Git repository.
272 </para></listitem>
273 <listitem><para>
274 A BSP build branch with Metadata exists in the
275 <filename>yocto-kernel-cache</filename> repository.
276 The branch is based on the Yocto Linux kernel version and
277 has configurations and features grouped under the
278 <filename>yocto-kernel-cache/bsp</filename> directory.
279 For example, features and configurations for the
280 BeagleBone Board assuming a
281 <filename>linux-yocto_4.12</filename> kernel reside in the
282 following area of the <filename>yocto-kernel-cache</filename>
283 repository:
284 <literallayout class='monospaced'>
285 yocto-kernel-cache/bsp/beaglebone
286 </literallayout>
287 <note>
288 In the previous example, the "yocto-4.12" branch is
289 checked out in the <filename>yocto-kernel-cache</filename>
290 repository.
291 </note>
292 </para></listitem>
293 </itemizedlist>
294
295 <para>
296 The OpenEmbedded build system makes sure these conditions exist
297 before attempting compilation.
298 Other means, however, do exist, such as as bootstrapping a BSP.
299 </para>
300
301 <para>
302 Before building a kernel, the build process verifies the tree
303 and configures the kernel by processing all of the
304 configuration "fragments" specified by feature descriptions
305 in the <filename>.scc</filename> files.
306 As the features are compiled, associated kernel configuration
307 fragments are noted and recorded in the series of directories
308 in their compilation order.
309 The fragments are migrated, pre-processed and passed to the
310 Linux Kernel Configuration subsystem (<filename>lkc</filename>) as
311 raw input in the form of a <filename>.config</filename> file.
312 The <filename>lkc</filename> uses its own internal dependency
313 constraints to do the final processing of that information and
314 generates the final <filename>.config</filename> file that is used
315 during compilation.
316 </para>
317
318 <para>
319 Using the board's architecture and other relevant values from
320 the board's template, kernel compilation is started and a kernel
321 image is produced.
322 </para>
323
324 <para>
325 The other thing that you notice once you configure a kernel is that
326 the build process generates a build tree that is separate from
327 your kernel's local Git source repository tree.
328 This build tree has a name that uses the following form, where
329 <filename>${MACHINE}</filename> is the metadata name of the
330 machine (BSP) and "kernel_type" is one of the Yocto Project
331 supported kernel types (e.g. "standard"):
332 <literallayout class='monospaced'>
333 linux-${MACHINE}-<replaceable>kernel_type</replaceable>-build
334 </literallayout>
335 </para>
336
337 <para>
338 The existing support in the <filename>kernel.org</filename> tree
339 achieves this default functionality.
340 </para>
341
342 <para>
343 This behavior means that all the generated files for a particular
344 machine or BSP are now in the build tree directory.
345 The files include the final <filename>.config</filename> file,
346 all the <filename>.o</filename> files, the <filename>.a</filename>
347 files, and so forth.
348 Since each machine or BSP has its own separate
349 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
350 in its own separate branch of the Git repository, you can easily
351 switch between different builds.
352 </para>
353 </section>
354</appendix>
355<!--
356vim: expandtab tw=80 ts=4
357-->
diff --git a/documentation/kernel-dev/kernel-dev-style.css b/documentation/kernel-dev/kernel-dev-style.css
deleted file mode 100644
index fc6fbb8de1..0000000000
--- a/documentation/kernel-dev/kernel-dev-style.css
+++ /dev/null
@@ -1,991 +0,0 @@
1/*
2
3 SPDX-License-Identifier: CC-BY-2.0-UK
4
5 Generic XHTML / DocBook XHTML CSS Stylesheet.
6
7 Browser wrangling and typographic design by
8 Oyvind Kolas / pippin@gimp.org
9
10 Customised for Poky by
11 Matthew Allum / mallum@o-hand.com
12
13 Thanks to:
14 Liam R. E. Quin
15 William Skaggs
16 Jakub Steiner
17
18 Structure
19 ---------
20
21 The stylesheet is divided into the following sections:
22
23 Positioning
24 Margins, paddings, width, font-size, clearing.
25 Decorations
26 Borders, style
27 Colors
28 Colors
29 Graphics
30 Graphical backgrounds
31 Nasty IE tweaks
32 Workarounds needed to make it work in internet explorer,
33 currently makes the stylesheet non validating, but up until
34 this point it is validating.
35 Mozilla extensions
36 Transparency for footer
37 Rounded corners on boxes
38
39*/
40
41
42 /*************** /
43 / Positioning /
44/ ***************/
45
46body {
47 font-family: Verdana, Sans, sans-serif;
48
49 min-width: 640px;
50 width: 80%;
51 margin: 0em auto;
52 padding: 2em 5em 5em 5em;
53 color: #333;
54}
55
56h1,h2,h3,h4,h5,h6,h7 {
57 font-family: Arial, Sans;
58 color: #00557D;
59 clear: both;
60}
61
62h1 {
63 font-size: 2em;
64 text-align: left;
65 padding: 0em 0em 0em 0em;
66 margin: 2em 0em 0em 0em;
67}
68
69h2.subtitle {
70 margin: 0.10em 0em 3.0em 0em;
71 padding: 0em 0em 0em 0em;
72 font-size: 1.8em;
73 padding-left: 20%;
74 font-weight: normal;
75 font-style: italic;
76}
77
78h2 {
79 margin: 2em 0em 0.66em 0em;
80 padding: 0.5em 0em 0em 0em;
81 font-size: 1.5em;
82 font-weight: bold;
83}
84
85h3.subtitle {
86 margin: 0em 0em 1em 0em;
87 padding: 0em 0em 0em 0em;
88 font-size: 142.14%;
89 text-align: right;
90}
91
92h3 {
93 margin: 1em 0em 0.5em 0em;
94 padding: 1em 0em 0em 0em;
95 font-size: 140%;
96 font-weight: bold;
97}
98
99h4 {
100 margin: 1em 0em 0.5em 0em;
101 padding: 1em 0em 0em 0em;
102 font-size: 120%;
103 font-weight: bold;
104}
105
106h5 {
107 margin: 1em 0em 0.5em 0em;
108 padding: 1em 0em 0em 0em;
109 font-size: 110%;
110 font-weight: bold;
111}
112
113h6 {
114 margin: 1em 0em 0em 0em;
115 padding: 1em 0em 0em 0em;
116 font-size: 110%;
117 font-weight: bold;
118}
119
120.authorgroup {
121 background-color: transparent;
122 background-repeat: no-repeat;
123 padding-top: 256px;
124 background-image: url("figures/kernel-dev-title.png");
125 background-position: left top;
126 margin-top: -256px;
127 padding-right: 50px;
128 margin-left: 0px;
129 text-align: right;
130 width: 740px;
131}
132
133h3.author {
134 margin: 0em 0me 0em 0em;
135 padding: 0em 0em 0em 0em;
136 font-weight: normal;
137 font-size: 100%;
138 color: #333;
139 clear: both;
140}
141
142.author tt.email {
143 font-size: 66%;
144}
145
146.titlepage hr {
147 width: 0em;
148 clear: both;
149}
150
151.revhistory {
152 padding-top: 2em;
153 clear: both;
154}
155
156.toc,
157.list-of-tables,
158.list-of-examples,
159.list-of-figures {
160 padding: 1.33em 0em 2.5em 0em;
161 color: #00557D;
162}
163
164.toc p,
165.list-of-tables p,
166.list-of-figures p,
167.list-of-examples p {
168 padding: 0em 0em 0em 0em;
169 padding: 0em 0em 0.3em;
170 margin: 1.5em 0em 0em 0em;
171}
172
173.toc p b,
174.list-of-tables p b,
175.list-of-figures p b,
176.list-of-examples p b{
177 font-size: 100.0%;
178 font-weight: bold;
179}
180
181.toc dl,
182.list-of-tables dl,
183.list-of-figures dl,
184.list-of-examples dl {
185 margin: 0em 0em 0.5em 0em;
186 padding: 0em 0em 0em 0em;
187}
188
189.toc dt {
190 margin: 0em 0em 0em 0em;
191 padding: 0em 0em 0em 0em;
192}
193
194.toc dd {
195 margin: 0em 0em 0em 2.6em;
196 padding: 0em 0em 0em 0em;
197}
198
199div.glossary dl,
200div.variablelist dl {
201}
202
203.glossary dl dt,
204.variablelist dl dt,
205.variablelist dl dt span.term {
206 font-weight: normal;
207 width: 20em;
208 text-align: right;
209}
210
211.variablelist dl dt {
212 margin-top: 0.5em;
213}
214
215.glossary dl dd,
216.variablelist dl dd {
217 margin-top: -1em;
218 margin-left: 25.5em;
219}
220
221.glossary dd p,
222.variablelist dd p {
223 margin-top: 0em;
224 margin-bottom: 1em;
225}
226
227
228div.calloutlist table td {
229 padding: 0em 0em 0em 0em;
230 margin: 0em 0em 0em 0em;
231}
232
233div.calloutlist table td p {
234 margin-top: 0em;
235 margin-bottom: 1em;
236}
237
238div p.copyright {
239 text-align: left;
240}
241
242div.legalnotice p.legalnotice-title {
243 margin-bottom: 0em;
244}
245
246p {
247 line-height: 1.5em;
248 margin-top: 0em;
249
250}
251
252dl {
253 padding-top: 0em;
254}
255
256hr {
257 border: solid 1px;
258}
259
260
261.mediaobject,
262.mediaobjectco {
263 text-align: center;
264}
265
266img {
267 border: none;
268}
269
270ul {
271 padding: 0em 0em 0em 1.5em;
272}
273
274ul li {
275 padding: 0em 0em 0em 0em;
276}
277
278ul li p {
279 text-align: left;
280}
281
282table {
283 width :100%;
284}
285
286th {
287 padding: 0.25em;
288 text-align: left;
289 font-weight: normal;
290 vertical-align: top;
291}
292
293td {
294 padding: 0.25em;
295 vertical-align: top;
296}
297
298p a[id] {
299 margin: 0px;
300 padding: 0px;
301 display: inline;
302 background-image: none;
303}
304
305a {
306 text-decoration: underline;
307 color: #444;
308}
309
310pre {
311 overflow: auto;
312}
313
314a:hover {
315 text-decoration: underline;
316 /*font-weight: bold;*/
317}
318
319/* This style defines how the permalink character
320 appears by itself and when hovered over with
321 the mouse. */
322
323[alt='Permalink'] { color: #eee; }
324[alt='Permalink']:hover { color: black; }
325
326
327div.informalfigure,
328div.informalexample,
329div.informaltable,
330div.figure,
331div.table,
332div.example {
333 margin: 1em 0em;
334 padding: 1em;
335 page-break-inside: avoid;
336}
337
338
339div.informalfigure p.title b,
340div.informalexample p.title b,
341div.informaltable p.title b,
342div.figure p.title b,
343div.example p.title b,
344div.table p.title b{
345 padding-top: 0em;
346 margin-top: 0em;
347 font-size: 100%;
348 font-weight: normal;
349}
350
351.mediaobject .caption,
352.mediaobject .caption p {
353 text-align: center;
354 font-size: 80%;
355 padding-top: 0.5em;
356 padding-bottom: 0.5em;
357}
358
359.epigraph {
360 padding-left: 55%;
361 margin-bottom: 1em;
362}
363
364.epigraph p {
365 text-align: left;
366}
367
368.epigraph .quote {
369 font-style: italic;
370}
371.epigraph .attribution {
372 font-style: normal;
373 text-align: right;
374}
375
376span.application {
377 font-style: italic;
378}
379
380.programlisting {
381 font-family: monospace;
382 font-size: 80%;
383 white-space: pre;
384 margin: 1.33em 0em;
385 padding: 1.33em;
386}
387
388.tip,
389.warning,
390.caution,
391.note {
392 margin-top: 1em;
393 margin-bottom: 1em;
394
395}
396
397/* force full width of table within div */
398.tip table,
399.warning table,
400.caution table,
401.note table {
402 border: none;
403 width: 100%;
404}
405
406
407.tip table th,
408.warning table th,
409.caution table th,
410.note table th {
411 padding: 0.8em 0.0em 0.0em 0.0em;
412 margin : 0em 0em 0em 0em;
413}
414
415.tip p,
416.warning p,
417.caution p,
418.note p {
419 margin-top: 0.5em;
420 margin-bottom: 0.5em;
421 padding-right: 1em;
422 text-align: left;
423}
424
425.acronym {
426 text-transform: uppercase;
427}
428
429b.keycap,
430.keycap {
431 padding: 0.09em 0.3em;
432 margin: 0em;
433}
434
435.itemizedlist li {
436 clear: none;
437}
438
439.filename {
440 font-size: medium;
441 font-family: Courier, monospace;
442}
443
444
445div.navheader, div.heading{
446 position: absolute;
447 left: 0em;
448 top: 0em;
449 width: 100%;
450 background-color: #cdf;
451 width: 100%;
452}
453
454div.navfooter, div.footing{
455 position: fixed;
456 left: 0em;
457 bottom: 0em;
458 background-color: #eee;
459 width: 100%;
460}
461
462
463div.navheader td,
464div.navfooter td {
465 font-size: 66%;
466}
467
468div.navheader table th {
469 /*font-family: Georgia, Times, serif;*/
470 /*font-size: x-large;*/
471 font-size: 80%;
472}
473
474div.navheader table {
475 border-left: 0em;
476 border-right: 0em;
477 border-top: 0em;
478 width: 100%;
479}
480
481div.navfooter table {
482 border-left: 0em;
483 border-right: 0em;
484 border-bottom: 0em;
485 width: 100%;
486}
487
488div.navheader table td a,
489div.navfooter table td a {
490 color: #777;
491 text-decoration: none;
492}
493
494/* normal text in the footer */
495div.navfooter table td {
496 color: black;
497}
498
499div.navheader table td a:visited,
500div.navfooter table td a:visited {
501 color: #444;
502}
503
504
505/* links in header and footer */
506div.navheader table td a:hover,
507div.navfooter table td a:hover {
508 text-decoration: underline;
509 background-color: transparent;
510 color: #33a;
511}
512
513div.navheader hr,
514div.navfooter hr {
515 display: none;
516}
517
518
519.qandaset tr.question td p {
520 margin: 0em 0em 1em 0em;
521 padding: 0em 0em 0em 0em;
522}
523
524.qandaset tr.answer td p {
525 margin: 0em 0em 1em 0em;
526 padding: 0em 0em 0em 0em;
527}
528.answer td {
529 padding-bottom: 1.5em;
530}
531
532.emphasis {
533 font-weight: bold;
534}
535
536
537 /************* /
538 / decorations /
539/ *************/
540
541.titlepage {
542}
543
544.part .title {
545}
546
547.subtitle {
548 border: none;
549}
550
551/*
552h1 {
553 border: none;
554}
555
556h2 {
557 border-top: solid 0.2em;
558 border-bottom: solid 0.06em;
559}
560
561h3 {
562 border-top: 0em;
563 border-bottom: solid 0.06em;
564}
565
566h4 {
567 border: 0em;
568 border-bottom: solid 0.06em;
569}
570
571h5 {
572 border: 0em;
573}
574*/
575
576.programlisting {
577 border: solid 1px;
578}
579
580div.figure,
581div.table,
582div.informalfigure,
583div.informaltable,
584div.informalexample,
585div.example {
586 border: 1px solid;
587}
588
589
590
591.tip,
592.warning,
593.caution,
594.note {
595 border: 1px solid;
596}
597
598.tip table th,
599.warning table th,
600.caution table th,
601.note table th {
602 border-bottom: 1px solid;
603}
604
605.question td {
606 border-top: 1px solid black;
607}
608
609.answer {
610}
611
612
613b.keycap,
614.keycap {
615 border: 1px solid;
616}
617
618
619div.navheader, div.heading{
620 border-bottom: 1px solid;
621}
622
623
624div.navfooter, div.footing{
625 border-top: 1px solid;
626}
627
628 /********* /
629 / colors /
630/ *********/
631
632body {
633 color: #333;
634 background: white;
635}
636
637a {
638 background: transparent;
639}
640
641a:hover {
642 background-color: #dedede;
643}
644
645
646h1,
647h2,
648h3,
649h4,
650h5,
651h6,
652h7,
653h8 {
654 background-color: transparent;
655}
656
657hr {
658 border-color: #aaa;
659}
660
661
662.tip, .warning, .caution, .note {
663 border-color: #fff;
664}
665
666
667.tip table th,
668.warning table th,
669.caution table th,
670.note table th {
671 border-bottom-color: #fff;
672}
673
674
675.warning {
676 background-color: #f0f0f2;
677}
678
679.caution {
680 background-color: #f0f0f2;
681}
682
683.tip {
684 background-color: #f0f0f2;
685}
686
687.note {
688 background-color: #f0f0f2;
689}
690
691.glossary dl dt,
692.variablelist dl dt,
693.variablelist dl dt span.term {
694 color: #044;
695}
696
697div.figure,
698div.table,
699div.example,
700div.informalfigure,
701div.informaltable,
702div.informalexample {
703 border-color: #aaa;
704}
705
706pre.programlisting {
707 color: black;
708 background-color: #fff;
709 border-color: #aaa;
710 border-width: 2px;
711}
712
713.guimenu,
714.guilabel,
715.guimenuitem {
716 background-color: #eee;
717}
718
719
720b.keycap,
721.keycap {
722 background-color: #eee;
723 border-color: #999;
724}
725
726
727div.navheader {
728 border-color: black;
729}
730
731
732div.navfooter {
733 border-color: black;
734}
735
736.writernotes {
737 color: red;
738}
739
740
741 /*********** /
742 / graphics /
743/ ***********/
744
745/*
746body {
747 background-image: url("images/body_bg.jpg");
748 background-attachment: fixed;
749}
750
751.navheader,
752.note,
753.tip {
754 background-image: url("images/note_bg.jpg");
755 background-attachment: fixed;
756}
757
758.warning,
759.caution {
760 background-image: url("images/warning_bg.jpg");
761 background-attachment: fixed;
762}
763
764.figure,
765.informalfigure,
766.example,
767.informalexample,
768.table,
769.informaltable {
770 background-image: url("images/figure_bg.jpg");
771 background-attachment: fixed;
772}
773
774*/
775h1,
776h2,
777h3,
778h4,
779h5,
780h6,
781h7{
782}
783
784/*
785Example of how to stick an image as part of the title.
786
787div.article .titlepage .title
788{
789 background-image: url("figures/white-on-black.png");
790 background-position: center;
791 background-repeat: repeat-x;
792}
793*/
794
795div.preface .titlepage .title,
796div.colophon .title,
797div.chapter .titlepage .title,
798div.article .titlepage .title
799{
800}
801
802div.section div.section .titlepage .title,
803div.sect2 .titlepage .title {
804 background: none;
805}
806
807
808h1.title {
809 background-color: transparent;
810 background-repeat: no-repeat;
811 height: 256px;
812 text-indent: -9000px;
813 overflow:hidden;
814}
815
816h2.subtitle {
817 background-color: transparent;
818 text-indent: -9000px;
819 overflow:hidden;
820 width: 0px;
821 display: none;
822}
823
824 /*************************************** /
825 / pippin.gimp.org specific alterations /
826/ ***************************************/
827
828/*
829div.heading, div.navheader {
830 color: #777;
831 font-size: 80%;
832 padding: 0;
833 margin: 0;
834 text-align: left;
835 position: absolute;
836 top: 0px;
837 left: 0px;
838 width: 100%;
839 height: 50px;
840 background: url('/gfx/heading_bg.png') transparent;
841 background-repeat: repeat-x;
842 background-attachment: fixed;
843 border: none;
844}
845
846div.heading a {
847 color: #444;
848}
849
850div.footing, div.navfooter {
851 border: none;
852 color: #ddd;
853 font-size: 80%;
854 text-align:right;
855
856 width: 100%;
857 padding-top: 10px;
858 position: absolute;
859 bottom: 0px;
860 left: 0px;
861
862 background: url('/gfx/footing_bg.png') transparent;
863}
864*/
865
866
867
868 /****************** /
869 / nasty ie tweaks /
870/ ******************/
871
872/*
873div.heading, div.navheader {
874 width:expression(document.body.clientWidth + "px");
875}
876
877div.footing, div.navfooter {
878 width:expression(document.body.clientWidth + "px");
879 margin-left:expression("-5em");
880}
881body {
882 padding:expression("4em 5em 0em 5em");
883}
884*/
885
886 /**************************************** /
887 / mozilla vendor specific css extensions /
888/ ****************************************/
889/*
890div.navfooter, div.footing{
891 -moz-opacity: 0.8em;
892}
893
894div.figure,
895div.table,
896div.informalfigure,
897div.informaltable,
898div.informalexample,
899div.example,
900.tip,
901.warning,
902.caution,
903.note {
904 -moz-border-radius: 0.5em;
905}
906
907b.keycap,
908.keycap {
909 -moz-border-radius: 0.3em;
910}
911*/
912
913table tr td table tr td {
914 display: none;
915}
916
917
918hr {
919 display: none;
920}
921
922table {
923 border: 0em;
924}
925
926 .photo {
927 float: right;
928 margin-left: 1.5em;
929 margin-bottom: 1.5em;
930 margin-top: 0em;
931 max-width: 17em;
932 border: 1px solid gray;
933 padding: 3px;
934 background: white;
935}
936 .seperator {
937 padding-top: 2em;
938 clear: both;
939 }
940
941 #validators {
942 margin-top: 5em;
943 text-align: right;
944 color: #777;
945 }
946 @media print {
947 body {
948 font-size: 8pt;
949 }
950 .noprint {
951 display: none;
952 }
953 }
954
955
956.tip,
957.note {
958 background: #f0f0f2;
959 color: #333;
960 padding: 20px;
961 margin: 20px;
962}
963
964.tip h3,
965.note h3 {
966 padding: 0em;
967 margin: 0em;
968 font-size: 2em;
969 font-weight: bold;
970 color: #333;
971}
972
973.tip a,
974.note a {
975 color: #333;
976 text-decoration: underline;
977}
978
979.footnote {
980 font-size: small;
981 color: #333;
982}
983
984/* Changes the announcement text */
985.tip h3,
986.warning h3,
987.caution h3,
988.note h3 {
989 font-size:large;
990 color: #00557D;
991}
diff --git a/documentation/kernel-dev/kernel-dev.xml b/documentation/kernel-dev/kernel-dev.xml
deleted file mode 100755
index 887ff836f1..0000000000
--- a/documentation/kernel-dev/kernel-dev.xml
+++ /dev/null
@@ -1,187 +0,0 @@
1<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<book id='kernel-dev' lang='en'
7 xmlns:xi="http://www.w3.org/2003/XInclude"
8 xmlns="http://docbook.org/ns/docbook"
9 >
10 <bookinfo>
11
12 <mediaobject>
13 <imageobject>
14 <imagedata fileref='figures/kernel-dev-title.png'
15 format='SVG'
16 align='left' scalefit='1' width='100%'/>
17 </imageobject>
18 </mediaobject>
19
20 <title>
21 Yocto Project Linux Kernel Development Manual
22 </title>
23
24 <authorgroup>
25 <author>
26 <affiliation>
27 <orgname>&ORGNAME;</orgname>
28 </affiliation>
29 <email>&ORGEMAIL;</email>
30 </author>
31 </authorgroup>
32
33 <revhistory>
34 <revision>
35 <revnumber>1.4</revnumber>
36 <date>April 2013</date>
37 <revremark>The initial document released with the Yocto Project 1.4 Release.</revremark>
38 </revision>
39 <revision>
40 <revnumber>1.5</revnumber>
41 <date>October 2013</date>
42 <revremark>Released with the Yocto Project 1.5 Release.</revremark>
43 </revision>
44 <revision>
45 <revnumber>1.6</revnumber>
46 <date>April 2014</date>
47 <revremark>Released with the Yocto Project 1.6 Release.</revremark>
48 </revision>
49 <revision>
50 <revnumber>1.7</revnumber>
51 <date>October 2014</date>
52 <revremark>Released with the Yocto Project 1.7 Release.</revremark>
53 </revision>
54 <revision>
55 <revnumber>1.8</revnumber>
56 <date>April 2015</date>
57 <revremark>Released with the Yocto Project 1.8 Release.</revremark>
58 </revision>
59 <revision>
60 <revnumber>2.0</revnumber>
61 <date>October 2015</date>
62 <revremark>Released with the Yocto Project 2.0 Release.</revremark>
63 </revision>
64 <revision>
65 <revnumber>2.1</revnumber>
66 <date>April 2016</date>
67 <revremark>Released with the Yocto Project 2.1 Release.</revremark>
68 </revision>
69 <revision>
70 <revnumber>2.2</revnumber>
71 <date>October 2016</date>
72 <revremark>Released with the Yocto Project 2.2 Release.</revremark>
73 </revision>
74 <revision>
75 <revnumber>2.3</revnumber>
76 <date>May 2017</date>
77 <revremark>Released with the Yocto Project 2.3 Release.</revremark>
78 </revision>
79 <revision>
80 <revnumber>2.4</revnumber>
81 <date>October 2017</date>
82 <revremark>Released with the Yocto Project 2.4 Release.</revremark>
83 </revision>
84 <revision>
85 <revnumber>2.5</revnumber>
86 <date>May 2018</date>
87 <revremark>Released with the Yocto Project 2.5 Release.</revremark>
88 </revision>
89 <revision>
90 <revnumber>2.6</revnumber>
91 <date>November 2018</date>
92 <revremark>Released with the Yocto Project 2.6 Release.</revremark>
93 </revision>
94 <revision>
95 <revnumber>2.7</revnumber>
96 <date>May 2019</date>
97 <revremark>Released with the Yocto Project 2.7 Release.</revremark>
98 </revision>
99 <revision>
100 <revnumber>3.0</revnumber>
101 <date>October 2019</date>
102 <revremark>Released with the Yocto Project 3.0 Release.</revremark>
103 </revision>
104 <revision>
105 <revnumber>3.1</revnumber>
106 <date>&REL_MONTH_YEAR;</date>
107 <revremark>Released with the Yocto Project 3.1 Release.</revremark>
108 </revision>
109 </revhistory>
110
111 <copyright>
112 <year>&COPYRIGHT_YEAR;</year>
113 <holder>Linux Foundation</holder>
114 </copyright>
115
116 <legalnotice>
117 <para>
118 Permission is granted to copy, distribute and/or modify this document under
119 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 &amp; Wales</ulink> as published by Creative Commons.
120 </para>
121 <note><title>Manual Notes</title>
122 <itemizedlist>
123 <listitem><para>
124 This version of the
125 <emphasis>Yocto Project Linux Kernel Development Manual</emphasis>
126 is for the &YOCTO_DOC_VERSION; release of the
127 Yocto Project.
128 To be sure you have the latest version of the manual
129 for this release, go to the
130 <ulink url='&YOCTO_DOCS_URL;'>Yocto Project documentation page</ulink>
131 and select the manual from that site.
132 Manuals from the site are more up-to-date than manuals
133 derived from the Yocto Project released TAR files.
134 </para></listitem>
135 <listitem><para>
136 If you located this manual through a web search, the
137 version of the manual might not be the one you want
138 (e.g. the search might have returned a manual much
139 older than the Yocto Project version with which you
140 are working).
141 You can see all Yocto Project major releases by
142 visiting the
143 <ulink url='&YOCTO_WIKI_URL;/wiki/Releases'>Releases</ulink>
144 page.
145 If you need a version of this manual for a different
146 Yocto Project release, visit the
147 <ulink url='&YOCTO_DOCS_URL;'>Yocto Project documentation page</ulink>
148 and select the manual set by using the
149 "ACTIVE RELEASES DOCUMENTATION" or "DOCUMENTS ARCHIVE"
150 pull-down menus.
151 </para></listitem>
152 <listitem>
153 <para>
154 To report any inaccuracies or problems with this
155 (or any other Yocto Project) manual, send an email to
156 the Yocto Project documentation mailing list at
157 <filename>docs@lists.yoctoproject.org</filename> or
158 log into the freenode <filename>#yocto</filename> channel.
159 </para>
160 </listitem>
161 </itemizedlist>
162 </note>
163 </legalnotice>
164
165 </bookinfo>
166
167 <xi:include href="kernel-dev-intro.xml"/>
168
169 <xi:include href="kernel-dev-common.xml"/>
170
171 <xi:include href="kernel-dev-advanced.xml"/>
172
173 <xi:include href="kernel-dev-concepts-appx.xml"/>
174
175 <xi:include href="kernel-dev-maint-appx.xml"/>
176
177 <xi:include href="kernel-dev-faq.xml"/>
178
179<!-- <index id='index'>
180 <title>Index</title>
181 </index>
182-->
183
184</book>
185<!--
186vim: expandtab tw=80 ts=4
187-->
diff --git a/documentation/mega-manual/figures/YP-flow-diagram.png b/documentation/mega-manual/figures/YP-flow-diagram.png
deleted file mode 100644
index 35969038c9..0000000000
--- a/documentation/mega-manual/figures/YP-flow-diagram.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/add-variable.png b/documentation/mega-manual/figures/add-variable.png
deleted file mode 100644
index 6bdcca705a..0000000000
--- a/documentation/mega-manual/figures/add-variable.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/analysis-for-package-splitting.png b/documentation/mega-manual/figures/analysis-for-package-splitting.png
deleted file mode 100644
index 0cb038666b..0000000000
--- a/documentation/mega-manual/figures/analysis-for-package-splitting.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/bash-oecore.png b/documentation/mega-manual/figures/bash-oecore.png
deleted file mode 100644
index 801a5d911f..0000000000
--- a/documentation/mega-manual/figures/bash-oecore.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/bb_multiconfig_files.png b/documentation/mega-manual/figures/bb_multiconfig_files.png
deleted file mode 100644
index 041f06403b..0000000000
--- a/documentation/mega-manual/figures/bb_multiconfig_files.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/bitbake-build-flow.png b/documentation/mega-manual/figures/bitbake-build-flow.png
deleted file mode 100644
index eb95eb3da0..0000000000
--- a/documentation/mega-manual/figures/bitbake-build-flow.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/bitbake-title.png b/documentation/mega-manual/figures/bitbake-title.png
deleted file mode 100644
index cb290154da..0000000000
--- a/documentation/mega-manual/figures/bitbake-title.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/bsp-dev-flow.png b/documentation/mega-manual/figures/bsp-dev-flow.png
deleted file mode 100644
index 2ca1fecada..0000000000
--- a/documentation/mega-manual/figures/bsp-dev-flow.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/bsp-title.png b/documentation/mega-manual/figures/bsp-title.png
deleted file mode 100644
index f624dd4f94..0000000000
--- a/documentation/mega-manual/figures/bsp-title.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/build-workspace-directory.png b/documentation/mega-manual/figures/build-workspace-directory.png
deleted file mode 100644
index 5387d33f03..0000000000
--- a/documentation/mega-manual/figures/build-workspace-directory.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/buildhistory-web.png b/documentation/mega-manual/figures/buildhistory-web.png
deleted file mode 100644
index f6db86c977..0000000000
--- a/documentation/mega-manual/figures/buildhistory-web.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/buildhistory.png b/documentation/mega-manual/figures/buildhistory.png
deleted file mode 100644
index bd5f8a4908..0000000000
--- a/documentation/mega-manual/figures/buildhistory.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/building-an-image.png b/documentation/mega-manual/figures/building-an-image.png
deleted file mode 100755
index 1fbea5ab00..0000000000
--- a/documentation/mega-manual/figures/building-an-image.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/bypqs-title.png b/documentation/mega-manual/figures/bypqs-title.png
deleted file mode 100644
index 9e0a5ce52e..0000000000
--- a/documentation/mega-manual/figures/bypqs-title.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/compatible-layers.png b/documentation/mega-manual/figures/compatible-layers.png
deleted file mode 100644
index 38436b075c..0000000000
--- a/documentation/mega-manual/figures/compatible-layers.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/concepts-manual-title.png b/documentation/mega-manual/figures/concepts-manual-title.png
deleted file mode 100644
index bac7a69994..0000000000
--- a/documentation/mega-manual/figures/concepts-manual-title.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/configuration-compile-autoreconf.png b/documentation/mega-manual/figures/configuration-compile-autoreconf.png
deleted file mode 100644
index 043d195a33..0000000000
--- a/documentation/mega-manual/figures/configuration-compile-autoreconf.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/cross-development-toolchains.png b/documentation/mega-manual/figures/cross-development-toolchains.png
deleted file mode 100644
index cbe8371c05..0000000000
--- a/documentation/mega-manual/figures/cross-development-toolchains.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/cute-files-npm-example.png b/documentation/mega-manual/figures/cute-files-npm-example.png
deleted file mode 100644
index 1ebe74f535..0000000000
--- a/documentation/mega-manual/figures/cute-files-npm-example.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/define-generic.png b/documentation/mega-manual/figures/define-generic.png
deleted file mode 100644
index bd22718a55..0000000000
--- a/documentation/mega-manual/figures/define-generic.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/dev-title.png b/documentation/mega-manual/figures/dev-title.png
deleted file mode 100644
index 15e67d0744..0000000000
--- a/documentation/mega-manual/figures/dev-title.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/git-workflow.png b/documentation/mega-manual/figures/git-workflow.png
deleted file mode 100644
index e401330a12..0000000000
--- a/documentation/mega-manual/figures/git-workflow.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/hosted-service.png b/documentation/mega-manual/figures/hosted-service.png
deleted file mode 100644
index 01fea7b245..0000000000
--- a/documentation/mega-manual/figures/hosted-service.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/image-generation.png b/documentation/mega-manual/figures/image-generation.png
deleted file mode 100644
index aff9fc27e0..0000000000
--- a/documentation/mega-manual/figures/image-generation.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/images.png b/documentation/mega-manual/figures/images.png
deleted file mode 100644
index 20c01307d5..0000000000
--- a/documentation/mega-manual/figures/images.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/import-layer.png b/documentation/mega-manual/figures/import-layer.png
deleted file mode 100644
index 436ec7af4a..0000000000
--- a/documentation/mega-manual/figures/import-layer.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/index-downloads.png b/documentation/mega-manual/figures/index-downloads.png
deleted file mode 100755
index d8d4475cee..0000000000
--- a/documentation/mega-manual/figures/index-downloads.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/kernel-architecture-overview.png b/documentation/mega-manual/figures/kernel-architecture-overview.png
deleted file mode 100755
index 2aad172db3..0000000000
--- a/documentation/mega-manual/figures/kernel-architecture-overview.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/kernel-dev-flow.png b/documentation/mega-manual/figures/kernel-dev-flow.png
deleted file mode 100644
index 793a395e8f..0000000000
--- a/documentation/mega-manual/figures/kernel-dev-flow.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/kernel-dev-title.png b/documentation/mega-manual/figures/kernel-dev-title.png
deleted file mode 100644
index 7a8dd54372..0000000000
--- a/documentation/mega-manual/figures/kernel-dev-title.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/kernel-overview-1.png b/documentation/mega-manual/figures/kernel-overview-1.png
deleted file mode 100644
index 116c0b9bd4..0000000000
--- a/documentation/mega-manual/figures/kernel-overview-1.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/kernel-overview-2-generic.png b/documentation/mega-manual/figures/kernel-overview-2-generic.png
deleted file mode 100644
index ee2cdb206b..0000000000
--- a/documentation/mega-manual/figures/kernel-overview-2-generic.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/kernel-title.png b/documentation/mega-manual/figures/kernel-title.png
deleted file mode 100644
index 59d86c00dc..0000000000
--- a/documentation/mega-manual/figures/kernel-title.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/kernelshark-all.png b/documentation/mega-manual/figures/kernelshark-all.png
deleted file mode 100644
index 99b40bafe5..0000000000
--- a/documentation/mega-manual/figures/kernelshark-all.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/kernelshark-choose-events.png b/documentation/mega-manual/figures/kernelshark-choose-events.png
deleted file mode 100644
index e8dd62a571..0000000000
--- a/documentation/mega-manual/figures/kernelshark-choose-events.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/kernelshark-i915-display.png b/documentation/mega-manual/figures/kernelshark-i915-display.png
deleted file mode 100644
index bb0edfb7fd..0000000000
--- a/documentation/mega-manual/figures/kernelshark-i915-display.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/kernelshark-output-display.png b/documentation/mega-manual/figures/kernelshark-output-display.png
deleted file mode 100644
index ae2d0e5730..0000000000
--- a/documentation/mega-manual/figures/kernelshark-output-display.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/key-dev-elements.png b/documentation/mega-manual/figures/key-dev-elements.png
deleted file mode 100644
index 76c44050fd..0000000000
--- a/documentation/mega-manual/figures/key-dev-elements.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/layer-input.png b/documentation/mega-manual/figures/layer-input.png
deleted file mode 100644
index 29b56f9ea1..0000000000
--- a/documentation/mega-manual/figures/layer-input.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/mega-title.png b/documentation/mega-manual/figures/mega-title.png
deleted file mode 100644
index cde0b89a44..0000000000
--- a/documentation/mega-manual/figures/mega-title.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/multiconfig_files.png b/documentation/mega-manual/figures/multiconfig_files.png
deleted file mode 100644
index 0b59338b3a..0000000000
--- a/documentation/mega-manual/figures/multiconfig_files.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/new-project.png b/documentation/mega-manual/figures/new-project.png
deleted file mode 100644
index dbc50b9918..0000000000
--- a/documentation/mega-manual/figures/new-project.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/oprofileui-busybox.png b/documentation/mega-manual/figures/oprofileui-busybox.png
deleted file mode 100644
index a8275c65d2..0000000000
--- a/documentation/mega-manual/figures/oprofileui-busybox.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/oprofileui-copy-to-user.png b/documentation/mega-manual/figures/oprofileui-copy-to-user.png
deleted file mode 100644
index deb6470204..0000000000
--- a/documentation/mega-manual/figures/oprofileui-copy-to-user.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/oprofileui-downloading.png b/documentation/mega-manual/figures/oprofileui-downloading.png
deleted file mode 100644
index 57742d6723..0000000000
--- a/documentation/mega-manual/figures/oprofileui-downloading.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/oprofileui-processes.png b/documentation/mega-manual/figures/oprofileui-processes.png
deleted file mode 100644
index ae547028f4..0000000000
--- a/documentation/mega-manual/figures/oprofileui-processes.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/overview-manual-title.png b/documentation/mega-manual/figures/overview-manual-title.png
deleted file mode 100644
index 41e9012c4f..0000000000
--- a/documentation/mega-manual/figures/overview-manual-title.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/package-feeds.png b/documentation/mega-manual/figures/package-feeds.png
deleted file mode 100755
index 2668d3ddaf..0000000000
--- a/documentation/mega-manual/figures/package-feeds.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/patching.png b/documentation/mega-manual/figures/patching.png
deleted file mode 100644
index 80fba7e7cf..0000000000
--- a/documentation/mega-manual/figures/patching.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/perf-probe-do_fork-profile.png b/documentation/mega-manual/figures/perf-probe-do_fork-profile.png
deleted file mode 100644
index 1a1070deb8..0000000000
--- a/documentation/mega-manual/figures/perf-probe-do_fork-profile.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/perf-report-cycles-u.png b/documentation/mega-manual/figures/perf-report-cycles-u.png
deleted file mode 100644
index 68ec6af80b..0000000000
--- a/documentation/mega-manual/figures/perf-report-cycles-u.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/perf-systemwide-libc.png b/documentation/mega-manual/figures/perf-systemwide-libc.png
deleted file mode 100644
index 2b72869c77..0000000000
--- a/documentation/mega-manual/figures/perf-systemwide-libc.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/perf-systemwide.png b/documentation/mega-manual/figures/perf-systemwide.png
deleted file mode 100644
index 12ce2444ae..0000000000
--- a/documentation/mega-manual/figures/perf-systemwide.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/perf-wget-busybox-annotate-menu.png b/documentation/mega-manual/figures/perf-wget-busybox-annotate-menu.png
deleted file mode 100644
index ceb34eaead..0000000000
--- a/documentation/mega-manual/figures/perf-wget-busybox-annotate-menu.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/perf-wget-busybox-annotate-udhcpc.png b/documentation/mega-manual/figures/perf-wget-busybox-annotate-udhcpc.png
deleted file mode 100644
index 3581e9daa6..0000000000
--- a/documentation/mega-manual/figures/perf-wget-busybox-annotate-udhcpc.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/perf-wget-busybox-debuginfo.png b/documentation/mega-manual/figures/perf-wget-busybox-debuginfo.png
deleted file mode 100644
index c317b49a4e..0000000000
--- a/documentation/mega-manual/figures/perf-wget-busybox-debuginfo.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/perf-wget-busybox-dso-zoom-menu.png b/documentation/mega-manual/figures/perf-wget-busybox-dso-zoom-menu.png
deleted file mode 100644
index 1913c867d0..0000000000
--- a/documentation/mega-manual/figures/perf-wget-busybox-dso-zoom-menu.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/perf-wget-busybox-dso-zoom.png b/documentation/mega-manual/figures/perf-wget-busybox-dso-zoom.png
deleted file mode 100644
index a1962c437a..0000000000
--- a/documentation/mega-manual/figures/perf-wget-busybox-dso-zoom.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/perf-wget-busybox-expanded-stripped.png b/documentation/mega-manual/figures/perf-wget-busybox-expanded-stripped.png
deleted file mode 100644
index b642d06c8b..0000000000
--- a/documentation/mega-manual/figures/perf-wget-busybox-expanded-stripped.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/perf-wget-flat-stripped.png b/documentation/mega-manual/figures/perf-wget-flat-stripped.png
deleted file mode 100644
index c8f395ab53..0000000000
--- a/documentation/mega-manual/figures/perf-wget-flat-stripped.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/perf-wget-g-copy-from-user-expanded-stripped.png b/documentation/mega-manual/figures/perf-wget-g-copy-from-user-expanded-stripped.png
deleted file mode 100644
index bb7c764ce0..0000000000
--- a/documentation/mega-manual/figures/perf-wget-g-copy-from-user-expanded-stripped.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/perf-wget-g-copy-to-user-expanded-debuginfo.png b/documentation/mega-manual/figures/perf-wget-g-copy-to-user-expanded-debuginfo.png
deleted file mode 100644
index a799af5127..0000000000
--- a/documentation/mega-manual/figures/perf-wget-g-copy-to-user-expanded-debuginfo.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/perf-wget-g-copy-to-user-expanded-stripped-unresolved-hidden.png b/documentation/mega-manual/figures/perf-wget-g-copy-to-user-expanded-stripped-unresolved-hidden.png
deleted file mode 100644
index e91808ae40..0000000000
--- a/documentation/mega-manual/figures/perf-wget-g-copy-to-user-expanded-stripped-unresolved-hidden.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/perf-wget-g-copy-to-user-expanded-stripped.png b/documentation/mega-manual/figures/perf-wget-g-copy-to-user-expanded-stripped.png
deleted file mode 100644
index 812302d0a8..0000000000
--- a/documentation/mega-manual/figures/perf-wget-g-copy-to-user-expanded-stripped.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/poky-reference-distribution.png b/documentation/mega-manual/figures/poky-reference-distribution.png
deleted file mode 100644
index 1be89ae68e..0000000000
--- a/documentation/mega-manual/figures/poky-reference-distribution.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/poky-title.png b/documentation/mega-manual/figures/poky-title.png
deleted file mode 100644
index 2893d84620..0000000000
--- a/documentation/mega-manual/figures/poky-title.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/profile-title.png b/documentation/mega-manual/figures/profile-title.png
deleted file mode 100644
index ce5c682b58..0000000000
--- a/documentation/mega-manual/figures/profile-title.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/pybootchartgui-linux-yocto.png b/documentation/mega-manual/figures/pybootchartgui-linux-yocto.png
deleted file mode 100644
index 2b6bfdacf9..0000000000
--- a/documentation/mega-manual/figures/pybootchartgui-linux-yocto.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/pychart-linux-yocto-rpm-nostrip.png b/documentation/mega-manual/figures/pychart-linux-yocto-rpm-nostrip.png
deleted file mode 100644
index 444675c543..0000000000
--- a/documentation/mega-manual/figures/pychart-linux-yocto-rpm-nostrip.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/pychart-linux-yocto-rpm.png b/documentation/mega-manual/figures/pychart-linux-yocto-rpm.png
deleted file mode 100644
index 8ee35352d8..0000000000
--- a/documentation/mega-manual/figures/pychart-linux-yocto-rpm.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/recipe-workflow.png b/documentation/mega-manual/figures/recipe-workflow.png
deleted file mode 100644
index c0e960b13b..0000000000
--- a/documentation/mega-manual/figures/recipe-workflow.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/sched-wakeup-profile.png b/documentation/mega-manual/figures/sched-wakeup-profile.png
deleted file mode 100644
index 2f25811889..0000000000
--- a/documentation/mega-manual/figures/sched-wakeup-profile.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/sdk-autotools-flow.png b/documentation/mega-manual/figures/sdk-autotools-flow.png
deleted file mode 100644
index ec6685f8b6..0000000000
--- a/documentation/mega-manual/figures/sdk-autotools-flow.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/sdk-devtool-add-flow.png b/documentation/mega-manual/figures/sdk-devtool-add-flow.png
deleted file mode 100644
index e7d6173d2d..0000000000
--- a/documentation/mega-manual/figures/sdk-devtool-add-flow.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/sdk-devtool-modify-flow.png b/documentation/mega-manual/figures/sdk-devtool-modify-flow.png
deleted file mode 100644
index 18ba8b7e65..0000000000
--- a/documentation/mega-manual/figures/sdk-devtool-modify-flow.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/sdk-devtool-upgrade-flow.png b/documentation/mega-manual/figures/sdk-devtool-upgrade-flow.png
deleted file mode 100644
index 7d4f395e24..0000000000
--- a/documentation/mega-manual/figures/sdk-devtool-upgrade-flow.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/sdk-environment.png b/documentation/mega-manual/figures/sdk-environment.png
deleted file mode 100644
index 78b8cad39e..0000000000
--- a/documentation/mega-manual/figures/sdk-environment.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/sdk-generation.png b/documentation/mega-manual/figures/sdk-generation.png
deleted file mode 100644
index 939f839113..0000000000
--- a/documentation/mega-manual/figures/sdk-generation.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/sdk-installed-extensible-sdk-directory.png b/documentation/mega-manual/figures/sdk-installed-extensible-sdk-directory.png
deleted file mode 100644
index b71c8ad73c..0000000000
--- a/documentation/mega-manual/figures/sdk-installed-extensible-sdk-directory.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/sdk-installed-standard-sdk-directory.png b/documentation/mega-manual/figures/sdk-installed-standard-sdk-directory.png
deleted file mode 100644
index 45c0154b19..0000000000
--- a/documentation/mega-manual/figures/sdk-installed-standard-sdk-directory.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/sdk-makefile-flow.png b/documentation/mega-manual/figures/sdk-makefile-flow.png
deleted file mode 100644
index 0ccb4180a3..0000000000
--- a/documentation/mega-manual/figures/sdk-makefile-flow.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/sdk-title.png b/documentation/mega-manual/figures/sdk-title.png
deleted file mode 100644
index e69e03935a..0000000000
--- a/documentation/mega-manual/figures/sdk-title.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/sdk.png b/documentation/mega-manual/figures/sdk.png
deleted file mode 100644
index a376872638..0000000000
--- a/documentation/mega-manual/figures/sdk.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/set-variable.png b/documentation/mega-manual/figures/set-variable.png
deleted file mode 100644
index d36b52754e..0000000000
--- a/documentation/mega-manual/figures/set-variable.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/simple-configuration.png b/documentation/mega-manual/figures/simple-configuration.png
deleted file mode 100644
index e8fce2bf18..0000000000
--- a/documentation/mega-manual/figures/simple-configuration.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/source-fetching.png b/documentation/mega-manual/figures/source-fetching.png
deleted file mode 100644
index bf5e187b2b..0000000000
--- a/documentation/mega-manual/figures/source-fetching.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/source-input.png b/documentation/mega-manual/figures/source-input.png
deleted file mode 100644
index 6b6ba4b338..0000000000
--- a/documentation/mega-manual/figures/source-input.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/source-repos.png b/documentation/mega-manual/figures/source-repos.png
deleted file mode 100644
index e9cff16cc8..0000000000
--- a/documentation/mega-manual/figures/source-repos.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/sysprof-callers.png b/documentation/mega-manual/figures/sysprof-callers.png
deleted file mode 100644
index 640c8d9140..0000000000
--- a/documentation/mega-manual/figures/sysprof-callers.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/sysprof-copy-from-user.png b/documentation/mega-manual/figures/sysprof-copy-from-user.png
deleted file mode 100644
index 8d31427824..0000000000
--- a/documentation/mega-manual/figures/sysprof-copy-from-user.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/sysprof-copy-to-user.png b/documentation/mega-manual/figures/sysprof-copy-to-user.png
deleted file mode 100644
index 7a5bab7991..0000000000
--- a/documentation/mega-manual/figures/sysprof-copy-to-user.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/toaster-title.png b/documentation/mega-manual/figures/toaster-title.png
deleted file mode 100644
index b7ea39cd8d..0000000000
--- a/documentation/mega-manual/figures/toaster-title.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/user-configuration.png b/documentation/mega-manual/figures/user-configuration.png
deleted file mode 100644
index 142454715b..0000000000
--- a/documentation/mega-manual/figures/user-configuration.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/using-a-pre-built-image.png b/documentation/mega-manual/figures/using-a-pre-built-image.png
deleted file mode 100644
index b03130d123..0000000000
--- a/documentation/mega-manual/figures/using-a-pre-built-image.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/variable-added.png b/documentation/mega-manual/figures/variable-added.png
deleted file mode 100644
index 518f25fa15..0000000000
--- a/documentation/mega-manual/figures/variable-added.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/yocto-project-transp.png b/documentation/mega-manual/figures/yocto-project-transp.png
deleted file mode 100755
index 31d2b147fd..0000000000
--- a/documentation/mega-manual/figures/yocto-project-transp.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/figures/yp-download.png b/documentation/mega-manual/figures/yp-download.png
deleted file mode 100644
index bfd12b678a..0000000000
--- a/documentation/mega-manual/figures/yp-download.png
+++ /dev/null
Binary files differ
diff --git a/documentation/mega-manual/mega-manual-customization.xsl b/documentation/mega-manual/mega-manual-customization.xsl
deleted file mode 100644
index 33a6e16325..0000000000
--- a/documentation/mega-manual/mega-manual-customization.xsl
+++ /dev/null
@@ -1,43 +0,0 @@
1<?xml version='1.0'?>
2<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
3<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
4
5 <xsl:import href="http://downloads.yoctoproject.org/mirror/docbook-mirror/docbook-xsl-1.76.1/xhtml/docbook.xsl" />
6
7<!--
8
9 <xsl:import href="../template/1.76.1/docbook-xsl-1.76.1/xhtml/docbook.xsl" />
10
11 <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.76.1/xhtml/docbook.xsl" />
12
13-->
14
15 <xsl:param name="generate.toc">
16 appendix toc
17 chapter toc
18 article nop
19 book nop
20 part nop
21 preface nop
22 qandadiv nop
23 qandaset nop
24 reference nop
25 section nop
26 set nop
27 </xsl:param>
28
29 <xsl:include href="../template/permalinks.xsl"/>
30 <xsl:include href="../template/section.title.xsl"/>
31 <xsl:include href="../template/component.title.xsl"/>
32 <xsl:include href="../template/division.title.xsl"/>
33 <xsl:include href="../template/formal.object.heading.xsl"/>
34 <xsl:include href="../template/gloss-permalinks.xsl"/>
35
36 <xsl:param name="html.stylesheet" select="'mega-style.css'" />
37 <xsl:param name="chapter.autolabel" select="1" />
38 <xsl:param name="appendix.autolabel">A</xsl:param>
39 <xsl:param name="section.autolabel" select="1" />
40 <xsl:param name="section.label.includes.component.label" select="1" />
41 <xsl:param name="generate.id.attributes" select="1" />
42
43</xsl:stylesheet>
diff --git a/documentation/mega-manual/mega-manual.xml b/documentation/mega-manual/mega-manual.xml
deleted file mode 100755
index d9912fa442..0000000000
--- a/documentation/mega-manual/mega-manual.xml
+++ /dev/null
@@ -1,362 +0,0 @@
1<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<book id='mega-manual' lang='en'
7 xmlns:xi="http://www.w3.org/2003/XInclude"
8 xmlns="http://docbook.org/ns/docbook"
9 >
10
11 <bookinfo>
12
13 <abstract>
14 The Yocto Project Mega-Manual is a concatenation of the published
15 Yocto Project HTML manuals along with the corresponding BitBake
16 User Manual for the given release.
17 The Mega-Manual exists to help users efficiently search for strings
18 across the entire Yocto Project documentation set inclusive of
19 the BitBake User Manual.
20 </abstract>
21
22 <mediaobject>
23 <imageobject>
24 <imagedata fileref='figures/mega-title.png'
25 format='SVG'
26 align='left' scalefit='1' width='100%'/>
27 </imageobject>
28 </mediaobject>
29
30 <title>
31 Yocto Project Mega-Manual
32 </title>
33
34 <authorgroup>
35 <author>
36 <affiliation>
37 <orgname>&ORGNAME;</orgname>
38 </affiliation>
39 <email>&ORGEMAIL;</email>
40 </author>
41 </authorgroup>
42
43 <revhistory>
44 <revision>
45 <revnumber>1.8</revnumber>
46 <date>April 2015</date>
47 <revremark>The initial document released with the Yocto Project 1.8 Release.</revremark>
48 </revision>
49 <revision>
50 <revnumber>2.0</revnumber>
51 <date>October 2015</date>
52 <revremark>Released with the Yocto Project 2.0 Release.</revremark>
53 </revision>
54 <revision>
55 <revnumber>2.1</revnumber>
56 <date>April 2016</date>
57 <revremark>Released with the Yocto Project 2.1 Release.</revremark>
58 </revision>
59 <revision>
60 <revnumber>2.2</revnumber>
61 <date>October 2016</date>
62 <revremark>Released with the Yocto Project 2.2 Release.</revremark>
63 </revision>
64 <revision>
65 <revnumber>2.3</revnumber>
66 <date>May 2017</date>
67 <revremark>Released with the Yocto Project 2.3 Release.</revremark>
68 </revision>
69 <revision>
70 <revnumber>2.4</revnumber>
71 <date>October 2017</date>
72 <revremark>Released with the Yocto Project 2.4 Release.</revremark>
73 </revision>
74 <revision>
75 <revnumber>2.5</revnumber>
76 <date>May 2018</date>
77 <revremark>Released with the Yocto Project 2.5 Release.</revremark>
78 </revision>
79 <revision>
80 <revnumber>2.6</revnumber>
81 <date>November 2018</date>
82 <revremark>Released with the Yocto Project 2.6 Release.</revremark>
83 </revision>
84 <revision>
85 <revnumber>2.7</revnumber>
86 <date>May 2019</date>
87 <revremark>Released with the Yocto Project 2.7 Release.</revremark>
88 </revision>
89 <revision>
90 <revnumber>3.0</revnumber>
91 <date>October 2019</date>
92 <revremark>Released with the Yocto Project 3.0 Release.</revremark>
93 </revision>
94 <revision>
95 <revnumber>3.1</revnumber>
96 <date>&REL_MONTH_YEAR;</date>
97 <revremark>Released with the Yocto Project 3.1 Release.</revremark>
98 </revision>
99 </revhistory>
100
101 <copyright>
102 <year>&COPYRIGHT_YEAR;</year>
103 <holder>Linux Foundation</holder>
104 </copyright>
105
106 <legalnotice>
107 <para>
108 Permission is granted to copy, distribute and/or modify this document under
109 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 &amp; Wales</ulink> as published by Creative Commons.
110 </para>
111 <note><title>Manual Notes</title>
112 <itemizedlist>
113 <listitem><para>
114 This version of the
115 <emphasis>Yocto Project Mega-Manual</emphasis>
116 is for the &YOCTO_DOC_VERSION; release of the
117 Yocto Project.
118 To be sure you have the latest version of the manual
119 for this release, go to the
120 <ulink url='&YOCTO_DOCS_URL;'>Yocto Project documentation page</ulink>
121 and select the manual from that site.
122 Manuals from the site are more up-to-date than manuals
123 derived from the Yocto Project released TAR files.
124 </para></listitem>
125 <listitem><para>
126 If you located this manual through a web search, the
127 version of the manual might not be the one you want
128 (e.g. the search might have returned a manual much
129 older than the Yocto Project version with which you
130 are working).
131 You can see all Yocto Project major releases by
132 visiting the
133 <ulink url='&YOCTO_WIKI_URL;/wiki/Releases'>Releases</ulink>
134 page.
135 If you need a version of this manual for a different
136 Yocto Project release, visit the
137 <ulink url='&YOCTO_DOCS_URL;'>Yocto Project documentation page</ulink>
138 and select the manual set by using the
139 "ACTIVE RELEASES DOCUMENTATION" or "DOCUMENTS ARCHIVE"
140 pull-down menus.
141 </para></listitem>
142 <listitem>
143 <para>
144 To report any inaccuracies or problems with this
145 (or any other Yocto Project) manual, send an email to
146 the Yocto Project documentation mailing list at
147 <filename>docs@lists.yoctoproject.org</filename> or
148 log into the freenode <filename>#yocto</filename> channel.
149 </para>
150 </listitem>
151 </itemizedlist>
152 </note>
153
154 </legalnotice>
155
156 </bookinfo>
157
158<!-- Includes brief-yoctoprojectqs -->
159
160 <para>
161 <imagedata fileref="figures/bypqs-title.png" width="100%" align="left" scalefit="1" />
162 </para>
163
164 <xi:include
165 xmlns:xi="http://www.w3.org/2003/XInclude" href="../brief-yoctoprojectqs/brief-yoctoprojectqs.xml"/>
166
167<!-- Includes overview-manual title image and then overview-manual chapters -->
168
169 <para>
170 <imagedata fileref="figures/overview-manual-title.png" width="100%" align="left" scalefit="1" />
171 </para>
172
173 <xi:include
174 xmlns:xi="http://www.w3.org/2003/XInclude" href="../overview-manual/overview-manual-intro.xml"/>
175
176 <xi:include
177 xmlns:xi="http://www.w3.org/2003/XInclude" href="../overview-manual/overview-manual-yp-intro.xml"/>
178
179 <xi:include
180 xmlns:xi="http://www.w3.org/2003/XInclude" href="../overview-manual/overview-manual-development-environment.xml"/>
181
182 <xi:include
183 xmlns:xi="http://www.w3.org/2003/XInclude" href="../overview-manual/overview-manual-concepts.xml"/>
184
185<!-- Includes dev-manual title image and then dev-manual chapters -->
186
187 <para>
188 <imagedata fileref="figures/dev-title.png" width="100%" align="left" scalefit="1" />
189 </para>
190
191 <xi:include
192 xmlns:xi="http://www.w3.org/2003/XInclude" href="../dev-manual/dev-manual-intro.xml"/>
193 <xi:include
194 xmlns:xi="http://www.w3.org/2003/XInclude" href="../dev-manual/dev-manual-start.xml"/>
195 <xi:include
196 xmlns:xi="http://www.w3.org/2003/XInclude" href="../dev-manual/dev-manual-common-tasks.xml"/>
197 <xi:include
198 xmlns:xi="http://www.w3.org/2003/XInclude" href="../dev-manual/dev-manual-qemu.xml"/>
199
200<!-- Includes sdk-manual title image and then sdk-manual chapters -->
201
202 <para>
203 <imagedata fileref="figures/sdk-title.png" width="100%" align="left" scalefit="1" />
204 </para>
205
206 <xi:include
207 xmlns:xi="http://www.w3.org/2003/XInclude" href="../sdk-manual/sdk-intro.xml"/>
208 <xi:include
209 xmlns:xi="http://www.w3.org/2003/XInclude" href="../sdk-manual/sdk-extensible.xml"/>
210 <xi:include
211 xmlns:xi="http://www.w3.org/2003/XInclude" href="../sdk-manual/sdk-using.xml"/>
212 <xi:include
213 xmlns:xi="http://www.w3.org/2003/XInclude" href="../sdk-manual/sdk-working-projects.xml"/>
214 <xi:include
215 xmlns:xi="http://www.w3.org/2003/XInclude" href="../sdk-manual/sdk-appendix-obtain.xml"/>
216 <xi:include
217 xmlns:xi="http://www.w3.org/2003/XInclude" href="../sdk-manual/sdk-appendix-customizing.xml"/>
218 <xi:include
219 xmlns:xi="http://www.w3.org/2003/XInclude" href="../sdk-manual/sdk-appendix-customizing-standard.xml"/>
220
221<!-- Includes bsp-guide title image and then bsp-guide chapters -->
222
223 <para>
224 <imagedata fileref="figures/bsp-title.png" width="100%" align="left" scalefit="1" />
225 </para>
226
227 <xi:include
228 xmlns:xi="http://www.w3.org/2003/XInclude" href="../bsp-guide/bsp.xml"/>
229
230<!-- Includes kernel-dev title image and then kernel-dev chapters -->
231
232 <para>
233 <imagedata fileref="figures/kernel-dev-title.png" width="100%" align="left" scalefit="1" />
234 </para>
235
236 <xi:include
237 xmlns:xi="http://www.w3.org/2003/XInclude" href="../kernel-dev/kernel-dev-intro.xml"/>
238 <xi:include
239 xmlns:xi="http://www.w3.org/2003/XInclude" href="../kernel-dev/kernel-dev-common.xml"/>
240 <xi:include
241 xmlns:xi="http://www.w3.org/2003/XInclude" href="../kernel-dev/kernel-dev-advanced.xml"/>
242 <xi:include
243 xmlns:xi="http://www.w3.org/2003/XInclude" href="../kernel-dev/kernel-dev-concepts-appx.xml"/>
244 <xi:include
245 xmlns:xi="http://www.w3.org/2003/XInclude" href="../kernel-dev/kernel-dev-maint-appx.xml"/>
246
247<!-- Includes profile-manual title image and then profile-manual chapters -->
248
249 <para>
250 <imagedata fileref="figures/profile-title.png" width="100%" align="left" scalefit="1" />
251 </para>
252
253 <xi:include
254 xmlns:xi="http://www.w3.org/2003/XInclude" href="../profile-manual/profile-manual-intro.xml"/>
255 <xi:include
256 xmlns:xi="http://www.w3.org/2003/XInclude" href="../profile-manual/profile-manual-arch.xml"/>
257 <xi:include
258 xmlns:xi="http://www.w3.org/2003/XInclude" href="../profile-manual/profile-manual-usage.xml"/>
259 <xi:include
260 xmlns:xi="http://www.w3.org/2003/XInclude" href="../profile-manual/profile-manual-examples.xml"/>
261
262<!-- Includes ref-manual title image and then ref-manual chapters -->
263
264 <para>
265 <imagedata fileref="figures/poky-title.png" width="100%" align="left" scalefit="1" />
266 </para>
267
268 <xi:include
269 xmlns:xi="http://www.w3.org/2003/XInclude" href="../ref-manual/ref-system-requirements.xml"/>
270
271 <xi:include
272 xmlns:xi="http://www.w3.org/2003/XInclude" href="../ref-manual/ref-terms.xml"/>
273
274 <xi:include
275 xmlns:xi="http://www.w3.org/2003/XInclude" href="../ref-manual/ref-release-process.xml"/>
276
277 <xi:include
278 xmlns:xi="http://www.w3.org/2003/XInclude" href="../ref-manual/migration.xml"/>
279
280 <xi:include
281 xmlns:xi="http://www.w3.org/2003/XInclude" href="../ref-manual/ref-structure.xml"/>
282
283 <xi:include
284 xmlns:xi="http://www.w3.org/2003/XInclude" href="../ref-manual/ref-classes.xml"/>
285
286 <xi:include
287 xmlns:xi="http://www.w3.org/2003/XInclude" href="../ref-manual/ref-tasks.xml"/>
288
289 <xi:include
290 xmlns:xi="http://www.w3.org/2003/XInclude" href="../ref-manual/ref-devtool-reference.xml"/>
291
292 <xi:include
293 xmlns:xi="http://www.w3.org/2003/XInclude" href="../ref-manual/ref-kickstart.xml"/>
294
295 <xi:include
296 xmlns:xi="http://www.w3.org/2003/XInclude" href="../ref-manual/ref-qa-checks.xml"/>
297
298 <xi:include
299 xmlns:xi="http://www.w3.org/2003/XInclude" href="../ref-manual/ref-images.xml"/>
300
301 <xi:include
302 xmlns:xi="http://www.w3.org/2003/XInclude" href="../ref-manual/ref-features.xml"/>
303
304 <xi:include
305 xmlns:xi="http://www.w3.org/2003/XInclude" href="../ref-manual/ref-variables.xml"/>
306
307 <xi:include
308 xmlns:xi="http://www.w3.org/2003/XInclude" href="../ref-manual/ref-varlocality.xml"/>
309
310 <xi:include
311 xmlns:xi="http://www.w3.org/2003/XInclude" href="../ref-manual/faq.xml"/>
312
313 <xi:include
314 xmlns:xi="http://www.w3.org/2003/XInclude" href="../ref-manual/resources.xml"/>
315
316<!-- Includes toaster-manual title image and then toaster-manual chapters -->
317
318 <para>
319 <imagedata fileref="figures/toaster-title.png" width="100%" align="left" scalefit="1" />
320 </para>
321
322 <xi:include
323 xmlns:xi="http://www.w3.org/2003/XInclude" href="../toaster-manual/toaster-manual-intro.xml"/>
324
325 <xi:include
326 xmlns:xi="http://www.w3.org/2003/XInclude" href="../toaster-manual/toaster-manual-start.xml"/>
327
328 <xi:include
329 xmlns:xi="http://www.w3.org/2003/XInclude" href="../toaster-manual/toaster-manual-setup-and-use.xml"/>
330
331 <xi:include
332 xmlns:xi="http://www.w3.org/2003/XInclude" href="../toaster-manual/toaster-manual-reference.xml"/>
333
334<!-- Includes bitbake-user-manual title image and then bitbake-user-manual chapters -->
335
336 <para>
337 <imagedata fileref="figures/bitbake-title.png" width="100%" align="left" scalefit="1" />
338 </para>
339
340 <xi:include
341 xmlns:xi="http://www.w3.org/2003/XInclude" href="../../bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.xml"/>
342
343 <xi:include
344 xmlns:xi="http://www.w3.org/2003/XInclude" href="../../bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml"/>
345
346 <xi:include
347 xmlns:xi="http://www.w3.org/2003/XInclude" href="../../bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml"/>
348
349 <xi:include
350 xmlns:xi="http://www.w3.org/2003/XInclude" href="../../bitbake/doc/bitbake-user-manual/bitbake-user-manual-fetching.xml"/>
351
352 <xi:include
353 xmlns:xi="http://www.w3.org/2003/XInclude" href="../../bitbake/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.xml"/>
354
355 <xi:include
356 xmlns:xi="http://www.w3.org/2003/XInclude" href="../../bitbake/doc/bitbake-user-manual/bitbake-user-manual-hello.xml"/>
357
358</book>
359
360<!--
361vim: expandtab tw=80 ts=4
362-->
diff --git a/documentation/mega-manual/mega-style.css b/documentation/mega-manual/mega-style.css
deleted file mode 100644
index 7748320fb2..0000000000
--- a/documentation/mega-manual/mega-style.css
+++ /dev/null
@@ -1,991 +0,0 @@
1/*
2 SPDX-License-Identifier: CC-BY-2.0-UK
3
4 Generic XHTML / DocBook XHTML CSS Stylesheet.
5
6 Browser wrangling and typographic design by
7 Oyvind Kolas / pippin@gimp.org
8
9 Customised for Poky by
10 Matthew Allum / mallum@o-hand.com
11
12 Thanks to:
13 Liam R. E. Quin
14 William Skaggs
15 Jakub Steiner
16
17 Structure
18 ---------
19
20 The stylesheet is divided into the following sections:
21
22 Positioning
23 Margins, paddings, width, font-size, clearing.
24 Decorations
25 Borders, style
26 Colors
27 Colors
28 Graphics
29 Graphical backgrounds
30 Nasty IE tweaks
31 Workarounds needed to make it work in internet explorer,
32 currently makes the stylesheet non validating, but up until
33 this point it is validating.
34 Mozilla extensions
35 Transparency for footer
36 Rounded corners on boxes
37
38*/
39
40
41 /*************** /
42 / Positioning /
43/ ***************/
44
45body {
46 font-family: Verdana, Sans, sans-serif;
47
48 min-width: 640px;
49 width: 80%;
50 margin: 0em auto;
51 padding: 2em 5em 5em 5em;
52 color: #333;
53}
54
55h1,h2,h3,h4,h5,h6,h7 {
56 font-family: Arial, Sans;
57 color: #00557D;
58 clear: both;
59}
60
61h1 {
62 font-size: 2em;
63 text-align: left;
64 padding: 0em 0em 0em 0em;
65 margin: 2em 0em 0em 0em;
66}
67
68h2.subtitle {
69 margin: 0.10em 0em 3.0em 0em;
70 padding: 0em 0em 0em 0em;
71 font-size: 1.8em;
72 padding-left: 20%;
73 font-weight: normal;
74 font-style: italic;
75}
76
77h2 {
78 margin: 2em 0em 0.66em 0em;
79 padding: 0.5em 0em 0em 0em;
80 font-size: 1.5em;
81 font-weight: bold;
82}
83
84h3.subtitle {
85 margin: 0em 0em 1em 0em;
86 padding: 0em 0em 0em 0em;
87 font-size: 142.14%;
88 text-align: right;
89}
90
91h3 {
92 margin: 1em 0em 0.5em 0em;
93 padding: 1em 0em 0em 0em;
94 font-size: 140%;
95 font-weight: bold;
96}
97
98h4 {
99 margin: 1em 0em 0.5em 0em;
100 padding: 1em 0em 0em 0em;
101 font-size: 120%;
102 font-weight: bold;
103}
104
105h5 {
106 margin: 1em 0em 0.5em 0em;
107 padding: 1em 0em 0em 0em;
108 font-size: 110%;
109 font-weight: bold;
110}
111
112h6 {
113 margin: 1em 0em 0em 0em;
114 padding: 1em 0em 0em 0em;
115 font-size: 110%;
116 font-weight: bold;
117}
118
119.authorgroup {
120 background-color: transparent;
121 background-repeat: no-repeat;
122 padding-top: 256px;
123 background-image: url("figures/mega-title.png");
124 background-position: left top;
125 margin-top: -256px;
126 padding-right: 50px;
127 margin-left: 0px;
128 text-align: right;
129 width: 740px;
130}
131
132h3.author {
133 margin: 0em 0em 0em 0em;
134 padding: 0em 0em 0em 0em;
135 font-weight: normal;
136 font-size: 100%;
137 color: #333;
138 clear: both;
139}
140
141.author tt.email {
142 font-size: 66%;
143}
144
145.titlepage hr {
146 width: 0em;
147 clear: both;
148}
149
150.revhistory {
151 padding-top: 2em;
152 clear: both;
153}
154
155.toc,
156.list-of-tables,
157.list-of-examples,
158.list-of-figures {
159 padding: 1.33em 0em 2.5em 0em;
160 color: #00557D;
161}
162
163.toc p,
164.list-of-tables p,
165.list-of-figures p,
166.list-of-examples p {
167 padding: 0em 0em 0em 0em;
168 padding: 0em 0em 0.3em;
169 margin: 1.5em 0em 0em 0em;
170}
171
172.toc p b,
173.list-of-tables p b,
174.list-of-figures p b,
175.list-of-examples p b{
176 font-size: 100.0%;
177 font-weight: bold;
178}
179
180.toc dl,
181.list-of-tables dl,
182.list-of-figures dl,
183.list-of-examples dl {
184 margin: 0em 0em 0.5em 0em;
185 padding: 0em 0em 0em 0em;
186}
187
188.toc dt {
189 margin: 0em 0em 0em 0em;
190 padding: 0em 0em 0em 0em;
191}
192
193.toc dd {
194 margin: 0em 0em 0em 2.6em;
195 padding: 0em 0em 0em 0em;
196}
197
198div.glossary dl,
199div.variablelist dl {
200}
201
202.glossary dl dt,
203.variablelist dl dt,
204.variablelist dl dt span.term {
205 font-weight: normal;
206 width: 20em;
207 text-align: right;
208}
209
210.variablelist dl dt {
211 margin-top: 0.5em;
212}
213
214.glossary dl dd,
215.variablelist dl dd {
216 margin-top: -1em;
217 margin-left: 25.5em;
218}
219
220.glossary dd p,
221.variablelist dd p {
222 margin-top: 0em;
223 margin-bottom: 1em;
224}
225
226
227div.calloutlist table td {
228 padding: 0em 0em 0em 0em;
229 margin: 0em 0em 0em 0em;
230}
231
232div.calloutlist table td p {
233 margin-top: 0em;
234 margin-bottom: 1em;
235}
236
237div p.copyright {
238 text-align: left;
239}
240
241div.legalnotice p.legalnotice-title {
242 margin-bottom: 0em;
243}
244
245p {
246 line-height: 1.5em;
247 margin-top: 0em;
248
249}
250
251dl {
252 padding-top: 0em;
253}
254
255hr {
256 border: solid 1px;
257}
258
259
260.mediaobject,
261.mediaobjectco {
262 text-align: center;
263}
264
265img {
266 border: none;
267}
268
269ul {
270 padding: 0em 0em 0em 1.5em;
271}
272
273ul li {
274 padding: 0em 0em 0em 0em;
275}
276
277ul li p {
278 text-align: left;
279}
280
281table {
282 width :100%;
283}
284
285th {
286 padding: 0.25em;
287 text-align: left;
288 font-weight: normal;
289 vertical-align: top;
290}
291
292td {
293 padding: 0.25em;
294 vertical-align: top;
295}
296
297p a[id] {
298 margin: 0px;
299 padding: 0px;
300 display: inline;
301 background-image: none;
302}
303
304a {
305 text-decoration: underline;
306 color: #444;
307}
308
309pre {
310 overflow: auto;
311}
312
313a:hover {
314 text-decoration: underline;
315 /*font-weight: bold;*/
316}
317
318/* This style defines how the permalink character
319 appears by itself and when hovered over with
320 the mouse. */
321
322[alt='Permalink'] { color: #eee; }
323[alt='Permalink']:hover { color: black; }
324
325
326div.informalfigure,
327div.informalexample,
328div.informaltable,
329div.figure,
330div.table,
331div.example {
332 margin: 1em 0em;
333 padding: 1em;
334 page-break-inside: avoid;
335}
336
337
338div.informalfigure p.title b,
339div.informalexample p.title b,
340div.informaltable p.title b,
341div.figure p.title b,
342div.example p.title b,
343div.table p.title b{
344 padding-top: 0em;
345 margin-top: 0em;
346 font-size: 100%;
347 font-weight: normal;
348}
349
350.mediaobject .caption,
351.mediaobject .caption p {
352 text-align: center;
353 font-size: 80%;
354 padding-top: 0.5em;
355 padding-bottom: 0.5em;
356}
357
358.epigraph {
359 padding-left: 55%;
360 margin-bottom: 1em;
361}
362
363.epigraph p {
364 text-align: left;
365}
366
367.epigraph .quote {
368 font-style: italic;
369}
370.epigraph .attribution {
371 font-style: normal;
372 text-align: right;
373}
374
375span.application {
376 font-style: italic;
377}
378
379.programlisting {
380 font-family: monospace;
381 font-size: 80%;
382 white-space: pre;
383 margin: 1.33em 0em;
384 padding: 1.33em;
385}
386
387.tip,
388.warning,
389.caution,
390.note {
391 margin-top: 1em;
392 margin-bottom: 1em;
393
394}
395
396/* force full width of table within div */
397.tip table,
398.warning table,
399.caution table,
400.note table {
401 border: none;
402 width: 100%;
403}
404
405
406.tip table th,
407.warning table th,
408.caution table th,
409.note table th {
410 padding: 0.8em 0.0em 0.0em 0.0em;
411 margin : 0em 0em 0em 0em;
412}
413
414.tip p,
415.warning p,
416.caution p,
417.note p {
418 margin-top: 0.5em;
419 margin-bottom: 0.5em;
420 padding-right: 1em;
421 text-align: left;
422}
423
424.acronym {
425 text-transform: uppercase;
426}
427
428b.keycap,
429.keycap {
430 padding: 0.09em 0.3em;
431 margin: 0em;
432}
433
434.itemizedlist li {
435 clear: none;
436}
437
438.filename {
439 font-size: medium;
440 font-family: Courier, monospace;
441}
442
443
444div.navheader, div.heading{
445 position: absolute;
446 left: 0em;
447 top: 0em;
448 width: 100%;
449 background-color: #cdf;
450 width: 100%;
451}
452
453div.navfooter, div.footing{
454 position: fixed;
455 left: 0em;
456 bottom: 0em;
457 background-color: #eee;
458 width: 100%;
459}
460
461
462div.navheader td,
463div.navfooter td {
464 font-size: 66%;
465}
466
467div.navheader table th {
468 /*font-family: Georgia, Times, serif;*/
469 /*font-size: x-large;*/
470 font-size: 80%;
471}
472
473div.navheader table {
474 border-left: 0em;
475 border-right: 0em;
476 border-top: 0em;
477 width: 100%;
478}
479
480div.navfooter table {
481 border-left: 0em;
482 border-right: 0em;
483 border-bottom: 0em;
484 width: 100%;
485}
486
487div.navheader table td a,
488div.navfooter table td a {
489 color: #777;
490 text-decoration: none;
491}
492
493/* normal text in the footer */
494div.navfooter table td {
495 color: black;
496}
497
498div.navheader table td a:visited,
499div.navfooter table td a:visited {
500 color: #444;
501}
502
503
504/* links in header and footer */
505div.navheader table td a:hover,
506div.navfooter table td a:hover {
507 text-decoration: underline;
508 background-color: transparent;
509 color: #33a;
510}
511
512div.navheader hr,
513div.navfooter hr {
514 display: none;
515}
516
517
518.qandaset tr.question td p {
519 margin: 0em 0em 1em 0em;
520 padding: 0em 0em 0em 0em;
521}
522
523.qandaset tr.answer td p {
524 margin: 0em 0em 1em 0em;
525 padding: 0em 0em 0em 0em;
526}
527.answer td {
528 padding-bottom: 1.5em;
529}
530
531.emphasis {
532 font-weight: bold;
533}
534
535
536 /************* /
537 / decorations /
538/ *************/
539
540.titlepage {
541}
542
543.part .title {
544}
545
546.subtitle {
547 border: none;
548}
549
550/*
551h1 {
552 border: none;
553}
554
555h2 {
556 border-top: solid 0.2em;
557 border-bottom: solid 0.06em;
558}
559
560h3 {
561 border-top: 0em;
562 border-bottom: solid 0.06em;
563}
564
565h4 {
566 border: 0em;
567 border-bottom: solid 0.06em;
568}
569
570h5 {
571 border: 0em;
572}
573*/
574
575.programlisting {
576 border: solid 1px;
577}
578
579div.figure,
580div.table,
581div.informalfigure,
582div.informaltable,
583div.informalexample,
584div.example {
585 border: 1px solid;
586}
587
588
589
590.tip,
591.warning,
592.caution,
593.note {
594 border: 1px solid;
595}
596
597.tip table th,
598.warning table th,
599.caution table th,
600.note table th {
601 border-bottom: 1px solid;
602}
603
604.question td {
605 border-top: 1px solid black;
606}
607
608.answer {
609}
610
611
612b.keycap,
613.keycap {
614 border: 1px solid;
615}
616
617
618div.navheader, div.heading{
619 border-bottom: 1px solid;
620}
621
622
623div.navfooter, div.footing{
624 border-top: 1px solid;
625}
626
627 /********* /
628 / colors /
629/ *********/
630
631body {
632 color: #333;
633 background: white;
634}
635
636a {
637 background: transparent;
638}
639
640a:hover {
641 background-color: #dedede;
642}
643
644
645h1,
646h2,
647h3,
648h4,
649h5,
650h6,
651h7,
652h8 {
653 background-color: transparent;
654}
655
656hr {
657 border-color: #aaa;
658}
659
660
661.tip, .warning, .caution, .note {
662 border-color: #fff;
663}
664
665
666.tip table th,
667.warning table th,
668.caution table th,
669.note table th {
670 border-bottom-color: #fff;
671}
672
673
674.warning {
675 background-color: #f0f0f2;
676}
677
678.caution {
679 background-color: #f0f0f2;
680}
681
682.tip {
683 background-color: #f0f0f2;
684}
685
686.note {
687 background-color: #f0f0f2;
688}
689
690.glossary dl dt,
691.variablelist dl dt,
692.variablelist dl dt span.term {
693 color: #044;
694}
695
696div.figure,
697div.table,
698div.example,
699div.informalfigure,
700div.informaltable,
701div.informalexample {
702 border-color: #aaa;
703}
704
705pre.programlisting {
706 color: black;
707 background-color: #fff;
708 border-color: #aaa;
709 border-width: 2px;
710}
711
712.guimenu,
713.guilabel,
714.guimenuitem {
715 background-color: #eee;
716}
717
718
719b.keycap,
720.keycap {
721 background-color: #eee;
722 border-color: #999;
723}
724
725
726div.navheader {
727 border-color: black;
728}
729
730
731div.navfooter {
732 border-color: black;
733}
734
735
736.writernotes {
737 color: red;
738}
739
740
741 /*********** /
742 / graphics /
743/ ***********/
744
745/*
746body {
747 background-image: url("images/body_bg.jpg");
748 background-attachment: fixed;
749}
750
751.navheader,
752.note,
753.tip {
754 background-image: url("images/note_bg.jpg");
755 background-attachment: fixed;
756}
757
758.warning,
759.caution {
760 background-image: url("images/warning_bg.jpg");
761 background-attachment: fixed;
762}
763
764.figure,
765.informalfigure,
766.example,
767.informalexample,
768.table,
769.informaltable {
770 background-image: url("images/figure_bg.jpg");
771 background-attachment: fixed;
772}
773
774*/
775h1,
776h2,
777h3,
778h4,
779h5,
780h6,
781h7{
782}
783
784/*
785Example of how to stick an image as part of the title.
786
787div.article .titlepage .title
788{
789 background-image: url("figures/white-on-black.png");
790 background-position: center;
791 background-repeat: repeat-x;
792}
793*/
794
795div.preface .titlepage .title,
796div.colophon .title,
797div.chapter .titlepage .title,
798div.article .titlepage .title
799{
800}
801
802div.section div.section .titlepage .title,
803div.sect2 .titlepage .title {
804 background: none;
805}
806
807
808h1.title {
809 background-color: transparent;
810 background-repeat: no-repeat;
811 height: 256px;
812 text-indent: -9000px;
813 overflow:hidden;
814}
815
816h2.subtitle {
817 background-color: transparent;
818 text-indent: -9000px;
819 overflow:hidden;
820 width: 0px;
821 display: none;
822}
823
824 /*************************************** /
825 / pippin.gimp.org specific alterations /
826/ ***************************************/
827
828/*
829div.heading, div.navheader {
830 color: #777;
831 font-size: 80%;
832 padding: 0;
833 margin: 0;
834 text-align: left;
835 position: absolute;
836 top: 0px;
837 left: 0px;
838 width: 100%;
839 height: 50px;
840 background: url('/gfx/heading_bg.png') transparent;
841 background-repeat: repeat-x;
842 background-attachment: fixed;
843 border: none;
844}
845
846div.heading a {
847 color: #444;
848}
849
850div.footing, div.navfooter {
851 border: none;
852 color: #ddd;
853 font-size: 80%;
854 text-align:right;
855
856 width: 100%;
857 padding-top: 10px;
858 position: absolute;
859 bottom: 0px;
860 left: 0px;
861
862 background: url('/gfx/footing_bg.png') transparent;
863}
864*/
865
866
867
868 /****************** /
869 / nasty ie tweaks /
870/ ******************/
871
872/*
873div.heading, div.navheader {
874 width:expression(document.body.clientWidth + "px");
875}
876
877div.footing, div.navfooter {
878 width:expression(document.body.clientWidth + "px");
879 margin-left:expression("-5em");
880}
881body {
882 padding:expression("4em 5em 0em 5em");
883}
884*/
885
886 /**************************************** /
887 / mozilla vendor specific css extensions /
888/ ****************************************/
889/*
890div.navfooter, div.footing{
891 -moz-opacity: 0.8em;
892}
893
894div.figure,
895div.table,
896div.informalfigure,
897div.informaltable,
898div.informalexample,
899div.example,
900.tip,
901.warning,
902.caution,
903.note {
904 -moz-border-radius: 0.5em;
905}
906
907b.keycap,
908.keycap {
909 -moz-border-radius: 0.3em;
910}
911*/
912
913table tr td table tr td {
914 display: none;
915}
916
917
918hr {
919 display: none;
920}
921
922table {
923 border: 0em;
924}
925
926 .photo {
927 float: right;
928 margin-left: 1.5em;
929 margin-bottom: 1.5em;
930 margin-top: 0em;
931 max-width: 17em;
932 border: 1px solid gray;
933 padding: 3px;
934 background: white;
935}
936 .seperator {
937 padding-top: 2em;
938 clear: both;
939 }
940
941 #validators {
942 margin-top: 5em;
943 text-align: right;
944 color: #777;
945 }
946 @media print {
947 body {
948 font-size: 8pt;
949 }
950 .noprint {
951 display: none;
952 }
953 }
954
955
956.tip,
957.note {
958 background: #f0f0f2;
959 color: #333;
960 padding: 20px;
961 margin: 20px;
962}
963
964.tip h3,
965.note h3 {
966 padding: 0em;
967 margin: 0em;
968 font-size: 2em;
969 font-weight: bold;
970 color: #333;
971}
972
973.tip a,
974.note a {
975 color: #333;
976 text-decoration: underline;
977}
978
979.footnote {
980 font-size: small;
981 color: #333;
982}
983
984/* Changes the announcement text */
985.tip h3,
986.warning h3,
987.caution h3,
988.note h3 {
989 font-size:large;
990 color: #00557D;
991}
diff --git a/documentation/overview-manual/overview-manual-concepts.xml b/documentation/overview-manual/overview-manual-concepts.xml
deleted file mode 100644
index 58b64bd269..0000000000
--- a/documentation/overview-manual/overview-manual-concepts.xml
+++ /dev/null
@@ -1,3235 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id=' overview-manual-concepts'>
7<title>Yocto Project Concepts</title>
8
9 <para>
10 This chapter provides explanations for Yocto Project concepts that
11 go beyond the surface of "how-to" information and reference (or
12 look-up) material.
13 Concepts such as components, the
14 <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>
15 workflow, cross-development toolchains, shared state cache, and so
16 forth are explained.
17 </para>
18
19 <section id='yocto-project-components'>
20 <title>Yocto Project Components</title>
21
22 <para>
23 The
24 <ulink url='&YOCTO_DOCS_REF_URL;#bitbake-term'>BitBake</ulink>
25 task executor together with various types of configuration files
26 form the
27 <ulink url='&YOCTO_DOCS_REF_URL;#oe-core'>OpenEmbedded-Core</ulink>.
28 This section overviews these components by describing their use and
29 how they interact.
30 </para>
31
32 <para>
33 BitBake handles the parsing and execution of the data files.
34 The data itself is of various types:
35 <itemizedlist>
36 <listitem><para>
37 <emphasis>Recipes:</emphasis>
38 Provides details about particular pieces of software.
39 </para></listitem>
40 <listitem><para>
41 <emphasis>Class Data:</emphasis>
42 Abstracts common build information (e.g. how to build a
43 Linux kernel).
44 </para></listitem>
45 <listitem><para>
46 <emphasis>Configuration Data:</emphasis>
47 Defines machine-specific settings, policy decisions, and
48 so forth.
49 Configuration data acts as the glue to bind everything
50 together.
51 </para></listitem>
52 </itemizedlist>
53 </para>
54
55 <para>
56 BitBake knows how to combine multiple data sources together and
57 refers to each data source as a layer.
58 For information on layers, see the
59 "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
60 section of the Yocto Project Development Tasks Manual.
61 </para>
62
63 <para>
64 Following are some brief details on these core components.
65 For additional information on how these components interact during
66 a build, see the
67 "<link linkend='openembedded-build-system-build-concepts'>OpenEmbedded Build System Concepts</link>"
68 section.
69 </para>
70
71 <section id='usingpoky-components-bitbake'>
72 <title>BitBake</title>
73
74 <para>
75 BitBake is the tool at the heart of the
76 <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>
77 and is responsible for parsing the
78 <ulink url='&YOCTO_DOCS_REF_URL;#metadata'>Metadata</ulink>,
79 generating a list of tasks from it, and then executing those
80 tasks.
81 </para>
82
83 <para>
84 This section briefly introduces BitBake.
85 If you want more information on BitBake, see the
86 <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>.
87 </para>
88
89 <para>
90 To see a list of the options BitBake supports, use either of
91 the following commands:
92 <literallayout class='monospaced'>
93 $ bitbake -h
94 $ bitbake --help
95 </literallayout>
96 </para>
97
98 <para>
99 The most common usage for BitBake is
100 <filename>bitbake <replaceable>packagename</replaceable></filename>,
101 where <filename>packagename</filename> is the name of the
102 package you want to build (referred to as the "target").
103 The target often equates to the first part of a recipe's
104 filename (e.g. "foo" for a recipe named
105 <filename>foo_1.3.0-r0.bb</filename>).
106 So, to process the
107 <filename>matchbox-desktop_1.2.3.bb</filename> recipe file, you
108 might type the following:
109 <literallayout class='monospaced'>
110 $ bitbake matchbox-desktop
111 </literallayout>
112 Several different versions of
113 <filename>matchbox-desktop</filename> might exist.
114 BitBake chooses the one selected by the distribution
115 configuration.
116 You can get more details about how BitBake chooses between
117 different target versions and providers in the
118 "<ulink url='&YOCTO_DOCS_BB_URL;#bb-bitbake-preferences'>Preferences</ulink>"
119 section of the BitBake User Manual.
120 </para>
121
122 <para>
123 BitBake also tries to execute any dependent tasks first.
124 So for example, before building
125 <filename>matchbox-desktop</filename>, BitBake would build a
126 cross compiler and <filename>glibc</filename> if they had not
127 already been built.
128 </para>
129
130 <para>
131 A useful BitBake option to consider is the
132 <filename>-k</filename> or <filename>--continue</filename>
133 option.
134 This option instructs BitBake to try and continue processing
135 the job as long as possible even after encountering an error.
136 When an error occurs, the target that failed and those that
137 depend on it cannot be remade.
138 However, when you use this option other dependencies can
139 still be processed.
140 </para>
141 </section>
142
143 <section id='overview-components-recipes'>
144 <title>Recipes</title>
145
146 <para>
147 Files that have the <filename>.bb</filename> suffix are
148 "recipes" files.
149 In general, a recipe contains information about a single piece
150 of software.
151 This information includes the location from which to download
152 the unaltered source, any source patches to be applied to that
153 source (if needed), which special configuration options to
154 apply, how to compile the source files, and how to package the
155 compiled output.
156 </para>
157
158 <para>
159 The term "package" is sometimes used to refer to recipes.
160 However, since the word "package" is used for the packaged
161 output from the OpenEmbedded build system (i.e.
162 <filename>.ipk</filename> or <filename>.deb</filename> files),
163 this document avoids using the term "package" when referring
164 to recipes.
165 </para>
166 </section>
167
168 <section id='overview-components-classes'>
169 <title>Classes</title>
170
171 <para>
172 Class files (<filename>.bbclass</filename>) contain information
173 that is useful to share between recipes files.
174 An example is the
175 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-autotools'><filename>autotools</filename></ulink>
176 class, which contains common settings for any application that
177 Autotools uses.
178 The
179 "<ulink url='&YOCTO_DOCS_REF_URL;#ref-classes'>Classes</ulink>"
180 chapter in the Yocto Project Reference Manual provides
181 details about classes and how to use them.
182 </para>
183 </section>
184
185 <section id='overview-components-configurations'>
186 <title>Configurations</title>
187
188 <para>
189 The configuration files (<filename>.conf</filename>) define
190 various configuration variables that govern the OpenEmbedded
191 build process.
192 These files fall into several areas that define machine
193 configuration options, distribution configuration options,
194 compiler tuning options, general common configuration options,
195 and user configuration options in
196 <filename>conf/local.conf</filename>, which is found in the
197 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
198 </para>
199 </section>
200 </section>
201
202 <section id='overview-layers'>
203 <title>Layers</title>
204
205 <para>
206 Layers are repositories that contain related metadata (i.e.
207 sets of instructions) that tell the OpenEmbedded build system how
208 to build a target.
209 Yocto Project's
210 <link linkend='the-yocto-project-layer-model'>layer model</link>
211 facilitates collaboration, sharing, customization, and reuse
212 within the Yocto Project development environment.
213 Layers logically separate information for your project.
214 For example, you can use a layer to hold all the configurations
215 for a particular piece of hardware.
216 Isolating hardware-specific configurations allows you to share
217 other metadata by using a different layer where that metadata
218 might be common across several pieces of hardware.
219 </para>
220
221 <para>
222 Many layers exist that work in the Yocto Project development
223 environment.
224 The
225 <ulink url='https://caffelli-staging.yoctoproject.org/software-overview/layers/'>Yocto Project Curated Layer Index</ulink>
226 and
227 <ulink url='http://layers.openembedded.org/layerindex/branch/master/layers/'>OpenEmbedded Layer Index</ulink>
228 both contain layers from which you can use or leverage.
229 </para>
230
231 <para>
232 By convention, layers in the Yocto Project follow a specific form.
233 Conforming to a known structure allows BitBake to make assumptions
234 during builds on where to find types of metadata.
235 You can find procedures and learn about tools (i.e.
236 <filename>bitbake-layers</filename>) for creating layers suitable
237 for the Yocto Project in the
238 "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
239 section of the Yocto Project Development Tasks Manual.
240 </para>
241 </section>
242
243 <section id="openembedded-build-system-build-concepts">
244 <title>OpenEmbedded Build System Concepts</title>
245
246 <para>
247 This section takes a more detailed look inside the build
248 process used by the
249 <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>,
250 which is the build system specific to the Yocto Project.
251 At the heart of the build system is BitBake, the task executor.
252 </para>
253
254 <para>
255 The following diagram represents the high-level workflow of a
256 build.
257 The remainder of this section expands on the fundamental input,
258 output, process, and metadata logical blocks that make up the
259 workflow.
260 </para>
261
262 <para id='general-workflow-figure'>
263 <imagedata fileref="figures/YP-flow-diagram.png" format="PNG" align='center' width="8in"/>
264 </para>
265
266 <para>
267 In general, the build's workflow consists of several functional
268 areas:
269 <itemizedlist>
270 <listitem><para>
271 <emphasis>User Configuration:</emphasis>
272 metadata you can use to control the build process.
273 </para></listitem>
274 <listitem><para>
275 <emphasis>Metadata Layers:</emphasis>
276 Various layers that provide software, machine, and
277 distro metadata.
278 </para></listitem>
279 <listitem><para>
280 <emphasis>Source Files:</emphasis>
281 Upstream releases, local projects, and SCMs.
282 </para></listitem>
283 <listitem><para>
284 <emphasis>Build System:</emphasis>
285 Processes under the control of
286 <ulink url='&YOCTO_DOCS_REF_URL;#bitbake-term'>BitBake</ulink>.
287 This block expands on how BitBake fetches source, applies
288 patches, completes compilation, analyzes output for package
289 generation, creates and tests packages, generates images,
290 and generates cross-development tools.
291 </para></listitem>
292 <listitem><para>
293 <emphasis>Package Feeds:</emphasis>
294 Directories containing output packages (RPM, DEB or IPK),
295 which are subsequently used in the construction of an
296 image or Software Development Kit (SDK), produced by the
297 build system.
298 These feeds can also be copied and shared using a web
299 server or other means to facilitate extending or updating
300 existing images on devices at runtime if runtime package
301 management is enabled.
302 </para></listitem>
303 <listitem><para>
304 <emphasis>Images:</emphasis>
305 Images produced by the workflow.
306 </para></listitem>
307 <listitem><para>
308 <emphasis>Application Development SDK:</emphasis>
309 Cross-development tools that are produced along with
310 an image or separately with BitBake.
311 </para></listitem>
312 </itemizedlist>
313 </para>
314
315 <section id="user-configuration">
316 <title>User Configuration</title>
317
318 <para>
319 User configuration helps define the build.
320 Through user configuration, you can tell BitBake the
321 target architecture for which you are building the image,
322 where to store downloaded source, and other build properties.
323 </para>
324
325 <para>
326 The following figure shows an expanded representation of the
327 "User Configuration" box of the
328 <link linkend='general-workflow-figure'>general workflow figure</link>:
329 </para>
330
331 <para>
332 <imagedata fileref="figures/user-configuration.png" align="center" width="8in" depth="4.5in" />
333 </para>
334
335 <para>
336 BitBake needs some basic configuration files in order to
337 complete a build.
338 These files are <filename>*.conf</filename> files.
339 The minimally necessary ones reside as example files in the
340 <filename>build/conf</filename> directory of the
341 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
342 For simplicity, this section refers to the Source Directory as
343 the "Poky Directory."
344 </para>
345
346 <para>
347 When you clone the
348 <ulink url='&YOCTO_DOCS_REF_URL;#poky'>Poky</ulink>
349 Git repository or you download and unpack a Yocto Project
350 release, you can set up the Source Directory to be named
351 anything you want.
352 For this discussion, the cloned repository uses the default
353 name <filename>poky</filename>.
354 <note>
355 The Poky repository is primarily an aggregation of existing
356 repositories.
357 It is not a canonical upstream source.
358 </note>
359 </para>
360
361 <para>
362 The <filename>meta-poky</filename> layer inside Poky contains
363 a <filename>conf</filename> directory that has example
364 configuration files.
365 These example files are used as a basis for creating actual
366 configuration files when you source
367 <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>,
368 which is the build environment script.
369 </para>
370
371 <para>
372 Sourcing the build environment script creates a
373 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
374 if one does not already exist.
375 BitBake uses the Build Directory for all its work during
376 builds.
377 The Build Directory has a <filename>conf</filename> directory
378 that contains default versions of your
379 <filename>local.conf</filename> and
380 <filename>bblayers.conf</filename> configuration files.
381 These default configuration files are created only if versions
382 do not already exist in the Build Directory at the time you
383 source the build environment setup script.
384 </para>
385
386 <para>
387 Because the Poky repository is fundamentally an aggregation of
388 existing repositories, some users might be familiar with
389 running the <filename>&OE_INIT_FILE;</filename> script
390 in the context of separate
391 <ulink url='&YOCTO_DOCS_REF_URL;#oe-core'>OpenEmbedded-Core</ulink>
392 and BitBake repositories rather than a single Poky repository.
393 This discussion assumes the script is executed from
394 within a cloned or unpacked version of Poky.
395 </para>
396
397 <para>
398 Depending on where the script is sourced, different
399 sub-scripts are called to set up the Build Directory
400 (Yocto or OpenEmbedded).
401 Specifically, the script
402 <filename>scripts/oe-setup-builddir</filename> inside the
403 poky directory sets up the Build Directory and seeds the
404 directory (if necessary) with configuration files appropriate
405 for the Yocto Project development environment.
406 <note>
407 The <filename>scripts/oe-setup-builddir</filename> script
408 uses the <filename>$TEMPLATECONF</filename> variable to
409 determine which sample configuration files to locate.
410 </note>
411 </para>
412
413 <para>
414 The <filename>local.conf</filename> file provides many
415 basic variables that define a build environment.
416 Here is a list of a few.
417 To see the default configurations in a
418 <filename>local.conf</filename> file created by the build
419 environment script, see the
420 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta-poky/conf/local.conf.sample'><filename>local.conf.sample</filename></ulink>
421 in the <filename>meta-poky</filename> layer:
422 <itemizedlist>
423 <listitem><para>
424 <emphasis>Target Machine Selection:</emphasis>
425 Controlled by the
426 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
427 variable.
428 </para></listitem>
429 <listitem><para>
430 <emphasis>Download Directory:</emphasis>
431 Controlled by the
432 <ulink url='&YOCTO_DOCS_REF_URL;#var-DL_DIR'><filename>DL_DIR</filename></ulink>
433 variable.
434 </para></listitem>
435 <listitem><para>
436 <emphasis>Shared State Directory:</emphasis>
437 Controlled by the
438 <ulink url='&YOCTO_DOCS_REF_URL;#var-SSTATE_DIR'><filename>SSTATE_DIR</filename></ulink>
439 variable.
440 </para></listitem>
441 <listitem><para>
442 <emphasis>Build Output:</emphasis>
443 Controlled by the
444 <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>
445 variable.
446 </para></listitem>
447 <listitem><para>
448 <emphasis>Distribution Policy:</emphasis>
449 Controlled by the
450 <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO'><filename>DISTRO</filename></ulink>
451 variable.
452 </para></listitem>
453 <listitem><para>
454 <emphasis>Packaging Format:</emphasis>
455 Controlled by the
456 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></ulink>
457 variable.
458 </para></listitem>
459 <listitem><para>
460 <emphasis>SDK Target Architecture:</emphasis>
461 Controlled by the
462 <ulink url='&YOCTO_DOCS_REF_URL;#var-SDKMACHINE'><filename>SDKMACHINE</filename></ulink>
463 variable.
464 </para></listitem>
465 <listitem><para>
466 <emphasis>Extra Image Packages:</emphasis>
467 Controlled by the
468 <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_IMAGE_FEATURES'><filename>EXTRA_IMAGE_FEATURES</filename></ulink>
469 variable.
470 </para></listitem>
471 </itemizedlist>
472 <note>
473 Configurations set in the
474 <filename>conf/local.conf</filename> file can also be set
475 in the <filename>conf/site.conf</filename> and
476 <filename>conf/auto.conf</filename> configuration files.
477 </note>
478 </para>
479
480 <para>
481 The <filename>bblayers.conf</filename> file tells BitBake what
482 layers you want considered during the build.
483 By default, the layers listed in this file include layers
484 minimally needed by the build system.
485 However, you must manually add any custom layers you have
486 created.
487 You can find more information on working with the
488 <filename>bblayers.conf</filename> file in the
489 "<ulink url='&YOCTO_DOCS_DEV_URL;#enabling-your-layer'>Enabling Your Layer</ulink>"
490 section in the Yocto Project Development Tasks Manual.
491 </para>
492
493 <para>
494 The files <filename>site.conf</filename> and
495 <filename>auto.conf</filename> are not created by the
496 environment initialization script.
497 If you want the <filename>site.conf</filename> file, you
498 need to create that yourself.
499 The <filename>auto.conf</filename> file is typically created by
500 an autobuilder:
501 <itemizedlist>
502 <listitem><para>
503 <emphasis><filename>site.conf</filename>:</emphasis>
504 You can use the <filename>conf/site.conf</filename>
505 configuration file to configure multiple
506 build directories.
507 For example, suppose you had several build environments
508 and they shared some common features.
509 You can set these default build properties here.
510 A good example is perhaps the packaging format to use
511 through the
512 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></ulink>
513 variable.</para>
514
515 <para>One useful scenario for using the
516 <filename>conf/site.conf</filename> file is to extend
517 your
518 <ulink url='&YOCTO_DOCS_REF_URL;#var-BBPATH'><filename>BBPATH</filename></ulink>
519 variable to include the path to a
520 <filename>conf/site.conf</filename>.
521 Then, when BitBake looks for Metadata using
522 <filename>BBPATH</filename>, it finds the
523 <filename>conf/site.conf</filename> file and applies
524 your common configurations found in the file.
525 To override configurations in a particular build
526 directory, alter the similar configurations within
527 that build directory's
528 <filename>conf/local.conf</filename> file.
529 </para></listitem>
530 <listitem><para>
531 <emphasis><filename>auto.conf</filename>:</emphasis>
532 The file is usually created and written to by
533 an autobuilder.
534 The settings put into the file are typically the
535 same as you would find in the
536 <filename>conf/local.conf</filename> or the
537 <filename>conf/site.conf</filename> files.
538 </para></listitem>
539 </itemizedlist>
540 </para>
541
542 <para>
543 You can edit all configuration files to further define
544 any particular build environment.
545 This process is represented by the "User Configuration Edits"
546 box in the figure.
547 </para>
548
549 <para>
550 When you launch your build with the
551 <filename>bitbake <replaceable>target</replaceable></filename>
552 command, BitBake sorts out the configurations to ultimately
553 define your build environment.
554 It is important to understand that the
555 <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>
556 reads the configuration files in a specific order:
557 <filename>site.conf</filename>, <filename>auto.conf</filename>,
558 and <filename>local.conf</filename>.
559 And, the build system applies the normal assignment statement
560 rules as described in the
561 "<ulink url='&YOCTO_DOCS_BB_URL;#bitbake-user-manual-metadata'>Syntax and Operators</ulink>"
562 chapter of the BitBake User Manual.
563 Because the files are parsed in a specific order, variable
564 assignments for the same variable could be affected.
565 For example, if the <filename>auto.conf</filename> file and
566 the <filename>local.conf</filename> set
567 <replaceable>variable1</replaceable> to different values,
568 because the build system parses <filename>local.conf</filename>
569 after <filename>auto.conf</filename>,
570 <replaceable>variable1</replaceable> is assigned the value from
571 the <filename>local.conf</filename> file.
572 </para>
573 </section>
574
575 <section id="metadata-machine-configuration-and-policy-configuration">
576 <title>Metadata, Machine Configuration, and Policy Configuration</title>
577
578 <para>
579 The previous section described the user configurations that
580 define BitBake's global behavior.
581 This section takes a closer look at the layers the build system
582 uses to further control the build.
583 These layers provide Metadata for the software, machine, and
584 policies.
585 </para>
586
587 <para>
588 In general, three types of layer input exists.
589 You can see them below the "User Configuration" box in the
590 <link linkend='general-workflow-figure'>general workflow figure</link>:
591 <itemizedlist>
592 <listitem><para>
593 <emphasis>Metadata (<filename>.bb</filename> + Patches):</emphasis>
594 Software layers containing user-supplied recipe files,
595 patches, and append files.
596 A good example of a software layer might be the
597 <ulink url='https://github.com/meta-qt5/meta-qt5'><filename>meta-qt5</filename></ulink>
598 layer from the
599 <ulink url='http://layers.openembedded.org/layerindex/branch/master/layers/'>OpenEmbedded Layer Index</ulink>.
600 This layer is for version 5.0 of the popular
601 <ulink url='https://wiki.qt.io/About_Qt'>Qt</ulink>
602 cross-platform application development framework for
603 desktop, embedded and mobile.
604 </para></listitem>
605 <listitem><para>
606 <emphasis>Machine BSP Configuration:</emphasis>
607 Board Support Package (BSP) layers (i.e. "BSP Layer"
608 in the following figure) providing machine-specific
609 configurations.
610 This type of information is specific to a particular
611 target architecture.
612 A good example of a BSP layer from the
613 <link linkend='gs-reference-distribution-poky'>Poky Reference Distribution</link>
614 is the
615 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta-yocto-bsp'><filename>meta-yocto-bsp</filename></ulink>
616 layer.
617 </para></listitem>
618 <listitem><para>
619 <emphasis>Policy Configuration:</emphasis>
620 Distribution Layers (i.e. "Distro Layer" in the
621 following figure) providing top-level or general
622 policies for the images or SDKs being built for a
623 particular distribution.
624 For example, in the Poky Reference Distribution the
625 distro layer is the
626 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta-poky'><filename>meta-poky</filename></ulink>
627 layer.
628 Within the distro layer is a
629 <filename>conf/distro</filename> directory that
630 contains distro configuration files (e.g.
631 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta-poky/conf/distro/poky.conf'><filename>poky.conf</filename></ulink>
632 that contain many policy configurations for the
633 Poky distribution.
634 </para></listitem>
635 </itemizedlist>
636 </para>
637
638 <para>
639 The following figure shows an expanded representation of
640 these three layers from the
641 <link linkend='general-workflow-figure'>general workflow figure</link>:
642 </para>
643
644 <para>
645 <imagedata fileref="figures/layer-input.png" align="center" width="8in" depth="8in" />
646 </para>
647
648 <para>
649 In general, all layers have a similar structure.
650 They all contain a licensing file
651 (e.g. <filename>COPYING.MIT</filename>) if the layer is to be
652 distributed, a <filename>README</filename> file as good
653 practice and especially if the layer is to be distributed, a
654 configuration directory, and recipe directories.
655 You can learn about the general structure for layers used with
656 the Yocto Project in the
657 "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-your-own-layer'>Creating Your Own Layer</ulink>"
658 section in the Yocto Project Development Tasks Manual.
659 For a general discussion on layers and the many layers from
660 which you can draw, see the
661 "<link linkend='overview-layers'>Layers</link>" and
662 "<link linkend='the-yocto-project-layer-model'>The Yocto Project Layer Model</link>"
663 sections both earlier in this manual.
664 </para>
665
666 <para>
667 If you explored the previous links, you discovered some
668 areas where many layers that work with the Yocto Project
669 exist.
670 The
671 <ulink url="http://git.yoctoproject.org/">Source Repositories</ulink>
672 also shows layers categorized under "Yocto Metadata Layers."
673 <note>
674 Layers exist in the Yocto Project Source Repositories that
675 cannot be found in the OpenEmbedded Layer Index.
676 These layers are either deprecated or experimental
677 in nature.
678 </note>
679 </para>
680
681 <para>
682 BitBake uses the <filename>conf/bblayers.conf</filename> file,
683 which is part of the user configuration, to find what layers it
684 should be using as part of the build.
685 </para>
686
687 <section id="distro-layer">
688 <title>Distro Layer</title>
689
690 <para>
691 The distribution layer provides policy configurations for
692 your distribution.
693 Best practices dictate that you isolate these types of
694 configurations into their own layer.
695 Settings you provide in
696 <filename>conf/distro/<replaceable>distro</replaceable>.conf</filename> override
697 similar settings that BitBake finds in your
698 <filename>conf/local.conf</filename> file in the Build
699 Directory.
700 </para>
701
702 <para>
703 The following list provides some explanation and references
704 for what you typically find in the distribution layer:
705 <itemizedlist>
706 <listitem><para>
707 <emphasis>classes:</emphasis>
708 Class files (<filename>.bbclass</filename>) hold
709 common functionality that can be shared among
710 recipes in the distribution.
711 When your recipes inherit a class, they take on the
712 settings and functions for that class.
713 You can read more about class files in the
714 "<ulink url='&YOCTO_DOCS_REF_URL;#ref-classes'>Classes</ulink>"
715 chapter of the Yocto Reference Manual.
716 </para></listitem>
717 <listitem><para>
718 <emphasis>conf:</emphasis>
719 This area holds configuration files for the
720 layer (<filename>conf/layer.conf</filename>),
721 the distribution
722 (<filename>conf/distro/<replaceable>distro</replaceable>.conf</filename>),
723 and any distribution-wide include files.
724 </para></listitem>
725 <listitem><para>
726 <emphasis>recipes-*:</emphasis>
727 Recipes and append files that affect common
728 functionality across the distribution.
729 This area could include recipes and append files
730 to add distribution-specific configuration,
731 initialization scripts, custom image recipes,
732 and so forth.
733 Examples of <filename>recipes-*</filename>
734 directories are <filename>recipes-core</filename>
735 and <filename>recipes-extra</filename>.
736 Hierarchy and contents within a
737 <filename>recipes-*</filename> directory can vary.
738 Generally, these directories contain recipe files
739 (<filename>*.bb</filename>), recipe append files
740 (<filename>*.bbappend</filename>), directories
741 that are distro-specific for configuration files,
742 and so forth.
743 </para></listitem>
744 </itemizedlist>
745 </para>
746 </section>
747
748 <section id="bsp-layer">
749 <title>BSP Layer</title>
750
751 <para>
752 The BSP Layer provides machine configurations that
753 target specific hardware.
754 Everything in this layer is specific to the machine for
755 which you are building the image or the SDK.
756 A common structure or form is defined for BSP layers.
757 You can learn more about this structure in the
758 <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>.
759 <note>
760 In order for a BSP layer to be considered compliant
761 with the Yocto Project, it must meet some structural
762 requirements.
763 </note>
764 </para>
765
766 <para>
767 The BSP Layer's configuration directory contains
768 configuration files for the machine
769 (<filename>conf/machine/<replaceable>machine</replaceable>.conf</filename>)
770 and, of course, the layer
771 (<filename>conf/layer.conf</filename>).
772 </para>
773
774 <para>
775 The remainder of the layer is dedicated to specific recipes
776 by function: <filename>recipes-bsp</filename>,
777 <filename>recipes-core</filename>,
778 <filename>recipes-graphics</filename>,
779 <filename>recipes-kernel</filename>, and so forth.
780 Metadata can exist for multiple formfactors, graphics
781 support systems, and so forth.
782 <note>
783 While the figure shows several
784 <filename>recipes-*</filename> directories, not all
785 these directories appear in all BSP layers.
786 </note>
787 </para>
788 </section>
789
790 <section id="software-layer">
791 <title>Software Layer</title>
792
793 <para>
794 The software layer provides the Metadata for additional
795 software packages used during the build.
796 This layer does not include Metadata that is specific to
797 the distribution or the machine, which are found in their
798 respective layers.
799 </para>
800
801 <para>
802 This layer contains any recipes, append files, and
803 patches, that your project needs.
804 </para>
805 </section>
806 </section>
807
808 <section id="sources-dev-environment">
809 <title>Sources</title>
810
811 <para>
812 In order for the OpenEmbedded build system to create an
813 image or any target, it must be able to access source files.
814 The
815 <link linkend='general-workflow-figure'>general workflow figure</link>
816 represents source files using the "Upstream Project Releases",
817 "Local Projects", and "SCMs (optional)" boxes.
818 The figure represents mirrors, which also play a role in
819 locating source files, with the "Source Materials" box.
820 </para>
821
822 <para>
823 The method by which source files are ultimately organized is
824 a function of the project.
825 For example, for released software, projects tend to use
826 tarballs or other archived files that can capture the
827 state of a release guaranteeing that it is statically
828 represented.
829 On the other hand, for a project that is more dynamic or
830 experimental in nature, a project might keep source files in a
831 repository controlled by a Source Control Manager (SCM) such as
832 Git.
833 Pulling source from a repository allows you to control
834 the point in the repository (the revision) from which you
835 want to build software.
836 Finally, a combination of the two might exist, which would
837 give the consumer a choice when deciding where to get
838 source files.
839 </para>
840
841 <para>
842 BitBake uses the
843 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
844 variable to point to source files regardless of their location.
845 Each recipe must have a <filename>SRC_URI</filename> variable
846 that points to the source.
847 </para>
848
849 <para>
850 Another area that plays a significant role in where source
851 files come from is pointed to by the
852 <ulink url='&YOCTO_DOCS_REF_URL;#var-DL_DIR'><filename>DL_DIR</filename></ulink>
853 variable.
854 This area is a cache that can hold previously downloaded
855 source.
856 You can also instruct the OpenEmbedded build system to create
857 tarballs from Git repositories, which is not the default
858 behavior, and store them in the <filename>DL_DIR</filename>
859 by using the
860 <ulink url='&YOCTO_DOCS_REF_URL;#var-BB_GENERATE_MIRROR_TARBALLS'><filename>BB_GENERATE_MIRROR_TARBALLS</filename></ulink>
861 variable.
862 </para>
863
864 <para>
865 Judicious use of a <filename>DL_DIR</filename> directory can
866 save the build system a trip across the Internet when looking
867 for files.
868 A good method for using a download directory is to have
869 <filename>DL_DIR</filename> point to an area outside of your
870 Build Directory.
871 Doing so allows you to safely delete the Build Directory
872 if needed without fear of removing any downloaded source file.
873 </para>
874
875 <para>
876 The remainder of this section provides a deeper look into the
877 source files and the mirrors.
878 Here is a more detailed look at the source file area of the
879 <link linkend='general-workflow-figure'>general workflow figure</link>:
880 </para>
881
882 <para>
883 <imagedata fileref="figures/source-input.png" width="6in" depth="6in" align="center" />
884 </para>
885
886 <section id='upstream-project-releases'>
887 <title>Upstream Project Releases</title>
888
889 <para>
890 Upstream project releases exist anywhere in the form of an
891 archived file (e.g. tarball or zip file).
892 These files correspond to individual recipes.
893 For example, the figure uses specific releases each for
894 BusyBox, Qt, and Dbus.
895 An archive file can be for any released product that can be
896 built using a recipe.
897 </para>
898 </section>
899
900 <section id='local-projects'>
901 <title>Local Projects</title>
902
903 <para>
904 Local projects are custom bits of software the user
905 provides.
906 These bits reside somewhere local to a project - perhaps
907 a directory into which the user checks in items (e.g.
908 a local directory containing a development source tree
909 used by the group).
910 </para>
911
912 <para>
913 The canonical method through which to include a local
914 project is to use the
915 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-externalsrc'><filename>externalsrc</filename></ulink>
916 class to include that local project.
917 You use either the <filename>local.conf</filename> or a
918 recipe's append file to override or set the
919 recipe to point to the local directory on your disk to pull
920 in the whole source tree.
921 </para>
922 </section>
923
924 <section id='scms'>
925 <title>Source Control Managers (Optional)</title>
926
927 <para>
928 Another place from which the build system can get source
929 files is with
930 <ulink url='&YOCTO_DOCS_BB_URL;#bb-fetchers'>fetchers</ulink>
931 employing various Source Control Managers (SCMs) such as
932 Git or Subversion.
933 In such cases, a repository is cloned or checked out.
934 The
935 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-fetch'><filename>do_fetch</filename></ulink>
936 task inside BitBake uses
937 the <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
938 variable and the argument's prefix to determine the correct
939 fetcher module.
940 <note>
941 For information on how to have the OpenEmbedded build
942 system generate tarballs for Git repositories and place
943 them in the
944 <ulink url='&YOCTO_DOCS_REF_URL;#var-DL_DIR'><filename>DL_DIR</filename></ulink>
945 directory, see the
946 <ulink url='&YOCTO_DOCS_REF_URL;#var-BB_GENERATE_MIRROR_TARBALLS'><filename>BB_GENERATE_MIRROR_TARBALLS</filename></ulink>
947 variable in the Yocto Project Reference Manual.
948 </note>
949 </para>
950
951 <para>
952 When fetching a repository, BitBake uses the
953 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRCREV'><filename>SRCREV</filename></ulink>
954 variable to determine the specific revision from which to
955 build.
956 </para>
957 </section>
958
959 <section id='source-mirrors'>
960 <title>Source Mirror(s)</title>
961
962 <para>
963 Two kinds of mirrors exist: pre-mirrors and regular
964 mirrors.
965 The
966 <ulink url='&YOCTO_DOCS_REF_URL;#var-PREMIRRORS'><filename>PREMIRRORS</filename></ulink>
967 and
968 <ulink url='&YOCTO_DOCS_REF_URL;#var-MIRRORS'><filename>MIRRORS</filename></ulink>
969 variables point to these, respectively.
970 BitBake checks pre-mirrors before looking upstream for any
971 source files.
972 Pre-mirrors are appropriate when you have a shared
973 directory that is not a directory defined by the
974 <ulink url='&YOCTO_DOCS_REF_URL;#var-DL_DIR'><filename>DL_DIR</filename></ulink>
975 variable.
976 A Pre-mirror typically points to a shared directory that is
977 local to your organization.
978 </para>
979
980 <para>
981 Regular mirrors can be any site across the Internet
982 that is used as an alternative location for source
983 code should the primary site not be functioning for
984 some reason or another.
985 </para>
986 </section>
987 </section>
988
989 <section id="package-feeds-dev-environment">
990 <title>Package Feeds</title>
991
992 <para>
993 When the OpenEmbedded build system generates an image or an
994 SDK, it gets the packages from a package feed area located
995 in the
996 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
997 The
998 <link linkend='general-workflow-figure'>general workflow figure</link>
999 shows this package feeds area in the upper-right corner.
1000 </para>
1001
1002 <para>
1003 This section looks a little closer into the package feeds
1004 area used by the build system.
1005 Here is a more detailed look at the area:
1006 <imagedata fileref="figures/package-feeds.png" align="center" width="7in" depth="6in" />
1007 </para>
1008
1009 <para>
1010 Package feeds are an intermediary step in the build process.
1011 The OpenEmbedded build system provides classes to generate
1012 different package types, and you specify which classes to
1013 enable through the
1014 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></ulink>
1015 variable.
1016 Before placing the packages into package feeds,
1017 the build process validates them with generated output quality
1018 assurance checks through the
1019 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-insane'><filename>insane</filename></ulink>
1020 class.
1021 </para>
1022
1023 <para>
1024 The package feed area resides in the Build Directory.
1025 The directory the build system uses to temporarily store
1026 packages is determined by a combination of variables and the
1027 particular package manager in use.
1028 See the "Package Feeds" box in the illustration and note the
1029 information to the right of that area.
1030 In particular, the following defines where package files are
1031 kept:
1032 <itemizedlist>
1033 <listitem><para>
1034 <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></ulink>:
1035 Defined as <filename>tmp/deploy</filename> in the Build
1036 Directory.
1037 </para></listitem>
1038 <listitem><para>
1039 <filename>DEPLOY_DIR_*</filename>:
1040 Depending on the package manager used, the package type
1041 sub-folder.
1042 Given RPM, IPK, or DEB packaging and tarball creation,
1043 the
1044 <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPLOY_DIR_RPM'><filename>DEPLOY_DIR_RPM</filename></ulink>,
1045 <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPLOY_DIR_IPK'><filename>DEPLOY_DIR_IPK</filename></ulink>,
1046 <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPLOY_DIR_DEB'><filename>DEPLOY_DIR_DEB</filename></ulink>,
1047 or
1048 <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPLOY_DIR_TAR'><filename>DEPLOY_DIR_TAR</filename></ulink>,
1049 variables are used, respectively.
1050 </para></listitem>
1051 <listitem><para>
1052 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_ARCH'><filename>PACKAGE_ARCH</filename></ulink>:
1053 Defines architecture-specific sub-folders.
1054 For example, packages could exist for the i586 or
1055 qemux86 architectures.
1056 </para></listitem>
1057 </itemizedlist>
1058 </para>
1059
1060 <para>
1061 BitBake uses the
1062 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-package_write_deb'><filename>do_package_write_*</filename></ulink>
1063 tasks to generate packages and place them into the package
1064 holding area (e.g. <filename>do_package_write_ipk</filename>
1065 for IPK packages).
1066 See the
1067 "<ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-package_write_deb'><filename>do_package_write_deb</filename></ulink>",
1068 "<ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-package_write_ipk'><filename>do_package_write_ipk</filename></ulink>",
1069 "<ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-package_write_rpm'><filename>do_package_write_rpm</filename></ulink>",
1070 and
1071 "<ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-package_write_tar'><filename>do_package_write_tar</filename></ulink>"
1072 sections in the Yocto Project Reference Manual
1073 for additional information.
1074 As an example, consider a scenario where an IPK packaging
1075 manager is being used and package architecture support for
1076 both i586 and qemux86 exist.
1077 Packages for the i586 architecture are placed in
1078 <filename>build/tmp/deploy/ipk/i586</filename>, while packages
1079 for the qemux86 architecture are placed in
1080 <filename>build/tmp/deploy/ipk/qemux86</filename>.
1081 </para>
1082 </section>
1083
1084 <section id='bitbake-dev-environment'>
1085 <title>BitBake</title>
1086
1087 <para>
1088 The OpenEmbedded build system uses
1089 <ulink url='&YOCTO_DOCS_REF_URL;#bitbake-term'>BitBake</ulink>
1090 to produce images and Software Development Kits (SDKs).
1091 You can see from the
1092 <link linkend='general-workflow-figure'>general workflow figure</link>,
1093 the BitBake area consists of several functional areas.
1094 This section takes a closer look at each of those areas.
1095 <note>
1096 Separate documentation exists for the BitBake tool.
1097 See the
1098 <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>
1099 for reference material on BitBake.
1100 </note>
1101 </para>
1102
1103 <section id='source-fetching-dev-environment'>
1104 <title>Source Fetching</title>
1105
1106 <para>
1107 The first stages of building a recipe are to fetch and
1108 unpack the source code:
1109 <imagedata fileref="figures/source-fetching.png" align="center" width="6.5in" depth="5in" />
1110 </para>
1111
1112 <para>
1113 The
1114 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-fetch'><filename>do_fetch</filename></ulink>
1115 and
1116 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-unpack'><filename>do_unpack</filename></ulink>
1117 tasks fetch the source files and unpack them into the
1118 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
1119 <note>
1120 For every local file (e.g. <filename>file://</filename>)
1121 that is part of a recipe's
1122 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
1123 statement, the OpenEmbedded build system takes a
1124 checksum of the file for the recipe and inserts the
1125 checksum into the signature for the
1126 <filename>do_fetch</filename> task.
1127 If any local file has been modified, the
1128 <filename>do_fetch</filename> task and all tasks that
1129 depend on it are re-executed.
1130 </note>
1131 By default, everything is accomplished in the Build
1132 Directory, which has a defined structure.
1133 For additional general information on the Build Directory,
1134 see the
1135 "<ulink url='&YOCTO_DOCS_REF_URL;#structure-core-build'><filename>build/</filename></ulink>"
1136 section in the Yocto Project Reference Manual.
1137 </para>
1138
1139 <para>
1140 Each recipe has an area in the Build Directory where the
1141 unpacked source code resides.
1142 The
1143 <ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink>
1144 variable points to this area for a recipe's unpacked source
1145 code.
1146 The name of that directory for any given recipe is defined
1147 from several different variables.
1148 The preceding figure and the following list describe
1149 the Build Directory's hierarchy:
1150 <itemizedlist>
1151 <listitem><para>
1152 <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>:
1153 The base directory where the OpenEmbedded build
1154 system performs all its work during the build.
1155 The default base directory is the
1156 <filename>tmp</filename> directory.
1157 </para></listitem>
1158 <listitem><para>
1159 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_ARCH'><filename>PACKAGE_ARCH</filename></ulink>:
1160 The architecture of the built package or packages.
1161 Depending on the eventual destination of the
1162 package or packages (i.e. machine architecture,
1163 <ulink url='&YOCTO_DOCS_REF_URL;#hardware-build-system-term'>build host</ulink>,
1164 SDK, or specific machine),
1165 <filename>PACKAGE_ARCH</filename> varies.
1166 See the variable's description for details.
1167 </para></listitem>
1168 <listitem><para>
1169 <ulink url='&YOCTO_DOCS_REF_URL;#var-TARGET_OS'><filename>TARGET_OS</filename></ulink>:
1170 The operating system of the target device.
1171 A typical value would be "linux" (e.g.
1172 "qemux86-poky-linux").
1173 </para></listitem>
1174 <listitem><para>
1175 <ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink>:
1176 The name of the recipe used to build the package.
1177 This variable can have multiple meanings.
1178 However, when used in the context of input files,
1179 <filename>PN</filename> represents the the name
1180 of the recipe.
1181 </para></listitem>
1182 <listitem><para>
1183 <ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink>:
1184 The location where the OpenEmbedded build system
1185 builds a recipe (i.e. does the work to create the
1186 package).
1187 <itemizedlist>
1188 <listitem><para>
1189 <ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>:
1190 The version of the recipe used to build the
1191 package.
1192 </para></listitem>
1193 <listitem><para>
1194 <ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink>:
1195 The revision of the recipe used to build the
1196 package.
1197 </para></listitem>
1198 </itemizedlist>
1199 </para></listitem>
1200 <listitem><para>
1201 <ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink>:
1202 Contains the unpacked source files for a given
1203 recipe.
1204 <itemizedlist>
1205 <listitem><para>
1206 <ulink url='&YOCTO_DOCS_REF_URL;#var-BPN'><filename>BPN</filename></ulink>:
1207 The name of the recipe used to build the
1208 package.
1209 The <filename>BPN</filename> variable is
1210 a version of the <filename>PN</filename>
1211 variable but with common prefixes and
1212 suffixes removed.
1213 </para></listitem>
1214 <listitem><para>
1215 <ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>:
1216 The version of the recipe used to build the
1217 package.
1218 </para></listitem>
1219 </itemizedlist>
1220 </para></listitem>
1221 </itemizedlist>
1222 <note>
1223 In the previous figure, notice that two sample
1224 hierarchies exist: one based on package architecture (i.e.
1225 <filename>PACKAGE_ARCH</filename>) and one based on a
1226 machine (i.e. <filename>MACHINE</filename>).
1227 The underlying structures are identical.
1228 The differentiator being what the OpenEmbedded build
1229 system is using as a build target (e.g. general
1230 architecture, a build host, an SDK, or a specific
1231 machine).
1232 </note>
1233 </para>
1234 </section>
1235
1236 <section id='patching-dev-environment'>
1237 <title>Patching</title>
1238
1239 <para>
1240 Once source code is fetched and unpacked, BitBake locates
1241 patch files and applies them to the source files:
1242 <imagedata fileref="figures/patching.png" align="center" width="7in" depth="6in" />
1243 </para>
1244
1245 <para>
1246 The
1247 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-patch'><filename>do_patch</filename></ulink>
1248 task uses a recipe's
1249 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
1250 statements and the
1251 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESPATH'><filename>FILESPATH</filename></ulink>
1252 variable to locate applicable patch files.
1253 </para>
1254
1255 <para>
1256 Default processing for patch files assumes the files have
1257 either <filename>*.patch</filename> or
1258 <filename>*.diff</filename> file types.
1259 You can use <filename>SRC_URI</filename> parameters to
1260 change the way the build system recognizes patch files.
1261 See the
1262 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-patch'><filename>do_patch</filename></ulink>
1263 task for more information.
1264 </para>
1265
1266 <para>
1267 BitBake finds and applies multiple patches for a single
1268 recipe in the order in which it locates the patches.
1269 The <filename>FILESPATH</filename> variable defines the
1270 default set of directories that the build system uses to
1271 search for patch files.
1272 Once found, patches are applied to the recipe's source
1273 files, which are located in the
1274 <ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink>
1275 directory.
1276 </para>
1277
1278 <para>
1279 For more information on how the source directories are
1280 created, see the
1281 "<link linkend='source-fetching-dev-environment'>Source Fetching</link>"
1282 section.
1283 For more information on how to create patches and how the
1284 build system processes patches, see the
1285 "<ulink url='&YOCTO_DOCS_DEV_URL;#new-recipe-patching-code'>Patching Code</ulink>"
1286 section in the Yocto Project Development Tasks Manual.
1287 You can also see the
1288 "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-devtool-use-devtool-modify-to-modify-the-source-of-an-existing-component'>Use <filename>devtool modify</filename> to Modify the Source of an Existing Component</ulink>"
1289 section in the Yocto Project Application Development and
1290 the Extensible Software Development Kit (SDK) manual and
1291 the
1292 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#using-traditional-kernel-development-to-patch-the-kernel'>Using Traditional Kernel Development to Patch the Kernel</ulink>"
1293 section in the Yocto Project Linux Kernel Development
1294 Manual.
1295 </para>
1296 </section>
1297
1298 <section id='configuration-compilation-and-staging-dev-environment'>
1299 <title>Configuration, Compilation, and Staging</title>
1300
1301 <para>
1302 After source code is patched, BitBake executes tasks that
1303 configure and compile the source code.
1304 Once compilation occurs, the files are copied to a holding
1305 area (staged) in preparation for packaging:
1306 <imagedata fileref="figures/configuration-compile-autoreconf.png" align="center" width="7in" depth="5in" />
1307 </para>
1308
1309 <para>
1310 This step in the build process consists of the following
1311 tasks:
1312 <itemizedlist>
1313 <listitem><para>
1314 <emphasis><ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-prepare_recipe_sysroot'><filename>do_prepare_recipe_sysroot</filename></ulink></emphasis>:
1315 This task sets up the two sysroots in
1316 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink><filename>}</filename>
1317 (i.e. <filename>recipe-sysroot</filename> and
1318 <filename>recipe-sysroot-native</filename>) so that
1319 during the packaging phase the sysroots can contain
1320 the contents of the
1321 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-populate_sysroot'><filename>do_populate_sysroot</filename></ulink>
1322 tasks of the recipes on which the recipe
1323 containing the tasks depends.
1324 A sysroot exists for both the target and for the
1325 native binaries, which run on the host system.
1326 </para></listitem>
1327 <listitem><para>
1328 <emphasis><filename>do_configure</filename></emphasis>:
1329 This task configures the source by enabling and
1330 disabling any build-time and configuration options
1331 for the software being built.
1332 Configurations can come from the recipe itself as
1333 well as from an inherited class.
1334 Additionally, the software itself might configure
1335 itself depending on the target for which it is
1336 being built.</para>
1337
1338 <para>The configurations handled by the
1339 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-configure'><filename>do_configure</filename></ulink>
1340 task are specific to configurations for the source
1341 code being built by the recipe.</para>
1342
1343 <para>If you are using the
1344 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-autotools'><filename>autotools</filename></ulink>
1345 class, you can add additional configuration options
1346 by using the
1347 <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_OECONF'><filename>EXTRA_OECONF</filename></ulink>
1348 or
1349 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGECONFIG_CONFARGS'><filename>PACKAGECONFIG_CONFARGS</filename></ulink>
1350 variables.
1351 For information on how this variable works within
1352 that class, see the
1353 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-autotools'><filename>autotools</filename></ulink>
1354 class
1355 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta/classes/autotools.bbclass'>here</ulink>.
1356 </para></listitem>
1357 <listitem><para>
1358 <emphasis><filename>do_compile</filename></emphasis>:
1359 Once a configuration task has been satisfied,
1360 BitBake compiles the source using the
1361 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-compile'><filename>do_compile</filename></ulink>
1362 task.
1363 Compilation occurs in the directory pointed to by
1364 the
1365 <ulink url='&YOCTO_DOCS_REF_URL;#var-B'><filename>B</filename></ulink>
1366 variable.
1367 Realize that the <filename>B</filename> directory
1368 is, by default, the same as the
1369 <ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink>
1370 directory.
1371 </para></listitem>
1372 <listitem><para>
1373 <emphasis><filename>do_install</filename></emphasis>:
1374 After compilation completes, BitBake executes the
1375 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink>
1376 task.
1377 This task copies files from the
1378 <filename>B</filename> directory and places them
1379 in a holding area pointed to by the
1380 <ulink url='&YOCTO_DOCS_REF_URL;#var-D'><filename>D</filename></ulink>
1381 variable.
1382 Packaging occurs later using files from this
1383 holding directory.
1384 </para></listitem>
1385 </itemizedlist>
1386 </para>
1387 </section>
1388
1389 <section id='package-splitting-dev-environment'>
1390 <title>Package Splitting</title>
1391
1392 <para>
1393 After source code is configured, compiled, and staged, the
1394 build system analyzes the results and splits the output
1395 into packages:
1396 <imagedata fileref="figures/analysis-for-package-splitting.png" align="center" width="7in" depth="7in" />
1397 </para>
1398
1399 <para>
1400 The
1401 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-package'><filename>do_package</filename></ulink>
1402 and
1403 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-packagedata'><filename>do_packagedata</filename></ulink>
1404 tasks combine to analyze the files found in the
1405 <ulink url='&YOCTO_DOCS_REF_URL;#var-D'><filename>D</filename></ulink>
1406 directory and split them into subsets based on available
1407 packages and files.
1408 Analysis involves the following as well as other items:
1409 splitting out debugging symbols, looking at shared library
1410 dependencies between packages, and looking at package
1411 relationships.
1412 </para>
1413
1414 <para>
1415 The <filename>do_packagedata</filename> task creates
1416 package metadata based on the analysis such that the
1417 build system can generate the final packages.
1418 The
1419 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-populate_sysroot'><filename>do_populate_sysroot</filename></ulink>
1420 task stages (copies) a subset of the files installed by
1421 the
1422 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink>
1423 task into the appropriate sysroot.
1424 Working, staged, and intermediate results of the analysis
1425 and package splitting process use several areas:
1426 <itemizedlist>
1427 <listitem><para>
1428 <ulink url='&YOCTO_DOCS_REF_URL;#var-PKGD'><filename>PKGD</filename></ulink>:
1429 The destination directory
1430 (i.e. <filename>package</filename>) for packages
1431 before they are split into individual packages.
1432 </para></listitem>
1433 <listitem><para>
1434 <ulink url='&YOCTO_DOCS_REF_URL;#var-PKGDESTWORK'><filename>PKGDESTWORK</filename></ulink>:
1435 A temporary work area (i.e.
1436 <filename>pkgdata</filename>) used by the
1437 <filename>do_package</filename> task to save
1438 package metadata.
1439 </para></listitem>
1440 <listitem><para>
1441 <ulink url='&YOCTO_DOCS_REF_URL;#var-PKGDEST'><filename>PKGDEST</filename></ulink>:
1442 The parent directory (i.e.
1443 <filename>packages-split</filename>) for packages
1444 after they have been split.
1445 </para></listitem>
1446 <listitem><para>
1447 <ulink url='&YOCTO_DOCS_REF_URL;#var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></ulink>:
1448 A shared, global-state directory that holds
1449 packaging metadata generated during the packaging
1450 process.
1451 The packaging process copies metadata from
1452 <filename>PKGDESTWORK</filename> to the
1453 <filename>PKGDATA_DIR</filename> area where it
1454 becomes globally available.
1455 </para></listitem>
1456 <listitem><para>
1457 <ulink url='&YOCTO_DOCS_REF_URL;#var-STAGING_DIR_HOST'><filename>STAGING_DIR_HOST</filename></ulink>:
1458 The path for the sysroot for the system on which
1459 a component is built to run (i.e.
1460 <filename>recipe-sysroot</filename>).
1461 </para></listitem>
1462 <listitem><para>
1463 <ulink url='&YOCTO_DOCS_REF_URL;#var-STAGING_DIR_NATIVE'><filename>STAGING_DIR_NATIVE</filename></ulink>:
1464 The path for the sysroot used when building
1465 components for the build host (i.e.
1466 <filename>recipe-sysroot-native</filename>).
1467 </para></listitem>
1468 <listitem><para>
1469 <ulink url='&YOCTO_DOCS_REF_URL;#var-STAGING_DIR_TARGET'><filename>STAGING_DIR_TARGET</filename></ulink>:
1470 The path for the sysroot used when a component that
1471 is built to execute on a system and it generates
1472 code for yet another machine (e.g. cross-canadian
1473 recipes).
1474 </para></listitem>
1475 </itemizedlist>
1476 The
1477 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILES'><filename>FILES</filename></ulink>
1478 variable defines the files that go into each package in
1479 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGES'><filename>PACKAGES</filename></ulink>.
1480 If you want details on how this is accomplished, you can
1481 look at
1482 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta/classes/package.bbclass'><filename>package.bbclass</filename></ulink>.
1483 </para>
1484
1485 <para>
1486 Depending on the type of packages being created (RPM, DEB,
1487 or IPK), the
1488 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-package_write_deb'><filename>do_package_write_*</filename></ulink>
1489 task creates the actual packages and places them in the
1490 Package Feed area, which is
1491 <filename>${TMPDIR}/deploy</filename>.
1492 You can see the
1493 "<link linkend='package-feeds-dev-environment'>Package Feeds</link>"
1494 section for more detail on that part of the build process.
1495 <note>
1496 Support for creating feeds directly from the
1497 <filename>deploy/*</filename> directories does not
1498 exist.
1499 Creating such feeds usually requires some kind of feed
1500 maintenance mechanism that would upload the new
1501 packages into an official package feed (e.g. the
1502 Ångström distribution).
1503 This functionality is highly distribution-specific
1504 and thus is not provided out of the box.
1505 </note>
1506 </para>
1507 </section>
1508
1509 <section id='image-generation-dev-environment'>
1510 <title>Image Generation</title>
1511
1512 <para>
1513 Once packages are split and stored in the Package Feeds
1514 area, the build system uses BitBake to generate the root
1515 filesystem image:
1516 <imagedata fileref="figures/image-generation.png" align="center" width="7.5in" depth="7.5in" />
1517 </para>
1518
1519 <para>
1520 The image generation process consists of several stages and
1521 depends on several tasks and variables.
1522 The
1523 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-rootfs'><filename>do_rootfs</filename></ulink>
1524 task creates the root filesystem (file and directory
1525 structure) for an image.
1526 This task uses several key variables to help create the
1527 list of packages to actually install:
1528 <itemizedlist>
1529 <listitem><para>
1530 <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></ulink>:
1531 Lists out the base set of packages from which to
1532 install from the Package Feeds area.
1533 </para></listitem>
1534 <listitem><para>
1535 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_EXCLUDE'><filename>PACKAGE_EXCLUDE</filename></ulink>:
1536 Specifies packages that should not be installed
1537 into the image.
1538 </para></listitem>
1539 <listitem><para>
1540 <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></ulink>:
1541 Specifies features to include in the image.
1542 Most of these features map to additional packages
1543 for installation.
1544 </para></listitem>
1545 <listitem><para>
1546 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></ulink>:
1547 Specifies the package backend (e.g. RPM, DEB, or
1548 IPK) to use and consequently helps determine where
1549 to locate packages within the Package Feeds area.
1550 </para></listitem>
1551 <listitem><para>
1552 <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_LINGUAS'><filename>IMAGE_LINGUAS</filename></ulink>:
1553 Determines the language(s) for which additional
1554 language support packages are installed.
1555 </para></listitem>
1556 <listitem><para>
1557 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_INSTALL'><filename>PACKAGE_INSTALL</filename></ulink>:
1558 The final list of packages passed to the package
1559 manager for installation into the image.
1560 </para></listitem>
1561 </itemizedlist>
1562 </para>
1563
1564 <para>
1565 With
1566 <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_ROOTFS'><filename>IMAGE_ROOTFS</filename></ulink>
1567 pointing to the location of the filesystem under
1568 construction and the <filename>PACKAGE_INSTALL</filename>
1569 variable providing the final list of packages to install,
1570 the root file system is created.
1571 </para>
1572
1573 <para>
1574 Package installation is under control of the package
1575 manager (e.g. dnf/rpm, opkg, or apt/dpkg) regardless of
1576 whether or not package management is enabled for the
1577 target.
1578 At the end of the process, if package management is not
1579 enabled for the target, the package manager's data files
1580 are deleted from the root filesystem.
1581 As part of the final stage of package installation,
1582 post installation scripts that are part of the packages
1583 are run.
1584 Any scripts that fail to run on the build host are run on
1585 the target when the target system is first booted.
1586 If you are using a
1587 <ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-read-only-root-filesystem'>read-only root filesystem</ulink>,
1588 all the post installation scripts must succeed on the
1589 build host during the package installation phase since the
1590 root filesystem on the target is read-only.
1591 </para>
1592
1593 <para>
1594 The final stages of the <filename>do_rootfs</filename> task
1595 handle post processing.
1596 Post processing includes creation of a manifest file and
1597 optimizations.
1598 </para>
1599
1600 <para>
1601 The manifest file (<filename>.manifest</filename>) resides
1602 in the same directory as the root filesystem image.
1603 This file lists out, line-by-line, the installed packages.
1604 The manifest file is useful for the
1605 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-testimage*'><filename>testimage</filename></ulink>
1606 class, for example, to determine whether or not to run
1607 specific tests.
1608 See the
1609 <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_MANIFEST'><filename>IMAGE_MANIFEST</filename></ulink>
1610 variable for additional information.
1611 </para>
1612
1613 <para>
1614 Optimizing processes that are run across the image include
1615 <filename>mklibs</filename>, <filename>prelink</filename>,
1616 and any other post-processing commands as defined by the
1617 <ulink url='&YOCTO_DOCS_REF_URL;#var-ROOTFS_POSTPROCESS_COMMAND'><filename>ROOTFS_POSTPROCESS_COMMAND</filename></ulink>
1618 variable.
1619 The <filename>mklibs</filename> process optimizes the size
1620 of the libraries, while the <filename>prelink</filename>
1621 process optimizes the dynamic linking of shared libraries
1622 to reduce start up time of executables.
1623 </para>
1624
1625 <para>
1626 After the root filesystem is built, processing begins on
1627 the image through the
1628 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-image'><filename>do_image</filename></ulink>
1629 task.
1630 The build system runs any pre-processing commands as
1631 defined by the
1632 <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_PREPROCESS_COMMAND'><filename>IMAGE_PREPROCESS_COMMAND</filename></ulink>
1633 variable.
1634 This variable specifies a list of functions to call before
1635 the build system creates the final image output files.
1636 </para>
1637
1638 <para>
1639 The build system dynamically creates
1640 <filename>do_image_*</filename> tasks as needed, based
1641 on the image types specified in the
1642 <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></ulink>
1643 variable.
1644 The process turns everything into an image file or a set of
1645 image files and can compress the root filesystem image to
1646 reduce the overall size of the image.
1647 The formats used for the root filesystem depend on the
1648 <filename>IMAGE_FSTYPES</filename> variable.
1649 Compression depends on whether the formats support
1650 compression.
1651 </para>
1652
1653 <para>
1654 As an example, a dynamically created task when creating a
1655 particular image <replaceable>type</replaceable> would
1656 take the following form:
1657 <literallayout class='monospaced'>
1658 do_image_<replaceable>type</replaceable>
1659 </literallayout>
1660 So, if the <replaceable>type</replaceable> as specified by
1661 the <filename>IMAGE_FSTYPES</filename> were
1662 <filename>ext4</filename>, the dynamically generated task
1663 would be as follows:
1664 <literallayout class='monospaced'>
1665 do_image_ext4
1666 </literallayout>
1667 </para>
1668
1669 <para>
1670 The final task involved in image creation is the
1671 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-image-complete'><filename>do_image_complete</filename></ulink>
1672 task.
1673 This task completes the image by applying any image
1674 post processing as defined through the
1675 <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_POSTPROCESS_COMMAND'><filename>IMAGE_POSTPROCESS_COMMAND</filename></ulink>
1676 variable.
1677 The variable specifies a list of functions to call once the
1678 build system has created the final image output files.
1679 <note>
1680 The entire image generation process is run under
1681 <link linkend='fakeroot-and-pseudo'>Pseudo</link>.
1682 Running under Pseudo ensures that the files in the
1683 root filesystem have correct ownership.
1684 </note>
1685 </para>
1686 </section>
1687
1688 <section id='sdk-generation-dev-environment'>
1689 <title>SDK Generation</title>
1690
1691 <para>
1692 The OpenEmbedded build system uses BitBake to generate the
1693 Software Development Kit (SDK) installer scripts for both
1694 the standard SDK and the extensible SDK (eSDK):
1695 </para>
1696
1697 <para>
1698 <imagedata fileref="figures/sdk-generation.png" width="9in" align="center" />
1699 <note>
1700 For more information on the cross-development toolchain
1701 generation, see the
1702 "<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
1703 section.
1704 For information on advantages gained when building a
1705 cross-development toolchain using the
1706 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-populate_sdk'><filename>do_populate_sdk</filename></ulink>
1707 task, see the
1708 "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-building-an-sdk-installer'>Building an SDK Installer</ulink>"
1709 section in the Yocto Project Application Development
1710 and the Extensible Software Development Kit (eSDK)
1711 manual.
1712 </note>
1713 </para>
1714
1715 <para>
1716 Like image generation, the SDK script process consists of
1717 several stages and depends on many variables.
1718 The
1719 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-populate_sdk'><filename>do_populate_sdk</filename></ulink>
1720 and
1721 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-populate_sdk_ext'><filename>do_populate_sdk_ext</filename></ulink>
1722 tasks use these key variables to help create the list of
1723 packages to actually install.
1724 For information on the variables listed in the figure,
1725 see the
1726 "<link linkend='sdk-dev-environment'>Application Development SDK</link>"
1727 section.
1728 </para>
1729
1730 <para>
1731 The <filename>do_populate_sdk</filename> task helps create
1732 the standard SDK and handles two parts: a target part and a
1733 host part.
1734 The target part is the part built for the target hardware
1735 and includes libraries and headers.
1736 The host part is the part of the SDK that runs on the
1737 <ulink url='&YOCTO_DOCS_REF_URL;#var-SDKMACHINE'><filename>SDKMACHINE</filename></ulink>.
1738 </para>
1739
1740 <para>
1741 The <filename>do_populate_sdk_ext</filename> task helps
1742 create the extensible SDK and handles host and target parts
1743 differently than its counter part does for the standard SDK.
1744 For the extensible SDK, the task encapsulates the build
1745 system, which includes everything needed (host and target)
1746 for the SDK.
1747 </para>
1748
1749 <para>
1750 Regardless of the type of SDK being constructed, the
1751 tasks perform some cleanup after which a cross-development
1752 environment setup script and any needed configuration files
1753 are created.
1754 The final output is the Cross-development
1755 toolchain installation script (<filename>.sh</filename>
1756 file), which includes the environment setup script.
1757 </para>
1758 </section>
1759
1760 <section id='stamp-files-and-the-rerunning-of-tasks'>
1761 <title>Stamp Files and the Rerunning of Tasks</title>
1762
1763 <para>
1764 For each task that completes successfully, BitBake writes a
1765 stamp file into the
1766 <ulink url='&YOCTO_DOCS_REF_URL;#var-STAMPS_DIR'><filename>STAMPS_DIR</filename></ulink>
1767 directory.
1768 The beginning of the stamp file's filename is determined
1769 by the
1770 <ulink url='&YOCTO_DOCS_REF_URL;#var-STAMP'><filename>STAMP</filename></ulink>
1771 variable, and the end of the name consists of the task's
1772 name and current
1773 <link linkend='overview-checksums'>input checksum</link>.
1774 <note>
1775 This naming scheme assumes that
1776 <ulink url='&YOCTO_DOCS_BB_URL;#var-BB_SIGNATURE_HANDLER'><filename>BB_SIGNATURE_HANDLER</filename></ulink>
1777 is "OEBasicHash", which is almost always the case in
1778 current OpenEmbedded.
1779 </note>
1780 To determine if a task needs to be rerun, BitBake checks
1781 if a stamp file with a matching input checksum exists
1782 for the task.
1783 If such a stamp file exists, the task's output is
1784 assumed to exist and still be valid.
1785 If the file does not exist, the task is rerun.
1786 <note>
1787 <para>The stamp mechanism is more general than the
1788 shared state (sstate) cache mechanism described in the
1789 "<link linkend='setscene-tasks-and-shared-state'>Setscene Tasks and Shared State</link>"
1790 section.
1791 BitBake avoids rerunning any task that has a valid
1792 stamp file, not just tasks that can be accelerated
1793 through the sstate cache.</para>
1794
1795 <para>However, you should realize that stamp files only
1796 serve as a marker that some work has been done and that
1797 these files do not record task output.
1798 The actual task output would usually be somewhere in
1799 <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>
1800 (e.g. in some recipe's
1801 <ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink>.)
1802 What the sstate cache mechanism adds is a way to cache
1803 task output that can then be shared between build
1804 machines.</para>
1805 </note>
1806 Since <filename>STAMPS_DIR</filename> is usually a
1807 subdirectory of <filename>TMPDIR</filename>, removing
1808 <filename>TMPDIR</filename> will also remove
1809 <filename>STAMPS_DIR</filename>, which means tasks will
1810 properly be rerun to repopulate
1811 <filename>TMPDIR</filename>.
1812 </para>
1813
1814 <para>
1815 If you want some task to always be considered "out of
1816 date", you can mark it with the
1817 <ulink url='&YOCTO_DOCS_BB_URL;#variable-flags'><filename>nostamp</filename></ulink>
1818 varflag.
1819 If some other task depends on such a task, then that
1820 task will also always be considered out of date, which
1821 might not be what you want.
1822 </para>
1823
1824 <para>
1825 For details on how to view information about a task's
1826 signature, see the
1827 "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-viewing-task-variable-dependencies'>Viewing Task Variable Dependencies</ulink>"
1828 section in the Yocto Project Development Tasks Manual.
1829 </para>
1830 </section>
1831
1832 <section id='setscene-tasks-and-shared-state'>
1833 <title>Setscene Tasks and Shared State</title>
1834
1835 <para>
1836 The description of tasks so far assumes that BitBake needs
1837 to build everything and no available prebuilt objects
1838 exist.
1839 BitBake does support skipping tasks if prebuilt objects are
1840 available.
1841 These objects are usually made available in the form of a
1842 shared state (sstate) cache.
1843 <note>
1844 For information on variables affecting sstate, see the
1845 <ulink url='&YOCTO_DOCS_REF_URL;#var-SSTATE_DIR'><filename>SSTATE_DIR</filename></ulink>
1846 and
1847 <ulink url='&YOCTO_DOCS_REF_URL;#var-SSTATE_MIRRORS'><filename>SSTATE_MIRRORS</filename></ulink>
1848 variables.
1849 </note>
1850 </para>
1851
1852 <para>
1853 The idea of a setscene task (i.e
1854 <filename>do_</filename><replaceable>taskname</replaceable><filename>_setscene</filename>)
1855 is a version of the task where
1856 instead of building something, BitBake can skip to the end
1857 result and simply place a set of files into specific
1858 locations as needed.
1859 In some cases, it makes sense to have a setscene task
1860 variant (e.g. generating package files in the
1861 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-package_write_deb'><filename>do_package_write_*</filename></ulink>
1862 task).
1863 In other cases, it does not make sense (e.g. a
1864 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-patch'><filename>do_patch</filename></ulink>
1865 task or a
1866 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-unpack'><filename>do_unpack</filename></ulink>
1867 task) since the work involved would be equal to or greater
1868 than the underlying task.
1869 </para>
1870
1871 <para>
1872 In the build system, the common tasks that have setscene
1873 variants are
1874 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-package'><filename>do_package</filename></ulink>,
1875 <filename>do_package_write_*</filename>,
1876 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-deploy'><filename>do_deploy</filename></ulink>,
1877 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-packagedata'><filename>do_packagedata</filename></ulink>,
1878 and
1879 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-populate_sysroot'><filename>do_populate_sysroot</filename></ulink>.
1880 Notice that these tasks represent most of the tasks whose
1881 output is an end result.
1882 </para>
1883
1884 <para>
1885 The build system has knowledge of the relationship between
1886 these tasks and other preceding tasks.
1887 For example, if BitBake runs
1888 <filename>do_populate_sysroot_setscene</filename> for
1889 something, it does not make sense to run any of the
1890 <filename>do_fetch</filename>,
1891 <filename>do_unpack</filename>,
1892 <filename>do_patch</filename>,
1893 <filename>do_configure</filename>,
1894 <filename>do_compile</filename>, and
1895 <filename>do_install</filename> tasks.
1896 However, if <filename>do_package</filename> needs to be
1897 run, BitBake needs to run those other tasks.
1898 </para>
1899
1900 <para>
1901 It becomes more complicated if everything can come
1902 from an sstate cache because some objects are simply
1903 not required at all.
1904 For example, you do not need a compiler or native tools,
1905 such as quilt, if nothing exists to compile or patch.
1906 If the <filename>do_package_write_*</filename> packages
1907 are available from sstate, BitBake does not need the
1908 <filename>do_package</filename> task data.
1909 </para>
1910
1911 <para>
1912 To handle all these complexities, BitBake runs in two
1913 phases.
1914 The first is the "setscene" stage.
1915 During this stage, BitBake first checks the sstate cache
1916 for any targets it is planning to build.
1917 BitBake does a fast check to see if the object exists
1918 rather than a complete download.
1919 If nothing exists, the second phase, which is the setscene
1920 stage, completes and the main build proceeds.
1921 </para>
1922
1923 <para>
1924 If objects are found in the sstate cache, the build system
1925 works backwards from the end targets specified by the user.
1926 For example, if an image is being built, the build system
1927 first looks for the packages needed for that image and the
1928 tools needed to construct an image.
1929 If those are available, the compiler is not needed.
1930 Thus, the compiler is not even downloaded.
1931 If something was found to be unavailable, or the
1932 download or setscene task fails, the build system then
1933 tries to install dependencies, such as the compiler, from
1934 the cache.
1935 </para>
1936
1937 <para>
1938 The availability of objects in the sstate cache is
1939 handled by the function specified by the
1940 <ulink url='&YOCTO_DOCS_BB_URL;#var-BB_HASHCHECK_FUNCTION'><filename>BB_HASHCHECK_FUNCTION</filename></ulink>
1941 variable and returns a list of available objects.
1942 The function specified by the
1943 <ulink url='&YOCTO_DOCS_BB_URL;#var-BB_SETSCENE_DEPVALID'><filename>BB_SETSCENE_DEPVALID</filename></ulink>
1944 variable is the function that determines whether a given
1945 dependency needs to be followed, and whether for any given
1946 relationship the function needs to be passed.
1947 The function returns a True or False value.
1948 </para>
1949 </section>
1950 </section>
1951
1952 <section id='images-dev-environment'>
1953 <title>Images</title>
1954
1955 <para>
1956 The images produced by the build system are compressed forms
1957 of the root filesystem and are ready to boot on a target
1958 device.
1959 You can see from the
1960 <link linkend='general-workflow-figure'>general workflow figure</link>
1961 that BitBake output, in part, consists of images.
1962 This section takes a closer look at this output:
1963 <imagedata fileref="figures/images.png" align="center" width="5.5in" depth="5.5in" />
1964 </para>
1965
1966 <note>
1967 For a list of example images that the Yocto Project provides,
1968 see the
1969 "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>"
1970 chapter in the Yocto Project Reference Manual.
1971 </note>
1972
1973 <para>
1974 The build process writes images out to the
1975 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
1976 inside the
1977 <filename>tmp/deploy/images/<replaceable>machine</replaceable>/</filename>
1978 folder as shown in the figure.
1979 This folder contains any files expected to be loaded on the
1980 target device.
1981 The
1982 <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></ulink>
1983 variable points to the <filename>deploy</filename> directory,
1984 while the
1985 <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPLOY_DIR_IMAGE'><filename>DEPLOY_DIR_IMAGE</filename></ulink>
1986 variable points to the appropriate directory containing images
1987 for the current configuration.
1988 <itemizedlist>
1989 <listitem><para>
1990 <replaceable>kernel-image</replaceable>:
1991 A kernel binary file.
1992 The
1993 <ulink url='&YOCTO_DOCS_REF_URL;#var-KERNEL_IMAGETYPE'><filename>KERNEL_IMAGETYPE</filename></ulink>
1994 variable determines the naming scheme for the
1995 kernel image file.
1996 Depending on this variable, the file could begin with
1997 a variety of naming strings.
1998 The
1999 <filename>deploy/images/</filename><replaceable>machine</replaceable>
2000 directory can contain multiple image files for the
2001 machine.
2002 </para></listitem>
2003 <listitem><para>
2004 <replaceable>root-filesystem-image</replaceable>:
2005 Root filesystems for the target device (e.g.
2006 <filename>*.ext3</filename> or
2007 <filename>*.bz2</filename> files).
2008 The
2009 <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></ulink>
2010 variable determines the root filesystem image type.
2011 The
2012 <filename>deploy/images/</filename><replaceable>machine</replaceable>
2013 directory can contain multiple root filesystems for the
2014 machine.
2015 </para></listitem>
2016 <listitem><para>
2017 <replaceable>kernel-modules</replaceable>:
2018 Tarballs that contain all the modules built for the
2019 kernel.
2020 Kernel module tarballs exist for legacy purposes and
2021 can be suppressed by setting the
2022 <ulink url='&YOCTO_DOCS_REF_URL;#var-MODULE_TARBALL_DEPLOY'><filename>MODULE_TARBALL_DEPLOY</filename></ulink>
2023 variable to "0".
2024 The
2025 <filename>deploy/images/</filename><replaceable>machine</replaceable>
2026 directory can contain multiple kernel module tarballs
2027 for the machine.
2028 </para></listitem>
2029 <listitem><para>
2030 <replaceable>bootloaders</replaceable>:
2031 If applicable to the target machine, bootloaders
2032 supporting the image.
2033 The <filename>deploy/images/</filename><replaceable>machine</replaceable>
2034 directory can contain multiple bootloaders for the
2035 machine.
2036 </para></listitem>
2037 <listitem><para>
2038 <replaceable>symlinks</replaceable>:
2039 The
2040 <filename>deploy/images/</filename><replaceable>machine</replaceable>
2041 folder contains a symbolic link that points to the
2042 most recently built file for each machine.
2043 These links might be useful for external scripts that
2044 need to obtain the latest version of each file.
2045 </para></listitem>
2046 </itemizedlist>
2047 </para>
2048 </section>
2049
2050 <section id='sdk-dev-environment'>
2051 <title>Application Development SDK</title>
2052
2053 <para>
2054 In the
2055 <link linkend='general-workflow-figure'>general workflow figure</link>,
2056 the output labeled "Application Development SDK" represents an
2057 SDK.
2058 The SDK generation process differs depending on whether you
2059 build an extensible SDK (e.g.
2060 <filename>bitbake -c populate_sdk_ext</filename> <replaceable>imagename</replaceable>)
2061 or a standard SDK (e.g.
2062 <filename>bitbake -c populate_sdk</filename> <replaceable>imagename</replaceable>).
2063 This section takes a closer look at this output:
2064 <imagedata fileref="figures/sdk.png" align="center" width="9in" depth="7.25in" />
2065 </para>
2066
2067 <para>
2068 The specific form of this output is a set of files that
2069 includes a self-extracting SDK installer
2070 (<filename>*.sh</filename>), host and target manifest files,
2071 and files used for SDK testing.
2072 When the SDK installer file is run, it installs the SDK.
2073 The SDK consists of a cross-development toolchain, a set of
2074 libraries and headers, and an SDK environment setup script.
2075 Running this installer essentially sets up your
2076 cross-development environment.
2077 You can think of the cross-toolchain as the "host"
2078 part because it runs on the SDK machine.
2079 You can think of the libraries and headers as the "target"
2080 part because they are built for the target hardware.
2081 The environment setup script is added so that you can
2082 initialize the environment before using the tools.
2083 </para>
2084
2085 <note><title>Notes</title>
2086 <itemizedlist>
2087 <listitem><para>
2088 The Yocto Project supports several methods by which
2089 you can set up this cross-development environment.
2090 These methods include downloading pre-built SDK
2091 installers or building and installing your own SDK
2092 installer.
2093 </para></listitem>
2094 <listitem><para>
2095 For background information on cross-development
2096 toolchains in the Yocto Project development
2097 environment, see the
2098 "<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
2099 section.
2100 </para></listitem>
2101 <listitem><para>
2102 For information on setting up a cross-development
2103 environment, see the
2104 <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
2105 manual.
2106 </para></listitem>
2107 </itemizedlist>
2108 </note>
2109
2110 <para>
2111 All the output files for an SDK are written to the
2112 <filename>deploy/sdk</filename> folder inside the
2113 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
2114 as shown in the previous figure.
2115 Depending on the type of SDK, several variables exist that help
2116 configure these files.
2117 The following list shows the variables associated with an
2118 extensible SDK:
2119 <itemizedlist>
2120 <listitem><para>
2121 <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></ulink>:
2122 Points to the <filename>deploy</filename> directory.
2123 </para></listitem>
2124 <listitem><para>
2125 <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_EXT_TYPE'><filename>SDK_EXT_TYPE</filename></ulink>:
2126 Controls whether or not shared state artifacts are
2127 copied into the extensible SDK.
2128 By default, all required shared state artifacts are
2129 copied into the SDK.
2130 </para></listitem>
2131 <listitem><para>
2132 <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_INCLUDE_PKGDATA'><filename>SDK_INCLUDE_PKGDATA</filename></ulink>:
2133 Specifies whether or not packagedata is included in the
2134 extensible SDK for all recipes in the "world" target.
2135 </para></listitem>
2136 <listitem><para>
2137 <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_INCLUDE_TOOLCHAIN'><filename>SDK_INCLUDE_TOOLCHAIN</filename></ulink>:
2138 Specifies whether or not the toolchain is included
2139 when building the extensible SDK.
2140 </para></listitem>
2141 <listitem><para>
2142 <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_LOCAL_CONF_WHITELIST'><filename>SDK_LOCAL_CONF_WHITELIST</filename></ulink>:
2143 A list of variables allowed through from the build
2144 system configuration into the extensible SDK
2145 configuration.
2146 </para></listitem>
2147 <listitem><para>
2148 <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_LOCAL_CONF_BLACKLIST'><filename>SDK_LOCAL_CONF_BLACKLIST</filename></ulink>:
2149 A list of variables not allowed through from the build
2150 system configuration into the extensible SDK
2151 configuration.
2152 </para></listitem>
2153 <listitem><para>
2154 <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_INHERIT_BLACKLIST'><filename>SDK_INHERIT_BLACKLIST</filename></ulink>:
2155 A list of classes to remove from the
2156 <ulink url='&YOCTO_DOCS_REF_URL;#var-INHERIT'><filename>INHERIT</filename></ulink>
2157 value globally within the extensible SDK configuration.
2158 </para></listitem>
2159 </itemizedlist>
2160 This next list, shows the variables associated with a standard
2161 SDK:
2162 <itemizedlist>
2163 <listitem><para>
2164 <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></ulink>:
2165 Points to the <filename>deploy</filename> directory.
2166 </para></listitem>
2167 <listitem><para>
2168 <ulink url='&YOCTO_DOCS_REF_URL;#var-SDKMACHINE'><filename>SDKMACHINE</filename></ulink>:
2169 Specifies the architecture of the machine on which the
2170 cross-development tools are run to create packages for
2171 the target hardware.
2172 </para></listitem>
2173 <listitem><para>
2174 <ulink url='&YOCTO_DOCS_REF_URL;#var-SDKIMAGE_FEATURES'><filename>SDKIMAGE_FEATURES</filename></ulink>:
2175 Lists the features to include in the "target" part
2176 of the SDK.
2177 </para></listitem>
2178 <listitem><para>
2179 <ulink url='&YOCTO_DOCS_REF_URL;#var-TOOLCHAIN_HOST_TASK'><filename>TOOLCHAIN_HOST_TASK</filename></ulink>:
2180 Lists packages that make up the host part of the SDK
2181 (i.e. the part that runs on the
2182 <filename>SDKMACHINE</filename>).
2183 When you use
2184 <filename>bitbake -c populate_sdk <replaceable>imagename</replaceable></filename>
2185 to create the SDK, a set of default packages apply.
2186 This variable allows you to add more packages.
2187 </para></listitem>
2188 <listitem><para>
2189 <ulink url='&YOCTO_DOCS_REF_URL;#var-TOOLCHAIN_TARGET_TASK'><filename>TOOLCHAIN_TARGET_TASK</filename></ulink>:
2190 Lists packages that make up the target part of the SDK
2191 (i.e. the part built for the target hardware).
2192 </para></listitem>
2193 <listitem><para>
2194 <ulink url='&YOCTO_DOCS_REF_URL;#var-SDKPATH'><filename>SDKPATH</filename></ulink>:
2195 Defines the default SDK installation path offered by
2196 the installation script.
2197 </para></listitem>
2198 <listitem><para>
2199 <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_HOST_MANIFEST'><filename>SDK_HOST_MANIFEST</filename></ulink>:
2200 Lists all the installed packages that make up the host
2201 part of the SDK.
2202 This variable also plays a minor role for extensible
2203 SDK development as well.
2204 However, it is mainly used for the standard SDK.
2205 </para></listitem>
2206 <listitem><para>
2207 <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_TARGET_MANIFEST'><filename>SDK_TARGET_MANIFEST</filename></ulink>:
2208 Lists all the installed packages that make up the
2209 target part of the SDK.
2210 This variable also plays a minor role for extensible
2211 SDK development as well.
2212 However, it is mainly used for the standard SDK.
2213 </para></listitem>
2214 </itemizedlist>
2215 </para>
2216 </section>
2217 </section>
2218
2219 <section id="cross-development-toolchain-generation">
2220 <title>Cross-Development Toolchain Generation</title>
2221
2222 <para>
2223 The Yocto Project does most of the work for you when it comes to
2224 creating
2225 <ulink url='&YOCTO_DOCS_REF_URL;#cross-development-toolchain'>cross-development toolchains</ulink>.
2226 This section provides some technical background on how
2227 cross-development toolchains are created and used.
2228 For more information on toolchains, you can also see the
2229 <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
2230 manual.
2231 </para>
2232
2233 <para>
2234 In the Yocto Project development environment, cross-development
2235 toolchains are used to build images and applications that run
2236 on the target hardware.
2237 With just a few commands, the OpenEmbedded build system creates
2238 these necessary toolchains for you.
2239 </para>
2240
2241 <para>
2242 The following figure shows a high-level build environment regarding
2243 toolchain construction and use.
2244 </para>
2245
2246 <para>
2247 <imagedata fileref="figures/cross-development-toolchains.png" width="8in" depth="6in" align="center" />
2248 </para>
2249
2250 <para>
2251 Most of the work occurs on the Build Host.
2252 This is the machine used to build images and generally work within
2253 the the Yocto Project environment.
2254 When you run
2255 <ulink url='&YOCTO_DOCS_REF_URL;#bitbake-term'>BitBake</ulink>
2256 to create an image, the OpenEmbedded build system
2257 uses the host <filename>gcc</filename> compiler to bootstrap a
2258 cross-compiler named <filename>gcc-cross</filename>.
2259 The <filename>gcc-cross</filename> compiler is what BitBake uses to
2260 compile source files when creating the target image.
2261 You can think of <filename>gcc-cross</filename> simply as an
2262 automatically generated cross-compiler that is used internally
2263 within BitBake only.
2264 <note>
2265 The extensible SDK does not use
2266 <filename>gcc-cross-canadian</filename> since this SDK
2267 ships a copy of the OpenEmbedded build system and the sysroot
2268 within it contains <filename>gcc-cross</filename>.
2269 </note>
2270 </para>
2271
2272 <para>
2273 The chain of events that occurs when <filename>gcc-cross</filename> is
2274 bootstrapped is as follows:
2275 <literallayout class='monospaced'>
2276 gcc -> binutils-cross -> gcc-cross-initial -> linux-libc-headers -> glibc-initial -> glibc -> gcc-cross -> gcc-runtime
2277 </literallayout>
2278 <itemizedlist>
2279 <listitem><para>
2280 <filename>gcc</filename>:
2281 The build host's GNU Compiler Collection (GCC).
2282 </para></listitem>
2283 <listitem><para>
2284 <filename>binutils-cross</filename>:
2285 The bare minimum binary utilities needed in order to run
2286 the <filename>gcc-cross-initial</filename> phase of the
2287 bootstrap operation.
2288 </para></listitem>
2289 <listitem><para>
2290 <filename>gcc-cross-initial</filename>:
2291 An early stage of the bootstrap process for creating
2292 the cross-compiler.
2293 This stage builds enough of the <filename>gcc-cross</filename>,
2294 the C library, and other pieces needed to finish building the
2295 final cross-compiler in later stages.
2296 This tool is a "native" package (i.e. it is designed to run on
2297 the build host).
2298 </para></listitem>
2299 <listitem><para>
2300 <filename>linux-libc-headers</filename>:
2301 Headers needed for the cross-compiler.
2302 </para></listitem>
2303 <listitem><para>
2304 <filename>glibc-initial</filename>:
2305 An initial version of the Embedded GNU C Library
2306 (GLIBC) needed to bootstrap <filename>glibc</filename>.
2307 </para></listitem>
2308 <listitem><para>
2309 <filename>glibc</filename>:
2310 The GNU C Library.
2311 </para></listitem>
2312 <listitem><para>
2313 <filename>gcc-cross</filename>:
2314 The final stage of the bootstrap process for the
2315 cross-compiler.
2316 This stage results in the actual cross-compiler that
2317 BitBake uses when it builds an image for a targeted
2318 device.
2319 <note>
2320 If you are replacing this cross compiler toolchain
2321 with a custom version, you must replace
2322 <filename>gcc-cross</filename>.
2323 </note>
2324 This tool is also a "native" package (i.e. it is
2325 designed to run on the build host).
2326 </para></listitem>
2327 <listitem><para>
2328 <filename>gcc-runtime</filename>:
2329 Runtime libraries resulting from the toolchain bootstrapping
2330 process.
2331 This tool produces a binary that consists of the
2332 runtime libraries need for the targeted device.
2333 </para></listitem>
2334 </itemizedlist>
2335 </para>
2336
2337 <para>
2338 You can use the OpenEmbedded build system to build an installer for
2339 the relocatable SDK used to develop applications.
2340 When you run the installer, it installs the toolchain, which
2341 contains the development tools (e.g.,
2342 <filename>gcc-cross-canadian</filename>,
2343 <filename>binutils-cross-canadian</filename>, and other
2344 <filename>nativesdk-*</filename> tools),
2345 which are tools native to the SDK (i.e. native to
2346 <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_ARCH'><filename>SDK_ARCH</filename></ulink>),
2347 you need to cross-compile and test your software.
2348 The figure shows the commands you use to easily build out this
2349 toolchain.
2350 This cross-development toolchain is built to execute on the
2351 <ulink url='&YOCTO_DOCS_REF_URL;#var-SDKMACHINE'><filename>SDKMACHINE</filename></ulink>,
2352 which might or might not be the same
2353 machine as the Build Host.
2354 <note>
2355 If your target architecture is supported by the Yocto Project,
2356 you can take advantage of pre-built images that ship with the
2357 Yocto Project and already contain cross-development toolchain
2358 installers.
2359 </note>
2360 </para>
2361
2362 <para>
2363 Here is the bootstrap process for the relocatable toolchain:
2364 <literallayout class='monospaced'>
2365 gcc -> binutils-crosssdk -> gcc-crosssdk-initial -> linux-libc-headers ->
2366 glibc-initial -> nativesdk-glibc -> gcc-crosssdk -> gcc-cross-canadian
2367 </literallayout>
2368 <itemizedlist>
2369 <listitem><para>
2370 <filename>gcc</filename>:
2371 The build host's GNU Compiler Collection (GCC).
2372 </para></listitem>
2373 <listitem><para>
2374 <filename>binutils-crosssdk</filename>:
2375 The bare minimum binary utilities needed in order to run
2376 the <filename>gcc-crosssdk-initial</filename> phase of the
2377 bootstrap operation.
2378 </para></listitem>
2379 <listitem><para>
2380 <filename>gcc-crosssdk-initial</filename>:
2381 An early stage of the bootstrap process for creating
2382 the cross-compiler.
2383 This stage builds enough of the
2384 <filename>gcc-crosssdk</filename> and supporting pieces so that
2385 the final stage of the bootstrap process can produce the
2386 finished cross-compiler.
2387 This tool is a "native" binary that runs on the build host.
2388 </para></listitem>
2389 <listitem><para>
2390 <filename>linux-libc-headers</filename>:
2391 Headers needed for the cross-compiler.
2392 </para></listitem>
2393 <listitem><para>
2394 <filename>glibc-initial</filename>:
2395 An initial version of the Embedded GLIBC needed to bootstrap
2396 <filename>nativesdk-glibc</filename>.
2397 </para></listitem>
2398 <listitem><para>
2399 <filename>nativesdk-glibc</filename>:
2400 The Embedded GLIBC needed to bootstrap the
2401 <filename>gcc-crosssdk</filename>.
2402 </para></listitem>
2403 <listitem><para>
2404 <filename>gcc-crosssdk</filename>:
2405 The final stage of the bootstrap process for the
2406 relocatable cross-compiler.
2407 The <filename>gcc-crosssdk</filename> is a transitory
2408 compiler and never leaves the build host.
2409 Its purpose is to help in the bootstrap process to create
2410 the eventual <filename>gcc-cross-canadian</filename>
2411 compiler, which is relocatable.
2412 This tool is also a "native" package (i.e. it is
2413 designed to run on the build host).
2414 </para></listitem>
2415 <listitem><para>
2416 <filename>gcc-cross-canadian</filename>:
2417 The final relocatable cross-compiler.
2418 When run on the
2419 <ulink url='&YOCTO_DOCS_REF_URL;#var-SDKMACHINE'><filename>SDKMACHINE</filename></ulink>,
2420 this tool
2421 produces executable code that runs on the target device.
2422 Only one cross-canadian compiler is produced per architecture
2423 since they can be targeted at different processor optimizations
2424 using configurations passed to the compiler through the
2425 compile commands.
2426 This circumvents the need for multiple compilers and thus
2427 reduces the size of the toolchains.
2428 </para></listitem>
2429 </itemizedlist>
2430 </para>
2431
2432 <note>
2433 For information on advantages gained when building a
2434 cross-development toolchain installer, see the
2435 "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-building-an-sdk-installer'>Building an SDK Installer</ulink>"
2436 appendix in the Yocto Project Application Development and the
2437 Extensible Software Development Kit (eSDK) manual.
2438 </note>
2439 </section>
2440
2441 <section id="shared-state-cache">
2442 <title>Shared State Cache</title>
2443
2444 <para>
2445 By design, the OpenEmbedded build system builds everything from
2446 scratch unless
2447 <ulink url='&YOCTO_DOCS_REF_URL;#bitbake-term'>BitBake</ulink>
2448 can determine that parts do not need to be rebuilt.
2449 Fundamentally, building from scratch is attractive as it means all
2450 parts are built fresh and no possibility of stale data exists that
2451 can cause problems.
2452 When developers hit problems, they typically default back to
2453 building from scratch so they have a know state from the
2454 start.
2455 </para>
2456
2457 <para>
2458 Building an image from scratch is both an advantage and a
2459 disadvantage to the process.
2460 As mentioned in the previous paragraph, building from scratch
2461 ensures that everything is current and starts from a known state.
2462 However, building from scratch also takes much longer as it
2463 generally means rebuilding things that do not necessarily need
2464 to be rebuilt.
2465 </para>
2466
2467 <para>
2468 The Yocto Project implements shared state code that supports
2469 incremental builds.
2470 The implementation of the shared state code answers the following
2471 questions that were fundamental roadblocks within the OpenEmbedded
2472 incremental build support system:
2473 <itemizedlist>
2474 <listitem><para>
2475 What pieces of the system have changed and what pieces have
2476 not changed?
2477 </para></listitem>
2478 <listitem><para>
2479 How are changed pieces of software removed and replaced?
2480 </para></listitem>
2481 <listitem><para>
2482 How are pre-built components that do not need to be rebuilt
2483 from scratch used when they are available?
2484 </para></listitem>
2485 </itemizedlist>
2486 </para>
2487
2488 <para>
2489 For the first question, the build system detects changes in the
2490 "inputs" to a given task by creating a checksum (or signature) of
2491 the task's inputs.
2492 If the checksum changes, the system assumes the inputs have changed
2493 and the task needs to be rerun.
2494 For the second question, the shared state (sstate) code tracks
2495 which tasks add which output to the build process.
2496 This means the output from a given task can be removed, upgraded
2497 or otherwise manipulated.
2498 The third question is partly addressed by the solution for the
2499 second question assuming the build system can fetch the sstate
2500 objects from remote locations and install them if they are deemed
2501 to be valid.
2502 <note><title>Notes</title>
2503 <itemizedlist>
2504 <listitem><para>
2505 The build system does not maintain
2506 <ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink>
2507 information as part of the shared state packages.
2508 Consequently, considerations exist that affect
2509 maintaining shared state feeds.
2510 For information on how the build system works with
2511 packages and can track incrementing
2512 <filename>PR</filename> information, see the
2513 "<ulink url='&YOCTO_DOCS_DEV_URL;#automatically-incrementing-a-binary-package-revision-number'>Automatically Incrementing a Binary Package Revision Number</ulink>"
2514 section in the Yocto Project Development Tasks Manual.
2515 </para></listitem>
2516 <listitem><para>
2517 The code in the build system that supports incremental
2518 builds is not simple code.
2519 For techniques that help you work around issues related
2520 to shared state code, see the
2521 "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-viewing-metadata-used-to-create-the-input-signature-of-a-shared-state-task'>Viewing Metadata Used to Create the Input Signature of a Shared State Task</ulink>"
2522 and
2523 "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-invalidating-shared-state-to-force-a-task-to-run'>Invalidating Shared State to Force a Task to Run</ulink>"
2524 sections both in the Yocto Project Development Tasks
2525 Manual.
2526 </para></listitem>
2527 </itemizedlist>
2528 </note>
2529 </para>
2530
2531 <para>
2532 The rest of this section goes into detail about the overall
2533 incremental build architecture, the checksums (signatures), and
2534 shared state.
2535 </para>
2536
2537 <section id='concepts-overall-architecture'>
2538 <title>Overall Architecture</title>
2539
2540 <para>
2541 When determining what parts of the system need to be built,
2542 BitBake works on a per-task basis rather than a per-recipe
2543 basis.
2544 You might wonder why using a per-task basis is preferred over
2545 a per-recipe basis.
2546 To help explain, consider having the IPK packaging backend
2547 enabled and then switching to DEB.
2548 In this case, the
2549 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink>
2550 and
2551 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-package'><filename>do_package</filename></ulink>
2552 task outputs are still valid.
2553 However, with a per-recipe approach, the build would not
2554 include the <filename>.deb</filename> files.
2555 Consequently, you would have to invalidate the whole build and
2556 rerun it.
2557 Rerunning everything is not the best solution.
2558 Also, in this case, the core must be "taught" much about
2559 specific tasks.
2560 This methodology does not scale well and does not allow users
2561 to easily add new tasks in layers or as external recipes
2562 without touching the packaged-staging core.
2563 </para>
2564 </section>
2565
2566 <section id='overview-checksums'>
2567 <title>Checksums (Signatures)</title>
2568
2569 <para>
2570 The shared state code uses a checksum, which is a unique
2571 signature of a task's inputs, to determine if a task needs to
2572 be run again.
2573 Because it is a change in a task's inputs that triggers a
2574 rerun, the process needs to detect all the inputs to a given
2575 task.
2576 For shell tasks, this turns out to be fairly easy because
2577 the build process generates a "run" shell script for each task
2578 and it is possible to create a checksum that gives you a good
2579 idea of when the task's data changes.
2580 </para>
2581
2582 <para>
2583 To complicate the problem, there are things that should not be
2584 included in the checksum.
2585 First, there is the actual specific build path of a given
2586 task - the
2587 <ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink>.
2588 It does not matter if the work directory changes because it
2589 should not affect the output for target packages.
2590 Also, the build process has the objective of making native
2591 or cross packages relocatable.
2592 <note>
2593 Both native and cross packages run on the
2594 <ulink url='&YOCTO_DOCS_REF_URL;#hardware-build-system-term'>build host</ulink>.
2595 However, cross packages generate output for the target
2596 architecture.
2597 </note>
2598 The checksum therefore needs to exclude
2599 <filename>WORKDIR</filename>.
2600 The simplistic approach for excluding the work directory is to
2601 set <filename>WORKDIR</filename> to some fixed value and
2602 create the checksum for the "run" script.
2603 </para>
2604
2605 <para>
2606 Another problem results from the "run" scripts containing
2607 functions that might or might not get called.
2608 The incremental build solution contains code that figures out
2609 dependencies between shell functions.
2610 This code is used to prune the "run" scripts down to the
2611 minimum set, thereby alleviating this problem and making the
2612 "run" scripts much more readable as a bonus.
2613 </para>
2614
2615 <para>
2616 So far, solutions for shell scripts exist.
2617 What about Python tasks?
2618 The same approach applies even though these tasks are more
2619 difficult.
2620 The process needs to figure out what variables a Python
2621 function accesses and what functions it calls.
2622 Again, the incremental build solution contains code that first
2623 figures out the variable and function dependencies, and then
2624 creates a checksum for the data used as the input to the task.
2625 </para>
2626
2627 <para>
2628 Like the <filename>WORKDIR</filename> case, situations exist
2629 where dependencies should be ignored.
2630 For these situations, you can instruct the build process to
2631 ignore a dependency by using a line like the following:
2632 <literallayout class='monospaced'>
2633 PACKAGE_ARCHS[vardepsexclude] = "MACHINE"
2634 </literallayout>
2635 This example ensures that the
2636 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_ARCHS'><filename>PACKAGE_ARCHS</filename></ulink>
2637 variable does not depend on the value of
2638 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>,
2639 even if it does reference it.
2640 </para>
2641
2642 <para>
2643 Equally, there are cases where you need to add dependencies
2644 BitBake is not able to find.
2645 You can accomplish this by using a line like the following:
2646 <literallayout class='monospaced'>
2647 PACKAGE_ARCHS[vardeps] = "MACHINE"
2648 </literallayout>
2649 This example explicitly adds the <filename>MACHINE</filename>
2650 variable as a dependency for
2651 <filename>PACKAGE_ARCHS</filename>.
2652 </para>
2653
2654 <para>
2655 As an example, consider a case with in-line Python where
2656 BitBake is not able to figure out dependencies.
2657 When running in debug mode (i.e. using
2658 <filename>-DDD</filename>), BitBake produces output when it
2659 discovers something for which it cannot figure out dependencies.
2660 The Yocto Project team has currently not managed to cover
2661 those dependencies in detail and is aware of the need to fix
2662 this situation.
2663 </para>
2664
2665 <para>
2666 Thus far, this section has limited discussion to the direct
2667 inputs into a task.
2668 Information based on direct inputs is referred to as the
2669 "basehash" in the code.
2670 However, the question of a task's indirect inputs still
2671 exits - items already built and present in the
2672 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
2673 The checksum (or signature) for a particular task needs to add
2674 the hashes of all the tasks on which the particular task
2675 depends.
2676 Choosing which dependencies to add is a policy decision.
2677 However, the effect is to generate a master checksum that
2678 combines the basehash and the hashes of the task's
2679 dependencies.
2680 </para>
2681
2682 <para>
2683 At the code level, a variety of ways exist by which both the
2684 basehash and the dependent task hashes can be influenced.
2685 Within the BitBake configuration file, you can give BitBake
2686 some extra information to help it construct the basehash.
2687 The following statement effectively results in a list of
2688 global variable dependency excludes (i.e. variables never
2689 included in any checksum):
2690 <literallayout class='monospaced'>
2691 BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR \
2692 SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM \
2693 USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST \
2694 PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE \
2695 CCACHE_DIR EXTERNAL_TOOLCHAIN CCACHE CCACHE_DISABLE LICENSE_PATH SDKPKGSUFFIX"
2696 </literallayout>
2697 The previous example excludes
2698 <ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink>
2699 since that variable is actually constructed as a path within
2700 <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>,
2701 which is on the whitelist.
2702 </para>
2703
2704 <para>
2705 The rules for deciding which hashes of dependent tasks to
2706 include through dependency chains are more complex and are
2707 generally accomplished with a Python function.
2708 The code in <filename>meta/lib/oe/sstatesig.py</filename> shows
2709 two examples of this and also illustrates how you can insert
2710 your own policy into the system if so desired.
2711 This file defines the two basic signature generators
2712 <ulink url='&YOCTO_DOCS_REF_URL;#oe-core'>OE-Core</ulink>
2713 uses: "OEBasic" and "OEBasicHash".
2714 By default, a dummy "noop" signature handler is enabled
2715 in BitBake.
2716 This means that behavior is unchanged from previous versions.
2717 OE-Core uses the "OEBasicHash" signature handler by default
2718 through this setting in the <filename>bitbake.conf</filename>
2719 file:
2720 <literallayout class='monospaced'>
2721 BB_SIGNATURE_HANDLER ?= "OEBasicHash"
2722 </literallayout>
2723 The "OEBasicHash" <filename>BB_SIGNATURE_HANDLER</filename>
2724 is the same as the "OEBasic" version but adds the task hash to
2725 the
2726 <link linkend='stamp-files-and-the-rerunning-of-tasks'>stamp files</link>.
2727 This results in any metadata change that changes the task hash,
2728 automatically causing the task to be run again.
2729 This removes the need to bump
2730 <ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink>
2731 values, and changes to metadata automatically ripple across
2732 the build.
2733 </para>
2734
2735 <para>
2736 It is also worth noting that the end result of these
2737 signature generators is to make some dependency and hash
2738 information available to the build.
2739 This information includes:
2740 <itemizedlist>
2741 <listitem><para>
2742 <filename>BB_BASEHASH_task-</filename><replaceable>taskname</replaceable>:
2743 The base hashes for each task in the recipe.
2744 </para></listitem>
2745 <listitem><para>
2746 <filename>BB_BASEHASH_</filename><replaceable>filename</replaceable><filename>:</filename><replaceable>taskname</replaceable>:
2747 The base hashes for each dependent task.
2748 </para></listitem>
2749 <listitem><para>
2750 <filename>BBHASHDEPS_</filename><replaceable>filename</replaceable><filename>:</filename><replaceable>taskname</replaceable>:
2751 The task dependencies for each task.
2752 </para></listitem>
2753 <listitem><para>
2754 <filename>BB_TASKHASH</filename>:
2755 The hash of the currently running task.
2756 </para></listitem>
2757 </itemizedlist>
2758 </para>
2759 </section>
2760
2761 <section id='shared-state'>
2762 <title>Shared State</title>
2763
2764 <para>
2765 Checksums and dependencies, as discussed in the previous
2766 section, solve half the problem of supporting a shared state.
2767 The other half of the problem is being able to use checksum
2768 information during the build and being able to reuse or rebuild
2769 specific components.
2770 </para>
2771
2772 <para>
2773 The
2774 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-sstate'><filename>sstate</filename></ulink>
2775 class is a relatively generic implementation of how to
2776 "capture" a snapshot of a given task.
2777 The idea is that the build process does not care about the
2778 source of a task's output.
2779 Output could be freshly built or it could be downloaded and
2780 unpacked from somewhere.
2781 In other words, the build process does not need to worry about
2782 its origin.
2783 </para>
2784
2785 <para>
2786 Two types of output exist.
2787 One type is just about creating a directory in
2788 <ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink>.
2789 A good example is the output of either
2790 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink>
2791 or
2792 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-package'><filename>do_package</filename></ulink>.
2793 The other type of output occurs when a set of data is merged
2794 into a shared directory tree such as the sysroot.
2795 </para>
2796
2797 <para>
2798 The Yocto Project team has tried to keep the details of the
2799 implementation hidden in <filename>sstate</filename> class.
2800 From a user's perspective, adding shared state wrapping to a
2801 task is as simple as this
2802 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-deploy'><filename>do_deploy</filename></ulink>
2803 example taken from the
2804 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-deploy'><filename>deploy</filename></ulink>
2805 class:
2806 <literallayout class='monospaced'>
2807 DEPLOYDIR = "${WORKDIR}/deploy-${PN}"
2808 SSTATETASKS += "do_deploy"
2809 do_deploy[sstate-inputdirs] = "${DEPLOYDIR}"
2810 do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_IMAGE}"
2811
2812 python do_deploy_setscene () {
2813 sstate_setscene(d)
2814 }
2815 addtask do_deploy_setscene
2816 do_deploy[dirs] = "${DEPLOYDIR} ${B}"
2817 do_deploy[stamp-extra-info] = "${MACHINE_ARCH}"
2818 </literallayout>
2819 The following list explains the previous example:
2820 <itemizedlist>
2821 <listitem><para>
2822 Adding "do_deploy" to <filename>SSTATETASKS</filename>
2823 adds some required sstate-related processing, which is
2824 implemented in the
2825 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-sstate'><filename>sstate</filename></ulink>
2826 class, to before and after the
2827 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-deploy'><filename>do_deploy</filename></ulink>
2828 task.
2829 </para></listitem>
2830 <listitem><para>
2831 The
2832 <filename>do_deploy[sstate-inputdirs] = "${DEPLOYDIR}"</filename>
2833 declares that <filename>do_deploy</filename> places its
2834 output in <filename>${DEPLOYDIR}</filename> when run
2835 normally (i.e. when not using the sstate cache).
2836 This output becomes the input to the shared state cache.
2837 </para></listitem>
2838 <listitem><para>
2839 The
2840 <filename>do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_IMAGE}"</filename>
2841 line causes the contents of the shared state cache to be
2842 copied to <filename>${DEPLOY_DIR_IMAGE}</filename>.
2843 <note>
2844 If <filename>do_deploy</filename> is not already in
2845 the shared state cache or if its input checksum
2846 (signature) has changed from when the output was
2847 cached, the task runs to populate the shared
2848 state cache, after which the contents of the shared
2849 state cache is copied to
2850 <filename>${DEPLOY_DIR_IMAGE}</filename>.
2851 If <filename>do_deploy</filename> is in the shared
2852 state cache and its signature indicates that the
2853 cached output is still valid (i.e. if no
2854 relevant task inputs have changed), then the
2855 contents of the shared state cache copies
2856 directly to
2857 <filename>${DEPLOY_DIR_IMAGE}</filename> by the
2858 <filename>do_deploy_setscene</filename> task
2859 instead, skipping the
2860 <filename>do_deploy</filename> task.
2861 </note>
2862 </para></listitem>
2863 <listitem><para>
2864 The following task definition is glue logic needed to
2865 make the previous settings effective:
2866 <literallayout class='monospaced'>
2867 python do_deploy_setscene () {
2868 sstate_setscene(d)
2869 }
2870 addtask do_deploy_setscene
2871 </literallayout>
2872 <filename>sstate_setscene()</filename> takes the flags
2873 above as input and accelerates the
2874 <filename>do_deploy</filename> task through the
2875 shared state cache if possible.
2876 If the task was accelerated,
2877 <filename>sstate_setscene()</filename> returns True.
2878 Otherwise, it returns False, and the normal
2879 <filename>do_deploy</filename> task runs.
2880 For more information, see the
2881 "<ulink url='&YOCTO_DOCS_BB_URL;#setscene'>setscene</ulink>"
2882 section in the BitBake User Manual.
2883 </para></listitem>
2884 <listitem><para>
2885 The <filename>do_deploy[dirs] = "${DEPLOYDIR} ${B}"</filename>
2886 line creates <filename>${DEPLOYDIR}</filename> and
2887 <filename>${B}</filename> before the
2888 <filename>do_deploy</filename> task runs, and also sets
2889 the current working directory of
2890 <filename>do_deploy</filename> to
2891 <filename>${B}</filename>.
2892 For more information, see the
2893 "<ulink url='&YOCTO_DOCS_BB_URL;#variable-flags'>Variable Flags</ulink>"
2894 section in the BitBake User Manual.
2895 <note>
2896 In cases where
2897 <filename>sstate-inputdirs</filename> and
2898 <filename>sstate-outputdirs</filename> would be the
2899 same, you can use
2900 <filename>sstate-plaindirs</filename>.
2901 For example, to preserve the
2902 <filename>${PKGD}</filename> and
2903 <filename>${PKGDEST}</filename> output from the
2904 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-package'><filename>do_package</filename></ulink>
2905 task, use the following:
2906 <literallayout class='monospaced'>
2907 do_package[sstate-plaindirs] = "${PKGD} ${PKGDEST}"
2908 </literallayout>
2909 </note>
2910 </para></listitem>
2911 <listitem><para>
2912 The <filename>do_deploy[stamp-extra-info] = "${MACHINE_ARCH}"</filename>
2913 line appends extra metadata to the
2914 <link linkend='stamp-files-and-the-rerunning-of-tasks'>stamp file</link>.
2915 In this case, the metadata makes the task specific
2916 to a machine's architecture.
2917 See
2918 "<ulink url='&YOCTO_DOCS_BB_URL;#ref-bitbake-tasklist'>The Task List</ulink>"
2919 section in the BitBake User Manual for more
2920 information on the <filename>stamp-extra-info</filename>
2921 flag.
2922 </para></listitem>
2923 <listitem><para>
2924 <filename>sstate-inputdirs</filename> and
2925 <filename>sstate-outputdirs</filename> can also be used
2926 with multiple directories.
2927 For example, the following declares
2928 <filename>PKGDESTWORK</filename> and
2929 <filename>SHLIBWORK</filename> as shared state
2930 input directories, which populates the shared state
2931 cache, and <filename>PKGDATA_DIR</filename> and
2932 <filename>SHLIBSDIR</filename> as the corresponding
2933 shared state output directories:
2934 <literallayout class='monospaced'>
2935 do_package[sstate-inputdirs] = "${PKGDESTWORK} ${SHLIBSWORKDIR}"
2936 do_package[sstate-outputdirs] = "${PKGDATA_DIR} ${SHLIBSDIR}"
2937 </literallayout>
2938 </para></listitem>
2939 <listitem><para>
2940 These methods also include the ability to take a
2941 lockfile when manipulating shared state directory
2942 structures, for cases where file additions or removals
2943 are sensitive:
2944 <literallayout class='monospaced'>
2945 do_package[sstate-lockfile] = "${PACKAGELOCK}"
2946 </literallayout>
2947 </para></listitem>
2948 </itemizedlist>
2949 </para>
2950
2951 <para>
2952 Behind the scenes, the shared state code works by looking in
2953 <ulink url='&YOCTO_DOCS_REF_URL;#var-SSTATE_DIR'><filename>SSTATE_DIR</filename></ulink>
2954 and
2955 <ulink url='&YOCTO_DOCS_REF_URL;#var-SSTATE_MIRRORS'><filename>SSTATE_MIRRORS</filename></ulink>
2956 for shared state files.
2957 Here is an example:
2958 <literallayout class='monospaced'>
2959 SSTATE_MIRRORS ?= "\
2960 file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \
2961 file://.* file:///some/local/dir/sstate/PATH"
2962 </literallayout>
2963 <note>
2964 The shared state directory
2965 (<filename>SSTATE_DIR</filename>) is organized into
2966 two-character subdirectories, where the subdirectory
2967 names are based on the first two characters of the hash.
2968 If the shared state directory structure for a mirror has the
2969 same structure as <filename>SSTATE_DIR</filename>, you must
2970 specify "PATH" as part of the URI to enable the build system
2971 to map to the appropriate subdirectory.
2972 </note>
2973 </para>
2974
2975 <para>
2976 The shared state package validity can be detected just by
2977 looking at the filename since the filename contains the task
2978 checksum (or signature) as described earlier in this section.
2979 If a valid shared state package is found, the build process
2980 downloads it and uses it to accelerate the task.
2981 </para>
2982
2983 <para>
2984 The build processes use the <filename>*_setscene</filename>
2985 tasks for the task acceleration phase.
2986 BitBake goes through this phase before the main execution
2987 code and tries to accelerate any tasks for which it can find
2988 shared state packages.
2989 If a shared state package for a task is available, the
2990 shared state package is used.
2991 This means the task and any tasks on which it is dependent
2992 are not executed.
2993 </para>
2994
2995 <para>
2996 As a real world example, the aim is when building an IPK-based
2997 image, only the
2998 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-package_write_ipk'><filename>do_package_write_ipk</filename></ulink>
2999 tasks would have their shared state packages fetched and
3000 extracted.
3001 Since the sysroot is not used, it would never get extracted.
3002 This is another reason why a task-based approach is preferred
3003 over a recipe-based approach, which would have to install the
3004 output from every task.
3005 </para>
3006 </section>
3007 </section>
3008
3009 <section id='automatically-added-runtime-dependencies'>
3010 <title>Automatically Added Runtime Dependencies</title>
3011
3012 <para>
3013 The OpenEmbedded build system automatically adds common types of
3014 runtime dependencies between packages, which means that you do not
3015 need to explicitly declare the packages using
3016 <ulink url='&YOCTO_DOCS_REF_URL;#var-RDEPENDS'><filename>RDEPENDS</filename></ulink>.
3017 Three automatic mechanisms exist (<filename>shlibdeps</filename>,
3018 <filename>pcdeps</filename>, and <filename>depchains</filename>)
3019 that handle shared libraries, package configuration (pkg-config)
3020 modules, and <filename>-dev</filename> and
3021 <filename>-dbg</filename> packages, respectively.
3022 For other types of runtime dependencies, you must manually declare
3023 the dependencies.
3024 <itemizedlist>
3025 <listitem><para>
3026 <filename>shlibdeps</filename>:
3027 During the
3028 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-package'><filename>do_package</filename></ulink>
3029 task of each recipe, all shared libraries installed by the
3030 recipe are located.
3031 For each shared library, the package that contains the
3032 shared library is registered as providing the shared
3033 library.
3034 More specifically, the package is registered as providing
3035 the
3036 <ulink url='https://en.wikipedia.org/wiki/Soname'>soname</ulink>
3037 of the library.
3038 The resulting shared-library-to-package mapping
3039 is saved globally in
3040 <ulink url='&YOCTO_DOCS_REF_URL;#var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></ulink>
3041 by the
3042 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-packagedata'><filename>do_packagedata</filename></ulink>
3043 task.</para>
3044
3045 <para>Simultaneously, all executables and shared libraries
3046 installed by the recipe are inspected to see what shared
3047 libraries they link against.
3048 For each shared library dependency that is found,
3049 <filename>PKGDATA_DIR</filename> is queried to
3050 see if some package (likely from a different recipe)
3051 contains the shared library.
3052 If such a package is found, a runtime dependency is added
3053 from the package that depends on the shared library to the
3054 package that contains the library.</para>
3055
3056 <para>The automatically added runtime dependency also
3057 includes a version restriction.
3058 This version restriction specifies that at least the
3059 current version of the package that provides the shared
3060 library must be used, as if
3061 "<replaceable>package</replaceable> (>= <replaceable>version</replaceable>)"
3062 had been added to <filename>RDEPENDS</filename>.
3063 This forces an upgrade of the package containing the shared
3064 library when installing the package that depends on the
3065 library, if needed.</para>
3066
3067 <para>If you want to avoid a package being registered as
3068 providing a particular shared library (e.g. because the library
3069 is for internal use only), then add the library to
3070 <ulink url='&YOCTO_DOCS_REF_URL;#var-PRIVATE_LIBS'><filename>PRIVATE_LIBS</filename></ulink>
3071 inside the package's recipe.
3072 </para></listitem>
3073 <listitem><para>
3074 <filename>pcdeps</filename>:
3075 During the <filename>do_package</filename> task of each
3076 recipe, all pkg-config modules
3077 (<filename>*.pc</filename> files) installed by the recipe
3078 are located.
3079 For each module, the package that contains the module is
3080 registered as providing the module.
3081 The resulting module-to-package mapping is saved globally in
3082 <filename>PKGDATA_DIR</filename> by the
3083 <filename>do_packagedata</filename> task.</para>
3084
3085 <para>Simultaneously, all pkg-config modules installed by
3086 the recipe are inspected to see what other pkg-config
3087 modules they depend on.
3088 A module is seen as depending on another module if it
3089 contains a "Requires:" line that specifies the other module.
3090 For each module dependency,
3091 <filename>PKGDATA_DIR</filename> is queried to see if some
3092 package contains the module.
3093 If such a package is found, a runtime dependency is added
3094 from the package that depends on the module to the package
3095 that contains the module.
3096 <note>
3097 The <filename>pcdeps</filename> mechanism most often
3098 infers dependencies between <filename>-dev</filename>
3099 packages.
3100 </note>
3101 </para></listitem>
3102 <listitem><para>
3103 <filename>depchains</filename>:
3104 If a package <filename>foo</filename> depends on a package
3105 <filename>bar</filename>, then <filename>foo-dev</filename>
3106 and <filename>foo-dbg</filename> are also made to depend on
3107 <filename>bar-dev</filename> and
3108 <filename>bar-dbg</filename>, respectively.
3109 Taking the <filename>-dev</filename> packages as an
3110 example, the <filename>bar-dev</filename> package might
3111 provide headers and shared library symlinks needed by
3112 <filename>foo-dev</filename>, which shows the need
3113 for a dependency between the packages.</para>
3114
3115 <para>The dependencies added by
3116 <filename>depchains</filename> are in the form of
3117 <ulink url='&YOCTO_DOCS_REF_URL;#var-RRECOMMENDS'><filename>RRECOMMENDS</filename></ulink>.
3118 <note>
3119 By default, <filename>foo-dev</filename> also has an
3120 <filename>RDEPENDS</filename>-style dependency on
3121 <filename>foo</filename>, because the default value of
3122 <filename>RDEPENDS_${PN}-dev</filename> (set in
3123 <filename>bitbake.conf</filename>) includes
3124 "${PN}".
3125 </note></para>
3126
3127 <para>To ensure that the dependency chain is never broken,
3128 <filename>-dev</filename> and <filename>-dbg</filename>
3129 packages are always generated by default, even if the
3130 packages turn out to be empty.
3131 See the
3132 <ulink url='&YOCTO_DOCS_REF_URL;#var-ALLOW_EMPTY'><filename>ALLOW_EMPTY</filename></ulink>
3133 variable for more information.
3134 </para></listitem>
3135 </itemizedlist>
3136 </para>
3137
3138 <para>
3139 The <filename>do_package</filename> task depends on the
3140 <filename>do_packagedata</filename> task of each recipe in
3141 <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPENDS'><filename>DEPENDS</filename></ulink>
3142 through use of a
3143 <filename>[</filename><ulink url='&YOCTO_DOCS_BB_URL;#variable-flags'><filename>deptask</filename></ulink><filename>]</filename>
3144 declaration, which guarantees that the required
3145 shared-library/module-to-package mapping information will be available
3146 when needed as long as <filename>DEPENDS</filename> has been
3147 correctly set.
3148 </para>
3149 </section>
3150
3151 <section id='fakeroot-and-pseudo'>
3152 <title>Fakeroot and Pseudo</title>
3153
3154 <para>
3155 Some tasks are easier to implement when allowed to perform certain
3156 operations that are normally reserved for the root user (e.g.
3157 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink>,
3158 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-package_write_deb'><filename>do_package_write*</filename></ulink>,
3159 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-rootfs'><filename>do_rootfs</filename></ulink>,
3160 and
3161 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-image'><filename>do_image*</filename></ulink>).
3162 For example, the <filename>do_install</filename> task benefits
3163 from being able to set the UID and GID of installed files to
3164 arbitrary values.
3165 </para>
3166
3167 <para>
3168 One approach to allowing tasks to perform root-only operations
3169 would be to require
3170 <ulink url='&YOCTO_DOCS_REF_URL;#bitbake-term'>BitBake</ulink>
3171 to run as root.
3172 However, this method is cumbersome and has security issues.
3173 The approach that is actually used is to run tasks that benefit
3174 from root privileges in a "fake" root environment.
3175 Within this environment, the task and its child processes believe
3176 that they are running as the root user, and see an internally
3177 consistent view of the filesystem.
3178 As long as generating the final output (e.g. a package or an image)
3179 does not require root privileges, the fact that some earlier
3180 steps ran in a fake root environment does not cause problems.
3181 </para>
3182
3183 <para>
3184 The capability to run tasks in a fake root environment is known as
3185 "<ulink url='http://man.he.net/man1/fakeroot'>fakeroot</ulink>",
3186 which is derived from the BitBake keyword/variable
3187 flag that requests a fake root environment for a task.
3188 </para>
3189
3190 <para>
3191 In the
3192 <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>,
3193 the program that implements fakeroot is known as
3194 <ulink url='https://www.yoctoproject.org/software-item/pseudo/'>Pseudo</ulink>.
3195 Pseudo overrides system calls by using the environment variable
3196 <filename>LD_PRELOAD</filename>, which results in the illusion
3197 of running as root.
3198 To keep track of "fake" file ownership and permissions resulting
3199 from operations that require root permissions, Pseudo uses
3200 an SQLite 3 database.
3201 This database is stored in
3202 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink><filename>}/pseudo/files.db</filename>
3203 for individual recipes.
3204 Storing the database in a file as opposed to in memory
3205 gives persistence between tasks and builds, which is not
3206 accomplished using fakeroot.
3207 <note><title>Caution</title>
3208 If you add your own task that manipulates the same files or
3209 directories as a fakeroot task, then that task also needs to
3210 run under fakeroot.
3211 Otherwise, the task cannot run root-only operations, and
3212 cannot see the fake file ownership and permissions set by the
3213 other task.
3214 You need to also add a dependency on
3215 <filename>virtual/fakeroot-native:do_populate_sysroot</filename>,
3216 giving the following:
3217 <literallayout class='monospaced'>
3218 fakeroot do_mytask () {
3219 ...
3220 }
3221 do_mytask[depends] += "virtual/fakeroot-native:do_populate_sysroot"
3222 </literallayout>
3223 </note>
3224 For more information, see the
3225 <ulink url='&YOCTO_DOCS_BB_URL;#var-FAKEROOT'><filename>FAKEROOT*</filename></ulink>
3226 variables in the BitBake User Manual.
3227 You can also reference the
3228 "<ulink url='https://github.com/wrpseudo/pseudo/wiki/WhyNotFakeroot'>Why Not Fakeroot?</ulink>"
3229 article for background information on Fakeroot and Pseudo.
3230 </para>
3231 </section>
3232</chapter>
3233<!--
3234vim: expandtab tw=80 ts=4
3235-->
diff --git a/documentation/overview-manual/overview-manual-customization.xsl b/documentation/overview-manual/overview-manual-customization.xsl
deleted file mode 100644
index 1dd91bde80..0000000000
--- a/documentation/overview-manual/overview-manual-customization.xsl
+++ /dev/null
@@ -1,29 +0,0 @@
1<?xml version='1.0'?>
2<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
3
4<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
5
6 <xsl:import href="http://downloads.yoctoproject.org/mirror/docbook-mirror/docbook-xsl-1.76.1/xhtml/docbook.xsl" />
7
8<!--
9
10 <xsl:import href="../template/1.76.1/docbook-xsl-1.76.1/xhtml/docbook.xsl" />
11
12 <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.76.1/xhtml/docbook.xsl" />
13
14-->
15
16 <xsl:include href="../template/permalinks.xsl"/>
17 <xsl:include href="../template/section.title.xsl"/>
18 <xsl:include href="../template/component.title.xsl"/>
19 <xsl:include href="../template/division.title.xsl"/>
20 <xsl:include href="../template/formal.object.heading.xsl"/>
21
22 <xsl:param name="html.stylesheet" select="'overview-manual-style.css'" />
23 <xsl:param name="chapter.autolabel" select="1" />
24 <xsl:param name="appendix.autolabel" select="A" />
25 <xsl:param name="section.autolabel" select="1" />
26 <xsl:param name="section.label.includes.component.label" select="1" />
27 <xsl:param name="generate.id.attributes" select="1" />
28
29</xsl:stylesheet>
diff --git a/documentation/overview-manual/overview-manual-development-environment.xml b/documentation/overview-manual/overview-manual-development-environment.xml
deleted file mode 100644
index 08ad071316..0000000000
--- a/documentation/overview-manual/overview-manual-development-environment.xml
+++ /dev/null
@@ -1,954 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='overview-development-environment'>
7<title>The Yocto Project Development Environment</title>
8
9<para>
10 This chapter takes a look at the Yocto Project development
11 environment.
12 The chapter provides Yocto Project Development environment concepts that
13 help you understand how work is accomplished in an open source environment,
14 which is very different as compared to work accomplished in a closed,
15 proprietary environment.
16</para>
17
18<para>
19 Specifically, this chapter addresses open source philosophy, source
20 repositories, workflows, Git, and licensing.
21</para>
22
23<section id='open-source-philosophy'>
24 <title>Open Source Philosophy</title>
25
26 <para>
27 Open source philosophy is characterized by software development
28 directed by peer production and collaboration through an active
29 community of developers.
30 Contrast this to the more standard centralized development models
31 used by commercial software companies where a finite set of developers
32 produces a product for sale using a defined set of procedures that
33 ultimately result in an end product whose architecture and source
34 material are closed to the public.
35 </para>
36
37 <para>
38 Open source projects conceptually have differing concurrent agendas,
39 approaches, and production.
40 These facets of the development process can come from anyone in the
41 public (community) who has a stake in the software project.
42 The open source environment contains new copyright, licensing, domain,
43 and consumer issues that differ from the more traditional development
44 environment.
45 In an open source environment, the end product, source material,
46 and documentation are all available to the public at no cost.
47 </para>
48
49 <para>
50 A benchmark example of an open source project is the Linux kernel,
51 which was initially conceived and created by Finnish computer science
52 student Linus Torvalds in 1991.
53 Conversely, a good example of a non-open source project is the
54 <trademark class='registered'>Windows</trademark> family of operating
55 systems developed by
56 <trademark class='registered'>Microsoft</trademark> Corporation.
57 </para>
58
59 <para>
60 Wikipedia has a good historical description of the Open Source
61 Philosophy
62 <ulink url='http://en.wikipedia.org/wiki/Open_source'>here</ulink>.
63 You can also find helpful information on how to participate in the
64 Linux Community
65 <ulink url='http://ldn.linuxfoundation.org/book/how-participate-linux-community'>here</ulink>.
66 </para>
67</section>
68
69<section id='gs-the-development-host'>
70 <title>The Development Host</title>
71
72 <para>
73 A development host or
74 <ulink url='&YOCTO_DOCS_REF_URL;#hardware-build-system-term'>build host</ulink>
75 is key to using the Yocto Project.
76 Because the goal of the Yocto Project is to develop images or
77 applications that run on embedded hardware, development of those
78 images and applications generally takes place on a system not
79 intended to run the software - the development host.
80 </para>
81
82 <para>
83 You need to set up a development host in order to use it with the
84 Yocto Project.
85 Most find that it is best to have a native Linux machine function as
86 the development host.
87 However, it is possible to use a system that does not run Linux
88 as its operating system as your development host.
89 When you have a Mac or Windows-based system, you can set it up
90 as the development host by using
91 <ulink url='https://github.com/crops/poky-container'>CROPS</ulink>,
92 which leverages
93 <ulink url='https://www.docker.com/'>Docker Containers</ulink>.
94 Once you take the steps to set up a CROPS machine, you effectively
95 have access to a shell environment that is similar to what you see
96 when using a Linux-based development host.
97 For the steps needed to set up a system using CROPS, see the
98 "<ulink url='&YOCTO_DOCS_DEV_URL;#setting-up-to-use-crops'>Setting Up to Use CROss PlatformS (CROPS)</ulink>"
99 section in the Yocto Project Development Tasks Manual.
100 </para>
101
102 <para>
103 If your development host is going to be a system that runs a Linux
104 distribution, steps still exist that you must take to prepare the
105 system for use with the Yocto Project.
106 You need to be sure that the Linux distribution on the system is
107 one that supports the Yocto Project.
108 You also need to be sure that the correct set of host packages are
109 installed that allow development using the Yocto Project.
110 For the steps needed to set up a development host that runs Linux,
111 see the
112 "<ulink url='&YOCTO_DOCS_DEV_URL;#setting-up-a-native-linux-host'>Setting Up a Native Linux Host</ulink>"
113 section in the Yocto Project Development Tasks Manual.
114 </para>
115
116 <para>
117 Once your development host is set up to use the Yocto Project,
118 several methods exist for you to do work in the Yocto Project
119 environment:
120 <itemizedlist>
121 <listitem><para>
122 <emphasis>Command Lines, BitBake, and Shells:</emphasis>
123 Traditional development in the Yocto Project involves using the
124 <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>,
125 which uses BitBake, in a command-line environment from a shell
126 on your development host.
127 You can accomplish this from a host that is a native Linux
128 machine or from a host that has been set up with CROPS.
129 Either way, you create, modify, and build images and
130 applications all within a shell-based environment using
131 components and tools available through your Linux distribution
132 and the Yocto Project.</para>
133
134 <para>For a general flow of the build procedures, see the
135 "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-building-a-simple-image'>Building a Simple Image</ulink>"
136 section in the Yocto Project Development Tasks Manual.
137 </para></listitem>
138 <listitem><para>
139 <emphasis>Board Support Package (BSP) Development:</emphasis>
140 Development of BSPs involves using the Yocto Project to
141 create and test layers that allow easy development of
142 images and applications targeted for specific hardware.
143 To development BSPs, you need to take some additional steps
144 beyond what was described in setting up a development host.
145 </para>
146
147 <para>The
148 <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>
149 provides BSP-related development information.
150 For specifics on development host preparation, see the
151 "<ulink url='&YOCTO_DOCS_BSP_URL;#preparing-your-build-host-to-work-with-bsp-layers'>Preparing Your Build Host to Work With BSP Layers</ulink>"
152 section in the Yocto Project Board Support Package (BSP)
153 Developer's Guide.
154 </para></listitem>
155 <listitem><para>
156 <emphasis>Kernel Development:</emphasis>
157 If you are going to be developing kernels using the Yocto
158 Project you likely will be using <filename>devtool</filename>.
159 A workflow using <filename>devtool</filename> makes kernel
160 development quicker by reducing iteration cycle times.</para>
161
162 <para>The
163 <ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;'>Yocto Project Linux Kernel Development Manual</ulink>
164 provides kernel-related development information.
165 For specifics on development host preparation, see the
166 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#preparing-the-build-host-to-work-on-the-kernel'>Preparing the Build Host to Work on the Kernel</ulink>"
167 section in the Yocto Project Linux Kernel Development Manual.
168 </para></listitem>
169 <listitem><para>
170 <emphasis>Using Toaster:</emphasis>
171 The other Yocto Project development method that involves an
172 interface that effectively puts the Yocto Project into the
173 background is Toaster.
174 Toaster provides an interface to the OpenEmbedded build system.
175 The interface enables you to configure and run your builds.
176 Information about builds is collected and stored in a database.
177 You can use Toaster to configure and start builds on multiple
178 remote build servers.</para>
179
180 <para>For steps that show you how to set up your development
181 host to use Toaster and on how to use Toaster in general,
182 see the
183 <ulink url='&YOCTO_DOCS_TOAST_URL;'>Toaster User Manual</ulink>.
184 </para></listitem>
185 </itemizedlist>
186 </para>
187</section>
188
189<section id='yocto-project-repositories'>
190 <title>Yocto Project Source Repositories</title>
191
192 <para>
193 The Yocto Project team maintains complete source repositories for all
194 Yocto Project files at
195 <ulink url='&YOCTO_GIT_URL;'></ulink>.
196 This web-based source code browser is organized into categories by
197 function such as IDE Plugins, Matchbox, Poky, Yocto Linux Kernel, and
198 so forth.
199 From the interface, you can click on any particular item in the "Name"
200 column and see the URL at the bottom of the page that you need to clone
201 a Git repository for that particular item.
202 Having a local Git repository of the
203 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>,
204 which is usually named "poky", allows
205 you to make changes, contribute to the history, and ultimately enhance
206 the Yocto Project's tools, Board Support Packages, and so forth.
207 </para>
208
209 <para>
210 For any supported release of Yocto Project, you can also go to the
211 <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink> and
212 select the "DOWNLOADS" item from the "SOFTWARE" menu and get a
213 released tarball of the <filename>poky</filename> repository, any
214 supported BSP tarball, or Yocto Project tools.
215 Unpacking these tarballs gives you a snapshot of the released
216 files.
217 <note><title>Notes</title>
218 <itemizedlist>
219 <listitem><para>
220 The recommended method for setting up the Yocto Project
221 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
222 and the files for supported BSPs
223 (e.g., <filename>meta-intel</filename>) is to use
224 <link linkend='git'>Git</link> to create a local copy of
225 the upstream repositories.
226 </para></listitem>
227 <listitem><para>
228 Be sure to always work in matching branches for both
229 the selected BSP repository and the Source Directory
230 (i.e. <filename>poky</filename>) repository.
231 For example, if you have checked out the "master" branch
232 of <filename>poky</filename> and you are going to use
233 <filename>meta-intel</filename>, be sure to checkout the
234 "master" branch of <filename>meta-intel</filename>.
235 </para></listitem>
236 </itemizedlist>
237 </note>
238 </para>
239
240 <para>
241 In summary, here is where you can get the project files needed for
242 development:
243 <itemizedlist>
244 <listitem><para id='source-repositories'>
245 <emphasis>
246 <ulink url='&YOCTO_GIT_URL;'>Source Repositories:</ulink>
247 </emphasis>
248 This area contains IDE Plugins, Matchbox, Poky, Poky Support,
249 Tools, Yocto Linux Kernel, and Yocto Metadata Layers.
250 You can create local copies of Git repositories for each of
251 these areas.</para>
252
253 <para>
254 <imagedata fileref="figures/source-repos.png" align="center" width="6in" depth="4in" />
255 For steps on how to view and access these upstream Git
256 repositories, see the
257 "<ulink url='&YOCTO_DOCS_DEV_URL;#accessing-source-repositories'>Accessing Source Repositories</ulink>"
258 Section in the Yocto Project Development Tasks Manual.
259 </para></listitem>
260 <listitem><para><anchor id='index-downloads' />
261 <emphasis>
262 <ulink url='&YOCTO_DL_URL;/releases/'>Index of /releases:</ulink>
263 </emphasis>
264 This is an index of releases such as Poky, Pseudo, installers
265 for cross-development toolchains, miscellaneous support
266 and all released versions of Yocto Project in the form of
267 images or tarballs.
268 Downloading and extracting these files does not produce a local
269 copy of the Git repository but rather a snapshot of a
270 particular release or image.</para>
271
272 <para>
273 <imagedata fileref="figures/index-downloads.png" align="center" width="6in" depth="3.5in" />
274 For steps on how to view and access these files, see the
275 "<ulink url='&YOCTO_DOCS_DEV_URL;#accessing-index-of-releases'>Accessing Index of Releases</ulink>"
276 section in the Yocto Project Development Tasks Manual.
277 </para></listitem>
278 <listitem><para id='downloads-page'>
279 <emphasis>"DOWNLOADS" page for the
280 <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink>:
281 </emphasis></para>
282
283 <para>The Yocto Project website includes a "DOWNLOADS" page
284 accessible through the "SOFTWARE" menu that allows you to
285 download any Yocto Project release, tool, and Board Support
286 Package (BSP) in tarball form.
287 The tarballs are similar to those found in the
288 <ulink url='&YOCTO_DL_URL;/releases/'>Index of /releases:</ulink>
289 area.</para>
290
291 <para>
292 <imagedata fileref="figures/yp-download.png" align="center" width="6in" depth="4in" />
293 For steps on how to use the "DOWNLOADS" page, see the
294 "<ulink url='&YOCTO_DOCS_DEV_URL;#using-the-downloads-page'>Using the Downloads Page</ulink>"
295 section in the Yocto Project Development Tasks Manual.
296 </para></listitem>
297 </itemizedlist>
298 </para>
299</section>
300
301<section id='gs-git-workflows-and-the-yocto-project'>
302 <title>Git Workflows and the Yocto Project</title>
303
304 <para>
305 Developing using the Yocto Project likely requires the use of
306 <link linkend='git'>Git</link>.
307 Git is a free, open source distributed version control system
308 used as part of many collaborative design environments.
309 This section provides workflow concepts using the Yocto Project and
310 Git.
311 In particular, the information covers basic practices that describe
312 roles and actions in a collaborative development environment.
313 <note>
314 If you are familiar with this type of development environment, you
315 might not want to read this section.
316 </note>
317 </para>
318
319 <para>
320 The Yocto Project files are maintained using Git in "branches"
321 whose Git histories track every change and whose structures
322 provide branches for all diverging functionality.
323 Although there is no need to use Git, many open source projects do so.
324 <para>
325
326 </para>
327 For the Yocto Project, a key individual called the "maintainer" is
328 responsible for the integrity of the "master" branch of a given Git
329 repository.
330 The "master" branch is the "upstream" repository from which final or
331 most recent builds of a project occur.
332 The maintainer is responsible for accepting changes from other
333 developers and for organizing the underlying branch structure to
334 reflect release strategies and so forth.
335 <note>
336 For information on finding out who is responsible for (maintains)
337 a particular area of code in the Yocto Project, see the
338 "<ulink url='&YOCTO_DOCS_DEV_URL;#how-to-submit-a-change'>Submitting a Change to the Yocto Project</ulink>"
339 section of the Yocto Project Development Tasks Manual.
340 </note>
341 </para>
342
343 <para>
344 The Yocto Project <filename>poky</filename> Git repository also has an
345 upstream contribution Git repository named
346 <filename>poky-contrib</filename>.
347 You can see all the branches in this repository using the web interface
348 of the
349 <ulink url='&YOCTO_GIT_URL;'>Source Repositories</ulink> organized
350 within the "Poky Support" area.
351 These branches hold changes (commits) to the project that have been
352 submitted or committed by the Yocto Project development team and by
353 community members who contribute to the project.
354 The maintainer determines if the changes are qualified to be moved
355 from the "contrib" branches into the "master" branch of the Git
356 repository.
357 </para>
358
359 <para>
360 Developers (including contributing community members) create and
361 maintain cloned repositories of upstream branches.
362 The cloned repositories are local to their development platforms and
363 are used to develop changes.
364 When a developer is satisfied with a particular feature or change,
365 they "push" the change to the appropriate "contrib" repository.
366 </para>
367
368 <para>
369 Developers are responsible for keeping their local repository
370 up-to-date with whatever upstream branch they are working against.
371 They are also responsible for straightening out any conflicts that
372 might arise within files that are being worked on simultaneously by
373 more than one person.
374 All this work is done locally on the development host before
375 anything is pushed to a "contrib" area and examined at the maintainer's
376 level.
377 </para>
378
379 <para>
380 A somewhat formal method exists by which developers commit changes
381 and push them into the "contrib" area and subsequently request that
382 the maintainer include them into an upstream branch.
383 This process is called "submitting a patch" or "submitting a change."
384 For information on submitting patches and changes, see the
385 "<ulink url='&YOCTO_DOCS_DEV_URL;#how-to-submit-a-change'>Submitting a Change to the Yocto Project</ulink>"
386 section in the Yocto Project Development Tasks Manual.
387 </para>
388
389 <para>
390 In summary, a single point of entry
391 exists for changes into a "master" or development branch of the
392 Git repository, which is controlled by the project's maintainer.
393 And, a set of developers exist who independently develop, test, and
394 submit changes to "contrib" areas for the maintainer to examine.
395 The maintainer then chooses which changes are going to become a
396 permanent part of the project.
397 </para>
398
399 <para>
400 <imagedata fileref="figures/git-workflow.png" width="6in" depth="3in" align="left" scalefit="1" />
401 </para>
402
403 <para>
404 While each development environment is unique, there are some best
405 practices or methods that help development run smoothly.
406 The following list describes some of these practices.
407 For more information about Git workflows, see the workflow topics in
408 the
409 <ulink url='http://book.git-scm.com'>Git Community Book</ulink>.
410 <itemizedlist>
411 <listitem><para>
412 <emphasis>Make Small Changes:</emphasis>
413 It is best to keep the changes you commit small as compared to
414 bundling many disparate changes into a single commit.
415 This practice not only keeps things manageable but also allows
416 the maintainer to more easily include or refuse changes.
417 </para></listitem>
418 <listitem><para>
419 <emphasis>Make Complete Changes:</emphasis>
420 It is also good practice to leave the repository in a
421 state that allows you to still successfully build your project.
422 In other words, do not commit half of a feature,
423 then add the other half as a separate, later commit.
424 Each commit should take you from one buildable project state
425 to another buildable state.
426 </para></listitem>
427 <listitem><para>
428 <emphasis>Use Branches Liberally:</emphasis>
429 It is very easy to create, use, and delete local branches in
430 your working Git repository on the development host.
431 You can name these branches anything you like.
432 It is helpful to give them names associated with the particular
433 feature or change on which you are working.
434 Once you are done with a feature or change and have merged it
435 into your local master branch, simply discard the temporary
436 branch.
437 </para></listitem>
438 <listitem><para>
439 <emphasis>Merge Changes:</emphasis>
440 The <filename>git merge</filename> command allows you to take
441 the changes from one branch and fold them into another branch.
442 This process is especially helpful when more than a single
443 developer might be working on different parts of the same
444 feature.
445 Merging changes also automatically identifies any collisions
446 or "conflicts" that might happen as a result of the same lines
447 of code being altered by two different developers.
448 </para></listitem>
449 <listitem><para>
450 <emphasis>Manage Branches:</emphasis>
451 Because branches are easy to use, you should use a system
452 where branches indicate varying levels of code readiness.
453 For example, you can have a "work" branch to develop in, a
454 "test" branch where the code or change is tested, a "stage"
455 branch where changes are ready to be committed, and so forth.
456 As your project develops, you can merge code across the
457 branches to reflect ever-increasing stable states of the
458 development.
459 </para></listitem>
460 <listitem><para>
461 <emphasis>Use Push and Pull:</emphasis>
462 The push-pull workflow is based on the concept of developers
463 "pushing" local commits to a remote repository, which is
464 usually a contribution repository.
465 This workflow is also based on developers "pulling" known
466 states of the project down into their local development
467 repositories.
468 The workflow easily allows you to pull changes submitted by
469 other developers from the upstream repository into your
470 work area ensuring that you have the most recent software
471 on which to develop.
472 The Yocto Project has two scripts named
473 <filename>create-pull-request</filename> and
474 <filename>send-pull-request</filename> that ship with the
475 release to facilitate this workflow.
476 You can find these scripts in the <filename>scripts</filename>
477 folder of the
478 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
479 For information on how to use these scripts, see the
480 "<ulink url='&YOCTO_DOCS_DEV_URL;#pushing-a-change-upstream'>Using Scripts to Push a Change Upstream and Request a Pull</ulink>"
481 section in the Yocto Project Development Tasks Manual.
482 </para></listitem>
483 <listitem><para>
484 <emphasis>Patch Workflow:</emphasis>
485 This workflow allows you to notify the maintainer through an
486 email that you have a change (or patch) you would like
487 considered for the "master" branch of the Git repository.
488 To send this type of change, you format the patch and then
489 send the email using the Git commands
490 <filename>git format-patch</filename> and
491 <filename>git send-email</filename>.
492 For information on how to use these scripts, see the
493 "<ulink url='&YOCTO_DOCS_DEV_URL;#how-to-submit-a-change'>Submitting a Change to the Yocto Project</ulink>"
494 section in the Yocto Project Development Tasks Manual.
495 </para></listitem>
496 </itemizedlist>
497 </para>
498</section>
499
500<section id='git'>
501 <title>Git</title>
502
503 <para>
504 The Yocto Project makes extensive use of Git, which is a
505 free, open source distributed version control system.
506 Git supports distributed development, non-linear development,
507 and can handle large projects.
508 It is best that you have some fundamental understanding
509 of how Git tracks projects and how to work with Git if
510 you are going to use the Yocto Project for development.
511 This section provides a quick overview of how Git works and
512 provides you with a summary of some essential Git commands.
513 <note><title>Notes</title>
514 <itemizedlist>
515 <listitem><para>
516 For more information on Git, see
517 <ulink url='http://git-scm.com/documentation'></ulink>.
518 </para></listitem>
519 <listitem><para>
520 If you need to download Git, it is recommended that you add
521 Git to your system through your distribution's "software
522 store" (e.g. for Ubuntu, use the Ubuntu Software feature).
523 For the Git download page, see
524 <ulink url='http://git-scm.com/download'></ulink>.
525 </para></listitem>
526 <listitem><para>
527 For information beyond the introductory nature in this
528 section, see the
529 "<ulink url='&YOCTO_DOCS_DEV_URL;#locating-yocto-project-source-files'>Locating Yocto Project Source Files</ulink>"
530 section in the Yocto Project Development Tasks Manual.
531 </para></listitem>
532 </itemizedlist>
533 </note>
534 </para>
535
536 <section id='repositories-tags-and-branches'>
537 <title>Repositories, Tags, and Branches</title>
538
539 <para>
540 As mentioned briefly in the previous section and also in the
541 "<link linkend='gs-git-workflows-and-the-yocto-project'>Git Workflows and the Yocto Project</link>"
542 section, the Yocto Project maintains source repositories at
543 <ulink url='&YOCTO_GIT_URL;'></ulink>.
544 If you look at this web-interface of the repositories, each item
545 is a separate Git repository.
546 </para>
547
548 <para>
549 Git repositories use branching techniques that track content
550 change (not files) within a project (e.g. a new feature or updated
551 documentation).
552 Creating a tree-like structure based on project divergence allows
553 for excellent historical information over the life of a project.
554 This methodology also allows for an environment from which you can
555 do lots of local experimentation on projects as you develop
556 changes or new features.
557 </para>
558
559 <para>
560 A Git repository represents all development efforts for a given
561 project.
562 For example, the Git repository <filename>poky</filename> contains
563 all changes and developments for that repository over the course
564 of its entire life.
565 That means that all changes that make up all releases are captured.
566 The repository maintains a complete history of changes.
567 </para>
568
569 <para>
570 You can create a local copy of any repository by "cloning" it
571 with the <filename>git clone</filename> command.
572 When you clone a Git repository, you end up with an identical
573 copy of the repository on your development system.
574 Once you have a local copy of a repository, you can take steps to
575 develop locally.
576 For examples on how to clone Git repositories, see the
577 "<ulink url='&YOCTO_DOCS_DEV_URL;#locating-yocto-project-source-files'>Locating Yocto Project Source Files</ulink>"
578 section in the Yocto Project Development Tasks Manual.
579 </para>
580
581 <para>
582 It is important to understand that Git tracks content change and
583 not files.
584 Git uses "branches" to organize different development efforts.
585 For example, the <filename>poky</filename> repository has
586 several branches that include the current "&DISTRO_NAME_NO_CAP;"
587 branch, the "master" branch, and many branches for past
588 Yocto Project releases.
589 You can see all the branches by going to
590 <ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/'></ulink> and
591 clicking on the
592 <filename><ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/refs/heads'>[...]</ulink></filename>
593 link beneath the "Branch" heading.
594 </para>
595
596 <para>
597 Each of these branches represents a specific area of development.
598 The "master" branch represents the current or most recent
599 development.
600 All other branches represent offshoots of the "master" branch.
601 </para>
602
603 <para>
604 When you create a local copy of a Git repository, the copy has
605 the same set of branches as the original.
606 This means you can use Git to create a local working area
607 (also called a branch) that tracks a specific development branch
608 from the upstream source Git repository.
609 in other words, you can define your local Git environment to
610 work on any development branch in the repository.
611 To help illustrate, consider the following example Git commands:
612 <literallayout class='monospaced'>
613 $ cd ~
614 $ git clone git://git.yoctoproject.org/poky
615 $ cd poky
616 $ git checkout -b &DISTRO_NAME_NO_CAP; origin/&DISTRO_NAME_NO_CAP;
617 </literallayout>
618 In the previous example after moving to the home directory, the
619 <filename>git clone</filename> command creates a
620 local copy of the upstream <filename>poky</filename> Git repository.
621 By default, Git checks out the "master" branch for your work.
622 After changing the working directory to the new local repository
623 (i.e. <filename>poky</filename>), the
624 <filename>git checkout</filename> command creates
625 and checks out a local branch named "&DISTRO_NAME_NO_CAP;", which
626 tracks the upstream "origin/&DISTRO_NAME_NO_CAP;" branch.
627 Changes you make while in this branch would ultimately affect
628 the upstream "&DISTRO_NAME_NO_CAP;" branch of the
629 <filename>poky</filename> repository.
630 </para>
631
632 <para>
633 It is important to understand that when you create and checkout a
634 local working branch based on a branch name,
635 your local environment matches the "tip" of that particular
636 development branch at the time you created your local branch,
637 which could be different from the files in the "master" branch
638 of the upstream repository.
639 In other words, creating and checking out a local branch based on
640 the "&DISTRO_NAME_NO_CAP;" branch name is not the same as
641 checking out the "master" branch in the repository.
642 Keep reading to see how you create a local snapshot of a Yocto
643 Project Release.
644 </para>
645
646 <para>
647 Git uses "tags" to mark specific changes in a repository branch
648 structure.
649 Typically, a tag is used to mark a special point such as the final
650 change (or commit) before a project is released.
651 You can see the tags used with the <filename>poky</filename> Git
652 repository by going to
653 <ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/'></ulink> and
654 clicking on the
655 <filename><ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/refs/tags'>[...]</ulink></filename>
656 link beneath the "Tag" heading.
657 </para>
658
659 <para>
660 Some key tags for the <filename>poky</filename> repository are
661 <filename>jethro-14.0.3</filename>,
662 <filename>morty-16.0.1</filename>,
663 <filename>pyro-17.0.0</filename>, and
664 <filename>&DISTRO_NAME_NO_CAP;-&POKYVERSION;</filename>.
665 These tags represent Yocto Project releases.
666 </para>
667
668 <para>
669 When you create a local copy of the Git repository, you also
670 have access to all the tags in the upstream repository.
671 Similar to branches, you can create and checkout a local working
672 Git branch based on a tag name.
673 When you do this, you get a snapshot of the Git repository that
674 reflects the state of the files when the change was made associated
675 with that tag.
676 The most common use is to checkout a working branch that matches
677 a specific Yocto Project release.
678 Here is an example:
679 <literallayout class='monospaced'>
680 $ cd ~
681 $ git clone git://git.yoctoproject.org/poky
682 $ cd poky
683 $ git fetch --tags
684 $ git checkout tags/rocko-18.0.0 -b my_rocko-18.0.0
685 </literallayout>
686 In this example, the name of the top-level directory of your
687 local Yocto Project repository is <filename>poky</filename>.
688 After moving to the <filename>poky</filename> directory, the
689 <filename>git fetch</filename> command makes all the upstream
690 tags available locally in your repository.
691 Finally, the <filename>git checkout</filename> command
692 creates and checks out a branch named "my-rocko-18.0.0" that is
693 based on the upstream branch whose "HEAD" matches the
694 commit in the repository associated with the "rocko-18.0.0" tag.
695 The files in your repository now exactly match that particular
696 Yocto Project release as it is tagged in the upstream Git
697 repository.
698 It is important to understand that when you create and
699 checkout a local working branch based on a tag, your environment
700 matches a specific point in time and not the entire development
701 branch (i.e. from the "tip" of the branch backwards).
702 </para>
703 </section>
704
705 <section id='basic-commands'>
706 <title>Basic Commands</title>
707
708 <para>
709 Git has an extensive set of commands that lets you manage changes
710 and perform collaboration over the life of a project.
711 Conveniently though, you can manage with a small set of basic
712 operations and workflows once you understand the basic
713 philosophy behind Git.
714 You do not have to be an expert in Git to be functional.
715 A good place to look for instruction on a minimal set of Git
716 commands is
717 <ulink url='http://git-scm.com/documentation'>here</ulink>.
718 </para>
719
720 <para>
721 The following list of Git commands briefly describes some basic
722 Git operations as a way to get started.
723 As with any set of commands, this list (in most cases) simply shows
724 the base command and omits the many arguments it supports.
725 See the Git documentation for complete descriptions and strategies
726 on how to use these commands:
727 <itemizedlist>
728 <listitem><para>
729 <emphasis><filename>git init</filename>:</emphasis>
730 Initializes an empty Git repository.
731 You cannot use Git commands unless you have a
732 <filename>.git</filename> repository.
733 </para></listitem>
734 <listitem><para id='git-commands-clone'>
735 <emphasis><filename>git clone</filename>:</emphasis>
736 Creates a local clone of a Git repository that is on
737 equal footing with a fellow developer's Git repository
738 or an upstream repository.
739 </para></listitem>
740 <listitem><para>
741 <emphasis><filename>git add</filename>:</emphasis>
742 Locally stages updated file contents to the index that
743 Git uses to track changes.
744 You must stage all files that have changed before you
745 can commit them.
746 </para></listitem>
747 <listitem><para>
748 <emphasis><filename>git commit</filename>:</emphasis>
749 Creates a local "commit" that documents the changes you
750 made.
751 Only changes that have been staged can be committed.
752 Commits are used for historical purposes, for determining
753 if a maintainer of a project will allow the change,
754 and for ultimately pushing the change from your local
755 Git repository into the project's upstream repository.
756 </para></listitem>
757 <listitem><para>
758 <emphasis><filename>git status</filename>:</emphasis>
759 Reports any modified files that possibly need to be
760 staged and gives you a status of where you stand regarding
761 local commits as compared to the upstream repository.
762 </para></listitem>
763 <listitem><para>
764 <emphasis><filename>git checkout</filename> <replaceable>branch-name</replaceable>:</emphasis>
765 Changes your local working branch and in this form
766 assumes the local branch already exists.
767 This command is analogous to "cd".
768 </para></listitem>
769 <listitem><para>
770 <emphasis><filename>git checkout –b</filename> <replaceable>working-branch</replaceable> <replaceable>upstream-branch</replaceable>:</emphasis>
771 Creates and checks out a working branch on your local
772 machine.
773 The local branch tracks the upstream branch.
774 You can use your local branch to isolate your work.
775 It is a good idea to use local branches when adding
776 specific features or changes.
777 Using isolated branches facilitates easy removal of
778 changes if they do not work out.
779 </para></listitem>
780 <listitem><para><emphasis><filename>git branch</filename>:</emphasis>
781 Displays the existing local branches associated with your
782 local repository.
783 The branch that you have currently checked out is noted
784 with an asterisk character.
785 </para></listitem>
786 <listitem><para>
787 <emphasis><filename>git branch -D</filename> <replaceable>branch-name</replaceable>:</emphasis>
788 Deletes an existing local branch.
789 You need to be in a local branch other than the one you
790 are deleting in order to delete
791 <replaceable>branch-name</replaceable>.
792 </para></listitem>
793 <listitem><para>
794 <emphasis><filename>git pull --rebase</filename>:</emphasis>
795 Retrieves information from an upstream Git repository
796 and places it in your local Git repository.
797 You use this command to make sure you are synchronized with
798 the repository from which you are basing changes
799 (.e.g. the "master" branch).
800 The "--rebase" option ensures that any local commits you
801 have in your branch are preserved at the top of your
802 local branch.
803 </para></listitem>
804 <listitem><para>
805 <emphasis><filename>git push</filename> <replaceable>repo-name</replaceable> <replaceable>local-branch</replaceable><filename>:</filename><replaceable>upstream-branch</replaceable>:</emphasis>
806 Sends all your committed local changes to the upstream Git
807 repository that your local repository is tracking
808 (e.g. a contribution repository).
809 The maintainer of the project draws from these repositories
810 to merge changes (commits) into the appropriate branch
811 of project's upstream repository.
812 </para></listitem>
813 <listitem><para>
814 <emphasis><filename>git merge</filename>:</emphasis>
815 Combines or adds changes from one
816 local branch of your repository with another branch.
817 When you create a local Git repository, the default branch
818 is named "master".
819 A typical workflow is to create a temporary branch that is
820 based off "master" that you would use for isolated work.
821 You would make your changes in that isolated branch,
822 stage and commit them locally, switch to the "master"
823 branch, and then use the <filename>git merge</filename>
824 command to apply the changes from your isolated branch
825 into the currently checked out branch (e.g. "master").
826 After the merge is complete and if you are done with
827 working in that isolated branch, you can safely delete
828 the isolated branch.
829 </para></listitem>
830 <listitem><para>
831 <emphasis><filename>git cherry-pick</filename> <replaceable>commits</replaceable>:</emphasis>
832 Choose and apply specific commits from one branch
833 into another branch.
834 There are times when you might not be able to merge
835 all the changes in one branch with
836 another but need to pick out certain ones.
837 </para></listitem>
838 <listitem><para>
839 <emphasis><filename>gitk</filename>:</emphasis>
840 Provides a GUI view of the branches and changes in your
841 local Git repository.
842 This command is a good way to graphically see where things
843 have diverged in your local repository.
844 <note>
845 You need to install the <filename>gitk</filename>
846 package on your development system to use this
847 command.
848 </note>
849 </para></listitem>
850 <listitem><para>
851 <emphasis><filename>git log</filename>:</emphasis>
852 Reports a history of your commits to the repository.
853 This report lists all commits regardless of whether you
854 have pushed them upstream or not.
855 </para></listitem>
856 <listitem><para>
857 <emphasis><filename>git diff</filename>:</emphasis>
858 Displays line-by-line differences between a local
859 working file and the same file as understood by Git.
860 This command is useful to see what you have changed
861 in any given file.
862 </para></listitem>
863 </itemizedlist>
864 </para>
865 </section>
866</section>
867
868<section id='licensing'>
869 <title>Licensing</title>
870
871 <para>
872 Because open source projects are open to the public, they have
873 different licensing structures in place.
874 License evolution for both Open Source and Free Software has an
875 interesting history.
876 If you are interested in this history, you can find basic information
877 here:
878 <itemizedlist>
879 <listitem><para>
880 <ulink url='http://en.wikipedia.org/wiki/Open-source_license'>Open source license history</ulink>
881 </para></listitem>
882 <listitem><para>
883 <ulink url='http://en.wikipedia.org/wiki/Free_software_license'>Free software license history</ulink>
884 </para></listitem>
885 </itemizedlist>
886 </para>
887
888 <para>
889 In general, the Yocto Project is broadly licensed under the
890 Massachusetts Institute of Technology (MIT) License.
891 MIT licensing permits the reuse of software within proprietary
892 software as long as the license is distributed with that software.
893 MIT is also compatible with the GNU General Public License (GPL).
894 Patches to the Yocto Project follow the upstream licensing scheme.
895 You can find information on the MIT license
896 <ulink url='http://www.opensource.org/licenses/mit-license.php'>here</ulink>.
897 You can find information on the GNU GPL
898 <ulink url='http://www.opensource.org/licenses/LGPL-3.0'>here</ulink>.
899 </para>
900
901 <para>
902 When you build an image using the Yocto Project, the build process
903 uses a known list of licenses to ensure compliance.
904 You can find this list in the
905 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
906 at <filename>meta/files/common-licenses</filename>.
907 Once the build completes, the list of all licenses found and used
908 during that build are kept in the
909 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
910 at <filename>tmp/deploy/licenses</filename>.
911 </para>
912
913 <para>
914 If a module requires a license that is not in the base list, the
915 build process generates a warning during the build.
916 These tools make it easier for a developer to be certain of the
917 licenses with which their shipped products must comply.
918 However, even with these tools it is still up to the developer to
919 resolve potential licensing issues.
920 </para>
921
922 <para>
923 The base list of licenses used by the build process is a combination
924 of the Software Package Data Exchange (SPDX) list and the Open
925 Source Initiative (OSI) projects.
926 <ulink url='http://spdx.org'>SPDX Group</ulink> is a working group of
927 the Linux Foundation that maintains a specification for a standard
928 format for communicating the components, licenses, and copyrights
929 associated with a software package.
930 <ulink url='http://opensource.org'>OSI</ulink> is a corporation
931 dedicated to the Open Source Definition and the effort for reviewing
932 and approving licenses that conform to the Open Source Definition
933 (OSD).
934 </para>
935
936 <para>
937 You can find a list of the combined SPDX and OSI licenses that the
938 Yocto Project uses in the
939 <filename>meta/files/common-licenses</filename> directory in your
940 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>.
941 </para>
942
943 <para>
944 For information that can help you maintain compliance with various
945 open source licensing during the lifecycle of a product created using
946 the Yocto Project, see the
947 "<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle'>Maintaining Open Source License Compliance During Your Product's Lifecycle</ulink>"
948 section in the Yocto Project Development Tasks Manual.
949 </para>
950</section>
951</chapter>
952<!--
953vim: expandtab tw=80 ts=4
954-->
diff --git a/documentation/overview-manual/overview-manual-intro.xml b/documentation/overview-manual/overview-manual-intro.xml
deleted file mode 100644
index 0e0bfed6e5..0000000000
--- a/documentation/overview-manual/overview-manual-intro.xml
+++ /dev/null
@@ -1,113 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='overview-manual-intro'>
7
8<title>The Yocto Project Overview and Concepts Manual</title>
9 <section id='overview-manual-welcome'>
10 <title>Welcome</title>
11
12 <para>
13 Welcome to the Yocto Project Overview and Concepts Manual!
14 This manual introduces the Yocto Project by providing concepts,
15 software overviews, best-known-methods (BKMs), and any other
16 high-level introductory information suitable for a new Yocto
17 Project user.
18 </para>
19
20 <para>
21 The following list describes what you can get from this manual:
22 <itemizedlist>
23 <listitem><para>
24 <emphasis><link linkend='overview-yp'>Introducing the Yocto Project</link>:</emphasis>
25 This chapter provides an introduction to the Yocto
26 Project.
27 You will learn about features and challenges of the
28 Yocto Project, the layer model, components and tools,
29 development methods, the
30 <ulink url='&YOCTO_DOCS_REF_URL;#poky'>Poky</ulink>
31 reference distribution, the OpenEmbedded build system
32 workflow, and some basic Yocto terms.
33 </para></listitem>
34 <listitem><para>
35 <emphasis><link linkend='overview-development-environment'>The Yocto Project Development Environment</link>:</emphasis>
36 This chapter helps you get started understanding the
37 Yocto Project development environment.
38 You will learn about open source, development hosts,
39 Yocto Project source repositories, workflows using Git
40 and the Yocto Project, a Git primer, and information
41 about licensing.
42 </para></listitem>
43 <listitem><para>
44 <emphasis><link linkend='overview-manual-concepts'>Yocto Project Concepts</link>:</emphasis>
45 This chapter presents various concepts regarding the
46 Yocto Project.
47 You can find conceptual information about components,
48 development, cross-toolchains, and so forth.
49 </para></listitem>
50 </itemizedlist>
51 </para>
52
53 <para>
54 This manual does not give you the following:
55 <itemizedlist>
56 <listitem><para>
57 <emphasis>Step-by-step Instructions for Development Tasks:</emphasis>
58 Instructional procedures reside in other manuals within
59 the Yocto Project documentation set.
60 For example, the
61 <ulink url='&YOCTO_DOCS_DEV_URL;'>Yocto Project Development Tasks Manual</ulink>
62 provides examples on how to perform various development
63 tasks.
64 As another example, the
65 <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
66 manual contains detailed instructions on how to install an
67 SDK, which is used to develop applications for target
68 hardware.
69 </para></listitem>
70 <listitem><para>
71 <emphasis>Reference Material:</emphasis>
72 This type of material resides in an appropriate reference
73 manual.
74 For example, system variables are documented in the
75 <ulink url='&YOCTO_DOCS_REF_URL;'>Yocto Project Reference Manual</ulink>.
76 As another example, the
77 <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>
78 contains reference information on BSPs.
79 </para></listitem>
80 <listitem><para>
81 <emphasis>Detailed Public Information Not Specific to the
82 Yocto Project:</emphasis>
83 For example, exhaustive information on how to use the
84 Source Control Manager Git is better covered with Internet
85 searches and official Git Documentation than through the
86 Yocto Project documentation.
87 </para></listitem>
88 </itemizedlist>
89 </para>
90 </section>
91
92 <section id='overview-manual-other-information'>
93 <title>Other Information</title>
94
95 <para>
96 Because this manual presents information for many different
97 topics, supplemental information is recommended for full
98 comprehension.
99 For additional introductory information on the Yocto Project, see
100 the <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink>.
101 If you want to build an image with no knowledge of Yocto Project
102 as a way of quickly testing it out, see the
103 <ulink url='&YOCTO_DOCS_BRIEF_URL;'>Yocto Project Quick Build</ulink>
104 document.
105 For a comprehensive list of links and other documentation, see the
106 "<ulink url='&YOCTO_DOCS_REF_URL;#resources-links-and-related-documentation'>Links and Related Documentation</ulink>"
107 section in the Yocto Project Reference Manual.
108 </para>
109 </section>
110</chapter>
111<!--
112vim: expandtab tw=80 ts=4
113-->
diff --git a/documentation/overview-manual/overview-manual-style.css b/documentation/overview-manual/overview-manual-style.css
deleted file mode 100644
index eec934161a..0000000000
--- a/documentation/overview-manual/overview-manual-style.css
+++ /dev/null
@@ -1,990 +0,0 @@
1/*
2 SPDX-License-Identifier: CC-BY-2.0-UK
3
4 Generic XHTML / DocBook XHTML CSS Stylesheet.
5
6 Browser wrangling and typographic design by
7 Oyvind Kolas / pippin@gimp.org
8
9 Customised for Poky by
10 Matthew Allum / mallum@o-hand.com
11
12 Thanks to:
13 Liam R. E. Quin
14 William Skaggs
15 Jakub Steiner
16
17 Structure
18 ---------
19
20 The stylesheet is divided into the following sections:
21
22 Positioning
23 Margins, paddings, width, font-size, clearing.
24 Decorations
25 Borders, style
26 Colors
27 Colors
28 Graphics
29 Graphical backgrounds
30 Nasty IE tweaks
31 Workarounds needed to make it work in internet explorer,
32 currently makes the stylesheet non validating, but up until
33 this point it is validating.
34 Mozilla extensions
35 Transparency for footer
36 Rounded corners on boxes
37
38*/
39
40
41 /*************** /
42 / Positioning /
43/ ***************/
44
45body {
46 font-family: Verdana, Sans, sans-serif;
47
48 min-width: 640px;
49 width: 80%;
50 margin: 0em auto;
51 padding: 2em 5em 5em 5em;
52 color: #333;
53}
54
55h1,h2,h3,h4,h5,h6,h7 {
56 font-family: Arial, Sans;
57 color: #00557D;
58 clear: both;
59}
60
61h1 {
62 font-size: 2em;
63 text-align: left;
64 padding: 0em 0em 0em 0em;
65 margin: 2em 0em 0em 0em;
66}
67
68h2.subtitle {
69 margin: 0.10em 0em 3.0em 0em;
70 padding: 0em 0em 0em 0em;
71 font-size: 1.8em;
72 padding-left: 20%;
73 font-weight: normal;
74 font-style: italic;
75}
76
77h2 {
78 margin: 2em 0em 0.66em 0em;
79 padding: 0.5em 0em 0em 0em;
80 font-size: 1.5em;
81 font-weight: bold;
82}
83
84h3.subtitle {
85 margin: 0em 0em 1em 0em;
86 padding: 0em 0em 0em 0em;
87 font-size: 142.14%;
88 text-align: right;
89}
90
91h3 {
92 margin: 1em 0em 0.5em 0em;
93 padding: 1em 0em 0em 0em;
94 font-size: 140%;
95 font-weight: bold;
96}
97
98h4 {
99 margin: 1em 0em 0.5em 0em;
100 padding: 1em 0em 0em 0em;
101 font-size: 120%;
102 font-weight: bold;
103}
104
105h5 {
106 margin: 1em 0em 0.5em 0em;
107 padding: 1em 0em 0em 0em;
108 font-size: 110%;
109 font-weight: bold;
110}
111
112h6 {
113 margin: 1em 0em 0em 0em;
114 padding: 1em 0em 0em 0em;
115 font-size: 110%;
116 font-weight: bold;
117}
118
119.authorgroup {
120 background-color: transparent;
121 background-repeat: no-repeat;
122 padding-top: 256px;
123 background-image: url("figures/overview-manual-title.png");
124 background-position: left top;
125 margin-top: -256px;
126 padding-right: 50px;
127 margin-left: 0px;
128 text-align: right;
129 width: 740px;
130}
131
132h3.author {
133 margin: 0em 0me 0em 0em;
134 padding: 0em 0em 0em 0em;
135 font-weight: normal;
136 font-size: 100%;
137 color: #333;
138 clear: both;
139}
140
141.author tt.email {
142 font-size: 66%;
143}
144
145.titlepage hr {
146 width: 0em;
147 clear: both;
148}
149
150.revhistory {
151 padding-top: 2em;
152 clear: both;
153}
154
155.toc,
156.list-of-tables,
157.list-of-examples,
158.list-of-figures {
159 padding: 1.33em 0em 2.5em 0em;
160 color: #00557D;
161}
162
163.toc p,
164.list-of-tables p,
165.list-of-figures p,
166.list-of-examples p {
167 padding: 0em 0em 0em 0em;
168 padding: 0em 0em 0.3em;
169 margin: 1.5em 0em 0em 0em;
170}
171
172.toc p b,
173.list-of-tables p b,
174.list-of-figures p b,
175.list-of-examples p b{
176 font-size: 100.0%;
177 font-weight: bold;
178}
179
180.toc dl,
181.list-of-tables dl,
182.list-of-figures dl,
183.list-of-examples dl {
184 margin: 0em 0em 0.5em 0em;
185 padding: 0em 0em 0em 0em;
186}
187
188.toc dt {
189 margin: 0em 0em 0em 0em;
190 padding: 0em 0em 0em 0em;
191}
192
193.toc dd {
194 margin: 0em 0em 0em 2.6em;
195 padding: 0em 0em 0em 0em;
196}
197
198div.glossary dl,
199div.variablelist dl {
200}
201
202.glossary dl dt,
203.variablelist dl dt,
204.variablelist dl dt span.term {
205 font-weight: normal;
206 width: 20em;
207 text-align: right;
208}
209
210.variablelist dl dt {
211 margin-top: 0.5em;
212}
213
214.glossary dl dd,
215.variablelist dl dd {
216 margin-top: -1em;
217 margin-left: 25.5em;
218}
219
220.glossary dd p,
221.variablelist dd p {
222 margin-top: 0em;
223 margin-bottom: 1em;
224}
225
226
227div.calloutlist table td {
228 padding: 0em 0em 0em 0em;
229 margin: 0em 0em 0em 0em;
230}
231
232div.calloutlist table td p {
233 margin-top: 0em;
234 margin-bottom: 1em;
235}
236
237div p.copyright {
238 text-align: left;
239}
240
241div.legalnotice p.legalnotice-title {
242 margin-bottom: 0em;
243}
244
245p {
246 line-height: 1.5em;
247 margin-top: 0em;
248
249}
250
251dl {
252 padding-top: 0em;
253}
254
255hr {
256 border: solid 1px;
257}
258
259
260.mediaobject,
261.mediaobjectco {
262 text-align: center;
263}
264
265img {
266 border: none;
267}
268
269ul {
270 padding: 0em 0em 0em 1.5em;
271}
272
273ul li {
274 padding: 0em 0em 0em 0em;
275}
276
277ul li p {
278 text-align: left;
279}
280
281table {
282 width :100%;
283}
284
285th {
286 padding: 0.25em;
287 text-align: left;
288 font-weight: normal;
289 vertical-align: top;
290}
291
292td {
293 padding: 0.25em;
294 vertical-align: top;
295}
296
297p a[id] {
298 margin: 0px;
299 padding: 0px;
300 display: inline;
301 background-image: none;
302}
303
304a {
305 text-decoration: underline;
306 color: #444;
307}
308
309pre {
310 overflow: auto;
311}
312
313a:hover {
314 text-decoration: underline;
315 /*font-weight: bold;*/
316}
317
318/* This style defines how the permalink character
319 appears by itself and when hovered over with
320 the mouse. */
321
322[alt='Permalink'] { color: #eee; }
323[alt='Permalink']:hover { color: black; }
324
325
326div.informalfigure,
327div.informalexample,
328div.informaltable,
329div.figure,
330div.table,
331div.example {
332 margin: 1em 0em;
333 padding: 1em;
334 page-break-inside: avoid;
335}
336
337
338div.informalfigure p.title b,
339div.informalexample p.title b,
340div.informaltable p.title b,
341div.figure p.title b,
342div.example p.title b,
343div.table p.title b{
344 padding-top: 0em;
345 margin-top: 0em;
346 font-size: 100%;
347 font-weight: normal;
348}
349
350.mediaobject .caption,
351.mediaobject .caption p {
352 text-align: center;
353 font-size: 80%;
354 padding-top: 0.5em;
355 padding-bottom: 0.5em;
356}
357
358.epigraph {
359 padding-left: 55%;
360 margin-bottom: 1em;
361}
362
363.epigraph p {
364 text-align: left;
365}
366
367.epigraph .quote {
368 font-style: italic;
369}
370.epigraph .attribution {
371 font-style: normal;
372 text-align: right;
373}
374
375span.application {
376 font-style: italic;
377}
378
379.programlisting {
380 font-family: monospace;
381 font-size: 80%;
382 white-space: pre;
383 margin: 1.33em 0em;
384 padding: 1.33em;
385}
386
387.tip,
388.warning,
389.caution,
390.note {
391 margin-top: 1em;
392 margin-bottom: 1em;
393
394}
395
396/* force full width of table within div */
397.tip table,
398.warning table,
399.caution table,
400.note table {
401 border: none;
402 width: 100%;
403}
404
405
406.tip table th,
407.warning table th,
408.caution table th,
409.note table th {
410 padding: 0.8em 0.0em 0.0em 0.0em;
411 margin : 0em 0em 0em 0em;
412}
413
414.tip p,
415.warning p,
416.caution p,
417.note p {
418 margin-top: 0.5em;
419 margin-bottom: 0.5em;
420 padding-right: 1em;
421 text-align: left;
422}
423
424.acronym {
425 text-transform: uppercase;
426}
427
428b.keycap,
429.keycap {
430 padding: 0.09em 0.3em;
431 margin: 0em;
432}
433
434.itemizedlist li {
435 clear: none;
436}
437
438.filename {
439 font-size: medium;
440 font-family: Courier, monospace;
441}
442
443
444div.navheader, div.heading{
445 position: absolute;
446 left: 0em;
447 top: 0em;
448 width: 100%;
449 background-color: #cdf;
450 width: 100%;
451}
452
453div.navfooter, div.footing{
454 position: fixed;
455 left: 0em;
456 bottom: 0em;
457 background-color: #eee;
458 width: 100%;
459}
460
461
462div.navheader td,
463div.navfooter td {
464 font-size: 66%;
465}
466
467div.navheader table th {
468 /*font-family: Georgia, Times, serif;*/
469 /*font-size: x-large;*/
470 font-size: 80%;
471}
472
473div.navheader table {
474 border-left: 0em;
475 border-right: 0em;
476 border-top: 0em;
477 width: 100%;
478}
479
480div.navfooter table {
481 border-left: 0em;
482 border-right: 0em;
483 border-bottom: 0em;
484 width: 100%;
485}
486
487div.navheader table td a,
488div.navfooter table td a {
489 color: #777;
490 text-decoration: none;
491}
492
493/* normal text in the footer */
494div.navfooter table td {
495 color: black;
496}
497
498div.navheader table td a:visited,
499div.navfooter table td a:visited {
500 color: #444;
501}
502
503
504/* links in header and footer */
505div.navheader table td a:hover,
506div.navfooter table td a:hover {
507 text-decoration: underline;
508 background-color: transparent;
509 color: #33a;
510}
511
512div.navheader hr,
513div.navfooter hr {
514 display: none;
515}
516
517
518.qandaset tr.question td p {
519 margin: 0em 0em 1em 0em;
520 padding: 0em 0em 0em 0em;
521}
522
523.qandaset tr.answer td p {
524 margin: 0em 0em 1em 0em;
525 padding: 0em 0em 0em 0em;
526}
527.answer td {
528 padding-bottom: 1.5em;
529}
530
531.emphasis {
532 font-weight: bold;
533}
534
535
536 /************* /
537 / decorations /
538/ *************/
539
540.titlepage {
541}
542
543.part .title {
544}
545
546.subtitle {
547 border: none;
548}
549
550/*
551h1 {
552 border: none;
553}
554
555h2 {
556 border-top: solid 0.2em;
557 border-bottom: solid 0.06em;
558}
559
560h3 {
561 border-top: 0em;
562 border-bottom: solid 0.06em;
563}
564
565h4 {
566 border: 0em;
567 border-bottom: solid 0.06em;
568}
569
570h5 {
571 border: 0em;
572}
573*/
574
575.programlisting {
576 border: solid 1px;
577}
578
579div.figure,
580div.table,
581div.informalfigure,
582div.informaltable,
583div.informalexample,
584div.example {
585 border: 1px solid;
586}
587
588
589
590.tip,
591.warning,
592.caution,
593.note {
594 border: 1px solid;
595}
596
597.tip table th,
598.warning table th,
599.caution table th,
600.note table th {
601 border-bottom: 1px solid;
602}
603
604.question td {
605 border-top: 1px solid black;
606}
607
608.answer {
609}
610
611
612b.keycap,
613.keycap {
614 border: 1px solid;
615}
616
617
618div.navheader, div.heading{
619 border-bottom: 1px solid;
620}
621
622
623div.navfooter, div.footing{
624 border-top: 1px solid;
625}
626
627 /********* /
628 / colors /
629/ *********/
630
631body {
632 color: #333;
633 background: white;
634}
635
636a {
637 background: transparent;
638}
639
640a:hover {
641 background-color: #dedede;
642}
643
644
645h1,
646h2,
647h3,
648h4,
649h5,
650h6,
651h7,
652h8 {
653 background-color: transparent;
654}
655
656hr {
657 border-color: #aaa;
658}
659
660
661.tip, .warning, .caution, .note {
662 border-color: #fff;
663}
664
665
666.tip table th,
667.warning table th,
668.caution table th,
669.note table th {
670 border-bottom-color: #fff;
671}
672
673
674.warning {
675 background-color: #f0f0f2;
676}
677
678.caution {
679 background-color: #f0f0f2;
680}
681
682.tip {
683 background-color: #f0f0f2;
684}
685
686.note {
687 background-color: #f0f0f2;
688}
689
690.glossary dl dt,
691.variablelist dl dt,
692.variablelist dl dt span.term {
693 color: #044;
694}
695
696div.figure,
697div.table,
698div.example,
699div.informalfigure,
700div.informaltable,
701div.informalexample {
702 border-color: #aaa;
703}
704
705pre.programlisting {
706 color: black;
707 background-color: #fff;
708 border-color: #aaa;
709 border-width: 2px;
710}
711
712.guimenu,
713.guilabel,
714.guimenuitem {
715 background-color: #eee;
716}
717
718
719b.keycap,
720.keycap {
721 background-color: #eee;
722 border-color: #999;
723}
724
725
726div.navheader {
727 border-color: black;
728}
729
730
731div.navfooter {
732 border-color: black;
733}
734
735.writernotes {
736 color: red;
737}
738
739
740 /*********** /
741 / graphics /
742/ ***********/
743
744/*
745body {
746 background-image: url("images/body_bg.jpg");
747 background-attachment: fixed;
748}
749
750.navheader,
751.note,
752.tip {
753 background-image: url("images/note_bg.jpg");
754 background-attachment: fixed;
755}
756
757.warning,
758.caution {
759 background-image: url("images/warning_bg.jpg");
760 background-attachment: fixed;
761}
762
763.figure,
764.informalfigure,
765.example,
766.informalexample,
767.table,
768.informaltable {
769 background-image: url("images/figure_bg.jpg");
770 background-attachment: fixed;
771}
772
773*/
774h1,
775h2,
776h3,
777h4,
778h5,
779h6,
780h7{
781}
782
783/*
784Example of how to stick an image as part of the title.
785
786div.article .titlepage .title
787{
788 background-image: url("figures/white-on-black.png");
789 background-position: center;
790 background-repeat: repeat-x;
791}
792*/
793
794div.preface .titlepage .title,
795div.colophon .title,
796div.chapter .titlepage .title,
797div.article .titlepage .title
798{
799}
800
801div.section div.section .titlepage .title,
802div.sect2 .titlepage .title {
803 background: none;
804}
805
806
807h1.title {
808 background-color: transparent;
809 background-repeat: no-repeat;
810 height: 256px;
811 text-indent: -9000px;
812 overflow:hidden;
813}
814
815h2.subtitle {
816 background-color: transparent;
817 text-indent: -9000px;
818 overflow:hidden;
819 width: 0px;
820 display: none;
821}
822
823 /*************************************** /
824 / pippin.gimp.org specific alterations /
825/ ***************************************/
826
827/*
828div.heading, div.navheader {
829 color: #777;
830 font-size: 80%;
831 padding: 0;
832 margin: 0;
833 text-align: left;
834 position: absolute;
835 top: 0px;
836 left: 0px;
837 width: 100%;
838 height: 50px;
839 background: url('/gfx/heading_bg.png') transparent;
840 background-repeat: repeat-x;
841 background-attachment: fixed;
842 border: none;
843}
844
845div.heading a {
846 color: #444;
847}
848
849div.footing, div.navfooter {
850 border: none;
851 color: #ddd;
852 font-size: 80%;
853 text-align:right;
854
855 width: 100%;
856 padding-top: 10px;
857 position: absolute;
858 bottom: 0px;
859 left: 0px;
860
861 background: url('/gfx/footing_bg.png') transparent;
862}
863*/
864
865
866
867 /****************** /
868 / nasty ie tweaks /
869/ ******************/
870
871/*
872div.heading, div.navheader {
873 width:expression(document.body.clientWidth + "px");
874}
875
876div.footing, div.navfooter {
877 width:expression(document.body.clientWidth + "px");
878 margin-left:expression("-5em");
879}
880body {
881 padding:expression("4em 5em 0em 5em");
882}
883*/
884
885 /**************************************** /
886 / mozilla vendor specific css extensions /
887/ ****************************************/
888/*
889div.navfooter, div.footing{
890 -moz-opacity: 0.8em;
891}
892
893div.figure,
894div.table,
895div.informalfigure,
896div.informaltable,
897div.informalexample,
898div.example,
899.tip,
900.warning,
901.caution,
902.note {
903 -moz-border-radius: 0.5em;
904}
905
906b.keycap,
907.keycap {
908 -moz-border-radius: 0.3em;
909}
910*/
911
912table tr td table tr td {
913 display: none;
914}
915
916
917hr {
918 display: none;
919}
920
921table {
922 border: 0em;
923}
924
925 .photo {
926 float: right;
927 margin-left: 1.5em;
928 margin-bottom: 1.5em;
929 margin-top: 0em;
930 max-width: 17em;
931 border: 1px solid gray;
932 padding: 3px;
933 background: white;
934}
935 .seperator {
936 padding-top: 2em;
937 clear: both;
938 }
939
940 #validators {
941 margin-top: 5em;
942 text-align: right;
943 color: #777;
944 }
945 @media print {
946 body {
947 font-size: 8pt;
948 }
949 .noprint {
950 display: none;
951 }
952 }
953
954
955.tip,
956.note {
957 background: #f0f0f2;
958 color: #333;
959 padding: 20px;
960 margin: 20px;
961}
962
963.tip h3,
964.note h3 {
965 padding: 0em;
966 margin: 0em;
967 font-size: 2em;
968 font-weight: bold;
969 color: #333;
970}
971
972.tip a,
973.note a {
974 color: #333;
975 text-decoration: underline;
976}
977
978.footnote {
979 font-size: small;
980 color: #333;
981}
982
983/* Changes the announcement text */
984.tip h3,
985.warning h3,
986.caution h3,
987.note h3 {
988 font-size:large;
989 color: #00557D;
990}
diff --git a/documentation/overview-manual/overview-manual-yp-intro.xml b/documentation/overview-manual/overview-manual-yp-intro.xml
deleted file mode 100644
index a2a1f494bb..0000000000
--- a/documentation/overview-manual/overview-manual-yp-intro.xml
+++ /dev/null
@@ -1,1333 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='overview-yp'>
7 <title>Introducing the Yocto Project</title>
8
9 <section id='what-is-the-yocto-project'>
10 <title>What is the Yocto Project?</title>
11
12 <para>
13 The Yocto Project is an open source collaboration project
14 that helps developers create custom Linux-based systems that are
15 designed for embedded products regardless of the product's hardware
16 architecture.
17 Yocto Project provides a flexible toolset and a development
18 environment that allows embedded device developers across the
19 world to collaborate through shared technologies, software stacks,
20 configurations, and best practices used to create these tailored
21 Linux images.
22 </para>
23
24 <para>
25 Thousands of developers worldwide have discovered that Yocto
26 Project provides advantages in both systems and applications
27 development, archival and management benefits, and customizations
28 used for speed, footprint, and memory utilization.
29 The project is a standard when it comes to delivering embedded
30 software stacks.
31 The project allows software customizations and build interchange
32 for multiple hardware platforms as well as software stacks that
33 can be maintained and scaled.
34 </para>
35
36 <para id='yp-key-dev-elements'>
37 <imagedata fileref="figures/key-dev-elements.png" format="PNG" align='center' width="8in"/>
38 </para>
39
40 <para>
41 For further introductory information on the Yocto Project, you
42 might be interested in this
43 <ulink url='https://www.embedded.com/electronics-blogs/say-what-/4458600/Why-the-Yocto-Project-for-my-IoT-Project-'>article</ulink>
44 by Drew Moseley and in this short introductory
45 <ulink url='https://www.youtube.com/watch?v=utZpKM7i5Z4'>video</ulink>.
46 </para>
47
48 <para>
49 The remainder of this section overviews advantages and challenges
50 tied to the Yocto Project.
51 </para>
52
53 <section id='gs-features'>
54 <title>Features</title>
55
56 <para>
57 The following list describes features and advantages of the
58 Yocto Project:
59 <itemizedlist>
60 <listitem><para>
61 <emphasis>Widely Adopted Across the Industry:</emphasis>
62 Semiconductor, operating system, software, and
63 service vendors exist whose products and services
64 adopt and support the Yocto Project.
65 For a look at the Yocto Project community and
66 the companies involved with the Yocto
67 Project, see the "COMMUNITY" and "ECOSYSTEM" tabs
68 on the
69 <ulink url='&YOCTO_HOME_URL;'>Yocto Project</ulink>
70 home page.
71 </para></listitem>
72 <listitem><para>
73 <emphasis>Architecture Agnostic:</emphasis>
74 Yocto Project supports Intel, ARM, MIPS, AMD, PPC
75 and other architectures.
76 Most ODMs, OSVs, and chip vendors create and supply
77 BSPs that support their hardware.
78 If you have custom silicon, you can create a BSP
79 that supports that architecture.</para>
80
81 <para>Aside from lots of architecture support, the
82 Yocto Project fully supports a wide range of device
83 emulation through the Quick EMUlator (QEMU).
84 </para></listitem>
85 <listitem><para>
86 <emphasis>Images and Code Transfer Easily:</emphasis>
87 Yocto Project output can easily move between
88 architectures without moving to new development
89 environments.
90 Additionally, if you have used the Yocto Project to
91 create an image or application and you find yourself
92 not able to support it, commercial Linux vendors such
93 as Wind River, Mentor Graphics, Timesys, and ENEA could
94 take it and provide ongoing support.
95 These vendors have offerings that are built using
96 the Yocto Project.
97 </para></listitem>
98 <listitem><para>
99 <emphasis>Flexibility:</emphasis>
100 Corporations use the Yocto Project many different ways.
101 One example is to create an internal Linux distribution
102 as a code base the corporation can use across multiple
103 product groups.
104 Through customization and layering, a project group
105 can leverage the base Linux distribution to create
106 a distribution that works for their product needs.
107 </para></listitem>
108 <listitem><para>
109 <emphasis>Ideal for Constrained Embedded and IoT devices:</emphasis>
110 Unlike a full Linux distribution, you can use the
111 Yocto Project to create exactly what you need for
112 embedded devices.
113 You only add the feature support or packages that you
114 absolutely need for the device.
115 For devices that have display hardware, you can use
116 available system components such as X11, GTK+, Qt,
117 Clutter, and SDL (among others) to create a rich user
118 experience.
119 For devices that do not have a display or where you
120 want to use alternative UI frameworks, you can choose
121 to not install these components.
122 </para></listitem>
123 <listitem><para>
124 <emphasis>Comprehensive Toolchain Capabilities:</emphasis>
125 Toolchains for supported architectures satisfy most
126 use cases.
127 However, if your hardware supports features that are
128 not part of a standard toolchain, you can easily
129 customize that toolchain through specification of
130 platform-specific tuning parameters.
131 And, should you need to use a third-party toolchain,
132 mechanisms built into the Yocto Project allow for that.
133 </para></listitem>
134 <listitem><para>
135 <emphasis>Mechanism Rules Over Policy:</emphasis>
136 Focusing on mechanism rather than policy ensures that
137 you are free to set policies based on the needs of your
138 design instead of adopting decisions enforced by some
139 system software provider.
140 </para></listitem>
141 <listitem><para>
142 <emphasis>Uses a Layer Model:</emphasis>
143 The Yocto Project
144 <link linkend='the-yocto-project-layer-model'>layer infrastructure</link>
145 groups related functionality into separate bundles.
146 You can incrementally add these grouped functionalities
147 to your project as needed.
148 Using layers to isolate and group functionality
149 reduces project complexity and redundancy, allows you
150 to easily extend the system, make customizations,
151 and keep functionality organized.
152 </para></listitem>
153 <listitem><para>
154 <emphasis>Supports Partial Builds:</emphasis>
155 You can build and rebuild individual packages as
156 needed.
157 Yocto Project accomplishes this through its
158 <link linkend='shared-state-cache'>shared-state cache</link>
159 (sstate) scheme.
160 Being able to build and debug components individually
161 eases project development.
162 </para></listitem>
163 <listitem><para>
164 <emphasis>Releases According to a Strict Schedule:</emphasis>
165 Major releases occur on a
166 <ulink url='&YOCTO_DOCS_REF_URL;#ref-release-process'>six-month cycle</ulink>
167 predictably in October and April.
168 The most recent two releases support point releases
169 to address common vulnerabilities and exposures.
170 This predictability is crucial for projects based on
171 the Yocto Project and allows development teams to
172 plan activities.
173 </para></listitem>
174 <listitem><para>
175 <emphasis>Rich Ecosystem of Individuals and Organizations:</emphasis>
176 For open source projects, the value of community is
177 very important.
178 Support forums, expertise, and active developers who
179 continue to push the Yocto Project forward are readily
180 available.
181 </para></listitem>
182 <listitem><para>
183 <emphasis>Binary Reproducibility:</emphasis>
184 The Yocto Project allows you to be very specific about
185 dependencies and achieves very high percentages of
186 binary reproducibility (e.g. 99.8% for
187 <filename>core-image-minimal</filename>).
188 When distributions are not specific about which
189 packages are pulled in and in what order to support
190 dependencies, other build systems can arbitrarily
191 include packages.
192 </para></listitem>
193 <listitem><para>
194 <emphasis>License Manifest:</emphasis>
195 The Yocto Project provides a
196 <ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle'>license manifest</ulink>
197 for review by people who need to track the use of open
198 source licenses (e.g.legal teams).
199 </para></listitem>
200 </itemizedlist>
201 </para>
202 </section>
203
204 <section id='gs-challenges'>
205 <title>Challenges</title>
206
207 <para>
208 The following list presents challenges you might encounter
209 when developing using the Yocto Project:
210 <itemizedlist>
211 <listitem><para>
212 <emphasis>Steep Learning Curve:</emphasis>
213 The Yocto Project has a steep learning curve and has
214 many different ways to accomplish similar tasks.
215 It can be difficult to choose how to proceed when
216 varying methods exist by which to accomplish a given
217 task.
218 </para></listitem>
219 <listitem><para>
220 <emphasis>Understanding What Changes You Need to Make
221 For Your Design Requires Some Research:</emphasis>
222 Beyond the simple tutorial stage, understanding what
223 changes need to be made for your particular design
224 can require a significant amount of research and
225 investigation.
226 For information that helps you transition from
227 trying out the Yocto Project to using it for your
228 project, see the
229 "<ulink url='&YOCTO_DOCS_URL;/what-i-wish-id-known/'>What I wish I'd Known</ulink>"
230 and
231 "<ulink url='&YOCTO_DOCS_URL;/transitioning-to-a-custom-environment/'>Transitioning to a Custom Environment for Systems Development</ulink>"
232 documents on the Yocto Project website.
233 </para></listitem>
234 <listitem><para>
235 <emphasis>Project Workflow Could Be Confusing:</emphasis>
236 The
237 <link linkend='overview-development-environment'>Yocto Project workflow</link>
238 could be confusing if you are used to traditional
239 desktop and server software development.
240 In a desktop development environment, mechanisms exist
241 to easily pull and install new packages, which are
242 typically pre-compiled binaries from servers accessible
243 over the Internet.
244 Using the Yocto Project, you must modify your
245 configuration and rebuild to add additional packages.
246 </para></listitem>
247 <listitem><para>
248 <emphasis>Working in a Cross-Build Environment Can
249 Feel Unfamiliar:</emphasis>
250 When developing code to run on a target, compilation,
251 execution, and testing done on the actual target
252 can be faster than running a BitBake build on a
253 development host and then deploying binaries to the
254 target for test.
255 While the Yocto Project does support development tools
256 on the target, the additional step of integrating your
257 changes back into the Yocto Project build environment
258 would be required.
259 Yocto Project supports an intermediate approach that
260 involves making changes on the development system
261 within the BitBake environment and then deploying only
262 the updated packages to the target.</para>
263
264 <para>The Yocto Project
265 <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>
266 produces packages in standard formats (i.e. RPM,
267 DEB, IPK, and TAR).
268 You can deploy these packages into the running system
269 on the target by using utilities on the target such
270 as <filename>rpm</filename> or
271 <filename>ipk</filename>.
272 </para></listitem>
273 <listitem><para>
274 <emphasis>Initial Build Times Can be Significant:</emphasis>
275 Long initial build times are unfortunately unavoidable
276 due to the large number of packages initially built
277 from scratch for a fully functioning Linux system.
278 Once that initial build is completed, however, the
279 shared-state (sstate) cache mechanism Yocto Project
280 uses keeps the system from rebuilding packages that
281 have not been "touched" since the last build.
282 The sstate mechanism significantly reduces times
283 for successive builds.
284 </para></listitem>
285 </itemizedlist>
286 </para>
287 </section>
288 </section>
289
290 <section id='the-yocto-project-layer-model'>
291 <title>The Yocto Project Layer Model</title>
292
293 <para>
294 The Yocto Project's "Layer Model" is a development model for
295 embedded and IoT Linux creation that distinguishes the
296 Yocto Project from other simple build systems.
297 The Layer Model simultaneously supports collaboration and
298 customization.
299 Layers are repositories that contain related sets of instructions
300 that tell the
301 <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>
302 what to do.
303 You can collaborate, share, and reuse layers.
304 </para>
305
306 <para>
307 Layers can contain changes to previous instructions or settings
308 at any time.
309 This powerful override capability is what allows you to customize
310 previously supplied collaborative or community layers to suit your
311 product requirements.
312 </para>
313
314 <para>
315 You use different layers to logically separate information in your
316 build.
317 As an example, you could have BSP, GUI, distro configuration,
318 middleware, or application layers.
319 Putting your entire build into one layer limits and complicates
320 future customization and reuse.
321 Isolating information into layers, on the other hand, helps
322 simplify future customizations and reuse.
323 You might find it tempting to keep everything in one layer when
324 working on a single project.
325 However, the more modular your Metadata, the easier
326 it is to cope with future changes.
327 <note><title>Notes</title>
328 <itemizedlist>
329 <listitem><para>
330 Use Board Support Package (BSP) layers from silicon
331 vendors when possible.
332 </para></listitem>
333 <listitem><para>
334 Familiarize yourself with the
335 <ulink url='https://caffelli-staging.yoctoproject.org/software-overview/layers/'>Yocto Project curated layer index</ulink>
336 or the
337 <ulink url='http://layers.openembedded.org/layerindex/branch/master/layers/'>OpenEmbedded layer index</ulink>.
338 The latter contains more layers but they are less
339 universally validated.
340 </para></listitem>
341 <listitem><para>
342 Layers support the inclusion of technologies, hardware
343 components, and software components.
344 The
345 <ulink url='&YOCTO_DOCS_DEV_URL;#making-sure-your-layer-is-compatible-with-yocto-project'>Yocto Project Compatible</ulink>
346 designation provides a minimum level of standardization
347 that contributes to a strong ecosystem.
348 "YP Compatible" is applied to appropriate products and
349 software components such as BSPs, other OE-compatible
350 layers, and related open-source projects, allowing the
351 producer to use Yocto Project badges and branding
352 assets.
353 </para></listitem>
354 </itemizedlist>
355 </note>
356 </para>
357
358 <para>
359 To illustrate how layers are used to keep things modular, consider
360 machine customizations.
361 These types of customizations typically reside in a special layer,
362 rather than a general layer, called a BSP Layer.
363 Furthermore, the machine customizations should be isolated from
364 recipes and Metadata that support a new GUI environment,
365 for example.
366 This situation gives you a couple of layers: one for the machine
367 configurations, and one for the GUI environment.
368 It is important to understand, however, that the BSP layer can
369 still make machine-specific additions to recipes within the GUI
370 environment layer without polluting the GUI layer itself
371 with those machine-specific changes.
372 You can accomplish this through a recipe that is a BitBake append
373 (<filename>.bbappend</filename>) file, which is described later
374 in this section.
375 <note>
376 For general information on BSP layer structure, see the
377 <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Packages (BSP) Developer's Guide</ulink>.
378 </note>
379 </para>
380
381 <para>
382 The
383 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
384 contains both general layers and BSP layers right out of the box.
385 You can easily identify layers that ship with a Yocto Project
386 release in the Source Directory by their names.
387 Layers typically have names that begin with the string
388 <filename>meta-</filename>.
389 <note>
390 It is not a requirement that a layer name begin with the
391 prefix <filename>meta-</filename>, but it is a commonly
392 accepted standard in the Yocto Project community.
393 </note>
394 For example, if you were to examine the
395 <ulink url='https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/'>tree view</ulink>
396 of the <filename>poky</filename> repository, you will see several
397 layers: <filename>meta</filename>,
398 <filename>meta-skeleton</filename>,
399 <filename>meta-selftest</filename>,
400 <filename>meta-poky</filename>, and
401 <filename>meta-yocto-bsp</filename>.
402 Each of these repositories represents a distinct layer.
403 </para>
404
405 <para>
406 For procedures on how to create layers, see the
407 "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
408 section in the Yocto Project Development Tasks Manual.
409 </para>
410 </section>
411
412 <section id='components-and-tools'>
413 <title>Components and Tools</title>
414
415 <para>
416 The Yocto Project employs a collection of components and
417 tools used by the project itself, by project developers,
418 and by those using the Yocto Project.
419 These components and tools are open source projects and
420 metadata that are separate from the reference distribution
421 (<ulink url='&YOCTO_DOCS_REF_URL;#poky'>Poky</ulink>)
422 and the
423 <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>.
424 Most of the components and tools are downloaded separately.
425 </para>
426
427 <para>
428 This section provides brief overviews of the components and
429 tools associated with the Yocto Project.
430 </para>
431
432 <section id='gs-development-tools'>
433 <title>Development Tools</title>
434
435 <para>
436 The following list consists of tools that help you develop
437 images and applications using the Yocto Project:
438 <itemizedlist>
439 <listitem><para id='gs-crops-overview'>
440 <emphasis>CROPS:</emphasis>
441 <ulink url='https://github.com/crops/poky-container/'>CROPS</ulink>
442 is an open source, cross-platform development framework
443 that leverages
444 <ulink url='https://www.docker.com/'>Docker Containers</ulink>.
445 CROPS provides an easily managed, extensible environment
446 that allows you to build binaries for a variety of
447 architectures on Windows, Linux and Mac OS X hosts.
448 </para></listitem>
449 <listitem><para>
450 <emphasis><filename>devtool</filename>:</emphasis>
451 This command-line tool is available as part of the
452 extensible SDK (eSDK) and is its cornerstone.
453 You can use <filename>devtool</filename> to help build,
454 test, and package software within the eSDK.
455 You can use the tool to optionally integrate what you
456 build into an image built by the OpenEmbedded build
457 system.</para>
458
459 <para>The <filename>devtool</filename> command employs
460 a number of sub-commands that allow you to add, modify,
461 and upgrade recipes.
462 As with the OpenEmbedded build system, "recipes"
463 represent software packages within
464 <filename>devtool</filename>.
465 When you use <filename>devtool add</filename>, a recipe
466 is automatically created.
467 When you use <filename>devtool modify</filename>, the
468 specified existing recipe is used in order to determine
469 where to get the source code and how to patch it.
470 In both cases, an environment is set up so that when
471 you build the recipe a source tree that is under your
472 control is used in order to allow you to make changes
473 to the source as desired.
474 By default, both new recipes and the source go into
475 a "workspace" directory under the eSDK.
476 The <filename>devtool upgrade</filename> command
477 updates an existing recipe so that you can build it
478 for an updated set of source files.</para>
479
480 <para>You can read about the
481 <filename>devtool</filename> workflow in the Yocto
482 Project Application Development and Extensible
483 Software Development Kit (eSDK) Manual in the
484 "<ulink url='&YOCTO_DOCS_SDK_URL;#using-devtool-in-your-sdk-workflow'>Using <filename>devtool</filename> in Your SDK Workflow'</ulink>"
485 section.
486 </para></listitem>
487 <listitem><para>
488 <emphasis>Extensible Software Development Kit (eSDK):</emphasis>
489 The eSDK provides a cross-development toolchain and
490 libraries tailored to the contents of a specific image.
491 The eSDK makes it easy to add new applications and
492 libraries to an image, modify the source for an
493 existing component, test changes on the target
494 hardware, and integrate into the rest of the
495 OpenEmbedded build system.
496 The eSDK gives you a toolchain experience supplemented
497 with the powerful set of <filename>devtool</filename>
498 commands tailored for the Yocto Project environment.
499 </para>
500
501 <para>For information on the eSDK, see the
502 <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
503 Manual.
504 </para></listitem>
505 <listitem><para>
506 <emphasis>Toaster:</emphasis>
507 Toaster is a web interface to the Yocto Project
508 OpenEmbedded build system.
509 Toaster allows you to configure, run, and view
510 information about builds.
511 For information on Toaster, see the
512 <ulink url='&YOCTO_DOCS_TOAST_URL;'>Toaster User Manual</ulink>.
513 </para></listitem>
514 </itemizedlist>
515 </para>
516 </section>
517
518 <section id='gs-production-tools'>
519 <title>Production Tools</title>
520
521 <para>
522 The following list consists of tools that help production
523 related activities using the Yocto Project:
524 <itemizedlist>
525 <listitem><para>
526 <emphasis>Auto Upgrade Helper:</emphasis>
527 This utility when used in conjunction with the
528 <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>
529 (BitBake and OE-Core) automatically generates upgrades
530 for recipes that are based on new versions of the
531 recipes published upstream.
532 </para></listitem>
533 <listitem><para>
534 <emphasis>Recipe Reporting System:</emphasis>
535 The Recipe Reporting System tracks recipe versions
536 available for Yocto Project.
537 The main purpose of the system is to help you
538 manage the recipes you maintain and to offer a dynamic
539 overview of the project.
540 The Recipe Reporting System is built on top of the
541 <ulink url="http://layers.openembedded.org/layerindex/layers/">OpenEmbedded Layer Index</ulink>,
542 which is a website that indexes OpenEmbedded-Core
543 layers.
544 </para></listitem>
545 <listitem><para>
546 <emphasis>Patchwork:</emphasis>
547 <ulink url='http://jk.ozlabs.org/projects/patchwork/'>Patchwork</ulink>
548 is a fork of a project originally started by
549 <ulink url='http://ozlabs.org/'>OzLabs</ulink>.
550 The project is a web-based tracking system designed
551 to streamline the process of bringing contributions
552 into a project.
553 The Yocto Project uses Patchwork as an organizational
554 tool to handle patches, which number in the thousands
555 for every release.
556 </para></listitem>
557 <listitem><para>
558 <emphasis>AutoBuilder:</emphasis>
559 AutoBuilder is a project that automates build tests
560 and quality assurance (QA).
561 By using the public AutoBuilder, anyone can determine
562 the status of the current "master" branch of Poky.
563 <note>
564 AutoBuilder is based on
565 <ulink url='https://buildbot.net/'>buildbot</ulink>.
566 </note></para>
567
568 <para>A goal of the Yocto Project is to lead the
569 open source industry with a project that automates
570 testing and QA procedures.
571 In doing so, the project encourages a development
572 community that publishes QA and test plans, publicly
573 demonstrates QA and test plans, and encourages
574 development of tools that automate and test and QA
575 procedures for the benefit of the development
576 community.</para>
577
578 <para>You can learn more about the AutoBuilder used
579 by the Yocto Project
580 <ulink url='&YOCTO_AB_URL;'>here</ulink>.
581 </para></listitem>
582 <listitem><para>
583 <emphasis>Cross-Prelink:</emphasis>
584 Prelinking is the process of pre-computing the load
585 addresses and link tables generated by the dynamic
586 linker as compared to doing this at runtime.
587 Doing this ahead of time results in performance
588 improvements when the application is launched and
589 reduced memory usage for libraries shared by many
590 applications.</para>
591
592 <para>Historically, cross-prelink is a variant of
593 prelink, which was conceived by
594 <ulink url='http://people.redhat.com/jakub/prelink.pdf'>Jakub Jel&iacute;nek</ulink>
595 a number of years ago.
596 Both prelink and cross-prelink are maintained in the
597 same repository albeit on separate branches.
598 By providing an emulated runtime dynamic linker
599 (i.e. <filename>glibc</filename>-derived
600 <filename>ld.so</filename> emulation), the
601 cross-prelink project extends the prelink software's
602 ability to prelink a sysroot environment.
603 Additionally, the cross-prelink software enables the
604 ability to work in sysroot style environments.</para>
605
606 <para>The dynamic linker determines standard load
607 address calculations based on a variety of factors
608 such as mapping addresses, library usage, and library
609 function conflicts.
610 The prelink tool uses this information, from the
611 dynamic linker, to determine unique load addresses
612 for executable and linkable format (ELF) binaries
613 that are shared libraries and dynamically linked.
614 The prelink tool modifies these ELF binaries with the
615 pre-computed information.
616 The result is faster loading and often lower memory
617 consumption because more of the library code can
618 be re-used from shared Copy-On-Write (COW) pages.
619 </para>
620
621 <para>The original upstream prelink project only
622 supports running prelink on the end target device
623 due to the reliance on the target device's dynamic
624 linker.
625 This restriction causes issues when developing a
626 cross-compiled system.
627 The cross-prelink adds a synthesized dynamic loader
628 that runs on the host, thus permitting cross-prelinking
629 without ever having to run on a read-write target
630 filesystem.
631 </para></listitem>
632 <listitem><para>
633 <emphasis>Pseudo:</emphasis>
634 Pseudo is the Yocto Project implementation of
635 <ulink url='http://man.he.net/man1/fakeroot'>fakeroot</ulink>,
636 which is used to run commands in an environment
637 that seemingly has root privileges.</para>
638
639 <para>During a build, it can be necessary to perform
640 operations that require system administrator
641 privileges.
642 For example, file ownership or permissions might need
643 definition.
644 Pseudo is a tool that you can either use directly or
645 through the environment variable
646 <filename>LD_PRELOAD</filename>.
647 Either method allows these operations to succeed as
648 if system administrator privileges exist even
649 when they do not.</para>
650
651 <para>You can read more about Pseudo in the
652 "<link linkend='fakeroot-and-pseudo'>Fakeroot and Pseudo</link>"
653 section.
654 </para></listitem>
655 </itemizedlist>
656 </para>
657 </section>
658
659 <section id='gs-openembedded-build-system'>
660 <title>Open-Embedded Build System Components</title>
661
662 <para>
663 The following list consists of components associated with the
664 <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>:
665 <itemizedlist>
666 <listitem><para>
667 <emphasis>BitBake:</emphasis>
668 BitBake is a core component of the Yocto Project and is
669 used by the OpenEmbedded build system to build images.
670 While BitBake is key to the build system, BitBake
671 is maintained separately from the Yocto Project.</para>
672
673 <para>BitBake is a generic task execution engine that
674 allows shell and Python tasks to be run efficiently
675 and in parallel while working within complex inter-task
676 dependency constraints.
677 In short, BitBake is a build engine that works
678 through recipes written in a specific format in order
679 to perform sets of tasks.</para>
680
681 <para>You can learn more about BitBake in the
682 <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>.
683 </para></listitem>
684 <listitem><para>
685 <emphasis>OpenEmbedded-Core:</emphasis>
686 OpenEmbedded-Core (OE-Core) is a common layer of
687 metadata (i.e. recipes, classes, and associated files)
688 used by OpenEmbedded-derived systems, which includes
689 the Yocto Project.
690 The Yocto Project and the OpenEmbedded Project both
691 maintain the OpenEmbedded-Core.
692 You can find the OE-Core metadata in the Yocto Project
693 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta'>Source Repositories</ulink>.
694 </para>
695
696 <para>Historically, the Yocto Project integrated the
697 OE-Core metadata throughout the Yocto Project
698 source repository reference system (Poky).
699 After Yocto Project Version 1.0, the Yocto Project
700 and OpenEmbedded agreed to work together and share a
701 common core set of metadata (OE-Core), which contained
702 much of the functionality previously found in Poky.
703 This collaboration achieved a long-standing
704 OpenEmbedded objective for having a more tightly
705 controlled and quality-assured core.
706 The results also fit well with the Yocto Project
707 objective of achieving a smaller number of fully
708 featured tools as compared to many different ones.
709 </para>
710
711 <para>Sharing a core set of metadata results in Poky
712 as an integration layer on top of OE-Core.
713 You can see that in this
714 <link linkend='yp-key-dev-elements'>figure</link>.
715 The Yocto Project combines various components such as
716 BitBake, OE-Core, script "glue", and documentation
717 for its build system.
718 </para></listitem>
719 </itemizedlist>
720 </para>
721 </section>
722
723 <section id='gs-reference-distribution-poky'>
724 <title>Reference Distribution (Poky)</title>
725
726 <para>
727 Poky is the Yocto Project reference distribution.
728 It contains the
729 <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>Open-Embedded build system</ulink>
730 (BitBake and OE-Core) as well as a set of metadata to get you
731 started building your own distribution.
732 See the
733 <link linkend='what-is-the-yocto-project'>figure</link> in
734 "What is the Yocto Project?" section for an illustration
735 that shows Poky and its relationship with other parts of the
736 Yocto Project.</para>
737
738 <para>To use the Yocto Project tools and components, you
739 can download (<filename>clone</filename>) Poky and use it
740 to bootstrap your own distribution.
741 <note>
742 Poky does not contain binary files.
743 It is a working example of how to build your own custom
744 Linux distribution from source.
745 </note>
746 You can read more about Poky in the
747 "<link linkend='reference-embedded-distribution'>Reference Embedded Distribution (Poky)</link>"
748 section.
749 </para>
750 </section>
751
752 <section id='gs-packages-for-finished-targets'>
753 <title>Packages for Finished Targets</title>
754
755 <para>
756 The following lists components associated with packages
757 for finished targets:
758 <itemizedlist>
759 <listitem><para>
760 <emphasis>Matchbox:</emphasis>
761 Matchbox is an Open Source, base environment for the
762 X Window System running on non-desktop, embedded
763 platforms such as handhelds, set-top boxes, kiosks,
764 and anything else for which screen space, input
765 mechanisms, or system resources are limited.</para>
766
767 <para>Matchbox consists of a number of interchangeable
768 and optional applications that you can tailor to a
769 specific, non-desktop platform to enhance usability
770 in constrained environments.</para>
771
772 <para>You can find the Matchbox source in the Yocto
773 Project
774 <ulink url='&YOCTO_GIT_URL;'>Source Repositories</ulink>.
775 </para></listitem>
776 <listitem><para>
777 <emphasis>Opkg</emphasis>
778 Open PacKaGe management (opkg) is a lightweight
779 package management system based on the itsy package
780 (ipkg) management system.
781 Opkg is written in C and resembles Advanced Package
782 Tool (APT) and Debian Package (dpkg) in operation.
783 </para>
784
785 <para>Opkg is intended for use on embedded Linux
786 devices and is used in this capacity in the
787 <ulink url='http://www.openembedded.org/wiki/Main_Page'>OpenEmbedded</ulink>
788 and
789 <ulink url='https://openwrt.org/'>OpenWrt</ulink>
790 projects, as well as the Yocto Project.
791 <note>
792 As best it can, opkg maintains backwards
793 compatibility with ipkg and conforms to a subset
794 of Debian's policy manual regarding control files.
795 </note>
796 </para></listitem>
797 </itemizedlist>
798 </para>
799 </section>
800
801 <section id='gs-archived-components'>
802 <title>Archived Components</title>
803
804 <para>
805 The Build Appliance is a virtual machine image that enables
806 you to build and boot a custom embedded Linux image with
807 the Yocto Project using a non-Linux development system.
808 </para>
809
810 <para>
811 Historically, the Build Appliance was the second of three
812 methods by which you could use the Yocto Project on a system
813 that was not native to Linux.
814 <orderedlist>
815 <listitem><para>
816 <emphasis>Hob:</emphasis>
817 Hob, which is now deprecated and is no longer available
818 since the 2.1 release of the Yocto Project provided
819 a rudimentary, GUI-based interface to the Yocto
820 Project.
821 Toaster has fully replaced Hob.
822 </para></listitem>
823 <listitem><para>
824 <emphasis>Build Appliance:</emphasis>
825 Post Hob, the Build Appliance became available.
826 It was never recommended that you use the Build
827 Appliance as a day-to-day production development
828 environment with the Yocto Project.
829 Build Appliance was useful as a way to try out
830 development in the Yocto Project environment.
831 </para></listitem>
832 <listitem><para>
833 <emphasis>CROPS:</emphasis>
834 The final and best solution available now for
835 developing using the Yocto Project on a system
836 not native to Linux is with
837 <link linkend='gs-crops-overview'>CROPS</link>.
838 </para></listitem>
839 </orderedlist>
840 </para>
841 </section>
842 </section>
843
844 <section id='gs-development-methods'>
845 <title>Development Methods</title>
846
847 <para>
848 The Yocto Project development environment usually involves a
849 <ulink url='&YOCTO_DOCS_REF_URL;#hardware-build-system-term'>Build Host</ulink>
850 and target hardware.
851 You use the Build Host to build images and develop applications,
852 while you use the target hardware to test deployed software.
853 </para>
854
855 <para>
856 This section provides an introduction to the choices or
857 development methods you have when setting up your Build Host.
858 Depending on the your particular workflow preference and the
859 type of operating system your Build Host runs, several choices
860 exist that allow you to use the Yocto Project.
861 <note>
862 For additional detail about the Yocto Project development
863 environment, see the
864 "<link linkend='overview-development-environment'>The Yocto Project Development Environment</link>"
865 chapter.
866 </note>
867 <itemizedlist>
868 <listitem><para>
869 <emphasis>Native Linux Host:</emphasis>
870 By far the best option for a Build Host.
871 A system running Linux as its native operating system
872 allows you to develop software by directly using the
873 <ulink url='&YOCTO_DOCS_REF_URL;#bitbake-term'>BitBake</ulink>
874 tool.
875 You can accomplish all aspects of development from a
876 familiar shell of a supported Linux distribution.</para>
877
878 <para>For information on how to set up a Build Host on
879 a system running Linux as its native operating system,
880 see the
881 "<ulink url='&YOCTO_DOCS_DEV_URL;#setting-up-a-native-linux-host'>Setting Up a Native Linux Host</ulink>"
882 section in the Yocto Project Development Tasks Manual.
883 </para></listitem>
884 <listitem><para>
885 <emphasis>CROss PlatformS (CROPS):</emphasis>
886 Typically, you use
887 <ulink url='https://github.com/crops/poky-container/'>CROPS</ulink>,
888 which leverages
889 <ulink url='https://www.docker.com/'>Docker Containers</ulink>,
890 to set up a Build Host that is not running Linux (e.g.
891 <trademark class='registered'>Microsoft</trademark>
892 <trademark class='trademark'>Windows</trademark>
893 or
894 <trademark class='registered'>macOS</trademark>).
895 <note>
896 You can, however, use CROPS on a Linux-based system.
897 </note>
898 CROPS is an open source, cross-platform development
899 framework that provides an easily managed, extensible
900 environment for building binaries targeted for a variety
901 of architectures on Windows, macOS, or Linux hosts.
902 Once the Build Host is set up using CROPS, you can prepare
903 a shell environment to mimic that of a shell being used
904 on a system natively running Linux.</para>
905
906 <para>For information on how to set up a Build Host with
907 CROPS, see the
908 "<ulink url='&YOCTO_DOCS_DEV_URL;#setting-up-to-use-crops'>Setting Up to Use CROss PlatformS (CROPS)</ulink>"
909 section in the Yocto Project Development Tasks Manual.
910 </para></listitem>
911 <listitem><para>
912 <emphasis>Windows Subsystem For Linux (WSLv2):</emphasis>
913 You may use Windows Subsystem For Linux v2 to set up a build
914 host using Windows 10.
915 <note>
916 The Yocto Project is not compatible with WSLv1, it is
917 compatible but not officially supported nor validated
918 with WSLv2, if you still decide to use WSL please upgrade
919 to WSLv2.
920 </note>
921 The Windows Subsystem For Linux allows Windows 10 to run a real
922 Linux kernel inside of a lightweight utility virtual
923 machine (VM) using virtualization technology.</para>
924 <para>For information on how to set up a Build Host with
925 WSLv2, see the
926 "<ulink url='&YOCTO_DOCS_DEV_URL;#setting-up-to-use-wsl'>Setting Up to Use Windows Subsystem For Linux</ulink>"
927 section in the Yocto Project Development Tasks Manual.
928 </para></listitem>
929 <listitem><para>
930 <emphasis>Toaster:</emphasis>
931 Regardless of what your Build Host is running, you can
932 use Toaster to develop software using the Yocto Project.
933 Toaster is a web interface to the Yocto Project's
934 <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>Open-Embedded build system</ulink>.
935 The interface enables you to configure and run your
936 builds.
937 Information about builds is collected and stored in a
938 database.
939 You can use Toaster to configure and start builds on
940 multiple remote build servers.</para>
941
942 <para>For information about and how to use Toaster,
943 see the
944 <ulink url='&YOCTO_DOCS_TOAST_URL;'>Toaster User Manual</ulink>.
945 </para></listitem>
946 </itemizedlist>
947 </para>
948 </section>
949
950 <section id='reference-embedded-distribution'>
951 <title>Reference Embedded Distribution (Poky)</title>
952
953 <para>
954 "Poky", which is pronounced <emphasis>Pock</emphasis>-ee, is the
955 name of the Yocto Project's reference distribution or Reference OS
956 Kit.
957 Poky contains the
958 <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded Build System</ulink>
959 (<ulink url='&YOCTO_DOCS_REF_URL;#bitbake-term'>BitBake</ulink> and
960 <ulink url='&YOCTO_DOCS_REF_URL;#oe-core'>OpenEmbedded-Core</ulink>)
961 as well as a set of
962 <ulink url='&YOCTO_DOCS_REF_URL;#metadata'>metadata</ulink> to get
963 you started building your own distro.
964 In other words, Poky is a base specification of the functionality
965 needed for a typical embedded system as well as the components
966 from the Yocto Project that allow you to build a distribution into
967 a usable binary image.
968 </para>
969
970 <para>
971 Poky is a combined repository of BitBake, OpenEmbedded-Core
972 (which is found in <filename>meta</filename>),
973 <filename>meta-poky</filename>,
974 <filename>meta-yocto-bsp</filename>, and documentation provided
975 all together and known to work well together.
976 You can view these items that make up the Poky repository in the
977 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/'>Source Repositories</ulink>.
978 <note>
979 If you are interested in all the contents of the
980 <filename>poky</filename> Git repository, see the
981 "<ulink url='&YOCTO_DOCS_REF_URL;#structure-core'>Top-Level Core Components</ulink>"
982 section in the Yocto Project Reference Manual.
983 </note>
984 </para>
985
986 <para id='gs-poky-reference-distribution'>
987 The following figure illustrates what generally comprises Poky:
988 <imagedata fileref="figures/poky-reference-distribution.png" format="PNG" align='center' width="8in"/>
989 <itemizedlist>
990 <listitem><para>
991 BitBake is a task executor and scheduler that is the heart of
992 the OpenEmbedded build system.
993 </para></listitem>
994 <listitem><para>
995 <filename>meta-poky</filename>, which is Poky-specific
996 metadata.
997 </para></listitem>
998 <listitem><para>
999 <filename>meta-yocto-bsp</filename>, which are Yocto
1000 Project-specific Board Support Packages (BSPs).
1001 </para></listitem>
1002 <listitem><para>
1003 OpenEmbedded-Core (OE-Core) metadata, which includes
1004 shared configurations, global variable definitions,
1005 shared classes, packaging, and recipes.
1006 Classes define the encapsulation and inheritance of build
1007 logic.
1008 Recipes are the logical units of software and images
1009 to be built.
1010 </para></listitem>
1011 <listitem><para>
1012 Documentation, which contains the Yocto Project source
1013 files used to make the set of user manuals.
1014 </para></listitem>
1015 </itemizedlist>
1016 <note>
1017 While Poky is a "complete" distribution specification and is
1018 tested and put through QA, you cannot use it as a product
1019 "out of the box" in its current form.
1020 </note>
1021 </para>
1022
1023 <para>
1024 To use the Yocto Project tools, you can use Git to clone (download)
1025 the Poky repository then use your local copy of the reference
1026 distribution to bootstrap your own distribution.
1027 <note>
1028 Poky does not contain binary files.
1029 It is a working example of how to build your own custom Linux distribution
1030 from source.
1031 </note>
1032 </para>
1033
1034 <para>
1035 Poky has a regular, well established, six-month release cycle
1036 under its own version.
1037 Major releases occur at the same time major releases (point
1038 releases) occur for the Yocto Project, which are typically in the
1039 Spring and Fall.
1040 For more information on the Yocto Project release schedule and
1041 cadence, see the
1042 "<ulink url='&YOCTO_DOCS_REF_URL;#ref-release-process'>Yocto Project Releases and the Stable Release Process</ulink>"
1043 chapter in the Yocto Project Reference Manual.
1044 </para>
1045
1046 <para>
1047 Much has been said about Poky being a "default configuration."
1048 A default configuration provides a starting image footprint.
1049 You can use Poky out of the box to create an image ranging from a
1050 shell-accessible minimal image all the way up to a Linux
1051 Standard Base-compliant image that uses a GNOME Mobile and
1052 Embedded (GMAE) based reference user interface called Sato.
1053 </para>
1054
1055 <para>
1056 One of the most powerful properties of Poky is that every aspect
1057 of a build is controlled by the metadata.
1058 You can use metadata to augment these base image types by
1059 adding metadata
1060 <link linkend='the-yocto-project-layer-model'>layers</link>
1061 that extend functionality.
1062 These layers can provide, for example, an additional software
1063 stack for an image type, add a board support package (BSP) for
1064 additional hardware, or even create a new image type.
1065 </para>
1066
1067 <para>
1068 Metadata is loosely grouped into configuration files or package
1069 recipes.
1070 A recipe is a collection of non-executable metadata used by
1071 BitBake to set variables or define additional build-time tasks.
1072 A recipe contains fields such as the recipe description, the recipe
1073 version, the license of the package and the upstream source
1074 repository.
1075 A recipe might also indicate that the build process uses autotools,
1076 make, distutils or any other build process, in which case the basic
1077 functionality can be defined by the classes it inherits from
1078 the OE-Core layer's class definitions in
1079 <filename>./meta/classes</filename>.
1080 Within a recipe you can also define additional tasks as well as
1081 task prerequisites.
1082 Recipe syntax through BitBake also supports both
1083 <filename>_prepend</filename> and <filename>_append</filename>
1084 operators as a method of extending task functionality.
1085 These operators inject code into the beginning or end of a task.
1086 For information on these BitBake operators, see the
1087 "<ulink url='&YOCTO_DOCS_BB_URL;#appending-and-prepending-override-style-syntax'>Appending and Prepending (Override Style Syntax)</ulink>"
1088 section in the BitBake User's Manual.
1089 </para>
1090 </section>
1091
1092 <section id='openembedded-build-system-workflow'>
1093 <title>The OpenEmbedded Build System Workflow</title>
1094
1095 <para>
1096 The
1097 <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>
1098 uses a "workflow" to accomplish image and SDK generation.
1099 The following figure overviews that workflow:
1100 <imagedata fileref="figures/YP-flow-diagram.png"
1101 format="PNG" align='center' width="8in"/>
1102 Following is a brief summary of the "workflow":
1103 <orderedlist>
1104 <listitem><para>
1105 Developers specify architecture, policies, patches and
1106 configuration details.
1107 </para></listitem>
1108 <listitem><para>
1109 The build system fetches and downloads the source code
1110 from the specified location.
1111 The build system supports standard methods such as tarballs
1112 or source code repositories systems such as Git.
1113 </para></listitem>
1114 <listitem><para>
1115 Once source code is downloaded, the build system extracts
1116 the sources into a local work area where patches are
1117 applied and common steps for configuring and compiling
1118 the software are run.
1119 </para></listitem>
1120 <listitem><para>
1121 The build system then installs the software into a
1122 temporary staging area where the binary package format you
1123 select (DEB, RPM, or IPK) is used to roll up the software.
1124 </para></listitem>
1125 <listitem><para>
1126 Different QA and sanity checks run throughout entire
1127 build process.
1128 </para></listitem>
1129 <listitem><para>
1130 After the binaries are created, the build system
1131 generates a binary package feed that is used to create
1132 the final root file image.
1133 </para></listitem>
1134 <listitem><para>
1135 The build system generates the file system image and a
1136 customized Extensible SDK (eSDK) for application
1137 development in parallel.
1138 </para></listitem>
1139 </orderedlist>
1140 </para>
1141
1142 <para>
1143 For a very detailed look at this workflow, see the
1144 "<link linkend='openembedded-build-system-build-concepts'>OpenEmbedded Build System Concepts</link>"
1145 section.
1146 </para>
1147 </section>
1148
1149
1150 <section id='some-basic-terms'>
1151 <title>Some Basic Terms</title>
1152
1153 <para>
1154 It helps to understand some basic fundamental terms when
1155 learning the Yocto Project.
1156 Although a list of terms exists in the
1157 "<ulink url='&YOCTO_DOCS_REF_URL;#ref-terms'>Yocto Project Terms</ulink>"
1158 section of the Yocto Project Reference Manual, this section
1159 provides the definitions of some terms helpful for getting started:
1160 <itemizedlist>
1161 <listitem><para>
1162 <emphasis>Configuration Files:</emphasis>
1163 Files that hold global definitions of variables,
1164 user-defined variables, and hardware configuration
1165 information.
1166 These files tell the
1167 <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>Open-Embedded build system</ulink>
1168 what to build and what to put into the image to support a
1169 particular platform.
1170 </para></listitem>
1171 <listitem><para>
1172 <emphasis>Extensible Software Development Kit (eSDK):</emphasis>
1173 A custom SDK for application developers.
1174 This eSDK allows developers to incorporate their library
1175 and programming changes back into the image to make
1176 their code available to other application developers.
1177 For information on the eSDK, see the
1178 <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
1179 manual.
1180 </para></listitem>
1181 <listitem><para>
1182 <emphasis>Layer:</emphasis>
1183 A collection of related recipes.
1184 Layers allow you to consolidate related metadata to
1185 customize your build.
1186 Layers also isolate information used when building
1187 for multiple architectures.
1188 Layers are hierarchical in their ability to override
1189 previous specifications.
1190 You can include any number of available layers from the
1191 Yocto Project and customize the build by adding your
1192 layers after them.
1193 You can search the Layer Index for layers used within
1194 Yocto Project.</para>
1195
1196 <para>For more detailed information on layers, see the
1197 "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
1198 section in the Yocto Project Development Tasks Manual.
1199 For a discussion specifically on BSP Layers, see the
1200 "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>"
1201 section in the Yocto Project Board Support Packages (BSP)
1202 Developer's Guide.
1203 </para></listitem>
1204 <listitem><para>
1205 <emphasis>Metadata:</emphasis>
1206 A key element of the Yocto Project is the Metadata that
1207 is used to construct a Linux distribution and is contained
1208 in the files that the OpenEmbedded build system parses
1209 when building an image.
1210 In general, Metadata includes recipes, configuration
1211 files, and other information that refers to the build
1212 instructions themselves, as well as the data used to
1213 control what things get built and the effects of the
1214 build.
1215 Metadata also includes commands and data used to
1216 indicate what versions of software are used, from
1217 where they are obtained, and changes or additions to the
1218 software itself (patches or auxiliary files) that
1219 are used to fix bugs or customize the software for use
1220 in a particular situation.
1221 OpenEmbedded-Core is an important set of validated
1222 metadata.
1223 </para></listitem>
1224 <listitem><para id='gs-term-openembedded-build-system'>
1225 <emphasis>OpenEmbedded Build System:</emphasis>
1226 The terms "BitBake" and "build system" are sometimes
1227 used for the OpenEmbedded Build System.</para>
1228
1229 <para>BitBake is a task scheduler and execution engine
1230 that parses instructions (i.e. recipes) and configuration
1231 data.
1232 After a parsing phase, BitBake creates a dependency tree
1233 to order the compilation, schedules the compilation of
1234 the included code, and finally executes the building
1235 of the specified custom Linux image (distribution).
1236 BitBake is similar to the <filename>make</filename>
1237 tool.</para>
1238
1239 <para>During a build process, the build system tracks
1240 dependencies and performs a native or cross-compilation
1241 of the package.
1242 As a first step in a cross-build setup, the framework
1243 attempts to create a cross-compiler toolchain
1244 (i.e. Extensible SDK) suited for the target platform.
1245 </para></listitem>
1246 <listitem><para>
1247 <emphasis>OpenEmbedded-Core (OE-Core):</emphasis>
1248 OE-Core is metadata comprised of foundation recipes,
1249 classes, and associated files that are meant to be
1250 common among many different OpenEmbedded-derived systems,
1251 including the Yocto Project.
1252 OE-Core is a curated subset of an original repository
1253 developed by the OpenEmbedded community that has been
1254 pared down into a smaller, core set of continuously
1255 validated recipes.
1256 The result is a tightly controlled and quality-assured
1257 core set of recipes.</para>
1258
1259 <para>You can see the Metadata in the
1260 <filename>meta</filename> directory of the Yocto Project
1261 <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi'>Source Repositories</ulink>.
1262 </para></listitem>
1263 <listitem><para>
1264 <emphasis>Packages:</emphasis>
1265 In the context of the Yocto Project, this term refers to a
1266 recipe's packaged output produced by BitBake (i.e. a
1267 "baked recipe").
1268 A package is generally the compiled binaries produced from the
1269 recipe's sources.
1270 You "bake" something by running it through BitBake.</para>
1271
1272 <para>It is worth noting that the term "package" can,
1273 in general, have subtle meanings.
1274 For example, the packages referred to in the
1275 "<ulink url='&YOCTO_DOCS_REF_URL;#required-packages-for-the-build-host'>Required Packages for the Build Host</ulink>"
1276 section in the Yocto Project Reference Manual are compiled
1277 binaries that, when installed, add functionality to your
1278 Linux distribution.</para>
1279
1280 <para>Another point worth noting is that historically within
1281 the Yocto Project, recipes were referred to as packages - thus,
1282 the existence of several BitBake variables that are seemingly
1283 mis-named,
1284 (e.g. <ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink>,
1285 <ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>,
1286 and
1287 <ulink url='&YOCTO_DOCS_REF_URL;#var-PE'><filename>PE</filename></ulink>).
1288 </para></listitem>
1289 <listitem><para>
1290 <emphasis>Poky:</emphasis>
1291 Poky is a reference embedded distribution and a reference
1292 test configuration.
1293 Poky provides the following:
1294 <itemizedlist>
1295 <listitem><para>
1296 A base-level functional distro used to illustrate
1297 how to customize a distribution.
1298 </para></listitem>
1299 <listitem><para>
1300 A means by which to test the Yocto Project
1301 components (i.e. Poky is used to validate
1302 the Yocto Project).
1303 </para></listitem>
1304 <listitem><para>
1305 A vehicle through which you can download
1306 the Yocto Project.
1307 </para></listitem>
1308 </itemizedlist>
1309 Poky is not a product level distro.
1310 Rather, it is a good starting point for customization.
1311 <note>
1312 Poky is an integration layer on top of OE-Core.
1313 </note>
1314 </para></listitem>
1315 <listitem><para>
1316 <emphasis>Recipe:</emphasis>
1317 The most common form of metadata.
1318 A recipe contains a list of settings and tasks
1319 (i.e. instructions) for building packages that are then
1320 used to build the binary image.
1321 A recipe describes where you get source code and which
1322 patches to apply.
1323 Recipes describe dependencies for libraries or for other
1324 recipes as well as configuration and compilation options.
1325 Related recipes are consolidated into a layer.
1326 </para></listitem>
1327 </itemizedlist>
1328 </para>
1329 </section>
1330</chapter>
1331<!--
1332vim: expandtab tw=80 ts=4
1333-->
diff --git a/documentation/overview-manual/overview-manual.xml b/documentation/overview-manual/overview-manual.xml
deleted file mode 100755
index 8021a2e95e..0000000000
--- a/documentation/overview-manual/overview-manual.xml
+++ /dev/null
@@ -1,130 +0,0 @@
1<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<book id='overview-manual' lang='en'
7 xmlns:xi="http://www.w3.org/2003/XInclude"
8 xmlns="http://docbook.org/ns/docbook"
9 >
10 <bookinfo>
11
12 <mediaobject>
13 <imageobject>
14 <imagedata fileref='figures/overview-manual-title.png'
15 format='SVG'
16 align='left' scalefit='1' width='100%'/>
17 </imageobject>
18 </mediaobject>
19
20 <title>
21 Yocto Project Overview and Concepts Manual
22 </title>
23
24 <authorgroup>
25 <author>
26 <affiliation>
27 <orgname>&ORGNAME;</orgname>
28 </affiliation>
29 <email>&ORGEMAIL;</email>
30 </author>
31 </authorgroup>
32
33 <revhistory>
34 <revision>
35 <revnumber>2.5</revnumber>
36 <date>May 2018</date>
37 <revremark>The initial document released with the Yocto Project 2.5 Release.</revremark>
38 </revision>
39 <revision>
40 <revnumber>2.6</revnumber>
41 <date>November 2018</date>
42 <revremark>Released with the Yocto Project 2.6 Release.</revremark>
43 </revision>
44 <revision>
45 <revnumber>2.7</revnumber>
46 <date>May 2019</date>
47 <revremark>Released with the Yocto Project 2.7 Release.</revremark>
48 </revision>
49 <revision>
50 <revnumber>3.0</revnumber>
51 <date>October 2019</date>
52 <revremark>Released with the Yocto Project 3.0 Release.</revremark>
53 </revision>
54 <revision>
55 <revnumber>3.1</revnumber>
56 <date>&REL_MONTH_YEAR;</date>
57 <revremark>Released with the Yocto Project 3.1 Release.</revremark>
58 </revision>
59 </revhistory>
60
61 <copyright>
62 <year>&COPYRIGHT_YEAR;</year>
63 <holder>Linux Foundation</holder>
64 </copyright>
65
66 <legalnotice>
67 <para>
68 Permission is granted to copy, distribute and/or modify this document under
69 the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-sa/2.0/uk/">
70 Creative Commons Attribution-Share Alike 2.0 UK: England &amp; Wales</ulink> as published by
71 Creative Commons.
72 </para>
73 <note><title>Manual Notes</title>
74 <itemizedlist>
75 <listitem><para>
76 This version of the
77 <emphasis>Yocto Project Overview and Concepts Manual</emphasis>
78 is for the &YOCTO_DOC_VERSION; release of the
79 Yocto Project.
80 To be sure you have the latest version of the manual
81 for this release, go to the
82 <ulink url='&YOCTO_DOCS_URL;'>Yocto Project documentation page</ulink>
83 and select the manual from that site.
84 Manuals from the site are more up-to-date than manuals
85 derived from the Yocto Project released TAR files.
86 </para></listitem>
87 <listitem><para>
88 If you located this manual through a web search, the
89 version of the manual might not be the one you want
90 (e.g. the search might have returned a manual much
91 older than the Yocto Project version with which you
92 are working).
93 You can see all Yocto Project major releases by
94 visiting the
95 <ulink url='&YOCTO_WIKI_URL;/wiki/Releases'>Releases</ulink>
96 page.
97 If you need a version of this manual for a different
98 Yocto Project release, visit the
99 <ulink url='&YOCTO_DOCS_URL;'>Yocto Project documentation page</ulink>
100 and select the manual set by using the
101 "ACTIVE RELEASES DOCUMENTATION" or "DOCUMENTS ARCHIVE"
102 pull-down menus.
103 </para></listitem>
104 <listitem>
105 <para>
106 To report any inaccuracies or problems with this
107 (or any other Yocto Project) manual, send an email to
108 the Yocto Project documentation mailing list at
109 <filename>docs@lists.yoctoproject.org</filename> or
110 log into the freenode <filename>#yocto</filename> channel.
111 </para>
112 </listitem>
113 </itemizedlist>
114 </note>
115 </legalnotice>
116
117 </bookinfo>
118
119 <xi:include href="overview-manual-intro.xml"/>
120
121 <xi:include href="overview-manual-yp-intro.xml"/>
122
123 <xi:include href="overview-manual-development-environment.xml"/>
124
125 <xi:include href="overview-manual-concepts.xml" />
126
127</book>
128<!--
129vim: expandtab tw=80 ts=4
130-->
diff --git a/documentation/poky.ent b/documentation/poky.ent
deleted file mode 100755
index aec8d455e8..0000000000
--- a/documentation/poky.ent
+++ /dev/null
@@ -1,89 +0,0 @@
1<!ENTITY DISTRO "3.1">
2<!ENTITY DISTRO_COMPRESSED "31">
3<!ENTITY DISTRO_NAME_NO_CAP "dunfell">
4<!ENTITY DISTRO_NAME "Dunfell">
5<!ENTITY DISTRO_NAME_NO_CAP_MINUS_ONE "zeus">
6<!ENTITY DISTRO_NAME_MINUS_ONE "Zeus">
7<!ENTITY YOCTO_DOC_VERSION "3.1">
8<!ENTITY YOCTO_DOC_VERSION_MINUS_ONE "3.0.2">
9<!ENTITY DISTRO_REL_TAG "yocto-3.1">
10<!ENTITY METAINTELVERSION "12.0">
11<!ENTITY REL_MONTH_YEAR "April 2020">
12<!ENTITY META_INTEL_REL_TAG "&METAINTELVERSION;-&DISTRO_NAME_NO_CAP;-&YOCTO_DOC_VERSION;">
13<!ENTITY POKYVERSION "23.0.0">
14<!ENTITY POKYVERSION_COMPRESSED "2300">
15<!ENTITY YOCTO_POKY "poky-&DISTRO_NAME_NO_CAP;-&POKYVERSION;">
16<!ENTITY COPYRIGHT_YEAR "2010-2020">
17<!ENTITY ORGNAME "The Yocto Project">
18<!ENTITY ORGEMAIL "docs@lists.yoctoproject.org">
19<!ENTITY YOCTO_DL_URL "http://downloads.yoctoproject.org">
20<!ENTITY YOCTO_HOME_URL "http://www.yoctoproject.org">
21<!ENTITY YOCTO_LISTS_URL "http://lists.yoctoproject.org">
22<!ENTITY YOCTO_BUGZILLA_URL "http://bugzilla.yoctoproject.org">
23<!ENTITY YOCTO_WIKI_URL "https://wiki.yoctoproject.org">
24<!ENTITY YOCTO_AB_URL "http://autobuilder.yoctoproject.org">
25<!ENTITY YOCTO_GIT_URL "http://git.yoctoproject.org">
26<!ENTITY YOCTO_ADTREPO_URL "http://adtrepo.yoctoproject.org">
27<!ENTITY OE_HOME_URL "http://www.openembedded.org">
28<!ENTITY OE_LISTS_URL "http://lists.openembedded.org/mailman">
29<!ENTITY OE_DOCS_URL "http://docs.openembedded.org">
30<!ENTITY OH_HOME_URL "http://o-hand.com">
31<!ENTITY BITBAKE_HOME_URL "http://developer.berlios.de/projects/bitbake/">
32<!ENTITY YOCTO_DOCS_URL "&YOCTO_HOME_URL;/docs">
33<!ENTITY YOCTO_SOURCES_URL "&YOCTO_HOME_URL;/sources/">
34<!ENTITY YOCTO_AB_PORT_URL "https://autobuilder.yocto.io/">
35<!ENTITY YOCTO_AB_NIGHTLY_URL "&YOCTO_AB_PORT_URL;/pub/nightly/">
36<!ENTITY YOCTO_POKY_URL "&YOCTO_DL_URL;/releases/poky/">
37<!ENTITY YOCTO_RELEASE_DL_URL "&YOCTO_DL_URL;/releases/yocto/yocto-&DISTRO;">
38<!ENTITY YOCTO_TOOLCHAIN_DL_URL "&YOCTO_RELEASE_DL_URL;/toolchain/">
39<!ENTITY YOCTO_ADTINSTALLER_DL_URL "&YOCTO_RELEASE_DL_URL;/adt-installer">
40<!ENTITY YOCTO_POKY_DL_URL "&YOCTO_RELEASE_DL_URL;/&YOCTO_POKY;.tar.bz2">
41<!ENTITY YOCTO_MACHINES_DL_URL "&YOCTO_RELEASE_DL_URL;/machines">
42<!ENTITY YOCTO_QEMU_DL_URL "&YOCTO_MACHINES_DL_URL;/qemu">
43<!ENTITY YOCTO_PYTHON-i686_DL_URL "&YOCTO_DL_URL;/releases/miscsupport/python-nativesdk-standalone-i686.tar.bz2">
44<!ENTITY YOCTO_PYTHON-x86_64_DL_URL "&YOCTO_DL_URL;/releases/miscsupport/python-nativesdk-standalone-x86_64.tar.bz2">
45<!ENTITY YOCTO_DOCS_QS_URL "&YOCTO_DOCS_URL;/&YOCTO_DOC_VERSION;/yocto-project-qs/yocto-project-qs.html">
46<!ENTITY YOCTO_DOCS_ADT_URL "&YOCTO_DOCS_URL;/&YOCTO_DOC_VERSION;/adt-manual/adt-manual.html">
47<!ENTITY YOCTO_DOCS_REF_URL "&YOCTO_DOCS_URL;/&YOCTO_DOC_VERSION;/ref-manual/ref-manual.html">
48<!ENTITY YOCTO_DOCS_BSP_URL "&YOCTO_DOCS_URL;/&YOCTO_DOC_VERSION;/bsp-guide/bsp-guide.html">
49<!ENTITY YOCTO_DOCS_DEV_URL "&YOCTO_DOCS_URL;/&YOCTO_DOC_VERSION;/dev-manual/dev-manual.html">
50<!ENTITY YOCTO_DOCS_KERNEL_DEV_URL "&YOCTO_DOCS_URL;/&YOCTO_DOC_VERSION;/kernel-dev/kernel-dev.html">
51<!ENTITY YOCTO_DOCS_PROF_URL "&YOCTO_DOCS_URL;/&YOCTO_DOC_VERSION;/profile-manual/profile-manual.html">
52<!ENTITY YOCTO_DOCS_MM_URL "&YOCTO_DOCS_URL;/&YOCTO_DOC_VERSION;/mega-manual/mega-manual.html">
53<!ENTITY YOCTO_DOCS_BB_URL "&YOCTO_DOCS_URL;/&YOCTO_DOC_VERSION;/bitbake-user-manual/bitbake-user-manual.html">
54<!ENTITY YOCTO_DOCS_TOAST_URL "&YOCTO_DOCS_URL;/&YOCTO_DOC_VERSION;/toaster-manual/toaster-manual.html">
55<!ENTITY YOCTO_DOCS_SDK_URL "&YOCTO_DOCS_URL;/&YOCTO_DOC_VERSION;/sdk-manual/sdk-manual.html">
56<!ENTITY YOCTO_DOCS_OM_URL "&YOCTO_DOCS_URL;/&YOCTO_DOC_VERSION;/overview-manual/overview-manual.html">
57<!ENTITY YOCTO_DOCS_BRIEF_URL "&YOCTO_DOCS_URL;/&YOCTO_DOC_VERSION;/brief-yoctoprojectqs/brief-yoctoprojectqs.html">
58<!ENTITY YOCTO_ADTPATH_DIR "/opt/poky/&DISTRO;">
59<!ENTITY YOCTO_POKY_TARBALL "&YOCTO_POKY;.tar.bz2">
60<!ENTITY OE_INIT_PATH "&YOCTO_POKY;/oe-init-build-env">
61<!ENTITY OE_INIT_FILE "oe-init-build-env">
62<!ENTITY UBUNTU_HOST_PACKAGES_ESSENTIAL "gawk wget git-core diffstat unzip texinfo gcc-multilib \
63 build-essential chrpath socat cpio python3 python3-pip python3-pexpect \
64 xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev \
65 pylint3 xterm python3-subunit mesa-common-dev">
66<!ENTITY FEDORA_HOST_PACKAGES_ESSENTIAL "gawk make wget tar bzip2 gzip python3 unzip perl patch \
67 diffutils diffstat git cpp gcc gcc-c++ glibc-devel texinfo chrpath \
68 ccache perl-Data-Dumper perl-Text-ParseWords perl-Thread-Queue perl-bignum socat \
69 python3-pexpect findutils which file cpio python python3-pip xz python3-GitPython \
70 python3-jinja2 SDL-devel xterm rpcgen mesa-libGL-devel">
71<!ENTITY OPENSUSE_HOST_PACKAGES_ESSENTIAL "python gcc gcc-c++ git chrpath make wget python-xml \
72 diffstat makeinfo python-curses patch socat python3 python3-curses tar python3-pip \
73 python3-pexpect xz which python3-Jinja2 Mesa-libEGL1 libSDL-devel xterm rpcgen Mesa-dri-devel
74 $ sudo pip3 install GitPython">
75<!ENTITY CENTOS7_HOST_PACKAGES_ESSENTIAL "-y epel-release
76 $ sudo yum makecache
77 $ sudo yum install gawk make wget tar bzip2 gzip python3 unzip perl patch \
78 diffutils diffstat git cpp gcc gcc-c++ glibc-devel texinfo chrpath socat \
79 perl-Data-Dumper perl-Text-ParseWords perl-Thread-Queue python36-pip xz \
80 which SDL-devel xterm mesa-libGL-devel
81 $ sudo pip3 install GitPython jinja2">
82<!ENTITY CENTOS8_HOST_PACKAGES_ESSENTIAL "-y epel-release
83 $ sudo dnf config-manager --set-enabled PowerTools
84 $ sudo dnf makecache
85 $ sudo dnf install gawk make wget tar bzip2 gzip python3 unzip perl patch \
86 diffutils diffstat git cpp gcc gcc-c++ glibc-devel texinfo chrpath ccache \
87 socat perl-Data-Dumper perl-Text-ParseWords perl-Thread-Queue python3-pip \
88 python3-GitPython python3-jinja2 python3-pexpect xz which SDL-devel xterm \
89 rpcgen mesa-libGL-devel">
diff --git a/documentation/profile-manual/profile-manual-arch.xml b/documentation/profile-manual/profile-manual-arch.xml
deleted file mode 100644
index 8eb7bbfabd..0000000000
--- a/documentation/profile-manual/profile-manual-arch.xml
+++ /dev/null
@@ -1,46 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='profile-manual-arch'>
7
8<title>Overall Architecture of the Linux Tracing and Profiling Tools</title>
9
10<section id='architecture-of-the-tracing-and-profiling-tools'>
11 <title>Architecture of the Tracing and Profiling Tools</title>
12
13 <para>
14 It may seem surprising to see a section covering an 'overall architecture'
15 for what seems to be a random collection of tracing tools that together
16 make up the Linux tracing and profiling space.
17 The fact is, however, that in recent years this seemingly disparate
18 set of tools has started to converge on a 'core' set of underlying
19 mechanisms:
20 </para>
21
22 <para>
23 <itemizedlist>
24 <listitem>static tracepoints</listitem>
25 <listitem>dynamic tracepoints
26 <itemizedlist>
27 <listitem>kprobes</listitem>
28 <listitem>uprobes</listitem>
29 </itemizedlist>
30 </listitem>
31 <listitem>the perf_events subsystem</listitem>
32 <listitem>debugfs</listitem>
33 </itemizedlist>
34 </para>
35
36 <informalexample>
37 <emphasis>Tying it Together:</emphasis> Rather than enumerating here how each tool makes use of
38 these common mechanisms, textboxes like this will make note of the
39 specific usages in each tool as they come up in the course
40 of the text.
41 </informalexample>
42</section>
43</chapter>
44<!--
45vim: expandtab tw=80 ts=4
46-->
diff --git a/documentation/profile-manual/profile-manual-customization.xsl b/documentation/profile-manual/profile-manual-customization.xsl
deleted file mode 100644
index d995e0b3cb..0000000000
--- a/documentation/profile-manual/profile-manual-customization.xsl
+++ /dev/null
@@ -1,29 +0,0 @@
1<?xml version='1.0'?>
2<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
3
4<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
5
6 <xsl:import href="http://downloads.yoctoproject.org/mirror/docbook-mirror/docbook-xsl-1.76.1/xhtml/docbook.xsl" />
7
8<!--
9
10 <xsl:import href="../template/1.76.1/docbook-xsl-1.76.1/xhtml/docbook.xsl" />
11
12 <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.76.1/xhtml/docbook.xsl" />
13
14-->
15
16 <xsl:include href="../template/permalinks.xsl"/>
17 <xsl:include href="../template/section.title.xsl"/>
18 <xsl:include href="../template/component.title.xsl"/>
19 <xsl:include href="../template/division.title.xsl"/>
20 <xsl:include href="../template/formal.object.heading.xsl"/>
21
22 <xsl:param name="html.stylesheet" select="'profile-manual-style.css'" />
23 <xsl:param name="chapter.autolabel" select="1" />
24 <xsl:param name="appendix.autolabel" select="A" />
25 <xsl:param name="section.autolabel" select="1" />
26 <xsl:param name="section.label.includes.component.label" select="1" />
27 <xsl:param name="generate.id.attributes" select="1" />
28
29</xsl:stylesheet>
diff --git a/documentation/profile-manual/profile-manual-examples.xml b/documentation/profile-manual/profile-manual-examples.xml
deleted file mode 100644
index 91e06fcd1c..0000000000
--- a/documentation/profile-manual/profile-manual-examples.xml
+++ /dev/null
@@ -1,40 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='profile-manual-examples'>
7
8<title>Real-World Examples</title>
9
10<para>
11 This chapter contains real-world examples.
12</para>
13
14<section id='slow-write-speed-on-live-images'>
15 <title>Slow Write Speed on Live Images</title>
16
17 <para>
18 In one of our previous releases (denzil), users noticed that booting
19 off of a live image and writing to disk was noticeably slower.
20 This included the boot itself, especially the first one, since first
21 boots tend to do a significant amount of writing due to certain
22 post-install scripts.
23 </para>
24
25 <para>
26 The problem (and solution) was discovered by using the Yocto tracing
27 tools, in this case 'perf stat', 'perf script', 'perf record'
28 and 'perf report'.
29 </para>
30
31 <para>
32 See all the unvarnished details of how this bug was diagnosed and
33 solved here: Yocto Bug #3049
34 </para>
35</section>
36
37</chapter>
38<!--
39vim: expandtab tw=80 ts=4
40-->
diff --git a/documentation/profile-manual/profile-manual-intro.xml b/documentation/profile-manual/profile-manual-intro.xml
deleted file mode 100644
index a2d2f80ec0..0000000000
--- a/documentation/profile-manual/profile-manual-intro.xml
+++ /dev/null
@@ -1,107 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='profile-manual-intro'>
7
8<title>Yocto Project Profiling and Tracing Manual</title>
9 <section id='profile-intro'>
10 <title>Introduction</title>
11
12 <para>
13 Yocto bundles a number of tracing and profiling tools - this 'HOWTO'
14 describes their basic usage and shows by example how to make use
15 of them to examine application and system behavior.
16 </para>
17
18 <para>
19 The tools presented are for the most part completely open-ended and
20 have quite good and/or extensive documentation of their own which
21 can be used to solve just about any problem you might come across
22 in Linux.
23 Each section that describes a particular tool has links to that
24 tool's documentation and website.
25 </para>
26
27 <para>
28 The purpose of this 'HOWTO' is to present a set of common and
29 generally useful tracing and profiling idioms along with their
30 application (as appropriate) to each tool, in the context of a
31 general-purpose 'drill-down' methodology that can be applied
32 to solving a large number (90%?) of problems.
33 For help with more advanced usages and problems, please see
34 the documentation and/or websites listed for each tool.
35 </para>
36
37 <para>
38 The final section of this 'HOWTO' is a collection of real-world
39 examples which we'll be continually adding to as we solve more
40 problems using the tools - feel free to add your own examples
41 to the list!
42 </para>
43 </section>
44
45 <section id='profile-manual-general-setup'>
46 <title>General Setup</title>
47
48 <para>
49 Most of the tools are available only in 'sdk' images or in images
50 built after adding 'tools-profile' to your local.conf.
51 So, in order to be able to access all of the tools described here,
52 please first build and boot an 'sdk' image e.g.
53 <literallayout class='monospaced'>
54 $ bitbake core-image-sato-sdk
55 </literallayout>
56 or alternatively by adding 'tools-profile' to the
57 EXTRA_IMAGE_FEATURES line in your local.conf:
58 <literallayout class='monospaced'>
59 EXTRA_IMAGE_FEATURES = "debug-tweaks tools-profile"
60 </literallayout>
61 If you use the 'tools-profile' method, you don't need to build an
62 sdk image - the tracing and profiling tools will be included in
63 non-sdk images as well e.g.:
64 <literallayout class='monospaced'>
65 $ bitbake core-image-sato
66 </literallayout>
67 <note><para>
68 By default, the Yocto build system strips symbols from the
69 binaries it packages, which makes it difficult to use some
70 of the tools.
71 </para><para>You can prevent that by setting the
72 <ulink url='&YOCTO_DOCS_REF_URL;#var-INHIBIT_PACKAGE_STRIP'><filename>INHIBIT_PACKAGE_STRIP</filename></ulink>
73 variable to "1" in your
74 <filename>local.conf</filename> when you build the image:
75 </para>
76 </note>
77 <literallayout class='monospaced'>
78 INHIBIT_PACKAGE_STRIP = "1"
79 </literallayout>
80 The above setting will noticeably increase the size of your image.
81 </para>
82
83 <para>
84 If you've already built a stripped image, you can generate
85 debug packages (xxx-dbg) which you can manually install as
86 needed.
87 </para>
88
89 <para>
90 To generate debug info for packages, you can add dbg-pkgs to
91 EXTRA_IMAGE_FEATURES in local.conf. For example:
92 <literallayout class='monospaced'>
93 EXTRA_IMAGE_FEATURES = "debug-tweaks tools-profile dbg-pkgs"
94 </literallayout>
95 Additionally, in order to generate the right type of
96 debuginfo, we also need to set
97 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_DEBUG_SPLIT_STYLE'><filename>PACKAGE_DEBUG_SPLIT_STYLE</filename></ulink>
98 in the <filename>local.conf</filename> file:
99 <literallayout class='monospaced'>
100 PACKAGE_DEBUG_SPLIT_STYLE = 'debug-file-directory'
101 </literallayout>
102 </para>
103 </section>
104</chapter>
105<!--
106vim: expandtab tw=80 ts=4
107-->
diff --git a/documentation/profile-manual/profile-manual-style.css b/documentation/profile-manual/profile-manual-style.css
deleted file mode 100644
index 8502c11090..0000000000
--- a/documentation/profile-manual/profile-manual-style.css
+++ /dev/null
@@ -1,987 +0,0 @@
1/*
2
3 SPDX-License-Identifier: CC-BY-2.0-UK
4
5 Generic XHTML / DocBook XHTML CSS Stylesheet.
6
7 Browser wrangling and typographic design by
8 Oyvind Kolas / pippin@gimp.org
9
10 Customised for Poky by
11 Matthew Allum / mallum@o-hand.com
12
13 Thanks to:
14 Liam R. E. Quin
15 William Skaggs
16 Jakub Steiner
17
18 Structure
19 ---------
20
21 The stylesheet is divided into the following sections:
22
23 Positioning
24 Margins, paddings, width, font-size, clearing.
25 Decorations
26 Borders, style
27 Colors
28 Colors
29 Graphics
30 Graphical backgrounds
31 Nasty IE tweaks
32 Workarounds needed to make it work in internet explorer,
33 currently makes the stylesheet non validating, but up until
34 this point it is validating.
35 Mozilla extensions
36 Transparency for footer
37 Rounded corners on boxes
38
39*/
40
41
42 /*************** /
43 / Positioning /
44/ ***************/
45
46body {
47 font-family: Verdana, Sans, sans-serif;
48
49 min-width: 640px;
50 width: 80%;
51 margin: 0em auto;
52 padding: 2em 5em 5em 5em;
53 color: #333;
54}
55
56h1,h2,h3,h4,h5,h6,h7 {
57 font-family: Arial, Sans;
58 color: #00557D;
59 clear: both;
60}
61
62h1 {
63 font-size: 2em;
64 text-align: left;
65 padding: 0em 0em 0em 0em;
66 margin: 2em 0em 0em 0em;
67}
68
69h2.subtitle {
70 margin: 0.10em 0em 3.0em 0em;
71 padding: 0em 0em 0em 0em;
72 font-size: 1.8em;
73 padding-left: 20%;
74 font-weight: normal;
75 font-style: italic;
76}
77
78h2 {
79 margin: 2em 0em 0.66em 0em;
80 padding: 0.5em 0em 0em 0em;
81 font-size: 1.5em;
82 font-weight: bold;
83}
84
85h3.subtitle {
86 margin: 0em 0em 1em 0em;
87 padding: 0em 0em 0em 0em;
88 font-size: 142.14%;
89 text-align: right;
90}
91
92h3 {
93 margin: 1em 0em 0.5em 0em;
94 padding: 1em 0em 0em 0em;
95 font-size: 140%;
96 font-weight: bold;
97}
98
99h4 {
100 margin: 1em 0em 0.5em 0em;
101 padding: 1em 0em 0em 0em;
102 font-size: 120%;
103 font-weight: bold;
104}
105
106h5 {
107 margin: 1em 0em 0.5em 0em;
108 padding: 1em 0em 0em 0em;
109 font-size: 110%;
110 font-weight: bold;
111}
112
113h6 {
114 margin: 1em 0em 0em 0em;
115 padding: 1em 0em 0em 0em;
116 font-size: 110%;
117 font-weight: bold;
118}
119
120.authorgroup {
121 background-color: transparent;
122 background-repeat: no-repeat;
123 padding-top: 256px;
124 background-image: url("figures/profile-title.png");
125 background-position: left top;
126 margin-top: -256px;
127 padding-right: 50px;
128 margin-left: 0px;
129 text-align: right;
130 width: 740px;
131}
132
133h3.author {
134 margin: 0em 0me 0em 0em;
135 padding: 0em 0em 0em 0em;
136 font-weight: normal;
137 font-size: 100%;
138 color: #333;
139 clear: both;
140}
141
142.author tt.email {
143 font-size: 66%;
144}
145
146.titlepage hr {
147 width: 0em;
148 clear: both;
149}
150
151.revhistory {
152 padding-top: 2em;
153 clear: both;
154}
155
156.toc,
157.list-of-tables,
158.list-of-examples,
159.list-of-figures {
160 padding: 1.33em 0em 2.5em 0em;
161 color: #00557D;
162}
163
164.toc p,
165.list-of-tables p,
166.list-of-figures p,
167.list-of-examples p {
168 padding: 0em 0em 0em 0em;
169 padding: 0em 0em 0.3em;
170 margin: 1.5em 0em 0em 0em;
171}
172
173.toc p b,
174.list-of-tables p b,
175.list-of-figures p b,
176.list-of-examples p b{
177 font-size: 100.0%;
178 font-weight: bold;
179}
180
181.toc dl,
182.list-of-tables dl,
183.list-of-figures dl,
184.list-of-examples dl {
185 margin: 0em 0em 0.5em 0em;
186 padding: 0em 0em 0em 0em;
187}
188
189.toc dt {
190 margin: 0em 0em 0em 0em;
191 padding: 0em 0em 0em 0em;
192}
193
194.toc dd {
195 margin: 0em 0em 0em 2.6em;
196 padding: 0em 0em 0em 0em;
197}
198
199div.glossary dl,
200div.variablelist dl {
201}
202
203.glossary dl dt,
204.variablelist dl dt,
205.variablelist dl dt span.term {
206 font-weight: normal;
207 width: 20em;
208 text-align: right;
209}
210
211.variablelist dl dt {
212 margin-top: 0.5em;
213}
214
215.glossary dl dd,
216.variablelist dl dd {
217 margin-top: -1em;
218 margin-left: 25.5em;
219}
220
221.glossary dd p,
222.variablelist dd p {
223 margin-top: 0em;
224 margin-bottom: 1em;
225}
226
227
228div.calloutlist table td {
229 padding: 0em 0em 0em 0em;
230 margin: 0em 0em 0em 0em;
231}
232
233div.calloutlist table td p {
234 margin-top: 0em;
235 margin-bottom: 1em;
236}
237
238div p.copyright {
239 text-align: left;
240}
241
242div.legalnotice p.legalnotice-title {
243 margin-bottom: 0em;
244}
245
246p {
247 line-height: 1.5em;
248 margin-top: 0em;
249
250}
251
252dl {
253 padding-top: 0em;
254}
255
256hr {
257 border: solid 1px;
258}
259
260
261.mediaobject,
262.mediaobjectco {
263 text-align: center;
264}
265
266img {
267 border: none;
268}
269
270ul {
271 padding: 0em 0em 0em 1.5em;
272}
273
274ul li {
275 padding: 0em 0em 0em 0em;
276}
277
278ul li p {
279 text-align: left;
280}
281
282table {
283 width :100%;
284}
285
286th {
287 padding: 0.25em;
288 text-align: left;
289 font-weight: normal;
290 vertical-align: top;
291}
292
293td {
294 padding: 0.25em;
295 vertical-align: top;
296}
297
298p a[id] {
299 margin: 0px;
300 padding: 0px;
301 display: inline;
302 background-image: none;
303}
304
305a {
306 text-decoration: underline;
307 color: #444;
308}
309
310pre {
311 overflow: auto;
312}
313
314a:hover {
315 text-decoration: underline;
316 /*font-weight: bold;*/
317}
318
319/* This style defines how the permalink character
320 appears by itself and when hovered over with
321 the mouse. */
322
323[alt='Permalink'] { color: #eee; }
324[alt='Permalink']:hover { color: black; }
325
326
327div.informalfigure,
328div.informalexample,
329div.informaltable,
330div.figure,
331div.table,
332div.example {
333 margin: 1em 0em;
334 padding: 1em;
335 page-break-inside: avoid;
336}
337
338
339div.informalfigure p.title b,
340div.informalexample p.title b,
341div.informaltable p.title b,
342div.figure p.title b,
343div.example p.title b,
344div.table p.title b{
345 padding-top: 0em;
346 margin-top: 0em;
347 font-size: 100%;
348 font-weight: normal;
349}
350
351.mediaobject .caption,
352.mediaobject .caption p {
353 text-align: center;
354 font-size: 80%;
355 padding-top: 0.5em;
356 padding-bottom: 0.5em;
357}
358
359.epigraph {
360 padding-left: 55%;
361 margin-bottom: 1em;
362}
363
364.epigraph p {
365 text-align: left;
366}
367
368.epigraph .quote {
369 font-style: italic;
370}
371.epigraph .attribution {
372 font-style: normal;
373 text-align: right;
374}
375
376span.application {
377 font-style: italic;
378}
379
380.programlisting {
381 font-family: monospace;
382 font-size: 80%;
383 white-space: pre;
384 margin: 1.33em 0em;
385 padding: 1.33em;
386}
387
388.tip,
389.warning,
390.caution,
391.note {
392 margin-top: 1em;
393 margin-bottom: 1em;
394
395}
396
397/* force full width of table within div */
398.tip table,
399.warning table,
400.caution table,
401.note table {
402 border: none;
403 width: 100%;
404}
405
406
407.tip table th,
408.warning table th,
409.caution table th,
410.note table th {
411 padding: 0.8em 0.0em 0.0em 0.0em;
412 margin : 0em 0em 0em 0em;
413}
414
415.tip p,
416.warning p,
417.caution p,
418.note p {
419 margin-top: 0.5em;
420 margin-bottom: 0.5em;
421 padding-right: 1em;
422 text-align: left;
423}
424
425.acronym {
426 text-transform: uppercase;
427}
428
429b.keycap,
430.keycap {
431 padding: 0.09em 0.3em;
432 margin: 0em;
433}
434
435.itemizedlist li {
436 clear: none;
437}
438
439.filename {
440 font-size: medium;
441 font-family: Courier, monospace;
442}
443
444
445div.navheader, div.heading{
446 position: absolute;
447 left: 0em;
448 top: 0em;
449 width: 100%;
450 background-color: #cdf;
451 width: 100%;
452}
453
454div.navfooter, div.footing{
455 position: fixed;
456 left: 0em;
457 bottom: 0em;
458 background-color: #eee;
459 width: 100%;
460}
461
462
463div.navheader td,
464div.navfooter td {
465 font-size: 66%;
466}
467
468div.navheader table th {
469 /*font-family: Georgia, Times, serif;*/
470 /*font-size: x-large;*/
471 font-size: 80%;
472}
473
474div.navheader table {
475 border-left: 0em;
476 border-right: 0em;
477 border-top: 0em;
478 width: 100%;
479}
480
481div.navfooter table {
482 border-left: 0em;
483 border-right: 0em;
484 border-bottom: 0em;
485 width: 100%;
486}
487
488div.navheader table td a,
489div.navfooter table td a {
490 color: #777;
491 text-decoration: none;
492}
493
494/* normal text in the footer */
495div.navfooter table td {
496 color: black;
497}
498
499div.navheader table td a:visited,
500div.navfooter table td a:visited {
501 color: #444;
502}
503
504
505/* links in header and footer */
506div.navheader table td a:hover,
507div.navfooter table td a:hover {
508 text-decoration: underline;
509 background-color: transparent;
510 color: #33a;
511}
512
513div.navheader hr,
514div.navfooter hr {
515 display: none;
516}
517
518
519.qandaset tr.question td p {
520 margin: 0em 0em 1em 0em;
521 padding: 0em 0em 0em 0em;
522}
523
524.qandaset tr.answer td p {
525 margin: 0em 0em 1em 0em;
526 padding: 0em 0em 0em 0em;
527}
528.answer td {
529 padding-bottom: 1.5em;
530}
531
532.emphasis {
533 font-weight: bold;
534}
535
536
537 /************* /
538 / decorations /
539/ *************/
540
541.titlepage {
542}
543
544.part .title {
545}
546
547.subtitle {
548 border: none;
549}
550
551/*
552h1 {
553 border: none;
554}
555
556h2 {
557 border-top: solid 0.2em;
558 border-bottom: solid 0.06em;
559}
560
561h3 {
562 border-top: 0em;
563 border-bottom: solid 0.06em;
564}
565
566h4 {
567 border: 0em;
568 border-bottom: solid 0.06em;
569}
570
571h5 {
572 border: 0em;
573}
574*/
575
576.programlisting {
577 border: solid 1px;
578}
579
580div.figure,
581div.table,
582div.informalfigure,
583div.informaltable,
584div.informalexample,
585div.example {
586 border: 1px solid;
587}
588
589
590
591.tip,
592.warning,
593.caution,
594.note {
595 border: 1px solid;
596}
597
598.tip table th,
599.warning table th,
600.caution table th,
601.note table th {
602 border-bottom: 1px solid;
603}
604
605.question td {
606 border-top: 1px solid black;
607}
608
609.answer {
610}
611
612
613b.keycap,
614.keycap {
615 border: 1px solid;
616}
617
618
619div.navheader, div.heading{
620 border-bottom: 1px solid;
621}
622
623
624div.navfooter, div.footing{
625 border-top: 1px solid;
626}
627
628 /********* /
629 / colors /
630/ *********/
631
632body {
633 color: #333;
634 background: white;
635}
636
637a {
638 background: transparent;
639}
640
641a:hover {
642 background-color: #dedede;
643}
644
645
646h1,
647h2,
648h3,
649h4,
650h5,
651h6,
652h7,
653h8 {
654 background-color: transparent;
655}
656
657hr {
658 border-color: #aaa;
659}
660
661
662.tip, .warning, .caution, .note {
663 border-color: #fff;
664}
665
666
667.tip table th,
668.warning table th,
669.caution table th,
670.note table th {
671 border-bottom-color: #fff;
672}
673
674
675.warning {
676 background-color: #f0f0f2;
677}
678
679.caution {
680 background-color: #f0f0f2;
681}
682
683.tip {
684 background-color: #f0f0f2;
685}
686
687.note {
688 background-color: #f0f0f2;
689}
690
691.glossary dl dt,
692.variablelist dl dt,
693.variablelist dl dt span.term {
694 color: #044;
695}
696
697div.figure,
698div.table,
699div.example,
700div.informalfigure,
701div.informaltable,
702div.informalexample {
703 border-color: #aaa;
704}
705
706pre.programlisting {
707 color: black;
708 background-color: #fff;
709 border-color: #aaa;
710 border-width: 2px;
711}
712
713.guimenu,
714.guilabel,
715.guimenuitem {
716 background-color: #eee;
717}
718
719
720b.keycap,
721.keycap {
722 background-color: #eee;
723 border-color: #999;
724}
725
726
727div.navheader {
728 border-color: black;
729}
730
731
732div.navfooter {
733 border-color: black;
734}
735
736
737 /*********** /
738 / graphics /
739/ ***********/
740
741/*
742body {
743 background-image: url("images/body_bg.jpg");
744 background-attachment: fixed;
745}
746
747.navheader,
748.note,
749.tip {
750 background-image: url("images/note_bg.jpg");
751 background-attachment: fixed;
752}
753
754.warning,
755.caution {
756 background-image: url("images/warning_bg.jpg");
757 background-attachment: fixed;
758}
759
760.figure,
761.informalfigure,
762.example,
763.informalexample,
764.table,
765.informaltable {
766 background-image: url("images/figure_bg.jpg");
767 background-attachment: fixed;
768}
769
770*/
771h1,
772h2,
773h3,
774h4,
775h5,
776h6,
777h7{
778}
779
780/*
781Example of how to stick an image as part of the title.
782
783div.article .titlepage .title
784{
785 background-image: url("figures/white-on-black.png");
786 background-position: center;
787 background-repeat: repeat-x;
788}
789*/
790
791div.preface .titlepage .title,
792div.colophon .title,
793div.chapter .titlepage .title,
794div.article .titlepage .title
795{
796}
797
798div.section div.section .titlepage .title,
799div.sect2 .titlepage .title {
800 background: none;
801}
802
803
804h1.title {
805 background-color: transparent;
806 background-repeat: no-repeat;
807 height: 256px;
808 text-indent: -9000px;
809 overflow:hidden;
810}
811
812h2.subtitle {
813 background-color: transparent;
814 text-indent: -9000px;
815 overflow:hidden;
816 width: 0px;
817 display: none;
818}
819
820 /*************************************** /
821 / pippin.gimp.org specific alterations /
822/ ***************************************/
823
824/*
825div.heading, div.navheader {
826 color: #777;
827 font-size: 80%;
828 padding: 0;
829 margin: 0;
830 text-align: left;
831 position: absolute;
832 top: 0px;
833 left: 0px;
834 width: 100%;
835 height: 50px;
836 background: url('/gfx/heading_bg.png') transparent;
837 background-repeat: repeat-x;
838 background-attachment: fixed;
839 border: none;
840}
841
842div.heading a {
843 color: #444;
844}
845
846div.footing, div.navfooter {
847 border: none;
848 color: #ddd;
849 font-size: 80%;
850 text-align:right;
851
852 width: 100%;
853 padding-top: 10px;
854 position: absolute;
855 bottom: 0px;
856 left: 0px;
857
858 background: url('/gfx/footing_bg.png') transparent;
859}
860*/
861
862
863
864 /****************** /
865 / nasty ie tweaks /
866/ ******************/
867
868/*
869div.heading, div.navheader {
870 width:expression(document.body.clientWidth + "px");
871}
872
873div.footing, div.navfooter {
874 width:expression(document.body.clientWidth + "px");
875 margin-left:expression("-5em");
876}
877body {
878 padding:expression("4em 5em 0em 5em");
879}
880*/
881
882 /**************************************** /
883 / mozilla vendor specific css extensions /
884/ ****************************************/
885/*
886div.navfooter, div.footing{
887 -moz-opacity: 0.8em;
888}
889
890div.figure,
891div.table,
892div.informalfigure,
893div.informaltable,
894div.informalexample,
895div.example,
896.tip,
897.warning,
898.caution,
899.note {
900 -moz-border-radius: 0.5em;
901}
902
903b.keycap,
904.keycap {
905 -moz-border-radius: 0.3em;
906}
907*/
908
909table tr td table tr td {
910 display: none;
911}
912
913
914hr {
915 display: none;
916}
917
918table {
919 border: 0em;
920}
921
922 .photo {
923 float: right;
924 margin-left: 1.5em;
925 margin-bottom: 1.5em;
926 margin-top: 0em;
927 max-width: 17em;
928 border: 1px solid gray;
929 padding: 3px;
930 background: white;
931}
932 .seperator {
933 padding-top: 2em;
934 clear: both;
935 }
936
937 #validators {
938 margin-top: 5em;
939 text-align: right;
940 color: #777;
941 }
942 @media print {
943 body {
944 font-size: 8pt;
945 }
946 .noprint {
947 display: none;
948 }
949 }
950
951
952.tip,
953.note {
954 background: #f0f0f2;
955 color: #333;
956 padding: 20px;
957 margin: 20px;
958}
959
960.tip h3,
961.note h3 {
962 padding: 0em;
963 margin: 0em;
964 font-size: 2em;
965 font-weight: bold;
966 color: #333;
967}
968
969.tip a,
970.note a {
971 color: #333;
972 text-decoration: underline;
973}
974
975.footnote {
976 font-size: small;
977 color: #333;
978}
979
980/* Changes the announcement text */
981.tip h3,
982.warning h3,
983.caution h3,
984.note h3 {
985 font-size:large;
986 color: #00557D;
987}
diff --git a/documentation/profile-manual/profile-manual-usage.xml b/documentation/profile-manual/profile-manual-usage.xml
deleted file mode 100644
index 3a7148cbd3..0000000000
--- a/documentation/profile-manual/profile-manual-usage.xml
+++ /dev/null
@@ -1,2986 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='profile-manual-usage'>
7
8<title>Basic Usage (with examples) for each of the Yocto Tracing Tools</title>
9
10<para>
11 This chapter presents basic usage examples for each of the tracing
12 tools.
13</para>
14
15<section id='profile-manual-perf'>
16 <title>perf</title>
17
18 <para>
19 The 'perf' tool is the profiling and tracing tool that comes
20 bundled with the Linux kernel.
21 </para>
22
23 <para>
24 Don't let the fact that it's part of the kernel fool you into thinking
25 that it's only for tracing and profiling the kernel - you can indeed
26 use it to trace and profile just the kernel, but you can also use it
27 to profile specific applications separately (with or without kernel
28 context), and you can also use it to trace and profile the kernel
29 and all applications on the system simultaneously to gain a system-wide
30 view of what's going on.
31 </para>
32
33 <para>
34 In many ways, perf aims to be a superset of all the tracing and profiling
35 tools available in Linux today, including all the other tools covered
36 in this HOWTO. The past couple of years have seen perf subsume a lot
37 of the functionality of those other tools and, at the same time, those
38 other tools have removed large portions of their previous functionality
39 and replaced it with calls to the equivalent functionality now
40 implemented by the perf subsystem. Extrapolation suggests that at
41 some point those other tools will simply become completely redundant
42 and go away; until then, we'll cover those other tools in these pages
43 and in many cases show how the same things can be accomplished in
44 perf and the other tools when it seems useful to do so.
45 </para>
46
47 <para>
48 The coverage below details some of the most common ways you'll likely
49 want to apply the tool; full documentation can be found either within
50 the tool itself or in the man pages at
51 <ulink url='http://linux.die.net/man/1/perf'>perf(1)</ulink>.
52 </para>
53
54 <section id='perf-setup'>
55 <title>Setup</title>
56
57 <para>
58 For this section, we'll assume you've already performed the basic
59 setup outlined in the General Setup section.
60 </para>
61
62 <para>
63 In particular, you'll get the most mileage out of perf if you
64 profile an image built with the following in your
65 <filename>local.conf</filename> file:
66 <literallayout class='monospaced'>
67 <ulink url='&YOCTO_DOCS_REF_URL;#var-INHIBIT_PACKAGE_STRIP'>INHIBIT_PACKAGE_STRIP</ulink> = "1"
68 </literallayout>
69 </para>
70
71 <para>
72 perf runs on the target system for the most part. You can archive
73 profile data and copy it to the host for analysis, but for the
74 rest of this document we assume you've ssh'ed to the host and
75 will be running the perf commands on the target.
76 </para>
77 </section>
78
79 <section id='perf-basic-usage'>
80 <title>Basic Usage</title>
81
82 <para>
83 The perf tool is pretty much self-documenting. To remind yourself
84 of the available commands, simply type 'perf', which will show you
85 basic usage along with the available perf subcommands:
86 <literallayout class='monospaced'>
87 root@crownbay:~# perf
88
89 usage: perf [--version] [--help] COMMAND [ARGS]
90
91 The most commonly used perf commands are:
92 annotate Read perf.data (created by perf record) and display annotated code
93 archive Create archive with object files with build-ids found in perf.data file
94 bench General framework for benchmark suites
95 buildid-cache Manage build-id cache.
96 buildid-list List the buildids in a perf.data file
97 diff Read two perf.data files and display the differential profile
98 evlist List the event names in a perf.data file
99 inject Filter to augment the events stream with additional information
100 kmem Tool to trace/measure kernel memory(slab) properties
101 kvm Tool to trace/measure kvm guest os
102 list List all symbolic event types
103 lock Analyze lock events
104 probe Define new dynamic tracepoints
105 record Run a command and record its profile into perf.data
106 report Read perf.data (created by perf record) and display the profile
107 sched Tool to trace/measure scheduler properties (latencies)
108 script Read perf.data (created by perf record) and display trace output
109 stat Run a command and gather performance counter statistics
110 test Runs sanity tests.
111 timechart Tool to visualize total system behavior during a workload
112 top System profiling tool.
113
114 See 'perf help COMMAND' for more information on a specific command.
115 </literallayout>
116 </para>
117
118 <section id='using-perf-to-do-basic-profiling'>
119 <title>Using perf to do Basic Profiling</title>
120
121 <para>
122 As a simple test case, we'll profile the 'wget' of a fairly large
123 file, which is a minimally interesting case because it has both
124 file and network I/O aspects, and at least in the case of standard
125 Yocto images, it's implemented as part of busybox, so the methods
126 we use to analyze it can be used in a very similar way to the whole
127 host of supported busybox applets in Yocto.
128 <literallayout class='monospaced'>
129 root@crownbay:~# rm linux-2.6.19.2.tar.bz2; \
130 wget <ulink url='http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2'>http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2</ulink>
131 </literallayout>
132 The quickest and easiest way to get some basic overall data about
133 what's going on for a particular workload is to profile it using
134 'perf stat'. 'perf stat' basically profiles using a few default
135 counters and displays the summed counts at the end of the run:
136 <literallayout class='monospaced'>
137 root@crownbay:~# perf stat wget <ulink url='http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2'>http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2</ulink>
138 Connecting to downloads.yoctoproject.org (140.211.169.59:80)
139 linux-2.6.19.2.tar.b 100% |***************************************************| 41727k 0:00:00 ETA
140
141 Performance counter stats for 'wget <ulink url='http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2'>http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2</ulink>':
142
143 4597.223902 task-clock # 0.077 CPUs utilized
144 23568 context-switches # 0.005 M/sec
145 68 CPU-migrations # 0.015 K/sec
146 241 page-faults # 0.052 K/sec
147 3045817293 cycles # 0.663 GHz
148 &lt;not supported&gt; stalled-cycles-frontend
149 &lt;not supported&gt; stalled-cycles-backend
150 858909167 instructions # 0.28 insns per cycle
151 165441165 branches # 35.987 M/sec
152 19550329 branch-misses # 11.82% of all branches
153
154 59.836627620 seconds time elapsed
155 </literallayout>
156 Many times such a simple-minded test doesn't yield much of
157 interest, but sometimes it does (see Real-world Yocto bug
158 (slow loop-mounted write speed)).
159 </para>
160
161 <para>
162 Also, note that 'perf stat' isn't restricted to a fixed set of
163 counters - basically any event listed in the output of 'perf list'
164 can be tallied by 'perf stat'. For example, suppose we wanted to
165 see a summary of all the events related to kernel memory
166 allocation/freeing along with cache hits and misses:
167 <literallayout class='monospaced'>
168 root@crownbay:~# perf stat -e kmem:* -e cache-references -e cache-misses wget <ulink url='http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2'>http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2</ulink>
169 Connecting to downloads.yoctoproject.org (140.211.169.59:80)
170 linux-2.6.19.2.tar.b 100% |***************************************************| 41727k 0:00:00 ETA
171
172 Performance counter stats for 'wget <ulink url='http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2'>http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2</ulink>':
173
174 5566 kmem:kmalloc
175 125517 kmem:kmem_cache_alloc
176 0 kmem:kmalloc_node
177 0 kmem:kmem_cache_alloc_node
178 34401 kmem:kfree
179 69920 kmem:kmem_cache_free
180 133 kmem:mm_page_free
181 41 kmem:mm_page_free_batched
182 11502 kmem:mm_page_alloc
183 11375 kmem:mm_page_alloc_zone_locked
184 0 kmem:mm_page_pcpu_drain
185 0 kmem:mm_page_alloc_extfrag
186 66848602 cache-references
187 2917740 cache-misses # 4.365 % of all cache refs
188
189 44.831023415 seconds time elapsed
190 </literallayout>
191 So 'perf stat' gives us a nice easy way to get a quick overview of
192 what might be happening for a set of events, but normally we'd
193 need a little more detail in order to understand what's going on
194 in a way that we can act on in a useful way.
195 </para>
196
197 <para>
198 To dive down into a next level of detail, we can use 'perf
199 record'/'perf report' which will collect profiling data and
200 present it to use using an interactive text-based UI (or
201 simply as text if we specify --stdio to 'perf report').
202 </para>
203
204 <para>
205 As our first attempt at profiling this workload, we'll simply
206 run 'perf record', handing it the workload we want to profile
207 (everything after 'perf record' and any perf options we hand
208 it - here none - will be executed in a new shell). perf collects
209 samples until the process exits and records them in a file named
210 'perf.data' in the current working directory.
211 <literallayout class='monospaced'>
212 root@crownbay:~# perf record wget <ulink url='http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2'>http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2</ulink>
213
214 Connecting to downloads.yoctoproject.org (140.211.169.59:80)
215 linux-2.6.19.2.tar.b 100% |************************************************| 41727k 0:00:00 ETA
216 [ perf record: Woken up 1 times to write data ]
217 [ perf record: Captured and wrote 0.176 MB perf.data (~7700 samples) ]
218 </literallayout>
219 To see the results in a 'text-based UI' (tui), simply run
220 'perf report', which will read the perf.data file in the current
221 working directory and display the results in an interactive UI:
222 <literallayout class='monospaced'>
223 root@crownbay:~# perf report
224 </literallayout>
225 </para>
226
227 <para>
228 <imagedata fileref="figures/perf-wget-flat-stripped.png" width="6in" depth="7in" align="center" scalefit="1" />
229 </para>
230
231 <para>
232 The above screenshot displays a 'flat' profile, one entry for
233 each 'bucket' corresponding to the functions that were profiled
234 during the profiling run, ordered from the most popular to the
235 least (perf has options to sort in various orders and keys as
236 well as display entries only above a certain threshold and so
237 on - see the perf documentation for details). Note that this
238 includes both userspace functions (entries containing a [.]) and
239 kernel functions accounted to the process (entries containing
240 a [k]). (perf has command-line modifiers that can be used to
241 restrict the profiling to kernel or userspace, among others).
242 </para>
243
244 <para>
245 Notice also that the above report shows an entry for 'busybox',
246 which is the executable that implements 'wget' in Yocto, but that
247 instead of a useful function name in that entry, it displays
248 a not-so-friendly hex value instead. The steps below will show
249 how to fix that problem.
250 </para>
251
252 <para>
253 Before we do that, however, let's try running a different profile,
254 one which shows something a little more interesting. The only
255 difference between the new profile and the previous one is that
256 we'll add the -g option, which will record not just the address
257 of a sampled function, but the entire callchain to the sampled
258 function as well:
259 <literallayout class='monospaced'>
260 root@crownbay:~# perf record -g wget <ulink url='http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2'>http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2</ulink>
261 Connecting to downloads.yoctoproject.org (140.211.169.59:80)
262 linux-2.6.19.2.tar.b 100% |************************************************| 41727k 0:00:00 ETA
263 [ perf record: Woken up 3 times to write data ]
264 [ perf record: Captured and wrote 0.652 MB perf.data (~28476 samples) ]
265
266
267 root@crownbay:~# perf report
268 </literallayout>
269 </para>
270
271 <para>
272 <imagedata fileref="figures/perf-wget-g-copy-to-user-expanded-stripped.png" width="6in" depth="7in" align="center" scalefit="1" />
273 </para>
274
275 <para>
276 Using the callgraph view, we can actually see not only which
277 functions took the most time, but we can also see a summary of
278 how those functions were called and learn something about how the
279 program interacts with the kernel in the process.
280 </para>
281
282 <para>
283 Notice that each entry in the above screenshot now contains a '+'
284 on the left-hand side. This means that we can expand the entry and
285 drill down into the callchains that feed into that entry.
286 Pressing 'enter' on any one of them will expand the callchain
287 (you can also press 'E' to expand them all at the same time or 'C'
288 to collapse them all).
289 </para>
290
291 <para>
292 In the screenshot above, we've toggled the __copy_to_user_ll()
293 entry and several subnodes all the way down. This lets us see
294 which callchains contributed to the profiled __copy_to_user_ll()
295 function which contributed 1.77% to the total profile.
296 </para>
297
298 <para>
299 As a bit of background explanation for these callchains, think
300 about what happens at a high level when you run wget to get a file
301 out on the network. Basically what happens is that the data comes
302 into the kernel via the network connection (socket) and is passed
303 to the userspace program 'wget' (which is actually a part of
304 busybox, but that's not important for now), which takes the buffers
305 the kernel passes to it and writes it to a disk file to save it.
306 </para>
307
308 <para>
309 The part of this process that we're looking at in the above call
310 stacks is the part where the kernel passes the data it's read from
311 the socket down to wget i.e. a copy-to-user.
312 </para>
313
314 <para>
315 Notice also that here there's also a case where the hex value
316 is displayed in the callstack, here in the expanded
317 sys_clock_gettime() function. Later we'll see it resolve to a
318 userspace function call in busybox.
319 </para>
320
321 <para>
322 <imagedata fileref="figures/perf-wget-g-copy-from-user-expanded-stripped.png" width="6in" depth="7in" align="center" scalefit="1" />
323 </para>
324
325 <para>
326 The above screenshot shows the other half of the journey for the
327 data - from the wget program's userspace buffers to disk. To get
328 the buffers to disk, the wget program issues a write(2), which
329 does a copy-from-user to the kernel, which then takes care via
330 some circuitous path (probably also present somewhere in the
331 profile data), to get it safely to disk.
332 </para>
333
334 <para>
335 Now that we've seen the basic layout of the profile data and the
336 basics of how to extract useful information out of it, let's get
337 back to the task at hand and see if we can get some basic idea
338 about where the time is spent in the program we're profiling,
339 wget. Remember that wget is actually implemented as an applet
340 in busybox, so while the process name is 'wget', the executable
341 we're actually interested in is busybox. So let's expand the
342 first entry containing busybox:
343 </para>
344
345 <para>
346 <imagedata fileref="figures/perf-wget-busybox-expanded-stripped.png" width="6in" depth="7in" align="center" scalefit="1" />
347 </para>
348
349 <para>
350 Again, before we expanded we saw that the function was labeled
351 with a hex value instead of a symbol as with most of the kernel
352 entries. Expanding the busybox entry doesn't make it any better.
353 </para>
354
355 <para>
356 The problem is that perf can't find the symbol information for the
357 busybox binary, which is actually stripped out by the Yocto build
358 system.
359 </para>
360
361 <para>
362 One way around that is to put the following in your
363 <filename>local.conf</filename> file when you build the image:
364 <literallayout class='monospaced'>
365 <ulink url='&YOCTO_DOCS_REF_URL;#var-INHIBIT_PACKAGE_STRIP'>INHIBIT_PACKAGE_STRIP</ulink> = "1"
366 </literallayout>
367 However, we already have an image with the binaries stripped,
368 so what can we do to get perf to resolve the symbols? Basically
369 we need to install the debuginfo for the busybox package.
370 </para>
371
372 <para>
373 To generate the debug info for the packages in the image, we can
374 add dbg-pkgs to EXTRA_IMAGE_FEATURES in local.conf. For example:
375 <literallayout class='monospaced'>
376 EXTRA_IMAGE_FEATURES = "debug-tweaks tools-profile dbg-pkgs"
377 </literallayout>
378 Additionally, in order to generate the type of debuginfo that
379 perf understands, we also need to set
380 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_DEBUG_SPLIT_STYLE'><filename>PACKAGE_DEBUG_SPLIT_STYLE</filename></ulink>
381 in the <filename>local.conf</filename> file:
382 <literallayout class='monospaced'>
383 PACKAGE_DEBUG_SPLIT_STYLE = 'debug-file-directory'
384 </literallayout>
385 Once we've done that, we can install the debuginfo for busybox.
386 The debug packages once built can be found in
387 build/tmp/deploy/rpm/* on the host system. Find the
388 busybox-dbg-...rpm file and copy it to the target. For example:
389 <literallayout class='monospaced'>
390 [trz@empanada core2]$ scp /home/trz/yocto/crownbay-tracing-dbg/build/tmp/deploy/rpm/core2_32/busybox-dbg-1.20.2-r2.core2_32.rpm root@192.168.1.31:
391 root@192.168.1.31's password:
392 busybox-dbg-1.20.2-r2.core2_32.rpm 100% 1826KB 1.8MB/s 00:01
393 </literallayout>
394 Now install the debug rpm on the target:
395 <literallayout class='monospaced'>
396 root@crownbay:~# rpm -i busybox-dbg-1.20.2-r2.core2_32.rpm
397 </literallayout>
398 Now that the debuginfo is installed, we see that the busybox
399 entries now display their functions symbolically:
400 </para>
401
402 <para>
403 <imagedata fileref="figures/perf-wget-busybox-debuginfo.png" width="6in" depth="7in" align="center" scalefit="1" />
404 </para>
405
406 <para>
407 If we expand one of the entries and press 'enter' on a leaf node,
408 we're presented with a menu of actions we can take to get more
409 information related to that entry:
410 </para>
411
412 <para>
413 <imagedata fileref="figures/perf-wget-busybox-dso-zoom-menu.png" width="6in" depth="2in" align="center" scalefit="1" />
414 </para>
415
416 <para>
417 One of these actions allows us to show a view that displays a
418 busybox-centric view of the profiled functions (in this case we've
419 also expanded all the nodes using the 'E' key):
420 </para>
421
422 <para>
423 <imagedata fileref="figures/perf-wget-busybox-dso-zoom.png" width="6in" depth="7in" align="center" scalefit="1" />
424 </para>
425
426 <para>
427 Finally, we can see that now that the busybox debuginfo is
428 installed, the previously unresolved symbol in the
429 sys_clock_gettime() entry mentioned previously is now resolved,
430 and shows that the sys_clock_gettime system call that was the
431 source of 6.75% of the copy-to-user overhead was initiated by
432 the handle_input() busybox function:
433 </para>
434
435 <para>
436 <imagedata fileref="figures/perf-wget-g-copy-to-user-expanded-debuginfo.png" width="6in" depth="7in" align="center" scalefit="1" />
437 </para>
438
439 <para>
440 At the lowest level of detail, we can dive down to the assembly
441 level and see which instructions caused the most overhead in a
442 function. Pressing 'enter' on the 'udhcpc_main' function, we're
443 again presented with a menu:
444 </para>
445
446 <para>
447 <imagedata fileref="figures/perf-wget-busybox-annotate-menu.png" width="6in" depth="2in" align="center" scalefit="1" />
448 </para>
449
450 <para>
451 Selecting 'Annotate udhcpc_main', we get a detailed listing of
452 percentages by instruction for the udhcpc_main function. From the
453 display, we can see that over 50% of the time spent in this
454 function is taken up by a couple tests and the move of a
455 constant (1) to a register:
456 </para>
457
458 <para>
459 <imagedata fileref="figures/perf-wget-busybox-annotate-udhcpc.png" width="6in" depth="7in" align="center" scalefit="1" />
460 </para>
461
462 <para>
463 As a segue into tracing, let's try another profile using a
464 different counter, something other than the default 'cycles'.
465 </para>
466
467 <para>
468 The tracing and profiling infrastructure in Linux has become
469 unified in a way that allows us to use the same tool with a
470 completely different set of counters, not just the standard
471 hardware counters that traditional tools have had to restrict
472 themselves to (of course the traditional tools can also make use
473 of the expanded possibilities now available to them, and in some
474 cases have, as mentioned previously).
475 </para>
476
477 <para>
478 We can get a list of the available events that can be used to
479 profile a workload via 'perf list':
480 <literallayout class='monospaced'>
481 root@crownbay:~# perf list
482
483 List of pre-defined events (to be used in -e):
484 cpu-cycles OR cycles [Hardware event]
485 stalled-cycles-frontend OR idle-cycles-frontend [Hardware event]
486 stalled-cycles-backend OR idle-cycles-backend [Hardware event]
487 instructions [Hardware event]
488 cache-references [Hardware event]
489 cache-misses [Hardware event]
490 branch-instructions OR branches [Hardware event]
491 branch-misses [Hardware event]
492 bus-cycles [Hardware event]
493 ref-cycles [Hardware event]
494
495 cpu-clock [Software event]
496 task-clock [Software event]
497 page-faults OR faults [Software event]
498 minor-faults [Software event]
499 major-faults [Software event]
500 context-switches OR cs [Software event]
501 cpu-migrations OR migrations [Software event]
502 alignment-faults [Software event]
503 emulation-faults [Software event]
504
505 L1-dcache-loads [Hardware cache event]
506 L1-dcache-load-misses [Hardware cache event]
507 L1-dcache-prefetch-misses [Hardware cache event]
508 L1-icache-loads [Hardware cache event]
509 L1-icache-load-misses [Hardware cache event]
510 .
511 .
512 .
513 rNNN [Raw hardware event descriptor]
514 cpu/t1=v1[,t2=v2,t3 ...]/modifier [Raw hardware event descriptor]
515 (see 'perf list --help' on how to encode it)
516
517 mem:&lt;addr&gt;[:access] [Hardware breakpoint]
518
519 sunrpc:rpc_call_status [Tracepoint event]
520 sunrpc:rpc_bind_status [Tracepoint event]
521 sunrpc:rpc_connect_status [Tracepoint event]
522 sunrpc:rpc_task_begin [Tracepoint event]
523 skb:kfree_skb [Tracepoint event]
524 skb:consume_skb [Tracepoint event]
525 skb:skb_copy_datagram_iovec [Tracepoint event]
526 net:net_dev_xmit [Tracepoint event]
527 net:net_dev_queue [Tracepoint event]
528 net:netif_receive_skb [Tracepoint event]
529 net:netif_rx [Tracepoint event]
530 napi:napi_poll [Tracepoint event]
531 sock:sock_rcvqueue_full [Tracepoint event]
532 sock:sock_exceed_buf_limit [Tracepoint event]
533 udp:udp_fail_queue_rcv_skb [Tracepoint event]
534 hda:hda_send_cmd [Tracepoint event]
535 hda:hda_get_response [Tracepoint event]
536 hda:hda_bus_reset [Tracepoint event]
537 scsi:scsi_dispatch_cmd_start [Tracepoint event]
538 scsi:scsi_dispatch_cmd_error [Tracepoint event]
539 scsi:scsi_eh_wakeup [Tracepoint event]
540 drm:drm_vblank_event [Tracepoint event]
541 drm:drm_vblank_event_queued [Tracepoint event]
542 drm:drm_vblank_event_delivered [Tracepoint event]
543 random:mix_pool_bytes [Tracepoint event]
544 random:mix_pool_bytes_nolock [Tracepoint event]
545 random:credit_entropy_bits [Tracepoint event]
546 gpio:gpio_direction [Tracepoint event]
547 gpio:gpio_value [Tracepoint event]
548 block:block_rq_abort [Tracepoint event]
549 block:block_rq_requeue [Tracepoint event]
550 block:block_rq_issue [Tracepoint event]
551 block:block_bio_bounce [Tracepoint event]
552 block:block_bio_complete [Tracepoint event]
553 block:block_bio_backmerge [Tracepoint event]
554 .
555 .
556 writeback:writeback_wake_thread [Tracepoint event]
557 writeback:writeback_wake_forker_thread [Tracepoint event]
558 writeback:writeback_bdi_register [Tracepoint event]
559 .
560 .
561 writeback:writeback_single_inode_requeue [Tracepoint event]
562 writeback:writeback_single_inode [Tracepoint event]
563 kmem:kmalloc [Tracepoint event]
564 kmem:kmem_cache_alloc [Tracepoint event]
565 kmem:mm_page_alloc [Tracepoint event]
566 kmem:mm_page_alloc_zone_locked [Tracepoint event]
567 kmem:mm_page_pcpu_drain [Tracepoint event]
568 kmem:mm_page_alloc_extfrag [Tracepoint event]
569 vmscan:mm_vmscan_kswapd_sleep [Tracepoint event]
570 vmscan:mm_vmscan_kswapd_wake [Tracepoint event]
571 vmscan:mm_vmscan_wakeup_kswapd [Tracepoint event]
572 vmscan:mm_vmscan_direct_reclaim_begin [Tracepoint event]
573 .
574 .
575 module:module_get [Tracepoint event]
576 module:module_put [Tracepoint event]
577 module:module_request [Tracepoint event]
578 sched:sched_kthread_stop [Tracepoint event]
579 sched:sched_wakeup [Tracepoint event]
580 sched:sched_wakeup_new [Tracepoint event]
581 sched:sched_process_fork [Tracepoint event]
582 sched:sched_process_exec [Tracepoint event]
583 sched:sched_stat_runtime [Tracepoint event]
584 rcu:rcu_utilization [Tracepoint event]
585 workqueue:workqueue_queue_work [Tracepoint event]
586 workqueue:workqueue_execute_end [Tracepoint event]
587 signal:signal_generate [Tracepoint event]
588 signal:signal_deliver [Tracepoint event]
589 timer:timer_init [Tracepoint event]
590 timer:timer_start [Tracepoint event]
591 timer:hrtimer_cancel [Tracepoint event]
592 timer:itimer_state [Tracepoint event]
593 timer:itimer_expire [Tracepoint event]
594 irq:irq_handler_entry [Tracepoint event]
595 irq:irq_handler_exit [Tracepoint event]
596 irq:softirq_entry [Tracepoint event]
597 irq:softirq_exit [Tracepoint event]
598 irq:softirq_raise [Tracepoint event]
599 printk:console [Tracepoint event]
600 task:task_newtask [Tracepoint event]
601 task:task_rename [Tracepoint event]
602 syscalls:sys_enter_socketcall [Tracepoint event]
603 syscalls:sys_exit_socketcall [Tracepoint event]
604 .
605 .
606 .
607 syscalls:sys_enter_unshare [Tracepoint event]
608 syscalls:sys_exit_unshare [Tracepoint event]
609 raw_syscalls:sys_enter [Tracepoint event]
610 raw_syscalls:sys_exit [Tracepoint event]
611 </literallayout>
612 </para>
613
614 <informalexample>
615 <emphasis>Tying it Together:</emphasis> These are exactly the same set of events defined
616 by the trace event subsystem and exposed by
617 ftrace/tracecmd/kernelshark as files in
618 /sys/kernel/debug/tracing/events, by SystemTap as
619 kernel.trace("tracepoint_name") and (partially) accessed by LTTng.
620 </informalexample>
621
622 <para>
623 Only a subset of these would be of interest to us when looking at
624 this workload, so let's choose the most likely subsystems
625 (identified by the string before the colon in the Tracepoint events)
626 and do a 'perf stat' run using only those wildcarded subsystems:
627 <literallayout class='monospaced'>
628 root@crownbay:~# perf stat -e skb:* -e net:* -e napi:* -e sched:* -e workqueue:* -e irq:* -e syscalls:* wget <ulink url='http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2'>http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2</ulink>
629 Performance counter stats for 'wget <ulink url='http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2'>http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2</ulink>':
630
631 23323 skb:kfree_skb
632 0 skb:consume_skb
633 49897 skb:skb_copy_datagram_iovec
634 6217 net:net_dev_xmit
635 6217 net:net_dev_queue
636 7962 net:netif_receive_skb
637 2 net:netif_rx
638 8340 napi:napi_poll
639 0 sched:sched_kthread_stop
640 0 sched:sched_kthread_stop_ret
641 3749 sched:sched_wakeup
642 0 sched:sched_wakeup_new
643 0 sched:sched_switch
644 29 sched:sched_migrate_task
645 0 sched:sched_process_free
646 1 sched:sched_process_exit
647 0 sched:sched_wait_task
648 0 sched:sched_process_wait
649 0 sched:sched_process_fork
650 1 sched:sched_process_exec
651 0 sched:sched_stat_wait
652 2106519415641 sched:sched_stat_sleep
653 0 sched:sched_stat_iowait
654 147453613 sched:sched_stat_blocked
655 12903026955 sched:sched_stat_runtime
656 0 sched:sched_pi_setprio
657 3574 workqueue:workqueue_queue_work
658 3574 workqueue:workqueue_activate_work
659 0 workqueue:workqueue_execute_start
660 0 workqueue:workqueue_execute_end
661 16631 irq:irq_handler_entry
662 16631 irq:irq_handler_exit
663 28521 irq:softirq_entry
664 28521 irq:softirq_exit
665 28728 irq:softirq_raise
666 1 syscalls:sys_enter_sendmmsg
667 1 syscalls:sys_exit_sendmmsg
668 0 syscalls:sys_enter_recvmmsg
669 0 syscalls:sys_exit_recvmmsg
670 14 syscalls:sys_enter_socketcall
671 14 syscalls:sys_exit_socketcall
672 .
673 .
674 .
675 16965 syscalls:sys_enter_read
676 16965 syscalls:sys_exit_read
677 12854 syscalls:sys_enter_write
678 12854 syscalls:sys_exit_write
679 .
680 .
681 .
682
683 58.029710972 seconds time elapsed
684 </literallayout>
685 Let's pick one of these tracepoints and tell perf to do a profile
686 using it as the sampling event:
687 <literallayout class='monospaced'>
688 root@crownbay:~# perf record -g -e sched:sched_wakeup wget <ulink url='http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2'>http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2</ulink>
689 </literallayout>
690 </para>
691
692 <para>
693 <imagedata fileref="figures/sched-wakeup-profile.png" width="6in" depth="7in" align="center" scalefit="1" />
694 </para>
695
696 <para>
697 The screenshot above shows the results of running a profile using
698 sched:sched_switch tracepoint, which shows the relative costs of
699 various paths to sched_wakeup (note that sched_wakeup is the
700 name of the tracepoint - it's actually defined just inside
701 ttwu_do_wakeup(), which accounts for the function name actually
702 displayed in the profile:
703 <literallayout class='monospaced'>
704 /*
705 * Mark the task runnable and perform wakeup-preemption.
706 */
707 static void
708 ttwu_do_wakeup(struct rq *rq, struct task_struct *p, int wake_flags)
709 {
710 trace_sched_wakeup(p, true);
711 .
712 .
713 .
714 }
715 </literallayout>
716 A couple of the more interesting callchains are expanded and
717 displayed above, basically some network receive paths that
718 presumably end up waking up wget (busybox) when network data is
719 ready.
720 </para>
721
722 <para>
723 Note that because tracepoints are normally used for tracing,
724 the default sampling period for tracepoints is 1 i.e. for
725 tracepoints perf will sample on every event occurrence (this
726 can be changed using the -c option). This is in contrast to
727 hardware counters such as for example the default 'cycles'
728 hardware counter used for normal profiling, where sampling
729 periods are much higher (in the thousands) because profiling should
730 have as low an overhead as possible and sampling on every cycle
731 would be prohibitively expensive.
732 </para>
733 </section>
734
735 <section id='using-perf-to-do-basic-tracing'>
736 <title>Using perf to do Basic Tracing</title>
737
738 <para>
739 Profiling is a great tool for solving many problems or for
740 getting a high-level view of what's going on with a workload or
741 across the system. It is however by definition an approximation,
742 as suggested by the most prominent word associated with it,
743 'sampling'. On the one hand, it allows a representative picture of
744 what's going on in the system to be cheaply taken, but on the other
745 hand, that cheapness limits its utility when that data suggests a
746 need to 'dive down' more deeply to discover what's really going
747 on. In such cases, the only way to see what's really going on is
748 to be able to look at (or summarize more intelligently) the
749 individual steps that go into the higher-level behavior exposed
750 by the coarse-grained profiling data.
751 </para>
752
753 <para>
754 As a concrete example, we can trace all the events we think might
755 be applicable to our workload:
756 <literallayout class='monospaced'>
757 root@crownbay:~# perf record -g -e skb:* -e net:* -e napi:* -e sched:sched_switch -e sched:sched_wakeup -e irq:*
758 -e syscalls:sys_enter_read -e syscalls:sys_exit_read -e syscalls:sys_enter_write -e syscalls:sys_exit_write
759 wget <ulink url='http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2'>http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2</ulink>
760 </literallayout>
761 We can look at the raw trace output using 'perf script' with no
762 arguments:
763 <literallayout class='monospaced'>
764 root@crownbay:~# perf script
765
766 perf 1262 [000] 11624.857082: sys_exit_read: 0x0
767 perf 1262 [000] 11624.857193: sched_wakeup: comm=migration/0 pid=6 prio=0 success=1 target_cpu=000
768 wget 1262 [001] 11624.858021: softirq_raise: vec=1 [action=TIMER]
769 wget 1262 [001] 11624.858074: softirq_entry: vec=1 [action=TIMER]
770 wget 1262 [001] 11624.858081: softirq_exit: vec=1 [action=TIMER]
771 wget 1262 [001] 11624.858166: sys_enter_read: fd: 0x0003, buf: 0xbf82c940, count: 0x0200
772 wget 1262 [001] 11624.858177: sys_exit_read: 0x200
773 wget 1262 [001] 11624.858878: kfree_skb: skbaddr=0xeb248d80 protocol=0 location=0xc15a5308
774 wget 1262 [001] 11624.858945: kfree_skb: skbaddr=0xeb248000 protocol=0 location=0xc15a5308
775 wget 1262 [001] 11624.859020: softirq_raise: vec=1 [action=TIMER]
776 wget 1262 [001] 11624.859076: softirq_entry: vec=1 [action=TIMER]
777 wget 1262 [001] 11624.859083: softirq_exit: vec=1 [action=TIMER]
778 wget 1262 [001] 11624.859167: sys_enter_read: fd: 0x0003, buf: 0xb7720000, count: 0x0400
779 wget 1262 [001] 11624.859192: sys_exit_read: 0x1d7
780 wget 1262 [001] 11624.859228: sys_enter_read: fd: 0x0003, buf: 0xb7720000, count: 0x0400
781 wget 1262 [001] 11624.859233: sys_exit_read: 0x0
782 wget 1262 [001] 11624.859573: sys_enter_read: fd: 0x0003, buf: 0xbf82c580, count: 0x0200
783 wget 1262 [001] 11624.859584: sys_exit_read: 0x200
784 wget 1262 [001] 11624.859864: sys_enter_read: fd: 0x0003, buf: 0xb7720000, count: 0x0400
785 wget 1262 [001] 11624.859888: sys_exit_read: 0x400
786 wget 1262 [001] 11624.859935: sys_enter_read: fd: 0x0003, buf: 0xb7720000, count: 0x0400
787 wget 1262 [001] 11624.859944: sys_exit_read: 0x400
788 </literallayout>
789 This gives us a detailed timestamped sequence of events that
790 occurred within the workload with respect to those events.
791 </para>
792
793 <para>
794 In many ways, profiling can be viewed as a subset of tracing -
795 theoretically, if you have a set of trace events that's sufficient
796 to capture all the important aspects of a workload, you can derive
797 any of the results or views that a profiling run can.
798 </para>
799
800 <para>
801 Another aspect of traditional profiling is that while powerful in
802 many ways, it's limited by the granularity of the underlying data.
803 Profiling tools offer various ways of sorting and presenting the
804 sample data, which make it much more useful and amenable to user
805 experimentation, but in the end it can't be used in an open-ended
806 way to extract data that just isn't present as a consequence of
807 the fact that conceptually, most of it has been thrown away.
808 </para>
809
810 <para>
811 Full-blown detailed tracing data does however offer the opportunity
812 to manipulate and present the information collected during a
813 tracing run in an infinite variety of ways.
814 </para>
815
816 <para>
817 Another way to look at it is that there are only so many ways that
818 the 'primitive' counters can be used on their own to generate
819 interesting output; to get anything more complicated than simple
820 counts requires some amount of additional logic, which is typically
821 very specific to the problem at hand. For example, if we wanted to
822 make use of a 'counter' that maps to the value of the time
823 difference between when a process was scheduled to run on a
824 processor and the time it actually ran, we wouldn't expect such
825 a counter to exist on its own, but we could derive one called say
826 'wakeup_latency' and use it to extract a useful view of that metric
827 from trace data. Likewise, we really can't figure out from standard
828 profiling tools how much data every process on the system reads and
829 writes, along with how many of those reads and writes fail
830 completely. If we have sufficient trace data, however, we could
831 with the right tools easily extract and present that information,
832 but we'd need something other than pre-canned profiling tools to
833 do that.
834 </para>
835
836 <para>
837 Luckily, there is a general-purpose way to handle such needs,
838 called 'programming languages'. Making programming languages
839 easily available to apply to such problems given the specific
840 format of data is called a 'programming language binding' for
841 that data and language. Perf supports two programming language
842 bindings, one for Python and one for Perl.
843 </para>
844
845 <informalexample>
846 <emphasis>Tying it Together:</emphasis> Language bindings for manipulating and
847 aggregating trace data are of course not a new
848 idea. One of the first projects to do this was IBM's DProbes
849 dpcc compiler, an ANSI C compiler which targeted a low-level
850 assembly language running on an in-kernel interpreter on the
851 target system. This is exactly analogous to what Sun's DTrace
852 did, except that DTrace invented its own language for the purpose.
853 Systemtap, heavily inspired by DTrace, also created its own
854 one-off language, but rather than running the product on an
855 in-kernel interpreter, created an elaborate compiler-based
856 machinery to translate its language into kernel modules written
857 in C.
858 </informalexample>
859
860 <para>
861 Now that we have the trace data in perf.data, we can use
862 'perf script -g' to generate a skeleton script with handlers
863 for the read/write entry/exit events we recorded:
864 <literallayout class='monospaced'>
865 root@crownbay:~# perf script -g python
866 generated Python script: perf-script.py
867 </literallayout>
868 The skeleton script simply creates a python function for each
869 event type in the perf.data file. The body of each function simply
870 prints the event name along with its parameters. For example:
871 <literallayout class='monospaced'>
872 def net__netif_rx(event_name, context, common_cpu,
873 common_secs, common_nsecs, common_pid, common_comm,
874 skbaddr, len, name):
875 print_header(event_name, common_cpu, common_secs, common_nsecs,
876 common_pid, common_comm)
877
878 print "skbaddr=%u, len=%u, name=%s\n" % (skbaddr, len, name),
879 </literallayout>
880 We can run that script directly to print all of the events
881 contained in the perf.data file:
882 <literallayout class='monospaced'>
883 root@crownbay:~# perf script -s perf-script.py
884
885 in trace_begin
886 syscalls__sys_exit_read 0 11624.857082795 1262 perf nr=3, ret=0
887 sched__sched_wakeup 0 11624.857193498 1262 perf comm=migration/0, pid=6, prio=0, success=1, target_cpu=0
888 irq__softirq_raise 1 11624.858021635 1262 wget vec=TIMER
889 irq__softirq_entry 1 11624.858074075 1262 wget vec=TIMER
890 irq__softirq_exit 1 11624.858081389 1262 wget vec=TIMER
891 syscalls__sys_enter_read 1 11624.858166434 1262 wget nr=3, fd=3, buf=3213019456, count=512
892 syscalls__sys_exit_read 1 11624.858177924 1262 wget nr=3, ret=512
893 skb__kfree_skb 1 11624.858878188 1262 wget skbaddr=3945041280, location=3243922184, protocol=0
894 skb__kfree_skb 1 11624.858945608 1262 wget skbaddr=3945037824, location=3243922184, protocol=0
895 irq__softirq_raise 1 11624.859020942 1262 wget vec=TIMER
896 irq__softirq_entry 1 11624.859076935 1262 wget vec=TIMER
897 irq__softirq_exit 1 11624.859083469 1262 wget vec=TIMER
898 syscalls__sys_enter_read 1 11624.859167565 1262 wget nr=3, fd=3, buf=3077701632, count=1024
899 syscalls__sys_exit_read 1 11624.859192533 1262 wget nr=3, ret=471
900 syscalls__sys_enter_read 1 11624.859228072 1262 wget nr=3, fd=3, buf=3077701632, count=1024
901 syscalls__sys_exit_read 1 11624.859233707 1262 wget nr=3, ret=0
902 syscalls__sys_enter_read 1 11624.859573008 1262 wget nr=3, fd=3, buf=3213018496, count=512
903 syscalls__sys_exit_read 1 11624.859584818 1262 wget nr=3, ret=512
904 syscalls__sys_enter_read 1 11624.859864562 1262 wget nr=3, fd=3, buf=3077701632, count=1024
905 syscalls__sys_exit_read 1 11624.859888770 1262 wget nr=3, ret=1024
906 syscalls__sys_enter_read 1 11624.859935140 1262 wget nr=3, fd=3, buf=3077701632, count=1024
907 syscalls__sys_exit_read 1 11624.859944032 1262 wget nr=3, ret=1024
908 </literallayout>
909 That in itself isn't very useful; after all, we can accomplish
910 pretty much the same thing by simply running 'perf script'
911 without arguments in the same directory as the perf.data file.
912 </para>
913
914 <para>
915 We can however replace the print statements in the generated
916 function bodies with whatever we want, and thereby make it
917 infinitely more useful.
918 </para>
919
920 <para>
921 As a simple example, let's just replace the print statements in
922 the function bodies with a simple function that does nothing but
923 increment a per-event count. When the program is run against a
924 perf.data file, each time a particular event is encountered,
925 a tally is incremented for that event. For example:
926 <literallayout class='monospaced'>
927 def net__netif_rx(event_name, context, common_cpu,
928 common_secs, common_nsecs, common_pid, common_comm,
929 skbaddr, len, name):
930 inc_counts(event_name)
931 </literallayout>
932 Each event handler function in the generated code is modified
933 to do this. For convenience, we define a common function called
934 inc_counts() that each handler calls; inc_counts() simply tallies
935 a count for each event using the 'counts' hash, which is a
936 specialized hash function that does Perl-like autovivification, a
937 capability that's extremely useful for kinds of multi-level
938 aggregation commonly used in processing traces (see perf's
939 documentation on the Python language binding for details):
940 <literallayout class='monospaced'>
941 counts = autodict()
942
943 def inc_counts(event_name):
944 try:
945 counts[event_name] += 1
946 except TypeError:
947 counts[event_name] = 1
948 </literallayout>
949 Finally, at the end of the trace processing run, we want to
950 print the result of all the per-event tallies. For that, we
951 use the special 'trace_end()' function:
952 <literallayout class='monospaced'>
953 def trace_end():
954 for event_name, count in counts.iteritems():
955 print "%-40s %10s\n" % (event_name, count)
956 </literallayout>
957 The end result is a summary of all the events recorded in the
958 trace:
959 <literallayout class='monospaced'>
960 skb__skb_copy_datagram_iovec 13148
961 irq__softirq_entry 4796
962 irq__irq_handler_exit 3805
963 irq__softirq_exit 4795
964 syscalls__sys_enter_write 8990
965 net__net_dev_xmit 652
966 skb__kfree_skb 4047
967 sched__sched_wakeup 1155
968 irq__irq_handler_entry 3804
969 irq__softirq_raise 4799
970 net__net_dev_queue 652
971 syscalls__sys_enter_read 17599
972 net__netif_receive_skb 1743
973 syscalls__sys_exit_read 17598
974 net__netif_rx 2
975 napi__napi_poll 1877
976 syscalls__sys_exit_write 8990
977 </literallayout>
978 Note that this is pretty much exactly the same information we get
979 from 'perf stat', which goes a little way to support the idea
980 mentioned previously that given the right kind of trace data,
981 higher-level profiling-type summaries can be derived from it.
982 </para>
983
984 <para>
985 Documentation on using the
986 <ulink url='http://linux.die.net/man/1/perf-script-python'>'perf script' python binding</ulink>.
987 </para>
988 </section>
989
990 <section id='system-wide-tracing-and-profiling'>
991 <title>System-Wide Tracing and Profiling</title>
992
993 <para>
994 The examples so far have focused on tracing a particular program or
995 workload - in other words, every profiling run has specified the
996 program to profile in the command-line e.g. 'perf record wget ...'.
997 </para>
998
999 <para>
1000 It's also possible, and more interesting in many cases, to run a
1001 system-wide profile or trace while running the workload in a
1002 separate shell.
1003 </para>
1004
1005 <para>
1006 To do system-wide profiling or tracing, you typically use
1007 the -a flag to 'perf record'.
1008 </para>
1009
1010 <para>
1011 To demonstrate this, open up one window and start the profile
1012 using the -a flag (press Ctrl-C to stop tracing):
1013 <literallayout class='monospaced'>
1014 root@crownbay:~# perf record -g -a
1015 ^C[ perf record: Woken up 6 times to write data ]
1016 [ perf record: Captured and wrote 1.400 MB perf.data (~61172 samples) ]
1017 </literallayout>
1018 In another window, run the wget test:
1019 <literallayout class='monospaced'>
1020 root@crownbay:~# wget <ulink url='http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2'>http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2</ulink>
1021 Connecting to downloads.yoctoproject.org (140.211.169.59:80)
1022 linux-2.6.19.2.tar.b 100% |*******************************| 41727k 0:00:00 ETA
1023 </literallayout>
1024 Here we see entries not only for our wget load, but for other
1025 processes running on the system as well:
1026 </para>
1027
1028 <para>
1029 <imagedata fileref="figures/perf-systemwide.png" width="6in" depth="7in" align="center" scalefit="1" />
1030 </para>
1031
1032 <para>
1033 In the snapshot above, we can see callchains that originate in
1034 libc, and a callchain from Xorg that demonstrates that we're
1035 using a proprietary X driver in userspace (notice the presence
1036 of 'PVR' and some other unresolvable symbols in the expanded
1037 Xorg callchain).
1038 </para>
1039
1040 <para>
1041 Note also that we have both kernel and userspace entries in the
1042 above snapshot. We can also tell perf to focus on userspace but
1043 providing a modifier, in this case 'u', to the 'cycles' hardware
1044 counter when we record a profile:
1045 <literallayout class='monospaced'>
1046 root@crownbay:~# perf record -g -a -e cycles:u
1047 ^C[ perf record: Woken up 2 times to write data ]
1048 [ perf record: Captured and wrote 0.376 MB perf.data (~16443 samples) ]
1049 </literallayout>
1050 </para>
1051
1052 <para>
1053 <imagedata fileref="figures/perf-report-cycles-u.png" width="6in" depth="7in" align="center" scalefit="1" />
1054 </para>
1055
1056 <para>
1057 Notice in the screenshot above, we see only userspace entries ([.])
1058 </para>
1059
1060 <para>
1061 Finally, we can press 'enter' on a leaf node and select the 'Zoom
1062 into DSO' menu item to show only entries associated with a
1063 specific DSO. In the screenshot below, we've zoomed into the
1064 'libc' DSO which shows all the entries associated with the
1065 libc-xxx.so DSO.
1066 </para>
1067
1068 <para>
1069 <imagedata fileref="figures/perf-systemwide-libc.png" width="6in" depth="7in" align="center" scalefit="1" />
1070 </para>
1071
1072 <para>
1073 We can also use the system-wide -a switch to do system-wide
1074 tracing. Here we'll trace a couple of scheduler events:
1075 <literallayout class='monospaced'>
1076 root@crownbay:~# perf record -a -e sched:sched_switch -e sched:sched_wakeup
1077 ^C[ perf record: Woken up 38 times to write data ]
1078 [ perf record: Captured and wrote 9.780 MB perf.data (~427299 samples) ]
1079 </literallayout>
1080 We can look at the raw output using 'perf script' with no
1081 arguments:
1082 <literallayout class='monospaced'>
1083 root@crownbay:~# perf script
1084
1085 perf 1383 [001] 6171.460045: sched_wakeup: comm=kworker/1:1 pid=21 prio=120 success=1 target_cpu=001
1086 perf 1383 [001] 6171.460066: sched_switch: prev_comm=perf prev_pid=1383 prev_prio=120 prev_state=R+ ==> next_comm=kworker/1:1 next_pid=21 next_prio=120
1087 kworker/1:1 21 [001] 6171.460093: sched_switch: prev_comm=kworker/1:1 prev_pid=21 prev_prio=120 prev_state=S ==> next_comm=perf next_pid=1383 next_prio=120
1088 swapper 0 [000] 6171.468063: sched_wakeup: comm=kworker/0:3 pid=1209 prio=120 success=1 target_cpu=000
1089 swapper 0 [000] 6171.468107: sched_switch: prev_comm=swapper/0 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=kworker/0:3 next_pid=1209 next_prio=120
1090 kworker/0:3 1209 [000] 6171.468143: sched_switch: prev_comm=kworker/0:3 prev_pid=1209 prev_prio=120 prev_state=S ==> next_comm=swapper/0 next_pid=0 next_prio=120
1091 perf 1383 [001] 6171.470039: sched_wakeup: comm=kworker/1:1 pid=21 prio=120 success=1 target_cpu=001
1092 perf 1383 [001] 6171.470058: sched_switch: prev_comm=perf prev_pid=1383 prev_prio=120 prev_state=R+ ==> next_comm=kworker/1:1 next_pid=21 next_prio=120
1093 kworker/1:1 21 [001] 6171.470082: sched_switch: prev_comm=kworker/1:1 prev_pid=21 prev_prio=120 prev_state=S ==> next_comm=perf next_pid=1383 next_prio=120
1094 perf 1383 [001] 6171.480035: sched_wakeup: comm=kworker/1:1 pid=21 prio=120 success=1 target_cpu=001
1095 </literallayout>
1096 </para>
1097
1098 <section id='perf-filtering'>
1099 <title>Filtering</title>
1100
1101 <para>
1102 Notice that there are a lot of events that don't really have
1103 anything to do with what we're interested in, namely events
1104 that schedule 'perf' itself in and out or that wake perf up.
1105 We can get rid of those by using the '--filter' option -
1106 for each event we specify using -e, we can add a --filter
1107 after that to filter out trace events that contain fields
1108 with specific values:
1109 <literallayout class='monospaced'>
1110 root@crownbay:~# perf record -a -e sched:sched_switch --filter 'next_comm != perf &amp;&amp; prev_comm != perf' -e sched:sched_wakeup --filter 'comm != perf'
1111 ^C[ perf record: Woken up 38 times to write data ]
1112 [ perf record: Captured and wrote 9.688 MB perf.data (~423279 samples) ]
1113
1114
1115 root@crownbay:~# perf script
1116
1117 swapper 0 [000] 7932.162180: sched_switch: prev_comm=swapper/0 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=kworker/0:3 next_pid=1209 next_prio=120
1118 kworker/0:3 1209 [000] 7932.162236: sched_switch: prev_comm=kworker/0:3 prev_pid=1209 prev_prio=120 prev_state=S ==> next_comm=swapper/0 next_pid=0 next_prio=120
1119 perf 1407 [001] 7932.170048: sched_wakeup: comm=kworker/1:1 pid=21 prio=120 success=1 target_cpu=001
1120 perf 1407 [001] 7932.180044: sched_wakeup: comm=kworker/1:1 pid=21 prio=120 success=1 target_cpu=001
1121 perf 1407 [001] 7932.190038: sched_wakeup: comm=kworker/1:1 pid=21 prio=120 success=1 target_cpu=001
1122 perf 1407 [001] 7932.200044: sched_wakeup: comm=kworker/1:1 pid=21 prio=120 success=1 target_cpu=001
1123 perf 1407 [001] 7932.210044: sched_wakeup: comm=kworker/1:1 pid=21 prio=120 success=1 target_cpu=001
1124 perf 1407 [001] 7932.220044: sched_wakeup: comm=kworker/1:1 pid=21 prio=120 success=1 target_cpu=001
1125 swapper 0 [001] 7932.230111: sched_wakeup: comm=kworker/1:1 pid=21 prio=120 success=1 target_cpu=001
1126 swapper 0 [001] 7932.230146: sched_switch: prev_comm=swapper/1 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=kworker/1:1 next_pid=21 next_prio=120
1127 kworker/1:1 21 [001] 7932.230205: sched_switch: prev_comm=kworker/1:1 prev_pid=21 prev_prio=120 prev_state=S ==> next_comm=swapper/1 next_pid=0 next_prio=120
1128 swapper 0 [000] 7932.326109: sched_wakeup: comm=kworker/0:3 pid=1209 prio=120 success=1 target_cpu=000
1129 swapper 0 [000] 7932.326171: sched_switch: prev_comm=swapper/0 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=kworker/0:3 next_pid=1209 next_prio=120
1130 kworker/0:3 1209 [000] 7932.326214: sched_switch: prev_comm=kworker/0:3 prev_pid=1209 prev_prio=120 prev_state=S ==> next_comm=swapper/0 next_pid=0 next_prio=120
1131 </literallayout>
1132 In this case, we've filtered out all events that have 'perf'
1133 in their 'comm' or 'comm_prev' or 'comm_next' fields. Notice
1134 that there are still events recorded for perf, but notice
1135 that those events don't have values of 'perf' for the filtered
1136 fields. To completely filter out anything from perf will
1137 require a bit more work, but for the purpose of demonstrating
1138 how to use filters, it's close enough.
1139 </para>
1140
1141 <informalexample>
1142 <emphasis>Tying it Together:</emphasis> These are exactly the same set of event
1143 filters defined by the trace event subsystem. See the
1144 ftrace/tracecmd/kernelshark section for more discussion about
1145 these event filters.
1146 </informalexample>
1147
1148 <informalexample>
1149 <emphasis>Tying it Together:</emphasis> These event filters are implemented by a
1150 special-purpose pseudo-interpreter in the kernel and are an
1151 integral and indispensable part of the perf design as it
1152 relates to tracing. kernel-based event filters provide a
1153 mechanism to precisely throttle the event stream that appears
1154 in user space, where it makes sense to provide bindings to real
1155 programming languages for postprocessing the event stream.
1156 This architecture allows for the intelligent and flexible
1157 partitioning of processing between the kernel and user space.
1158 Contrast this with other tools such as SystemTap, which does
1159 all of its processing in the kernel and as such requires a
1160 special project-defined language in order to accommodate that
1161 design, or LTTng, where everything is sent to userspace and
1162 as such requires a super-efficient kernel-to-userspace
1163 transport mechanism in order to function properly. While
1164 perf certainly can benefit from for instance advances in
1165 the design of the transport, it doesn't fundamentally depend
1166 on them. Basically, if you find that your perf tracing
1167 application is causing buffer I/O overruns, it probably
1168 means that you aren't taking enough advantage of the
1169 kernel filtering engine.
1170 </informalexample>
1171 </section>
1172 </section>
1173
1174 <section id='using-dynamic-tracepoints'>
1175 <title>Using Dynamic Tracepoints</title>
1176
1177 <para>
1178 perf isn't restricted to the fixed set of static tracepoints
1179 listed by 'perf list'. Users can also add their own 'dynamic'
1180 tracepoints anywhere in the kernel. For instance, suppose we
1181 want to define our own tracepoint on do_fork(). We can do that
1182 using the 'perf probe' perf subcommand:
1183 <literallayout class='monospaced'>
1184 root@crownbay:~# perf probe do_fork
1185 Added new event:
1186 probe:do_fork (on do_fork)
1187
1188 You can now use it in all perf tools, such as:
1189
1190 perf record -e probe:do_fork -aR sleep 1
1191 </literallayout>
1192 Adding a new tracepoint via 'perf probe' results in an event
1193 with all the expected files and format in
1194 /sys/kernel/debug/tracing/events, just the same as for static
1195 tracepoints (as discussed in more detail in the trace events
1196 subsystem section:
1197 <literallayout class='monospaced'>
1198 root@crownbay:/sys/kernel/debug/tracing/events/probe/do_fork# ls -al
1199 drwxr-xr-x 2 root root 0 Oct 28 11:42 .
1200 drwxr-xr-x 3 root root 0 Oct 28 11:42 ..
1201 -rw-r--r-- 1 root root 0 Oct 28 11:42 enable
1202 -rw-r--r-- 1 root root 0 Oct 28 11:42 filter
1203 -r--r--r-- 1 root root 0 Oct 28 11:42 format
1204 -r--r--r-- 1 root root 0 Oct 28 11:42 id
1205
1206 root@crownbay:/sys/kernel/debug/tracing/events/probe/do_fork# cat format
1207 name: do_fork
1208 ID: 944
1209 format:
1210 field:unsigned short common_type; offset:0; size:2; signed:0;
1211 field:unsigned char common_flags; offset:2; size:1; signed:0;
1212 field:unsigned char common_preempt_count; offset:3; size:1; signed:0;
1213 field:int common_pid; offset:4; size:4; signed:1;
1214 field:int common_padding; offset:8; size:4; signed:1;
1215
1216 field:unsigned long __probe_ip; offset:12; size:4; signed:0;
1217
1218 print fmt: "(%lx)", REC->__probe_ip
1219 </literallayout>
1220 We can list all dynamic tracepoints currently in existence:
1221 <literallayout class='monospaced'>
1222 root@crownbay:~# perf probe -l
1223 probe:do_fork (on do_fork)
1224 probe:schedule (on schedule)
1225 </literallayout>
1226 Let's record system-wide ('sleep 30' is a trick for recording
1227 system-wide but basically do nothing and then wake up after
1228 30 seconds):
1229 <literallayout class='monospaced'>
1230 root@crownbay:~# perf record -g -a -e probe:do_fork sleep 30
1231 [ perf record: Woken up 1 times to write data ]
1232 [ perf record: Captured and wrote 0.087 MB perf.data (~3812 samples) ]
1233 </literallayout>
1234 Using 'perf script' we can see each do_fork event that fired:
1235 <literallayout class='monospaced'>
1236 root@crownbay:~# perf script
1237
1238 # ========
1239 # captured on: Sun Oct 28 11:55:18 2012
1240 # hostname : crownbay
1241 # os release : 3.4.11-yocto-standard
1242 # perf version : 3.4.11
1243 # arch : i686
1244 # nrcpus online : 2
1245 # nrcpus avail : 2
1246 # cpudesc : Intel(R) Atom(TM) CPU E660 @ 1.30GHz
1247 # cpuid : GenuineIntel,6,38,1
1248 # total memory : 1017184 kB
1249 # cmdline : /usr/bin/perf record -g -a -e probe:do_fork sleep 30
1250 # event : name = probe:do_fork, type = 2, config = 0x3b0, config1 = 0x0, config2 = 0x0, excl_usr = 0, excl_kern
1251 = 0, id = { 5, 6 }
1252 # HEADER_CPU_TOPOLOGY info available, use -I to display
1253 # ========
1254 #
1255 matchbox-deskto 1197 [001] 34211.378318: do_fork: (c1028460)
1256 matchbox-deskto 1295 [001] 34211.380388: do_fork: (c1028460)
1257 pcmanfm 1296 [000] 34211.632350: do_fork: (c1028460)
1258 pcmanfm 1296 [000] 34211.639917: do_fork: (c1028460)
1259 matchbox-deskto 1197 [001] 34217.541603: do_fork: (c1028460)
1260 matchbox-deskto 1299 [001] 34217.543584: do_fork: (c1028460)
1261 gthumb 1300 [001] 34217.697451: do_fork: (c1028460)
1262 gthumb 1300 [001] 34219.085734: do_fork: (c1028460)
1263 gthumb 1300 [000] 34219.121351: do_fork: (c1028460)
1264 gthumb 1300 [001] 34219.264551: do_fork: (c1028460)
1265 pcmanfm 1296 [000] 34219.590380: do_fork: (c1028460)
1266 matchbox-deskto 1197 [001] 34224.955965: do_fork: (c1028460)
1267 matchbox-deskto 1306 [001] 34224.957972: do_fork: (c1028460)
1268 matchbox-termin 1307 [000] 34225.038214: do_fork: (c1028460)
1269 matchbox-termin 1307 [001] 34225.044218: do_fork: (c1028460)
1270 matchbox-termin 1307 [000] 34225.046442: do_fork: (c1028460)
1271 matchbox-deskto 1197 [001] 34237.112138: do_fork: (c1028460)
1272 matchbox-deskto 1311 [001] 34237.114106: do_fork: (c1028460)
1273 gaku 1312 [000] 34237.202388: do_fork: (c1028460)
1274 </literallayout>
1275 And using 'perf report' on the same file, we can see the
1276 callgraphs from starting a few programs during those 30 seconds:
1277 </para>
1278
1279 <para>
1280 <imagedata fileref="figures/perf-probe-do_fork-profile.png" width="6in" depth="7in" align="center" scalefit="1" />
1281 </para>
1282
1283 <informalexample>
1284 <emphasis>Tying it Together:</emphasis> The trace events subsystem accommodate static
1285 and dynamic tracepoints in exactly the same way - there's no
1286 difference as far as the infrastructure is concerned. See the
1287 ftrace section for more details on the trace event subsystem.
1288 </informalexample>
1289
1290 <informalexample>
1291 <emphasis>Tying it Together:</emphasis> Dynamic tracepoints are implemented under the
1292 covers by kprobes and uprobes. kprobes and uprobes are also used
1293 by and in fact are the main focus of SystemTap.
1294 </informalexample>
1295 </section>
1296 </section>
1297
1298 <section id='perf-documentation'>
1299 <title>Documentation</title>
1300
1301 <para>
1302 Online versions of the man pages for the commands discussed in this
1303 section can be found here:
1304 <itemizedlist>
1305 <listitem><para>The <ulink url='http://linux.die.net/man/1/perf-stat'>'perf stat' manpage</ulink>.
1306 </para></listitem>
1307 <listitem><para>The <ulink url='http://linux.die.net/man/1/perf-record'>'perf record' manpage</ulink>.
1308 </para></listitem>
1309 <listitem><para>The <ulink url='http://linux.die.net/man/1/perf-report'>'perf report' manpage</ulink>.
1310 </para></listitem>
1311 <listitem><para>The <ulink url='http://linux.die.net/man/1/perf-probe'>'perf probe' manpage</ulink>.
1312 </para></listitem>
1313 <listitem><para>The <ulink url='http://linux.die.net/man/1/perf-script'>'perf script' manpage</ulink>.
1314 </para></listitem>
1315 <listitem><para>Documentation on using the
1316 <ulink url='http://linux.die.net/man/1/perf-script-python'>'perf script' python binding</ulink>.
1317 </para></listitem>
1318 <listitem><para>The top-level
1319 <ulink url='http://linux.die.net/man/1/perf'>perf(1) manpage</ulink>.
1320 </para></listitem>
1321 </itemizedlist>
1322 </para>
1323
1324 <para>
1325 Normally, you should be able to invoke the man pages via perf
1326 itself e.g. 'perf help' or 'perf help record'.
1327 </para>
1328
1329 <para>
1330 However, by default Yocto doesn't install man pages, but perf
1331 invokes the man pages for most help functionality. This is a bug
1332 and is being addressed by a Yocto bug:
1333 <ulink url='https://bugzilla.yoctoproject.org/show_bug.cgi?id=3388'>Bug 3388 - perf: enable man pages for basic 'help' functionality</ulink>.
1334 </para>
1335
1336 <para>
1337 The man pages in text form, along with some other files, such as
1338 a set of examples, can be found in the 'perf' directory of the
1339 kernel tree:
1340 <literallayout class='monospaced'>
1341 tools/perf/Documentation
1342 </literallayout>
1343 There's also a nice perf tutorial on the perf wiki that goes
1344 into more detail than we do here in certain areas:
1345 <ulink url='https://perf.wiki.kernel.org/index.php/Tutorial'>Perf Tutorial</ulink>
1346 </para>
1347 </section>
1348</section>
1349
1350<section id='profile-manual-ftrace'>
1351 <title>ftrace</title>
1352
1353 <para>
1354 'ftrace' literally refers to the 'ftrace function tracer' but in
1355 reality this encompasses a number of related tracers along with
1356 the infrastructure that they all make use of.
1357 </para>
1358
1359 <section id='ftrace-setup'>
1360 <title>Setup</title>
1361
1362 <para>
1363 For this section, we'll assume you've already performed the basic
1364 setup outlined in the General Setup section.
1365 </para>
1366
1367 <para>
1368 ftrace, trace-cmd, and kernelshark run on the target system,
1369 and are ready to go out-of-the-box - no additional setup is
1370 necessary. For the rest of this section we assume you've ssh'ed
1371 to the host and will be running ftrace on the target. kernelshark
1372 is a GUI application and if you use the '-X' option to ssh you
1373 can have the kernelshark GUI run on the target but display
1374 remotely on the host if you want.
1375 </para>
1376 </section>
1377
1378 <section id='basic-ftrace-usage'>
1379 <title>Basic ftrace usage</title>
1380
1381 <para>
1382 'ftrace' essentially refers to everything included in
1383 the /tracing directory of the mounted debugfs filesystem
1384 (Yocto follows the standard convention and mounts it
1385 at /sys/kernel/debug). Here's a listing of all the files
1386 found in /sys/kernel/debug/tracing on a Yocto system:
1387 <literallayout class='monospaced'>
1388 root@sugarbay:/sys/kernel/debug/tracing# ls
1389 README kprobe_events trace
1390 available_events kprobe_profile trace_clock
1391 available_filter_functions options trace_marker
1392 available_tracers per_cpu trace_options
1393 buffer_size_kb printk_formats trace_pipe
1394 buffer_total_size_kb saved_cmdlines tracing_cpumask
1395 current_tracer set_event tracing_enabled
1396 dyn_ftrace_total_info set_ftrace_filter tracing_on
1397 enabled_functions set_ftrace_notrace tracing_thresh
1398 events set_ftrace_pid
1399 free_buffer set_graph_function
1400 </literallayout>
1401 The files listed above are used for various purposes -
1402 some relate directly to the tracers themselves, others are
1403 used to set tracing options, and yet others actually contain
1404 the tracing output when a tracer is in effect. Some of the
1405 functions can be guessed from their names, others need
1406 explanation; in any case, we'll cover some of the files we
1407 see here below but for an explanation of the others, please
1408 see the ftrace documentation.
1409 </para>
1410
1411 <para>
1412 We'll start by looking at some of the available built-in
1413 tracers.
1414 </para>
1415
1416 <para>
1417 cat'ing the 'available_tracers' file lists the set of
1418 available tracers:
1419 <literallayout class='monospaced'>
1420 root@sugarbay:/sys/kernel/debug/tracing# cat available_tracers
1421 blk function_graph function nop
1422 </literallayout>
1423 The 'current_tracer' file contains the tracer currently in
1424 effect:
1425 <literallayout class='monospaced'>
1426 root@sugarbay:/sys/kernel/debug/tracing# cat current_tracer
1427 nop
1428 </literallayout>
1429 The above listing of current_tracer shows that
1430 the 'nop' tracer is in effect, which is just another
1431 way of saying that there's actually no tracer
1432 currently in effect.
1433 </para>
1434
1435 <para>
1436 echo'ing one of the available_tracers into current_tracer
1437 makes the specified tracer the current tracer:
1438 <literallayout class='monospaced'>
1439 root@sugarbay:/sys/kernel/debug/tracing# echo function > current_tracer
1440 root@sugarbay:/sys/kernel/debug/tracing# cat current_tracer
1441 function
1442 </literallayout>
1443 The above sets the current tracer to be the
1444 'function tracer'. This tracer traces every function
1445 call in the kernel and makes it available as the
1446 contents of the 'trace' file. Reading the 'trace' file
1447 lists the currently buffered function calls that have been
1448 traced by the function tracer:
1449 <literallayout class='monospaced'>
1450 root@sugarbay:/sys/kernel/debug/tracing# cat trace | less
1451
1452 # tracer: function
1453 #
1454 # entries-in-buffer/entries-written: 310629/766471 #P:8
1455 #
1456 # _-----=&gt; irqs-off
1457 # / _----=&gt; need-resched
1458 # | / _---=&gt; hardirq/softirq
1459 # || / _--=&gt; preempt-depth
1460 # ||| / delay
1461 # TASK-PID CPU# |||| TIMESTAMP FUNCTION
1462 # | | | |||| | |
1463 &lt;idle&gt;-0 [004] d..1 470.867169: ktime_get_real &lt;-intel_idle
1464 &lt;idle&gt;-0 [004] d..1 470.867170: getnstimeofday &lt;-ktime_get_real
1465 &lt;idle&gt;-0 [004] d..1 470.867171: ns_to_timeval &lt;-intel_idle
1466 &lt;idle&gt;-0 [004] d..1 470.867171: ns_to_timespec &lt;-ns_to_timeval
1467 &lt;idle&gt;-0 [004] d..1 470.867172: smp_apic_timer_interrupt &lt;-apic_timer_interrupt
1468 &lt;idle&gt;-0 [004] d..1 470.867172: native_apic_mem_write &lt;-smp_apic_timer_interrupt
1469 &lt;idle&gt;-0 [004] d..1 470.867172: irq_enter &lt;-smp_apic_timer_interrupt
1470 &lt;idle&gt;-0 [004] d..1 470.867172: rcu_irq_enter &lt;-irq_enter
1471 &lt;idle&gt;-0 [004] d..1 470.867173: rcu_idle_exit_common.isra.33 &lt;-rcu_irq_enter
1472 &lt;idle&gt;-0 [004] d..1 470.867173: local_bh_disable &lt;-irq_enter
1473 &lt;idle&gt;-0 [004] d..1 470.867173: add_preempt_count &lt;-local_bh_disable
1474 &lt;idle&gt;-0 [004] d.s1 470.867174: tick_check_idle &lt;-irq_enter
1475 &lt;idle&gt;-0 [004] d.s1 470.867174: tick_check_oneshot_broadcast &lt;-tick_check_idle
1476 &lt;idle&gt;-0 [004] d.s1 470.867174: ktime_get &lt;-tick_check_idle
1477 &lt;idle&gt;-0 [004] d.s1 470.867174: tick_nohz_stop_idle &lt;-tick_check_idle
1478 &lt;idle&gt;-0 [004] d.s1 470.867175: update_ts_time_stats &lt;-tick_nohz_stop_idle
1479 &lt;idle&gt;-0 [004] d.s1 470.867175: nr_iowait_cpu &lt;-update_ts_time_stats
1480 &lt;idle&gt;-0 [004] d.s1 470.867175: tick_do_update_jiffies64 &lt;-tick_check_idle
1481 &lt;idle&gt;-0 [004] d.s1 470.867175: _raw_spin_lock &lt;-tick_do_update_jiffies64
1482 &lt;idle&gt;-0 [004] d.s1 470.867176: add_preempt_count &lt;-_raw_spin_lock
1483 &lt;idle&gt;-0 [004] d.s2 470.867176: do_timer &lt;-tick_do_update_jiffies64
1484 &lt;idle&gt;-0 [004] d.s2 470.867176: _raw_spin_lock &lt;-do_timer
1485 &lt;idle&gt;-0 [004] d.s2 470.867176: add_preempt_count &lt;-_raw_spin_lock
1486 &lt;idle&gt;-0 [004] d.s3 470.867177: ntp_tick_length &lt;-do_timer
1487 &lt;idle&gt;-0 [004] d.s3 470.867177: _raw_spin_lock_irqsave &lt;-ntp_tick_length
1488 .
1489 .
1490 .
1491 </literallayout>
1492 Each line in the trace above shows what was happening in
1493 the kernel on a given cpu, to the level of detail of
1494 function calls. Each entry shows the function called,
1495 followed by its caller (after the arrow).
1496 </para>
1497
1498 <para>
1499 The function tracer gives you an extremely detailed idea
1500 of what the kernel was doing at the point in time the trace
1501 was taken, and is a great way to learn about how the kernel
1502 code works in a dynamic sense.
1503 </para>
1504
1505 <informalexample>
1506 <emphasis>Tying it Together:</emphasis> The ftrace function tracer is also
1507 available from within perf, as the ftrace:function tracepoint.
1508 </informalexample>
1509
1510 <para>
1511 It is a little more difficult to follow the call chains than
1512 it needs to be - luckily there's a variant of the function
1513 tracer that displays the callchains explicitly, called the
1514 'function_graph' tracer:
1515 <literallayout class='monospaced'>
1516 root@sugarbay:/sys/kernel/debug/tracing# echo function_graph &gt; current_tracer
1517 root@sugarbay:/sys/kernel/debug/tracing# cat trace | less
1518
1519 tracer: function_graph
1520
1521 CPU DURATION FUNCTION CALLS
1522 | | | | | | |
1523 7) 0.046 us | pick_next_task_fair();
1524 7) 0.043 us | pick_next_task_stop();
1525 7) 0.042 us | pick_next_task_rt();
1526 7) 0.032 us | pick_next_task_fair();
1527 7) 0.030 us | pick_next_task_idle();
1528 7) | _raw_spin_unlock_irq() {
1529 7) 0.033 us | sub_preempt_count();
1530 7) 0.258 us | }
1531 7) 0.032 us | sub_preempt_count();
1532 7) + 13.341 us | } /* __schedule */
1533 7) 0.095 us | } /* sub_preempt_count */
1534 7) | schedule() {
1535 7) | __schedule() {
1536 7) 0.060 us | add_preempt_count();
1537 7) 0.044 us | rcu_note_context_switch();
1538 7) | _raw_spin_lock_irq() {
1539 7) 0.033 us | add_preempt_count();
1540 7) 0.247 us | }
1541 7) | idle_balance() {
1542 7) | _raw_spin_unlock() {
1543 7) 0.031 us | sub_preempt_count();
1544 7) 0.246 us | }
1545 7) | update_shares() {
1546 7) 0.030 us | __rcu_read_lock();
1547 7) 0.029 us | __rcu_read_unlock();
1548 7) 0.484 us | }
1549 7) 0.030 us | __rcu_read_lock();
1550 7) | load_balance() {
1551 7) | find_busiest_group() {
1552 7) 0.031 us | idle_cpu();
1553 7) 0.029 us | idle_cpu();
1554 7) 0.035 us | idle_cpu();
1555 7) 0.906 us | }
1556 7) 1.141 us | }
1557 7) 0.022 us | msecs_to_jiffies();
1558 7) | load_balance() {
1559 7) | find_busiest_group() {
1560 7) 0.031 us | idle_cpu();
1561 .
1562 .
1563 .
1564 4) 0.062 us | msecs_to_jiffies();
1565 4) 0.062 us | __rcu_read_unlock();
1566 4) | _raw_spin_lock() {
1567 4) 0.073 us | add_preempt_count();
1568 4) 0.562 us | }
1569 4) + 17.452 us | }
1570 4) 0.108 us | put_prev_task_fair();
1571 4) 0.102 us | pick_next_task_fair();
1572 4) 0.084 us | pick_next_task_stop();
1573 4) 0.075 us | pick_next_task_rt();
1574 4) 0.062 us | pick_next_task_fair();
1575 4) 0.066 us | pick_next_task_idle();
1576 ------------------------------------------
1577 4) kworker-74 =&gt; &lt;idle&gt;-0
1578 ------------------------------------------
1579
1580 4) | finish_task_switch() {
1581 4) | _raw_spin_unlock_irq() {
1582 4) 0.100 us | sub_preempt_count();
1583 4) 0.582 us | }
1584 4) 1.105 us | }
1585 4) 0.088 us | sub_preempt_count();
1586 4) ! 100.066 us | }
1587 .
1588 .
1589 .
1590 3) | sys_ioctl() {
1591 3) 0.083 us | fget_light();
1592 3) | security_file_ioctl() {
1593 3) 0.066 us | cap_file_ioctl();
1594 3) 0.562 us | }
1595 3) | do_vfs_ioctl() {
1596 3) | drm_ioctl() {
1597 3) 0.075 us | drm_ut_debug_printk();
1598 3) | i915_gem_pwrite_ioctl() {
1599 3) | i915_mutex_lock_interruptible() {
1600 3) 0.070 us | mutex_lock_interruptible();
1601 3) 0.570 us | }
1602 3) | drm_gem_object_lookup() {
1603 3) | _raw_spin_lock() {
1604 3) 0.080 us | add_preempt_count();
1605 3) 0.620 us | }
1606 3) | _raw_spin_unlock() {
1607 3) 0.085 us | sub_preempt_count();
1608 3) 0.562 us | }
1609 3) 2.149 us | }
1610 3) 0.133 us | i915_gem_object_pin();
1611 3) | i915_gem_object_set_to_gtt_domain() {
1612 3) 0.065 us | i915_gem_object_flush_gpu_write_domain();
1613 3) 0.065 us | i915_gem_object_wait_rendering();
1614 3) 0.062 us | i915_gem_object_flush_cpu_write_domain();
1615 3) 1.612 us | }
1616 3) | i915_gem_object_put_fence() {
1617 3) 0.097 us | i915_gem_object_flush_fence.constprop.36();
1618 3) 0.645 us | }
1619 3) 0.070 us | add_preempt_count();
1620 3) 0.070 us | sub_preempt_count();
1621 3) 0.073 us | i915_gem_object_unpin();
1622 3) 0.068 us | mutex_unlock();
1623 3) 9.924 us | }
1624 3) + 11.236 us | }
1625 3) + 11.770 us | }
1626 3) + 13.784 us | }
1627 3) | sys_ioctl() {
1628 </literallayout>
1629 As you can see, the function_graph display is much easier to
1630 follow. Also note that in addition to the function calls and
1631 associated braces, other events such as scheduler events
1632 are displayed in context. In fact, you can freely include
1633 any tracepoint available in the trace events subsystem described
1634 in the next section by simply enabling those events, and they'll
1635 appear in context in the function graph display. Quite a
1636 powerful tool for understanding kernel dynamics.
1637 </para>
1638
1639 <para>
1640 Also notice that there are various annotations on the left
1641 hand side of the display. For example if the total time it
1642 took for a given function to execute is above a certain
1643 threshold, an exclamation point or plus sign appears on the
1644 left hand side. Please see the ftrace documentation for
1645 details on all these fields.
1646 </para>
1647 </section>
1648
1649 <section id='the-trace-events-subsystem'>
1650 <title>The 'trace events' Subsystem</title>
1651
1652 <para>
1653 One especially important directory contained within
1654 the /sys/kernel/debug/tracing directory is the 'events'
1655 subdirectory, which contains representations of every
1656 tracepoint in the system. Listing out the contents of
1657 the 'events' subdirectory, we see mainly another set of
1658 subdirectories:
1659 <literallayout class='monospaced'>
1660 root@sugarbay:/sys/kernel/debug/tracing# cd events
1661 root@sugarbay:/sys/kernel/debug/tracing/events# ls -al
1662 drwxr-xr-x 38 root root 0 Nov 14 23:19 .
1663 drwxr-xr-x 5 root root 0 Nov 14 23:19 ..
1664 drwxr-xr-x 19 root root 0 Nov 14 23:19 block
1665 drwxr-xr-x 32 root root 0 Nov 14 23:19 btrfs
1666 drwxr-xr-x 5 root root 0 Nov 14 23:19 drm
1667 -rw-r--r-- 1 root root 0 Nov 14 23:19 enable
1668 drwxr-xr-x 40 root root 0 Nov 14 23:19 ext3
1669 drwxr-xr-x 79 root root 0 Nov 14 23:19 ext4
1670 drwxr-xr-x 14 root root 0 Nov 14 23:19 ftrace
1671 drwxr-xr-x 8 root root 0 Nov 14 23:19 hda
1672 -r--r--r-- 1 root root 0 Nov 14 23:19 header_event
1673 -r--r--r-- 1 root root 0 Nov 14 23:19 header_page
1674 drwxr-xr-x 25 root root 0 Nov 14 23:19 i915
1675 drwxr-xr-x 7 root root 0 Nov 14 23:19 irq
1676 drwxr-xr-x 12 root root 0 Nov 14 23:19 jbd
1677 drwxr-xr-x 14 root root 0 Nov 14 23:19 jbd2
1678 drwxr-xr-x 14 root root 0 Nov 14 23:19 kmem
1679 drwxr-xr-x 7 root root 0 Nov 14 23:19 module
1680 drwxr-xr-x 3 root root 0 Nov 14 23:19 napi
1681 drwxr-xr-x 6 root root 0 Nov 14 23:19 net
1682 drwxr-xr-x 3 root root 0 Nov 14 23:19 oom
1683 drwxr-xr-x 12 root root 0 Nov 14 23:19 power
1684 drwxr-xr-x 3 root root 0 Nov 14 23:19 printk
1685 drwxr-xr-x 8 root root 0 Nov 14 23:19 random
1686 drwxr-xr-x 4 root root 0 Nov 14 23:19 raw_syscalls
1687 drwxr-xr-x 3 root root 0 Nov 14 23:19 rcu
1688 drwxr-xr-x 6 root root 0 Nov 14 23:19 rpm
1689 drwxr-xr-x 20 root root 0 Nov 14 23:19 sched
1690 drwxr-xr-x 7 root root 0 Nov 14 23:19 scsi
1691 drwxr-xr-x 4 root root 0 Nov 14 23:19 signal
1692 drwxr-xr-x 5 root root 0 Nov 14 23:19 skb
1693 drwxr-xr-x 4 root root 0 Nov 14 23:19 sock
1694 drwxr-xr-x 10 root root 0 Nov 14 23:19 sunrpc
1695 drwxr-xr-x 538 root root 0 Nov 14 23:19 syscalls
1696 drwxr-xr-x 4 root root 0 Nov 14 23:19 task
1697 drwxr-xr-x 14 root root 0 Nov 14 23:19 timer
1698 drwxr-xr-x 3 root root 0 Nov 14 23:19 udp
1699 drwxr-xr-x 21 root root 0 Nov 14 23:19 vmscan
1700 drwxr-xr-x 3 root root 0 Nov 14 23:19 vsyscall
1701 drwxr-xr-x 6 root root 0 Nov 14 23:19 workqueue
1702 drwxr-xr-x 26 root root 0 Nov 14 23:19 writeback
1703 </literallayout>
1704 Each one of these subdirectories corresponds to a
1705 'subsystem' and contains yet again more subdirectories,
1706 each one of those finally corresponding to a tracepoint.
1707 For example, here are the contents of the 'kmem' subsystem:
1708 <literallayout class='monospaced'>
1709 root@sugarbay:/sys/kernel/debug/tracing/events# cd kmem
1710 root@sugarbay:/sys/kernel/debug/tracing/events/kmem# ls -al
1711 drwxr-xr-x 14 root root 0 Nov 14 23:19 .
1712 drwxr-xr-x 38 root root 0 Nov 14 23:19 ..
1713 -rw-r--r-- 1 root root 0 Nov 14 23:19 enable
1714 -rw-r--r-- 1 root root 0 Nov 14 23:19 filter
1715 drwxr-xr-x 2 root root 0 Nov 14 23:19 kfree
1716 drwxr-xr-x 2 root root 0 Nov 14 23:19 kmalloc
1717 drwxr-xr-x 2 root root 0 Nov 14 23:19 kmalloc_node
1718 drwxr-xr-x 2 root root 0 Nov 14 23:19 kmem_cache_alloc
1719 drwxr-xr-x 2 root root 0 Nov 14 23:19 kmem_cache_alloc_node
1720 drwxr-xr-x 2 root root 0 Nov 14 23:19 kmem_cache_free
1721 drwxr-xr-x 2 root root 0 Nov 14 23:19 mm_page_alloc
1722 drwxr-xr-x 2 root root 0 Nov 14 23:19 mm_page_alloc_extfrag
1723 drwxr-xr-x 2 root root 0 Nov 14 23:19 mm_page_alloc_zone_locked
1724 drwxr-xr-x 2 root root 0 Nov 14 23:19 mm_page_free
1725 drwxr-xr-x 2 root root 0 Nov 14 23:19 mm_page_free_batched
1726 drwxr-xr-x 2 root root 0 Nov 14 23:19 mm_page_pcpu_drain
1727 </literallayout>
1728 Let's see what's inside the subdirectory for a specific
1729 tracepoint, in this case the one for kmalloc:
1730 <literallayout class='monospaced'>
1731 root@sugarbay:/sys/kernel/debug/tracing/events/kmem# cd kmalloc
1732 root@sugarbay:/sys/kernel/debug/tracing/events/kmem/kmalloc# ls -al
1733 drwxr-xr-x 2 root root 0 Nov 14 23:19 .
1734 drwxr-xr-x 14 root root 0 Nov 14 23:19 ..
1735 -rw-r--r-- 1 root root 0 Nov 14 23:19 enable
1736 -rw-r--r-- 1 root root 0 Nov 14 23:19 filter
1737 -r--r--r-- 1 root root 0 Nov 14 23:19 format
1738 -r--r--r-- 1 root root 0 Nov 14 23:19 id
1739 </literallayout>
1740 The 'format' file for the tracepoint describes the event
1741 in memory, which is used by the various tracing tools
1742 that now make use of these tracepoint to parse the event
1743 and make sense of it, along with a 'print fmt' field that
1744 allows tools like ftrace to display the event as text.
1745 Here's what the format of the kmalloc event looks like:
1746 <literallayout class='monospaced'>
1747 root@sugarbay:/sys/kernel/debug/tracing/events/kmem/kmalloc# cat format
1748 name: kmalloc
1749 ID: 313
1750 format:
1751 field:unsigned short common_type; offset:0; size:2; signed:0;
1752 field:unsigned char common_flags; offset:2; size:1; signed:0;
1753 field:unsigned char common_preempt_count; offset:3; size:1; signed:0;
1754 field:int common_pid; offset:4; size:4; signed:1;
1755 field:int common_padding; offset:8; size:4; signed:1;
1756
1757 field:unsigned long call_site; offset:16; size:8; signed:0;
1758 field:const void * ptr; offset:24; size:8; signed:0;
1759 field:size_t bytes_req; offset:32; size:8; signed:0;
1760 field:size_t bytes_alloc; offset:40; size:8; signed:0;
1761 field:gfp_t gfp_flags; offset:48; size:4; signed:0;
1762
1763 print fmt: "call_site=%lx ptr=%p bytes_req=%zu bytes_alloc=%zu gfp_flags=%s", REC->call_site, REC->ptr, REC->bytes_req, REC->bytes_alloc,
1764 (REC->gfp_flags) ? __print_flags(REC->gfp_flags, "|", {(unsigned long)(((( gfp_t)0x10u) | (( gfp_t)0x40u) | (( gfp_t)0x80u) | ((
1765 gfp_t)0x20000u) | (( gfp_t)0x02u) | (( gfp_t)0x08u)) | (( gfp_t)0x4000u) | (( gfp_t)0x10000u) | (( gfp_t)0x1000u) | (( gfp_t)0x200u) | ((
1766 gfp_t)0x400000u)), "GFP_TRANSHUGE"}, {(unsigned long)((( gfp_t)0x10u) | (( gfp_t)0x40u) | (( gfp_t)0x80u) | (( gfp_t)0x20000u) | ((
1767 gfp_t)0x02u) | (( gfp_t)0x08u)), "GFP_HIGHUSER_MOVABLE"}, {(unsigned long)((( gfp_t)0x10u) | (( gfp_t)0x40u) | (( gfp_t)0x80u) | ((
1768 gfp_t)0x20000u) | (( gfp_t)0x02u)), "GFP_HIGHUSER"}, {(unsigned long)((( gfp_t)0x10u) | (( gfp_t)0x40u) | (( gfp_t)0x80u) | ((
1769 gfp_t)0x20000u)), "GFP_USER"}, {(unsigned long)((( gfp_t)0x10u) | (( gfp_t)0x40u) | (( gfp_t)0x80u) | (( gfp_t)0x80000u)), GFP_TEMPORARY"},
1770 {(unsigned long)((( gfp_t)0x10u) | (( gfp_t)0x40u) | (( gfp_t)0x80u)), "GFP_KERNEL"}, {(unsigned long)((( gfp_t)0x10u) | (( gfp_t)0x40u)),
1771 "GFP_NOFS"}, {(unsigned long)((( gfp_t)0x20u)), "GFP_ATOMIC"}, {(unsigned long)((( gfp_t)0x10u)), "GFP_NOIO"}, {(unsigned long)((
1772 gfp_t)0x20u), "GFP_HIGH"}, {(unsigned long)(( gfp_t)0x10u), "GFP_WAIT"}, {(unsigned long)(( gfp_t)0x40u), "GFP_IO"}, {(unsigned long)((
1773 gfp_t)0x100u), "GFP_COLD"}, {(unsigned long)(( gfp_t)0x200u), "GFP_NOWARN"}, {(unsigned long)(( gfp_t)0x400u), "GFP_REPEAT"}, {(unsigned
1774 long)(( gfp_t)0x800u), "GFP_NOFAIL"}, {(unsigned long)(( gfp_t)0x1000u), "GFP_NORETRY"}, {(unsigned long)(( gfp_t)0x4000u), "GFP_COMP"},
1775 {(unsigned long)(( gfp_t)0x8000u), "GFP_ZERO"}, {(unsigned long)(( gfp_t)0x10000u), "GFP_NOMEMALLOC"}, {(unsigned long)(( gfp_t)0x20000u),
1776 "GFP_HARDWALL"}, {(unsigned long)(( gfp_t)0x40000u), "GFP_THISNODE"}, {(unsigned long)(( gfp_t)0x80000u), "GFP_RECLAIMABLE"}, {(unsigned
1777 long)(( gfp_t)0x08u), "GFP_MOVABLE"}, {(unsigned long)(( gfp_t)0), "GFP_NOTRACK"}, {(unsigned long)(( gfp_t)0x400000u), "GFP_NO_KSWAPD"},
1778 {(unsigned long)(( gfp_t)0x800000u), "GFP_OTHER_NODE"} ) : "GFP_NOWAIT"
1779 </literallayout>
1780 The 'enable' file in the tracepoint directory is what allows
1781 the user (or tools such as trace-cmd) to actually turn the
1782 tracepoint on and off. When enabled, the corresponding
1783 tracepoint will start appearing in the ftrace 'trace'
1784 file described previously. For example, this turns on the
1785 kmalloc tracepoint:
1786 <literallayout class='monospaced'>
1787 root@sugarbay:/sys/kernel/debug/tracing/events/kmem/kmalloc# echo 1 > enable
1788 </literallayout>
1789 At the moment, we're not interested in the function tracer or
1790 some other tracer that might be in effect, so we first turn
1791 it off, but if we do that, we still need to turn tracing on in
1792 order to see the events in the output buffer:
1793 <literallayout class='monospaced'>
1794 root@sugarbay:/sys/kernel/debug/tracing# echo nop > current_tracer
1795 root@sugarbay:/sys/kernel/debug/tracing# echo 1 > tracing_on
1796 </literallayout>
1797 Now, if we look at the the 'trace' file, we see nothing
1798 but the kmalloc events we just turned on:
1799 <literallayout class='monospaced'>
1800 root@sugarbay:/sys/kernel/debug/tracing# cat trace | less
1801 # tracer: nop
1802 #
1803 # entries-in-buffer/entries-written: 1897/1897 #P:8
1804 #
1805 # _-----=&gt; irqs-off
1806 # / _----=&gt; need-resched
1807 # | / _---=&gt; hardirq/softirq
1808 # || / _--=&gt; preempt-depth
1809 # ||| / delay
1810 # TASK-PID CPU# |||| TIMESTAMP FUNCTION
1811 # | | | |||| | |
1812 dropbear-1465 [000] ...1 18154.620753: kmalloc: call_site=ffffffff816650d4 ptr=ffff8800729c3000 bytes_req=2048 bytes_alloc=2048 gfp_flags=GFP_KERNEL
1813 &lt;idle&gt;-0 [000] ..s3 18154.621640: kmalloc: call_site=ffffffff81619b36 ptr=ffff88006d555800 bytes_req=512 bytes_alloc=512 gfp_flags=GFP_ATOMIC
1814 &lt;idle&gt;-0 [000] ..s3 18154.621656: kmalloc: call_site=ffffffff81619b36 ptr=ffff88006d555800 bytes_req=512 bytes_alloc=512 gfp_flags=GFP_ATOMIC
1815 matchbox-termin-1361 [001] ...1 18154.755472: kmalloc: call_site=ffffffff81614050 ptr=ffff88006d5f0e00 bytes_req=512 bytes_alloc=512 gfp_flags=GFP_KERNEL|GFP_REPEAT
1816 Xorg-1264 [002] ...1 18154.755581: kmalloc: call_site=ffffffff8141abe8 ptr=ffff8800734f4cc0 bytes_req=168 bytes_alloc=192 gfp_flags=GFP_KERNEL|GFP_NOWARN|GFP_NORETRY
1817 Xorg-1264 [002] ...1 18154.755583: kmalloc: call_site=ffffffff814192a3 ptr=ffff88001f822520 bytes_req=24 bytes_alloc=32 gfp_flags=GFP_KERNEL|GFP_ZERO
1818 Xorg-1264 [002] ...1 18154.755589: kmalloc: call_site=ffffffff81419edb ptr=ffff8800721a2f00 bytes_req=64 bytes_alloc=64 gfp_flags=GFP_KERNEL|GFP_ZERO
1819 matchbox-termin-1361 [001] ...1 18155.354594: kmalloc: call_site=ffffffff81614050 ptr=ffff88006db35400 bytes_req=576 bytes_alloc=1024 gfp_flags=GFP_KERNEL|GFP_REPEAT
1820 Xorg-1264 [002] ...1 18155.354703: kmalloc: call_site=ffffffff8141abe8 ptr=ffff8800734f4cc0 bytes_req=168 bytes_alloc=192 gfp_flags=GFP_KERNEL|GFP_NOWARN|GFP_NORETRY
1821 Xorg-1264 [002] ...1 18155.354705: kmalloc: call_site=ffffffff814192a3 ptr=ffff88001f822520 bytes_req=24 bytes_alloc=32 gfp_flags=GFP_KERNEL|GFP_ZERO
1822 Xorg-1264 [002] ...1 18155.354711: kmalloc: call_site=ffffffff81419edb ptr=ffff8800721a2f00 bytes_req=64 bytes_alloc=64 gfp_flags=GFP_KERNEL|GFP_ZERO
1823 &lt;idle&gt;-0 [000] ..s3 18155.673319: kmalloc: call_site=ffffffff81619b36 ptr=ffff88006d555800 bytes_req=512 bytes_alloc=512 gfp_flags=GFP_ATOMIC
1824 dropbear-1465 [000] ...1 18155.673525: kmalloc: call_site=ffffffff816650d4 ptr=ffff8800729c3000 bytes_req=2048 bytes_alloc=2048 gfp_flags=GFP_KERNEL
1825 &lt;idle&gt;-0 [000] ..s3 18155.674821: kmalloc: call_site=ffffffff81619b36 ptr=ffff88006d554800 bytes_req=512 bytes_alloc=512 gfp_flags=GFP_ATOMIC
1826 &lt;idle&gt;-0 [000] ..s3 18155.793014: kmalloc: call_site=ffffffff81619b36 ptr=ffff88006d554800 bytes_req=512 bytes_alloc=512 gfp_flags=GFP_ATOMIC
1827 dropbear-1465 [000] ...1 18155.793219: kmalloc: call_site=ffffffff816650d4 ptr=ffff8800729c3000 bytes_req=2048 bytes_alloc=2048 gfp_flags=GFP_KERNEL
1828 &lt;idle&gt;-0 [000] ..s3 18155.794147: kmalloc: call_site=ffffffff81619b36 ptr=ffff88006d555800 bytes_req=512 bytes_alloc=512 gfp_flags=GFP_ATOMIC
1829 &lt;idle&gt;-0 [000] ..s3 18155.936705: kmalloc: call_site=ffffffff81619b36 ptr=ffff88006d555800 bytes_req=512 bytes_alloc=512 gfp_flags=GFP_ATOMIC
1830 dropbear-1465 [000] ...1 18155.936910: kmalloc: call_site=ffffffff816650d4 ptr=ffff8800729c3000 bytes_req=2048 bytes_alloc=2048 gfp_flags=GFP_KERNEL
1831 &lt;idle&gt;-0 [000] ..s3 18155.937869: kmalloc: call_site=ffffffff81619b36 ptr=ffff88006d554800 bytes_req=512 bytes_alloc=512 gfp_flags=GFP_ATOMIC
1832 matchbox-termin-1361 [001] ...1 18155.953667: kmalloc: call_site=ffffffff81614050 ptr=ffff88006d5f2000 bytes_req=512 bytes_alloc=512 gfp_flags=GFP_KERNEL|GFP_REPEAT
1833 Xorg-1264 [002] ...1 18155.953775: kmalloc: call_site=ffffffff8141abe8 ptr=ffff8800734f4cc0 bytes_req=168 bytes_alloc=192 gfp_flags=GFP_KERNEL|GFP_NOWARN|GFP_NORETRY
1834 Xorg-1264 [002] ...1 18155.953777: kmalloc: call_site=ffffffff814192a3 ptr=ffff88001f822520 bytes_req=24 bytes_alloc=32 gfp_flags=GFP_KERNEL|GFP_ZERO
1835 Xorg-1264 [002] ...1 18155.953783: kmalloc: call_site=ffffffff81419edb ptr=ffff8800721a2f00 bytes_req=64 bytes_alloc=64 gfp_flags=GFP_KERNEL|GFP_ZERO
1836 &lt;idle&gt;-0 [000] ..s3 18156.176053: kmalloc: call_site=ffffffff81619b36 ptr=ffff88006d554800 bytes_req=512 bytes_alloc=512 gfp_flags=GFP_ATOMIC
1837 dropbear-1465 [000] ...1 18156.176257: kmalloc: call_site=ffffffff816650d4 ptr=ffff8800729c3000 bytes_req=2048 bytes_alloc=2048 gfp_flags=GFP_KERNEL
1838 &lt;idle&gt;-0 [000] ..s3 18156.177717: kmalloc: call_site=ffffffff81619b36 ptr=ffff88006d555800 bytes_req=512 bytes_alloc=512 gfp_flags=GFP_ATOMIC
1839 &lt;idle&gt;-0 [000] ..s3 18156.399229: kmalloc: call_site=ffffffff81619b36 ptr=ffff88006d555800 bytes_req=512 bytes_alloc=512 gfp_flags=GFP_ATOMIC
1840 dropbear-1465 [000] ...1 18156.399434: kmalloc: call_site=ffffffff816650d4 ptr=ffff8800729c3000 bytes_http://rostedt.homelinux.com/kernelshark/req=2048 bytes_alloc=2048 gfp_flags=GFP_KERNEL
1841 &lt;idle&gt;-0 [000] ..s3 18156.400660: kmalloc: call_site=ffffffff81619b36 ptr=ffff88006d554800 bytes_req=512 bytes_alloc=512 gfp_flags=GFP_ATOMIC
1842 matchbox-termin-1361 [001] ...1 18156.552800: kmalloc: call_site=ffffffff81614050 ptr=ffff88006db34800 bytes_req=576 bytes_alloc=1024 gfp_flags=GFP_KERNEL|GFP_REPEAT
1843 </literallayout>
1844 To again disable the kmalloc event, we need to send 0 to the
1845 enable file:
1846 <literallayout class='monospaced'>
1847 root@sugarbay:/sys/kernel/debug/tracing/events/kmem/kmalloc# echo 0 > enable
1848 </literallayout>
1849 You can enable any number of events or complete subsystems
1850 (by using the 'enable' file in the subsystem directory) and
1851 get an arbitrarily fine-grained idea of what's going on in the
1852 system by enabling as many of the appropriate tracepoints
1853 as applicable.
1854 </para>
1855
1856 <para>
1857 A number of the tools described in this HOWTO do just that,
1858 including trace-cmd and kernelshark in the next section.
1859 </para>
1860
1861 <informalexample>
1862 <emphasis>Tying it Together:</emphasis> These tracepoints and their representation
1863 are used not only by ftrace, but by many of the other tools
1864 covered in this document and they form a central point of
1865 integration for the various tracers available in Linux.
1866 They form a central part of the instrumentation for the
1867 following tools: perf, lttng, ftrace, blktrace and SystemTap
1868 </informalexample>
1869
1870 <informalexample>
1871 <emphasis>Tying it Together:</emphasis> Eventually all the special-purpose tracers
1872 currently available in /sys/kernel/debug/tracing will be
1873 removed and replaced with equivalent tracers based on the
1874 'trace events' subsystem.
1875 </informalexample>
1876 </section>
1877
1878 <section id='trace-cmd-kernelshark'>
1879 <title>trace-cmd/kernelshark</title>
1880
1881 <para>
1882 trace-cmd is essentially an extensive command-line 'wrapper'
1883 interface that hides the details of all the individual files
1884 in /sys/kernel/debug/tracing, allowing users to specify
1885 specific particular events within the
1886 /sys/kernel/debug/tracing/events/ subdirectory and to collect
1887 traces and avoid having to deal with those details directly.
1888 </para>
1889
1890 <para>
1891 As yet another layer on top of that, kernelshark provides a GUI
1892 that allows users to start and stop traces and specify sets
1893 of events using an intuitive interface, and view the
1894 output as both trace events and as a per-CPU graphical
1895 display. It directly uses 'trace-cmd' as the plumbing
1896 that accomplishes all that underneath the covers (and
1897 actually displays the trace-cmd command it uses, as we'll see).
1898 </para>
1899
1900 <para>
1901 To start a trace using kernelshark, first start kernelshark:
1902 <literallayout class='monospaced'>
1903 root@sugarbay:~# kernelshark
1904 </literallayout>
1905 Then bring up the 'Capture' dialog by choosing from the
1906 kernelshark menu:
1907 <literallayout class='monospaced'>
1908 Capture | Record
1909 </literallayout>
1910 That will display the following dialog, which allows you to
1911 choose one or more events (or even one or more complete
1912 subsystems) to trace:
1913 </para>
1914
1915 <para>
1916 <imagedata fileref="figures/kernelshark-choose-events.png" width="6in" depth="6in" align="center" scalefit="1" />
1917 </para>
1918
1919 <para>
1920 Note that these are exactly the same sets of events described
1921 in the previous trace events subsystem section, and in fact
1922 is where trace-cmd gets them for kernelshark.
1923 </para>
1924
1925 <para>
1926 In the above screenshot, we've decided to explore the
1927 graphics subsystem a bit and so have chosen to trace all
1928 the tracepoints contained within the 'i915' and 'drm'
1929 subsystems.
1930 </para>
1931
1932 <para>
1933 After doing that, we can start and stop the trace using
1934 the 'Run' and 'Stop' button on the lower right corner of
1935 the dialog (the same button will turn into the 'Stop'
1936 button after the trace has started):
1937 </para>
1938
1939 <para>
1940 <imagedata fileref="figures/kernelshark-output-display.png" width="6in" depth="6in" align="center" scalefit="1" />
1941 </para>
1942
1943 <para>
1944 Notice that the right-hand pane shows the exact trace-cmd
1945 command-line that's used to run the trace, along with the
1946 results of the trace-cmd run.
1947 </para>
1948
1949 <para>
1950 Once the 'Stop' button is pressed, the graphical view magically
1951 fills up with a colorful per-cpu display of the trace data,
1952 along with the detailed event listing below that:
1953 </para>
1954
1955 <para>
1956 <imagedata fileref="figures/kernelshark-i915-display.png" width="6in" depth="7in" align="center" scalefit="1" />
1957 </para>
1958
1959 <para>
1960 Here's another example, this time a display resulting
1961 from tracing 'all events':
1962 </para>
1963
1964 <para>
1965 <imagedata fileref="figures/kernelshark-all.png" width="6in" depth="7in" align="center" scalefit="1" />
1966 </para>
1967
1968 <para>
1969 The tool is pretty self-explanatory, but for more detailed
1970 information on navigating through the data, see the
1971 <ulink url='http://rostedt.homelinux.com/kernelshark/'>kernelshark website</ulink>.
1972 </para>
1973 </section>
1974
1975 <section id='ftrace-documentation'>
1976 <title>Documentation</title>
1977
1978 <para>
1979 The documentation for ftrace can be found in the kernel
1980 Documentation directory:
1981 <literallayout class='monospaced'>
1982 Documentation/trace/ftrace.txt
1983 </literallayout>
1984 The documentation for the trace event subsystem can also
1985 be found in the kernel Documentation directory:
1986 <literallayout class='monospaced'>
1987 Documentation/trace/events.txt
1988 </literallayout>
1989 There is a nice series of articles on using
1990 ftrace and trace-cmd at LWN:
1991 <itemizedlist>
1992 <listitem><para><ulink url='http://lwn.net/Articles/365835/'>Debugging the kernel using Ftrace - part 1</ulink>
1993 </para></listitem>
1994 <listitem><para><ulink url='http://lwn.net/Articles/366796/'>Debugging the kernel using Ftrace - part 2</ulink>
1995 </para></listitem>
1996 <listitem><para><ulink url='http://lwn.net/Articles/370423/'>Secrets of the Ftrace function tracer</ulink>
1997 </para></listitem>
1998 <listitem><para><ulink url='https://lwn.net/Articles/410200/'>trace-cmd: A front-end for Ftrace</ulink>
1999 </para></listitem>
2000 </itemizedlist>
2001 </para>
2002
2003 <para>
2004 There's more detailed documentation kernelshark usage here:
2005 <ulink url='http://rostedt.homelinux.com/kernelshark/'>KernelShark</ulink>
2006 </para>
2007
2008 <para>
2009 An amusing yet useful README (a tracing mini-HOWTO) can be
2010 found in /sys/kernel/debug/tracing/README.
2011 </para>
2012 </section>
2013</section>
2014
2015<section id='profile-manual-systemtap'>
2016 <title>systemtap</title>
2017
2018 <para>
2019 SystemTap is a system-wide script-based tracing and profiling tool.
2020 </para>
2021
2022 <para>
2023 SystemTap scripts are C-like programs that are executed in the
2024 kernel to gather/print/aggregate data extracted from the context
2025 they end up being invoked under.
2026 </para>
2027
2028 <para>
2029 For example, this probe from the
2030 <ulink url='http://sourceware.org/systemtap/tutorial/'>SystemTap tutorial</ulink>
2031 simply prints a line every time any process on the system open()s
2032 a file. For each line, it prints the executable name of the
2033 program that opened the file, along with its PID, and the name
2034 of the file it opened (or tried to open), which it extracts
2035 from the open syscall's argstr.
2036 <literallayout class='monospaced'>
2037 probe syscall.open
2038 {
2039 printf ("%s(%d) open (%s)\n", execname(), pid(), argstr)
2040 }
2041
2042 probe timer.ms(4000) # after 4 seconds
2043 {
2044 exit ()
2045 }
2046 </literallayout>
2047 Normally, to execute this probe, you'd simply install
2048 systemtap on the system you want to probe, and directly run
2049 the probe on that system e.g. assuming the name of the file
2050 containing the above text is trace_open.stp:
2051 <literallayout class='monospaced'>
2052 # stap trace_open.stp
2053 </literallayout>
2054 What systemtap does under the covers to run this probe is 1)
2055 parse and convert the probe to an equivalent 'C' form, 2)
2056 compile the 'C' form into a kernel module, 3) insert the
2057 module into the kernel, which arms it, and 4) collect the data
2058 generated by the probe and display it to the user.
2059 </para>
2060
2061 <para>
2062 In order to accomplish steps 1 and 2, the 'stap' program needs
2063 access to the kernel build system that produced the kernel
2064 that the probed system is running. In the case of a typical
2065 embedded system (the 'target'), the kernel build system
2066 unfortunately isn't typically part of the image running on
2067 the target. It is normally available on the 'host' system
2068 that produced the target image however; in such cases,
2069 steps 1 and 2 are executed on the host system, and steps
2070 3 and 4 are executed on the target system, using only the
2071 systemtap 'runtime'.
2072 </para>
2073
2074 <para>
2075 The systemtap support in Yocto assumes that only steps
2076 3 and 4 are run on the target; it is possible to do
2077 everything on the target, but this section assumes only
2078 the typical embedded use-case.
2079 </para>
2080
2081 <para>
2082 So basically what you need to do in order to run a systemtap
2083 script on the target is to 1) on the host system, compile the
2084 probe into a kernel module that makes sense to the target, 2)
2085 copy the module onto the target system and 3) insert the
2086 module into the target kernel, which arms it, and 4) collect
2087 the data generated by the probe and display it to the user.
2088 </para>
2089
2090 <section id='systemtap-setup'>
2091 <title>Setup</title>
2092
2093 <para>
2094 Those are a lot of steps and a lot of details, but
2095 fortunately Yocto includes a script called 'crosstap'
2096 that will take care of those details, allowing you to
2097 simply execute a systemtap script on the remote target,
2098 with arguments if necessary.
2099 </para>
2100
2101 <para>
2102 In order to do this from a remote host, however, you
2103 need to have access to the build for the image you
2104 booted. The 'crosstap' script provides details on how
2105 to do this if you run the script on the host without having
2106 done a build:
2107 <note>
2108 SystemTap, which uses 'crosstap', assumes you can establish an
2109 ssh connection to the remote target.
2110 Please refer to the crosstap wiki page for details on verifying
2111 ssh connections at
2112 <ulink url='https://wiki.yoctoproject.org/wiki/Tracing_and_Profiling#systemtap'></ulink>.
2113 Also, the ability to ssh into the target system is not enabled
2114 by default in *-minimal images.
2115 </note>
2116 <literallayout class='monospaced'>
2117 $ crosstap root@192.168.1.88 trace_open.stp
2118
2119 Error: No target kernel build found.
2120 Did you forget to create a local build of your image?
2121
2122 'crosstap' requires a local sdk build of the target system
2123 (or a build that includes 'tools-profile') in order to build
2124 kernel modules that can probe the target system.
2125
2126 Practically speaking, that means you need to do the following:
2127 - If you're running a pre-built image, download the release
2128 and/or BSP tarballs used to build the image.
2129 - If you're working from git sources, just clone the metadata
2130 and BSP layers needed to build the image you'll be booting.
2131 - Make sure you're properly set up to build a new image (see
2132 the BSP README and/or the widely available basic documentation
2133 that discusses how to build images).
2134 - Build an -sdk version of the image e.g.:
2135 $ bitbake core-image-sato-sdk
2136 OR
2137 - Build a non-sdk image but include the profiling tools:
2138 [ edit local.conf and add 'tools-profile' to the end of
2139 the EXTRA_IMAGE_FEATURES variable ]
2140 $ bitbake core-image-sato
2141
2142 Once you've build the image on the host system, you're ready to
2143 boot it (or the equivalent pre-built image) and use 'crosstap'
2144 to probe it (you need to source the environment as usual first):
2145
2146 $ source oe-init-build-env
2147 $ cd ~/my/systemtap/scripts
2148 $ crosstap root@192.168.1.xxx myscript.stp
2149 </literallayout>
2150 So essentially what you need to do is build an SDK image or
2151 image with 'tools-profile' as detailed in the
2152 "<link linkend='profile-manual-general-setup'>General Setup</link>"
2153 section of this manual, and boot the resulting target image.
2154 </para>
2155
2156 <note>
2157 If you have a build directory containing multiple machines,
2158 you need to have the MACHINE you're connecting to selected
2159 in local.conf, and the kernel in that machine's build
2160 directory must match the kernel on the booted system exactly,
2161 or you'll get the above 'crosstap' message when you try to
2162 invoke a script.
2163 </note>
2164 </section>
2165
2166 <section id='running-a-script-on-a-target'>
2167 <title>Running a Script on a Target</title>
2168
2169 <para>
2170 Once you've done that, you should be able to run a systemtap
2171 script on the target:
2172 <literallayout class='monospaced'>
2173 $ cd /path/to/yocto
2174 $ source oe-init-build-env
2175
2176 ### Shell environment set up for builds. ###
2177
2178 You can now run 'bitbake &lt;target&gt;'
2179
2180 Common targets are:
2181 core-image-minimal
2182 core-image-sato
2183 meta-toolchain
2184 meta-ide-support
2185
2186 You can also run generated qemu images with a command like 'runqemu qemux86-64'
2187
2188 </literallayout>
2189 Once you've done that, you can cd to whatever directory
2190 contains your scripts and use 'crosstap' to run the script:
2191 <literallayout class='monospaced'>
2192 $ cd /path/to/my/systemap/script
2193 $ crosstap root@192.168.7.2 trace_open.stp
2194 </literallayout>
2195 If you get an error connecting to the target e.g.:
2196 <literallayout class='monospaced'>
2197 $ crosstap root@192.168.7.2 trace_open.stp
2198 error establishing ssh connection on remote 'root@192.168.7.2'
2199 </literallayout>
2200 Try ssh'ing to the target and see what happens:
2201 <literallayout class='monospaced'>
2202 $ ssh root@192.168.7.2
2203 </literallayout>
2204 A lot of the time, connection problems are due specifying a
2205 wrong IP address or having a 'host key verification error'.
2206 </para>
2207
2208 <para>
2209 If everything worked as planned, you should see something
2210 like this (enter the password when prompted, or press enter
2211 if it's set up to use no password):
2212 <literallayout class='monospaced'>
2213 $ crosstap root@192.168.7.2 trace_open.stp
2214 root@192.168.7.2's password:
2215 matchbox-termin(1036) open ("/tmp/vte3FS2LW", O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0600)
2216 matchbox-termin(1036) open ("/tmp/vteJMC7LW", O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0600)
2217 </literallayout>
2218 </para>
2219 </section>
2220
2221 <section id='systemtap-documentation'>
2222 <title>Documentation</title>
2223
2224 <para>
2225 The SystemTap language reference can be found here:
2226 <ulink url='http://sourceware.org/systemtap/langref/'>SystemTap Language Reference</ulink>
2227 </para>
2228
2229 <para>
2230 Links to other SystemTap documents, tutorials, and examples can be
2231 found here:
2232 <ulink url='http://sourceware.org/systemtap/documentation.html'>SystemTap documentation page</ulink>
2233 </para>
2234 </section>
2235</section>
2236
2237<section id='profile-manual-sysprof'>
2238 <title>Sysprof</title>
2239
2240 <para>
2241 Sysprof is a very easy to use system-wide profiler that consists
2242 of a single window with three panes and a few buttons which allow
2243 you to start, stop, and view the profile from one place.
2244 </para>
2245
2246 <section id='sysprof-setup'>
2247 <title>Setup</title>
2248
2249 <para>
2250 For this section, we'll assume you've already performed the
2251 basic setup outlined in the General Setup section.
2252 </para>
2253
2254 <para>
2255 Sysprof is a GUI-based application that runs on the target
2256 system. For the rest of this document we assume you've
2257 ssh'ed to the host and will be running Sysprof on the
2258 target (you can use the '-X' option to ssh and have the
2259 Sysprof GUI run on the target but display remotely on the
2260 host if you want).
2261 </para>
2262 </section>
2263
2264 <section id='sysprof-basic-usage'>
2265 <title>Basic Usage</title>
2266
2267 <para>
2268 To start profiling the system, you simply press the 'Start'
2269 button. To stop profiling and to start viewing the profile data
2270 in one easy step, press the 'Profile' button.
2271 </para>
2272
2273 <para>
2274 Once you've pressed the profile button, the three panes will
2275 fill up with profiling data:
2276 </para>
2277
2278 <para>
2279 <imagedata fileref="figures/sysprof-copy-to-user.png" width="6in" depth="4in" align="center" scalefit="1" />
2280 </para>
2281
2282 <para>
2283 The left pane shows a list of functions and processes.
2284 Selecting one of those expands that function in the right
2285 pane, showing all its callees. Note that this caller-oriented
2286 display is essentially the inverse of perf's default
2287 callee-oriented callchain display.
2288 </para>
2289
2290 <para>
2291 In the screenshot above, we're focusing on __copy_to_user_ll()
2292 and looking up the callchain we can see that one of the callers
2293 of __copy_to_user_ll is sys_read() and the complete callpath
2294 between them. Notice that this is essentially a portion of the
2295 same information we saw in the perf display shown in the perf
2296 section of this page.
2297 </para>
2298
2299 <para>
2300 <imagedata fileref="figures/sysprof-copy-from-user.png" width="6in" depth="4in" align="center" scalefit="1" />
2301 </para>
2302
2303 <para>
2304 Similarly, the above is a snapshot of the Sysprof display of a
2305 copy-from-user callchain.
2306 </para>
2307
2308 <para>
2309 Finally, looking at the third Sysprof pane in the lower left,
2310 we can see a list of all the callers of a particular function
2311 selected in the top left pane. In this case, the lower pane is
2312 showing all the callers of __mark_inode_dirty:
2313 </para>
2314
2315 <para>
2316 <imagedata fileref="figures/sysprof-callers.png" width="6in" depth="4in" align="center" scalefit="1" />
2317 </para>
2318
2319 <para>
2320 Double-clicking on one of those functions will in turn change the
2321 focus to the selected function, and so on.
2322 </para>
2323
2324 <informalexample>
2325 <emphasis>Tying it Together:</emphasis> If you like sysprof's 'caller-oriented'
2326 display, you may be able to approximate it in other tools as
2327 well. For example, 'perf report' has the -g (--call-graph)
2328 option that you can experiment with; one of the options is
2329 'caller' for an inverted caller-based callgraph display.
2330 </informalexample>
2331 </section>
2332
2333 <section id='sysprof-documentation'>
2334 <title>Documentation</title>
2335
2336 <para>
2337 There doesn't seem to be any documentation for Sysprof, but
2338 maybe that's because it's pretty self-explanatory.
2339 The Sysprof website, however, is here:
2340 <ulink url='http://sysprof.com/'>Sysprof, System-wide Performance Profiler for Linux</ulink>
2341 </para>
2342 </section>
2343</section>
2344
2345<section id='lttng-linux-trace-toolkit-next-generation'>
2346 <title>LTTng (Linux Trace Toolkit, next generation)</title>
2347
2348 <section id='lttng-setup'>
2349 <title>Setup</title>
2350
2351 <para>
2352 For this section, we'll assume you've already performed the
2353 basic setup outlined in the General Setup section.
2354 LTTng is run on the target system by ssh'ing to it.
2355 </para>
2356 </section>
2357
2358 <section id='collecting-and-viewing-traces'>
2359 <title>Collecting and Viewing Traces</title>
2360
2361 <para>
2362 Once you've applied the above commits and built and booted your
2363 image (you need to build the core-image-sato-sdk image or use one of the
2364 other methods described in the General Setup section), you're
2365 ready to start tracing.
2366 </para>
2367
2368 <section id='collecting-and-viewing-a-trace-on-the-target-inside-a-shell'>
2369 <title>Collecting and viewing a trace on the target (inside a shell)</title>
2370
2371 <para>
2372 First, from the host, ssh to the target:
2373 <literallayout class='monospaced'>
2374 $ ssh -l root 192.168.1.47
2375 The authenticity of host '192.168.1.47 (192.168.1.47)' can't be established.
2376 RSA key fingerprint is 23:bd:c8:b1:a8:71:52:00:ee:00:4f:64:9e:10:b9:7e.
2377 Are you sure you want to continue connecting (yes/no)? yes
2378 Warning: Permanently added '192.168.1.47' (RSA) to the list of known hosts.
2379 root@192.168.1.47's password:
2380 </literallayout>
2381 Once on the target, use these steps to create a trace:
2382 <literallayout class='monospaced'>
2383 root@crownbay:~# lttng create
2384 Spawning a session daemon
2385 Session auto-20121015-232120 created.
2386 Traces will be written in /home/root/lttng-traces/auto-20121015-232120
2387 </literallayout>
2388 Enable the events you want to trace (in this case all
2389 kernel events):
2390 <literallayout class='monospaced'>
2391 root@crownbay:~# lttng enable-event --kernel --all
2392 All kernel events are enabled in channel channel0
2393 </literallayout>
2394 Start the trace:
2395 <literallayout class='monospaced'>
2396 root@crownbay:~# lttng start
2397 Tracing started for session auto-20121015-232120
2398 </literallayout>
2399 And then stop the trace after awhile or after running
2400 a particular workload that you want to trace:
2401 <literallayout class='monospaced'>
2402 root@crownbay:~# lttng stop
2403 Tracing stopped for session auto-20121015-232120
2404 </literallayout>
2405 You can now view the trace in text form on the target:
2406 <literallayout class='monospaced'>
2407 root@crownbay:~# lttng view
2408 [23:21:56.989270399] (+?.?????????) sys_geteuid: { 1 }, { }
2409 [23:21:56.989278081] (+0.000007682) exit_syscall: { 1 }, { ret = 0 }
2410 [23:21:56.989286043] (+0.000007962) sys_pipe: { 1 }, { fildes = 0xB77B9E8C }
2411 [23:21:56.989321802] (+0.000035759) exit_syscall: { 1 }, { ret = 0 }
2412 [23:21:56.989329345] (+0.000007543) sys_mmap_pgoff: { 1 }, { addr = 0x0, len = 10485760, prot = 3, flags = 131362, fd = 4294967295, pgoff = 0 }
2413 [23:21:56.989351694] (+0.000022349) exit_syscall: { 1 }, { ret = -1247805440 }
2414 [23:21:56.989432989] (+0.000081295) sys_clone: { 1 }, { clone_flags = 0x411, newsp = 0xB5EFFFE4, parent_tid = 0xFFFFFFFF, child_tid = 0x0 }
2415 [23:21:56.989477129] (+0.000044140) sched_stat_runtime: { 1 }, { comm = "lttng-consumerd", tid = 1193, runtime = 681660, vruntime = 43367983388 }
2416 [23:21:56.989486697] (+0.000009568) sched_migrate_task: { 1 }, { comm = "lttng-consumerd", tid = 1193, prio = 20, orig_cpu = 1, dest_cpu = 1 }
2417 [23:21:56.989508418] (+0.000021721) hrtimer_init: { 1 }, { hrtimer = 3970832076, clockid = 1, mode = 1 }
2418 [23:21:56.989770462] (+0.000262044) hrtimer_cancel: { 1 }, { hrtimer = 3993865440 }
2419 [23:21:56.989771580] (+0.000001118) hrtimer_cancel: { 0 }, { hrtimer = 3993812192 }
2420 [23:21:56.989776957] (+0.000005377) hrtimer_expire_entry: { 1 }, { hrtimer = 3993865440, now = 79815980007057, function = 3238465232 }
2421 [23:21:56.989778145] (+0.000001188) hrtimer_expire_entry: { 0 }, { hrtimer = 3993812192, now = 79815980008174, function = 3238465232 }
2422 [23:21:56.989791695] (+0.000013550) softirq_raise: { 1 }, { vec = 1 }
2423 [23:21:56.989795396] (+0.000003701) softirq_raise: { 0 }, { vec = 1 }
2424 [23:21:56.989800635] (+0.000005239) softirq_raise: { 0 }, { vec = 9 }
2425 [23:21:56.989807130] (+0.000006495) sched_stat_runtime: { 1 }, { comm = "lttng-consumerd", tid = 1193, runtime = 330710, vruntime = 43368314098 }
2426 [23:21:56.989809993] (+0.000002863) sched_stat_runtime: { 0 }, { comm = "lttng-sessiond", tid = 1181, runtime = 1015313, vruntime = 36976733240 }
2427 [23:21:56.989818514] (+0.000008521) hrtimer_expire_exit: { 0 }, { hrtimer = 3993812192 }
2428 [23:21:56.989819631] (+0.000001117) hrtimer_expire_exit: { 1 }, { hrtimer = 3993865440 }
2429 [23:21:56.989821866] (+0.000002235) hrtimer_start: { 0 }, { hrtimer = 3993812192, function = 3238465232, expires = 79815981000000, softexpires = 79815981000000 }
2430 [23:21:56.989822984] (+0.000001118) hrtimer_start: { 1 }, { hrtimer = 3993865440, function = 3238465232, expires = 79815981000000, softexpires = 79815981000000 }
2431 [23:21:56.989832762] (+0.000009778) softirq_entry: { 1 }, { vec = 1 }
2432 [23:21:56.989833879] (+0.000001117) softirq_entry: { 0 }, { vec = 1 }
2433 [23:21:56.989838069] (+0.000004190) timer_cancel: { 1 }, { timer = 3993871956 }
2434 [23:21:56.989839187] (+0.000001118) timer_cancel: { 0 }, { timer = 3993818708 }
2435 [23:21:56.989841492] (+0.000002305) timer_expire_entry: { 1 }, { timer = 3993871956, now = 79515980, function = 3238277552 }
2436 [23:21:56.989842819] (+0.000001327) timer_expire_entry: { 0 }, { timer = 3993818708, now = 79515980, function = 3238277552 }
2437 [23:21:56.989854831] (+0.000012012) sched_stat_runtime: { 1 }, { comm = "lttng-consumerd", tid = 1193, runtime = 49237, vruntime = 43368363335 }
2438 [23:21:56.989855949] (+0.000001118) sched_stat_runtime: { 0 }, { comm = "lttng-sessiond", tid = 1181, runtime = 45121, vruntime = 36976778361 }
2439 [23:21:56.989861257] (+0.000005308) sched_stat_sleep: { 1 }, { comm = "kworker/1:1", tid = 21, delay = 9451318 }
2440 [23:21:56.989862374] (+0.000001117) sched_stat_sleep: { 0 }, { comm = "kworker/0:0", tid = 4, delay = 9958820 }
2441 [23:21:56.989868241] (+0.000005867) sched_wakeup: { 0 }, { comm = "kworker/0:0", tid = 4, prio = 120, success = 1, target_cpu = 0 }
2442 [23:21:56.989869358] (+0.000001117) sched_wakeup: { 1 }, { comm = "kworker/1:1", tid = 21, prio = 120, success = 1, target_cpu = 1 }
2443 [23:21:56.989877460] (+0.000008102) timer_expire_exit: { 1 }, { timer = 3993871956 }
2444 [23:21:56.989878577] (+0.000001117) timer_expire_exit: { 0 }, { timer = 3993818708 }
2445 .
2446 .
2447 .
2448 </literallayout>
2449 You can now safely destroy the trace session (note that
2450 this doesn't delete the trace - it's still there
2451 in ~/lttng-traces):
2452 <literallayout class='monospaced'>
2453 root@crownbay:~# lttng destroy
2454 Session auto-20121015-232120 destroyed at /home/root
2455 </literallayout>
2456 Note that the trace is saved in a directory of the same
2457 name as returned by 'lttng create', under the ~/lttng-traces
2458 directory (note that you can change this by supplying your
2459 own name to 'lttng create'):
2460 <literallayout class='monospaced'>
2461 root@crownbay:~# ls -al ~/lttng-traces
2462 drwxrwx--- 3 root root 1024 Oct 15 23:21 .
2463 drwxr-xr-x 5 root root 1024 Oct 15 23:57 ..
2464 drwxrwx--- 3 root root 1024 Oct 15 23:21 auto-20121015-232120
2465 </literallayout>
2466 </para>
2467 </section>
2468
2469 <section id='collecting-and-viewing-a-userspace-trace-on-the-target-inside-a-shell'>
2470 <title>Collecting and viewing a userspace trace on the target (inside a shell)</title>
2471
2472 <para>
2473 For LTTng userspace tracing, you need to have a properly
2474 instrumented userspace program. For this example, we'll use
2475 the 'hello' test program generated by the lttng-ust build.
2476 </para>
2477
2478 <para>
2479 The 'hello' test program isn't installed on the rootfs by
2480 the lttng-ust build, so we need to copy it over manually.
2481 First cd into the build directory that contains the hello
2482 executable:
2483 <literallayout class='monospaced'>
2484 $ cd build/tmp/work/core2_32-poky-linux/lttng-ust/2.0.5-r0/git/tests/hello/.libs
2485 </literallayout>
2486 Copy that over to the target machine:
2487 <literallayout class='monospaced'>
2488 $ scp hello root@192.168.1.20:
2489 </literallayout>
2490 You now have the instrumented lttng 'hello world' test
2491 program on the target, ready to test.
2492 </para>
2493
2494 <para>
2495 First, from the host, ssh to the target:
2496 <literallayout class='monospaced'>
2497 $ ssh -l root 192.168.1.47
2498 The authenticity of host '192.168.1.47 (192.168.1.47)' can't be established.
2499 RSA key fingerprint is 23:bd:c8:b1:a8:71:52:00:ee:00:4f:64:9e:10:b9:7e.
2500 Are you sure you want to continue connecting (yes/no)? yes
2501 Warning: Permanently added '192.168.1.47' (RSA) to the list of known hosts.
2502 root@192.168.1.47's password:
2503 </literallayout>
2504 Once on the target, use these steps to create a trace:
2505 <literallayout class='monospaced'>
2506 root@crownbay:~# lttng create
2507 Session auto-20190303-021943 created.
2508 Traces will be written in /home/root/lttng-traces/auto-20190303-021943
2509 </literallayout>
2510 Enable the events you want to trace (in this case all
2511 userspace events):
2512 <literallayout class='monospaced'>
2513 root@crownbay:~# lttng enable-event --userspace --all
2514 All UST events are enabled in channel channel0
2515 </literallayout>
2516 Start the trace:
2517 <literallayout class='monospaced'>
2518 root@crownbay:~# lttng start
2519 Tracing started for session auto-20190303-021943
2520 </literallayout>
2521 Run the instrumented hello world program:
2522 <literallayout class='monospaced'>
2523 root@crownbay:~# ./hello
2524 Hello, World!
2525 Tracing... done.
2526 </literallayout>
2527 And then stop the trace after awhile or after running a
2528 particular workload that you want to trace:
2529 <literallayout class='monospaced'>
2530 root@crownbay:~# lttng stop
2531 Tracing stopped for session auto-20190303-021943
2532 </literallayout>
2533 You can now view the trace in text form on the target:
2534 <literallayout class='monospaced'>
2535 root@crownbay:~# lttng view
2536 [02:31:14.906146544] (+?.?????????) hello:1424 ust_tests_hello:tptest: { cpu_id = 1 }, { intfield = 0, intfield2 = 0x0, longfield = 0, netintfield = 0, netintfieldhex = 0x0, arrfield1 = [ [0] = 1, [1] = 2, [2] = 3 ], arrfield2 = "test", _seqfield1_length = 4, seqfield1 = [ [0] = 116, [1] = 101, [2] = 115, [3] = 116 ], _seqfield2_length = 4, seqfield2 = "test", stringfield = "test", floatfield = 2222, doublefield = 2, boolfield = 1 }
2537 [02:31:14.906170360] (+0.000023816) hello:1424 ust_tests_hello:tptest: { cpu_id = 1 }, { intfield = 1, intfield2 = 0x1, longfield = 1, netintfield = 1, netintfieldhex = 0x1, arrfield1 = [ [0] = 1, [1] = 2, [2] = 3 ], arrfield2 = "test", _seqfield1_length = 4, seqfield1 = [ [0] = 116, [1] = 101, [2] = 115, [3] = 116 ], _seqfield2_length = 4, seqfield2 = "test", stringfield = "test", floatfield = 2222, doublefield = 2, boolfield = 1 }
2538 [02:31:14.906183140] (+0.000012780) hello:1424 ust_tests_hello:tptest: { cpu_id = 1 }, { intfield = 2, intfield2 = 0x2, longfield = 2, netintfield = 2, netintfieldhex = 0x2, arrfield1 = [ [0] = 1, [1] = 2, [2] = 3 ], arrfield2 = "test", _seqfield1_length = 4, seqfield1 = [ [0] = 116, [1] = 101, [2] = 115, [3] = 116 ], _seqfield2_length = 4, seqfield2 = "test", stringfield = "test", floatfield = 2222, doublefield = 2, boolfield = 1 }
2539 [02:31:14.906194385] (+0.000011245) hello:1424 ust_tests_hello:tptest: { cpu_id = 1 }, { intfield = 3, intfield2 = 0x3, longfield = 3, netintfield = 3, netintfieldhex = 0x3, arrfield1 = [ [0] = 1, [1] = 2, [2] = 3 ], arrfield2 = "test", _seqfield1_length = 4, seqfield1 = [ [0] = 116, [1] = 101, [2] = 115, [3] = 116 ], _seqfield2_length = 4, seqfield2 = "test", stringfield = "test", floatfield = 2222, doublefield = 2, boolfield = 1 }
2540 .
2541 .
2542 .
2543 </literallayout>
2544 You can now safely destroy the trace session (note that
2545 this doesn't delete the trace - it's still
2546 there in ~/lttng-traces):
2547 <literallayout class='monospaced'>
2548 root@crownbay:~# lttng destroy
2549 Session auto-20190303-021943 destroyed at /home/root
2550 </literallayout>
2551 </para>
2552 </section>
2553
2554 </section>
2555
2556 <section id='lltng-documentation'>
2557 <title>Documentation</title>
2558
2559 <para>
2560 You can find the primary LTTng Documentation on the
2561 <ulink url='https://lttng.org/docs/'>LTTng Documentation</ulink>
2562 site.
2563 The documentation on this site is appropriate for intermediate to
2564 advanced software developers who are working in a Linux environment
2565 and are interested in efficient software tracing.
2566 </para>
2567
2568 <para>
2569 For information on LTTng in general, visit the
2570 <ulink url='http://lttng.org/lttng2.0'>LTTng Project</ulink>
2571 site.
2572 You can find a "Getting Started" link on this site that takes
2573 you to an LTTng Quick Start.
2574 </para>
2575 </section>
2576</section>
2577
2578<section id='profile-manual-blktrace'>
2579 <title>blktrace</title>
2580
2581 <para>
2582 blktrace is a tool for tracing and reporting low-level disk I/O.
2583 blktrace provides the tracing half of the equation; its output can
2584 be piped into the blkparse program, which renders the data in a
2585 human-readable form and does some basic analysis:
2586 </para>
2587
2588 <section id='blktrace-setup'>
2589 <title>Setup</title>
2590
2591 <para>
2592 For this section, we'll assume you've already performed the
2593 basic setup outlined in the
2594 "<link linkend='profile-manual-general-setup'>General Setup</link>"
2595 section.
2596 </para>
2597
2598 <para>
2599 blktrace is an application that runs on the target system.
2600 You can run the entire blktrace and blkparse pipeline on the
2601 target, or you can run blktrace in 'listen' mode on the target
2602 and have blktrace and blkparse collect and analyze the data on
2603 the host (see the
2604 "<link linkend='using-blktrace-remotely'>Using blktrace Remotely</link>"
2605 section below).
2606 For the rest of this section we assume you've ssh'ed to the
2607 host and will be running blkrace on the target.
2608 </para>
2609 </section>
2610
2611 <section id='blktrace-basic-usage'>
2612 <title>Basic Usage</title>
2613
2614 <para>
2615 To record a trace, simply run the 'blktrace' command, giving it
2616 the name of the block device you want to trace activity on:
2617 <literallayout class='monospaced'>
2618 root@crownbay:~# blktrace /dev/sdc
2619 </literallayout>
2620 In another shell, execute a workload you want to trace.
2621 <literallayout class='monospaced'>
2622 root@crownbay:/media/sdc# rm linux-2.6.19.2.tar.bz2; wget <ulink url='http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2'>http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2</ulink>; sync
2623 Connecting to downloads.yoctoproject.org (140.211.169.59:80)
2624 linux-2.6.19.2.tar.b 100% |*******************************| 41727k 0:00:00 ETA
2625 </literallayout>
2626 Press Ctrl-C in the blktrace shell to stop the trace. It will
2627 display how many events were logged, along with the per-cpu file
2628 sizes (blktrace records traces in per-cpu kernel buffers and
2629 simply dumps them to userspace for blkparse to merge and sort
2630 later).
2631 <literallayout class='monospaced'>
2632 ^C=== sdc ===
2633 CPU 0: 7082 events, 332 KiB data
2634 CPU 1: 1578 events, 74 KiB data
2635 Total: 8660 events (dropped 0), 406 KiB data
2636 </literallayout>
2637 If you examine the files saved to disk, you see multiple files,
2638 one per CPU and with the device name as the first part of the
2639 filename:
2640 <literallayout class='monospaced'>
2641 root@crownbay:~# ls -al
2642 drwxr-xr-x 6 root root 1024 Oct 27 22:39 .
2643 drwxr-sr-x 4 root root 1024 Oct 26 18:24 ..
2644 -rw-r--r-- 1 root root 339938 Oct 27 22:40 sdc.blktrace.0
2645 -rw-r--r-- 1 root root 75753 Oct 27 22:40 sdc.blktrace.1
2646 </literallayout>
2647 To view the trace events, simply invoke 'blkparse' in the
2648 directory containing the trace files, giving it the device name
2649 that forms the first part of the filenames:
2650 <literallayout class='monospaced'>
2651 root@crownbay:~# blkparse sdc
2652
2653 8,32 1 1 0.000000000 1225 Q WS 3417048 + 8 [jbd2/sdc-8]
2654 8,32 1 2 0.000025213 1225 G WS 3417048 + 8 [jbd2/sdc-8]
2655 8,32 1 3 0.000033384 1225 P N [jbd2/sdc-8]
2656 8,32 1 4 0.000043301 1225 I WS 3417048 + 8 [jbd2/sdc-8]
2657 8,32 1 0 0.000057270 0 m N cfq1225 insert_request
2658 8,32 1 0 0.000064813 0 m N cfq1225 add_to_rr
2659 8,32 1 5 0.000076336 1225 U N [jbd2/sdc-8] 1
2660 8,32 1 0 0.000088559 0 m N cfq workload slice:150
2661 8,32 1 0 0.000097359 0 m N cfq1225 set_active wl_prio:0 wl_type:1
2662 8,32 1 0 0.000104063 0 m N cfq1225 Not idling. st->count:1
2663 8,32 1 0 0.000112584 0 m N cfq1225 fifo= (null)
2664 8,32 1 0 0.000118730 0 m N cfq1225 dispatch_insert
2665 8,32 1 0 0.000127390 0 m N cfq1225 dispatched a request
2666 8,32 1 0 0.000133536 0 m N cfq1225 activate rq, drv=1
2667 8,32 1 6 0.000136889 1225 D WS 3417048 + 8 [jbd2/sdc-8]
2668 8,32 1 7 0.000360381 1225 Q WS 3417056 + 8 [jbd2/sdc-8]
2669 8,32 1 8 0.000377422 1225 G WS 3417056 + 8 [jbd2/sdc-8]
2670 8,32 1 9 0.000388876 1225 P N [jbd2/sdc-8]
2671 8,32 1 10 0.000397886 1225 Q WS 3417064 + 8 [jbd2/sdc-8]
2672 8,32 1 11 0.000404800 1225 M WS 3417064 + 8 [jbd2/sdc-8]
2673 8,32 1 12 0.000412343 1225 Q WS 3417072 + 8 [jbd2/sdc-8]
2674 8,32 1 13 0.000416533 1225 M WS 3417072 + 8 [jbd2/sdc-8]
2675 8,32 1 14 0.000422121 1225 Q WS 3417080 + 8 [jbd2/sdc-8]
2676 8,32 1 15 0.000425194 1225 M WS 3417080 + 8 [jbd2/sdc-8]
2677 8,32 1 16 0.000431968 1225 Q WS 3417088 + 8 [jbd2/sdc-8]
2678 8,32 1 17 0.000435251 1225 M WS 3417088 + 8 [jbd2/sdc-8]
2679 8,32 1 18 0.000440279 1225 Q WS 3417096 + 8 [jbd2/sdc-8]
2680 8,32 1 19 0.000443911 1225 M WS 3417096 + 8 [jbd2/sdc-8]
2681 8,32 1 20 0.000450336 1225 Q WS 3417104 + 8 [jbd2/sdc-8]
2682 8,32 1 21 0.000454038 1225 M WS 3417104 + 8 [jbd2/sdc-8]
2683 8,32 1 22 0.000462070 1225 Q WS 3417112 + 8 [jbd2/sdc-8]
2684 8,32 1 23 0.000465422 1225 M WS 3417112 + 8 [jbd2/sdc-8]
2685 8,32 1 24 0.000474222 1225 I WS 3417056 + 64 [jbd2/sdc-8]
2686 8,32 1 0 0.000483022 0 m N cfq1225 insert_request
2687 8,32 1 25 0.000489727 1225 U N [jbd2/sdc-8] 1
2688 8,32 1 0 0.000498457 0 m N cfq1225 Not idling. st->count:1
2689 8,32 1 0 0.000503765 0 m N cfq1225 dispatch_insert
2690 8,32 1 0 0.000512914 0 m N cfq1225 dispatched a request
2691 8,32 1 0 0.000518851 0 m N cfq1225 activate rq, drv=2
2692 .
2693 .
2694 .
2695 8,32 0 0 58.515006138 0 m N cfq3551 complete rqnoidle 1
2696 8,32 0 2024 58.516603269 3 C WS 3156992 + 16 [0]
2697 8,32 0 0 58.516626736 0 m N cfq3551 complete rqnoidle 1
2698 8,32 0 0 58.516634558 0 m N cfq3551 arm_idle: 8 group_idle: 0
2699 8,32 0 0 58.516636933 0 m N cfq schedule dispatch
2700 8,32 1 0 58.516971613 0 m N cfq3551 slice expired t=0
2701 8,32 1 0 58.516982089 0 m N cfq3551 sl_used=13 disp=6 charge=13 iops=0 sect=80
2702 8,32 1 0 58.516985511 0 m N cfq3551 del_from_rr
2703 8,32 1 0 58.516990819 0 m N cfq3551 put_queue
2704
2705 CPU0 (sdc):
2706 Reads Queued: 0, 0KiB Writes Queued: 331, 26,284KiB
2707 Read Dispatches: 0, 0KiB Write Dispatches: 485, 40,484KiB
2708 Reads Requeued: 0 Writes Requeued: 0
2709 Reads Completed: 0, 0KiB Writes Completed: 511, 41,000KiB
2710 Read Merges: 0, 0KiB Write Merges: 13, 160KiB
2711 Read depth: 0 Write depth: 2
2712 IO unplugs: 23 Timer unplugs: 0
2713 CPU1 (sdc):
2714 Reads Queued: 0, 0KiB Writes Queued: 249, 15,800KiB
2715 Read Dispatches: 0, 0KiB Write Dispatches: 42, 1,600KiB
2716 Reads Requeued: 0 Writes Requeued: 0
2717 Reads Completed: 0, 0KiB Writes Completed: 16, 1,084KiB
2718 Read Merges: 0, 0KiB Write Merges: 40, 276KiB
2719 Read depth: 0 Write depth: 2
2720 IO unplugs: 30 Timer unplugs: 1
2721
2722 Total (sdc):
2723 Reads Queued: 0, 0KiB Writes Queued: 580, 42,084KiB
2724 Read Dispatches: 0, 0KiB Write Dispatches: 527, 42,084KiB
2725 Reads Requeued: 0 Writes Requeued: 0
2726 Reads Completed: 0, 0KiB Writes Completed: 527, 42,084KiB
2727 Read Merges: 0, 0KiB Write Merges: 53, 436KiB
2728 IO unplugs: 53 Timer unplugs: 1
2729
2730 Throughput (R/W): 0KiB/s / 719KiB/s
2731 Events (sdc): 6,592 entries
2732 Skips: 0 forward (0 - 0.0%)
2733 Input file sdc.blktrace.0 added
2734 Input file sdc.blktrace.1 added
2735 </literallayout>
2736 The report shows each event that was found in the blktrace data,
2737 along with a summary of the overall block I/O traffic during
2738 the run. You can look at the
2739 <ulink url='http://linux.die.net/man/1/blkparse'>blkparse</ulink>
2740 manpage to learn the
2741 meaning of each field displayed in the trace listing.
2742 </para>
2743
2744 <section id='blktrace-live-mode'>
2745 <title>Live Mode</title>
2746
2747 <para>
2748 blktrace and blkparse are designed from the ground up to
2749 be able to operate together in a 'pipe mode' where the
2750 stdout of blktrace can be fed directly into the stdin of
2751 blkparse:
2752 <literallayout class='monospaced'>
2753 root@crownbay:~# blktrace /dev/sdc -o - | blkparse -i -
2754 </literallayout>
2755 This enables long-lived tracing sessions to run without
2756 writing anything to disk, and allows the user to look for
2757 certain conditions in the trace data in 'real-time' by
2758 viewing the trace output as it scrolls by on the screen or
2759 by passing it along to yet another program in the pipeline
2760 such as grep which can be used to identify and capture
2761 conditions of interest.
2762 </para>
2763
2764 <para>
2765 There's actually another blktrace command that implements
2766 the above pipeline as a single command, so the user doesn't
2767 have to bother typing in the above command sequence:
2768 <literallayout class='monospaced'>
2769 root@crownbay:~# btrace /dev/sdc
2770 </literallayout>
2771 </para>
2772 </section>
2773
2774 <section id='using-blktrace-remotely'>
2775 <title>Using blktrace Remotely</title>
2776
2777 <para>
2778 Because blktrace traces block I/O and at the same time
2779 normally writes its trace data to a block device, and
2780 in general because it's not really a great idea to make
2781 the device being traced the same as the device the tracer
2782 writes to, blktrace provides a way to trace without
2783 perturbing the traced device at all by providing native
2784 support for sending all trace data over the network.
2785 </para>
2786
2787 <para>
2788 To have blktrace operate in this mode, start blktrace on
2789 the target system being traced with the -l option, along with
2790 the device to trace:
2791 <literallayout class='monospaced'>
2792 root@crownbay:~# blktrace -l /dev/sdc
2793 server: waiting for connections...
2794 </literallayout>
2795 On the host system, use the -h option to connect to the
2796 target system, also passing it the device to trace:
2797 <literallayout class='monospaced'>
2798 $ blktrace -d /dev/sdc -h 192.168.1.43
2799 blktrace: connecting to 192.168.1.43
2800 blktrace: connected!
2801 </literallayout>
2802 On the target system, you should see this:
2803 <literallayout class='monospaced'>
2804 server: connection from 192.168.1.43
2805 </literallayout>
2806 In another shell, execute a workload you want to trace.
2807 <literallayout class='monospaced'>
2808 root@crownbay:/media/sdc# rm linux-2.6.19.2.tar.bz2; wget <ulink url='http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2'>http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2</ulink>; sync
2809 Connecting to downloads.yoctoproject.org (140.211.169.59:80)
2810 linux-2.6.19.2.tar.b 100% |*******************************| 41727k 0:00:00 ETA
2811 </literallayout>
2812 When it's done, do a Ctrl-C on the host system to
2813 stop the trace:
2814 <literallayout class='monospaced'>
2815 ^C=== sdc ===
2816 CPU 0: 7691 events, 361 KiB data
2817 CPU 1: 4109 events, 193 KiB data
2818 Total: 11800 events (dropped 0), 554 KiB data
2819 </literallayout>
2820 On the target system, you should also see a trace
2821 summary for the trace just ended:
2822 <literallayout class='monospaced'>
2823 server: end of run for 192.168.1.43:sdc
2824 === sdc ===
2825 CPU 0: 7691 events, 361 KiB data
2826 CPU 1: 4109 events, 193 KiB data
2827 Total: 11800 events (dropped 0), 554 KiB data
2828 </literallayout>
2829 The blktrace instance on the host will save the target
2830 output inside a hostname-timestamp directory:
2831 <literallayout class='monospaced'>
2832 $ ls -al
2833 drwxr-xr-x 10 root root 1024 Oct 28 02:40 .
2834 drwxr-sr-x 4 root root 1024 Oct 26 18:24 ..
2835 drwxr-xr-x 2 root root 1024 Oct 28 02:40 192.168.1.43-2012-10-28-02:40:56
2836 </literallayout>
2837 cd into that directory to see the output files:
2838 <literallayout class='monospaced'>
2839 $ ls -l
2840 -rw-r--r-- 1 root root 369193 Oct 28 02:44 sdc.blktrace.0
2841 -rw-r--r-- 1 root root 197278 Oct 28 02:44 sdc.blktrace.1
2842 </literallayout>
2843 And run blkparse on the host system using the device name:
2844 <literallayout class='monospaced'>
2845 $ blkparse sdc
2846
2847 8,32 1 1 0.000000000 1263 Q RM 6016 + 8 [ls]
2848 8,32 1 0 0.000036038 0 m N cfq1263 alloced
2849 8,32 1 2 0.000039390 1263 G RM 6016 + 8 [ls]
2850 8,32 1 3 0.000049168 1263 I RM 6016 + 8 [ls]
2851 8,32 1 0 0.000056152 0 m N cfq1263 insert_request
2852 8,32 1 0 0.000061600 0 m N cfq1263 add_to_rr
2853 8,32 1 0 0.000075498 0 m N cfq workload slice:300
2854 .
2855 .
2856 .
2857 8,32 0 0 177.266385696 0 m N cfq1267 arm_idle: 8 group_idle: 0
2858 8,32 0 0 177.266388140 0 m N cfq schedule dispatch
2859 8,32 1 0 177.266679239 0 m N cfq1267 slice expired t=0
2860 8,32 1 0 177.266689297 0 m N cfq1267 sl_used=9 disp=6 charge=9 iops=0 sect=56
2861 8,32 1 0 177.266692649 0 m N cfq1267 del_from_rr
2862 8,32 1 0 177.266696560 0 m N cfq1267 put_queue
2863
2864 CPU0 (sdc):
2865 Reads Queued: 0, 0KiB Writes Queued: 270, 21,708KiB
2866 Read Dispatches: 59, 2,628KiB Write Dispatches: 495, 39,964KiB
2867 Reads Requeued: 0 Writes Requeued: 0
2868 Reads Completed: 90, 2,752KiB Writes Completed: 543, 41,596KiB
2869 Read Merges: 0, 0KiB Write Merges: 9, 344KiB
2870 Read depth: 2 Write depth: 2
2871 IO unplugs: 20 Timer unplugs: 1
2872 CPU1 (sdc):
2873 Reads Queued: 688, 2,752KiB Writes Queued: 381, 20,652KiB
2874 Read Dispatches: 31, 124KiB Write Dispatches: 59, 2,396KiB
2875 Reads Requeued: 0 Writes Requeued: 0
2876 Reads Completed: 0, 0KiB Writes Completed: 11, 764KiB
2877 Read Merges: 598, 2,392KiB Write Merges: 88, 448KiB
2878 Read depth: 2 Write depth: 2
2879 IO unplugs: 52 Timer unplugs: 0
2880
2881 Total (sdc):
2882 Reads Queued: 688, 2,752KiB Writes Queued: 651, 42,360KiB
2883 Read Dispatches: 90, 2,752KiB Write Dispatches: 554, 42,360KiB
2884 Reads Requeued: 0 Writes Requeued: 0
2885 Reads Completed: 90, 2,752KiB Writes Completed: 554, 42,360KiB
2886 Read Merges: 598, 2,392KiB Write Merges: 97, 792KiB
2887 IO unplugs: 72 Timer unplugs: 1
2888
2889 Throughput (R/W): 15KiB/s / 238KiB/s
2890 Events (sdc): 9,301 entries
2891 Skips: 0 forward (0 - 0.0%)
2892 </literallayout>
2893 You should see the trace events and summary just as
2894 you would have if you'd run the same command on the target.
2895 </para>
2896 </section>
2897
2898 <section id='tracing-block-io-via-ftrace'>
2899 <title>Tracing Block I/O via 'ftrace'</title>
2900
2901 <para>
2902 It's also possible to trace block I/O using only
2903 <link linkend='the-trace-events-subsystem'>trace events subsystem</link>,
2904 which can be useful for casual tracing
2905 if you don't want to bother dealing with the userspace tools.
2906 </para>
2907
2908 <para>
2909 To enable tracing for a given device, use
2910 /sys/block/xxx/trace/enable, where xxx is the device name.
2911 This for example enables tracing for /dev/sdc:
2912 <literallayout class='monospaced'>
2913 root@crownbay:/sys/kernel/debug/tracing# echo 1 > /sys/block/sdc/trace/enable
2914 </literallayout>
2915 Once you've selected the device(s) you want to trace,
2916 selecting the 'blk' tracer will turn the blk tracer on:
2917 <literallayout class='monospaced'>
2918 root@crownbay:/sys/kernel/debug/tracing# cat available_tracers
2919 blk function_graph function nop
2920
2921 root@crownbay:/sys/kernel/debug/tracing# echo blk > current_tracer
2922 </literallayout>
2923 Execute the workload you're interested in:
2924 <literallayout class='monospaced'>
2925 root@crownbay:/sys/kernel/debug/tracing# cat /media/sdc/testfile.txt
2926 </literallayout>
2927 And look at the output (note here that we're using
2928 'trace_pipe' instead of trace to capture this trace -
2929 this allows us to wait around on the pipe for data to
2930 appear):
2931 <literallayout class='monospaced'>
2932 root@crownbay:/sys/kernel/debug/tracing# cat trace_pipe
2933 cat-3587 [001] d..1 3023.276361: 8,32 Q R 1699848 + 8 [cat]
2934 cat-3587 [001] d..1 3023.276410: 8,32 m N cfq3587 alloced
2935 cat-3587 [001] d..1 3023.276415: 8,32 G R 1699848 + 8 [cat]
2936 cat-3587 [001] d..1 3023.276424: 8,32 P N [cat]
2937 cat-3587 [001] d..2 3023.276432: 8,32 I R 1699848 + 8 [cat]
2938 cat-3587 [001] d..1 3023.276439: 8,32 m N cfq3587 insert_request
2939 cat-3587 [001] d..1 3023.276445: 8,32 m N cfq3587 add_to_rr
2940 cat-3587 [001] d..2 3023.276454: 8,32 U N [cat] 1
2941 cat-3587 [001] d..1 3023.276464: 8,32 m N cfq workload slice:150
2942 cat-3587 [001] d..1 3023.276471: 8,32 m N cfq3587 set_active wl_prio:0 wl_type:2
2943 cat-3587 [001] d..1 3023.276478: 8,32 m N cfq3587 fifo= (null)
2944 cat-3587 [001] d..1 3023.276483: 8,32 m N cfq3587 dispatch_insert
2945 cat-3587 [001] d..1 3023.276490: 8,32 m N cfq3587 dispatched a request
2946 cat-3587 [001] d..1 3023.276497: 8,32 m N cfq3587 activate rq, drv=1
2947 cat-3587 [001] d..2 3023.276500: 8,32 D R 1699848 + 8 [cat]
2948 </literallayout>
2949 And this turns off tracing for the specified device:
2950 <literallayout class='monospaced'>
2951 root@crownbay:/sys/kernel/debug/tracing# echo 0 > /sys/block/sdc/trace/enable
2952 </literallayout>
2953 </para>
2954 </section>
2955 </section>
2956
2957 <section id='blktrace-documentation'>
2958 <title>Documentation</title>
2959
2960 <para>
2961 Online versions of the man pages for the commands discussed
2962 in this section can be found here:
2963 <itemizedlist>
2964 <listitem><para><ulink url='http://linux.die.net/man/8/blktrace'>http://linux.die.net/man/8/blktrace</ulink>
2965 </para></listitem>
2966 <listitem><para><ulink url='http://linux.die.net/man/1/blkparse'>http://linux.die.net/man/1/blkparse</ulink>
2967 </para></listitem>
2968 <listitem><para><ulink url='http://linux.die.net/man/8/btrace'>http://linux.die.net/man/8/btrace</ulink>
2969 </para></listitem>
2970 </itemizedlist>
2971 </para>
2972
2973 <para>
2974 The above manpages, along with manpages for the other
2975 blktrace utilities (btt, blkiomon, etc) can be found in the
2976 /doc directory of the blktrace tools git repo:
2977 <literallayout class='monospaced'>
2978 $ git clone git://git.kernel.dk/blktrace.git
2979 </literallayout>
2980 </para>
2981 </section>
2982</section>
2983</chapter>
2984<!--
2985vim: expandtab tw=80 ts=4
2986-->
diff --git a/documentation/profile-manual/profile-manual.xml b/documentation/profile-manual/profile-manual.xml
deleted file mode 100755
index 48bfba5b8f..0000000000
--- a/documentation/profile-manual/profile-manual.xml
+++ /dev/null
@@ -1,180 +0,0 @@
1<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<book id='profile-manual' lang='en'
7 xmlns:xi="http://www.w3.org/2003/XInclude"
8 xmlns="http://docbook.org/ns/docbook"
9 >
10 <bookinfo>
11
12 <mediaobject>
13 <imageobject>
14 <imagedata fileref='figures/profile-title.png'
15 format='SVG'
16 align='left' scalefit='1' width='100%'/>
17 </imageobject>
18 </mediaobject>
19
20 <title>
21 Yocto Project Profiling and Tracing Manual
22 </title>
23
24 <authorgroup>
25 <author>
26 <affiliation>
27 <orgname>&ORGNAME;</orgname>
28 </affiliation>
29 <email>&ORGEMAIL;</email>
30 </author>
31 </authorgroup>
32
33 <revhistory>
34 <revision>
35 <revnumber>1.4</revnumber>
36 <date>April 2013</date>
37 <revremark>The initial document released with the Yocto Project 1.4 Release.</revremark>
38 </revision>
39 <revision>
40 <revnumber>1.5</revnumber>
41 <date>October 2013</date>
42 <revremark>Released with the Yocto Project 1.5 Release.</revremark>
43 </revision>
44 <revision>
45 <revnumber>1.6</revnumber>
46 <date>April 2014</date>
47 <revremark>Released with the Yocto Project 1.6 Release.</revremark>
48 </revision>
49 <revision>
50 <revnumber>1.7</revnumber>
51 <date>October 2014</date>
52 <revremark>Released with the Yocto Project 1.7 Release.</revremark>
53 </revision>
54 <revision>
55 <revnumber>1.8</revnumber>
56 <date>April 2015</date>
57 <revremark>Released with the Yocto Project 1.8 Release.</revremark>
58 </revision>
59 <revision>
60 <revnumber>2.0</revnumber>
61 <date>October 2015</date>
62 <revremark>Released with the Yocto Project 2.0 Release.</revremark>
63 </revision>
64 <revision>
65 <revnumber>2.1</revnumber>
66 <date>April 2016</date>
67 <revremark>Released with the Yocto Project 2.1 Release.</revremark>
68 </revision>
69 <revision>
70 <revnumber>2.2</revnumber>
71 <date>October 2016</date>
72 <revremark>Released with the Yocto Project 2.2 Release.</revremark>
73 </revision>
74 <revision>
75 <revnumber>2.3</revnumber>
76 <date>May 2017</date>
77 <revremark>Released with the Yocto Project 2.3 Release.</revremark>
78 </revision>
79 <revision>
80 <revnumber>2.4</revnumber>
81 <date>October 2017</date>
82 <revremark>Released with the Yocto Project 2.4 Release.</revremark>
83 </revision>
84 <revision>
85 <revnumber>2.5</revnumber>
86 <date>May 2018</date>
87 <revremark>Released with the Yocto Project 2.5 Release.</revremark>
88 </revision>
89 <revision>
90 <revnumber>2.6</revnumber>
91 <date>November 2018</date>
92 <revremark>Released with the Yocto Project 2.6 Release.</revremark>
93 </revision>
94 <revision>
95 <revnumber>2.7</revnumber>
96 <date>May 2019</date>
97 <revremark>Released with the Yocto Project 2.7 Release.</revremark>
98 </revision>
99 <revision>
100 <revnumber>3.0</revnumber>
101 <date>October 2019</date>
102 <revremark>Released with the Yocto Project 3.0 Release.</revremark>
103 </revision>
104 <revision>
105 <revnumber>3.1</revnumber>
106 <date>&REL_MONTH_YEAR;</date>
107 <revremark>Released with the Yocto Project 3.1 Release.</revremark>
108 </revision>
109 </revhistory>
110
111 <copyright>
112 <year>&COPYRIGHT_YEAR;</year>
113 <holder>Linux Foundation</holder>
114 </copyright>
115
116 <legalnotice>
117 <para>
118 Permission is granted to copy, distribute and/or modify this document under
119 the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-sa/2.0/uk/">
120 Creative Commons Attribution-Share Alike 2.0 UK: England &amp; Wales</ulink> as published by
121 Creative Commons.
122 </para>
123 <note><title>Manual Notes</title>
124 <itemizedlist>
125 <listitem><para>
126 This version of the
127 <emphasis>Yocto Project Profiling and Tracing Manual</emphasis>
128 is for the &YOCTO_DOC_VERSION; release of the
129 Yocto Project.
130 To be sure you have the latest version of the manual
131 for this release, go to the
132 <ulink url='&YOCTO_DOCS_URL;'>Yocto Project documentation page</ulink>
133 and select the manual from that site.
134 Manuals from the site are more up-to-date than manuals
135 derived from the Yocto Project released TAR files.
136 </para></listitem>
137 <listitem><para>
138 If you located this manual through a web search, the
139 version of the manual might not be the one you want
140 (e.g. the search might have returned a manual much
141 older than the Yocto Project version with which you
142 are working).
143 You can see all Yocto Project major releases by
144 visiting the
145 <ulink url='&YOCTO_WIKI_URL;/wiki/Releases'>Releases</ulink>
146 page.
147 If you need a version of this manual for a different
148 Yocto Project release, visit the
149 <ulink url='&YOCTO_DOCS_URL;'>Yocto Project documentation page</ulink>
150 and select the manual set by using the
151 "ACTIVE RELEASES DOCUMENTATION" or "DOCUMENTS ARCHIVE"
152 pull-down menus.
153 </para></listitem>
154 <listitem>
155 <para>
156 To report any inaccuracies or problems with this
157 (or any other Yocto Project) manual, send an email to
158 the Yocto Project documentation mailing list at
159 <filename>docs@lists.yoctoproject.org</filename> or
160 log into the freenode <filename>#yocto</filename> channel.
161 </para>
162 </listitem>
163 </itemizedlist>
164 </note>
165 </legalnotice>
166
167 </bookinfo>
168
169 <xi:include href="profile-manual-intro.xml"/>
170
171 <xi:include href="profile-manual-arch.xml"/>
172
173 <xi:include href="profile-manual-usage.xml"/>
174
175 <xi:include href="profile-manual-examples.xml"/>
176
177</book>
178<!--
179vim: expandtab tw=80 ts=4
180-->
diff --git a/documentation/ref-manual/faq.xml b/documentation/ref-manual/faq.xml
deleted file mode 100644
index 2f8fcf3242..0000000000
--- a/documentation/ref-manual/faq.xml
+++ /dev/null
@@ -1,836 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='faq'>
7<title>FAQ</title>
8<qandaset>
9 <qandaentry>
10 <question>
11 <para>
12 How does Poky differ from <ulink url='&OE_HOME_URL;'>OpenEmbedded</ulink>?
13 </para>
14 </question>
15 <answer>
16 <para>
17 The term "<link link='poky'>Poky</link>"
18 refers to the specific reference build system that
19 the Yocto Project provides.
20 Poky is based on <link linkend='oe-core'>OE-Core</link>
21 and <link linkend='bitbake-term'>BitBake</link>.
22 Thus, the generic term used here for the build system is
23 the "OpenEmbedded build system."
24 Development in the Yocto Project using Poky is closely tied to OpenEmbedded, with
25 changes always being merged to OE-Core or BitBake first before being pulled back
26 into Poky.
27 This practice benefits both projects immediately.
28 </para>
29 </answer>
30 </qandaentry>
31
32 <qandaentry>
33 <question>
34 <para id='faq-not-meeting-requirements'>
35 My development system does not meet the
36 required Git, tar, and Python versions.
37 In particular, I do not have Python 3.5.0 or greater.
38 Can I still use the Yocto Project?
39 </para>
40 </question>
41 <answer>
42 <para>
43 You can get the required tools on your host development
44 system a couple different ways (i.e. building a tarball or
45 downloading a tarball).
46 See the
47 "<link linkend='required-git-tar-python-and-gcc-versions'>Required Git, tar, Python and gcc Versions</link>"
48 section for steps on how to update your build tools.
49 </para>
50 </answer>
51 </qandaentry>
52
53 <qandaentry>
54 <question>
55 <para>
56 How can you claim Poky / OpenEmbedded-Core is stable?
57 </para>
58 </question>
59 <answer>
60 <para>
61 There are three areas that help with stability;
62 <itemizedlist>
63 <listitem><para>The Yocto Project team keeps
64 <link linkend='oe-core'>OE-Core</link> small
65 and focused, containing around 830 recipes as opposed to the thousands
66 available in other OpenEmbedded community layers.
67 Keeping it small makes it easy to test and maintain.</para></listitem>
68 <listitem><para>The Yocto Project team runs manual and automated tests
69 using a small, fixed set of reference hardware as well as emulated
70 targets.</para></listitem>
71 <listitem><para>The Yocto Project uses an autobuilder,
72 which provides continuous build and integration tests.</para></listitem>
73 </itemizedlist>
74 </para>
75 </answer>
76 </qandaentry>
77
78 <qandaentry>
79 <question>
80 <para>
81 How do I get support for my board added to the Yocto Project?
82 </para>
83 </question>
84 <answer>
85 <para>
86 Support for an additional board is added by creating a
87 Board Support Package (BSP) layer for it.
88 For more information on how to create a BSP layer, see the
89 "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
90 section in the Yocto Project Development Tasks Manual and the
91 <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>.
92 </para>
93 <para>
94 Usually, if the board is not completely exotic, adding support in
95 the Yocto Project is fairly straightforward.
96 </para>
97 </answer>
98 </qandaentry>
99
100 <qandaentry>
101 <question>
102 <para>
103 Are there any products built using the OpenEmbedded build system?
104 </para>
105 </question>
106 <answer>
107 <para>
108 The software running on the <ulink url='http://vernier.com/labquest/'>Vernier LabQuest</ulink>
109 is built using the OpenEmbedded build system.
110 See the <ulink url='http://www.vernier.com/products/interfaces/labq/'>Vernier LabQuest</ulink>
111 website for more information.
112 There are a number of pre-production devices using the OpenEmbedded build system
113 and the Yocto Project team
114 announces them as soon as they are released.
115 </para>
116 </answer>
117 </qandaentry>
118
119 <qandaentry>
120 <question>
121 <para>
122 What does the OpenEmbedded build system produce as output?
123 </para>
124 </question>
125 <answer>
126 <para>
127 Because you can use the same set of recipes to create output of
128 various formats, the output of an OpenEmbedded build depends on
129 how you start it.
130 Usually, the output is a flashable image ready for the target
131 device.
132 </para>
133 </answer>
134 </qandaentry>
135
136 <qandaentry>
137 <question>
138 <para>
139 How do I add my package to the Yocto Project?
140 </para>
141 </question>
142 <answer>
143 <para>
144 To add a package, you need to create a BitBake recipe.
145 For information on how to create a BitBake recipe, see the
146 "<ulink url='&YOCTO_DOCS_DEV_URL;#new-recipe-writing-a-new-recipe'>Writing a New Recipe</ulink>"
147 section in the Yocto Project Development Tasks Manual.
148 </para>
149 </answer>
150 </qandaentry>
151
152 <qandaentry>
153 <question>
154 <para>
155 Do I have to reflash my entire board with a new Yocto Project image when recompiling
156 a package?
157 </para>
158 </question>
159 <answer>
160 <para>
161 The OpenEmbedded build system can build packages in various
162 formats such as IPK for OPKG, Debian package
163 (<filename>.deb</filename>), or RPM.
164 You can then upgrade the packages using the package tools on
165 the device, much like on a desktop distribution such as
166 Ubuntu or Fedora.
167 However, package management on the target is entirely optional.
168 </para>
169 </answer>
170 </qandaentry>
171
172 <qandaentry>
173 <question>
174 <para>
175 I see the error '<filename>chmod: XXXXX new permissions are r-xrwxrwx, not r-xr-xr-x</filename>'.
176 What is wrong?
177 </para>
178 </question>
179 <answer>
180 <para>
181 You are probably running the build on an NTFS filesystem.
182 Use <filename>ext2</filename>, <filename>ext3</filename>, or <filename>ext4</filename> instead.
183 </para>
184 </answer>
185 </qandaentry>
186
187<!-- <qandaentry>
188 <question>
189 <para>
190 How do I make the Yocto Project work in RHEL/CentOS?
191 </para>
192 </question>
193 <answer>
194 <para>
195 To get the Yocto Project working under RHEL/CentOS 5.1 you need to first
196 install some required packages.
197 The standard CentOS packages needed are:
198 <itemizedlist>
199 <listitem><para>"Development tools" (selected during installation)</para></listitem>
200 <listitem><para><filename>texi2html</filename></para></listitem>
201 <listitem><para><filename>compat-gcc-34</filename></para></listitem>
202 </itemizedlist>
203 On top of these, you need the following external packages:
204 <itemizedlist>
205 <listitem><para><filename>python-sqlite2</filename> from
206 <ulink url='http://dag.wieers.com/rpm/packages/python-sqlite2/'>DAG repository</ulink>
207 </para></listitem>
208 <listitem><para><filename>help2man</filename> from
209 <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>
210 </itemizedlist>
211 </para>
212
213 <para>
214 Once these packages are installed, the OpenEmbedded build system will be able
215 to build standard images.
216 However, there might be a problem with the QEMU emulator segfaulting.
217 You can either disable the generation of binary locales by setting
218 <filename><link linkend='var-ENABLE_BINARY_LOCALE_GENERATION'>ENABLE_BINARY_LOCALE_GENERATION</link>
219 </filename> to "0" or by removing the <filename>linux-2.6-execshield.patch</filename>
220 from the kernel and rebuilding it since that is the patch that causes the problems with QEMU.
221 </para>
222
223 <note>
224 <para>For information on distributions that the Yocto Project
225 uses during validation, see the
226 <ulink url='&YOCTO_WIKI_URL;/wiki/Distribution_Support'>Distribution Support</ulink>
227 Wiki page.</para>
228 <para>For notes about using the Yocto Project on a RHEL 4-based
229 host, see the
230 <ulink url='&YOCTO_WIKI_URL;/wiki/BuildingOnRHEL4'>Building on RHEL4</ulink>
231 Wiki page.</para>
232 </note>
233 </answer>
234 </qandaentry> -->
235
236 <qandaentry>
237 <question>
238 <para>
239 I see lots of 404 responses for files when the OpenEmbedded
240 build system is trying to download sources.
241 Is something wrong?
242 </para>
243 </question>
244 <answer>
245 <para>
246 Nothing is wrong.
247 The OpenEmbedded build system checks any configured source mirrors before downloading
248 from the upstream sources.
249 The build system does this searching for both source archives and
250 pre-checked out versions of SCM-managed software.
251 These checks help in large installations because it can reduce load on the SCM servers
252 themselves.
253 The address above is one of the default mirrors configured into the
254 build system.
255 Consequently, if an upstream source disappears, the team
256 can place sources there so builds continue to work.
257 </para>
258 </answer>
259 </qandaentry>
260
261 <qandaentry>
262 <question>
263 <para>
264 I have machine-specific data in a package for one machine only but the package is
265 being marked as machine-specific in all cases, how do I prevent this?
266 </para>
267 </question>
268 <answer>
269 <para>
270 Set <filename><link linkend='var-SRC_URI_OVERRIDES_PACKAGE_ARCH'>SRC_URI_OVERRIDES_PACKAGE_ARCH</link>
271 </filename> = "0" in the <filename>.bb</filename> file but make sure the package is
272 manually marked as
273 machine-specific for the case that needs it.
274 The code that handles
275 <filename>SRC_URI_OVERRIDES_PACKAGE_ARCH</filename> is in
276 the <filename>meta/classes/base.bbclass</filename> file.
277 </para>
278 </answer>
279 </qandaentry>
280
281 <qandaentry>
282 <question>
283 <para id='i-am-behind-a-firewall-and-need-to-use-a-proxy-server'>
284 I'm behind a firewall and need to use a proxy server. How do I do that?
285 </para>
286 </question>
287 <answer>
288 <para>
289 Most source fetching by the OpenEmbedded build system is done
290 by <filename>wget</filename> and you therefore need to specify
291 the proxy settings in a <filename>.wgetrc</filename> file,
292 which can be in your home directory if you are a single user
293 or can be in <filename>/usr/local/etc/wgetrc</filename> as
294 a global user file.
295 </para>
296
297 <para>
298 Following is the applicable code for setting various proxy
299 types in the <filename>.wgetrc</filename> file.
300 By default, these settings are disabled with comments.
301 To use them, remove the comments:
302 <literallayout class='monospaced'>
303 # You can set the default proxies for Wget to use for http, https, and ftp.
304 # They will override the value in the environment.
305 #https_proxy = http://proxy.yoyodyne.com:18023/
306 #http_proxy = http://proxy.yoyodyne.com:18023/
307 #ftp_proxy = http://proxy.yoyodyne.com:18023/
308
309 # If you do not want to use proxy at all, set this to off.
310 #use_proxy = on
311 </literallayout>
312 The Yocto Project also includes a
313 <filename>meta-poky/conf/site.conf.sample</filename> file that
314 shows how to configure CVS and Git proxy servers if needed.
315 For more information on setting up various proxy types and
316 configuring proxy servers, see the
317 "<ulink url='&YOCTO_WIKI_URL;/wiki/Working_Behind_a_Network_Proxy'>Working Behind a Network Proxy</ulink>"
318 Wiki page.
319 </para>
320 </answer>
321 </qandaentry>
322
323 <qandaentry>
324 <question>
325 <para>
326 What's the difference between <replaceable>target</replaceable> and <replaceable>target</replaceable><filename>-native</filename>?
327 </para>
328 </question>
329 <answer>
330 <para>
331 The <filename>*-native</filename> targets are designed to run on the system
332 being used for the build.
333 These are usually tools that are needed to assist the build in some way such as
334 <filename>quilt-native</filename>, which is used to apply patches.
335 The non-native version is the one that runs on the target device.
336 </para>
337 </answer>
338 </qandaentry>
339
340 <qandaentry>
341 <question>
342 <para>
343 I'm seeing random build failures. Help?!
344 </para>
345 </question>
346 <answer>
347 <para>
348 If the same build is failing in totally different and random
349 ways, the most likely explanation is:
350 <itemizedlist>
351 <listitem><para>The hardware you are running the build on
352 has some problem.</para></listitem>
353 <listitem><para>You are running the build under
354 virtualization, in which case the virtualization
355 probably has bugs.</para></listitem>
356 </itemizedlist>
357 The OpenEmbedded build system processes a massive amount of
358 data that causes lots of network, disk and CPU activity and
359 is sensitive to even single-bit failures in any of these areas.
360 True random failures have always been traced back to hardware
361 or virtualization issues.
362 </para>
363 </answer>
364 </qandaentry>
365
366 <qandaentry>
367 <question>
368 <para>
369 When I try to build a native recipe, the build fails with <filename>iconv.h</filename> problems.
370 </para>
371 </question>
372 <answer>
373 <para>
374 If you get an error message that indicates GNU
375 <filename>libiconv</filename> is not in use but
376 <filename>iconv.h</filename> has been included from
377 <filename>libiconv</filename>, you need to check to see if
378 you have a previously installed version of the header file
379 in <filename>/usr/local/include</filename>.
380 <literallayout class='monospaced'>
381 #error GNU libiconv not in use but included iconv.h is from libiconv
382 </literallayout>
383 If you find a previously installed file, you should either
384 uninstall it or temporarily rename it and try the build again.
385 </para>
386
387 <para>
388 This issue is just a single manifestation of "system
389 leakage" issues caused when the OpenEmbedded build system
390 finds and uses previously installed files during a native
391 build.
392 This type of issue might not be limited to
393 <filename>iconv.h</filename>.
394 Be sure that leakage cannot occur from
395 <filename>/usr/local/include</filename> and
396 <filename>/opt</filename> locations.
397 </para>
398 </answer>
399 </qandaentry>
400
401 <qandaentry>
402 <question>
403 <para>
404 What do we need to ship for license compliance?
405 </para>
406 </question>
407 <answer>
408 <para>
409 This is a difficult question and you need to consult your lawyer
410 for the answer for your specific case.
411 It is worth bearing in mind that for GPL compliance, there needs
412 to be enough information shipped to allow someone else to
413 rebuild and produce the same end result you are shipping.
414 This means sharing the source code, any patches applied to it,
415 and also any configuration information about how that package
416 was configured and built.
417 </para>
418
419 <para>
420 You can find more information on licensing in the
421 "<ulink url='&YOCTO_DOCS_OM_URL;#licensing'>Licensing</ulink>"
422 section in the Yocto Project Overview and Concepts Manual
423 and also in the
424 "<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle'>Maintaining Open Source License Compliance During Your Product's Lifecycle</ulink>"
425 section in the Yocto Project Development Tasks Manual.
426 </para>
427 </answer>
428 </qandaentry>
429
430 <qandaentry>
431 <question>
432 <para>
433 How do I disable the cursor on my touchscreen device?
434 </para>
435 </question>
436 <answer>
437 <para>
438 You need to create a form factor file as described in the
439 "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-filelayout-misc-recipes'>Miscellaneous BSP-Specific Recipe Files</ulink>"
440 section in the Yocto Project Board Support Packages (BSP)
441 Developer's Guide.
442 Set the <filename>HAVE_TOUCHSCREEN</filename> variable equal to
443 one as follows:
444 <literallayout class='monospaced'>
445 HAVE_TOUCHSCREEN=1
446 </literallayout>
447 </para>
448 </answer>
449 </qandaentry>
450
451 <qandaentry>
452 <question>
453 <para>
454 How do I make sure connected network interfaces are brought up by default?
455 </para>
456 </question>
457 <answer>
458 <para>
459 The default interfaces file provided by the netbase recipe does not
460 automatically bring up network interfaces.
461 Therefore, you will need to add a BSP-specific netbase that includes an interfaces
462 file.
463 See the "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-filelayout-misc-recipes'>Miscellaneous BSP-Specific Recipe Files</ulink>"
464 section in the Yocto Project Board Support Packages (BSP)
465 Developer's Guide for information on creating these types of
466 miscellaneous recipe files.
467 </para>
468 <para>
469 For example, add the following files to your layer:
470 <literallayout class='monospaced'>
471 meta-MACHINE/recipes-bsp/netbase/netbase/MACHINE/interfaces
472 meta-MACHINE/recipes-bsp/netbase/netbase_5.0.bbappend
473 </literallayout>
474 </para>
475 </answer>
476 </qandaentry>
477
478 <qandaentry>
479 <question>
480 <para>
481 How do I create images with more free space?
482 </para>
483 </question>
484 <answer>
485 <para>
486 By default, the OpenEmbedded build system creates images
487 that are 1.3 times the size of the populated root filesystem.
488 To affect the image size, you need to set various
489 configurations:
490 <itemizedlist>
491 <listitem><para><emphasis>Image Size:</emphasis>
492 The OpenEmbedded build system uses the
493 <link linkend='var-IMAGE_ROOTFS_SIZE'><filename>IMAGE_ROOTFS_SIZE</filename></link>
494 variable to define the size of the image in Kbytes.
495 The build system determines the size by taking into
496 account the initial root filesystem size before any
497 modifications such as requested size for the image and
498 any requested additional free disk space to be
499 added to the image.</para></listitem>
500 <listitem><para><emphasis>Overhead:</emphasis>
501 Use the
502 <link linkend='var-IMAGE_OVERHEAD_FACTOR'><filename>IMAGE_OVERHEAD_FACTOR</filename></link>
503 variable to define the multiplier that the build system
504 applies to the initial image size, which is 1.3 by
505 default.</para></listitem>
506 <listitem><para><emphasis>Additional Free Space:</emphasis>
507 Use the
508 <link linkend='var-IMAGE_ROOTFS_EXTRA_SPACE'><filename>IMAGE_ROOTFS_EXTRA_SPACE</filename></link>
509 variable to add additional free space to the image.
510 The build system adds this space to the image after
511 it determines its
512 <filename>IMAGE_ROOTFS_SIZE</filename>.
513 </para></listitem>
514 </itemizedlist>
515 </para>
516 </answer>
517 </qandaentry>
518
519 <qandaentry>
520 <question>
521 <para>
522 Why don't you support directories with spaces in the pathnames?
523 </para>
524 </question>
525 <answer>
526 <para>
527 The Yocto Project team has tried to do this before but too
528 many of the tools the OpenEmbedded build system depends on,
529 such as <filename>autoconf</filename>, break when they find
530 spaces in pathnames.
531 Until that situation changes, the team will not support spaces
532 in pathnames.
533 </para>
534 </answer>
535 </qandaentry>
536
537 <qandaentry>
538 <question>
539 <para>
540 How do I use an external toolchain?
541 </para>
542 </question>
543 <answer>
544 <para>
545 The toolchain configuration is very flexible and customizable.
546 It is primarily controlled with the
547 <filename><link linkend='var-TCMODE'>TCMODE</link></filename>
548 variable.
549 This variable controls which <filename>tcmode-*.inc</filename>
550 file to include from the
551 <filename>meta/conf/distro/include</filename> directory within
552 the
553 <link linkend='source-directory'>Source Directory</link>.
554 </para>
555
556 <para>
557 The default value of <filename>TCMODE</filename> is "default",
558 which tells the OpenEmbedded build system to use its internally
559 built toolchain (i.e. <filename>tcmode-default.inc</filename>).
560 However, other patterns are accepted.
561 In particular, "external-*" refers to external toolchains.
562 One example is the Sourcery G++ Toolchain.
563 The support for this toolchain resides in the separate
564 <filename>meta-sourcery</filename> layer at
565 <ulink url='http://github.com/MentorEmbedded/meta-sourcery/'></ulink>.
566 </para>
567
568 <para>
569 In addition to the toolchain configuration, you also need a
570 corresponding toolchain recipe file.
571 This recipe file needs to package up any pre-built objects in
572 the toolchain such as <filename>libgcc</filename>,
573 <filename>libstdcc++</filename>, any locales, and
574 <filename>libc</filename>.
575 </para>
576 </answer>
577 </qandaentry>
578
579 <qandaentry>
580 <question>
581 <para id='how-does-the-yocto-project-obtain-source-code-and-will-it-work-behind-my-firewall-or-proxy-server'>
582 How does the OpenEmbedded build system obtain source code and
583 will it work behind my firewall or proxy server?
584 </para>
585 </question>
586 <answer>
587 <para>
588 The way the build system obtains source code is highly
589 configurable.
590 You can setup the build system to get source code in most
591 environments if HTTP transport is available.
592 </para>
593 <para>
594 When the build system searches for source code, it first
595 tries the local download directory.
596 If that location fails, Poky tries
597 <link linkend='var-PREMIRRORS'><filename>PREMIRRORS</filename></link>,
598 the upstream source, and then
599 <link linkend='var-MIRRORS'><filename>MIRRORS</filename></link>
600 in that order.
601 </para>
602 <para>
603 Assuming your distribution is "poky", the OpenEmbedded build
604 system uses the Yocto Project source
605 <filename>PREMIRRORS</filename> by default for SCM-based
606 sources, upstreams for normal tarballs, and then falls back
607 to a number of other mirrors including the Yocto Project
608 source mirror if those fail.
609 </para>
610 <para>
611 As an example, you could add a specific server for the
612 build system to attempt before any others by adding something
613 like the following to the <filename>local.conf</filename>
614 configuration file:
615 <literallayout class='monospaced'>
616 PREMIRRORS_prepend = "\
617 git://.*/.* http://www.yoctoproject.org/sources/ \n \
618 ftp://.*/.* http://www.yoctoproject.org/sources/ \n \
619 http://.*/.* http://www.yoctoproject.org/sources/ \n \
620 https://.*/.* http://www.yoctoproject.org/sources/ \n"
621 </literallayout>
622 </para>
623 <para>
624 These changes cause the build system to intercept Git, FTP,
625 HTTP, and HTTPS requests and direct them to the
626 <filename>http://</filename> sources mirror.
627 You can use <filename>file://</filename> URLs to point to
628 local directories or network shares as well.
629 </para>
630 <para>
631 Aside from the previous technique, these options also exist:
632 <literallayout class='monospaced'>
633 BB_NO_NETWORK = "1"
634 </literallayout>
635 This statement tells BitBake to issue an error instead of
636 trying to access the Internet.
637 This technique is useful if you want to ensure code builds
638 only from local sources.
639 </para>
640 <para>
641 Here is another technique:
642 <literallayout class='monospaced'>
643 BB_FETCH_PREMIRRORONLY = "1"
644 </literallayout>
645 This statement limits the build system to pulling source
646 from the <filename>PREMIRRORS</filename> only.
647 Again, this technique is useful for reproducing builds.
648 </para>
649 <para>
650 Here is another technique:
651 <literallayout class='monospaced'>
652 BB_GENERATE_MIRROR_TARBALLS = "1"
653 </literallayout>
654 This statement tells the build system to generate mirror
655 tarballs.
656 This technique is useful if you want to create a mirror server.
657 If not, however, the technique can simply waste time during
658 the build.
659 </para>
660 <para>
661 Finally, consider an example where you are behind an
662 HTTP-only firewall.
663 You could make the following changes to the
664 <filename>local.conf</filename> configuration file as long as
665 the <filename>PREMIRRORS</filename> server is current:
666 <literallayout class='monospaced'>
667 PREMIRRORS_prepend = "\
668 ftp://.*/.* http://www.yoctoproject.org/sources/ \n \
669 http://.*/.* http://www.yoctoproject.org/sources/ \n \
670 https://.*/.* http://www.yoctoproject.org/sources/ \n"
671 BB_FETCH_PREMIRRORONLY = "1"
672 </literallayout>
673 These changes would cause the build system to successfully
674 fetch source over HTTP and any network accesses to anything
675 other than the <filename>PREMIRRORS</filename> would fail.
676 </para>
677 <para>
678 The build system also honors the standard shell environment
679 variables <filename>http_proxy</filename>,
680 <filename>ftp_proxy</filename>,
681 <filename>https_proxy</filename>, and
682 <filename>all_proxy</filename> to redirect requests through
683 proxy servers.
684 </para>
685 <note>
686 You can find more information on the
687 "<ulink url='&YOCTO_WIKI_URL;/wiki/Working_Behind_a_Network_Proxy'>Working Behind a Network Proxy</ulink>"
688 Wiki page.
689 </note>
690 </answer>
691 </qandaentry>
692
693 <qandaentry>
694 <question>
695 <para>
696 Can I get rid of build output so I can start over?
697 </para>
698 </question>
699 <answer>
700 <para>
701 Yes - you can easily do this.
702 When you use BitBake to build an image, all the build output
703 goes into the directory created when you run the
704 build environment setup script (i.e.
705 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>).
706 By default, this
707 <link linkend='build-directory'>Build Directory</link>
708 is named <filename>build</filename> but can be named
709 anything you want.
710 </para>
711
712 <para>
713 Within the Build Directory, is the <filename>tmp</filename>
714 directory.
715 To remove all the build output yet preserve any source code or
716 downloaded files from previous builds, simply remove the
717 <filename>tmp</filename> directory.
718 </para>
719 </answer>
720 </qandaentry>
721
722 <qandaentry>
723 <question>
724 <para>
725 Why do <filename>${bindir}</filename> and <filename>${libdir}</filename> have strange values for <filename>-native</filename> recipes?
726 </para>
727 </question>
728 <answer>
729 <para>
730 Executables and libraries might need to be used from a
731 directory other than the directory into which they were
732 initially installed.
733 Complicating this situation is the fact that sometimes these
734 executables and libraries are compiled with the expectation
735 of being run from that initial installation target directory.
736 If this is the case, moving them causes problems.
737 </para>
738
739 <para>
740 This scenario is a fundamental problem for package maintainers
741 of mainstream Linux distributions as well as for the
742 OpenEmbedded build system.
743 As such, a well-established solution exists.
744 Makefiles, Autotools configuration scripts, and other build
745 systems are expected to respect environment variables such as
746 <filename>bindir</filename>, <filename>libdir</filename>,
747 and <filename>sysconfdir</filename> that indicate where
748 executables, libraries, and data reside when a program is
749 actually run.
750 They are also expected to respect a
751 <filename>DESTDIR</filename> environment variable, which is
752 prepended to all the other variables when the build system
753 actually installs the files.
754 It is understood that the program does not actually run from
755 within <filename>DESTDIR</filename>.
756 </para>
757
758 <para>
759 When the OpenEmbedded build system uses a recipe to build a
760 target-architecture program (i.e. one that is intended for
761 inclusion on the image being built), that program eventually
762 runs from the root file system of that image.
763 Thus, the build system provides a value of "/usr/bin" for
764 <filename>bindir</filename>, a value of "/usr/lib" for
765 <filename>libdir</filename>, and so forth.
766 </para>
767
768 <para>
769 Meanwhile, <filename>DESTDIR</filename> is a path within the
770 <link linkend='build-directory'>Build Directory</link>.
771 However, when the recipe builds a native program (i.e. one
772 that is intended to run on the build machine), that program
773 is never installed directly to the build machine's root
774 file system.
775 Consequently, the build system uses paths within the Build
776 Directory for <filename>DESTDIR</filename>,
777 <filename>bindir</filename> and related variables.
778 To better understand this, consider the following two paths
779 where the first is relatively normal and the second is not:
780 <note>
781 Due to these lengthy examples, the paths are artificially
782 broken across lines for readability.
783 </note>
784 <literallayout class='monospaced'>
785 /home/maxtothemax/poky-bootchart2/build/tmp/work/i586-poky-linux/zlib/
786 1.2.8-r0/sysroot-destdir/usr/bin
787
788 /home/maxtothemax/poky-bootchart2/build/tmp/work/x86_64-linux/
789 zlib-native/1.2.8-r0/sysroot-destdir/home/maxtothemax/poky-bootchart2/
790 build/tmp/sysroots/x86_64-linux/usr/bin
791 </literallayout>
792 Even if the paths look unusual, they both are correct -
793 the first for a target and the second for a native recipe.
794 These paths are a consequence of the
795 <filename>DESTDIR</filename> mechanism and while they
796 appear strange, they are correct and in practice very effective.
797 </para>
798 </answer>
799 </qandaentry>
800
801 <qandaentry>
802 <question>
803 <para>
804 The files provided by my <filename>*-native</filename> recipe do
805 not appear to be available to other recipes.
806 Files are missing from the native sysroot, my recipe is
807 installing to the wrong place, or I am getting permissions
808 errors during the do_install task in my recipe! What is wrong?
809 </para>
810 </question>
811 <answer>
812 <para>
813 This situation results when a build system does
814 not recognize the environment variables supplied to it by
815 <link linkend='bitbake-term'>BitBake</link>.
816 The incident that prompted this FAQ entry involved a Makefile
817 that used an environment variable named
818 <filename>BINDIR</filename> instead of the more standard
819 variable <filename>bindir</filename>.
820 The makefile's hardcoded default value of "/usr/bin" worked
821 most of the time, but not for the recipe's
822 <filename>-native</filename> variant.
823 For another example, permissions errors might be caused
824 by a Makefile that ignores <filename>DESTDIR</filename> or uses
825 a different name for that environment variable.
826 Check the the build system to see if these kinds of
827 issues exist.
828 </para>
829 </answer>
830 </qandaentry>
831
832</qandaset>
833</chapter>
834<!--
835vim: expandtab tw=80 ts=4
836-->
diff --git a/documentation/ref-manual/migration.xml b/documentation/ref-manual/migration.xml
deleted file mode 100644
index d3d5b16bdd..0000000000
--- a/documentation/ref-manual/migration.xml
+++ /dev/null
@@ -1,7301 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='migration'>
7<title>Migrating to a Newer Yocto Project Release</title>
8
9 <para>
10 This chapter provides information you can use to migrate work to a
11 newer Yocto Project release. You can find the same information in the
12 release notes for a given release.
13 </para>
14
15<section id='general-migration-considerations'>
16 <title>General Migration Considerations</title>
17
18 <para>
19 Some considerations are not tied to a specific Yocto Project
20 release.
21 This section presents information you should consider when
22 migrating to any new Yocto Project release.
23 <itemizedlist>
24 <listitem><para><emphasis>Dealing with Customized Recipes</emphasis>:
25 Issues could arise if you take older recipes that contain
26 customizations and simply copy them forward expecting them
27 to work after you migrate to new Yocto Project metadata.
28 For example, suppose you have a recipe in your layer that is
29 a customized version of a core recipe copied from the earlier
30 release, rather than through the use of an append file.
31 When you migrate to a newer version of Yocto Project, the
32 metadata (e.g. perhaps an include file used by the recipe)
33 could have changed in a way that would break the build.
34 Say, for example, a function is removed from an include file
35 and the customized recipe tries to call that function.
36 </para>
37
38 <para>You could "forward-port" all your customizations in your
39 recipe so that everything works for the new release.
40 However, this is not the optimal solution as you would have
41 to repeat this process with each new release if changes
42 occur that give rise to problems.</para>
43
44 <para>The better solution (where practical) is to use append
45 files (<filename>*.bbappend</filename>) to capture any
46 customizations you want to make to a recipe.
47 Doing so, isolates your changes from the main recipe making
48 them much more manageable.
49 However, sometimes it is not practical to use an append
50 file.
51 A good example of this is when introducing a newer or older
52 version of a recipe in another layer.</para>
53 </listitem>
54 <listitem><para><emphasis>Updating Append Files</emphasis>:
55 Since append files generally only contain your customizations,
56 they often do not need to be adjusted for new releases.
57 However, if the <filename>.bbappend</filename> file is
58 specific to a particular version of the recipe (i.e. its
59 name does not use the % wildcard) and the version of the
60 recipe to which it is appending has changed, then you will
61 at a minimum need to rename the append file to match the
62 name of the recipe file.
63 A mismatch between an append file and its corresponding
64 recipe file (<filename>.bb</filename>) will
65 trigger an error during parsing.</para>
66 <para>Depending on the type of customization the append file
67 applies, other incompatibilities might occur when you
68 upgrade.
69 For example, if your append file applies a patch and the
70 recipe to which it is appending is updated to a newer
71 version, the patch might no longer apply.
72 If this is the case and assuming the patch is still needed,
73 you must modify the patch file so that it does apply.
74 </para></listitem>
75 </itemizedlist>
76 </para>
77</section>
78
79<section id='moving-to-the-yocto-project-1.3-release'>
80 <title>Moving to the Yocto Project 1.3 Release</title>
81
82 <para>
83 This section provides migration information for moving to the
84 Yocto Project 1.3 Release from the prior release.
85 </para>
86
87 <section id='1.3-local-configuration'>
88 <title>Local Configuration</title>
89
90 <para>
91 Differences include changes for
92 <link linkend='var-SSTATE_MIRRORS'><filename>SSTATE_MIRRORS</filename></link>
93 and <filename>bblayers.conf</filename>.
94 </para>
95
96 <section id='migration-1.3-sstate-mirrors'>
97 <title>SSTATE_MIRRORS</title>
98
99 <para>
100 The shared state cache (sstate-cache), as pointed to by
101 <link linkend='var-SSTATE_DIR'><filename>SSTATE_DIR</filename></link>,
102 by default now has two-character subdirectories to prevent
103 issues arising from too many files in the same directory.
104 Also, native sstate-cache packages, which are built to run
105 on the host system, will go into a subdirectory named using
106 the distro ID string.
107 If you copy the newly structured sstate-cache to a mirror
108 location (either local or remote) and then point to it in
109 <link linkend='var-SSTATE_MIRRORS'><filename>SSTATE_MIRRORS</filename></link>,
110 you need to append "PATH" to the end of the mirror URL so that
111 the path used by BitBake before the mirror substitution is
112 appended to the path used to access the mirror.
113 Here is an example:
114 <literallayout class='monospaced'>
115 SSTATE_MIRRORS = "file://.* http://<replaceable>someserver</replaceable>.tld/share/sstate/PATH"
116 </literallayout>
117 </para>
118 </section>
119
120 <section id='migration-1.3-bblayers-conf'>
121 <title>bblayers.conf</title>
122
123 <para>
124 The <filename>meta-yocto</filename> layer consists of two parts
125 that correspond to the Poky reference distribution and the
126 reference hardware Board Support Packages (BSPs), respectively:
127 <filename>meta-yocto</filename> and
128 <filename>meta-yocto-bsp</filename>.
129 When running BitBake for the first time after upgrading,
130 your <filename>conf/bblayers.conf</filename> file will be
131 updated to handle this change and you will be asked to
132 re-run or restart for the changes to take effect.
133 </para>
134 </section>
135 </section>
136
137 <section id='1.3-recipes'>
138 <title>Recipes</title>
139
140 <para>
141 Differences include changes for the following:
142 <itemizedlist>
143 <listitem><para>Python function whitespace</para></listitem>
144 <listitem><para><filename>proto=</filename> in <filename>SRC_URI</filename></para></listitem>
145 <listitem><para><filename>nativesdk</filename></para></listitem>
146 <listitem><para>Task recipes</para></listitem>
147 <listitem><para><filename>IMAGE_FEATURES</filename></para></listitem>
148 <listitem><para>Removed recipes</para></listitem>
149 </itemizedlist>
150 </para>
151
152 <section id='migration-1.3-python-function-whitespace'>
153 <title>Python Function Whitespace</title>
154
155 <para>
156 All Python functions must now use four spaces for indentation.
157 Previously, an inconsistent mix of spaces and tabs existed,
158 which made extending these functions using
159 <filename>_append</filename> or <filename>_prepend</filename>
160 complicated given that Python treats whitespace as
161 syntactically significant.
162 If you are defining or extending any Python functions (e.g.
163 <filename>populate_packages</filename>, <filename>do_unpack</filename>,
164 <filename>do_patch</filename> and so forth) in custom recipes
165 or classes, you need to ensure you are using consistent
166 four-space indentation.
167 </para>
168 </section>
169
170 <section id='migration-1.3-proto=-in-src-uri'>
171 <title>proto= in SRC_URI</title>
172
173 <para>
174 Any use of <filename>proto=</filename> in
175 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
176 needs to be changed to <filename>protocol=</filename>.
177 In particular, this applies to the following URIs:
178 <itemizedlist>
179 <listitem><para><filename>svn://</filename></para></listitem>
180 <listitem><para><filename>bzr://</filename></para></listitem>
181 <listitem><para><filename>hg://</filename></para></listitem>
182 <listitem><para><filename>osc://</filename></para></listitem>
183 </itemizedlist>
184 Other URIs were already using <filename>protocol=</filename>.
185 This change improves consistency.
186 </para>
187 </section>
188
189 <section id='migration-1.3-nativesdk'>
190 <title>nativesdk</title>
191
192 <para>
193 The suffix <filename>nativesdk</filename> is now implemented
194 as a prefix, which simplifies a lot of the packaging code for
195 <filename>nativesdk</filename> recipes.
196 All custom <filename>nativesdk</filename> recipes, which are
197 relocatable packages that are native to
198 <link linkend='var-SDK_ARCH'><filename>SDK_ARCH</filename></link>,
199 and any references need to be updated to use
200 <filename>nativesdk-*</filename> instead of
201 <filename>*-nativesdk</filename>.
202 </para>
203 </section>
204
205 <section id='migration-1.3-task-recipes'>
206 <title>Task Recipes</title>
207
208 <para>
209 "Task" recipes are now known as "Package groups" and have
210 been renamed from <filename>task-*.bb</filename> to
211 <filename>packagegroup-*.bb</filename>.
212 Existing references to the previous <filename>task-*</filename>
213 names should work in most cases as there is an automatic
214 upgrade path for most packages.
215 However, you should update references in your own recipes and
216 configurations as they could be removed in future releases.
217 You should also rename any custom <filename>task-*</filename>
218 recipes to <filename>packagegroup-*</filename>, and change
219 them to inherit <filename>packagegroup</filename> instead of
220 <filename>task</filename>, as well as taking the opportunity
221 to remove anything now handled by
222 <filename>packagegroup.bbclass</filename>, such as providing
223 <filename>-dev</filename> and <filename>-dbg</filename>
224 packages, setting
225 <link linkend='var-LIC_FILES_CHKSUM'><filename>LIC_FILES_CHKSUM</filename></link>,
226 and so forth.
227 See the
228 "<link linkend='ref-classes-packagegroup'><filename>packagegroup.bbclass</filename></link>"
229 section for further details.
230 </para>
231 </section>
232
233 <section id='migration-1.3-image-features'>
234 <title>IMAGE_FEATURES</title>
235
236 <para>
237 Image recipes that previously included "apps-console-core"
238 in <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>
239 should now include "splash" instead to enable the boot-up
240 splash screen.
241 Retaining "apps-console-core" will still include the splash
242 screen but generates a warning.
243 The "apps-x11-core" and "apps-x11-games"
244 <filename>IMAGE_FEATURES</filename> features have been removed.
245 </para>
246 </section>
247
248 <section id='migration-1.3-removed-recipes'>
249 <title>Removed Recipes</title>
250
251 <para>
252 The following recipes have been removed.
253 For most of them, it is unlikely that you would have any
254 references to them in your own
255 <link linkend='metadata'>Metadata</link>.
256 However, you should check your metadata against this list to be sure:
257 <itemizedlist>
258 <listitem><para><emphasis><filename>libx11-trim</filename></emphasis>:
259 Replaced by <filename>libx11</filename>, which has a negligible
260 size difference with modern Xorg.</para></listitem>
261 <listitem><para><emphasis><filename>xserver-xorg-lite</filename></emphasis>:
262 Use <filename>xserver-xorg</filename>, which has a negligible
263 size difference when DRI and GLX modules are not installed.</para></listitem>
264 <listitem><para><emphasis><filename>xserver-kdrive</filename></emphasis>:
265 Effectively unmaintained for many years.</para></listitem>
266 <listitem><para><emphasis><filename>mesa-xlib</filename></emphasis>:
267 No longer serves any purpose.</para></listitem>
268 <listitem><para><emphasis><filename>galago</filename></emphasis>:
269 Replaced by telepathy.</para></listitem>
270 <listitem><para><emphasis><filename>gail</filename></emphasis>:
271 Functionality was integrated into GTK+ 2.13.</para></listitem>
272 <listitem><para><emphasis><filename>eggdbus</filename></emphasis>:
273 No longer needed.</para></listitem>
274 <listitem><para><emphasis><filename>gcc-*-intermediate</filename></emphasis>:
275 The build has been restructured to avoid the need for
276 this step.</para></listitem>
277 <listitem><para><emphasis><filename>libgsmd</filename></emphasis>:
278 Unmaintained for many years.
279 Functionality now provided by
280 <filename>ofono</filename> instead.</para></listitem>
281 <listitem><para><emphasis>contacts, dates, tasks, eds-tools</emphasis>:
282 Largely unmaintained PIM application suite.
283 It has been moved to <filename>meta-gnome</filename>
284 in <filename>meta-openembedded</filename>.</para></listitem>
285 </itemizedlist>
286 In addition to the previously listed changes, the
287 <filename>meta-demoapps</filename> directory has also been removed
288 because the recipes in it were not being maintained and many
289 had become obsolete or broken.
290 Additionally, these recipes were not parsed in the default configuration.
291 Many of these recipes are already provided in an updated and
292 maintained form within the OpenEmbedded community layers such as
293 <filename>meta-oe</filename> and <filename>meta-gnome</filename>.
294 For the remainder, you can now find them in the
295 <filename>meta-extras</filename> repository, which is in the
296 Yocto Project
297 <ulink url='&YOCTO_DOCS_OM_URL;#source-repositories'>Source Repositories</ulink>.
298 </para>
299 </section>
300 </section>
301
302 <section id='1.3-linux-kernel-naming'>
303 <title>Linux Kernel Naming</title>
304
305 <para>
306 The naming scheme for kernel output binaries has been changed to
307 now include
308 <link linkend='var-PE'><filename>PE</filename></link> as part of the
309 filename:
310 <literallayout class='monospaced'>
311 KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${PE}-${PV}-${PR}-${MACHINE}-${DATETIME}"
312 </literallayout>
313 </para>
314
315 <para>
316 Because the <filename>PE</filename> variable is not set by default,
317 these binary files could result with names that include two dash
318 characters.
319 Here is an example:
320 <literallayout class='monospaced'>
321 bzImage--3.10.9+git0+cd502a8814_7144bcc4b8-r0-qemux86-64-20130830085431.bin
322 </literallayout>
323 </para>
324 </section>
325</section>
326
327<section id='moving-to-the-yocto-project-1.4-release'>
328 <title>Moving to the Yocto Project 1.4 Release</title>
329
330 <para>
331 This section provides migration information for moving to the
332 Yocto Project 1.4 Release from the prior release.
333 </para>
334
335 <section id='migration-1.4-bitbake'>
336 <title>BitBake</title>
337
338 <para>
339 Differences include the following:
340 <itemizedlist>
341 <listitem><para><emphasis>Comment Continuation:</emphasis>
342 If a comment ends with a line continuation (\) character,
343 then the next line must also be a comment.
344 Any instance where this is not the case, now triggers
345 a warning.
346 You must either remove the continuation character, or be
347 sure the next line is a comment.
348 </para></listitem>
349 <listitem><para><emphasis>Package Name Overrides:</emphasis>
350 The runtime package specific variables
351 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>,
352 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>,
353 <link linkend='var-RSUGGESTS'><filename>RSUGGESTS</filename></link>,
354 <link linkend='var-RPROVIDES'><filename>RPROVIDES</filename></link>,
355 <link linkend='var-RCONFLICTS'><filename>RCONFLICTS</filename></link>,
356 <link linkend='var-RREPLACES'><filename>RREPLACES</filename></link>,
357 <link linkend='var-FILES'><filename>FILES</filename></link>,
358 <link linkend='var-ALLOW_EMPTY'><filename>ALLOW_EMPTY</filename></link>,
359 and the pre, post, install, and uninstall script functions
360 <filename>pkg_preinst</filename>,
361 <filename>pkg_postinst</filename>,
362 <filename>pkg_prerm</filename>, and
363 <filename>pkg_postrm</filename> should always have a
364 package name override.
365 For example, use <filename>RDEPENDS_${PN}</filename> for
366 the main package instead of <filename>RDEPENDS</filename>.
367 BitBake uses more strict checks when it parses recipes.
368 </para></listitem>
369 </itemizedlist>
370 </para>
371 </section>
372
373 <section id='migration-1.4-build-behavior'>
374 <title>Build Behavior</title>
375
376 <para>
377 Differences include the following:
378 <itemizedlist>
379 <listitem><para><emphasis>Shared State Code:</emphasis>
380 The shared state code has been optimized to avoid running
381 unnecessary tasks.
382 For example, the following no longer populates the target
383 sysroot since that is not necessary:
384 <literallayout class='monospaced'>
385 $ bitbake -c rootfs <replaceable>some-image</replaceable>
386 </literallayout>
387 Instead, the system just needs to extract the output
388 package contents, re-create the packages, and construct
389 the root filesystem.
390 This change is unlikely to cause any problems unless
391 you have missing declared dependencies.
392 </para></listitem>
393 <listitem><para><emphasis>Scanning Directory Names:</emphasis>
394 When scanning for files in
395 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>,
396 the build system now uses
397 <link linkend='var-FILESOVERRIDES'><filename>FILESOVERRIDES</filename></link>
398 instead of <link linkend='var-OVERRIDES'><filename>OVERRIDES</filename></link>
399 for the directory names.
400 In general, the values previously in
401 <filename>OVERRIDES</filename> are now in
402 <filename>FILESOVERRIDES</filename> as well.
403 However, if you relied upon an additional value
404 you previously added to <filename>OVERRIDES</filename>,
405 you might now need to add it to
406 <filename>FILESOVERRIDES</filename> unless you are already
407 adding it through the
408 <link linkend='var-MACHINEOVERRIDES'><filename>MACHINEOVERRIDES</filename></link>
409 or <link linkend='var-DISTROOVERRIDES'><filename>DISTROOVERRIDES</filename></link>
410 variables, as appropriate.
411 For more related changes, see the
412 "<link linkend='migration-1.4-variables'>Variables</link>"
413 section.
414 </para></listitem>
415 </itemizedlist>
416 </para>
417 </section>
418
419
420 <section id='migration-1.4-proxies-and-fetching-source'>
421 <title>Proxies and Fetching Source</title>
422
423 <para>
424 A new <filename>oe-git-proxy</filename> script has been added to
425 replace previous methods of handling proxies and fetching source
426 from Git.
427 See the <filename>meta-yocto/conf/site.conf.sample</filename> file
428 for information on how to use this script.
429 </para>
430 </section>
431
432 <section id='migration-1.4-custom-interfaces-file-netbase-change'>
433 <title>Custom Interfaces File (netbase change)</title>
434
435 <para>
436 If you have created your own custom
437 <filename>etc/network/interfaces</filename> file by creating
438 an append file for the <filename>netbase</filename> recipe,
439 you now need to create an append file for the
440 <filename>init-ifupdown</filename> recipe instead, which you can
441 find in the
442 <link linkend='source-directory'>Source Directory</link>
443 at <filename>meta/recipes-core/init-ifupdown</filename>.
444 For information on how to use append files, see the
445 "<ulink url='&YOCTO_DOCS_DEV_URL;#using-bbappend-files'>Using .bbappend Files</ulink>"
446 section in the Yocto Project Development Tasks Manual.
447 </para>
448 </section>
449
450 <section id='migration-1.4-remote-debugging'>
451 <title>Remote Debugging</title>
452
453 <para>
454 Support for remote debugging with the Eclipse IDE is now
455 separated into an image feature
456 (<filename>eclipse-debug</filename>) that corresponds to the
457 <filename>packagegroup-core-eclipse-debug</filename> package group.
458 Previously, the debugging feature was included through the
459 <filename>tools-debug</filename> image feature, which corresponds
460 to the <filename>packagegroup-core-tools-debug</filename>
461 package group.
462 </para>
463 </section>
464
465 <section id='migration-1.4-variables'>
466 <title>Variables</title>
467
468 <para>
469 The following variables have changed:
470 <itemizedlist>
471 <listitem><para><emphasis><filename>SANITY_TESTED_DISTROS</filename>:</emphasis>
472 This variable now uses a distribution ID, which is composed
473 of the host distributor ID followed by the release.
474 Previously,
475 <link linkend='var-SANITY_TESTED_DISTROS'><filename>SANITY_TESTED_DISTROS</filename></link>
476 was composed of the description field.
477 For example, "Ubuntu 12.10" becomes "Ubuntu-12.10".
478 You do not need to worry about this change if you are not
479 specifically setting this variable, or if you are
480 specifically setting it to "".
481 </para></listitem>
482 <listitem><para><emphasis><filename>SRC_URI</filename>:</emphasis>
483 The <filename>${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}</filename>,
484 <filename>${</filename><link linkend='var-PF'><filename>PF</filename></link><filename>}</filename>,
485 <filename>${</filename><link linkend='var-P'><filename>P</filename></link><filename>}</filename>,
486 and <filename>FILE_DIRNAME</filename> directories have been
487 dropped from the default value of the
488 <link linkend='var-FILESPATH'><filename>FILESPATH</filename></link>
489 variable, which is used as the search path for finding files
490 referred to in
491 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>.
492 If you have a recipe that relied upon these directories,
493 which would be unusual, then you will need to add the
494 appropriate paths within the recipe or, alternatively,
495 rearrange the files.
496 The most common locations are still covered by
497 <filename>${BP}</filename>, <filename>${BPN}</filename>,
498 and "files", which all remain in the default value of
499 <link linkend='var-FILESPATH'><filename>FILESPATH</filename></link>.
500 </para></listitem>
501 </itemizedlist>
502 </para>
503 </section>
504
505 <section id='migration-target-package-management-with-rpm'>
506 <title>Target Package Management with RPM</title>
507
508 <para>
509 If runtime package management is enabled and the RPM backend
510 is selected, Smart is now installed for package download, dependency
511 resolution, and upgrades instead of Zypper.
512 For more information on how to use Smart, run the following command
513 on the target:
514 <literallayout class='monospaced'>
515 smart --help
516 </literallayout>
517 </para>
518 </section>
519
520 <section id='migration-1.4-recipes-moved'>
521 <title>Recipes Moved</title>
522
523 <para>
524 The following recipes were moved from their previous locations
525 because they are no longer used by anything in
526 the OpenEmbedded-Core:
527 <itemizedlist>
528 <listitem><para><emphasis><filename>clutter-box2d</filename>:</emphasis>
529 Now resides in the <filename>meta-oe</filename> layer.
530 </para></listitem>
531 <listitem><para><emphasis><filename>evolution-data-server</filename>:</emphasis>
532 Now resides in the <filename>meta-gnome</filename> layer.
533 </para></listitem>
534 <listitem><para><emphasis><filename>gthumb</filename>:</emphasis>
535 Now resides in the <filename>meta-gnome</filename> layer.
536 </para></listitem>
537 <listitem><para><emphasis><filename>gtkhtml2</filename>:</emphasis>
538 Now resides in the <filename>meta-oe</filename> layer.
539 </para></listitem>
540 <listitem><para><emphasis><filename>gupnp</filename>:</emphasis>
541 Now resides in the <filename>meta-multimedia</filename> layer.
542 </para></listitem>
543 <listitem><para><emphasis><filename>gypsy</filename>:</emphasis>
544 Now resides in the <filename>meta-oe</filename> layer.
545 </para></listitem>
546 <listitem><para><emphasis><filename>libcanberra</filename>:</emphasis>
547 Now resides in the <filename>meta-gnome</filename> layer.
548 </para></listitem>
549 <listitem><para><emphasis><filename>libgdata</filename>:</emphasis>
550 Now resides in the <filename>meta-gnome</filename> layer.
551 </para></listitem>
552 <listitem><para><emphasis><filename>libmusicbrainz</filename>:</emphasis>
553 Now resides in the <filename>meta-multimedia</filename> layer.
554 </para></listitem>
555 <listitem><para><emphasis><filename>metacity</filename>:</emphasis>
556 Now resides in the <filename>meta-gnome</filename> layer.
557 </para></listitem>
558 <listitem><para><emphasis><filename>polkit</filename>:</emphasis>
559 Now resides in the <filename>meta-oe</filename> layer.
560 </para></listitem>
561 <listitem><para><emphasis><filename>zeroconf</filename>:</emphasis>
562 Now resides in the <filename>meta-networking</filename> layer.
563 </para></listitem>
564 </itemizedlist>
565 </para>
566 </section>
567
568 <section id='migration-1.4-removals-and-renames'>
569 <title>Removals and Renames</title>
570
571 <para>
572 The following list shows what has been removed or renamed:
573 <itemizedlist>
574 <listitem><para><emphasis><filename>evieext</filename>:</emphasis>
575 Removed because it has been removed from
576 <filename>xserver</filename> since 2008.
577 </para></listitem>
578 <listitem><para><emphasis>Gtk+ DirectFB:</emphasis>
579 Removed support because upstream Gtk+ no longer supports it
580 as of version 2.18.
581 </para></listitem>
582 <listitem><para><emphasis><filename>libxfontcache / xfontcacheproto</filename>:</emphasis>
583 Removed because they were removed from the Xorg server in 2008.
584 </para></listitem>
585 <listitem><para><emphasis><filename>libxp / libxprintapputil / libxprintutil / printproto</filename>:</emphasis>
586 Removed because the XPrint server was removed from
587 Xorg in 2008.
588 </para></listitem>
589 <listitem><para><emphasis><filename>libxtrap / xtrapproto</filename>:</emphasis>
590 Removed because their functionality was broken upstream.
591 </para></listitem>
592 <listitem><para><emphasis>linux-yocto 3.0 kernel:</emphasis>
593 Removed with linux-yocto 3.8 kernel being added.
594 The linux-yocto 3.2 and linux-yocto 3.4 kernels remain
595 as part of the release.
596 </para></listitem>
597 <listitem><para><emphasis><filename>lsbsetup</filename>:</emphasis>
598 Removed with functionality now provided by
599 <filename>lsbtest</filename>.
600 </para></listitem>
601 <listitem><para><emphasis><filename>matchbox-stroke</filename>:</emphasis>
602 Removed because it was never more than a proof-of-concept.
603 </para></listitem>
604 <listitem><para><emphasis><filename>matchbox-wm-2 / matchbox-theme-sato-2</filename>:</emphasis>
605 Removed because they are not maintained.
606 However, <filename>matchbox-wm</filename> and
607 <filename>matchbox-theme-sato</filename> are still
608 provided.
609 </para></listitem>
610 <listitem><para><emphasis><filename>mesa-dri</filename>:</emphasis>
611 Renamed to <filename>mesa</filename>.
612 </para></listitem>
613 <listitem><para><emphasis><filename>mesa-xlib</filename>:</emphasis>
614 Removed because it was no longer useful.
615 </para></listitem>
616 <listitem><para><emphasis><filename>mutter</filename>:</emphasis>
617 Removed because nothing ever uses it and the recipe is
618 very old.
619 </para></listitem>
620 <listitem><para><emphasis><filename>orinoco-conf</filename>:</emphasis>
621 Removed because it has become obsolete.
622 </para></listitem>
623 <listitem><para><emphasis><filename>update-modules</filename>:</emphasis>
624 Removed because it is no longer used.
625 The kernel module <filename>postinstall</filename> and
626 <filename>postrm</filename> scripts can now do the same
627 task without the use of this script.
628 </para></listitem>
629 <listitem><para><emphasis><filename>web</filename>:</emphasis>
630 Removed because it is not maintained. Superseded by
631 <filename>web-webkit</filename>.
632 </para></listitem>
633 <listitem><para><emphasis><filename>xf86bigfontproto</filename>:</emphasis>
634 Removed because upstream it has been disabled by default
635 since 2007.
636 Nothing uses <filename>xf86bigfontproto</filename>.
637 </para></listitem>
638 <listitem><para><emphasis><filename>xf86rushproto</filename>:</emphasis>
639 Removed because its dependency in
640 <filename>xserver</filename> was spurious and it was
641 removed in 2005.
642 </para></listitem>
643 <listitem><para><emphasis><filename>zypper / libzypp / sat-solver</filename>:</emphasis>
644 Removed and been functionally replaced with Smart
645 (<filename>python-smartpm</filename>) when RPM packaging
646 is used and package management is enabled on the target.
647 </para></listitem>
648 </itemizedlist>
649 </para>
650 </section>
651</section>
652
653<section id='moving-to-the-yocto-project-1.5-release'>
654 <title>Moving to the Yocto Project 1.5 Release</title>
655
656 <para>
657 This section provides migration information for moving to the
658 Yocto Project 1.5 Release from the prior release.
659 </para>
660
661 <section id='migration-1.5-host-dependency-changes'>
662 <title>Host Dependency Changes</title>
663
664 <para>
665 The OpenEmbedded build system now has some additional requirements
666 on the host system:
667 <itemizedlist>
668 <listitem><para>Python 2.7.3+</para></listitem>
669 <listitem><para>Tar 1.24+</para></listitem>
670 <listitem><para>Git 1.7.8+</para></listitem>
671 <listitem><para>Patched version of Make if you are using
672 3.82.
673 Most distributions that provide Make 3.82 use the patched
674 version.</para></listitem>
675 </itemizedlist>
676 If the Linux distribution you are using on your build host
677 does not provide packages for these, you can install and use
678 the Buildtools tarball, which provides an SDK-like environment
679 containing them.
680 </para>
681
682 <para>
683 For more information on this requirement, see the
684 "<link linkend='required-git-tar-python-and-gcc-versions'>Required Git, tar, Python and gcc Versions</link>"
685 section.
686 </para>
687 </section>
688
689 <section id='migration-1.5-atom-pc-bsp'>
690 <title><filename>atom-pc</filename> Board Support Package (BSP)</title>
691
692 <para>
693 The <filename>atom-pc</filename> hardware reference BSP has been
694 replaced by a <filename>genericx86</filename> BSP.
695 This BSP is not necessarily guaranteed to work on all x86
696 hardware, but it will run on a wider range of systems than the
697 <filename>atom-pc</filename> did.
698 <note>
699 Additionally, a <filename>genericx86-64</filename> BSP has
700 been added for 64-bit Atom systems.
701 </note>
702 </para>
703 </section>
704
705 <section id='migration-1.5-bitbake'>
706 <title>BitBake</title>
707
708 <para>
709 The following changes have been made that relate to BitBake:
710 <itemizedlist>
711 <listitem><para>
712 BitBake now supports a <filename>_remove</filename>
713 operator.
714 The addition of this operator means you will have to
715 rename any items in recipe space (functions, variables)
716 whose names currently contain
717 <filename>_remove_</filename> or end with
718 <filename>_remove</filename> to avoid unexpected behavior.
719 </para></listitem>
720 <listitem><para>
721 BitBake's global method pool has been removed.
722 This method is not particularly useful and led to clashes
723 between recipes containing functions that had the
724 same name.</para></listitem>
725 <listitem><para>
726 The "none" server backend has been removed.
727 The "process" server backend has been serving well as the
728 default for a long time now.</para></listitem>
729 <listitem><para>
730 The <filename>bitbake-runtask</filename> script has been
731 removed.</para></listitem>
732 <listitem><para>
733 <filename>${</filename><link linkend='var-P'><filename>P</filename></link><filename>}</filename>
734 and
735 <filename>${</filename><link linkend='var-PF'><filename>PF</filename></link><filename>}</filename>
736 are no longer added to
737 <link linkend='var-PROVIDES'><filename>PROVIDES</filename></link>
738 by default in <filename>bitbake.conf</filename>.
739 These version-specific <filename>PROVIDES</filename>
740 items were seldom used.
741 Attempting to use them could result in two versions being
742 built simultaneously rather than just one version due to
743 the way BitBake resolves dependencies.</para></listitem>
744 </itemizedlist>
745 </para>
746 </section>
747
748 <section id='migration-1.5-qa-warnings'>
749 <title>QA Warnings</title>
750
751 <para>
752 The following changes have been made to the package QA checks:
753 <itemizedlist>
754 <listitem><para>
755 If you have customized
756 <link linkend='var-ERROR_QA'><filename>ERROR_QA</filename></link>
757 or <link linkend='var-WARN_QA'><filename>WARN_QA</filename></link>
758 values in your configuration, check that they contain all of
759 the issues that you wish to be reported.
760 Previous Yocto Project versions contained a bug that meant
761 that any item not mentioned in <filename>ERROR_QA</filename>
762 or <filename>WARN_QA</filename> would be treated as a
763 warning.
764 Consequently, several important items were not already in
765 the default value of <filename>WARN_QA</filename>.
766 All of the possible QA checks are now documented in the
767 "<link linkend='ref-classes-insane'><filename>insane.bbclass</filename></link>"
768 section.</para></listitem>
769 <listitem><para>
770 An additional QA check has been added to check if
771 <filename>/usr/share/info/dir</filename> is being installed.
772 Your recipe should delete this file within
773 <link linkend='ref-tasks-install'><filename>do_install</filename></link>
774 if "make install" is installing it.
775 </para></listitem>
776 <listitem><para>
777 If you are using the buildhistory class, the check for the
778 package version going backwards is now controlled using a
779 standard QA check.
780 Thus, if you have customized your
781 <filename>ERROR_QA</filename> or
782 <filename>WARN_QA</filename> values and still wish to have
783 this check performed, you should add
784 "version-going-backwards" to your value for one or the
785 other variables depending on how you wish it to be handled.
786 See the documented QA checks in the
787 "<link linkend='ref-classes-insane'><filename>insane.bbclass</filename></link>"
788 section.
789 </para></listitem>
790 </itemizedlist>
791 </para>
792 </section>
793
794 <section id='migration-1.5-directory-layout-changes'>
795 <title>Directory Layout Changes</title>
796
797 <para>
798 The following directory changes exist:
799 <itemizedlist>
800 <listitem><para>
801 Output SDK installer files are now named to include the
802 image name and tuning architecture through the
803 <link linkend='var-SDK_NAME'><filename>SDK_NAME</filename></link>
804 variable.</para></listitem>
805 <listitem><para>
806 Images and related files are now installed into a directory
807 that is specific to the machine, instead of a parent
808 directory containing output files for multiple machines.
809 The
810 <link linkend='var-DEPLOY_DIR_IMAGE'><filename>DEPLOY_DIR_IMAGE</filename></link>
811 variable continues to point to the directory containing
812 images for the current
813 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>
814 and should be used anywhere there is a need to refer to
815 this directory.
816 The <filename>runqemu</filename> script now uses this
817 variable to find images and kernel binaries and will use
818 BitBake to determine the directory.
819 Alternatively, you can set the
820 <filename>DEPLOY_DIR_IMAGE</filename> variable in the
821 external environment.</para></listitem>
822 <listitem><para>
823 When buildhistory is enabled, its output is now written
824 under the
825 <link linkend='build-directory'>Build Directory</link>
826 rather than
827 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>.
828 Doing so makes it easier to delete
829 <filename>TMPDIR</filename> and preserve the build history.
830 Additionally, data for produced SDKs is now split by
831 <link linkend='var-IMAGE_NAME'><filename>IMAGE_NAME</filename></link>.
832 </para></listitem>
833 <listitem><para>
834 The <filename>pkgdata</filename> directory produced as
835 part of the packaging process has been collapsed into a
836 single machine-specific directory.
837 This directory is located under
838 <filename>sysroots</filename> and uses a machine-specific
839 name (i.e.
840 <filename>tmp/sysroots/<replaceable>machine</replaceable>/pkgdata</filename>).
841 </para></listitem>
842 </itemizedlist>
843 </para>
844 </section>
845
846 <section id='migration-1.5-shortened-git-srcrev-values'>
847 <title>Shortened Git <filename>SRCREV</filename> Values</title>
848
849 <para>
850 BitBake will now shorten revisions from Git repositories from the
851 normal 40 characters down to 10 characters within
852 <link linkend='var-SRCPV'><filename>SRCPV</filename></link>
853 for improved usability in path and file names.
854 This change should be safe within contexts where these revisions
855 are used because the chances of spatially close collisions
856 is very low.
857 Distant collisions are not a major issue in the way
858 the values are used.
859 </para>
860 </section>
861
862 <section id='migration-1.5-image-features'>
863 <title><filename>IMAGE_FEATURES</filename></title>
864
865 <para>
866 The following changes have been made that relate to
867 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>:
868 <itemizedlist>
869 <listitem><para>
870 The value of <filename>IMAGE_FEATURES</filename> is now
871 validated to ensure invalid feature items are not added.
872 Some users mistakenly add package names to this variable
873 instead of using
874 <link linkend='var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></link>
875 in order to have the package added to the image, which does
876 not work.
877 This change is intended to catch those kinds of situations.
878 Valid <filename>IMAGE_FEATURES</filename> are drawn from
879 <filename>PACKAGE_GROUP</filename> definitions,
880 <link linkend='var-COMPLEMENTARY_GLOB'><filename>COMPLEMENTARY_GLOB</filename></link>
881 and a new "validitems" varflag on
882 <filename>IMAGE_FEATURES</filename>.
883 The "validitems" varflag change allows additional features
884 to be added if they are not provided using the previous
885 two mechanisms.
886 </para></listitem>
887 <listitem><para>
888 The previously deprecated "apps-console-core"
889 <filename>IMAGE_FEATURES</filename> item is no longer
890 supported.
891 Add "splash" to <filename>IMAGE_FEATURES</filename> if you
892 wish to have the splash screen enabled, since this is
893 all that apps-console-core was doing.</para></listitem>
894 </itemizedlist>
895 </para>
896 </section>
897
898 <section id='migration-1.5-run'>
899 <title><filename>/run</filename></title>
900
901 <para>
902 The <filename>/run</filename> directory from the Filesystem
903 Hierarchy Standard 3.0 has been introduced.
904 You can find some of the implications for this change
905 <ulink url='http://cgit.openembedded.org/openembedded-core/commit/?id=0e326280a15b0f2c4ef2ef4ec441f63f55b75873'>here</ulink>.
906 The change also means that recipes that install files to
907 <filename>/var/run</filename> must be changed.
908 You can find a guide on how to make these changes
909 <ulink url='http://permalink.gmane.org/gmane.comp.handhelds.openembedded/58530'>here</ulink>.
910 </para>
911 </section>
912
913 <section id='migration-1.5-removal-of-package-manager-database-within-image-recipes'>
914 <title>Removal of Package Manager Database Within Image Recipes</title>
915
916 <para>
917 The image <filename>core-image-minimal</filename> no longer adds
918 <filename>remove_packaging_data_files</filename> to
919 <link linkend='var-ROOTFS_POSTPROCESS_COMMAND'><filename>ROOTFS_POSTPROCESS_COMMAND</filename></link>.
920 This addition is now handled automatically when "package-management"
921 is not in
922 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>.
923 If you have custom image recipes that make this addition,
924 you should remove the lines, as they are not needed and might
925 interfere with correct operation of postinstall scripts.
926 </para>
927 </section>
928
929 <section id='migration-1.5-images-now-rebuild-only-on-changes-instead-of-every-time'>
930 <title>Images Now Rebuild Only on Changes Instead of Every Time</title>
931
932 <para>
933 The
934 <link linkend='ref-tasks-rootfs'><filename>do_rootfs</filename></link>
935 and other related image
936 construction tasks are no longer marked as "nostamp".
937 Consequently, they will only be re-executed when their inputs have
938 changed.
939 Previous versions of the OpenEmbedded build system always rebuilt
940 the image when requested rather when necessary.
941 </para>
942 </section>
943
944 <section id='migration-1.5-task-recipes'>
945 <title>Task Recipes</title>
946
947 <para>
948 The previously deprecated <filename>task.bbclass</filename> has
949 now been dropped.
950 For recipes that previously inherited from this class, you should
951 rename them from <filename>task-*</filename> to
952 <filename>packagegroup-*</filename> and inherit packagegroup
953 instead.
954 </para>
955
956 <para>
957 For more information, see the
958 "<link linkend='ref-classes-packagegroup'><filename>packagegroup.bbclass</filename></link>"
959 section.
960 </para>
961 </section>
962
963 <section id='migration-1.5-busybox'>
964 <title>BusyBox</title>
965
966 <para>
967 By default, we now split BusyBox into two binaries:
968 one that is suid root for those components that need it, and
969 another for the rest of the components.
970 Splitting BusyBox allows for optimization that eliminates the
971 <filename>tinylogin</filename> recipe as recommended by upstream.
972 You can disable this split by setting
973 <link linkend='var-BUSYBOX_SPLIT_SUID'><filename>BUSYBOX_SPLIT_SUID</filename></link>
974 to "0".
975 </para>
976 </section>
977
978 <section id='migration-1.5-automated-image-testing'>
979 <title>Automated Image Testing</title>
980
981 <para>
982 A new automated image testing framework has been added
983 through the
984 <link linkend='ref-classes-testimage*'><filename>testimage.bbclass</filename></link>
985 class.
986 This framework replaces the older
987 <filename>imagetest-qemu</filename> framework.
988 </para>
989
990 <para>
991 You can learn more about performing automated image tests in the
992 "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
993 section in the Yocto Project Development Tasks Manual.
994 </para>
995 </section>
996
997 <section id='migration-1.5-build-history'>
998 <title>Build History</title>
999
1000 <para>
1001 Following are changes to Build History:
1002 <itemizedlist>
1003 <listitem><para>
1004 Installed package sizes:
1005 <filename>installed-package-sizes.txt</filename> for an
1006 image now records the size of the files installed by each
1007 package instead of the size of each compressed package
1008 archive file.</para></listitem>
1009 <listitem><para>
1010 The dependency graphs (<filename>depends*.dot</filename>)
1011 now use the actual package names instead of replacing
1012 dashes, dots and plus signs with underscores.
1013 </para></listitem>
1014 <listitem><para>
1015 The <filename>buildhistory-diff</filename> and
1016 <filename>buildhistory-collect-srcrevs</filename>
1017 utilities have improved command-line handling.
1018 Use the <filename>--help</filename> option for
1019 each utility for more information on the new syntax.
1020 </para></listitem>
1021 </itemizedlist>
1022 For more information on Build History, see the
1023 "<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-build-output-quality'>Maintaining Build Output Quality</ulink>"
1024 section in the Yocto Project Development Tasks Manual.
1025 </para>
1026 </section>
1027
1028 <section id='migration-1.5-udev'>
1029 <title><filename>udev</filename></title>
1030
1031 <para>
1032 Following are changes to <filename>udev</filename>:
1033 <itemizedlist>
1034 <listitem><para>
1035 <filename>udev</filename> no longer brings in
1036 <filename>udev-extraconf</filename> automatically
1037 through
1038 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>,
1039 since this was originally intended to be optional.
1040 If you need the extra rules, then add
1041 <filename>udev-extraconf</filename> to your image.
1042 </para></listitem>
1043 <listitem><para>
1044 <filename>udev</filename> no longer brings in
1045 <filename>pciutils-ids</filename> or
1046 <filename>usbutils-ids</filename> through
1047 <filename>RRECOMMENDS</filename>.
1048 These are not needed by <filename>udev</filename> itself
1049 and removing them saves around 350KB.
1050 </para></listitem>
1051 </itemizedlist>
1052 </para>
1053 </section>
1054
1055 <section id='migration-1.5-removed-renamed-recipes'>
1056 <title>Removed and Renamed Recipes</title>
1057
1058 <itemizedlist>
1059 <listitem><para>
1060 The <filename>linux-yocto</filename> 3.2 kernel has been
1061 removed.</para></listitem>
1062 <listitem><para>
1063 <filename>libtool-nativesdk</filename> has been renamed to
1064 <filename>nativesdk-libtool</filename>.</para></listitem>
1065 <listitem><para>
1066 <filename>tinylogin</filename> has been removed.
1067 It has been replaced by a suid portion of Busybox.
1068 See the
1069 "<link linkend='migration-1.5-busybox'>BusyBox</link>" section
1070 for more information.</para></listitem>
1071 <listitem><para>
1072 <filename>external-python-tarball</filename> has been renamed
1073 to <filename>buildtools-tarball</filename>.
1074 </para></listitem>
1075 <listitem><para>
1076 <filename>web-webkit</filename> has been removed.
1077 It has been functionally replaced by
1078 <filename>midori</filename>.</para></listitem>
1079 <listitem><para>
1080 <filename>imake</filename> has been removed.
1081 It is no longer needed by any other recipe.
1082 </para></listitem>
1083 <listitem><para>
1084 <filename>transfig-native</filename> has been removed.
1085 It is no longer needed by any other recipe.
1086 </para></listitem>
1087 <listitem><para>
1088 <filename>anjuta-remote-run</filename> has been removed.
1089 Anjuta IDE integration has not been officially supported for
1090 several releases.</para></listitem>
1091 </itemizedlist>
1092 </section>
1093
1094 <section id='migration-1.5-other-changes'>
1095 <title>Other Changes</title>
1096
1097 <para>
1098 Following is a list of short entries describing other changes:
1099 <itemizedlist>
1100 <listitem><para>
1101 <filename>run-postinsts</filename>: Make this generic.
1102 </para></listitem>
1103 <listitem><para>
1104 <filename>base-files</filename>: Remove the unnecessary
1105 <filename>media/</filename><replaceable>xxx</replaceable> directories.
1106 </para></listitem>
1107 <listitem><para>
1108 <filename>alsa-state</filename>: Provide an empty
1109 <filename>asound.conf</filename> by default.
1110 </para></listitem>
1111 <listitem><para>
1112 <filename>classes/image</filename>: Ensure
1113 <link linkend='var-BAD_RECOMMENDATIONS'><filename>BAD_RECOMMENDATIONS</filename></link>
1114 supports pre-renamed package names.</para></listitem>
1115 <listitem><para>
1116 <filename>classes/rootfs_rpm</filename>: Implement
1117 <filename>BAD_RECOMMENDATIONS</filename> for RPM.
1118 </para></listitem>
1119 <listitem><para>
1120 <filename>systemd</filename>: Remove
1121 <filename>systemd_unitdir</filename> if
1122 <filename>systemd</filename> is not in
1123 <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>.
1124 </para></listitem>
1125 <listitem><para>
1126 <filename>systemd</filename>: Remove
1127 <filename>init.d</filename> dir if
1128 <filename>systemd</filename> unit file is present and
1129 <filename>sysvinit</filename> is not a distro feature.
1130 </para></listitem>
1131 <listitem><para>
1132 <filename>libpam</filename>: Deny all services for the
1133 <filename>OTHER</filename> entries.
1134 </para></listitem>
1135 <listitem><para>
1136 <filename>image.bbclass</filename>: Move
1137 <filename>runtime_mapping_rename</filename> to avoid
1138 conflict with <filename>multilib</filename>.
1139 See
1140 <ulink url='https://bugzilla.yoctoproject.org/show_bug.cgi?id=4993'><filename>YOCTO #4993</filename></ulink>
1141 in Bugzilla for more information.
1142 </para></listitem>
1143 <listitem><para>
1144 <filename>linux-dtb</filename>: Use kernel build system
1145 to generate the <filename>dtb</filename> files.
1146 </para></listitem>
1147 <listitem><para>
1148 <filename>kern-tools</filename>: Switch from guilt to
1149 new <filename>kgit-s2q</filename> tool.
1150 </para></listitem>
1151 </itemizedlist>
1152 </para>
1153 </section>
1154</section>
1155
1156<section id='moving-to-the-yocto-project-1.6-release'>
1157 <title>Moving to the Yocto Project 1.6 Release</title>
1158
1159 <para>
1160 This section provides migration information for moving to the
1161 Yocto Project 1.6 Release from the prior release.
1162 </para>
1163
1164
1165 <section id='migration-1.6-archiver-class'>
1166 <title><filename>archiver</filename> Class</title>
1167
1168 <para>
1169 The
1170 <link linkend='ref-classes-archiver'><filename>archiver</filename></link>
1171 class has been rewritten and its configuration has been simplified.
1172 For more details on the source archiver, see the
1173 "<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle'>Maintaining Open Source License Compliance During Your Product's Lifecycle</ulink>"
1174 section in the Yocto Project Development Tasks Manual.
1175 </para>
1176 </section>
1177
1178 <section id='migration-1.6-packaging-changes'>
1179 <title>Packaging Changes</title>
1180
1181 <para>
1182 The following packaging changes have been made:
1183 <itemizedlist>
1184 <listitem><para>
1185 The <filename>binutils</filename> recipe no longer produces
1186 a <filename>binutils-symlinks</filename> package.
1187 <filename>update-alternatives</filename> is now used to
1188 handle the preferred <filename>binutils</filename>
1189 variant on the target instead.
1190 </para></listitem>
1191 <listitem><para>
1192 The tc (traffic control) utilities have been split out of
1193 the main <filename>iproute2</filename> package and put
1194 into the <filename>iproute2-tc</filename> package.
1195 </para></listitem>
1196 <listitem><para>
1197 The <filename>gtk-engines</filename> schemas have been
1198 moved to a dedicated
1199 <filename>gtk-engines-schemas</filename> package.
1200 </para></listitem>
1201 <listitem><para>
1202 The <filename>armv7a</filename> with thumb package
1203 architecture suffix has changed.
1204 The suffix for these packages with the thumb
1205 optimization enabled is "t2" as it should be.
1206 Use of this suffix was not the case in the 1.5 release.
1207 Architecture names will change within package feeds as a
1208 result.
1209 </para></listitem>
1210 </itemizedlist>
1211 </para>
1212 </section>
1213
1214 <section id='migration-1.6-bitbake'>
1215 <title>BitBake</title>
1216
1217 <para>
1218 The following changes have been made to
1219 <link linkend='bitbake-term'>BitBake</link>.
1220 </para>
1221
1222 <section id='migration-1.6-matching-branch-requirement-for-git-fetching'>
1223 <title>Matching Branch Requirement for Git Fetching</title>
1224
1225 <para>
1226 When fetching source from a Git repository using
1227 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>,
1228 BitBake will now validate the
1229 <link linkend='var-SRCREV'><filename>SRCREV</filename></link>
1230 value against the branch.
1231 You can specify the branch using the following form:
1232 <literallayout class='monospaced'>
1233 SRC_URI = "git://server.name/repository;branch=<replaceable>branchname</replaceable>"
1234 </literallayout>
1235 If you do not specify a branch, BitBake looks
1236 in the default "master" branch.
1237 </para>
1238
1239 <para>
1240 Alternatively, if you need to bypass this check (e.g.
1241 if you are fetching a revision corresponding to a tag that
1242 is not on any branch), you can add ";nobranch=1" to
1243 the end of the URL within <filename>SRC_URI</filename>.
1244 </para>
1245 </section>
1246
1247 <section id='migration-1.6-bitbake-deps'>
1248 <title>Python Definition substitutions</title>
1249
1250 <para>
1251 BitBake had some previously deprecated Python definitions
1252 within its <filename>bb</filename> module removed.
1253 You should use their sub-module counterparts instead:
1254 <itemizedlist>
1255 <listitem><para><filename>bb.MalformedUrl</filename>:
1256 Use <filename>bb.fetch.MalformedUrl</filename>.
1257 </para></listitem>
1258 <listitem><para><filename>bb.encodeurl</filename>:
1259 Use <filename>bb.fetch.encodeurl</filename>.
1260 </para></listitem>
1261 <listitem><para><filename>bb.decodeurl</filename>:
1262 Use <filename>bb.fetch.decodeurl</filename>
1263 </para></listitem>
1264 <listitem><para><filename>bb.mkdirhier</filename>:
1265 Use <filename>bb.utils.mkdirhier</filename>.
1266 </para></listitem>
1267 <listitem><para><filename>bb.movefile</filename>:
1268 Use <filename>bb.utils.movefile</filename>.
1269 </para></listitem>
1270 <listitem><para><filename>bb.copyfile</filename>:
1271 Use <filename>bb.utils.copyfile</filename>.
1272 </para></listitem>
1273 <listitem><para><filename>bb.which</filename>:
1274 Use <filename>bb.utils.which</filename>.
1275 </para></listitem>
1276 <listitem><para><filename>bb.vercmp_string</filename>:
1277 Use <filename>bb.utils.vercmp_string</filename>.
1278 </para></listitem>
1279 <listitem><para><filename>bb.vercmp</filename>:
1280 Use <filename>bb.utils.vercmp</filename>.
1281 </para></listitem>
1282 </itemizedlist>
1283 </para>
1284 </section>
1285
1286 <section id='migration-1.6-bitbake-fetcher'>
1287 <title>SVK Fetcher</title>
1288
1289 <para>
1290 The SVK fetcher has been removed from BitBake.
1291 </para>
1292 </section>
1293
1294 <section id='migration-1.6-bitbake-console-output'>
1295 <title>Console Output Error Redirection</title>
1296
1297 <para>
1298 The BitBake console UI will now output errors to
1299 <filename>stderr</filename> instead of
1300 <filename>stdout</filename>.
1301 Consequently, if you are piping or redirecting the output of
1302 <filename>bitbake</filename> to somewhere else, and you wish
1303 to retain the errors, you will need to add
1304 <filename>2>&amp;1</filename> (or something similar) to the
1305 end of your <filename>bitbake</filename> command line.
1306 </para>
1307 </section>
1308
1309 <section id='migration-1.6-task-taskname-overrides'>
1310 <title><filename>task-</filename><replaceable>taskname</replaceable> Overrides</title>
1311
1312 <para>
1313 <filename>task-</filename><replaceable>taskname</replaceable> overrides have been
1314 adjusted so that tasks whose names contain underscores have the
1315 underscores replaced by hyphens for the override so that they
1316 now function properly.
1317 For example, the task override for
1318 <link linkend='ref-tasks-populate_sdk'><filename>do_populate_sdk</filename></link>
1319 is <filename>task-populate-sdk</filename>.
1320 </para>
1321 </section>
1322 </section>
1323
1324 <section id='migration-1.6-variable-changes'>
1325 <title>Changes to Variables</title>
1326
1327 <para>
1328 The following variables have changed.
1329 For information on the OpenEmbedded build system variables, see the
1330 "<link linkend='ref-variables-glos'>Variables Glossary</link>" Chapter.
1331 </para>
1332
1333 <section id='migration-1.6-variable-changes-TMPDIR'>
1334 <title><filename>TMPDIR</filename></title>
1335
1336 <para>
1337 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
1338 can no longer be on an NFS mount.
1339 NFS does not offer full POSIX locking and inode consistency
1340 and can cause unexpected issues if used to store
1341 <filename>TMPDIR</filename>.
1342 </para>
1343
1344 <para>
1345 The check for this occurs on startup.
1346 If <filename>TMPDIR</filename> is detected on an NFS mount,
1347 an error occurs.
1348 </para>
1349 </section>
1350
1351 <section id='migration-1.6-variable-changes-PRINC'>
1352 <title><filename>PRINC</filename></title>
1353
1354 <para>
1355 The <filename>PRINC</filename>
1356 variable has been deprecated and triggers a warning if
1357 detected during a build.
1358 For
1359 <link linkend='var-PR'><filename>PR</filename></link>
1360 increments on changes, use the PR service instead.
1361 You can find out more about this service in the
1362 "<ulink url='&YOCTO_DOCS_DEV_URL;#working-with-a-pr-service'>Working With a PR Service</ulink>"
1363 section in the Yocto Project Development Tasks Manual.
1364 </para>
1365 </section>
1366
1367 <section id='migration-1.6-variable-changes-IMAGE_TYPES'>
1368 <title><filename>IMAGE_TYPES</filename></title>
1369
1370 <para>
1371 The "sum.jffs2" option for
1372 <link linkend='var-IMAGE_TYPES'><filename>IMAGE_TYPES</filename></link>
1373 has been replaced by the "jffs2.sum" option, which fits the
1374 processing order.
1375 </para>
1376 </section>
1377
1378 <section id='migration-1.6-variable-changes-COPY_LIC_MANIFEST'>
1379 <title><filename>COPY_LIC_MANIFEST</filename></title>
1380
1381 <para>
1382 The
1383 <link linkend='var-COPY_LIC_MANIFEST'><filename>COPY_LIC_MANIFEST</filename></link>
1384 variable must
1385 now be set to "1" rather than any value in order to enable
1386 it.
1387 </para>
1388 </section>
1389
1390 <section id='migration-1.6-variable-changes-COPY_LIC_DIRS'>
1391 <title><filename>COPY_LIC_DIRS</filename></title>
1392
1393 <para>
1394 The
1395 <link linkend='var-COPY_LIC_DIRS'><filename>COPY_LIC_DIRS</filename></link>
1396 variable must
1397 now be set to "1" rather than any value in order to enable
1398 it.
1399 </para>
1400 </section>
1401
1402 <section id='migration-1.6-variable-changes-PACKAGE_GROUP'>
1403 <title><filename>PACKAGE_GROUP</filename></title>
1404
1405 <para>
1406 The
1407 <filename>PACKAGE_GROUP</filename> variable has been renamed to
1408 <link linkend='var-FEATURE_PACKAGES'><filename>FEATURE_PACKAGES</filename></link>
1409 to more accurately reflect its purpose.
1410 You can still use <filename>PACKAGE_GROUP</filename> but
1411 the OpenEmbedded build system produces a warning message when
1412 it encounters the variable.
1413 </para>
1414 </section>
1415
1416 <section id='migration-1.6-variable-changes-variable-entry-behavior'>
1417 <title>Preprocess and Post Process Command Variable Behavior</title>
1418
1419 <para>
1420 The following variables now expect a semicolon separated
1421 list of functions to call and not arbitrary shell commands:
1422 <literallayout class='monospaced'>
1423 <link linkend='var-ROOTFS_PREPROCESS_COMMAND'>ROOTFS_PREPROCESS_COMMAND</link>
1424 <link linkend='var-ROOTFS_POSTPROCESS_COMMAND'>ROOTFS_POSTPROCESS_COMMAND</link>
1425 <link linkend='var-SDK_POSTPROCESS_COMMAND'>SDK_POSTPROCESS_COMMAND</link>
1426 <link linkend='var-POPULATE_SDK_POST_TARGET_COMMAND'>POPULATE_SDK_POST_TARGET_COMMAND</link>
1427 <link linkend='var-POPULATE_SDK_POST_HOST_COMMAND'>POPULATE_SDK_POST_HOST_COMMAND</link>
1428 <link linkend='var-IMAGE_POSTPROCESS_COMMAND'>IMAGE_POSTPROCESS_COMMAND</link>
1429 <link linkend='var-IMAGE_PREPROCESS_COMMAND'>IMAGE_PREPROCESS_COMMAND</link>
1430 <link linkend='var-ROOTFS_POSTUNINSTALL_COMMAND'>ROOTFS_POSTUNINSTALL_COMMAND</link>
1431 <link linkend='var-ROOTFS_POSTINSTALL_COMMAND'>ROOTFS_POSTINSTALL_COMMAND</link>
1432 </literallayout>
1433 For migration purposes, you can simply wrap shell commands in
1434 a shell function and then call the function.
1435 Here is an example:
1436 <literallayout class='monospaced'>
1437 my_postprocess_function() {
1438 echo "hello" > ${IMAGE_ROOTFS}/hello.txt
1439 }
1440 ROOTFS_POSTPROCESS_COMMAND += "my_postprocess_function; "
1441 </literallayout>
1442 </para>
1443 </section>
1444 </section>
1445
1446 <section id='migration-1.6-package-test-ptest'>
1447 <title>Package Test (ptest)</title>
1448
1449 <para>
1450 Package Tests (ptest) are built but not installed by default.
1451 For information on using Package Tests, see the
1452 "<ulink url='&YOCTO_DOCS_DEV_URL;#testing-packages-with-ptest'>Testing Packages with ptest</ulink>"
1453 section in the Yocto Project Development Tasks Manual.
1454 For information on the <filename>ptest</filename> class, see the
1455 "<link linkend='ref-classes-ptest'><filename>ptest.bbclass</filename></link>"
1456 section.
1457 </para>
1458 </section>
1459
1460 <section id='migration-1.6-build-changes'>
1461 <title>Build Changes</title>
1462
1463 <para>
1464 Separate build and source directories have been enabled
1465 by default for selected recipes where it is known to work
1466 (a whitelist) and for all recipes that inherit the
1467 <link linkend='ref-classes-cmake'><filename>cmake</filename></link>
1468 class.
1469 In future releases the
1470 <link linkend='ref-classes-autotools'><filename>autotools</filename></link>
1471 class will enable a separate build directory by default as
1472 well.
1473 Recipes building Autotools-based
1474 software that fails to build with a separate build directory
1475 should be changed to inherit from the
1476 <link linkend='ref-classes-autotools'><filename>autotools-brokensep</filename></link>
1477 class instead of the <filename>autotools</filename> or
1478 <filename>autotools_stage</filename>classes.
1479 </para>
1480 </section>
1481
1482 <section id='migration-1.6-building-qemu-native'>
1483 <title><filename>qemu-native</filename></title>
1484
1485 <para>
1486 <filename>qemu-native</filename> now builds without
1487 SDL-based graphical output support by default.
1488 The following additional lines are needed in your
1489 <filename>local.conf</filename> to enable it:
1490 <literallayout class='monospaced'>
1491 PACKAGECONFIG_pn-qemu-native = "sdl"
1492 ASSUME_PROVIDED += "libsdl-native"
1493 </literallayout>
1494 <note>
1495 The default <filename>local.conf</filename>
1496 contains these statements.
1497 Consequently, if you are building a headless system and using
1498 a default <filename>local.conf</filename> file, you will need
1499 comment these two lines out.
1500 </note>
1501 </para>
1502 </section>
1503
1504 <section id='migration-1.6-core-image-basic'>
1505 <title><filename>core-image-basic</filename></title>
1506
1507 <para>
1508 <filename>core-image-basic</filename> has been renamed to
1509 <filename>core-image-full-cmdline</filename>.
1510 </para>
1511
1512 <para>
1513 In addition to <filename>core-image-basic</filename> being renamed,
1514 <filename>packagegroup-core-basic</filename> has been renamed to
1515 <filename>packagegroup-core-full-cmdline</filename> to match.
1516 </para>
1517 </section>
1518
1519 <section id='migration-1.6-licensing'>
1520 <title>Licensing</title>
1521
1522 <para>
1523 The top-level <filename>LICENSE</filename> file has been changed
1524 to better describe the license of the various components of
1525 <link linkend='oe-core'>OE-Core</link>.
1526 However, the licensing itself remains unchanged.
1527 </para>
1528
1529 <para>
1530 Normally, this change would not cause any side-effects.
1531 However, some recipes point to this file within
1532 <link linkend='var-LIC_FILES_CHKSUM'><filename>LIC_FILES_CHKSUM</filename></link>
1533 (as <filename>${COREBASE}/LICENSE</filename>) and thus the
1534 accompanying checksum must be changed from
1535 3f40d7994397109285ec7b81fdeb3b58 to
1536 4d92cd373abda3937c2bc47fbc49d690.
1537 A better alternative is to have
1538 <filename>LIC_FILES_CHKSUM</filename> point to a file
1539 describing the license that is distributed with the source
1540 that the recipe is building, if possible, rather than pointing
1541 to <filename>${COREBASE}/LICENSE</filename>.
1542 </para>
1543 </section>
1544
1545 <section id='migration-1.6-cflags-options'>
1546 <title><filename>CFLAGS</filename> Options</title>
1547
1548 <para>
1549 The "-fpermissive" option has been removed from the default
1550 <link linkend='var-CFLAGS'><filename>CFLAGS</filename></link>
1551 value.
1552 You need to take action on individual recipes that fail when
1553 building with this option.
1554 You need to either patch the recipes to fix the issues reported by
1555 the compiler, or you need to add "-fpermissive" to
1556 <filename>CFLAGS</filename> in the recipes.
1557 </para>
1558 </section>
1559
1560 <section id='migration-1.6-custom-images'>
1561 <title>Custom Image Output Types</title>
1562
1563 <para>
1564 Custom image output types, as selected using
1565 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>,
1566 must declare their dependencies on other image types (if any) using
1567 a new
1568 <link linkend='var-IMAGE_TYPEDEP'><filename>IMAGE_TYPEDEP</filename></link>
1569 variable.
1570 </para>
1571 </section>
1572
1573 <section id='migration-1.6-do-package-write-task'>
1574 <title>Tasks</title>
1575
1576 <para>
1577 The <filename>do_package_write</filename> task has been removed.
1578 The task is no longer needed.
1579 </para>
1580 </section>
1581
1582 <section id='migration-1.6-update-alternatives-provider'>
1583 <title><filename>update-alternative</filename> Provider</title>
1584
1585 <para>
1586 The default <filename>update-alternatives</filename> provider has
1587 been changed from <filename>opkg</filename> to
1588 <filename>opkg-utils</filename>.
1589 This change resolves some troublesome circular dependencies.
1590 The runtime package has also been renamed from
1591 <filename>update-alternatives-cworth</filename>
1592 to <filename>update-alternatives-opkg</filename>.
1593 </para>
1594 </section>
1595
1596 <section id='migration-1.6-virtclass-overrides'>
1597 <title><filename>virtclass</filename> Overrides</title>
1598
1599 <para>
1600 The <filename>virtclass</filename> overrides are now deprecated.
1601 Use the equivalent class overrides instead (e.g.
1602 <filename>virtclass-native</filename> becomes
1603 <filename>class-native</filename>.)
1604 </para>
1605 </section>
1606
1607 <section id='migration-1.6-removed-renamed-recipes'>
1608 <title>Removed and Renamed Recipes</title>
1609
1610 <para>
1611 The following recipes have been removed:
1612 <itemizedlist>
1613 <listitem><para><filename>packagegroup-toolset-native</filename> -
1614 This recipe is largely unused.
1615 </para></listitem>
1616 <listitem><para><filename>linux-yocto-3.8</filename> -
1617 Support for the Linux yocto 3.8 kernel has been dropped.
1618 Support for the 3.10 and 3.14 kernels have been added
1619 with the <filename>linux-yocto-3.10</filename> and
1620 <filename>linux-yocto-3.14</filename> recipes.
1621 </para></listitem>
1622 <listitem><para><filename>ocf-linux</filename> -
1623 This recipe has been functionally replaced using
1624 <filename>cryptodev-linux</filename>.
1625 </para></listitem>
1626 <listitem><para><filename>genext2fs</filename> -
1627 <filename>genext2fs</filename> is no longer used by the
1628 build system and is unmaintained upstream.
1629 </para></listitem>
1630 <listitem><para><filename>js</filename> -
1631 This provided an ancient version of Mozilla's javascript
1632 engine that is no longer needed.
1633 </para></listitem>
1634 <listitem><para><filename>zaurusd</filename> -
1635 The recipe has been moved to the
1636 <filename>meta-handheld</filename> layer.
1637 </para></listitem>
1638 <listitem><para><filename>eglibc 2.17</filename> -
1639 Replaced by the <filename>eglibc 2.19</filename>
1640 recipe.
1641 </para></listitem>
1642 <listitem><para><filename>gcc 4.7.2</filename> -
1643 Replaced by the now stable
1644 <filename>gcc 4.8.2</filename>.
1645 </para></listitem>
1646 <listitem><para><filename>external-sourcery-toolchain</filename> -
1647 this recipe is now maintained in the
1648 <filename>meta-sourcery</filename> layer.
1649 </para></listitem>
1650 <listitem><para><filename>linux-libc-headers-yocto 3.4+git</filename> -
1651 Now using version 3.10 of the
1652 <filename>linux-libc-headers</filename> by default.
1653 </para></listitem>
1654 <listitem><para><filename>meta-toolchain-gmae</filename> -
1655 This recipe is obsolete.
1656 </para></listitem>
1657 <listitem><para><filename>packagegroup-core-sdk-gmae</filename> -
1658 This recipe is obsolete.
1659 </para></listitem>
1660 <listitem><para><filename>packagegroup-core-standalone-gmae-sdk-target</filename> -
1661 This recipe is obsolete.
1662 </para></listitem>
1663 </itemizedlist>
1664 </para>
1665 </section>
1666
1667 <section id='migration-1.6-removed-classes'>
1668 <title>Removed Classes</title>
1669
1670 <para>
1671 The following classes have become obsolete and have been removed:
1672 <itemizedlist>
1673 <listitem><para><filename>module_strip</filename>
1674 </para></listitem>
1675 <listitem><para><filename>pkg_metainfo</filename>
1676 </para></listitem>
1677 <listitem><para><filename>pkg_distribute</filename>
1678 </para></listitem>
1679 <listitem><para><filename>image-empty</filename>
1680 </para></listitem>
1681 </itemizedlist>
1682 </para>
1683 </section>
1684
1685 <section id='migration-1.6-reference-bsps'>
1686 <title>Reference Board Support Packages (BSPs)</title>
1687
1688 <para>
1689 The following reference BSPs changes occurred:
1690 <itemizedlist>
1691 <listitem><para>The BeagleBoard
1692 (<filename>beagleboard</filename>) ARM reference hardware
1693 has been replaced by the BeagleBone
1694 (<filename>beaglebone</filename>) hardware.
1695 </para></listitem>
1696 <listitem><para>The RouterStation Pro
1697 (<filename>routerstationpro</filename>) MIPS reference
1698 hardware has been replaced by the EdgeRouter Lite
1699 (<filename>edgerouter</filename>) hardware.
1700 </para></listitem>
1701 </itemizedlist>
1702 The previous reference BSPs for the
1703 <filename>beagleboard</filename> and
1704 <filename>routerstationpro</filename> machines are still available
1705 in a new <filename>meta-yocto-bsp-old</filename> layer in the
1706 <ulink url='&YOCTO_GIT_URL;'>Source Repositories</ulink>
1707 at
1708 <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/meta-yocto-bsp-old/'>http://git.yoctoproject.org/cgit/cgit.cgi/meta-yocto-bsp-old/</ulink>.
1709 </para>
1710 </section>
1711</section>
1712
1713<section id='moving-to-the-yocto-project-1.7-release'>
1714 <title>Moving to the Yocto Project 1.7 Release</title>
1715
1716 <para>
1717 This section provides migration information for moving to the
1718 Yocto Project 1.7 Release from the prior release.
1719 </para>
1720
1721 <section id='migration-1.7-changes-to-setting-qemu-packageconfig-options'>
1722 <title>Changes to Setting QEMU <filename>PACKAGECONFIG</filename> Options in <filename>local.conf</filename></title>
1723
1724 <para>
1725 The QEMU recipe now uses a number of
1726 <link linkend='var-PACKAGECONFIG'><filename>PACKAGECONFIG</filename></link>
1727 options to enable various optional features.
1728 The method used to set defaults for these options means that
1729 existing
1730 <filename>local.conf</filename> files will need to be be
1731 modified to append to <filename>PACKAGECONFIG</filename> for
1732 <filename>qemu-native</filename> and
1733 <filename>nativesdk-qemu</filename> instead of setting it.
1734 In other words, to enable graphical output for QEMU, you should
1735 now have these lines in <filename>local.conf</filename>:
1736 <literallayout class='monospaced'>
1737 PACKAGECONFIG_append_pn-qemu-native = " sdl"
1738 PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
1739 </literallayout>
1740 </para>
1741 </section>
1742
1743 <section id='migration-1.7-minimum-git-version'>
1744 <title>Minimum Git version</title>
1745
1746 <para>
1747 The minimum
1748 <ulink url='&YOCTO_DOCS_OM_URL;#git'>Git</ulink> version
1749 required on the build host is now 1.7.8 because the
1750 <filename>--list</filename> option is now required by
1751 BitBake's Git fetcher.
1752 As always, if your host distribution does not provide a version of
1753 Git that meets this requirement, you can use the
1754 <filename>buildtools-tarball</filename> that does.
1755 See the
1756 "<link linkend='required-git-tar-python-and-gcc-versions'>Required Git, tar, Python and gcc Versions</link>"
1757 section for more information.
1758 </para>
1759 </section>
1760
1761 <section id='migration-1.7-autotools-class-changes'>
1762 <title>Autotools Class Changes</title>
1763
1764 <para>
1765 The following
1766 <link linkend='ref-classes-autotools'><filename>autotools</filename></link>
1767 class changes occurred:
1768 <itemizedlist>
1769 <listitem><para><emphasis>
1770 A separate build directory is now used by default:</emphasis>
1771 The <filename>autotools</filename> class has been changed
1772 to use a directory for building
1773 (<link linkend='var-B'><filename>B</filename></link>),
1774 which is separate from the source directory
1775 (<link linkend='var-S'><filename>S</filename></link>).
1776 This is commonly referred to as
1777 <filename>B != S</filename>, or an out-of-tree build.</para>
1778 <para>If the software being built is already capable of
1779 building in a directory separate from the source, you
1780 do not need to do anything.
1781 However, if the software is not capable of being built
1782 in this manner, you will
1783 need to either patch the software so that it can build
1784 separately, or you will need to change the recipe to
1785 inherit the
1786 <link linkend='ref-classes-autotools'><filename>autotools-brokensep</filename></link>
1787 class instead of the <filename>autotools</filename> or
1788 <filename>autotools_stage</filename> classes.
1789 </para></listitem>
1790 <listitem><para><emphasis>
1791 The <filename>--foreign</filename> option is
1792 no longer passed to <filename>automake</filename> when
1793 running <filename>autoconf</filename>:</emphasis>
1794 This option tells <filename>automake</filename> that a
1795 particular software package does not follow the GNU
1796 standards and therefore should not be expected
1797 to distribute certain files such as
1798 <filename>ChangeLog</filename>,
1799 <filename>AUTHORS</filename>, and so forth.
1800 Because the majority of upstream software packages already
1801 tell <filename>automake</filename> to enable foreign mode
1802 themselves, the option is mostly superfluous.
1803 However, some recipes will need patches for this change.
1804 You can easily make the change by patching
1805 <filename>configure.ac</filename> so that it passes
1806 "foreign" to <filename>AM_INIT_AUTOMAKE()</filename>.
1807 See
1808 <ulink url='http://cgit.openembedded.org/openembedded-core/commit/?id=01943188f85ce6411717fb5bf702d609f55813f2'>this commit</ulink>
1809 for an example showing how to make the patch.
1810 </para></listitem>
1811 </itemizedlist>
1812 </para>
1813 </section>
1814
1815 <section id='migration-1.7-binary-configuration-scripts-disabled'>
1816 <title>Binary Configuration Scripts Disabled</title>
1817
1818 <para>
1819 Some of the core recipes that package binary configuration scripts
1820 now disable the scripts due to the
1821 scripts previously requiring error-prone path substitution.
1822 Software that links against these libraries using these scripts
1823 should use the much more robust <filename>pkg-config</filename>
1824 instead.
1825 The list of recipes changed in this version (and their
1826 configuration scripts) is as follows:
1827 <literallayout class='monospaced'>
1828 directfb (directfb-config)
1829 freetype (freetype-config)
1830 gpgme (gpgme-config)
1831 libassuan (libassuan-config)
1832 libcroco (croco-6.0-config)
1833 libgcrypt (libgcrypt-config)
1834 libgpg-error (gpg-error-config)
1835 libksba (ksba-config)
1836 libpcap (pcap-config)
1837 libpcre (pcre-config)
1838 libpng (libpng-config, libpng16-config)
1839 libsdl (sdl-config)
1840 libusb-compat (libusb-config)
1841 libxml2 (xml2-config)
1842 libxslt (xslt-config)
1843 ncurses (ncurses-config)
1844 neon (neon-config)
1845 npth (npth-config)
1846 pth (pth-config)
1847 taglib (taglib-config)
1848 </literallayout>
1849 Additionally, support for <filename>pkg-config</filename> has been
1850 added to some recipes in the previous list in the rare cases
1851 where the upstream software package does not already provide
1852 it.
1853 </para>
1854 </section>
1855
1856 <section id='migration-1.7-glibc-replaces-eglibc'>
1857 <title><filename>eglibc 2.19</filename> Replaced with <filename>glibc 2.20</filename></title>
1858
1859 <para>
1860 Because <filename>eglibc</filename> and
1861 <filename>glibc</filename> were already fairly close, this
1862 replacement should not require any significant changes to other
1863 software that links to <filename>eglibc</filename>.
1864 However, there were a number of minor changes in
1865 <filename>glibc 2.20</filename> upstream that could require
1866 patching some software (e.g. the removal of the
1867 <filename>_BSD_SOURCE</filename> feature test macro).
1868 </para>
1869
1870 <para>
1871 <filename>glibc 2.20</filename> requires version 2.6.32 or greater
1872 of the Linux kernel.
1873 Thus, older kernels will no longer be usable in conjunction with it.
1874 </para>
1875
1876 <para>
1877 For full details on the changes in <filename>glibc 2.20</filename>,
1878 see the upstream release notes
1879 <ulink url='https://sourceware.org/ml/libc-alpha/2014-09/msg00088.html'>here</ulink>.
1880 </para>
1881 </section>
1882
1883 <section id='migration-1.7-kernel-module-autoloading'>
1884 <title>Kernel Module Autoloading</title>
1885
1886 <para>
1887 The
1888 <link linkend='var-module_autoload'><filename>module_autoload_*</filename></link>
1889 variable is now deprecated and a new
1890 <link linkend='var-KERNEL_MODULE_AUTOLOAD'><filename>KERNEL_MODULE_AUTOLOAD</filename></link>
1891 variable should be used instead.
1892 Also,
1893 <link linkend='var-module_conf'><filename>module_conf_*</filename></link>
1894 must now be used in conjunction with a new
1895 <link linkend='var-KERNEL_MODULE_PROBECONF'><filename>KERNEL_MODULE_PROBECONF</filename></link>
1896 variable.
1897 The new variables no longer require you to specify the module name
1898 as part of the variable name.
1899 This change not only simplifies usage but also allows the values
1900 of these variables to be appropriately incorporated into task
1901 signatures and thus trigger the appropriate tasks to re-execute
1902 when changed.
1903 You should replace any references to
1904 <filename>module_autoload_*</filename> with
1905 <filename>KERNEL_MODULE_AUTOLOAD</filename>, and add any modules
1906 for which <filename>module_conf_*</filename> is specified to
1907 <filename>KERNEL_MODULE_PROBECONF</filename>.
1908 </para>
1909 </section>
1910
1911 <section id='migration-1.7-qa-check-changes'>
1912 <title>QA Check Changes</title>
1913
1914 <para>
1915 The following changes have occurred to the QA check process:
1916 <itemizedlist>
1917 <listitem><para>
1918 Additional QA checks <filename>file-rdeps</filename>
1919 and <filename>build-deps</filename> have been added in
1920 order to verify that file dependencies are satisfied
1921 (e.g. package contains a script requiring
1922 <filename>/bin/bash</filename>) and build-time dependencies
1923 are declared, respectively.
1924 For more information, please see the
1925 "<link linkend='ref-qa-checks'>QA Error and Warning Messages</link>"
1926 chapter.
1927 </para></listitem>
1928 <listitem><para>
1929 Package QA checks are now performed during a new
1930 <link linkend='ref-tasks-package_qa'><filename>do_package_qa</filename></link>
1931 task rather than being part of the
1932 <link linkend='ref-tasks-package'><filename>do_package</filename></link>
1933 task.
1934 This allows more parallel execution.
1935 This change is unlikely to be an issue except for highly
1936 customized recipes that disable packaging tasks themselves
1937 by marking them as <filename>noexec</filename>.
1938 For those packages, you will need to disable the
1939 <filename>do_package_qa</filename> task as well.
1940 </para></listitem>
1941 <listitem><para>
1942 Files being overwritten during the
1943 <link linkend='ref-tasks-populate_sysroot'><filename>do_populate_sysroot</filename></link>
1944 task now trigger an error instead of a warning.
1945 Recipes should not be overwriting files written to the
1946 sysroot by other recipes.
1947 If you have these types of recipes, you need to alter them
1948 so that they do not overwrite these files.</para>
1949 <para>You might now receive this error after changes in
1950 configuration or metadata resulting in orphaned files
1951 being left in the sysroot.
1952 If you do receive this error, the way to resolve the issue
1953 is to delete your
1954 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
1955 or to move it out of the way and then re-start the build.
1956 Anything that has been fully built up to that point and
1957 does not need rebuilding will be restored from the shared
1958 state cache and the rest of the build will be able to
1959 proceed as normal.
1960 </para></listitem>
1961 </itemizedlist>
1962 </para>
1963 </section>
1964
1965 <section id='migration-1.7-removed-recipes'>
1966 <title>Removed Recipes</title>
1967
1968 <para>
1969 The following recipes have been removed:
1970 <itemizedlist>
1971 <listitem><para>
1972 <filename>x-load</filename>:
1973 This recipe has been superseded by
1974 U-boot SPL for all Cortex-based TI SoCs.
1975 For legacy boards, the <filename>meta-ti</filename>
1976 layer, which contains a maintained recipe, should be used
1977 instead.
1978 </para></listitem>
1979 <listitem><para>
1980 <filename>ubootchart</filename>:
1981 This recipe is obsolete.
1982 A <filename>bootchart2</filename> recipe has been added
1983 to functionally replace it.
1984 </para></listitem>
1985 <listitem><para>
1986 <filename>linux-yocto 3.4</filename>:
1987 Support for the linux-yocto 3.4 kernel has been dropped.
1988 Support for the 3.10 and 3.14 kernels remains, while
1989 support for version 3.17 has been added.
1990 </para></listitem>
1991 <listitem><para>
1992 <filename>eglibc</filename> has been removed in favor of
1993 <filename>glibc</filename>.
1994 See the
1995 "<link linkend='migration-1.7-glibc-replaces-eglibc'><filename>eglibc 2.19</filename> Replaced with <filename>glibc 2.20</filename></link>"
1996 section for more information.
1997 </para></listitem>
1998 </itemizedlist>
1999 </para>
2000 </section>
2001
2002 <section id='migration-1.7-miscellaneous-changes'>
2003 <title>Miscellaneous Changes</title>
2004
2005 <para>
2006 The following miscellaneous change occurred:
2007 <itemizedlist>
2008 <listitem><para>
2009 The build history feature now writes
2010 <filename>build-id.txt</filename> instead of
2011 <filename>build-id</filename>.
2012 Additionally, <filename>build-id.txt</filename>
2013 now contains the full build header as printed by
2014 BitBake upon starting the build.
2015 You should manually remove old "build-id" files from your
2016 existing build history repositories to avoid confusion.
2017 For information on the build history feature, see the
2018 "<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-build-output-quality'>Maintaining Build Output Quality</ulink>"
2019 section in the Yocto Project Development Tasks Manual.
2020 </para></listitem>
2021 </itemizedlist>
2022 </para>
2023 </section>
2024</section>
2025
2026<section id='moving-to-the-yocto-project-1.8-release'>
2027 <title>Moving to the Yocto Project 1.8 Release</title>
2028
2029 <para>
2030 This section provides migration information for moving to the
2031 Yocto Project 1.8 Release from the prior release.
2032 </para>
2033
2034 <section id='migration-1.8-removed-recipes'>
2035 <title>Removed Recipes</title>
2036
2037 <para>
2038 The following recipes have been removed:
2039 <itemizedlist>
2040 <listitem><para><filename>owl-video</filename>:
2041 Functionality replaced by <filename>gst-player</filename>.
2042 </para></listitem>
2043 <listitem><para><filename>gaku</filename>:
2044 Functionality replaced by <filename>gst-player</filename>.
2045 </para></listitem>
2046 <listitem><para><filename>gnome-desktop</filename>:
2047 This recipe is now available in
2048 <filename>meta-gnome</filename> and is no longer needed.
2049 </para></listitem>
2050 <listitem><para><filename>gsettings-desktop-schemas</filename>:
2051 This recipe is now available in
2052 <filename>meta-gnome</filename> and is no longer needed.
2053 </para></listitem>
2054 <listitem><para><filename>python-argparse</filename>:
2055 The <filename>argparse</filename> module is already
2056 provided in the default Python distribution in a
2057 package named <filename>python-argparse</filename>.
2058 Consequently, the separate
2059 <filename>python-argparse</filename> recipe is no
2060 longer needed.
2061 </para></listitem>
2062 <listitem><para><filename>telepathy-python, libtelepathy, telepathy-glib, telepathy-idle, telepathy-mission-control</filename>:
2063 All these recipes have moved to
2064 <filename>meta-oe</filename> and are consequently no
2065 longer needed by any recipes in OpenEmbedded-Core.
2066 </para></listitem>
2067 <listitem><para><filename>linux-yocto_3.10</filename> and <filename>linux-yocto_3.17</filename>:
2068 Support for the linux-yocto 3.10 and 3.17 kernels has been
2069 dropped.
2070 Support for the 3.14 kernel remains, while support for
2071 3.19 kernel has been added.
2072 </para></listitem>
2073 <listitem><para><filename>poky-feed-config-opkg</filename>:
2074 This recipe has become obsolete and is no longer needed.
2075 Use <filename>distro-feed-config</filename> from
2076 <filename>meta-oe</filename> instead.
2077 </para></listitem>
2078 <listitem><para><filename>libav 0.8.x</filename>:
2079 <filename>libav 9.x</filename> is now used.
2080 </para></listitem>
2081 <listitem><para><filename>sed-native</filename>:
2082 No longer needed.
2083 A working version of <filename>sed</filename> is expected
2084 to be provided by the host distribution.
2085 </para></listitem>
2086 </itemizedlist>
2087 </para>
2088 </section>
2089
2090 <section id='migration-1.8-bluez'>
2091 <title>BlueZ 4.x / 5.x Selection</title>
2092
2093 <para>
2094 Proper built-in support for selecting BlueZ 5.x in preference
2095 to the default of 4.x now exists.
2096 To use BlueZ 5.x, simply add "bluez5" to your
2097 <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>
2098 value.
2099 If you had previously added append files
2100 (<filename>*.bbappend</filename>) to make this selection, you can
2101 now remove them.
2102 </para>
2103
2104 <para>
2105 Additionally, a <filename>bluetooth</filename> class has been added
2106 to make selection of the appropriate bluetooth support within a
2107 recipe a little easier.
2108 If you wish to make use of this class in a recipe, add something
2109 such as the following:
2110 <literallayout class='monospaced'>
2111 inherit bluetooth
2112 PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)}"
2113 PACKAGECONFIG[bluez4] = "--enable-bluetooth,--disable-bluetooth,bluez4"
2114 PACKAGECONFIG[bluez5] = "--enable-bluez5,--disable-bluez5,bluez5"
2115 </literallayout>
2116 </para>
2117 </section>
2118
2119 <section id='migration-1.8-kernel-build-changes'>
2120 <title>Kernel Build Changes</title>
2121
2122 <para>
2123 The kernel build process was changed to place the source
2124 in a common shared work area and to place build artifacts
2125 separately in the source code tree.
2126 In theory, migration paths have been provided for most common
2127 usages in kernel recipes but this might not work in all cases.
2128 In particular, users need to ensure that
2129 <filename>${S}</filename> (source files) and
2130 <filename>${B}</filename> (build artifacts) are used
2131 correctly in functions such as
2132 <link linkend='ref-tasks-configure'><filename>do_configure</filename></link>
2133 and
2134 <link linkend='ref-tasks-install'><filename>do_install</filename></link>.
2135 For kernel recipes that do not inherit from
2136 <filename>kernel-yocto</filename> or include
2137 <filename>linux-yocto.inc</filename>, you might wish to
2138 refer to the <filename>linux.inc</filename> file in the
2139 <filename>meta-oe</filename> layer for the kinds of changes you
2140 need to make.
2141 For reference, here is the
2142 <ulink url='http://cgit.openembedded.org/meta-openembedded/commit/meta-oe/recipes-kernel/linux/linux.inc?id=fc7132ede27ac67669448d3d2845ce7d46c6a1ee'>commit</ulink>
2143 where the <filename>linux.inc</filename> file in
2144 <filename>meta-oe</filename> was updated.
2145 </para>
2146
2147 <para>
2148 Recipes that rely on the kernel source code and do not inherit
2149 the module classes might need to add explicit dependencies on
2150 the <filename>do_shared_workdir</filename> kernel task, for example:
2151 <literallayout class='monospaced'>
2152 do_configure[depends] += "virtual/kernel:do_shared_workdir"
2153 </literallayout>
2154 </para>
2155 </section>
2156
2157 <section id='migration-1.8-ssl'>
2158 <title>SSL 3.0 is Now Disabled in OpenSSL</title>
2159
2160 <para>
2161 SSL 3.0 is now disabled when building OpenSSL.
2162 Disabling SSL 3.0 avoids any lingering instances of the POODLE
2163 vulnerability.
2164 If you feel you must re-enable SSL 3.0, then you can add an
2165 append file (<filename>*.bbappend</filename>) for the
2166 <filename>openssl</filename> recipe to remove "-no-ssl3"
2167 from
2168 <link linkend='var-EXTRA_OECONF'><filename>EXTRA_OECONF</filename></link>.
2169 </para>
2170 </section>
2171
2172 <section id='migration-1.8-default-sysroot-poisoning'>
2173 <title>Default Sysroot Poisoning</title>
2174
2175 <para>
2176 <filename>gcc's</filename> default sysroot and include directories
2177 are now "poisoned".
2178 In other words, the sysroot and include directories are being
2179 redirected to a non-existent location in order to catch when
2180 host directories are being used due to the correct options not
2181 being passed.
2182 This poisoning applies both to the cross-compiler used within the
2183 build and to the cross-compiler produced in the SDK.
2184 </para>
2185
2186 <para>
2187 If this change causes something in the build to fail, it almost
2188 certainly means the various compiler flags and commands are not
2189 being passed correctly to the underlying piece of software.
2190 In such cases, you need to take corrective steps.
2191 </para>
2192 </section>
2193
2194 <section id='migration-1.8-rebuild-improvements'>
2195 <title>Rebuild Improvements</title>
2196
2197 <para>
2198 Changes have been made to the
2199 <link linkend='ref-classes-base'><filename>base</filename></link>,
2200 <link linkend='ref-classes-autotools'><filename>autotools</filename></link>,
2201 and
2202 <link linkend='ref-classes-cmake'><filename>cmake</filename></link>
2203 classes to clean out generated files when the
2204 <link linkend='ref-tasks-configure'><filename>do_configure</filename></link>
2205 task needs to be re-executed.
2206 </para>
2207
2208 <para>
2209 One of the improvements is to attempt to run "make clean" during
2210 the <filename>do_configure</filename> task if a
2211 <filename>Makefile</filename> exists.
2212 Some software packages do not provide a working clean target
2213 within their make files.
2214 If you have such recipes, you need to set
2215 <link linkend='var-CLEANBROKEN'><filename>CLEANBROKEN</filename></link>
2216 to "1" within the recipe, for example:
2217 <literallayout class='monospaced'>
2218 CLEANBROKEN = "1"
2219 </literallayout>
2220 </para>
2221 </section>
2222
2223 <section id='migration-1.8-qa-check-and-validation-changes'>
2224 <title>QA Check and Validation Changes</title>
2225
2226 <para>
2227 The following QA Check and Validation Changes have occurred:
2228 <itemizedlist>
2229 <listitem><para>
2230 Usage of <filename>PRINC</filename>
2231 previously triggered a warning.
2232 It now triggers an error.
2233 You should remove any remaining usage of
2234 <filename>PRINC</filename> in any recipe or append file.
2235 </para></listitem>
2236 <listitem><para>
2237 An additional QA check has been added to detect usage of
2238 <filename>${D}</filename> in
2239 <link linkend='var-FILES'><filename>FILES</filename></link>
2240 values where
2241 <link linkend='var-D'><filename>D</filename></link> values
2242 should not be used at all.
2243 The same check ensures that <filename>$D</filename> is used
2244 in
2245 <filename>pkg_preinst/pkg_postinst/pkg_prerm/pkg_postrm</filename>
2246 functions instead of <filename>${D}</filename>.
2247 </para></listitem>
2248 <listitem><para>
2249 <link linkend='var-S'><filename>S</filename></link> now
2250 needs to be set to a valid value within a recipe.
2251 If <filename>S</filename> is not set in the recipe, the
2252 directory is not automatically created.
2253 If <filename>S</filename> does not point to a directory
2254 that exists at the time the
2255 <link linkend='ref-tasks-unpack'><filename>do_unpack</filename></link>
2256 task finishes, a warning will be shown.
2257 </para></listitem>
2258 <listitem><para>
2259 <link linkend='var-LICENSE'><filename>LICENSE</filename></link>
2260 is now validated for correct formatting of multiple
2261 licenses.
2262 If the format is invalid (e.g. multiple licenses are
2263 specified with no operators to specify how the multiple
2264 licenses interact), then a warning will be shown.
2265 </para></listitem>
2266 </itemizedlist>
2267 </para>
2268 </section>
2269
2270 <section id='migration-1.8-miscellaneous-changes'>
2271 <title>Miscellaneous Changes</title>
2272
2273 <para>
2274 The following miscellaneous changes have occurred:
2275 <itemizedlist>
2276 <listitem><para>
2277 The <filename>send-error-report</filename> script now
2278 expects a "-s" option to be specified before the server
2279 address.
2280 This assumes a server address is being specified.
2281 </para></listitem>
2282 <listitem><para>
2283 The <filename>oe-pkgdata-util</filename> script now
2284 expects a "-p" option to be specified before the
2285 <filename>pkgdata</filename> directory, which is now
2286 optional.
2287 If the <filename>pkgdata</filename> directory is not
2288 specified, the script will run BitBake to query
2289 <link linkend='var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></link>
2290 from the build environment.
2291 </para></listitem>
2292 </itemizedlist>
2293 </para>
2294 </section>
2295</section>
2296
2297<section id='moving-to-the-yocto-project-2.0-release'>
2298 <title>Moving to the Yocto Project 2.0 Release</title>
2299
2300 <para>
2301 This section provides migration information for moving to the
2302 Yocto Project 2.0 Release from the prior release.
2303 </para>
2304
2305 <section id='migration-2.0-gcc-5'>
2306 <title>GCC 5</title>
2307
2308 <para>
2309 The default compiler is now GCC 5.2.
2310 This change has required fixes for compilation errors in a number
2311 of other recipes.
2312 </para>
2313
2314 <para>
2315 One important example is a fix for when the Linux kernel freezes at
2316 boot time on ARM when built with GCC 5.
2317 If you are using your own kernel recipe or source tree and
2318 building for ARM, you will likely need to apply this
2319 <ulink url='https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=a077224fd35b2f7fbc93f14cf67074fc792fbac2'>patch</ulink>.
2320 The standard <filename>linux-yocto</filename> kernel source tree
2321 already has a workaround for the same issue.
2322 </para>
2323
2324 <para>
2325 For further details, see
2326 <ulink url='https://gcc.gnu.org/gcc-5/changes.html'></ulink> and
2327 the porting guide at
2328 <ulink url='https://gcc.gnu.org/gcc-5/porting_to.html'></ulink>.
2329 </para>
2330
2331 <para>
2332 Alternatively, you can switch back to GCC 4.9 or 4.8 by
2333 setting <filename>GCCVERSION</filename> in your configuration,
2334 as follows:
2335 <literallayout class='monospaced'>
2336 GCCVERSION = "4.9%"
2337 </literallayout>
2338 </para>
2339 </section>
2340
2341 <section id='migration-2.0-Gstreamer-0.10-removed'>
2342 <title>Gstreamer 0.10 Removed</title>
2343
2344 <para>
2345 Gstreamer 0.10 has been removed in favor of Gstreamer 1.x.
2346 As part of the change, recipes for Gstreamer 0.10 and related
2347 software are now located
2348 in <filename>meta-multimedia</filename>.
2349 This change results in Qt4 having Phonon and Gstreamer
2350 support in QtWebkit disabled by default.
2351 </para>
2352 </section>
2353
2354 <section id='migration-2.0-removed-recipes'>
2355 <title>Removed Recipes</title>
2356
2357 <para>
2358 The following recipes have been moved or removed:
2359 <itemizedlist>
2360 <listitem><para>
2361 <filename>bluez4</filename>: The recipe is obsolete and
2362 has been moved due to <filename>bluez5</filename>
2363 becoming fully integrated.
2364 The <filename>bluez4</filename> recipe now resides in
2365 <filename>meta-oe</filename>.
2366 </para></listitem>
2367 <listitem><para>
2368 <filename>gamin</filename>: The recipe is obsolete and
2369 has been removed.
2370 </para></listitem>
2371 <listitem><para>
2372 <filename>gnome-icon-theme</filename>: The recipe's
2373 functionally has been replaced by
2374 <filename>adwaita-icon-theme</filename>.
2375 </para></listitem>
2376 <listitem><para>
2377 Gstreamer 0.10 Recipes: Recipes for Gstreamer 0.10 have
2378 been removed in favor of the recipes for Gstreamer 1.x.
2379 </para></listitem>
2380 <listitem><para>
2381 <filename>insserv</filename>: The recipe is obsolete and
2382 has been removed.
2383 </para></listitem>
2384 <listitem><para>
2385 <filename>libunique</filename>: The recipe is no longer
2386 used and has been moved to <filename>meta-oe</filename>.
2387 </para></listitem>
2388 <listitem><para>
2389 <filename>midori</filename>: The recipe's functionally
2390 has been replaced by <filename>epiphany</filename>.
2391 </para></listitem>
2392 <listitem><para>
2393 <filename>python-gst</filename>: The recipe is obsolete
2394 and has been removed since it only contains bindings for
2395 Gstreamer 0.10.
2396 </para></listitem>
2397 <listitem><para>
2398 <filename>qt-mobility</filename>: The recipe is obsolete and
2399 has been removed since it requires
2400 <filename>Gstreamer 0.10</filename>, which has been
2401 replaced.
2402 </para></listitem>
2403 <listitem><para>
2404 <filename>subversion</filename>: All 1.6.x versions of this
2405 recipe have been removed.
2406 </para></listitem>
2407 <listitem><para>
2408 <filename>webkit-gtk</filename>: The older 1.8.3 version
2409 of this recipe has been removed in favor of
2410 <filename>webkitgtk</filename>.
2411 </para></listitem>
2412 </itemizedlist>
2413 </para>
2414 </section>
2415
2416 <section id='migration-2.0-bitbake-datastore-improvements'>
2417 <title>BitBake datastore improvements</title>
2418
2419 <para>
2420 The method by which BitBake's datastore handles overrides has
2421 changed.
2422 Overrides are now applied dynamically and
2423 <filename>bb.data.update_data()</filename> is now a no-op.
2424 Thus, <filename>bb.data.update_data()</filename> is no longer
2425 required in order to apply the correct overrides.
2426 In practice, this change is unlikely to require any changes to
2427 Metadata.
2428 However, these minor changes in behavior exist:
2429 <itemizedlist>
2430 <listitem><para>
2431 All potential overrides are now visible in the variable
2432 history as seen when you run the following:
2433 <literallayout class='monospaced'>
2434 $ bitbake -e
2435 </literallayout>
2436 </para></listitem>
2437 <listitem><para>
2438 <filename>d.delVar('</filename><replaceable>VARNAME</replaceable><filename>')</filename> and
2439 <filename>d.setVar('</filename><replaceable>VARNAME</replaceable><filename>', None)</filename>
2440 result in the variable and all of its overrides being
2441 cleared out.
2442 Before the change, only the non-overridden values
2443 were cleared.
2444 </para></listitem>
2445 </itemizedlist>
2446 </para>
2447 </section>
2448
2449 <section id='migration-2.0-shell-message-function-changes'>
2450 <title>Shell Message Function Changes</title>
2451
2452 <para>
2453 The shell versions of the BitBake message functions (i.e.
2454 <filename>bbdebug</filename>, <filename>bbnote</filename>,
2455 <filename>bbwarn</filename>, <filename>bbplain</filename>,
2456 <filename>bberror</filename>, and <filename>bbfatal</filename>)
2457 are now connected through to their BitBake equivalents
2458 <filename>bb.debug()</filename>, <filename>bb.note()</filename>,
2459 <filename>bb.warn()</filename>, <filename>bb.plain()</filename>,
2460 <filename>bb.error()</filename>, and
2461 <filename>bb.fatal()</filename>, respectively.
2462 Thus, those message functions that you would expect to be printed
2463 by the BitBake UI are now actually printed.
2464 In practice, this change means two things:
2465 <itemizedlist>
2466 <listitem><para>
2467 If you now see messages on the console that you did not
2468 previously see as a result of this change, you might
2469 need to clean up the calls to
2470 <filename>bbwarn</filename>, <filename>bberror</filename>,
2471 and so forth.
2472 Or, you might want to simply remove the calls.
2473 </para></listitem>
2474 <listitem><para>
2475 The <filename>bbfatal</filename> message function now
2476 suppresses the full error log in the UI, which means any
2477 calls to <filename>bbfatal</filename> where you still
2478 wish to see the full error log should be replaced by
2479 <filename>die</filename> or
2480 <filename>bbfatal_log</filename>.
2481 </para></listitem>
2482 </itemizedlist>
2483 </para>
2484 </section>
2485
2486 <section id='migration-2.0-extra-development-debug-package-cleanup'>
2487 <title>Extra Development/Debug Package Cleanup</title>
2488
2489 <para>
2490 The following recipes have had extra
2491 <filename>dev/dbg</filename> packages removed:
2492 <itemizedlist>
2493 <listitem><para>
2494 <filename>acl</filename>
2495 </para></listitem>
2496 <listitem><para>
2497 <filename>apmd</filename>
2498 </para></listitem>
2499 <listitem><para>
2500 <filename>aspell</filename>
2501 </para></listitem>
2502 <listitem><para>
2503 <filename>attr</filename>
2504 </para></listitem>
2505 <listitem><para>
2506 <filename>augeas</filename>
2507 </para></listitem>
2508 <listitem><para>
2509 <filename>bzip2</filename>
2510 </para></listitem>
2511 <listitem><para>
2512 <filename>cogl</filename>
2513 </para></listitem>
2514 <listitem><para>
2515 <filename>curl</filename>
2516 </para></listitem>
2517 <listitem><para>
2518 <filename>elfutils</filename>
2519 </para></listitem>
2520 <listitem><para>
2521 <filename>gcc-target</filename>
2522 </para></listitem>
2523 <listitem><para>
2524 <filename>libgcc</filename>
2525 </para></listitem>
2526 <listitem><para>
2527 <filename>libtool</filename>
2528 </para></listitem>
2529 <listitem><para>
2530 <filename>libxmu</filename>
2531 </para></listitem>
2532 <listitem><para>
2533 <filename>opkg</filename>
2534 </para></listitem>
2535 <listitem><para>
2536 <filename>pciutils</filename>
2537 </para></listitem>
2538 <listitem><para>
2539 <filename>rpm</filename>
2540 </para></listitem>
2541 <listitem><para>
2542 <filename>sysfsutils</filename>
2543 </para></listitem>
2544 <listitem><para>
2545 <filename>tiff</filename>
2546 </para></listitem>
2547 <listitem><para>
2548 <filename>xz</filename>
2549 </para></listitem>
2550 </itemizedlist>
2551 All of the above recipes now conform to the standard packaging
2552 scheme where a single <filename>-dev</filename>,
2553 <filename>-dbg</filename>, and <filename>-staticdev</filename>
2554 package exists per recipe.
2555 </para>
2556 </section>
2557
2558 <section id='migration-2.0-recipe-maintenance-tracking-data-moved-to-oe-core'>
2559 <title>Recipe Maintenance Tracking Data Moved to OE-Core</title>
2560
2561 <para>
2562 Maintenance tracking data for recipes that was previously part
2563 of <filename>meta-yocto</filename> has been moved to
2564 <link linkend='oe-core'>OE-Core</link>.
2565 The change includes <filename>package_regex.inc</filename> and
2566 <filename>distro_alias.inc</filename>, which are typically enabled
2567 when using the <filename>distrodata</filename> class.
2568 Additionally, the contents of
2569 <filename>upstream_tracking.inc</filename> has now been split out
2570 to the relevant recipes.
2571 </para>
2572 </section>
2573
2574 <section id='migration-2.0-automatic-stale-sysroot-file-cleanup'>
2575 <title>Automatic Stale Sysroot File Cleanup</title>
2576
2577 <para>
2578 Stale files from recipes that no longer exist in the current
2579 configuration are now automatically removed from
2580 sysroot as well as removed from
2581 any other place managed by shared state.
2582 This automatic cleanup means that the build system now properly
2583 handles situations such as renaming the build system side of
2584 recipes, removal of layers from
2585 <filename>bblayers.conf</filename>, and
2586 <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>
2587 changes.
2588 </para>
2589
2590 <para>
2591 Additionally, work directories for old versions of recipes are
2592 now pruned.
2593 If you wish to disable pruning old work directories, you can set
2594 the following variable in your configuration:
2595 <literallayout class='monospaced'>
2596 SSTATE_PRUNE_OBSOLETEWORKDIR = "0"
2597 </literallayout>
2598 </para>
2599 </section>
2600
2601 <section id='migration-2.0-linux-yocto-kernel-metadata-repository-now-split-from-source'>
2602 <title><filename>linux-yocto</filename> Kernel Metadata Repository Now Split from Source</title>
2603
2604 <para>
2605 The <filename>linux-yocto</filename> tree has up to now been a
2606 combined set of kernel changes and configuration (meta) data
2607 carried in a single tree.
2608 While this format is effective at keeping kernel configuration and
2609 source modifications synchronized, it is not always obvious to
2610 developers how to manipulate the Metadata as compared to the
2611 source.
2612 </para>
2613
2614 <para>
2615 Metadata processing has now been removed from the
2616 <link linkend='ref-classes-kernel-yocto'><filename>kernel-yocto</filename></link>
2617 class and the external Metadata repository
2618 <filename>yocto-kernel-cache</filename>, which has always been used
2619 to seed the <filename>linux-yocto</filename> "meta" branch.
2620 This separate <filename>linux-yocto</filename> cache repository
2621 is now the primary location for this data.
2622 Due to this change, <filename>linux-yocto</filename> is no longer
2623 able to process combined trees.
2624 Thus, if you need to have your own combined kernel repository,
2625 you must do the split there as well and update your recipes
2626 accordingly.
2627 See the <filename>meta/recipes-kernel/linux/linux-yocto_4.1.bb</filename>
2628 recipe for an example.
2629 </para>
2630 </section>
2631
2632 <section id='migration-2.0-additional-qa-checks'>
2633 <title>Additional QA checks</title>
2634
2635 <para>
2636 The following QA checks have been added:
2637 <itemizedlist>
2638 <listitem><para>
2639 Added a "host-user-contaminated" check for ownership
2640 issues for packaged files outside of
2641 <filename>/home</filename>.
2642 The check looks for files that are incorrectly owned by the
2643 user that ran BitBake instead of owned by a valid user in
2644 the target system.
2645 </para></listitem>
2646 <listitem><para>
2647 Added an "invalid-chars" check for invalid (non-UTF8)
2648 characters in recipe metadata variable values
2649 (i.e.
2650 <link linkend='var-DESCRIPTION'><filename>DESCRIPTION</filename></link>,
2651 <link linkend='var-SUMMARY'><filename>SUMMARY</filename></link>,
2652 <link linkend='var-LICENSE'><filename>LICENSE</filename></link>,
2653 and
2654 <link linkend='var-SECTION'><filename>SECTION</filename></link>).
2655 Some package managers do not support these characters.
2656 </para></listitem>
2657 <listitem><para>
2658 Added an "invalid-packageconfig" check for any options
2659 specified in
2660 <link linkend='var-PACKAGECONFIG'><filename>PACKAGECONFIG</filename></link>
2661 that do not match any <filename>PACKAGECONFIG</filename>
2662 option defined for the recipe.
2663 </para></listitem>
2664 </itemizedlist>
2665 </para>
2666 </section>
2667
2668 <section id='migration-2.0-miscellaneous'>
2669 <title>Miscellaneous Changes</title>
2670
2671 <para>
2672 These additional changes exist:
2673 <itemizedlist>
2674 <listitem><para>
2675 <filename>gtk-update-icon-cache</filename> has been
2676 renamed to <filename>gtk-icon-utils</filename>.
2677 </para></listitem>
2678 <listitem><para>
2679 The <filename>tools-profile</filename>
2680 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>
2681 item as well as its corresponding packagegroup and
2682 <filename>packagegroup-core-tools-profile</filename> no
2683 longer bring in <filename>oprofile</filename>.
2684 Bringing in <filename>oprofile</filename> was originally
2685 added to aid compilation on resource-constrained
2686 targets.
2687 However, this aid has not been widely used and is not
2688 likely to be used going forward due to the more powerful
2689 target platforms and the existence of better
2690 cross-compilation tools.
2691 </para></listitem>
2692 <listitem><para>
2693 The
2694 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
2695 variable's default value now specifies
2696 <filename>ext4</filename> instead of
2697 <filename>ext3</filename>.
2698 </para></listitem>
2699 <listitem><para>
2700 All support for the <filename>PRINC</filename>
2701 variable has been removed.
2702 </para></listitem>
2703 <listitem><para>
2704 The <filename>packagegroup-core-full-cmdline</filename>
2705 packagegroup no longer brings in
2706 <filename>lighttpd</filename> due to the fact that
2707 bringing in <filename>lighttpd</filename> is not really in
2708 line with the packagegroup's purpose, which is to add full
2709 versions of command-line tools that by default are
2710 provided by <filename>busybox</filename>.
2711 </para></listitem>
2712 </itemizedlist>
2713 </para>
2714 </section>
2715</section>
2716
2717<section id='moving-to-the-yocto-project-2.1-release'>
2718 <title>Moving to the Yocto Project 2.1 Release</title>
2719
2720 <para>
2721 This section provides migration information for moving to the
2722 Yocto Project 2.1 Release from the prior release.
2723 </para>
2724
2725 <section id='migration-2.1-variable-expansion-in-python-functions'>
2726 <title>Variable Expansion in Python Functions</title>
2727
2728 <para>
2729 Variable expressions, such as
2730 <filename>${</filename><replaceable>VARNAME</replaceable><filename>}</filename>
2731 no longer expand automatically within Python functions.
2732 Suppressing expansion was done to allow Python functions to
2733 construct shell scripts or other code for situations in which you
2734 do not want such expressions expanded.
2735 For any existing code that relies on these expansions, you need to
2736 change the expansions to expand the value of individual
2737 variables through <filename>d.getVar()</filename>.
2738 To alternatively expand more complex expressions,
2739 use <filename>d.expand()</filename>.
2740 </para>
2741 </section>
2742
2743 <section id='migration-2.1-overrides-must-now-be-lower-case'>
2744 <title>Overrides Must Now be Lower-Case</title>
2745
2746 <para>
2747 The convention for overrides has always been for them to be
2748 lower-case characters.
2749 This practice is now a requirement as BitBake's datastore now
2750 assumes lower-case characters in order to give a slight performance
2751 boost during parsing.
2752 In practical terms, this requirement means that anything that ends
2753 up in
2754 <link linkend='var-OVERRIDES'><filename>OVERRIDES</filename></link>
2755 must now appear in lower-case characters (e.g. values for
2756 <filename>MACHINE</filename>, <filename>TARGET_ARCH</filename>,
2757 <filename>DISTRO</filename>, and also recipe names if
2758 <filename>_pn-</filename><replaceable>recipename</replaceable>
2759 overrides are to be effective).
2760 </para>
2761 </section>
2762
2763 <section id='migration-2.1-expand-parameter-to-getvar-and-getvarflag-now-mandatory'>
2764 <title>Expand Parameter to <filename>getVar()</filename> and
2765 <filename>getVarFlag()</filename> is Now Mandatory</title>
2766
2767 <para>
2768 The expand parameter to <filename>getVar()</filename> and
2769 <filename>getVarFlag()</filename> previously defaulted to
2770 False if not specified.
2771 Now, however, no default exists so one must be specified.
2772 You must change any <filename>getVar()</filename> calls that
2773 do not specify the final expand parameter to calls that do specify
2774 the parameter.
2775 You can run the following <filename>sed</filename> command at the
2776 base of a layer to make this change:
2777 <literallayout class='monospaced'>
2778 sed -e 's:\(\.getVar([^,()]*\)):\1, False):g' -i `grep -ril getVar *`
2779 sed -e 's:\(\.getVarFlag([^,()]*, [^,()]*\)):\1, False):g' -i `grep -ril getVarFlag *`
2780 </literallayout>
2781 <note>
2782 The reason for this change is that it prepares the way for
2783 changing the default to True in a future Yocto Project release.
2784 This future change is a much more sensible default than False.
2785 However, the change needs to be made gradually as a sudden
2786 change of the default would potentially cause side-effects
2787 that would be difficult to detect.
2788 </note>
2789 </para>
2790 </section>
2791
2792 <section id='migration-2.1-makefile-environment-changes'>
2793 <title>Makefile Environment Changes</title>
2794
2795 <para>
2796 <link linkend='var-EXTRA_OEMAKE'><filename>EXTRA_OEMAKE</filename></link>
2797 now defaults to "" instead of "-e MAKEFLAGS=".
2798 Setting <filename>EXTRA_OEMAKE</filename> to "-e MAKEFLAGS=" by
2799 default was a historical accident that has required many classes
2800 (e.g. <filename>autotools</filename>, <filename>module</filename>)
2801 and recipes to override this default in order to work with
2802 sensible build systems.
2803 When upgrading to the release, you must edit any recipe that
2804 relies upon this old default by either setting
2805 <filename>EXTRA_OEMAKE</filename> back to "-e MAKEFLAGS=" or by
2806 explicitly setting any required variable value overrides using
2807 <filename>EXTRA_OEMAKE</filename>, which is typically only needed
2808 when a Makefile sets a default value for a variable that is
2809 inappropriate for cross-compilation using the "=" operator rather
2810 than the "?=" operator.
2811 </para>
2812 </section>
2813
2814 <section id='migration-2.1-libexecdir-reverted-to-prefix-libexec'>
2815 <title><filename>libexecdir</filename> Reverted to <filename>${prefix}/libexec</filename></title>
2816
2817 <para>
2818 The use of <filename>${libdir}/${BPN}</filename> as
2819 <filename>libexecdir</filename> is different as compared to all
2820 other mainstream distributions, which either uses
2821 <filename>${prefix}/libexec</filename> or
2822 <filename>${libdir}</filename>.
2823 The use is also contrary to the GNU Coding Standards
2824 (i.e. <ulink url='https://www.gnu.org/prep/standards/html_node/Directory-Variables.html'></ulink>)
2825 that suggest <filename>${prefix}/libexec</filename> and also
2826 notes that any package-specific nesting should be done by the
2827 package itself.
2828 Finally, having <filename>libexecdir</filename> change between
2829 recipes makes it very difficult for different recipes to invoke
2830 binaries that have been installed into
2831 <filename>libexecdir</filename>.
2832 The Filesystem Hierarchy Standard
2833 (i.e. <ulink url='http://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s07.html'></ulink>)
2834 now recognizes the use of <filename>${prefix}/libexec/</filename>,
2835 giving distributions the choice between
2836 <filename>${prefix}/lib</filename> or
2837 <filename>${prefix}/libexec</filename> without breaking FHS.
2838 </para>
2839 </section>
2840
2841 <section id='migration-2.1-ac-cv-sizeof-off-t-no-longer-cached-in-site-files'>
2842 <title><filename>ac_cv_sizeof_off_t</filename> is No Longer Cached in Site Files</title>
2843
2844 <para>
2845 For recipes inheriting the
2846 <link linkend='ref-classes-autotools'><filename>autotools</filename></link>
2847 class, <filename>ac_cv_sizeof_off_t</filename> is no longer cached
2848 in the site files for <filename>autoconf</filename>.
2849 The reason for this change is because the
2850 <filename>ac_cv_sizeof_off_t</filename> value is not necessarily
2851 static per architecture as was previously assumed.
2852 Rather, the value changes based on whether large file support is
2853 enabled.
2854 For most software that uses <filename>autoconf</filename>, this
2855 change should not be a problem.
2856 However, if you have a recipe that bypasses the standard
2857 <link linkend='ref-tasks-configure'><filename>do_configure</filename></link>
2858 task from the <filename>autotools</filename> class and the software
2859 the recipe is building uses a very old version of
2860 <filename>autoconf</filename>, the recipe might be incapable of
2861 determining the correct size of <filename>off_t</filename> during
2862 <filename>do_configure</filename>.
2863 </para>
2864
2865 <para>
2866 The best course of action is to patch the software as necessary
2867 to allow the default implementation from the
2868 <filename>autotools</filename> class to work such that
2869 <filename>autoreconf</filename> succeeds and produces a working
2870 configure script, and to remove the
2871 overridden <filename>do_configure</filename> task such that the
2872 default implementation does get used.
2873 </para>
2874 </section>
2875
2876 <section id='migration-2.1-image-generation-split-out-from-filesystem-generation'>
2877 <title>Image Generation is Now Split Out from Filesystem Generation</title>
2878
2879 <para>
2880 Previously, for image recipes the
2881 <link linkend='ref-tasks-rootfs'><filename>do_rootfs</filename></link>
2882 task assembled the filesystem and then from that filesystem
2883 generated images.
2884 With this Yocto Project release, image generation is split into
2885 separate
2886 <link linkend='ref-tasks-image'><filename>do_image_*</filename></link>
2887 tasks for clarity both in operation and in the code.
2888 </para>
2889
2890 <para>
2891 For most cases, this change does not present any problems.
2892 However, if you have made customizations that directly modify the
2893 <filename>do_rootfs</filename> task or that mention
2894 <filename>do_rootfs</filename>, you might need to update those
2895 changes.
2896 In particular, if you had added any tasks after
2897 <filename>do_rootfs</filename>, you should make edits so that
2898 those tasks are after the
2899 <link linkend='ref-tasks-image-complete'><filename>do_image_complete</filename></link>
2900 task rather than after <filename>do_rootfs</filename>
2901 so that the your added tasks
2902 run at the correct time.
2903 </para>
2904
2905 <para>
2906 A minor part of this restructuring is that the post-processing
2907 definitions and functions have been moved from the
2908 <link linkend='ref-classes-image'><filename>image</filename></link>
2909 class to the
2910 <link linkend='ref-classes-rootfs*'><filename>rootfs-postcommands</filename></link>
2911 class.
2912 Functionally, however, they remain unchanged.
2913 </para>
2914 </section>
2915
2916 <section id='migration-2.1-removed-recipes'>
2917 <title>Removed Recipes</title>
2918
2919 <para>
2920 The following recipes have been removed in the 2.1 release:
2921 <itemizedlist>
2922 <listitem><para><filename>gcc</filename> version 4.8:
2923 Versions 4.9 and 5.3 remain.
2924 </para></listitem>
2925 <listitem><para><filename>qt4</filename>:
2926 All support for Qt 4.x has been moved out to a separate
2927 <filename>meta-qt4</filename> layer because Qt 4 is no
2928 longer supported upstream.
2929 </para></listitem>
2930 <listitem><para><filename>x11vnc</filename>:
2931 Moved to the <filename>meta-oe</filename> layer.
2932 </para></listitem>
2933 <listitem><para><filename>linux-yocto-3.14</filename>:
2934 No longer supported.
2935 </para></listitem>
2936 <listitem><para><filename>linux-yocto-3.19</filename>:
2937 No longer supported.
2938 </para></listitem>
2939 <listitem><para><filename>libjpeg</filename>:
2940 Replaced by the <filename>libjpeg-turbo</filename> recipe.
2941 </para></listitem>
2942 <listitem><para><filename>pth</filename>:
2943 Became obsolete.
2944 </para></listitem>
2945 <listitem><para><filename>liboil</filename>:
2946 Recipe is no longer needed and has been moved to the
2947 <filename>meta-multimedia</filename> layer.
2948 </para></listitem>
2949 <listitem><para><filename>gtk-theme-torturer</filename>:
2950 Recipe is no longer needed and has been moved to the
2951 <filename>meta-gnome</filename> layer.
2952 </para></listitem>
2953 <listitem><para><filename>gnome-mime-data</filename>:
2954 Recipe is no longer needed and has been moved to the
2955 <filename>meta-gnome</filename> layer.
2956 </para></listitem>
2957 <listitem><para><filename>udev</filename>:
2958 Replaced by the <filename>eudev</filename> recipe for
2959 compatibility when using <filename>sysvinit</filename>
2960 with newer kernels.
2961 </para></listitem>
2962 <listitem><para><filename>python-pygtk</filename>:
2963 Recipe became obsolete.
2964 </para></listitem>
2965 <listitem><para><filename>adt-installer</filename>:
2966 Recipe became obsolete.
2967 See the
2968 "<link linkend='migration-2.1-adt-removed'>ADT Removed</link>"
2969 section for more information.
2970 </para></listitem>
2971 </itemizedlist>
2972 </para>
2973 </section>
2974
2975 <section id='migration-2.1-class-changes'>
2976 <title>Class Changes</title>
2977
2978 <para>
2979 The following classes have changed:
2980 <itemizedlist>
2981 <listitem><para><filename>autotools_stage</filename>:
2982 Removed because the
2983 <link linkend='ref-classes-autotools'><filename>autotools</filename></link>
2984 class now provides its functionality.
2985 Recipes that inherited from
2986 <filename>autotools_stage</filename> should now inherit
2987 from <filename>autotools</filename> instead.
2988 </para></listitem>
2989 <listitem><para><filename>boot-directdisk</filename>:
2990 Merged into the <filename>image-vm</filename>
2991 class.
2992 The <filename>boot-directdisk</filename> class was rarely
2993 directly used.
2994 Consequently, this change should not cause any issues.
2995 </para></listitem>
2996 <listitem><para><filename>bootimg</filename>:
2997 Merged into the
2998 <link linkend='ref-classes-image-live'><filename>image-live</filename></link>
2999 class.
3000 The <filename>bootimg</filename> class was rarely
3001 directly used.
3002 Consequently, this change should not cause any issues.
3003 </para></listitem>
3004 <listitem><para><filename>packageinfo</filename>:
3005 Removed due to its limited use by the Hob UI, which has
3006 itself been removed.
3007 </para></listitem>
3008 </itemizedlist>
3009 </para>
3010 </section>
3011
3012 <section id='migration-2.1-build-system-ui-changes'>
3013 <title>Build System User Interface Changes</title>
3014
3015 <para>
3016 The following changes have been made to the build system user
3017 interface:
3018 <itemizedlist>
3019 <listitem><para><emphasis>Hob GTK+-based UI</emphasis>:
3020 Removed because it is unmaintained and based on the
3021 outdated GTK+ 2 library.
3022 The Toaster web-based UI is much more capable and is
3023 actively maintained.
3024 See the
3025 "<ulink url='&YOCTO_DOCS_TOAST_URL;#using-the-toaster-web-interface'>Using the Toaster Web Interface</ulink>"
3026 section in the Toaster User Manual for more
3027 information on this interface.
3028 </para></listitem>
3029 <listitem><para><emphasis>"puccho" BitBake UI</emphasis>:
3030 Removed because is unmaintained and no longer useful.
3031 </para></listitem>
3032 </itemizedlist>
3033 </para>
3034 </section>
3035
3036 <section id='migration-2.1-adt-removed'>
3037 <title>ADT Removed</title>
3038
3039 <para>
3040 The Application Development Toolkit (ADT) has been removed
3041 because its functionality almost completely overlapped with the
3042 <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-using-the-standard-sdk'>standard SDK</ulink>
3043 and the
3044 <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-extensible'>extensible SDK</ulink>.
3045 For information on these SDKs and how to build and use them, see the
3046 <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
3047 manual.
3048 <note>
3049 The Yocto Project Eclipse IDE Plug-in is still supported and
3050 is not affected by this change.
3051 </note>
3052 </para>
3053 </section>
3054
3055 <section id='migration-2.1-poky-reference-distribution-changes'>
3056 <title>Poky Reference Distribution Changes</title>
3057
3058 <para>
3059 The following changes have been made for the Poky distribution:
3060 <itemizedlist>
3061 <listitem><para>
3062 The <filename>meta-yocto</filename> layer has been renamed
3063 to <filename>meta-poky</filename> to better match its
3064 purpose, which is to provide the Poky reference
3065 distribution.
3066 The <filename>meta-yocto-bsp</filename> layer retains its
3067 original name since it provides reference machines for
3068 the Yocto Project and it is otherwise unrelated to Poky.
3069 References to <filename>meta-yocto</filename> in your
3070 <filename>conf/bblayers.conf</filename> should
3071 automatically be updated, so you should not need to change
3072 anything unless you are relying on this naming elsewhere.
3073 </para></listitem>
3074 <listitem><para>
3075 The
3076 <link linkend='ref-classes-uninative'><filename>uninative</filename></link>
3077 class is now enabled by default in Poky.
3078 This class attempts to isolate the build system from the
3079 host distribution's C library and makes re-use of native
3080 shared state artifacts across different host distributions
3081 practical.
3082 With this class enabled, a tarball containing a pre-built
3083 C library is downloaded at the start of the build.</para>
3084
3085 <para>The <filename>uninative</filename> class is enabled
3086 through the
3087 <filename>meta/conf/distro/include/yocto-uninative.inc</filename>
3088 file, which for those not using the Poky distribution, can
3089 include to easily enable the same functionality.</para>
3090
3091 <para>Alternatively, if you wish to build your own
3092 <filename>uninative</filename> tarball, you can do so by
3093 building the <filename>uninative-tarball</filename> recipe,
3094 making it available to your build machines
3095 (e.g. over HTTP/HTTPS) and setting a similar configuration
3096 as the one set by <filename>yocto-uninative.inc</filename>.
3097 </para></listitem>
3098 <listitem><para>
3099 Static library generation, for most cases, is now disabled
3100 by default in the Poky distribution.
3101 Disabling this generation saves some build time as well
3102 as the size used for build output artifacts.</para>
3103
3104 <para>Disabling this library generation is accomplished
3105 through a
3106 <filename>meta/conf/distro/include/no-static-libs.inc</filename>,
3107 which for those not using the Poky distribution can
3108 easily include to enable the same functionality.</para>
3109
3110 <para>Any recipe that needs to opt-out of having the
3111 "--disable-static" option specified on the configure
3112 command line either because it is not a supported option
3113 for the configure script or because static libraries are
3114 needed should set the following variable:
3115 <literallayout class='monospaced'>
3116 DISABLE_STATIC = ""
3117 </literallayout>
3118 </para></listitem>
3119 <listitem><para>
3120 The separate <filename>poky-tiny</filename> distribution
3121 now uses the musl C library instead of a heavily pared
3122 down <filename>glibc</filename>.
3123 Using musl results in a smaller
3124 distribution and facilitates much greater maintainability
3125 because musl is designed to have a small footprint.</para>
3126
3127 <para>If you have used <filename>poky-tiny</filename> and
3128 have customized the <filename>glibc</filename>
3129 configuration you will need to redo those customizations
3130 with musl when upgrading to the new release.
3131 </para></listitem>
3132 </itemizedlist>
3133 </para>
3134 </section>
3135
3136 <section id='migration-2.1-packaging-changes'>
3137 <title>Packaging Changes</title>
3138
3139 <para>
3140 The following changes have been made to packaging:
3141 <itemizedlist>
3142 <listitem><para>
3143 The <filename>runuser</filename> and
3144 <filename>mountpoint</filename> binaries, which were
3145 previously in the main <filename>util-linux</filename>
3146 package, have been split out into the
3147 <filename>util-linux-runuser</filename> and
3148 <filename>util-linux-mountpoint</filename> packages,
3149 respectively.
3150 </para></listitem>
3151 <listitem><para>
3152 The <filename>python-elementtree</filename> package has
3153 been merged into the <filename>python-xml</filename>
3154 package.
3155 </para></listitem>
3156 </itemizedlist>
3157 </para>
3158 </section>
3159
3160 <section id='migration-2.1-tuning-file-changes'>
3161 <title>Tuning File Changes</title>
3162
3163 <para>
3164 The following changes have been made to the tuning files:
3165 <itemizedlist>
3166 <listitem><para>
3167 The "no-thumb-interwork" tuning feature has been dropped
3168 from the ARM tune include files.
3169 Because interworking is required for ARM EABI, attempting
3170 to disable it through a tuning feature no longer makes
3171 sense.
3172 <note>
3173 Support for ARM OABI was deprecated in gcc 4.7.
3174 </note>
3175 </para></listitem>
3176 <listitem><para>
3177 The <filename>tune-cortexm*.inc</filename> and
3178 <filename>tune-cortexr4.inc</filename> files have been
3179 removed because they are poorly tested.
3180 Until the OpenEmbedded build system officially gains
3181 support for CPUs without an MMU, these tuning files would
3182 probably be better maintained in a separate layer
3183 if needed.
3184 </para></listitem>
3185 </itemizedlist>
3186 </para>
3187 </section>
3188
3189 <section id='migration-2.1-supporting-gobject-introspection'>
3190 <title>Supporting GObject Introspection</title>
3191
3192 <para>
3193 This release supports generation of GLib Introspective
3194 Repository (GIR) files through GObject introspection, which is
3195 the standard mechanism for accessing GObject-based software from
3196 runtime environments.
3197 You can enable, disable, and test the generation of this data.
3198 See the
3199 "<ulink url='&YOCTO_DOCS_DEV_URL;#enabling-gobject-introspection-support'>Enabling GObject Introspection Support</ulink>"
3200 section in the Yocto Project Development Tasks Manual
3201 for more information.
3202 </para>
3203 </section>
3204
3205 <section id='migration-2.1-miscellaneous-changes'>
3206 <title>Miscellaneous Changes</title>
3207
3208 <para>
3209 These additional changes exist:
3210 <itemizedlist>
3211 <listitem><para>
3212 The minimum Git version has been increased to 1.8.3.1.
3213 If your host distribution does not provide a sufficiently
3214 recent version, you can install the buildtools, which
3215 will provide it.
3216 See the
3217 "<link linkend='required-git-tar-python-and-gcc-versions'>Required Git, tar, Python and gcc Versions</link>"
3218 section for more information on the buildtools tarball.
3219 </para></listitem>
3220 <listitem><para>
3221 The buggy and incomplete support for the RPM version 4
3222 package manager has been removed.
3223 The well-tested and maintained support for RPM version 5
3224 remains.
3225 </para></listitem>
3226 <listitem><para>
3227 Previously, the following list of packages were removed
3228 if package-management was not in
3229 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>,
3230 regardless of any dependencies:
3231 <literallayout class='monospaced'>
3232 update-rc.d
3233 base-passwd
3234 shadow
3235 update-alternatives
3236 run-postinsts
3237 </literallayout>
3238 With the Yocto Project 2.1 release, these packages are only
3239 removed if "read-only-rootfs" is in
3240 <filename>IMAGE_FEATURES</filename>, since they might
3241 still be needed for a read-write image even in the absence
3242 of a package manager (e.g. if users need to be added,
3243 modified, or removed at runtime).
3244 </para></listitem>
3245 <listitem><para>
3246 The
3247 <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-devtool-use-devtool-modify-to-modify-the-source-of-an-existing-component'><filename>devtool modify</filename></ulink>
3248 command now defaults to extracting the source since that
3249 is most commonly expected.
3250 The "-x" or "--extract" options are now no-ops.
3251 If you wish to provide your own existing source tree, you
3252 will now need to specify either the "-n" or
3253 "--no-extract" options when running
3254 <filename>devtool modify</filename>.
3255 </para></listitem>
3256 <listitem><para>
3257 If the formfactor for a machine is either not supplied
3258 or does not specify whether a keyboard is attached, then
3259 the default is to assume a keyboard is attached rather
3260 than assume no keyboard.
3261 This change primarily affects the Sato UI.
3262 </para></listitem>
3263 <listitem><para>
3264 The <filename>.debug</filename> directory packaging is
3265 now automatic.
3266 If your recipe builds software that installs binaries into
3267 directories other than the standard ones, you no longer
3268 need to take care of setting
3269 <filename>FILES_${PN}-dbg</filename> to pick up the
3270 resulting <filename>.debug</filename> directories as these
3271 directories are automatically found and added.
3272 </para></listitem>
3273 <listitem><para>
3274 Inaccurate disk and CPU percentage data has been dropped
3275 from <filename>buildstats</filename> output.
3276 This data has been replaced with
3277 <filename>getrusage()</filename> data and corrected IO
3278 statistics.
3279 You will probably need to update any custom code that reads
3280 the <filename>buildstats</filename> data.
3281 </para></listitem>
3282 <listitem><para>
3283 The
3284 <filename>meta/conf/distro/include/package_regex.inc</filename>
3285 is now deprecated.
3286 The contents of this file have been moved to individual
3287 recipes.
3288 <note><title>Tip</title>
3289 Because this file will likely be removed in a future
3290 Yocto Project release, it is suggested that you remove
3291 any references to the file that might be in your
3292 configuration.
3293 </note>
3294 </para></listitem>
3295 <listitem><para>
3296 The <filename>v86d/uvesafb</filename> has been removed from
3297 the <filename>genericx86</filename> and
3298 <filename>genericx86-64</filename> reference machines,
3299 which are provided by the
3300 <filename>meta-yocto-bsp</filename> layer.
3301 Most modern x86 boards do not rely on this file and it only
3302 adds kernel error messages during startup.
3303 If you do still need to support
3304 <filename>uvesafb</filename>, you can
3305 simply add <filename>v86d</filename> to your image.
3306 </para></listitem>
3307 <listitem><para>
3308 Build sysroot paths are now removed from debug symbol
3309 files.
3310 Removing these paths means that remote GDB using an
3311 unstripped build system sysroot will no longer work
3312 (although this was never documented to work).
3313 The supported method to accomplish something similar is
3314 to set <filename>IMAGE_GEN_DEBUGFS</filename> to "1",
3315 which will generate a companion debug image
3316 containing unstripped binaries and associated debug
3317 sources alongside the image.
3318 </para></listitem>
3319 </itemizedlist>
3320 </para>
3321 </section>
3322</section>
3323
3324<section id='moving-to-the-yocto-project-2.2-release'>
3325 <title>Moving to the Yocto Project 2.2 Release</title>
3326
3327 <para>
3328 This section provides migration information for moving to the
3329 Yocto Project 2.2 Release from the prior release.
3330 </para>
3331
3332 <section id='migration-2.2-minimum-kernel-version'>
3333 <title>Minimum Kernel Version</title>
3334
3335 <para>
3336 The minimum kernel version for the target system and for SDK
3337 is now 3.2.0, due to the upgrade
3338 to <filename>glibc 2.24</filename>.
3339 Specifically, for AArch64-based targets the version is
3340 3.14.
3341 For Nios II-based targets, the minimum kernel version is 3.19.
3342 <note>
3343 For x86 and x86_64, you can reset
3344 <link linkend='var-OLDEST_KERNEL'><filename>OLDEST_KERNEL</filename></link>
3345 to anything down to 2.6.32 if desired.
3346 </note>
3347 </para>
3348 </section>
3349
3350 <section id='migration-2.2-staging-directories-in-sysroot-simplified'>
3351 <title>Staging Directories in Sysroot Has Been Simplified</title>
3352
3353 <para>
3354 The way directories are staged in sysroot has been simplified and
3355 introduces the new
3356 <link linkend='var-SYSROOT_DIRS'><filename>SYSROOT_DIRS</filename></link>,
3357 <link linkend='var-SYSROOT_DIRS_NATIVE'><filename>SYSROOT_DIRS_NATIVE</filename></link>,
3358 and
3359 <link linkend='var-SYSROOT_DIRS_BLACKLIST'><filename>SYSROOT_DIRS_BLACKLIST</filename></link>.
3360 See the
3361 <ulink url='http://lists.openembedded.org/pipermail/openembedded-core/2016-May/121365.html'>v2 patch series on the OE-Core Mailing List</ulink>
3362 for additional information.
3363 </para>
3364 </section>
3365
3366 <section id='migration-2.2-removal-of-old-images-from-tmp-deploy-now-enabled'>
3367 <title>Removal of Old Images and Other Files in <filename>tmp/deploy</filename> Now Enabled</title>
3368
3369 <para>
3370 Removal of old images and other files in
3371 <filename>tmp/deploy/</filename> is now enabled by default due
3372 to a new staging method used for those files.
3373 As a result of this change, the
3374 <filename>RM_OLD_IMAGE</filename> variable is now redundant.
3375 </para>
3376 </section>
3377
3378 <section id='migration-2.2-python-changes'>
3379 <title>Python Changes</title>
3380
3381 <para>
3382 The following changes for Python occurred:
3383 </para>
3384
3385 <section id='migration-2.2-bitbake-now-requires-python-3.4'>
3386 <title>BitBake Now Requires Python 3.4+</title>
3387
3388 <para>
3389 BitBake requires Python 3.4 or greater.
3390 </para>
3391 </section>
3392
3393 <section id='migration-2.2-utf-8-locale-required-on-build-host'>
3394 <title>UTF-8 Locale Required on Build Host</title>
3395
3396 <para>
3397 A UTF-8 locale is required on the build host due to Python 3.
3398 Since C.UTF-8 is not a standard, the default is en_US.UTF-8.
3399 </para>
3400 </section>
3401
3402 <section id='migration-2.2-metadata-now-must-use-python-3-syntax'>
3403 <title>Metadata Must Now Use Python 3 Syntax</title>
3404
3405 <para>
3406 The metadata is now required to use Python 3 syntax.
3407 For help preparing metadata, see any of the many Python 3 porting
3408 guides available.
3409 Alternatively, you can reference the conversion commits for Bitbake
3410 and you can use
3411 <link linkend='oe-core'>OE-Core</link> as a guide for changes.
3412 Following are particular areas of interest:
3413 <literallayout class='monospaced'>
3414 * subprocess command-line pipes needing locale decoding
3415 * the syntax for octal values changed
3416 * the <filename>iter*()</filename> functions changed name
3417 * iterators now return views, not lists
3418 * changed names for Python modules
3419 </literallayout>
3420 </para>
3421 </section>
3422
3423 <section id='migration-2.2-target-python-recipes-switched-to-python-3'>
3424 <title>Target Python Recipes Switched to Python 3</title>
3425
3426 <para>
3427 Most target Python recipes have now been switched to Python 3.
3428 Unfortunately, systems using RPM as a package manager and
3429 providing online package-manager support through SMART still
3430 require Python 2.
3431 <note>
3432 Python 2 and recipes that use it can still be built for the
3433 target as with previous versions.
3434 </note>
3435 </para>
3436 </section>
3437
3438 <section id='migration-2.2-buildtools-tarball-includes-python-3'>
3439 <title><filename>buildtools-tarball</filename> Includes Python 3</title>
3440
3441 <para>
3442 <filename>buildtools-tarball</filename> now includes Python 3.
3443 </para>
3444 </section>
3445 </section>
3446
3447 <section id='migration-2.2-uclibc-replaced-by-musl'>
3448 <title>uClibc Replaced by musl</title>
3449
3450 <para>
3451 uClibc has been removed in favor of musl.
3452 Musl has matured, is better maintained, and is compatible with a
3453 wider range of applications as compared to uClibc.
3454 </para>
3455 </section>
3456
3457 <section id='migration-2.2-B-no-longer-default-working-directory-for-tasks'>
3458 <title><filename>${B}</filename> No Longer Default Working Directory for Tasks</title>
3459
3460 <para>
3461 <filename>${</filename><link linkend='var-B'><filename>B</filename></link><filename>}</filename>
3462 is no longer the default working directory for tasks.
3463 Consequently, any custom tasks you define now need to either
3464 have the
3465 <filename>[</filename><ulink url='&YOCTO_DOCS_BB_URL;#variable-flags'><filename>dirs</filename></ulink><filename>]</filename> flag set, or the task needs to change into the
3466 appropriate working directory manually (e.g using
3467 <filename>cd</filename> for a shell task).
3468 <note>
3469 The preferred method is to use the
3470 <filename>[dirs]</filename> flag.
3471 </note>
3472 </para>
3473 </section>
3474
3475 <section id='migration-2.2-runqemu-ported-to-python'>
3476 <title><filename>runqemu</filename> Ported to Python</title>
3477
3478 <para>
3479 <filename>runqemu</filename> has been ported to Python and has
3480 changed behavior in some cases.
3481 Previous usage patterns continue to be supported.
3482 </para>
3483
3484 <para>
3485 The new <filename>runqemu</filename> is a Python script.
3486 Machine knowledge is no longer hardcoded into
3487 <filename>runqemu</filename>.
3488 You can choose to use the <filename>qemuboot</filename>
3489 configuration file to define the BSP's own arguments and to make
3490 it bootable with <filename>runqemu</filename>.
3491 If you use a configuration file, use the following form:
3492 <literallayout class='monospaced'>
3493 <replaceable>image-name</replaceable>-<replaceable>machine</replaceable>.qemuboot.conf
3494 </literallayout>
3495 The configuration file enables fine-grained tuning of options
3496 passed to QEMU without the <filename>runqemu</filename> script
3497 hard-coding any knowledge about different machines.
3498 Using a configuration file is particularly convenient when trying
3499 to use QEMU with machines other than the
3500 <filename>qemu*</filename> machines in
3501 <link linkend='oe-core'>OE-Core</link>.
3502 The <filename>qemuboot.conf</filename> file is generated by the
3503 <filename>qemuboot</filename>
3504 class when the root filesystem is being build (i.e.
3505 build rootfs).
3506 QEMU boot arguments can be set in BSP's configuration file and
3507 the <filename>qemuboot</filename> class will save them to
3508 <filename>qemuboot.conf</filename>.
3509 </para>
3510
3511
3512 <para>
3513 If you want to use <filename>runqemu</filename> without a
3514 configuration file, use the following command form:
3515 <literallayout class='monospaced'>
3516 $ runqemu <replaceable>machine</replaceable> <replaceable>rootfs</replaceable> <replaceable>kernel</replaceable> [<replaceable>options</replaceable>]
3517 </literallayout>
3518 Supported <replaceable>machines</replaceable> are as follows:
3519 <literallayout class='monospaced'>
3520 qemuarm
3521 qemuarm64
3522 qemux86
3523 qemux86-64
3524 qemuppc
3525 qemumips
3526 qemumips64
3527 qemumipsel
3528 qemumips64el
3529 </literallayout>
3530 Consider the following example, which uses the
3531 <filename>qemux86-64</filename> machine,
3532 provides a root filesystem, provides an image, and uses
3533 the <filename>nographic</filename> option:
3534 <literallayout class='monospaced'>
3535$ runqemu qemux86-64 tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.ext4 tmp/deploy/images/qemux86-64/bzImage nographic
3536 </literallayout>
3537 </para>
3538
3539 <para>
3540 Following is a list of variables that can be set in configuration
3541 files such as <filename>bsp.conf</filename> to enable the BSP
3542 to be booted by <filename>runqemu</filename>:
3543 <note>
3544 "QB" means "QEMU Boot".
3545 </note>
3546 <literallayout class='monospaced'>
3547 QB_SYSTEM_NAME: QEMU name (e.g. "qemu-system-i386")
3548 QB_OPT_APPEND: Options to append to QEMU (e.g. "-show-cursor")
3549 QB_DEFAULT_KERNEL: Default kernel to boot (e.g. "bzImage")
3550 QB_DEFAULT_FSTYPE: Default FSTYPE to boot (e.g. "ext4")
3551 QB_MEM: Memory (e.g. "-m 512")
3552 QB_MACHINE: QEMU machine (e.g. "-machine virt")
3553 QB_CPU: QEMU cpu (e.g. "-cpu qemu32")
3554 QB_CPU_KVM: Similar to QB_CPU except used for kvm support (e.g. "-cpu kvm64")
3555 QB_KERNEL_CMDLINE_APPEND: Options to append to the kernel's -append
3556 option (e.g. "console=ttyS0 console=tty")
3557 QB_DTB: QEMU dtb name
3558 QB_AUDIO_DRV: QEMU audio driver (e.g. "alsa", set it when support audio)
3559 QB_AUDIO_OPT: QEMU audio option (e.g. "-soundhw ac97,es1370"), which is used
3560 when QB_AUDIO_DRV is set.
3561 QB_KERNEL_ROOT: Kernel's root (e.g. /dev/vda)
3562 QB_TAP_OPT: Network option for 'tap' mode (e.g.
3563 "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no -device virtio-net-device,netdev=net0").
3564 runqemu will replace "@TAP@" with the one that is used, such as tap0, tap1 ...
3565 QB_SLIRP_OPT: Network option for SLIRP mode (e.g. "-netdev user,id=net0 -device virtio-net-device,netdev=net0")
3566 QB_ROOTFS_OPT: Used as rootfs (e.g.
3567 "-drive id=disk0,file=@ROOTFS@,if=none,format=raw -device virtio-blk-device,drive=disk0").
3568 runqemu will replace "@ROOTFS@" with the one which is used, such as
3569 core-image-minimal-qemuarm64.ext4.
3570 QB_SERIAL_OPT: Serial port (e.g. "-serial mon:stdio")
3571 QB_TCPSERIAL_OPT: tcp serial port option (e.g.
3572 " -device virtio-serial-device -chardev socket,id=virtcon,port=@PORT@,host=127.0.0.1 -device virtconsole,chardev=virtcon"
3573 runqemu will replace "@PORT@" with the port number which is used.
3574 </literallayout>
3575 </para>
3576
3577 <para>
3578 To use <filename>runqemu</filename>, set
3579 <link linkend='var-IMAGE_CLASSES'><filename>IMAGE_CLASSES</filename></link>
3580 as follows and run <filename>runqemu</filename>:
3581 <note>
3582 For command-line syntax, use
3583 <filename>runqemu help</filename>.
3584 </note>
3585 <literallayout class='monospaced'>
3586 IMAGE_CLASSES += "qemuboot"
3587 </literallayout>
3588 </para>
3589 </section>
3590
3591 <section id='migration-2.2-default-linker-hash-style-changed'>
3592 <title>Default Linker Hash Style Changed</title>
3593
3594 <para>
3595 The default linker hash style for <filename>gcc-cross</filename>
3596 is now "sysv" in order to catch recipes that are building software
3597 without using the OpenEmbedded
3598 <link linkend='var-LDFLAGS'><filename>LDFLAGS</filename></link>.
3599 This change could result in seeing some "No GNU_HASH in the elf
3600 binary" QA issues when building such recipes.
3601 You need to fix these recipes so that they use the expected
3602 <filename>LDFLAGS</filename>.
3603 Depending on how the software is built, the build system used by
3604 the software (e.g. a Makefile) might need to be patched.
3605 However, sometimes making this fix is as simple as adding the
3606 following to the recipe:
3607 <literallayout class='monospaced'>
3608 TARGET_CC_ARCH += "${LDFLAGS}"
3609 </literallayout>
3610 </para>
3611 </section>
3612
3613 <section id='migration-2.2-kernel-image-base-name-no-longer-uses-kernel-imagetype'>
3614 <title><filename>KERNEL_IMAGE_BASE_NAME</filename> no Longer Uses <filename>KERNEL_IMAGETYPE</filename></title>
3615
3616 <para>
3617 The
3618 <filename>KERNEL_IMAGE_BASE_NAME</filename>
3619 variable no longer uses the
3620 <link linkend='var-KERNEL_IMAGETYPE'><filename>KERNEL_IMAGETYPE</filename></link>
3621 variable to create the image's base name.
3622 Because the OpenEmbedded build system can now build multiple kernel
3623 image types, this part of the kernel image base name as been
3624 removed leaving only the following:
3625 <literallayout class='monospaced'>
3626 KERNEL_IMAGE_BASE_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"
3627 </literallayout>
3628 If you have recipes or classes that use
3629 <filename>KERNEL_IMAGE_BASE_NAME</filename> directly, you might
3630 need to update the references to ensure they continue to work.
3631 </para>
3632 </section>
3633
3634 <section id='migration-2.2-bitbake-changes'>
3635 <title>BitBake Changes</title>
3636
3637 <para>
3638 The following changes took place for BitBake:
3639 <itemizedlist>
3640 <listitem><para>
3641 The "goggle" UI and standalone image-writer tool have
3642 been removed as they both require GTK+ 2.0 and
3643 were not being maintained.
3644 </para></listitem>
3645 <listitem><para>
3646 The Perforce fetcher now supports
3647 <link linkend='var-SRCREV'><filename>SRCREV</filename></link>
3648 for specifying the source revision to use, be it
3649 <filename>${</filename><link linkend='var-AUTOREV'><filename>AUTOREV</filename></link><filename>}</filename>,
3650 changelist number, p4date, or label, in preference to
3651 separate
3652 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
3653 parameters to specify these.
3654 This change is more in-line with how the other fetchers
3655 work for source control systems.
3656 Recipes that fetch from Perforce will need to be updated
3657 to use <filename>SRCREV</filename> in place of specifying
3658 the source revision within
3659 <filename>SRC_URI</filename>.
3660 </para></listitem>
3661 <listitem><para>
3662 Some of BitBake's internal code structures for accessing
3663 the recipe cache needed to be changed to support the new
3664 multi-configuration functionality.
3665 These changes will affect external tools that use BitBake's
3666 tinfoil module.
3667 For information on these changes, see the changes made to
3668 the scripts supplied with OpenEmbedded-Core:
3669 <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=189371f8393971d00bca0fceffd67cc07784f6ee'>1</ulink>
3670 and
3671 <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=4a5aa7ea4d07c2c90a1654b174873abb018acc67'>2</ulink>.
3672 </para></listitem>
3673 <listitem><para>
3674 The task management code has been rewritten to avoid using
3675 ID indirection in order to improve performance.
3676 This change is unlikely to cause any problems for most
3677 users.
3678 However, the setscene verification function as pointed to
3679 by <filename>BB_SETSCENE_VERIFY_FUNCTION</filename>
3680 needed to change signature.
3681 Consequently, a new variable named
3682 <filename>BB_SETSCENE_VERIFY_FUNCTION2</filename>
3683 has been added allowing multiple versions of BitBake
3684 to work with suitably written metadata, which includes
3685 OpenEmbedded-Core and Poky.
3686 Anyone with custom BitBake task scheduler code might also
3687 need to update the code to handle the new structure.
3688 </para></listitem>
3689 </itemizedlist>
3690 </para>
3691 </section>
3692
3693 <section id='migration-2.2-swabber-has-been-removed'>
3694 <title>Swabber has Been Removed</title>
3695
3696 <para>
3697 Swabber, a tool that was intended to detect host contamination in
3698 the build process, has been removed, as it has been unmaintained
3699 and unused for some time and was never particularly effective.
3700 The OpenEmbedded build system has since incorporated a number of
3701 mechanisms including enhanced QA checks that mean that there is
3702 less of a need for such a tool.
3703 </para>
3704 </section>
3705
3706 <section id='migration-2.2-removed-recipes'>
3707 <title>Removed Recipes</title>
3708
3709 <para>
3710 The following recipes have been removed:
3711 <itemizedlist>
3712 <listitem><para>
3713 <filename>augeas</filename>:
3714 No longer needed and has been moved to
3715 <filename>meta-oe</filename>.
3716 </para></listitem>
3717 <listitem><para>
3718 <filename>directfb</filename>:
3719 Unmaintained and has been moved to
3720 <filename>meta-oe</filename>.
3721 </para></listitem>
3722 <listitem><para>
3723 <filename>gcc</filename>:
3724 Removed 4.9 version.
3725 Versions 5.4 and 6.2 are still present.
3726 </para></listitem>
3727 <listitem><para>
3728 <filename>gnome-doc-utils</filename>:
3729 No longer needed.
3730 </para></listitem>
3731 <listitem><para>
3732 <filename>gtk-doc-stub</filename>:
3733 Replaced by <filename>gtk-doc</filename>.
3734 </para></listitem>
3735 <listitem><para>
3736 <filename>gtk-engines</filename>:
3737 No longer needed and has been moved to
3738 <filename>meta-gnome</filename>.
3739 </para></listitem>
3740 <listitem><para>
3741 <filename>gtk-sato-engine</filename>:
3742 Became obsolete.
3743 </para></listitem>
3744 <listitem><para>
3745 <filename>libglade</filename>:
3746 No longer needed and has been moved to
3747 <filename>meta-oe</filename>.
3748 </para></listitem>
3749 <listitem><para>
3750 <filename>libmad</filename>:
3751 Unmaintained and functionally replaced by
3752 <filename>libmpg123</filename>.
3753 <filename>libmad</filename> has been moved to
3754 <filename>meta-oe</filename>.
3755 </para></listitem>
3756 <listitem><para>
3757 <filename>libowl</filename>:
3758 Became obsolete.
3759 </para></listitem>
3760 <listitem><para>
3761 <filename>libxsettings-client</filename>:
3762 No longer needed.
3763 </para></listitem>
3764 <listitem><para>
3765 <filename>oh-puzzles</filename>:
3766 Functionally replaced by
3767 <filename>puzzles</filename>.
3768 </para></listitem>
3769 <listitem><para>
3770 <filename>oprofileui</filename>:
3771 Became obsolete.
3772 OProfile has been largely supplanted by perf.
3773 </para></listitem>
3774 <listitem><para>
3775 <filename>packagegroup-core-directfb.bb</filename>:
3776 Removed.
3777 </para></listitem>
3778 <listitem><para>
3779 <filename>core-image-directfb.bb</filename>:
3780 Removed.
3781 </para></listitem>
3782 <listitem><para>
3783 <filename>pointercal</filename>:
3784 No longer needed and has been moved to
3785 <filename>meta-oe</filename>.
3786 </para></listitem>
3787 <listitem><para>
3788 <filename>python-imaging</filename>:
3789 No longer needed and moved to
3790 <filename>meta-python</filename>
3791 </para></listitem>
3792 <listitem><para>
3793 <filename>python-pyrex</filename>:
3794 No longer needed and moved to
3795 <filename>meta-python</filename>.
3796 </para></listitem>
3797 <listitem><para>
3798 <filename>sato-icon-theme</filename>:
3799 Became obsolete.
3800 </para></listitem>
3801 <listitem><para>
3802 <filename>swabber-native</filename>:
3803 Swabber has been removed.
3804 See the
3805 <link linkend='migration-2.2-swabber-has-been-removed'>entry on Swabber</link>.
3806 </para></listitem>
3807 <listitem><para>
3808 <filename>tslib</filename>:
3809 No longer needed and has been moved to
3810 <filename>meta-oe</filename>.
3811 </para></listitem>
3812 <listitem><para>
3813 <filename>uclibc</filename>:
3814 Removed in favor of musl.
3815 </para></listitem>
3816 <listitem><para>
3817 <filename>xtscal</filename>:
3818 No longer needed and moved to
3819 <filename>meta-oe</filename>
3820 </para></listitem>
3821 </itemizedlist>
3822 </para>
3823 </section>
3824
3825 <section id='migration-2.2-removed-classes'>
3826 <title>Removed Classes</title>
3827
3828 <para>
3829 The following classes have been removed:
3830 <itemizedlist>
3831 <listitem><para>
3832 <filename>distutils-native-base</filename>:
3833 No longer needed.
3834 </para></listitem>
3835 <listitem><para>
3836 <filename>distutils3-native-base</filename>:
3837 No longer needed.
3838 </para></listitem>
3839 <listitem><para>
3840 <filename>sdl</filename>:
3841 Only set
3842 <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>
3843 and
3844 <link linkend='var-SECTION'><filename>SECTION</filename></link>,
3845 which are better set within the recipe instead.
3846 </para></listitem>
3847 <listitem><para>
3848 <filename>sip</filename>:
3849 Mostly unused.
3850 </para></listitem>
3851 <listitem><para>
3852 <filename>swabber</filename>:
3853 See the
3854 <link linkend='migration-2.2-swabber-has-been-removed'>entry on Swabber</link>.
3855 </para></listitem>
3856 </itemizedlist>
3857 </para>
3858 </section>
3859
3860 <section id='migration-2.2-minor-packaging-changes'>
3861 <title>Minor Packaging Changes</title>
3862
3863 <para>
3864 The following minor packaging changes have occurred:
3865 <itemizedlist>
3866 <listitem><para>
3867 <filename>grub</filename>:
3868 Split <filename>grub-editenv</filename> into its own
3869 package.
3870 </para></listitem>
3871 <listitem><para>
3872 <filename>systemd</filename>:
3873 Split container and vm related units into a new package,
3874 systemd-container.
3875 </para></listitem>
3876 <listitem><para>
3877 <filename>util-linux</filename>:
3878 Moved <filename>prlimit</filename> to a separate
3879 <filename>util-linux-prlimit</filename> package.
3880 </para></listitem>
3881 </itemizedlist>
3882 </para>
3883 </section>
3884
3885 <section id='migration-2.2-miscellaneous-changes'>
3886 <title>Miscellaneous Changes</title>
3887
3888 <para>
3889 The following miscellaneous changes have occurred:
3890 <itemizedlist>
3891 <listitem><para>
3892 <filename>package_regex.inc</filename>:
3893 Removed because the definitions
3894 <filename>package_regex.inc</filename> previously contained
3895 have been moved to their respective recipes.
3896 </para></listitem>
3897 <listitem><para>
3898 Both <filename>devtool add</filename> and
3899 <filename>recipetool create</filename> now use a fixed
3900 <link linkend='var-SRCREV'><filename>SRCREV</filename></link>
3901 by default when fetching from a Git repository.
3902 You can override this in either case to use
3903 <filename>${</filename><link linkend='var-AUTOREV'><filename>AUTOREV</filename></link><filename>}</filename>
3904 instead by using the <filename>-a</filename> or
3905 <filename>&dash;&dash;autorev</filename> command-line
3906 option
3907 </para></listitem>
3908 <listitem><para>
3909 <filename>distcc</filename>:
3910 GTK+ UI is now disabled by default.
3911 </para></listitem>
3912 <listitem><para>
3913 <filename>packagegroup-core-tools-testapps</filename>:
3914 Removed Piglit.
3915 </para></listitem>
3916 <listitem><para>
3917 <filename>image.bbclass</filename>:
3918 Renamed COMPRESS(ION) to CONVERSION.
3919 This change means that
3920 <filename>COMPRESSIONTYPES</filename>,
3921 <filename>COMPRESS_DEPENDS</filename> and
3922 <filename>COMPRESS_CMD</filename> are deprecated in favor
3923 of <filename>CONVERSIONTYPES</filename>,
3924 <filename>CONVERSION_DEPENDS</filename> and
3925 <filename>CONVERSION_CMD</filename>.
3926 The <filename>COMPRESS*</filename> variable names will
3927 still work in the 2.2 release but metadata that does not
3928 need to be backwards-compatible should be changed to
3929 use the new names as the <filename>COMPRESS*</filename>
3930 ones will be removed in a future release.
3931 </para></listitem>
3932 <listitem><para>
3933 <filename>gtk-doc</filename>:
3934 A full version of <filename>gtk-doc</filename> is now
3935 made available.
3936 However, some old software might not be capable of using
3937 the current version of <filename>gtk-doc</filename>
3938 to build documentation.
3939 You need to change recipes that build such software so that
3940 they explicitly disable building documentation with
3941 <filename>gtk-doc</filename>.
3942 </para></listitem>
3943 </itemizedlist>
3944 </para>
3945 </section>
3946</section>
3947
3948<section id='moving-to-the-yocto-project-2.3-release'>
3949 <title>Moving to the Yocto Project 2.3 Release</title>
3950
3951 <para>
3952 This section provides migration information for moving to the
3953 Yocto Project 2.3 Release from the prior release.
3954 </para>
3955
3956 <section id='migration-2.3-recipe-specific-sysroots'>
3957 <title>Recipe-specific Sysroots</title>
3958
3959 <para>
3960 The OpenEmbedded build system now uses one sysroot per
3961 recipe to resolve long-standing issues with configuration
3962 script auto-detection of undeclared dependencies.
3963 Consequently, you might find that some of your previously
3964 written custom recipes are missing declared dependencies,
3965 particularly those dependencies that are incidentally built
3966 earlier in a typical build process and thus are already likely
3967 to be present in the shared sysroot in previous releases.
3968 </para>
3969
3970 <para>
3971 Consider the following:
3972 <itemizedlist>
3973 <listitem><para>
3974 <emphasis>Declare Build-Time Dependencies:</emphasis>
3975 Because of this new feature, you must explicitly
3976 declare all build-time dependencies for your recipe.
3977 If you do not declare these dependencies, they are not
3978 populated into the sysroot for the recipe.
3979 </para></listitem>
3980 <listitem><para>
3981 <emphasis>Specify Pre-Installation and Post-Installation
3982 Native Tool Dependencies:</emphasis>
3983 You must specifically specify any special native tool
3984 dependencies of <filename>pkg_preinst</filename> and
3985 <filename>pkg_postinst</filename> scripts by using the
3986 <link linkend='var-PACKAGE_WRITE_DEPS'><filename>PACKAGE_WRITE_DEPS</filename></link>
3987 variable.
3988 Specifying these dependencies ensures that these tools
3989 are available if these scripts need to be run on the
3990 build host during the
3991 <link linkend='ref-tasks-rootfs'><filename>do_rootfs</filename></link>
3992 task.</para>
3993
3994 <para>As an example, see the <filename>dbus</filename>
3995 recipe.
3996 You will see that this recipe has a
3997 <filename>pkg_postinst</filename> that calls
3998 <filename>systemctl</filename> if "systemd" is in
3999 <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>.
4000 In the example,
4001 <filename>systemd-systemctl-native</filename> is added to
4002 <filename>PACKAGE_WRITE_DEPS</filename>, which is also
4003 conditional on "systemd" being in
4004 <filename>DISTRO_FEATURES</filename>.
4005 </para></listitem>
4006 <listitem><para>
4007 <emphasis>Examine Recipes that Use
4008 <filename>SSTATEPOSTINSTFUNCS</filename>:</emphasis>
4009 You need to examine any recipe that uses
4010 <filename>SSTATEPOSTINSTFUNCS</filename> and determine
4011 steps to take.</para>
4012
4013 <para>Functions added to
4014 <filename>SSTATEPOSTINSTFUNCS</filename> are still
4015 called as they were in previous Yocto Project releases.
4016 However, since a separate sysroot is now being populated
4017 for every recipe and if existing functions being called
4018 through <filename>SSTATEPOSTINSTFUNCS</filename> are
4019 doing relocation, then you will need to change these
4020 to use a post-installation script that is installed by a
4021 function added to
4022 <link linkend='var-SYSROOT_PREPROCESS_FUNCS'><filename>SYSROOT_PREPROCESS_FUNCS</filename></link>.
4023 </para>
4024
4025 <para>For an example, see the
4026 <filename>pixbufcache</filename> class in
4027 <filename>meta/classes/</filename> in the Yocto Project
4028 <ulink url='&YOCTO_DOCS_OM_URL;#source-repositories'>Source Repositories</ulink>.
4029 <note>
4030 The <filename>SSTATEPOSTINSTFUNCS</filename> variable
4031 itself is now deprecated in favor of the
4032 <filename>do_populate_sysroot[postfuncs]</filename>
4033 task.
4034 Consequently, if you do still have any function or
4035 functions that need to be called after the sysroot
4036 component is created for a recipe, then you would be
4037 well advised to take steps to use a post installation
4038 script as described previously.
4039 Taking these steps prepares your code for when
4040 <filename>SSTATEPOSTINSTFUNCS</filename> is
4041 removed in a future Yocto Project release.
4042 </note>
4043 </para></listitem>
4044 <listitem><para>
4045 <emphasis>Specify the Sysroot when Using Certain
4046 External Scripts:</emphasis>
4047 Because the shared sysroot is now gone, the scripts
4048 <filename>oe-find-native-sysroot</filename> and
4049 <filename>oe-run-native</filename> have been changed such
4050 that you need to specify which recipe's
4051 <link linkend='var-STAGING_DIR_NATIVE'><filename>STAGING_DIR_NATIVE</filename></link>
4052 is used.
4053 </para></listitem>
4054 </itemizedlist>
4055 <note>
4056 You can find more information on how recipe-specific sysroots
4057 work in the
4058 "<link linkend='ref-classes-staging'><filename>staging.bbclass</filename></link>"
4059 section.
4060 </note>
4061 </para>
4062 </section>
4063
4064 <section id='migration-2.3-path-variable'>
4065 <title><filename>PATH</filename> Variable</title>
4066
4067 <para>
4068 Within the environment used to run build tasks, the environment
4069 variable <filename>PATH</filename> is now sanitized such that
4070 the normal native binary paths
4071 (<filename>/bin</filename>, <filename>/sbin</filename>,
4072 <filename>/usr/bin</filename> and so forth) are
4073 removed and a directory containing symbolic links linking only
4074 to the binaries from the host mentioned in the
4075 <link linkend='var-HOSTTOOLS'><filename>HOSTTOOLS</filename></link>
4076 and
4077 <link linkend='var-HOSTTOOLS_NONFATAL'><filename>HOSTTOOLS_NONFATAL</filename></link>
4078 variables is added to <filename>PATH</filename>.
4079 </para>
4080
4081 <para>
4082 Consequently, any native binaries provided by the host that you
4083 need to call needs to be in one of these two variables at
4084 the configuration level.
4085 </para>
4086
4087 <para>
4088 Alternatively, you can add a native recipe (i.e.
4089 <filename>-native</filename>) that provides the
4090 binary to the recipe's
4091 <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>
4092 value.
4093 <note>
4094 <filename>PATH</filename> is not sanitized in the same way
4095 within <filename>devshell</filename>.
4096 If it were, you would have difficulty running host tools for
4097 development and debugging within the shell.
4098 </note>
4099 </para>
4100 </section>
4101
4102 <section id='migration-2.3-scripts'>
4103 <title>Changes to Scripts</title>
4104
4105 <para>
4106 The following changes to scripts took place:
4107 <itemizedlist>
4108 <listitem><para>
4109 <emphasis><filename>oe-find-native-sysroot</filename>:</emphasis>
4110 The usage for the
4111 <filename>oe-find-native-sysroot</filename> script has
4112 changed to the following:
4113 <literallayout class='monospaced'>
4114 $ . oe-find-native-sysroot <replaceable>recipe</replaceable>
4115 </literallayout>
4116 You must now supply a recipe for
4117 <replaceable>recipe</replaceable> as part of the command.
4118 Prior to the Yocto Project &DISTRO; release, it was not
4119 necessary to provide the script with the command.
4120 </para></listitem>
4121 <listitem><para>
4122 <emphasis><filename>oe-run-native</filename>:</emphasis>
4123 The usage for the
4124 <filename>oe-run-native</filename> script has changed
4125 to the following:
4126 <literallayout class='monospaced'>
4127 $ oe-run-native <replaceable>native_recipe</replaceable> <replaceable>tool</replaceable>
4128 </literallayout>
4129 You must supply the name of the native recipe and the tool
4130 you want to run as part of the command.
4131 Prior to the Yocto Project &DISTRO; release, it was not
4132 necessary to provide the native recipe with the command.
4133 </para></listitem>
4134 <listitem><para>
4135 <emphasis><filename>cleanup-workdir</filename>:</emphasis>
4136 The <filename>cleanup-workdir</filename> script has been
4137 removed because the script was found to be deleting
4138 files it should not have, which lead to broken build
4139 trees.
4140 Rather than trying to delete portions of
4141 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
4142 and getting it wrong, it is recommended that you
4143 delete <filename>TMPDIR</filename> and have it restored
4144 from shared state (sstate) on subsequent builds.
4145 </para></listitem>
4146 <listitem><para>
4147 <emphasis><filename>wipe-sysroot</filename>:</emphasis>
4148 The <filename>wipe-sysroot</filename> script has been
4149 removed as it is no longer needed with recipe-specific
4150 sysroots.
4151 </para></listitem>
4152 </itemizedlist>
4153 </para>
4154 </section>
4155
4156 <section id='migration-2.3-functions'>
4157 <title>Changes to Functions</title>
4158
4159 <para>
4160 The previously deprecated
4161 <filename>bb.data.getVar()</filename>,
4162 <filename>bb.data.setVar()</filename>, and
4163 related functions have been removed in favor of
4164 <filename>d.getVar()</filename>,
4165 <filename>d.setVar()</filename>, and so forth.
4166 </para>
4167
4168 <para>
4169 You need to fix any references to these old functions.
4170 </para>
4171 </section>
4172
4173 <section id='migration-2.3-bitbake-changes'>
4174 <title>BitBake Changes</title>
4175
4176 <para>
4177 The following changes took place for BitBake:
4178 <itemizedlist>
4179 <listitem><para>
4180 <emphasis>BitBake's Graphical Dependency Explorer UI Replaced:</emphasis>
4181 BitBake's graphical dependency explorer UI
4182 <filename>depexp</filename> was replaced by
4183 <filename>taskexp</filename> ("Task Explorer"), which
4184 provides a graphical way of exploring the
4185 <filename>task-depends.dot</filename> file.
4186 The data presented by Task Explorer is much more
4187 accurate than the data that was presented by
4188 <filename>depexp</filename>.
4189 Being able to visualize the data is an often requested
4190 feature as standard <filename>*.dot</filename> file
4191 viewers cannot usual cope with the size of
4192 the <filename>task-depends.dot</filename> file.
4193 </para></listitem>
4194 <listitem><para>
4195 <emphasis>BitBake "-g" Output Changes:</emphasis>
4196 The <filename>package-depends.dot</filename> and
4197 <filename>pn-depends.dot</filename> files as previously
4198 generated using the <filename>bitbake -g</filename> command
4199 have been removed.
4200 A <filename>recipe-depends.dot</filename> file
4201 is now generated as a collapsed version of
4202 <filename>task-depends.dot</filename> instead.
4203 </para>
4204
4205 <para>The reason for this change is because
4206 <filename>package-depends.dot</filename> and
4207 <filename>pn-depends.dot</filename> largely date back
4208 to a time before task-based execution and do not take
4209 into account task-level dependencies between recipes,
4210 which could be misleading.
4211 </para></listitem>
4212 <listitem><para>
4213 <emphasis>Mirror Variable Splitting Changes:</emphasis>
4214 Mirror variables including
4215 <link linkend='var-MIRRORS'><filename>MIRRORS</filename></link>,
4216 <link linkend='var-PREMIRRORS'><filename>PREMIRRORS</filename></link>,
4217 and
4218 <link linkend='var-SSTATE_MIRRORS'><filename>SSTATE_MIRRORS</filename></link>
4219 can now separate values entirely with spaces.
4220 Consequently, you no longer need "\\n".
4221 BitBake looks for pairs of values, which simplifies usage.
4222 There should be no change required to existing mirror
4223 variable values themselves.
4224 </para></listitem>
4225 <listitem><para>
4226 <emphasis>The Subversion (SVN) Fetcher Uses an "ssh" Parameter and Not an "rsh" Parameter:</emphasis>
4227 The SVN fetcher now takes an "ssh" parameter instead of an
4228 "rsh" parameter.
4229 This new optional parameter is used when the "protocol"
4230 parameter is set to "svn+ssh".
4231 You can only use the new parameter to specify the
4232 <filename>ssh</filename> program used by SVN.
4233 The SVN fetcher passes the new parameter through the
4234 <filename>SVN_SSH</filename> environment variable during
4235 the
4236 <link linkend='ref-tasks-fetch'><filename>do_fetch</filename></link>
4237 task.</para>
4238
4239 <para>See the
4240 "<ulink url='&YOCTO_DOCS_BB_URL;#svn-fetcher'>Subversion (SVN) Fetcher (svn://)</ulink>"
4241 section in the BitBake User Manual for additional
4242 information.
4243 </para></listitem>
4244 <listitem><para>
4245 <emphasis><filename>BB_SETSCENE_VERIFY_FUNCTION</filename>
4246 and <filename>BB_SETSCENE_VERIFY_FUNCTION2</filename>
4247 Removed:</emphasis>
4248 Because the mechanism they were part of is no longer
4249 necessary with recipe-specific sysroots, the
4250 <filename>BB_SETSCENE_VERIFY_FUNCTION</filename> and
4251 <filename>BB_SETSCENE_VERIFY_FUNCTION2</filename>
4252 variables have been removed.
4253 </para></listitem>
4254 </itemizedlist>
4255 </para>
4256 </section>
4257
4258 <section id='migration-2.3-absolute-symlinks'>
4259 <title>Absolute Symbolic Links</title>
4260
4261 <para>
4262 Absolute symbolic links (symlinks) within staged files are no
4263 longer permitted and now trigger an error.
4264 Any explicit creation of symlinks can use the
4265 <filename>lnr</filename> script, which is a replacement for
4266 <filename>ln -r</filename>.
4267 </para>
4268
4269 <para>
4270 If the build scripts in the software that the recipe is building
4271 are creating a number of absolute symlinks that need to be
4272 corrected, you can inherit
4273 <filename>relative_symlinks</filename> within the recipe to turn
4274 those absolute symlinks into relative symlinks.
4275 </para>
4276 </section>
4277
4278 <section id='migration-2.3-gplv2-and-gplv3-moves'>
4279 <title>GPLv2 Versions of GPLv3 Recipes Moved</title>
4280
4281 <para>
4282 Older GPLv2 versions of GPLv3 recipes have moved to a
4283 separate <filename>meta-gplv2</filename> layer.
4284 </para>
4285
4286 <para>
4287 If you use
4288 <link linkend='var-INCOMPATIBLE_LICENSE'><filename>INCOMPATIBLE_LICENSE</filename></link>
4289 to exclude GPLv3 or set
4290 <link linkend='var-PREFERRED_VERSION'><filename>PREFERRED_VERSION</filename></link>
4291 to substitute a GPLv2 version of a GPLv3 recipe, then you must add
4292 the <filename>meta-gplv2</filename> layer to your configuration.
4293 <note>
4294 You can find <filename>meta-gplv2</filename> layer in the
4295 OpenEmbedded layer index at
4296 <ulink url='https://layers.openembedded.org/layerindex/branch/master/layer/meta-gplv2/'></ulink>.
4297 </note>
4298 </para>
4299
4300 <para>
4301 These relocated GPLv2 recipes do not receive the same level of
4302 maintenance as other core recipes.
4303 The recipes do not get security fixes and upstream no longer
4304 maintains them.
4305 In fact, the upstream community is actively hostile towards people
4306 that use the old versions of the recipes.
4307 Moving these recipes into a separate layer both makes the different
4308 needs of the recipes clearer and clearly identifies the number of
4309 these recipes.
4310 <note>
4311 The long-term solution might be to move to BSD-licensed
4312 replacements of the GPLv3 components for those that need to
4313 exclude GPLv3-licensed components from the target system.
4314 This solution will be investigated for future Yocto
4315 Project releases.
4316 </note>
4317 </para>
4318 </section>
4319
4320 <section id='migration-2.3-package-management-changes'>
4321 <title>Package Management Changes</title>
4322
4323 <para>
4324 The following package management changes took place:
4325 <itemizedlist>
4326 <listitem><para>
4327 Smart package manager is replaced by DNF package manager.
4328 Smart has become unmaintained upstream, is not ported
4329 to Python 3.x.
4330 Consequently, Smart needed to be replaced.
4331 DNF is the only feasible candidate.</para>
4332 <para>The change in functionality is that the on-target
4333 runtime package management from remote package feeds is
4334 now done with a different tool that has a
4335 different set of command-line options.
4336 If you have scripts that call the
4337 tool directly, or use its API, they need to be fixed.</para>
4338 <para>For more information, see the
4339 <ulink url='http://dnf.readthedocs.io/en/latest/'>DNF Documentation</ulink>.
4340 </para></listitem>
4341 <listitem><para>
4342 Rpm 5.x is replaced with Rpm 4.x.
4343 This is done for two major reasons:
4344 <itemizedlist>
4345 <listitem><para>
4346 DNF is API-incompatible with Rpm 5.x and porting
4347 it and maintaining the port is non-trivial.
4348 </para></listitem>
4349 <listitem><para>
4350 Rpm 5.x itself has limited maintenance upstream,
4351 and the Yocto Project is one of the very few
4352 remaining users.
4353 </para></listitem>
4354 </itemizedlist>
4355 </para></listitem>
4356 <listitem><para>
4357 Berkeley DB 6.x is removed and Berkeley DB 5.x becomes
4358 the default:
4359 <itemizedlist>
4360 <listitem><para>
4361 Version 6.x of Berkeley DB has largely been
4362 rejected by the open source community due to its
4363 AGPLv3 license.
4364 As a result, most mainstream open source projects
4365 that require DB are still developed and tested with
4366 DB 5.x.
4367 </para></listitem>
4368 <listitem><para>
4369 In OE-core, the only thing that was requiring
4370 DB 6.x was Rpm 5.x.
4371 Thus, no reason exists to continue carrying DB 6.x
4372 in OE-core.
4373 </para></listitem>
4374 </itemizedlist>
4375 </para></listitem>
4376 <listitem><para>
4377 <filename>createrepo</filename> is replaced with
4378 <filename>createrepo_c</filename>.</para>
4379 <para><filename>createrepo_c</filename> is the current
4380 incarnation of the tool that generates remote repository
4381 metadata.
4382 It is written in C as compared to
4383 <filename>createrepo</filename>, which is written in
4384 Python.
4385 <filename>createrepo_c</filename> is faster and is
4386 maintained.
4387 </para></listitem>
4388 <listitem><para>
4389 Architecture-independent RPM packages are "noarch"
4390 instead of "all".</para>
4391 <para>This change was made because too many places in
4392 DNF/RPM4 stack already make that assumption.
4393 Only the filenames and the architecture tag has changed.
4394 Nothing else has changed in OE-core system, particularly
4395 in the
4396 <link linkend='ref-classes-allarch'><filename>allarch.bbclass</filename></link>
4397 class.
4398 </para></listitem>
4399 <listitem><para>
4400 Signing of remote package feeds using
4401 <filename>PACKAGE_FEED_SIGN</filename>
4402 is not currently supported.
4403 This issue will be fully addressed in a future
4404 Yocto Project release.
4405 See <ulink url='https://bugzilla.yoctoproject.org/show_bug.cgi?id=11209'>defect 11209</ulink>
4406 for more information on a solution to package feed
4407 signing with RPM in the Yocto Project 2.3 release.
4408 </para></listitem>
4409 <listitem><para>
4410 OPKG now uses the libsolv backend for resolving package
4411 dependencies by default.
4412 This is vastly superior to OPKG's internal ad-hoc solver
4413 that was previously used.
4414 This change does have a small impact on disk (around
4415 500 KB) and memory footprint.
4416 <note>
4417 For further details on this change, see the
4418 <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?
4419id=f4d4f99cfbc2396e49c1613a7d237b9e57f06f81'>commit message</ulink>.
4420 </note>
4421 </para></listitem>
4422 </itemizedlist>
4423 </para>
4424 </section>
4425
4426 <section id='migration-2.3-removed-recipes'>
4427 <title>Removed Recipes</title>
4428
4429 <para>
4430 The following recipes have been removed:
4431 <itemizedlist>
4432 <listitem><para>
4433 <emphasis><filename>linux-yocto 4.8:</filename></emphasis>
4434 Version 4.8 has been removed.
4435 Versions 4.1 (LTSI), 4.4 (LTS), 4.9 (LTS/LTSI) and 4.10
4436 are now present.
4437 </para></listitem>
4438 <listitem><para>
4439 <emphasis><filename>python-smartpm:</filename></emphasis>
4440 Functionally replaced by <filename>dnf</filename>.
4441 </para></listitem>
4442 <listitem><para>
4443 <emphasis><filename>createrepo:</filename></emphasis>
4444 Replaced by the <filename>createrepo-c</filename> recipe.
4445 </para></listitem>
4446 <listitem><para>
4447 <emphasis><filename>rpmresolve:</filename></emphasis>
4448 No longer needed with the move to RPM 4 as RPM itself is
4449 used instead.
4450 </para></listitem>
4451 <listitem><para>
4452 <emphasis><filename>gstreamer:</filename></emphasis>
4453 Removed the GStreamer Git version recipes as they have
4454 been stale.
4455 <filename>1.10.</filename><replaceable>x</replaceable>
4456 recipes are still present.
4457 </para></listitem>
4458 <listitem><para>
4459 <emphasis><filename>alsa-conf-base:</filename></emphasis>
4460 Merged into <filename>alsa-conf</filename> since
4461 <filename>libasound</filename> depended on both.
4462 Essentially, no way existed to install only one of these.
4463 </para></listitem>
4464 <listitem><para>
4465 <emphasis><filename>tremor:</filename></emphasis>
4466 Moved to <filename>meta-multimedia</filename>.
4467 Fixed-integer Vorbis decoding is not
4468 needed by current hardware.
4469 Thus, GStreamer's ivorbis plugin has been disabled
4470 by default eliminating the need for the
4471 <filename>tremor</filename> recipe in
4472 <link linkend='oe-core'>OE-Core</link>.
4473 </para></listitem>
4474 <listitem><para>
4475 <emphasis><filename>gummiboot:</filename></emphasis>
4476 Replaced by <filename>systemd-boot</filename>.
4477 </para></listitem>
4478 </itemizedlist>
4479 </para>
4480 </section>
4481
4482 <section id='migration-2.3-wic-changes'>
4483 <title>Wic Changes</title>
4484
4485 <para>
4486 The following changes have been made to Wic:
4487 <note>
4488 For more information on Wic, see the
4489 "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-partitioned-images-using-wic'>Creating Partitioned Images Using Wic</ulink>"
4490 section in the Yocto Project Development Tasks Manual.
4491 </note>
4492 <itemizedlist>
4493 <listitem><para>
4494 <emphasis>Default Output Directory Changed:</emphasis>
4495 Wic's default output directory is now the current directory
4496 by default instead of the unusual
4497 <filename>/var/tmp/wic</filename>.</para>
4498
4499 <para>The "-o" and "--outdir" options remain unchanged
4500 and are used to specify your preferred output directory
4501 if you do not want to use the default directory.
4502 </para></listitem>
4503 <listitem><para>
4504 <emphasis>fsimage Plug-in Removed:</emphasis>
4505 The Wic fsimage plugin has been removed as it duplicates
4506 functionality of the rawcopy plugin.
4507 </para></listitem>
4508 </itemizedlist>
4509 </para>
4510 </section>
4511
4512 <section id='migration-2.3-qa-changes'>
4513 <title>QA Changes</title>
4514
4515 <para>
4516 The following QA checks have changed:
4517 <itemizedlist>
4518 <listitem><para>
4519 <emphasis><filename>unsafe-references-in-binaries</filename>:</emphasis>
4520 The <filename>unsafe-references-in-binaries</filename>
4521 QA check, which was disabled by default, has now been
4522 removed.
4523 This check was intended to detect binaries in
4524 <filename>/bin</filename> that link to libraries in
4525 <filename>/usr/lib</filename> and have the case where
4526 the user has <filename>/usr</filename> on a separate
4527 filesystem to <filename>/</filename>.</para>
4528
4529 <para>The removed QA check was buggy.
4530 Additionally, <filename>/usr</filename> residing on a
4531 separate partition from <filename>/</filename> is now
4532 a rare configuration.
4533 Consequently,
4534 <filename>unsafe-references-in-binaries</filename> was
4535 removed.
4536 </para></listitem>
4537 <listitem><para>
4538 <emphasis><filename>file-rdeps</filename>:</emphasis>
4539 The <filename>file-rdeps</filename> QA check is now an
4540 error by default instead of a warning.
4541 Because it is an error instead of a warning, you need to
4542 address missing runtime dependencies.</para>
4543
4544 <para>For additional information, see the
4545 <link linkend='ref-classes-insane'><filename>insane</filename></link>
4546 class and the
4547 "<link linkend='qa-errors-and-warnings'>Errors and Warnings</link>"
4548 section.
4549 </para></listitem>
4550 </itemizedlist>
4551 </para>
4552 </section>
4553
4554 <section id='migration-2.3-miscellaneous-changes'>
4555 <title>Miscellaneous Changes</title>
4556
4557 <para>
4558 The following miscellaneous changes have occurred:
4559 <itemizedlist>
4560 <listitem><para>
4561 In this release, a number of recipes have been changed to
4562 ignore the <filename>largefile</filename>
4563 <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>
4564 item, enabling large file support unconditionally.
4565 This feature has always been enabled by default.
4566 Disabling the feature has not been widely tested.
4567 <note>
4568 Future releases of the Yocto Project will remove
4569 entirely the ability to disable the
4570 <filename>largefile</filename> feature,
4571 which would make it unconditionally enabled everywhere.
4572 </note>
4573 </para></listitem>
4574 <listitem><para>
4575 If the
4576 <link linkend='var-DISTRO_VERSION'><filename>DISTRO_VERSION</filename></link>
4577 value contains the value of the
4578 <link linkend='var-DATE'><filename>DATE</filename></link>
4579 variable, which is the default between Poky releases,
4580 the <filename>DATE</filename> value is explicitly excluded
4581 from <filename>/etc/issue</filename> and
4582 <filename>/etc/issue.net</filename>, which is displayed at
4583 the login prompt, in order to avoid conflicts with
4584 Multilib enabled.
4585 Regardless, the <filename>DATE</filename> value is
4586 inaccurate if the <filename>base-files</filename>
4587 recipe is restored from shared state (sstate) rather
4588 than rebuilt.</para>
4589
4590 <para>If you need the build date recorded in
4591 <filename>/etc/issue*</filename> or anywhere else in your
4592 image, a better method is to define a post-processing
4593 function to do it and have the function called from
4594 <link linkend='var-ROOTFS_POSTPROCESS_COMMAND'><filename>ROOTFS_POSTPROCESS_COMMAND</filename></link>.
4595 Doing so ensures the value is always up-to-date with the
4596 created image.
4597 </para></listitem>
4598 <listitem><para>
4599 Dropbear's <filename>init</filename> script now disables
4600 DSA host keys by default.
4601 This change is in line with the systemd service
4602 file, which supports RSA keys only, and with recent
4603 versions of OpenSSH, which deprecates DSA host keys.
4604 </para></listitem>
4605 <listitem><para>
4606 The
4607 <link linkend='ref-classes-buildhistory'><filename>buildhistory</filename></link>
4608 class now correctly uses tabs as separators between all
4609 columns in <filename>installed-package-sizes.txt</filename>
4610 in order to aid import into other tools.
4611 </para></listitem>
4612 <listitem><para>
4613 The <filename>USE_LDCONFIG</filename> variable has been
4614 replaced with the "ldconfig"
4615 <filename>DISTRO_FEATURES</filename> feature.
4616 Distributions that previously set:
4617 <literallayout class='monospaced'>
4618 USE_LDCONFIG = "0"
4619 </literallayout>
4620 should now instead use the following:
4621 <literallayout class='monospaced'>
4622 DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " ldconfig"
4623 </literallayout>
4624 </para></listitem>
4625 <listitem><para>
4626 The default value of
4627 <link linkend='var-COPYLEFT_LICENSE_INCLUDE'><filename>COPYLEFT_LICENSE_INCLUDE</filename></link>
4628 now includes all versions of AGPL licenses in addition
4629 to GPL and LGPL.
4630 <note>
4631 The default list is not intended to be guaranteed
4632 as a complete safe list.
4633 You should seek legal advice based on what you are
4634 distributing if you are unsure.
4635 </note>
4636 </para></listitem>
4637 <listitem><para>
4638 Kernel module packages are now suffixed with the kernel
4639 version in order to allow module packages from multiple
4640 kernel versions to co-exist on a target system.
4641 If you wish to return to the previous naming scheme
4642 that does not include the version suffix, use the
4643 following:
4644 <literallayout class='monospaced'>
4645 KERNEL_MODULE_PACKAGE_SUFFIX to ""
4646 </literallayout>
4647 </para></listitem>
4648 <listitem><para>
4649 Removal of <filename>libtool</filename>
4650 <filename>*.la</filename> files is now enabled by default.
4651 The <filename>*.la</filename> files are not actually
4652 needed on Linux and relocating them is an unnecessary
4653 burden.</para>
4654
4655 <para>If you need to preserve these
4656 <filename>.la</filename> files (e.g. in a custom
4657 distribution), you must change
4658 <link linkend='var-INHERIT_DISTRO'><filename>INHERIT_DISTRO</filename></link>
4659 such that "remove-libtool" is not included in the value.
4660 </para></listitem>
4661 <listitem><para>
4662 Extensible SDKs built for GCC 5+ now refuse to install on a
4663 distribution where the host GCC version is 4.8 or 4.9.
4664 This change resulted from the fact that the installation
4665 is known to fail due to the way the
4666 <filename>uninative</filename> shared state (sstate)
4667 package is built.
4668 See the
4669 <link linkend='ref-classes-uninative'><filename>uninative</filename></link>
4670 class for additional information.
4671 </para></listitem>
4672 <listitem><para>
4673 All native and nativesdk recipes now use a separate
4674 <filename>DISTRO_FEATURES</filename> value instead of
4675 sharing the value used by recipes for the target, in order
4676 to avoid unnecessary rebuilds.</para>
4677
4678 <para>The <filename>DISTRO_FEATURES</filename> for
4679 <filename>native</filename> recipes is
4680 <link linkend='var-DISTRO_FEATURES_NATIVE'><filename>DISTRO_FEATURES_NATIVE</filename></link>
4681 added to an intersection of
4682 <filename>DISTRO_FEATURES</filename> and
4683 <link linkend='var-DISTRO_FEATURES_FILTER_NATIVE'><filename>DISTRO_FEATURES_FILTER_NATIVE</filename></link>.
4684 </para>
4685
4686 <para>For nativesdk recipes, the
4687 corresponding variables are
4688 <link linkend='var-DISTRO_FEATURES_NATIVESDK'><filename>DISTRO_FEATURES_NATIVESDK</filename></link>
4689 and
4690 <link linkend='var-DISTRO_FEATURES_FILTER_NATIVESDK'><filename>DISTRO_FEATURES_FILTER_NATIVESDK</filename></link>.
4691 </para></listitem>
4692 <listitem><para>
4693 The <filename>FILESDIR</filename>
4694 variable, which was previously deprecated and rarely used,
4695 has now been removed.
4696 You should change any recipes that set
4697 <filename>FILESDIR</filename> to set
4698 <link linkend='var-FILESPATH'><filename>FILESPATH</filename></link>
4699 instead.
4700 </para></listitem>
4701 <listitem><para>
4702 The <filename>MULTIMACH_HOST_SYS</filename>
4703 variable has been removed as it is no longer needed
4704 with recipe-specific sysroots.
4705 </para></listitem>
4706 </itemizedlist>
4707 </para>
4708 </section>
4709</section>
4710
4711<section id='moving-to-the-yocto-project-2.4-release'>
4712 <title>Moving to the Yocto Project 2.4 Release</title>
4713
4714 <para>
4715 This section provides migration information for moving to the
4716 Yocto Project 2.4 Release from the prior release.
4717 </para>
4718
4719 <section id='migration-2.4-memory-resident-mode'>
4720 <title>Memory Resident Mode</title>
4721
4722 <para>
4723 A persistent mode is now available in BitBake's default operation,
4724 replacing its previous "memory resident mode" (i.e.
4725 <filename>oe-init-build-env-memres</filename>).
4726 Now you only need to set
4727 <link linkend='var-BB_SERVER_TIMEOUT'><filename>BB_SERVER_TIMEOUT</filename></link>
4728 to a timeout (in seconds) and BitBake's server stays resident for
4729 that amount of time between invocations.
4730 The <filename>oe-init-build-env-memres</filename> script has been
4731 removed since a separate environment setup script is no longer
4732 needed.
4733 </para>
4734 </section>
4735
4736 <section id='migration-2.4-packaging-changes'>
4737 <title>Packaging Changes</title>
4738
4739 <para>
4740 This section provides information about packaging changes that have
4741 occurred:
4742 <itemizedlist>
4743 <listitem><para>
4744 <emphasis><filename>python3</filename> Changes:</emphasis>
4745 <itemizedlist>
4746 <listitem><para>
4747 The main "python3" package now brings in all of the
4748 standard Python 3 distribution rather than a subset.
4749 This behavior matches what is expected based on
4750 traditional Linux distributions.
4751 If you wish to install a subset of Python 3, specify
4752 <filename>python-core</filename> plus one or more of
4753 the individual packages that are still produced.
4754 </para></listitem>
4755 <listitem><para>
4756 <emphasis><filename>python3</filename>:</emphasis>
4757 The <filename>bz2.py</filename>,
4758 <filename>lzma.py</filename>, and
4759 <filename>_compression.py</filename> scripts have
4760 been moved from the
4761 <filename>python3-misc</filename> package to
4762 the <filename>python3-compression</filename> package.
4763 </para></listitem>
4764 </itemizedlist>
4765 </para></listitem>
4766 <listitem><para>
4767 <emphasis><filename>binutils</filename>:</emphasis>
4768 The <filename>libbfd</filename> library is now packaged in
4769 a separate "libbfd" package.
4770 This packaging saves space when certain tools
4771 (e.g. <filename>perf</filename>) are installed.
4772 In such cases, the tools only need
4773 <filename>libbfd</filename> rather than all the packages in
4774 <filename>binutils</filename>.
4775 </para></listitem>
4776 <listitem><para>
4777 <emphasis><filename>util-linux</filename> Changes:</emphasis>
4778 <itemizedlist>
4779 <listitem><para>
4780 The <filename>su</filename> program is now packaged
4781 in a separate "util-linux-su" package, which is only
4782 built when "pam" is listed in the
4783 <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>
4784 variable.
4785 <filename>util-linux</filename> should not be
4786 installed unless it is needed because
4787 <filename>su</filename> is normally provided through
4788 the shadow file format.
4789 The main <filename>util-linux</filename> package has
4790 runtime dependencies (i.e.
4791 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>)
4792 on the <filename>util-linux-su</filename> package
4793 when "pam" is in
4794 <filename>DISTRO_FEATURES</filename>.
4795 </para></listitem>
4796 <listitem><para>
4797 The <filename>switch_root</filename> program is now
4798 packaged in a separate "util-linux-switch-root"
4799 package for small initramfs images that do not need
4800 the whole <filename>util-linux</filename> package or
4801 the busybox binary, which are both much larger than
4802 <filename>switch_root</filename>.
4803 The main <filename>util-linux</filename> package has
4804 a recommended runtime dependency (i.e.
4805 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>)
4806 on the <filename>util-linux-switch-root</filename> package.
4807 </para></listitem>
4808 <listitem><para>
4809 The <filename>ionice</filename> program is now
4810 packaged in a separate "util-linux-ionice" package.
4811 The main <filename>util-linux</filename> package has
4812 a recommended runtime dependency (i.e.
4813 <filename>RRECOMMENDS</filename>)
4814 on the <filename>util-linux-ionice</filename> package.
4815 </para></listitem>
4816 </itemizedlist>
4817 </para></listitem>
4818 <listitem><para>
4819 <emphasis><filename>initscripts</filename>:</emphasis>
4820 The <filename>sushell</filename> program is now packaged in
4821 a separate "initscripts-sushell" package.
4822 This packaging change allows systems to pull
4823 <filename>sushell</filename> in when
4824 <filename>selinux</filename> is enabled.
4825 The change also eliminates needing to pull in the entire
4826 <filename>initscripts</filename> package.
4827 The main <filename>initscripts</filename> package has a
4828 runtime dependency (i.e. <filename>RDEPENDS</filename>)
4829 on the <filename>sushell</filename> package when
4830 "selinux" is in <filename>DISTRO_FEATURES</filename>.
4831 </para></listitem>
4832 <listitem><para>
4833 <emphasis><filename>glib-2.0</filename>:</emphasis>
4834 The <filename>glib-2.0</filename> package now has a
4835 recommended runtime dependency (i.e.
4836 <filename>RRECOMMENDS</filename>) on the
4837 <filename>shared-mime-info</filename> package, since large
4838 portions of GIO are not useful without the MIME database.
4839 You can remove the dependency by using the
4840 <link linkend='var-BAD_RECOMMENDATIONS'><filename>BAD_RECOMMENDATIONS</filename></link>
4841 variable if <filename>shared-mime-info</filename> is too
4842 large and is not required.
4843 </para></listitem>
4844 <listitem><para>
4845 <emphasis>Go Standard Runtime:</emphasis>
4846 The Go standard runtime has been split out from the main
4847 <filename>go</filename> recipe into a separate
4848 <filename>go-runtime</filename> recipe.
4849 </para></listitem>
4850 </itemizedlist>
4851 </para>
4852 </section>
4853
4854 <section id='migration-2.4-removed-recipes'>
4855 <title>Removed Recipes</title>
4856
4857 <para>
4858 The following recipes have been removed:
4859 <itemizedlist>
4860 <listitem><para>
4861 <emphasis><filename>acpitests</filename>:</emphasis>
4862 This recipe is not maintained.
4863 </para></listitem>
4864 <listitem><para>
4865 <emphasis><filename>autogen-native</filename>:</emphasis>
4866 No longer required by Grub, oe-core, or meta-oe.
4867 </para></listitem>
4868 <listitem><para>
4869 <emphasis><filename>bdwgc</filename>:</emphasis>
4870 Nothing in OpenEmbedded-Core requires this recipe.
4871 It has moved to meta-oe.
4872 </para></listitem>
4873 <listitem><para>
4874 <emphasis><filename>byacc</filename>:</emphasis>
4875 This recipe was only needed by rpm 5.x and has moved to
4876 meta-oe.
4877 </para></listitem>
4878 <listitem><para>
4879 <emphasis><filename>gcc (5.4)</filename>:</emphasis>
4880 The 5.4 series dropped the recipe in favor of 6.3 / 7.2.
4881 </para></listitem>
4882 <listitem><para>
4883 <emphasis><filename>gnome-common</filename>:</emphasis>
4884 Deprecated upstream and no longer needed.
4885 </para></listitem>
4886 <listitem><para>
4887 <emphasis><filename>go-bootstrap-native</filename>:</emphasis>
4888 Go 1.9 does its own bootstrapping so this recipe has been
4889 removed.
4890 </para></listitem>
4891 <listitem><para>
4892 <emphasis><filename>guile</filename>:</emphasis>
4893 This recipe was only needed by
4894 <filename>autogen-native</filename> and
4895 <filename>remake</filename>.
4896 The recipe is no longer needed by either of these programs.
4897 </para></listitem>
4898 <listitem><para>
4899 <emphasis><filename>libclass-isa-perl</filename>:</emphasis>
4900 This recipe was previously needed for LSB 4, no longer
4901 needed.
4902 </para></listitem>
4903 <listitem><para>
4904 <emphasis><filename>libdumpvalue-perl</filename>:</emphasis>
4905 This recipe was previously needed for LSB 4, no longer
4906 needed.
4907 </para></listitem>
4908 <listitem><para>
4909 <emphasis><filename>libenv-perl</filename>:</emphasis>
4910 This recipe was previously needed for LSB 4, no longer
4911 needed.
4912 </para></listitem>
4913 <listitem><para>
4914 <emphasis><filename>libfile-checktree-perl</filename>:</emphasis>
4915 This recipe was previously needed for LSB 4, no longer
4916 needed.
4917 </para></listitem>
4918 <listitem><para>
4919 <emphasis><filename>libi18n-collate-perl</filename>:</emphasis>
4920 This recipe was previously needed for LSB 4, no longer
4921 needed.
4922 </para></listitem>
4923 <listitem><para>
4924 <emphasis><filename>libiconv</filename>:</emphasis>
4925 This recipe was only needed for <filename>uclibc</filename>,
4926 which was removed in the previous release.
4927 <filename>glibc</filename> and <filename>musl</filename>
4928 have their own implementations.
4929 <filename>meta-mingw</filename> still needs
4930 <filename>libiconv</filename>, so it has
4931 been moved to <filename>meta-mingw</filename>.
4932 </para></listitem>
4933 <listitem><para>
4934 <emphasis><filename>libpng12</filename>:</emphasis>
4935 This recipe was previously needed for LSB. The current
4936 <filename>libpng</filename> is 1.6.x.
4937 </para></listitem>
4938 <listitem><para>
4939 <emphasis><filename>libpod-plainer-perl</filename>:</emphasis>
4940 This recipe was previously needed for LSB 4, no longer
4941 needed.
4942 </para></listitem>
4943 <listitem><para>
4944 <emphasis><filename>linux-yocto (4.1)</filename>:</emphasis>
4945 This recipe was removed in favor of 4.4, 4.9, 4.10 and 4.12.
4946 </para></listitem>
4947 <listitem><para>
4948 <emphasis><filename>mailx</filename>:</emphasis>
4949 This recipe was previously only needed for LSB
4950 compatibility, and upstream is defunct.
4951 </para></listitem>
4952 <listitem><para>
4953 <emphasis><filename>mesa (git version only)</filename>:</emphasis>
4954 The git version recipe was stale with respect to the release
4955 version.
4956 </para></listitem>
4957 <listitem><para>
4958 <emphasis><filename>ofono (git version only)</filename>:</emphasis>
4959 The git version recipe was stale with respect to the release
4960 version.
4961 </para></listitem>
4962 <listitem><para>
4963 <emphasis><filename>portmap</filename>:</emphasis>
4964 This recipe is obsolete and is superseded by
4965 <filename>rpcbind</filename>.
4966 </para></listitem>
4967 <listitem><para>
4968 <emphasis><filename>python3-pygpgme</filename>:</emphasis>
4969 This recipe is old and unmaintained. It was previously
4970 required by <filename>dnf</filename>, which has switched
4971 to official <filename>gpgme</filename> Python bindings.
4972 </para></listitem>
4973 <listitem><para>
4974 <emphasis><filename>python-async</filename>:</emphasis>
4975 This recipe has been removed in favor of the Python 3
4976 version.
4977 </para></listitem>
4978 <listitem><para>
4979 <emphasis><filename>python-gitdb</filename>:</emphasis>
4980 This recipe has been removed in favor of the Python 3
4981 version.
4982 </para></listitem>
4983 <listitem><para>
4984 <emphasis><filename>python-git</filename>:</emphasis>
4985 This recipe was removed in favor of the Python 3
4986 version.
4987 </para></listitem>
4988 <listitem><para>
4989 <emphasis><filename>python-mako</filename>:</emphasis>
4990 This recipe was removed in favor of the Python 3
4991 version.
4992 </para></listitem>
4993 <listitem><para>
4994 <emphasis><filename>python-pexpect</filename>:</emphasis>
4995 This recipe was removed in favor of the Python 3 version.
4996 </para></listitem>
4997 <listitem><para>
4998 <emphasis><filename>python-ptyprocess</filename>:</emphasis>
4999 This recipe was removed in favor of Python the 3 version.
5000 </para></listitem>
5001 <listitem><para>
5002 <emphasis><filename>python-pycurl</filename>:</emphasis>
5003 Nothing is using this recipe in OpenEmbedded-Core
5004 (i.e. <filename>meta-oe</filename>).
5005 </para></listitem>
5006 <listitem><para>
5007 <emphasis><filename>python-six</filename>:</emphasis>
5008 This recipe was removed in favor of the Python 3 version.
5009 </para></listitem>
5010 <listitem><para>
5011 <emphasis><filename>python-smmap</filename>:</emphasis>
5012 This recipe was removed in favor of the Python 3 version.
5013 </para></listitem>
5014 <listitem><para>
5015 <emphasis><filename>remake</filename>:</emphasis>
5016 Using <filename>remake</filename> as the provider of
5017 <filename>virtual/make</filename> is broken.
5018 Consequently, this recipe is not needed in OpenEmbedded-Core.
5019 </para></listitem>
5020 </itemizedlist>
5021 </para>
5022 </section>
5023
5024 <section id='migration-2.4-kernel-device-tree-move'>
5025 <title>Kernel Device Tree Move</title>
5026
5027 <para>
5028 Kernel Device Tree support is now easier to enable in a kernel
5029 recipe.
5030 The Device Tree code has moved to a
5031 <link linkend='ref-classes-kernel-devicetree'><filename>kernel-devicetree</filename></link>
5032 class.
5033 Functionality is automatically enabled for any recipe that inherits
5034 the
5035 <link linkend='ref-classes-kernel'><filename>kernel</filename></link>
5036 class and sets the
5037 <link linkend='var-KERNEL_DEVICETREE'><filename>KERNEL_DEVICETREE</filename></link>
5038 variable.
5039 The previous mechanism for doing this,
5040 <filename>meta/recipes-kernel/linux/linux-dtb.inc</filename>,
5041 is still available to avoid breakage, but triggers a
5042 deprecation warning.
5043 Future releases of the Yocto Project will remove
5044 <filename>meta/recipes-kernel/linux/linux-dtb.inc</filename>.
5045 It is advisable to remove any <filename>require</filename>
5046 statements that request
5047 <filename>meta/recipes-kernel/linux/linux-dtb.inc</filename>
5048 from any custom kernel recipes you might have.
5049 This will avoid breakage in post 2.4 releases.
5050 </para>
5051 </section>
5052
5053 <section id='migration-2.4-package-qa-changes'>
5054 <title>Package QA Changes</title>
5055
5056 <para>
5057 The following package QA changes took place:
5058 <itemizedlist>
5059 <listitem><para>
5060 The "unsafe-references-in-scripts" QA check has been
5061 removed.
5062 </para></listitem>
5063 <listitem><para>
5064 If you refer to <filename>${COREBASE}/LICENSE</filename>
5065 within
5066 <link linkend='var-LIC_FILES_CHKSUM'><filename>LIC_FILES_CHKSUM</filename></link>
5067 you receive a warning because this file is a description of
5068 the license for OE-Core.
5069 Use <filename>${COMMON_LICENSE_DIR}/MIT</filename>
5070 if your recipe is MIT-licensed and you cannot use the
5071 preferred method of referring to a file within the source
5072 tree.
5073 </para></listitem>
5074 </itemizedlist>
5075 </para>
5076 </section>
5077
5078 <section id='migration-2.4-readme-changes'>
5079 <title><filename>README</filename> File Changes</title>
5080
5081 <para>
5082 The following are changes to <filename>README</filename> files:
5083 <itemizedlist>
5084 <listitem><para>
5085 The main Poky <filename>README</filename> file has been
5086 moved to the <filename>meta-poky</filename> layer and
5087 has been renamed <filename>README.poky</filename>.
5088 A symlink has been created so that references to the old
5089 location work.
5090 </para></listitem>
5091 <listitem><para>
5092 The <filename>README.hardware</filename> file has been moved
5093 to <filename>meta-yocto-bsp</filename>.
5094 A symlink has been created so that references to the old
5095 location work.
5096 </para></listitem>
5097 <listitem><para>
5098 A <filename>README.qemu</filename> file has been created
5099 with coverage of the <filename>qemu*</filename> machines.
5100 </para></listitem>
5101 </itemizedlist>
5102 </para>
5103 </section>
5104
5105 <section id='migration-2.4-miscellaneous-changes'>
5106 <title>Miscellaneous Changes</title>
5107
5108 <para>
5109 The following are additional changes:
5110 <itemizedlist>
5111 <listitem><para>
5112 The <filename>ROOTFS_PKGMANAGE_BOOTSTRAP</filename>
5113 variable and any references to it have been removed.
5114 You should remove this variable from any custom recipes.
5115 </para></listitem>
5116 <listitem><para>
5117 The <filename>meta-yocto</filename> directory has been
5118 removed.
5119 <note>
5120 In the Yocto Project 2.1 release
5121 <filename>meta-yocto</filename> was renamed to
5122 <filename>meta-poky</filename> and the
5123 <filename>meta-yocto</filename> subdirectory remained
5124 to avoid breaking existing configurations.
5125 </note>
5126 </para></listitem>
5127 <listitem><para>
5128 The <filename>maintainers.inc</filename> file, which tracks
5129 maintainers by listing a primary person responsible for each
5130 recipe in OE-Core, has been moved from
5131 <filename>meta-poky</filename> to OE-Core (i.e. from
5132 <filename>meta-poky/conf/distro/include</filename> to
5133 <filename>meta/conf/distro/include</filename>).
5134 </para></listitem>
5135 <listitem><para>
5136 The
5137 <link linkend='ref-classes-buildhistory'><filename>buildhistory</filename></link>
5138 class now makes a single commit per build rather than one
5139 commit per subdirectory in the repository.
5140 This behavior assumes the commits are enabled with
5141 <link linkend='var-BUILDHISTORY_COMMIT'><filename>BUILDHISTORY_COMMIT</filename></link>
5142 = "1", which is typical.
5143 Previously, the <filename>buildhistory</filename> class made
5144 one commit per subdirectory in the repository in order to
5145 make it easier to see the changes for a particular
5146 subdirectory.
5147 To view a particular change, specify that subdirectory as
5148 the last parameter on the <filename>git show</filename>
5149 or <filename>git diff</filename> commands.
5150 </para></listitem>
5151 <listitem><para>
5152 The <filename>x86-base.inc</filename> file, which is
5153 included by all x86-based machine configurations, now sets
5154 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
5155 using <filename>?=</filename> to "live" rather than
5156 appending with <filename>+=</filename>.
5157 This change makes the default easier to override.
5158 </para></listitem>
5159 <listitem><para>
5160 BitBake fires multiple "BuildStarted" events when
5161 multiconfig is enabled (one per configuration).
5162 For more information, see the
5163 "<ulink url='&YOCTO_DOCS_BB_URL;#events'>Events</ulink>"
5164 section in the BitBake User Manual.
5165 </para></listitem>
5166 <listitem><para>
5167 By default, the <filename>security_flags.inc</filename> file
5168 sets a
5169 <link linkend='var-GCCPIE'><filename>GCCPIE</filename></link>
5170 variable with an option to enable Position Independent
5171 Executables (PIE) within <filename>gcc</filename>.
5172 Enabling PIE in the GNU C Compiler (GCC), makes Return
5173 Oriented Programming (ROP) attacks much more difficult to
5174 execute.
5175 </para></listitem>
5176 <listitem><para>
5177 OE-Core now provides a
5178 <filename>bitbake-layers</filename> plugin that implements
5179 a "create-layer" subcommand.
5180 The implementation of this subcommand has resulted in the
5181 <filename>yocto-layer</filename> script being deprecated and
5182 will likely be removed in the next Yocto Project release.
5183 </para></listitem>
5184 <listitem><para>
5185 The <filename>vmdk</filename>, <filename>vdi</filename>,
5186 and <filename>qcow2</filename> image file types are now
5187 used in conjunction with the "wic" image type through
5188 <filename>CONVERSION_CMD</filename>.
5189 Consequently, the equivalent image types are now
5190 <filename>wic.vmdk</filename>, <filename>wic.vdi</filename>,
5191 and <filename>wic.qcow2</filename>, respectively.
5192 </para></listitem>
5193 <listitem><para>
5194 <filename>do_image_&lt;type&gt;[depends]</filename> has
5195 replaced <filename>IMAGE_DEPENDS_&lt;type&gt;</filename>.
5196 If you have your own classes that implement custom image
5197 types, then you need to update them.
5198 </para></listitem>
5199 <listitem><para>
5200 OpenSSL 1.1 has been introduced.
5201 However, the default is still 1.0.x through the
5202 <link linkend='var-PREFERRED_VERSION'><filename>PREFERRED_VERSION</filename></link>
5203 variable.
5204 This preference is set is due to the remaining compatibility
5205 issues with other software.
5206 The
5207 <link linkend='var-PROVIDES'><filename>PROVIDES</filename></link>
5208 variable in the openssl 1.0 recipe now includes "openssl10"
5209 as a marker that can be used in
5210 <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>
5211 within recipes that build software that still depend on
5212 OpenSSL 1.0.
5213 </para></listitem>
5214 <listitem><para>
5215 To ensure consistent behavior, BitBake's "-r" and "-R"
5216 options (i.e. prefile and postfile), which are used to
5217 read or post-read additional configuration files from the
5218 command line, now only affect the current BitBake command.
5219 Before these BitBake changes, these options would "stick"
5220 for future executions.
5221 </para></listitem>
5222 </itemizedlist>
5223 </para>
5224 </section>
5225</section>
5226
5227<section id='moving-to-the-yocto-project-2.5-release'>
5228 <title>Moving to the Yocto Project 2.5 Release</title>
5229
5230 <para>
5231 This section provides migration information for moving to the
5232 Yocto Project 2.5 Release from the prior release.
5233 </para>
5234
5235 <section id='migration-2.5-packaging-changes'>
5236 <title>Packaging Changes</title>
5237
5238 <para>
5239 This section provides information about packaging changes that have
5240 occurred:
5241 <itemizedlist>
5242 <listitem><para>
5243 <emphasis><filename>bind-libs</filename>:</emphasis>
5244 The libraries packaged by the bind recipe are in a
5245 separate <filename>bind-libs</filename> package.
5246 </para></listitem>
5247 <listitem><para>
5248 <emphasis><filename>libfm-gtk</filename>:</emphasis>
5249 The <filename>libfm</filename> GTK+ bindings are split into
5250 a separate <filename>libfm-gtk</filename> package.
5251 </para></listitem>
5252 <listitem><para>
5253 <emphasis><filename>flex-libfl</filename>:</emphasis>
5254 The flex recipe splits out libfl into a separate
5255 <filename>flex-libfl</filename> package to avoid too many
5256 dependencies being pulled in where only the library is
5257 needed.
5258 </para></listitem>
5259 <listitem><para>
5260 <emphasis><filename>grub-efi</filename>:</emphasis>
5261 The <filename>grub-efi</filename> configuration is split
5262 into a separate <filename>grub-bootconf</filename>
5263 recipe.
5264 However, the dependency relationship from
5265 <filename>grub-efi</filename> is through a
5266 virtual/grub-bootconf provider making it possible to have
5267 your own recipe provide the dependency.
5268 Alternatively, you can use a BitBake append file to bring
5269 the configuration back into the
5270 <filename>grub-efi</filename> recipe.
5271 </para></listitem>
5272 <listitem><para>
5273 <emphasis>armv7a Legacy Package Feed Support:</emphasis>
5274 Legacy support is removed for transitioning from
5275 <filename>armv7a</filename> to
5276 <filename>armv7a-vfp-neon</filename> in package feeds,
5277 which was previously enabled by setting
5278 <filename>PKGARCHCOMPAT_ARMV7A</filename>.
5279 This transition occurred in 2011 and active package feeds
5280 should by now be updated to the new naming.
5281 </para></listitem>
5282 </itemizedlist>
5283 </para>
5284 </section>
5285
5286 <section id='migration-2.5-removed-recipes'>
5287 <title>Removed Recipes</title>
5288
5289 <para>
5290 The following recipes have been removed:
5291 <itemizedlist>
5292 <listitem><para>
5293 <emphasis><filename>gcc</filename>:</emphasis>
5294 The version 6.4 recipes are replaced by 7.x.
5295 </para></listitem>
5296 <listitem><para>
5297 <emphasis><filename>gst-player</filename>:</emphasis>
5298 Renamed to <filename>gst-examples</filename> as per
5299 upstream.
5300 </para></listitem>
5301 <listitem><para>
5302 <emphasis><filename>hostap-utils</filename>:</emphasis>
5303 This software package is obsolete.
5304 </para></listitem>
5305 <listitem><para>
5306 <emphasis><filename>latencytop</filename>:</emphasis>
5307 This recipe is no longer maintained upstream.
5308 The last release was in 2009.
5309 </para></listitem>
5310 <listitem><para>
5311 <emphasis><filename>libpfm4</filename>:</emphasis>
5312 The only file that requires this recipe is
5313 <filename>oprofile</filename>, which has been removed.
5314 </para></listitem>
5315 <listitem><para>
5316 <emphasis><filename>linux-yocto</filename>:</emphasis>
5317 The version 4.4, 4.9, and 4.10 recipes have been removed.
5318 Versions 4.12, 4.14, and 4.15 remain.
5319 </para></listitem>
5320 <listitem><para>
5321 <emphasis><filename>man</filename>:</emphasis>
5322 This recipe has been replaced by modern
5323 <filename>man-db</filename>
5324 </para></listitem>
5325 <listitem><para>
5326 <emphasis><filename>mkelfimage</filename>:</emphasis>
5327 This tool has been removed in the upstream coreboot project,
5328 and is no longer needed with the removal of the ELF image
5329 type.
5330 </para></listitem>
5331 <listitem><para>
5332 <emphasis><filename>nativesdk-postinst-intercept</filename>:</emphasis>
5333 This recipe is not maintained.
5334 </para></listitem>
5335 <listitem><para>
5336 <emphasis><filename>neon</filename>:</emphasis>
5337 This software package is no longer maintained upstream and
5338 is no longer needed by anything in OpenEmbedded-Core.
5339 </para></listitem>
5340 <listitem><para>
5341 <emphasis><filename>oprofile</filename>:</emphasis>
5342 The functionality of this recipe is replaced by
5343 <filename>perf</filename> and keeping compatibility on
5344 an ongoing basis with <filename>musl</filename> is
5345 difficult.
5346 </para></listitem>
5347 <listitem><para>
5348 <emphasis><filename>pax</filename>:</emphasis>
5349 This software package is obsolete.
5350 </para></listitem>
5351 <listitem><para>
5352 <emphasis><filename>stat</filename>:</emphasis>
5353 This software package is not maintained upstream.
5354 <filename>coreutils</filename> provides a modern stat binary.
5355 </para></listitem>
5356 <listitem><para>
5357 <emphasis><filename>zisofs-tools-native</filename>:</emphasis>
5358 This recipe is no longer needed because the compressed
5359 ISO image feature has been removed.
5360 </para></listitem>
5361 </itemizedlist>
5362 </para>
5363 </section>
5364
5365 <section id='migration-2.5-scripts-and-tools-changes'>
5366 <title>Scripts and Tools Changes</title>
5367
5368 <para>
5369 The following are changes to scripts and tools:
5370 <itemizedlist>
5371 <listitem><para>
5372 <emphasis><filename>yocto-bsp</filename>,
5373 <filename>yocto-kernel</filename>, and
5374 <filename>yocto-layer</filename></emphasis>:
5375 The <filename>yocto-bsp</filename>,
5376 <filename>yocto-kernel</filename>, and
5377 <filename>yocto-layer</filename> scripts previously shipped
5378 with poky but not in OpenEmbedded-Core have been removed.
5379 These scripts are not maintained and are outdated.
5380 In many cases, they are also limited in scope.
5381 The <filename>bitbake-layers create-layer</filename> command
5382 is a direct replacement for <filename>yocto-layer</filename>.
5383 See the documentation to create a BSP or kernel recipe in
5384 the
5385 "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-kernel-recipe-example'>BSP Kernel Recipe Example</ulink>"
5386 section.
5387 </para></listitem>
5388 <listitem><para>
5389 <emphasis><filename>devtool finish</filename>:</emphasis>
5390 <filename>devtool finish</filename> now exits with an error
5391 if there are uncommitted changes or a rebase/am in progress
5392 in the recipe's source repository.
5393 If this error occurs, there might be uncommitted changes
5394 that will not be included in updates to the patches applied
5395 by the recipe.
5396 A -f/--force option is provided for situations that the
5397 uncommitted changes are inconsequential and you want to
5398 proceed regardless.
5399 </para></listitem>
5400 <listitem><para>
5401 <emphasis><filename>scripts/oe-setup-rpmrepo</filename> script:</emphasis>
5402 The functionality of
5403 <filename>scripts/oe-setup-rpmrepo</filename> is replaced by
5404 <filename>bitbake package-index</filename>.
5405 </para></listitem>
5406 <listitem><para>
5407 <emphasis><filename>scripts/test-dependencies.sh</filename> script:</emphasis>
5408 The script is largely made obsolete by the
5409 recipe-specific sysroots functionality introduced in the
5410 previous release.
5411 </para></listitem>
5412 </itemizedlist>
5413 </para>
5414 </section>
5415
5416 <section id='migration-2.5-bitbake-changes'>
5417 <title>BitBake Changes</title>
5418
5419 <para>
5420 The following are BitBake changes:
5421 <itemizedlist>
5422 <listitem><para>
5423 The <filename>--runall</filename> option has changed.
5424 There are two different behaviors people might want:
5425 <itemizedlist>
5426 <listitem><para>
5427 <emphasis>Behavior A:</emphasis>
5428 For a given target (or set of targets) look through
5429 the task graph and run task X only if it is present
5430 and will be built.
5431 </para></listitem>
5432 <listitem><para>
5433 <emphasis>Behavior B:</emphasis>
5434 For a given target (or set of targets) look through
5435 the task graph and run task X if any recipe in the
5436 taskgraph has such a target, even if it is not in
5437 the original task graph.
5438 </para></listitem>
5439 </itemizedlist>
5440 The <filename>--runall</filename> option now performs
5441 "Behavior B".
5442 Previously <filename>--runall</filename> behaved like
5443 "Behavior A".
5444 A <filename>--runonly</filename> option has been added to
5445 retain the ability to perform "Behavior A".
5446 </para></listitem>
5447 <listitem><para>
5448 Several explicit "run this task for all recipes in the
5449 dependency tree" tasks have been removed (e.g.
5450 <filename>fetchall</filename>,
5451 <filename>checkuriall</filename>, and the
5452 <filename>*all</filename> tasks provided by the
5453 <filename>distrodata</filename> and
5454 <filename>archiver</filename> classes).
5455 There is a BitBake option to complete this for any arbitrary
5456 task. For example:
5457 <literallayout class='monospaced'>
5458 bitbake &lt;target&gt; -c fetchall
5459 </literallayout>
5460 should now be replaced with:
5461 <literallayout class='monospaced'>
5462 bitbake &lt;target&gt; --runall=fetch
5463 </literallayout>
5464 </para></listitem>
5465 </itemizedlist>
5466 </para>
5467 </section>
5468
5469 <section id='migration-2.5-python-and-python3-changes'>
5470 <title>Python and Python 3 Changes</title>
5471
5472 <para>
5473 The following are auto-packaging changes to Python and Python 3:
5474 </para>
5475 <para>
5476 The script-managed <filename>python-*-manifest.inc</filename> files
5477 that were previously used to generate Python and Python 3
5478 packages have been replaced with a JSON-based file that is
5479 easier to read and maintain.
5480 A new task is available for maintainers of the Python recipes to
5481 update the JSON file when upgrading to new Python versions.
5482 You can now edit the file directly instead of having to edit a
5483 script and run it to update the file.
5484 </para>
5485 <para>
5486 One particular change to note is that the Python recipes no longer
5487 have build-time provides for their packages.
5488 This assumes <filename>python-foo</filename> is one of the packages
5489 provided by the Python recipe.
5490 You can no longer run <filename>bitbake python-foo</filename> or
5491 have a <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPENDS'><filename>DEPENDS</filename></ulink> on
5492 <filename>python-foo</filename>, but doing either of the following
5493 causes the package to work as expected:
5494 <literallayout class='monospaced'>
5495 IMAGE_INSTALL_append = " python-foo"
5496 </literallayout>
5497 or
5498 <literallayout class='monospaced'>
5499 RDEPENDS_${PN} = "python-foo"
5500 </literallayout>
5501 The earlier build-time provides behavior was a quirk of the way the
5502 Python manifest file was created.
5503 For more information on this change please see
5504 <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=8d94b9db221d1def42f091b991903faa2d1651ce'>this commit</ulink>.
5505 </para>
5506 </section>
5507
5508 <section id='migration-2.5-miscellaneous-changes'>
5509 <title>Miscellaneous Changes</title>
5510
5511 <para>
5512 The following are additional changes:
5513 <itemizedlist>
5514 <listitem><para>
5515 The <filename>kernel</filename> class supports building
5516 packages for multiple kernels.
5517 If your kernel recipe or <filename>.bbappend</filename> file
5518 mentions packaging at all, you should replace references to
5519 the kernel in package names with
5520 <filename>${KERNEL_PACKAGE_NAME}</filename>.
5521 For example, if you disable automatic installation of the
5522 kernel image using
5523 <filename>RDEPENDS_kernel-base = ""</filename> you can avoid
5524 warnings using
5525 <filename>RDEPENDS_${KERNEL_PACKAGE_NAME}-base = ""</filename>
5526 instead.
5527 </para></listitem>
5528 <listitem><para>
5529 The <filename>buildhistory</filename> class commits changes
5530 to the repository by default so you no longer need to set
5531 <filename>BUILDHISTORY_COMMIT = "1"</filename>.
5532 If you want to disable commits you need to set
5533 <filename>BUILDHISTORY_COMMIT = "0"</filename> in your
5534 configuration.
5535 </para></listitem>
5536 <listitem><para>
5537 The <filename>beaglebone</filename> reference machine has
5538 been renamed to <filename>beaglebone-yocto</filename>.
5539 The <filename>beaglebone-yocto</filename> BSP is a reference
5540 implementation using only mainline components available in
5541 OpenEmbedded-Core and <filename>meta-yocto-bsp</filename>,
5542 whereas Texas Instruments maintains a full-featured BSP in
5543 the <filename>meta-ti</filename> layer.
5544 This rename avoids the previous name clash that existed
5545 between the two BSPs.
5546 </para></listitem>
5547 <listitem><para>
5548 The <filename>update-alternatives</filename> class no longer
5549 works with SysV <filename>init</filename> scripts because
5550 this usage has been problematic.
5551 Also, the <filename>sysklogd</filename> recipe no longer
5552 uses <filename>update-alternatives</filename> because it is
5553 incompatible with other implementations.
5554 </para></listitem>
5555 <listitem><para>
5556 By default, the
5557 <link linkend='ref-classes-cmake'><filename>cmake</filename></link>
5558 class uses <filename>ninja</filename> instead of
5559 <filename>make</filename> for building.
5560 This improves build performance.
5561 If a recipe is broken with <filename>ninja</filename>, then
5562 the recipe can set
5563 <filename>OECMAKE_GENERATOR = "Unix Makefiles"</filename>
5564 to change back to <filename>make</filename>.
5565 </para></listitem>
5566 <listitem><para>
5567 The previously deprecated <filename>base_*</filename>
5568 functions have been removed in favor of their replacements
5569 in <filename>meta/lib/oe</filename> and
5570 <filename>bitbake/lib/bb</filename>.
5571 These are typically used from recipes and classes.
5572 Any references to the old functions must be updated.
5573 The following table shows the removed functions and their
5574 replacements:
5575
5576 <literallayout class='monospaced'>
5577 <emphasis>Removed</emphasis> <emphasis>Replacement</emphasis>
5578 ============================ ============================
5579 base_path_join() oe.path.join()
5580 base_path_relative() oe.path.relative()
5581 base_path_out() oe.path.format_display()
5582 base_read_file() oe.utils.read_file()
5583 base_ifelse() oe.utils.ifelse()
5584 base_conditional() oe.utils.conditional()
5585 base_less_or_equal() oe.utils.less_or_equal()
5586 base_version_less_or_equal() oe.utils.version_less_or_equal()
5587 base_contains() bb.utils.contains()
5588 base_both_contain() oe.utils.both_contain()
5589 base_prune_suffix() oe.utils.prune_suffix()
5590 oe_filter() oe.utils.str_filter()
5591 oe_filter_out() oe.utils.str_filter_out() (or use the _remove operator).
5592 </literallayout>
5593 </para></listitem>
5594 <listitem><para>
5595 Using <filename>exit 1</filename> to explicitly defer a
5596 postinstall script until first boot is now deprecated since
5597 it is not an obvious mechanism and can mask actual errors.
5598 If you want to explicitly defer a postinstall to first boot
5599 on the target rather than at <filename>rootfs</filename>
5600 creation time, use
5601 <filename>pkg_postinst_ontarget()</filename>
5602 or call
5603 <filename>postinst_intercept delay_to_first_boot</filename>
5604 from <filename>pkg_postinst()</filename>.
5605 Any failure of a <filename>pkg_postinst()</filename>
5606 script (including <filename>exit 1</filename>)
5607 will trigger a warning during
5608 <filename>do_rootfs</filename>.</para>
5609
5610 <para>For more information, see the
5611 "<ulink url='&YOCTO_DOCS_DEV_URL;#new-recipe-post-installation-scripts'>Post-Installation Scripts</ulink>"
5612 section in the Yocto Project Development Tasks Manual.
5613 </para></listitem>
5614 <listitem><para>
5615 The <filename>elf</filename> image type has been removed.
5616 This image type was removed because the
5617 <filename>mkelfimage</filename> tool
5618 that was required to create it is no longer provided by
5619 coreboot upstream and required updating every time
5620 <filename>binutils</filename> updated.
5621 </para></listitem>
5622 <listitem><para>
5623 Support for .iso image compression (previously enabled
5624 through <filename>COMPRESSISO = "1"</filename>) has been
5625 removed.
5626 The userspace tools (<filename>zisofs-tools</filename>) are
5627 unmaintained and <filename>squashfs</filename> provides
5628 better performance and compression.
5629 In order to build a live image with squashfs+lz4 compression
5630 enabled you should now set
5631 <filename>LIVE_ROOTFS_TYPE = "squashfs-lz4"</filename>
5632 and ensure that <filename>live</filename>
5633 is in <filename>IMAGE_FSTYPES</filename>.
5634 </para></listitem>
5635 <listitem><para>
5636 Recipes with an unconditional dependency on
5637 <filename>libpam</filename> are only buildable with
5638 <filename>pam</filename> in
5639 <filename>DISTRO_FEATURES</filename>.
5640 If the dependency is truly optional then it is recommended
5641 that the dependency be conditional upon
5642 <filename>pam</filename> being in
5643 <filename>DISTRO_FEATURES</filename>.
5644 </para></listitem>
5645 <listitem><para>
5646 For EFI-based machines, the bootloader
5647 (<filename>grub-efi</filename> by default) is installed into
5648 the image at /boot.
5649 Wic can be used to split the bootloader into separate boot
5650 and rootfs partitions if necessary.
5651 </para></listitem>
5652 <listitem><para>
5653 Patches whose context does not match exactly (i.e. where
5654 patch reports "fuzz" when applying) will generate a
5655 warning.
5656 For an example of this see
5657 <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=cc97bc08125b63821ce3f616771830f77c456f57'>this commit</ulink>.
5658 </para></listitem>
5659 <listitem><para>
5660 Layers are expected to set
5661 <filename>LAYERSERIES_COMPAT_layername</filename>
5662 to match the version(s) of OpenEmbedded-Core they are
5663 compatible with.
5664 This is specified as codenames using spaces to separate
5665 multiple values (e.g. "rocko sumo").
5666 If a layer does not set
5667 <filename>LAYERSERIES_COMPAT_layername</filename>, a warning
5668 will is shown.
5669 If a layer sets a value that does not include the current
5670 version ("sumo" for the 2.5 release), then an error will be
5671 produced.
5672 </para></listitem>
5673 <listitem><para>
5674 The <filename>TZ</filename> environment variable is set to
5675 "UTC" within the build environment in order to fix
5676 reproducibility problems in some recipes.
5677 </para></listitem>
5678 </itemizedlist>
5679 </para>
5680 </section>
5681</section>
5682
5683<section id='moving-to-the-yocto-project-2.6-release'>
5684 <title>Moving to the Yocto Project 2.6 Release</title>
5685
5686 <para>
5687 This section provides migration information for moving to the
5688 Yocto Project 2.6 Release from the prior release.
5689 </para>
5690
5691 <section id='migration-2.6-gcc-changes'>
5692 <title>GCC 8.2 is Now Used by Default</title>
5693
5694 <para>
5695 The GNU Compiler Collection version 8.2 is now used by default
5696 for compilation.
5697 For more information on what has changed in the GCC 8.x release,
5698 see
5699 <ulink url='https://gcc.gnu.org/gcc-8/changes.html'></ulink>.
5700 </para>
5701
5702 <para>
5703 If you still need to compile with version 7.x, GCC 7.3 is
5704 also provided.
5705 You can select this version by setting the
5706 and can be selected by setting the
5707 <link linkend='var-GCCVERSION'><filename>GCCVERSION</filename></link>
5708 variable to "7.%" in your configuration.
5709 </para>
5710 </section>
5711
5712 <section id='migration-2.6-removed-recipes'>
5713 <title>Removed Recipes</title>
5714
5715 <para>
5716 The following recipes have been removed:
5717 <literallayout class='monospaced'>
5718 <emphasis><filename>beecrypt</filename>:</emphasis> No longer needed since moving to RPM 4.
5719 <emphasis><filename>bigreqsproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
5720 <emphasis><filename>calibrateproto</filename>:</emphasis> Removed in favor of <filename>xinput</filename>.
5721 <emphasis><filename>compositeproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
5722 <emphasis><filename>damageproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
5723 <emphasis><filename>dmxproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
5724 <emphasis><filename>dri2proto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
5725 <emphasis><filename>dri3proto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
5726 <emphasis><filename>eee-acpi-scripts</filename>:</emphasis> Became obsolete.
5727 <emphasis><filename>fixesproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
5728 <emphasis><filename>fontsproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
5729 <emphasis><filename>fstests</filename>:</emphasis> Became obsolete.
5730 <emphasis><filename>gccmakedep</filename>:</emphasis> No longer used.
5731 <emphasis><filename>glproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
5732 <emphasis><filename>gnome-desktop3</filename>:</emphasis> No longer needed. This recipe has moved to <filename>meta-oe</filename>.
5733 <emphasis><filename>icon-naming-utils</filename>:</emphasis> No longer used since the Sato theme was removed in 2016.
5734 <emphasis><filename>inputproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
5735 <emphasis><filename>kbproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
5736 <emphasis><filename>libusb-compat</filename>:</emphasis> Became obsolete.
5737 <emphasis><filename>libuser</filename>:</emphasis> Became obsolete.
5738 <emphasis><filename>libnfsidmap</filename>:</emphasis> No longer an external requirement since <filename>nfs-utils</filename> 2.2.1. <filename>libnfsidmap</filename> is now integrated.
5739 <emphasis><filename>libxcalibrate</filename>:</emphasis> No longer needed with <filename>xinput</filename>
5740 <emphasis><filename>mktemp</filename>:</emphasis> Became obsolete. The <filename>mktemp</filename> command is provided by both <filename>busybox</filename> and <filename>coreutils</filename>.
5741 <emphasis><filename>ossp-uuid</filename>:</emphasis> Is not being maintained and has mostly been replaced by <filename>uuid.h</filename> in <filename>util-linux</filename>.
5742 <emphasis><filename>pax-utils</filename>:</emphasis> No longer needed. Previous QA tests that did use this recipe are now done at build time.
5743 <emphasis><filename>pcmciautils</filename>:</emphasis> Became obsolete.
5744 <emphasis><filename>pixz</filename>:</emphasis> No longer needed. <filename>xz</filename> now supports multi-threaded compression.
5745 <emphasis><filename>presentproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
5746 <emphasis><filename>randrproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
5747 <emphasis><filename>recordproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
5748 <emphasis><filename>renderproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
5749 <emphasis><filename>resourceproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
5750 <emphasis><filename>scrnsaverproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
5751 <emphasis><filename>trace-cmd</filename>:</emphasis> Became obsolete. <filename>perf</filename> replaced this recipe's functionally.
5752 <emphasis><filename>videoproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
5753 <emphasis><filename>wireless-tools</filename>:</emphasis> Became obsolete. Superseded by <filename>iw</filename>.
5754 <emphasis><filename>xcmiscproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
5755 <emphasis><filename>xextproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
5756 <emphasis><filename>xf86dgaproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
5757 <emphasis><filename>xf86driproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
5758 <emphasis><filename>xf86miscproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
5759 <emphasis><filename>xf86-video-omapfb</filename>:</emphasis> Became obsolete. Use kernel modesetting driver instead.
5760 <emphasis><filename>xf86-video-omap</filename>:</emphasis> Became obsolete. Use kernel modesetting driver instead.
5761 <emphasis><filename>xf86vidmodeproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
5762 <emphasis><filename>xineramaproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
5763 <emphasis><filename>xproto</filename>:</emphasis> Replaced by <filename>xorgproto</filename>.
5764 <emphasis><filename>yasm</filename>:</emphasis> No longer needed since previous usages are now satisfied by <filename>nasm</filename>.
5765 </literallayout>
5766 </para>
5767 </section>
5768
5769 <section id='migration-2.6-packaging-changes'>
5770 <title>Packaging Changes</title>
5771
5772 <para>
5773 The following packaging changes have been made:
5774 <itemizedlist>
5775 <listitem><para>
5776 <emphasis><filename>cmake</filename>:</emphasis>
5777 <filename>cmake.m4</filename> and
5778 <filename>toolchain</filename> files have been moved to the
5779 main package.
5780 </para></listitem>
5781 <listitem><para>
5782 <emphasis><filename>iptables</filename>:</emphasis>
5783 The <filename>iptables</filename> modules have been split
5784 into separate packages.
5785 </para></listitem>
5786 <listitem><para>
5787 <emphasis><filename>alsa-lib</filename>:</emphasis>
5788 <filename>libasound</filename> is now in the main
5789 <filename>alsa-lib</filename> package instead of
5790 <filename>libasound</filename>.
5791 </para></listitem>
5792 <listitem><para>
5793 <emphasis><filename>glibc</filename>:</emphasis>
5794 <filename>libnss-db</filename> is now in its own package
5795 along with a <filename>/var/db/makedbs.sh</filename>
5796 script to update databases.
5797 </para></listitem>
5798 <listitem><para>
5799 <emphasis><filename>python</filename> and <filename>python3</filename>:</emphasis>
5800 The main package has been removed from the recipe.
5801 You must install specific packages or
5802 <filename>python-modules</filename> /
5803 <filename>python3-modules</filename> for everything.
5804 </para></listitem>
5805 <listitem><para>
5806 <emphasis><filename>systemtap</filename>:</emphasis>
5807 Moved <filename>systemtap-exporter</filename> into its own
5808 package.
5809 </para></listitem>
5810 </itemizedlist>
5811 </para>
5812 </section>
5813
5814 <section id='migration-2.6-xorg-protocol-dependencies'>
5815 <title>XOrg Protocol dependencies</title>
5816
5817 <para>
5818 The "*proto" upstream repositories have been combined into one
5819 "xorgproto" repository.
5820 Thus, the corresponding recipes have also been combined into a
5821 single <filename>xorgproto</filename> recipe.
5822 Any recipes that depend upon the older <filename>*proto</filename>
5823 recipes need to be changed to depend on the newer
5824 <filename>xorgproto</filename> recipe instead.
5825 </para>
5826
5827 <para>
5828 For names of recipes removed because of this repository change,
5829 see the
5830 <link linkend="migration-2.6-removed-recipes">Removed Recipes</link>
5831 section.
5832 </para>
5833 </section>
5834
5835 <section id='migration-2.6-distutils-distutils3-fetching-dependencies'>
5836 <title><filename>distutils</filename> and <filename>distutils3</filename> Now Prevent Fetching Dependencies During the <filename>do_configure</filename> Task</title>
5837
5838 <para>
5839 Previously, it was possible for Python recipes that inherited
5840 the
5841 <link linkend='ref-classes-distutils'><filename>distutils</filename></link>
5842 and
5843 <link linkend='ref-classes-distutils3'><filename>distutils3</filename></link>
5844 classes to fetch code during the
5845 <link linkend='ref-tasks-configure'><filename>do_configure</filename></link>
5846 task to satisfy dependencies mentioned in
5847 <filename>setup.py</filename> if those dependencies were not
5848 provided in the sysroot (i.e. recipes providing the dependencies
5849 were missing from
5850 <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>).
5851 <note>
5852 This change affects classes beyond just the two mentioned
5853 (i.e. <filename>distutils</filename> and
5854 <filename>distutils3</filename>).
5855 Any recipe that inherits <filename>distutils*</filename>
5856 classes are affected.
5857 For example, the <filename>setuptools</filename> and
5858 <filename>setuptools3</filename> recipes are affected since
5859 they inherit the <filename>distutils*</filename> classes.
5860 </note>
5861 </para>
5862
5863 <para>
5864 Fetching these types of dependencies that are not provided in the
5865 sysroot negatively affects the ability to reproduce builds.
5866 This type of fetching is now explicitly disabled.
5867 Consequently, any missing dependencies in Python recipes that
5868 use these classes now result in an error during the
5869 <filename>do_configure</filename> task.
5870 </para>
5871 </section>
5872
5873 <section id='migration-2.6-linux-yocto-configuration-audit-issues-now-correctly-reported'>
5874 <title><filename>linux-yocto</filename> Configuration Audit Issues Now Correctly Reported</title>
5875
5876 <para>
5877 Due to a bug, the kernel configuration audit functionality was
5878 not writing out any resulting warnings during the build.
5879 This issue is now corrected.
5880 You might notice these warnings now if you have a custom kernel
5881 configuration with a <filename>linux-yocto</filename> style
5882 kernel recipe.
5883 </para>
5884 </section>
5885
5886 <section id='migration-2.6-image-kernel-artifact-naming-changes'>
5887 <title>Image/Kernel Artifact Naming Changes</title>
5888
5889 <para>
5890 The following changes have been made:
5891 <itemizedlist>
5892 <listitem><para>
5893 Name variables (e.g.
5894 <link linkend='var-IMAGE_NAME'><filename>IMAGE_NAME</filename></link>)
5895 use a new <filename>IMAGE_VERSION_SUFFIX</filename>
5896 variable instead of
5897 <link linkend='var-DATETIME'><filename>DATETIME</filename></link>.
5898 Using <filename>IMAGE_VERSION_SUFFIX</filename> allows
5899 easier and more direct changes.</para>
5900
5901 <para>The <filename>IMAGE_VERSION_SUFFIX</filename>
5902 variable is set in the
5903 <filename>bitbake.conf</filename> configuration file as
5904 follows:
5905 <literallayout class='monospaced'>
5906 IMAGE_VERSION_SUFFIX = "-${DATETIME}"
5907 </literallayout>
5908 </para></listitem>
5909 <listitem><para>
5910 Several variables have changed names for consistency:
5911 <literallayout class='monospaced'>
5912 Old Variable Name New Variable Name
5913 ========================================================
5914 KERNEL_IMAGE_BASE_NAME <link linkend='var-KERNEL_IMAGE_NAME'>KERNEL_IMAGE_NAME</link>
5915 KERNEL_IMAGE_SYMLINK_NAME <link linkend='var-KERNEL_IMAGE_LINK_NAME'>KERNEL_IMAGE_LINK_NAME</link>
5916 MODULE_TARBALL_BASE_NAME <link linkend='var-MODULE_TARBALL_NAME'>MODULE_TARBALL_NAME</link>
5917 MODULE_TARBALL_SYMLINK_NAME <link linkend='var-MODULE_TARBALL_LINK_NAME'>MODULE_TARBALL_LINK_NAME</link>
5918 INITRAMFS_BASE_NAME <link linkend='var-INITRAMFS_NAME'>INITRAMFS_NAME</link>
5919 </literallayout>
5920 </para></listitem>
5921 <listitem><para>
5922 The <filename>MODULE_IMAGE_BASE_NAME</filename> variable
5923 has been removed.
5924 The module tarball name is now controlled directly with the
5925 <link linkend='var-MODULE_TARBALL_NAME'><filename>MODULE_TARBALL_NAME</filename></link>
5926 variable.
5927 </para></listitem>
5928 <listitem><para>
5929 The
5930 <link linkend='var-KERNEL_DTB_NAME'><filename>KERNEL_DTB_NAME</filename></link>
5931 and
5932 <link linkend='var-KERNEL_DTB_LINK_NAME'><filename>KERNEL_DTB_LINK_NAME</filename></link>
5933 variables have been introduced to control kernel Device
5934 Tree Binary (DTB) artifact names instead of mangling
5935 <filename>KERNEL_IMAGE_*</filename> variables.
5936 </para></listitem>
5937 <listitem><para>
5938 The
5939 <link linkend='var-KERNEL_FIT_NAME'><filename>KERNEL_FIT_NAME</filename></link>
5940 and
5941 <link linkend='var-KERNEL_FIT_LINK_NAME'><filename>KERNEL_FIT_LINK_NAME</filename></link>
5942 variables have been introduced to specify the name of
5943 flattened image tree (FIT) kernel images similar to other
5944 deployed artifacts.
5945 </para></listitem>
5946 <listitem><para>
5947 The
5948 <link linkend='var-MODULE_TARBALL_NAME'><filename>MODULE_TARBALL_NAME</filename></link>
5949 and
5950 <link linkend='var-MODULE_TARBALL_LINK_NAME'><filename>MODULE_TARBALL_LINK_NAME</filename></link>
5951 variable values no longer include the "module-" prefix or
5952 ".tgz" suffix.
5953 These parts are now hardcoded so that the values are
5954 consistent with other artifact naming variables.
5955 </para></listitem>
5956 <listitem><para>
5957 Added the
5958 <link linkend='var-INITRAMFS_LINK_NAME'><filename>INITRAMFS_LINK_NAME</filename></link>
5959 variable so that the symlink can be controlled similarly
5960 to other artifact types.
5961 </para></listitem>
5962 <listitem><para>
5963 <link linkend='var-INITRAMFS_NAME'><filename>INITRAMFS_NAME</filename></link>
5964 now uses
5965 "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
5966 instead of
5967 "${PV}-${PR}-${MACHINE}-${DATETIME}", which
5968 makes it consistent with other variables.
5969 </para></listitem>
5970 </itemizedlist>
5971 </para>
5972 </section>
5973
5974 <section id='migration-2.6-serial-console-deprecated'>
5975 <title><filename>SERIAL_CONSOLE</filename> Deprecated</title>
5976
5977 <para>
5978 The
5979 <link linkend='var-SERIAL_CONSOLE'><filename>SERIAL_CONSOLE</filename></link>
5980 variable has been functionally replaced by the
5981 <link linkend='var-SERIAL_CONSOLES'><filename>SERIAL_CONSOLES</filename></link>
5982 variable for some time.
5983 With the Yocto Project 2.6 release,
5984 <filename>SERIAL_CONSOLE</filename> has been officially deprecated.
5985 </para>
5986
5987 <para>
5988 <filename>SERIAL_CONSOLE</filename> will continue to work as
5989 before for the 2.6 release.
5990 However, for the sake of future compatibility, it is recommended
5991 that you replace all instances of
5992 <filename>SERIAL_CONSOLE</filename> with
5993 <filename>SERIAL_CONSOLES</filename>.
5994 <note>
5995 The only difference in usage is that
5996 <filename>SERIAL_CONSOLES</filename> expects entries to be
5997 separated using semicolons as compared to
5998 <filename>SERIAL_CONSOLE</filename>, which expects spaces.
5999 </note>
6000 </para>
6001 </section>
6002
6003 <section id='migration-2.6-poky-sets-unknown-configure-option-to-qa-error'>
6004 <title>Configure Script Reports Unknown Options as Errors</title>
6005
6006 <para>
6007 If the configure script reports an unknown option, this now
6008 triggers a QA error instead of a warning.
6009 Any recipes that previously got away with specifying such unknown
6010 options now need to be fixed.
6011 </para>
6012 </section>
6013
6014 <section id='migration-2.6-override-changes'>
6015 <title>Override Changes</title>
6016
6017 <para>
6018 The following changes have occurred:
6019 <itemizedlist>
6020 <listitem><para>
6021 <emphasis>The <filename>virtclass-native</filename> and
6022 <filename>virtclass-nativesdk</filename> Overrides Have
6023 Been Removed:</emphasis>
6024 The <filename>virtclass-native</filename> and
6025 <filename>virtclass-nativesdk</filename> overrides have
6026 been deprecated since 2012 in favor of
6027 <filename>class-native</filename> and
6028 <filename>class-nativesdk</filename>, respectively.
6029 Both <filename>virtclass-native</filename> and
6030 <filename>virtclass-nativesdk</filename> are now dropped.
6031 <note>
6032 The <filename>virtclass-multilib-</filename> overrides
6033 for multilib are still valid.
6034 </note>
6035 </para></listitem>
6036 <listitem><para>
6037 <emphasis>The <filename>forcevariable</filename>
6038 Override Now Has a Higher Priority Than
6039 <filename>libc</filename> Overrides:</emphasis>
6040 The <filename>forcevariable</filename> override is
6041 documented to be the highest priority override.
6042 However, due to a long-standing quirk of how
6043 <link linkend='var-OVERRIDES'><filename>OVERRIDES</filename></link>
6044 is set, the <filename>libc</filename> overrides (e.g.
6045 <filename>libc-glibc</filename>,
6046 <filename>libc-musl</filename>, and so forth) erroneously
6047 had a higher priority.
6048 This issue is now corrected.</para>
6049
6050 <para>It is likely this change will not cause any
6051 problems.
6052 However, it is possible with some unusual configurations
6053 that you might see a change in behavior if you were
6054 relying on the previous behavior.
6055 Be sure to check how you use
6056 <filename>forcevariable</filename> and
6057 <filename>libc-*</filename> overrides in your custom
6058 layers and configuration files to ensure they make sense.
6059 </para></listitem>
6060 <listitem><para>
6061 <emphasis>The <filename>build-${BUILD_OS}</filename>
6062 Override Has Been Removed:</emphasis>
6063 The <filename>build-${BUILD_OS}</filename>, which is
6064 typically <filename>build-linux</filename>, override has
6065 been removed because building on a host operating system
6066 other than a recent version of Linux is neither supported
6067 nor recommended.
6068 Dropping the override avoids giving the impression that
6069 other host operating systems might be supported.
6070 </para></listitem>
6071 <listitem><para>
6072 The "_remove" operator now preserves whitespace.
6073 Consequently, when specifying list items to remove, be
6074 aware that leading and trailing whitespace resulting from
6075 the removal is retained.</para>
6076
6077 <para>See the
6078 "<ulink url='&YOCTO_DOCS_BB_URL;#removing-override-style-syntax'>Removal (Override Style Syntax)</ulink>"
6079 section in the BitBake User Manual for a detailed example.
6080 </para></listitem>
6081 </itemizedlist>
6082 </para>
6083 </section>
6084
6085 <section id='migration-2.6-systemd-configuration-now-split-out-to-system-conf'>
6086 <title><filename>systemd</filename> Configuration is Now Split Into <filename>systemd-conf</filename></title>
6087
6088 <para>
6089 The configuration for the <filename>systemd</filename> recipe
6090 has been moved into a <filename>system-conf</filename> recipe.
6091 Moving this configuration to a separate recipe avoids the
6092 <filename>systemd</filename> recipe from becoming machine-specific
6093 for cases where machine-specific configurations need to be applied
6094 (e.g. for <filename>qemu*</filename> machines).
6095 </para>
6096
6097 <para>
6098 Currently, the new recipe packages the following files:
6099 <literallayout class='monospaced'>
6100 ${sysconfdir}/machine-id
6101 ${sysconfdir}/systemd/coredump.conf
6102 ${sysconfdir}/systemd/journald.conf
6103 ${sysconfdir}/systemd/logind.conf
6104 ${sysconfdir}/systemd/system.conf
6105 ${sysconfdir}/systemd/user.conf
6106 </literallayout>
6107 If you previously used bbappend files to append the
6108 <filename>systemd</filename> recipe to change any of the
6109 listed files, you must do so for the
6110 <filename>systemd-conf</filename> recipe instead.
6111 </para>
6112 </section>
6113
6114 <section id='migration-2.6-automatic-testing-changes'>
6115 <title>Automatic Testing Changes</title>
6116
6117 <para>
6118 This section provides information about automatic testing
6119 changes:
6120 <itemizedlist>
6121 <listitem><para>
6122 <emphasis><filename>TEST_IMAGE</filename> Variable Removed:</emphasis>
6123 Prior to this release, you set the
6124 <filename>TEST_IMAGE</filename> variable to "1" to
6125 enable automatic testing for successfully built images.
6126 The <filename>TEST_IMAGE</filename> variable no longer
6127 exists and has been replaced by the
6128 <link linkend='var-TESTIMAGE_AUTO'><filename>TESTIMAGE_AUTO</filename></link>
6129 variable.
6130 </para></listitem>
6131 <listitem><para>
6132 <emphasis>Inheriting the <filename>testimage</filename> and
6133 <filename>testsdk</filename> Classes:</emphasis>
6134 Best practices now dictate that you use the
6135 <link linkend='var-IMAGE_CLASSES'><filename>IMAGE_CLASSES</filename></link>
6136 variable rather than the
6137 <link linkend='var-INHERIT'><filename>INHERIT</filename></link>
6138 variable when you inherit the
6139 <link linkend='ref-classes-testimage*'><filename>testimage</filename></link>
6140 and
6141 <link linkend='ref-classes-testsdk'><filename>testsdk</filename></link>
6142 classes used for automatic testing.
6143 </para></listitem>
6144 </itemizedlist>
6145 </para>
6146 </section>
6147
6148 <section id='migration-2.6-openssl-changes'>
6149 <title>OpenSSL Changes</title>
6150
6151 <para>
6152 <ulink url='https://www.openssl.org/'>OpenSSL</ulink> has been
6153 upgraded from 1.0 to 1.1.
6154 By default, this upgrade could cause problems for recipes that
6155 have both versions in their dependency chains.
6156 The problem is that both versions cannot be installed together
6157 at build time.
6158 <note>
6159 It is possible to have both versions of the library at runtime.
6160 </note>
6161 </para>
6162 </section>
6163
6164 <section id='migration-2.6-bitbake-changes'>
6165 <title>BitBake Changes</title>
6166
6167 <para>
6168 The server logfile <filename>bitbake-cookerdaemon.log</filename> is
6169 now always placed in the
6170 <link linkend='build-directory'>Build Directory</link>
6171 instead of the current directory.
6172 </para>
6173 </section>
6174
6175 <section id='migration-2.6-security-changes'>
6176 <title>Security Changes</title>
6177
6178 <para>
6179 The Poky distribution now uses security compiler flags by
6180 default.
6181 Inclusion of these flags could cause new failures due to stricter
6182 checking for various potential security issues in code.
6183 </para>
6184 </section>
6185
6186 <section id='migration-2.6-post-installation-changes'>
6187 <title>Post Installation Changes</title>
6188
6189 <para>
6190 You must explicitly mark post installs to defer to the target.
6191 If you want to explicitly defer a postinstall to first boot on
6192 the target rather than at rootfs creation time, use
6193 <filename>pkg_postinst_ontarget()</filename> or call
6194 <filename>postinst_intercept delay_to_first_boot</filename> from
6195 <filename>pkg_postinst()</filename>.
6196 Any failure of a <filename>pkg_postinst()</filename> script
6197 (including exit 1) triggers an error during the
6198 <link linkend='ref-tasks-rootfs'><filename>do_rootfs</filename></link> task.
6199 </para>
6200
6201 <para>
6202 For more information on post-installation behavior, see the
6203 "<ulink url='&YOCTO_DOCS_DEV_URL;#new-recipe-post-installation-scripts'>Post-Installation Scripts</ulink>"
6204 section in the Yocto Project Development Tasks Manual.
6205 </para>
6206 </section>
6207
6208 <section id='migration-2.6-python-3-profile-guided-optimizations'>
6209 <title>Python 3 Profile-Guided Optimization</title>
6210
6211 <para>
6212 The <filename>python3</filename> recipe now enables profile-guided
6213 optimization.
6214 Using this optimization requires a little extra build time in
6215 exchange for improved performance on the target at runtime.
6216 Additionally, the optimization is only enabled if the current
6217 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>
6218 has support for user-mode emulation in QEMU (i.e. "qemu-usermode"
6219 is in
6220 <link linkend='var-MACHINE_FEATURES'><filename>MACHINE_FEATURES</filename></link>,
6221 which it is by default).
6222 </para>
6223
6224 <para>
6225 If you wish to disable Python profile-guided optimization
6226 regardless of the value of
6227 <filename>MACHINE_FEATURES</filename>, then ensure that
6228 <link linkend='var-PACKAGECONFIG'><filename>PACKAGECONFIG</filename></link>
6229 for the <filename>python3</filename> recipe does not contain "pgo".
6230 You could accomplish the latter using the following at the
6231 configuration level:
6232 <literallayout class='monospaced'>
6233 PACKAGECONFIG_remove_pn-python3 = "pgo"
6234 </literallayout>
6235 Alternatively, you can set
6236 <filename>PACKAGECONFIG</filename> using an append file for the
6237 <filename>python3</filename> recipe.
6238 </para>
6239 </section>
6240
6241 <section id='migration-2.6-miscellaneous-changes'>
6242 <title>Miscellaneous Changes</title>
6243
6244 <para>
6245 The following miscellaneous changes occurred:
6246 <itemizedlist>
6247 <listitem><para>
6248 Default to using the Thumb-2 instruction set for armv7a
6249 and above.
6250 If you have any custom recipes that build software that
6251 needs to be built with the ARM instruction set, change the
6252 recipe to set the instruction set as follows:
6253 <literallayout class='monospaced'>
6254 ARM_INSTRUCTION_SET = "arm"
6255 </literallayout>
6256 </para></listitem>
6257 <listitem><para>
6258 <filename>run-postinsts</filename> no longer uses
6259 <filename>/etc/*-postinsts</filename> for
6260 <filename>dpkg/opkg</filename> in favor of built-in
6261 postinst support.
6262 RPM behavior remains unchanged.
6263 </para></listitem>
6264 <listitem><para>
6265 The <filename>NOISO</filename> and
6266 <filename>NOHDD</filename> variables are no longer used.
6267 You now control building <filename>*.iso</filename> and
6268 <filename>*.hddimg</filename> image types directly
6269 by using the
6270 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
6271 variable.
6272 </para></listitem>
6273 <listitem><para>
6274 The <filename>scripts/contrib/mkefidisk.sh</filename>
6275 has been removed in favor of Wic.
6276 </para></listitem>
6277 <listitem><para>
6278 <filename>kernel-modules</filename> has been removed from
6279 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>
6280 for <filename>qemumips</filename> and
6281 <filename>qemumips64</filename> machines.
6282 Removal also impacts the <filename>x86-base.inc</filename>
6283 file.
6284 <note>
6285 <filename>genericx86</filename> and
6286 <filename>genericx86-64</filename> retain
6287 <filename>kernel-modules</filename> as part of the
6288 <filename>RRECOMMENDS</filename> variable setting.
6289 </note>
6290 </para></listitem>
6291 <listitem><para>
6292 The <filename>LGPLv2_WHITELIST_GPL-3.0</filename>
6293 variable has been removed.
6294 If you are setting this variable in your configuration,
6295 set or append it to the
6296 <filename>WHITELIST_GPL-3.0</filename> variable instead.
6297 </para></listitem>
6298 <listitem><para>
6299 <filename>${ASNEEDED}</filename> is now included in
6300 the
6301 <link linkend='var-TARGET_LDFLAGS'><filename>TARGET_LDFLAGS</filename></link>
6302 variable directly.
6303 The remaining definitions from
6304 <filename>meta/conf/distro/include/as-needed.inc</filename>
6305 have been moved to corresponding recipes.
6306 </para></listitem>
6307 <listitem><para>
6308 Support for DSA host keys has been dropped from the
6309 OpenSSH recipes.
6310 If you are still using DSA keys, you must switch over to a
6311 more secure algorithm as recommended by OpenSSH upstream.
6312 </para></listitem>
6313 <listitem><para>
6314 The <filename>dhcp</filename> recipe now uses the
6315 <filename>dhcpd6.conf</filename> configuration file in
6316 <filename>dhcpd6.service</filename> for IPv6 DHCP rather
6317 than re-using <filename>dhcpd.conf</filename>, which is
6318 now reserved for IPv4.
6319 </para></listitem>
6320 </itemizedlist>
6321 </para>
6322 </section>
6323</section>
6324
6325<section id='moving-to-the-yocto-project-2.7-release'>
6326 <title>Moving to the Yocto Project 2.7 Release</title>
6327
6328 <para>
6329 This section provides migration information for moving to the
6330 Yocto Project 2.7 Release from the prior release.
6331 </para>
6332
6333 <section id='migration-2.7-bitbake-changes'>
6334 <title>BitBake Changes</title>
6335
6336 <para>
6337 The following changes have been made to BitBake:
6338 <itemizedlist>
6339 <listitem><para>
6340 BitBake now checks anonymous Python functions and pure
6341 Python functions (e.g. <filename>def funcname:</filename>)
6342 in the metadata for tab indentation.
6343 If found, BitBake produces a warning.
6344 </para></listitem>
6345 <listitem><para>
6346 Bitbake now checks
6347 <link linkend='var-BBFILE_COLLECTIONS'><filename>BBFILE_COLLECTIONS</filename></link>
6348 for duplicate entries and triggers an error if any are
6349 found.
6350 </para></listitem>
6351 </itemizedlist>
6352 </para>
6353 </section>
6354
6355 <section id='migration-2.7-eclipse-support-dropped'>
6356 <title><trademark class='trade'>Eclipse</trademark> Support Removed</title>
6357
6358 <para>
6359 Support for the Eclipse IDE has been removed.
6360 Support continues for those releases prior to 2.7 that did include
6361 support.
6362 The 2.7 release does not include the Eclipse Yocto plugin.
6363 </para>
6364 </section>
6365
6366 <section id='migration-2.7-qemu-native-splits-system-and-user-mode-parts'>
6367 <title><filename>qemu-native</filename> Splits the System and User-Mode Parts</title>
6368
6369 <para>
6370 The system and user-mode parts of <filename>qemu-native</filename>
6371 are now split.
6372 <filename>qemu-native</filename> provides the user-mode components
6373 and <filename>qemu-system-native</filename> provides the system
6374 components.
6375 If you have recipes that depend on QEMU's system emulation
6376 functionality at build time, they should now depend upon
6377 <filename>qemu-system-native</filename> instead of
6378 <filename>qemu-native</filename>.
6379 </para>
6380 </section>
6381
6382 <section id='migration-2.7-upstream-tracking.inc-removed'>
6383 <title>The <filename>upstream-tracking.inc</filename> File Has Been Removed</title>
6384
6385 <para>
6386 The previously deprecated <filename>upstream-tracking.inc</filename>
6387 file is now removed.
6388 Any <filename>UPSTREAM_TRACKING*</filename> variables are now set
6389 in the corresponding recipes instead.
6390 </para>
6391
6392 <para>
6393 Remove any references you have to the
6394 <filename>upstream-tracking.inc</filename> file in your
6395 configuration.
6396 </para>
6397 </section>
6398
6399 <section id='migration-2.7-distro-features-libc-removed'>
6400 <title>The <filename>DISTRO_FEATURES_LIBC</filename> Variable Has Been Removed</title>
6401
6402 <para>
6403 The <filename>DISTRO_FEATURES_LIBC</filename> variable is no
6404 longer used.
6405 The ability to configure glibc using kconfig has been removed
6406 for quite some time making the <filename>libc-*</filename> features
6407 set no longer effective.
6408 </para>
6409
6410 <para>
6411 Remove any references you have to
6412 <filename>DISTRO_FEATURES_LIBC</filename> in your own layers.
6413 </para>
6414 </section>
6415
6416 <section id='migration-2.7-license-values'>
6417 <title>License Value Corrections</title>
6418
6419 <para>
6420 The following corrections have been made to the
6421 <link linkend='var-LICENSE'><filename>LICENSE</filename></link>
6422 values set by recipes:
6423 <literallayout class='monospaced'>
6424 <emphasis>socat</emphasis>: Corrected <filename>LICENSE</filename> to be "GPLv2" rather than
6425 "GPLv2+".
6426
6427 <emphasis>libgfortran</emphasis>: Set license to "GPL-3.0-with-GCC-exception".
6428
6429 <emphasis>elfutils</emphasis>: Removed "Elfutils-Exception" and set to "GPLv2" for shared
6430 libraries
6431 </literallayout>
6432 </para>
6433 </section>
6434
6435 <section id='migration-2.7-packaging-changes'>
6436 <title>Packaging Changes</title>
6437
6438 <para>
6439 This section provides information about packaging changes.
6440 <itemizedlist>
6441 <listitem><para>
6442 <filename>bind</filename>: The
6443 <filename>nsupdate</filename> binary has been moved to
6444 the <filename>bind-utils</filename> package.
6445 </para></listitem>
6446 <listitem><para>
6447 Debug split: The default debug split has been changed to
6448 create separate source packages (i.e.
6449 <replaceable>package_name</replaceable><filename>-dbg</filename>
6450 and
6451 <replaceable>package_name</replaceable><filename>-src</filename>).
6452 If you are currently using <filename>dbg-pkgs</filename>
6453 in
6454 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>
6455 to bring in debug symbols and you still need the sources,
6456 you must now also add <filename>src-pkgs</filename> to
6457 <filename>IMAGE_FEATURES</filename>.
6458 Source packages remain in the target portion of the SDK
6459 by default, unless you have set your own value for
6460 <link linkend='var-SDKIMAGE_FEATURES'><filename>SDKIMAGE_FEATURES</filename></link>
6461 that does not include <filename>src-pkgs</filename>.
6462 </para></listitem>
6463 <listitem><para>
6464 Mount all using <filename>util-linux</filename>:
6465 <filename>/etc/default/mountall</filename> has
6466 moved into the -mount sub-package.
6467 </para></listitem>
6468 <listitem><para>
6469 Splitting binaries using <filename>util-linux</filename>:
6470 <filename>util-linux</filename> now splits each binary into
6471 its own package for fine-grained control.
6472 The main <filename>util-linux</filename> package pulls in
6473 the individual binary packages using the
6474 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>
6475 and
6476 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>
6477 variables.
6478 As a result, existing images should not see any changes
6479 assuming
6480 <link linkend='var-NO_RECOMMENDATIONS'><filename>NO_RECOMMENDATIONS</filename></link>
6481 is not set.
6482 </para></listitem>
6483 <listitem><para>
6484 <filename>netbase/base-files</filename>:
6485 <filename>/etc/hosts</filename> has moved from
6486 <filename>netbase</filename> to
6487 <filename>base-files</filename>.
6488 </para></listitem>
6489 <listitem><para>
6490 <filename>tzdata</filename>: The main package has been
6491 converted to an empty meta package that pulls in all
6492 <filename>tzdata</filename> packages by default.
6493 </para></listitem>
6494 <listitem><para>
6495 <filename>lrzsz</filename>: This package has been removed
6496 from <filename>packagegroup-self-hosted</filename> and
6497 <filename>packagegroup-core-tools-testapps</filename>.
6498 The X/Y/ZModem support is less likely to be needed on
6499 modern systems.
6500 If you are relying on these packagegroups to include the
6501 <filename>lrzsz</filename> package in your image, you
6502 now need to explicitly add the package.
6503 </para></listitem>
6504 </itemizedlist>
6505 </para>
6506 </section>
6507
6508 <section id='migration-2.7-removed-recipes'>
6509 <title>Removed Recipes</title>
6510
6511 <para>
6512 The following recipes have been removed:
6513 <literallayout class='monospaced'>
6514 <emphasis>gcc</emphasis>: Drop version 7.3 recipes. Version 8.3 now remains.
6515
6516 <emphasis>linux-yocto</emphasis>: Drop versions 4.14 and 4.18 recipes. Versions 4.19 and 5.0 remain.
6517
6518 <emphasis>go</emphasis>: Drop version 1.9 recipes. Versions 1.11 and 1.12 remain.
6519
6520 <emphasis>xvideo-tests</emphasis>: Became obsolete.
6521
6522 <emphasis>libart-lgpl</emphasis>: Became obsolete.
6523
6524 <emphasis>gtk-icon-utils-native</emphasis>: These tools are now provided by gtk+3-native
6525
6526 <emphasis>gcc-cross-initial</emphasis>: No longer needed. gcc-cross/gcc-crosssdk is now used instead.
6527
6528 <emphasis>gcc-crosssdk-initial</emphasis>: No longer needed. gcc-cross/gcc-crosssdk is now used instead.
6529
6530 <emphasis>glibc-initial</emphasis>: Removed because the benefits of having it for site_config are
6531 currently outweighed by the cost of building the recipe.
6532 </literallayout>
6533 </para>
6534 </section>
6535
6536 <section id='migration-2.7-removed-classes'>
6537 <title>Removed Classes</title>
6538
6539 <para>
6540 The following classes have been removed:
6541 <literallayout class='monospaced'>
6542 <emphasis>distutils-tools</emphasis>: This class was never used.
6543
6544 <emphasis>bugzilla.bbclass</emphasis>: Became obsolete.
6545
6546 <emphasis>distrodata</emphasis>: This functionally has been replaced by a more modern
6547 tinfoil-based implementation.
6548 </literallayout>
6549 </para>
6550 </section>
6551
6552 <section id='migration-2.7-miscellaneous-changes'>
6553 <title>Miscellaneous Changes</title>
6554
6555 <para>
6556 The following miscellaneous changes occurred:
6557 <itemizedlist>
6558 <listitem><para>
6559 The <filename>distro</filename> subdirectory of the Poky
6560 repository has been removed from the top-level
6561 <filename>scripts</filename> directory.
6562 </para></listitem>
6563 <listitem><para>
6564 Perl now builds for the target using
6565 <ulink url='http://arsv.github.io/perl-cross/'><filename>perl-cross</filename></ulink>
6566 for better maintainability and improved build performance.
6567 This change should not present any problems unless you have
6568 heavily customized your Perl recipe.
6569 </para></listitem>
6570 <listitem><para>
6571 <filename>arm-tunes</filename>: Removed the "-march"
6572 option if mcpu is already added.
6573 </para></listitem>
6574 <listitem><para>
6575 <filename>update-alternatives</filename>: Convert file
6576 renames to
6577 <link linkend='var-PACKAGE_PREPROCESS_FUNCS'><filename>PACKAGE_PREPROCESS_FUNCS</filename></link>
6578 </para></listitem>
6579 <listitem><para>
6580 <filename>base/pixbufcache</filename>: Obsolete
6581 <filename>sstatecompletions</filename> code has been
6582 removed.
6583 </para></listitem>
6584 <listitem><para>
6585 <link linkend='ref-classes-native'><filename>native</filename></link>
6586 class:
6587 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>
6588 handling has been enabled.
6589 </para></listitem>
6590 <listitem><para>
6591 <filename>inetutils</filename>: This recipe has rsh
6592 disabled.
6593 </para></listitem>
6594 </itemizedlist>
6595 </para>
6596 </section>
6597</section>
6598
6599<section id='moving-to-the-yocto-project-3.0-release'>
6600 <title>Moving to the Yocto Project 3.0 Release</title>
6601
6602 <para>
6603 This section provides migration information for moving to the
6604 Yocto Project 3.0 Release from the prior release.
6605 </para>
6606
6607 <section id='migration-3.0-init-system-selection'>
6608 <title>Init System Selection</title>
6609
6610 <para>
6611 Changing the init system manager previously required setting a
6612 number of different variables.
6613 You can now change the manager by setting the
6614 <filename>INIT_MANAGER</filename> variable and the corresponding
6615 include files
6616 (i.e. <filename>conf/distro/include/init-manager-*.conf</filename>).
6617 Include files are provided for four values: "none", "sysvinit",
6618 "systemd", and "mdev-busybox".
6619 The default value, "none", for <filename>INIT_MANAGER</filename>
6620 should allow your current settings to continue working.
6621 However, it is advisable to explicitly set
6622 <filename>INIT_MANAGER</filename>.
6623 </para>
6624 </section>
6625
6626 <section id='migration-3.0-lsb-support-removed'>
6627 <title>LSB Support Removed</title>
6628
6629 <para>
6630 Linux Standard Base (LSB) as a standard is not current, and
6631 is not well suited for embedded applications.
6632 Support can be continued in a separate layer if needed.
6633 However, presently LSB support has been removed from the core.
6634 </para>
6635
6636 <para>
6637 As a result of this change, the <filename>poky-lsb</filename>
6638 derivative distribution configuration that was also used for
6639 testing alternative configurations has been replaced with a
6640 <filename>poky-altcfg</filename> distribution that has LSB
6641 parts removed.
6642 </para>
6643 </section>
6644
6645 <section id='migration-3.0-removed-recipes'>
6646 <title>Removed Recipes</title>
6647
6648 <para>
6649 The following recipes have been removed.
6650 <itemizedlist>
6651 <listitem><para>
6652 <filename>core-image-lsb-dev</filename>: Part of removed
6653 LSB support.
6654 </para></listitem>
6655 <listitem><para>
6656 <filename>core-image-lsb</filename>: Part of removed
6657 LSB support.
6658 </para></listitem>
6659 <listitem><para>
6660 <filename>core-image-lsb-sdk</filename>: Part of removed
6661 LSB support.
6662 </para></listitem>
6663 <listitem><para>
6664 <filename>cve-check-tool</filename>: Functionally replaced
6665 by the <filename>cve-update-db</filename> recipe and
6666 <filename>cve-check</filename> class.
6667 </para></listitem>
6668 <listitem><para>
6669 <filename>eglinfo</filename>: No longer maintained.
6670 <filename>eglinfo</filename> from
6671 <filename>mesa-demos</filename> is an adequate and
6672 maintained alternative.
6673 </para></listitem>
6674 <listitem><para>
6675 <filename>gcc-8.3</filename>: Version 8.3 removed.
6676 Replaced by 9.2.
6677 </para></listitem>
6678 <listitem><para>
6679 <filename>gnome-themes-standard</filename>: Only needed
6680 by gtk+ 2.x, which has been removed.
6681 </para></listitem>
6682 <listitem><para>
6683 <filename>gtk+</filename>: GTK+ 2 is obsolete and has been
6684 replaced by gtk+3.
6685 </para></listitem>
6686 <listitem><para>
6687 <filename>irda-utils</filename>: Has become obsolete.
6688 IrDA support has been removed from the Linux kernel in
6689 version 4.17 and later.
6690 </para></listitem>
6691 <listitem><para>
6692 <filename>libnewt-python</filename>:
6693 <filename>libnewt</filename> Python support merged into
6694 main <filename>libnewt</filename> recipe.
6695 </para></listitem>
6696 <listitem><para>
6697 <filename>libsdl</filename>: Replaced by newer
6698 <filename>libsdl2</filename>.
6699 </para></listitem>
6700 <listitem><para>
6701 <filename>libx11-diet</filename>: Became obsolete.
6702 </para></listitem>
6703 <listitem><para>
6704 <filename>libxx86dga</filename>: Removed obsolete client
6705 library.
6706 </para></listitem>
6707 <listitem><para>
6708 <filename>libxx86misc</filename>: Removed. Library is
6709 redundant.
6710 </para></listitem>
6711 <listitem><para>
6712 <filename>linux-yocto</filename>: Version 5.0 removed,
6713 which is now redundant (5.2 / 4.19 present).
6714 </para></listitem>
6715 <listitem><para>
6716 <filename>lsbinitscripts</filename>: Part of removed LSB
6717 support.
6718 </para></listitem>
6719 <listitem><para>
6720 <filename>lsb</filename>: Part of removed LSB support.
6721 </para></listitem>
6722 <listitem><para>
6723 <filename>lsbtest</filename>: Part of removed LSB support.
6724 </para></listitem>
6725 <listitem><para>
6726 <filename>openssl10</filename>: Replaced by newer
6727 <filename>openssl</filename> version 1.1.
6728 </para></listitem>
6729 <listitem><para>
6730 <filename>packagegroup-core-lsb</filename>: Part of removed
6731 LSB support.
6732 </para></listitem>
6733 <listitem><para>
6734 <filename>python-nose</filename>: Removed the Python 2.x
6735 version of the recipe.
6736 </para></listitem>
6737 <listitem><para>
6738 <filename>python-numpy</filename>: Removed the Python 2.x
6739 version of the recipe.
6740 </para></listitem>
6741 <listitem><para>
6742 <filename>python-scons</filename>: Removed the Python 2.x
6743 version of the recipe.
6744 </para></listitem>
6745 <listitem><para>
6746 <filename>source-highlight</filename>: No longer needed.
6747 </para></listitem>
6748 <listitem><para>
6749 <filename>stress</filename>: Replaced by
6750 <filename>stress-ng</filename>.
6751 </para></listitem>
6752 <listitem><para>
6753 <filename>vulkan</filename>: Split into
6754 <filename>vulkan-loader</filename>,
6755 <filename>vulkan-headers</filename>, and
6756 <filename>vulkan-tools</filename>.
6757 </para></listitem>
6758 <listitem><para>
6759 <filename>weston-conf</filename>: Functionality moved to
6760 <filename>weston-init</filename>.
6761 </para></listitem>
6762 </itemizedlist>
6763 </para>
6764 </section>
6765
6766 <section id='migration-3.0-packaging-changes'>
6767 <title>Packaging Changes</title>
6768
6769 <para>
6770 The following packaging changes have occurred.
6771 <itemizedlist>
6772 <listitem><para>
6773 The
6774 <ulink url='https://en.wikipedia.org/wiki/GNOME_Web'>Epiphany</ulink>
6775 browser has been dropped from
6776 <filename>packagegroup-self-hosted</filename> as it has
6777 not been needed inside
6778 <filename>build-appliance-image</filename> for
6779 quite some time and was causing resource problems.
6780 </para></listitem>
6781 <listitem><para>
6782 <filename>libcap-ng</filename> Python support has been
6783 moved to a separate <filename>libcap-ng-python</filename>
6784 recipe to streamline the build process when the Python
6785 bindings are not needed.
6786 </para></listitem>
6787 <listitem><para>
6788 <filename>libdrm</filename> now packages the file
6789 <filename>amdgpu.ids</filename> into a separate
6790 <filename>libdrm-amdgpu</filename> package.
6791 </para></listitem>
6792 <listitem><para>
6793 <filename>python3</filename>: The
6794 <filename>runpy</filename> module is now in the
6795 <filename>python3-core</filename> package as it is
6796 required to support the common "python3 -m" command usage.
6797 </para></listitem>
6798 <listitem><para>
6799 <filename>distcc</filename> now provides separate
6800 <filename>distcc-client</filename> and
6801 <filename>distcc-server</filename> packages as typically
6802 one or the other are needed, rather than both.
6803 </para></listitem>
6804 <listitem><para>
6805 <filename>python*-setuptools</filename> recipes now
6806 separately package the <filename>pkg_resources</filename>
6807 module in a <filename>python-pkg-resources</filename> /
6808 <filename>python3-pkg-resources</filename> package as
6809 the module is useful independent of the rest of the
6810 setuptools package.
6811 The main <filename>python-setuptools</filename> /
6812 <filename>python3-setuptools</filename> package depends
6813 on this new package so you should only need to update
6814 dependencies unless you want to take advantage of the
6815 increased granularity.
6816 </para></listitem>
6817 </itemizedlist>
6818 </para>
6819 </section>
6820
6821 <section id='migration-3.0-cve-checking'>
6822 <title>CVE Checking</title>
6823
6824 <para>
6825 <filename>cve-check-tool</filename> has been functionally replaced
6826 by a new <filename>cve-update-db</filename> recipe and
6827 functionality built into the <filename>cve-check</filename> class.
6828 The result uses NVD JSON data feeds rather than the deprecated
6829 XML feeds that <filename>cve-check-tool</filename> was using,
6830 supports CVSSv3 scoring, and makes other improvements.
6831 </para>
6832
6833 <para>
6834 Additionally, the <filename>CVE_CHECK_CVE_WHITELIST</filename>
6835 variable has been replaced by
6836 <filename>CVE_CHECK_WHITELIST</filename>.
6837 </para>
6838 </section>
6839
6840 <section id='migration-3.0-bitbake-changes'>
6841 <title>Bitbake Changes</title>
6842
6843 <para>
6844 The following BitBake changes have occurred.
6845 <itemizedlist>
6846 <listitem><para>
6847 <filename>addtask</filename> statements now properly
6848 validate dependent tasks.
6849 Previously, an invalid task was silently ignored.
6850 With this change, the invalid task generates a warning.
6851 </para></listitem>
6852 <listitem><para>
6853 Other invalid <filename>addtask</filename> and
6854 <filename>deltask</filename> usages now trigger these
6855 warnings: "multiple target tasks arguments with
6856 addtask / deltask", and "multiple before/after clauses".
6857 </para></listitem>
6858 <listitem><para>
6859 The "multiconfig" prefix is now shortened to "mc".
6860 "multiconfig" will continue to work, however it may be
6861 removed in a future release.
6862 </para></listitem>
6863 <listitem><para>
6864 The <filename>bitbake -g</filename> command no longer
6865 generates a <filename>recipe-depends.dot</filename> file
6866 as the contents (i.e. a reprocessed version of
6867 <filename>task-depends.dot</filename>) were confusing.
6868 </para></listitem>
6869 <listitem><para>
6870 The <filename>bb.build.FuncFailed</filename> exception,
6871 previously raised by
6872 <filename>bb.build.exec_func()</filename> when certain
6873 other exceptions have occurred, has been removed.
6874 The real underlying exceptions will be raised instead.
6875 If you have calls to
6876 <filename>bb.build.exec_func()</filename> in custom classes
6877 or <filename>tinfoil-using</filename> scripts, any
6878 references to <filename>bb.build.FuncFailed</filename>
6879 should be cleaned up.
6880 </para></listitem>
6881 <listitem><para>
6882 Additionally, the
6883 <filename>bb.build.exec_func()</filename> no longer accepts
6884 the "pythonexception" parameter.
6885 The function now always raises exceptions.
6886 Remove this argument in any calls to
6887 <filename>bb.build.exec_func()</filename> in custom classes
6888 or scripts.
6889 </para></listitem>
6890 <listitem><para>
6891 The
6892 <ulink url='&YOCTO_DOCS_BB_URL;#var-bb-BB_SETSCENE_VERIFY_FUNCTION2'><filename>BB_SETSCENE_VERIFY_FUNCTION2</filename></ulink>
6893 is no longer used.
6894 In the unlikely event that you have any references to it,
6895 they should be removed.
6896 </para></listitem>
6897 <listitem><para>
6898 The <filename>RunQueueExecuteScenequeue</filename> and
6899 <filename>RunQueueExecuteTasks</filename> events have been
6900 removed since setscene tasks are now executed as part of
6901 the normal runqueue.
6902 Any event handling code in custom classes or scripts that
6903 handles these two events need to be updated.
6904 </para></listitem>
6905 <listitem><para>
6906 The arguments passed to functions used with
6907 <ulink url='&YOCTO_DOCS_BB_URL;#var-bb-BB_HASHCHECK_FUNCTION'><filename>BB_HASHCHECK_FUNCTION</filename></ulink>
6908 have changed.
6909 If you are using your own custom hash check function, see
6910 <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=40a5e193c4ba45c928fccd899415ea56b5417725'></ulink>
6911 for details.
6912 </para></listitem>
6913 <listitem><para>
6914 Task specifications in <filename>BB_TASKDEPDATA</filename>
6915 and class implementations used in signature generator
6916 classes now use "&lt;fn&gt;:&lt;task&gt;" everywhere rather than
6917 the "." delimiter that was being used in some places.
6918 This change makes it consistent with all areas in the code.
6919 Custom signature generator classes and code that reads
6920 <filename>BB_TASKDEPDATA</filename> need to be updated to
6921 use ':' as a separator rather than '.'.
6922 </para></listitem>
6923 </itemizedlist>
6924 </para>
6925 </section>
6926
6927 <section id='migration-3.0-sanity-checks'>
6928 <title>Sanity Checks</title>
6929
6930 <para>
6931 The following sanity check changes occurred.
6932 <itemizedlist>
6933 <listitem><para>
6934 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
6935 is now checked for usage of two problematic items:
6936 <itemizedlist>
6937 <listitem><para>
6938 "${PN}" prefix/suffix use - Warnings always appear
6939 if ${PN} is used.
6940 You must fix the issue regardless of whether
6941 multiconfig or anything else that would cause
6942 prefixing/suffixing to happen.
6943 </para></listitem>
6944 <listitem><para>
6945 Github archive tarballs - these are not guaranteed
6946 to be stable.
6947 Consequently, it is likely that the tarballs will
6948 be refreshed and thus the SRC_URI checksums
6949 will fail to apply.
6950 It is recommended that you fetch either an official
6951 release tarball or a specific revision from the
6952 actual Git repository instead.
6953 </para></listitem>
6954 </itemizedlist>
6955 Either one of these items now trigger a warning by default.
6956 If you wish to disable this check, remove
6957 <filename>src-uri-bad</filename> from
6958 <link linkend='var-WARN_QA'><filename>WARN_QA</filename></link>.
6959 </para></listitem>
6960 <listitem><para>
6961 The <filename>file-rdeps</filename> runtime dependency
6962 check no longer expands
6963 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>
6964 recursively as there is no mechanism to ensure they can be
6965 fully computed, and thus races sometimes result in errors
6966 either showing up or not.
6967 Thus, you might now see errors for missing runtime
6968 dependencies that were previously satisfied recursively.
6969 Here is an example: package A contains a shell script
6970 starting with <filename>#!/bin/bash</filename> but has no
6971 dependency on bash.
6972 However, package A depends on package B, which does depend
6973 on bash.
6974 You need to add the missing dependency or dependencies to
6975 resolve the warning.
6976 </para></listitem>
6977 <listitem><para>
6978 Setting <filename>DEPENDS_${PN}</filename> anywhere
6979 (i.e. typically in a recipe) now triggers an error.
6980 The error is triggered because
6981 <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>
6982 is not a package-specific variable unlike RDEPENDS.
6983 You should set <filename>DEPENDS</filename> instead.
6984 </para></listitem>
6985 <listitem><para>
6986 systemd currently does not work well with the musl C
6987 library because only upstream officially supports linking
6988 the library with glibc.
6989 Thus, a warning is shown when building systemd in
6990 conjunction with musl.
6991 </para></listitem>
6992 </itemizedlist>
6993 </para>
6994 </section>
6995
6996 <section id='migration-3.0-miscellaneous-changes'>
6997 <title>Miscellaneous Changes</title>
6998
6999 <para>
7000 The following miscellaneous changes have occurred.
7001 <itemizedlist>
7002 <listitem><para>
7003 The <filename>gnome</filename>
7004 class has been removed because it now does very little.
7005 You should update recipes that previously inherited this
7006 class to do the following:
7007 <literallayout class='monospaced'>
7008 inherit gnomebase gtk-icon-cache gconf mime
7009 </literallayout>
7010 </para></listitem>
7011 <listitem><para>
7012 The
7013 <filename>meta/recipes-kernel/linux/linux-dtb.inc</filename>
7014 file has been removed.
7015 This file was previously deprecated in favor of setting
7016 <link linkend='var-KERNEL_DEVICETREE'><filename>KERNEL_DEVICETREE</filename></link>
7017 in any kernel recipe and only produced a warning.
7018 Remove any <filename>include</filename> or
7019 <filename>require</filename> statements pointing to this
7020 file.
7021 </para></listitem>
7022 <listitem><para>
7023 <link linkend='var-TARGET_CFLAGS'><filename>TARGET_CFLAGS</filename></link>,
7024 <link linkend='var-TARGET_CPPFLAGS'><filename>TARGET_CPPFLAGS</filename></link>,
7025 <link linkend='var-TARGET_CXXFLAGS'><filename>TARGET_CXXFLAGS</filename></link>,
7026 and
7027 <link linkend='var-TARGET_LDFLAGS'><filename>TARGET_LDFLAGS</filename></link>
7028 are no longer exported to the external environment.
7029 This change did not require any changes to core recipes,
7030 which is a good indicator that no changes will be
7031 required.
7032 However, if for some reason the software being built by one
7033 of your recipes is expecting these variables to be set,
7034 then building the recipe will fail.
7035 In such cases, you must either export the variable or
7036 variables in the recipe or change the scripts so that
7037 exporting is not necessary.
7038 </para></listitem>
7039 <listitem><para>
7040 You must change the host distro identifier used in
7041 <link linkend='var-NATIVELSBSTRING'><filename>NATIVELSBSTRING</filename></link>
7042 to use all lowercase characters even if it does not contain
7043 a version number.
7044 This change is necessary only if you are not using
7045 <filename>uninative</filename> and
7046 <link linkend='var-SANITY_TESTED_DISTROS'><filename>SANITY_TESTED_DISTROS</filename></link>.
7047 </para></listitem>
7048 <listitem><para>
7049 In the <filename>base-files</filename> recipe, writing the
7050 hostname into <filename>/etc/hosts</filename> and
7051 <filename>/etc/hostname</filename> is now done within the
7052 main
7053 <link linkend='ref-tasks-install'><filename>do_install</filename></link>
7054 function rather than in the
7055 <filename>do_install_basefilesissue</filename> function.
7056 The reason for the change is because
7057 <filename>do_install_basefilesissue</filename> is more
7058 easily overridden without having to duplicate the hostname
7059 functionality.
7060 If you have done the latter (e.g. in a
7061 <filename>base-files</filename> bbappend), then you should
7062 remove it from your customized
7063 <filename>do_install_basefilesissue</filename> function.
7064 </para></listitem>
7065 <listitem><para>
7066 The <filename>wic --expand</filename> command now uses
7067 commas to separate "key:value" pairs rather than hyphens.
7068 <note>
7069 The wic command-line help is not updated.
7070 </note>
7071 You must update any scripts or commands where you use
7072 <filename>wic --expand</filename> with multiple
7073 "key:value" pairs.
7074 </para></listitem>
7075 <listitem><para>
7076 UEFI image variable settings have been moved from various
7077 places to a central
7078 <filename>conf/image-uefi.conf</filename>.
7079 This change should not influence any existing configuration
7080 as the <filename>meta/conf/image-uefi.conf</filename>
7081 in the core metadata sets defaults that can be overridden
7082 in the same manner as before.
7083 </para></listitem>
7084 <listitem><para>
7085 <filename>conf/distro/include/world-broken.inc</filename>
7086 has been removed.
7087 For cases where certain recipes need to be disabled when
7088 using the musl C library, these recipes now have
7089 <filename>COMPATIBLE_HOST_libc-musl</filename> set with a
7090 comment that explains why.
7091 </para></listitem>
7092 </itemizedlist>
7093 </para>
7094 </section>
7095</section>
7096
7097
7098<section id='moving-to-the-yocto-project-3.1-release'>
7099 <title>Moving to the Yocto Project 3.1 Release</title>
7100
7101 <para>
7102 This section provides migration information for moving to the
7103 Yocto Project 3.1 Release from the prior release.
7104 </para>
7105
7106 <section id='migration-3.1-minimum-system-requirements'>
7107 <title>Minimum system requirements</title>
7108
7109 <para>
7110 The following versions / requirements of build host components have been updated:
7111 <itemizedlist>
7112 <listitem><para>gcc 5.0</para></listitem>
7113 <listitem><para>python 3.5</para></listitem>
7114 <listitem><para>tar 1.28</para></listitem>
7115 <listitem><para><filename>rpcgen</filename> is now required on the host (part of the <filename>libc-dev-bin</filename> package on Ubuntu, Debian and related distributions, and the <filename>glibc</filename> package on RPM-based distributions).</para></listitem>
7116 </itemizedlist>
7117
7118 Additionally, the <filename>makeinfo</filename> and <filename>pod2man</filename>
7119 tools are <emphasis>no longer</emphasis> required on the host.
7120 </para>
7121 </section>
7122
7123 <section id='migration-3.1-mpc8315e-rdb-removed'>
7124 <title>mpc8315e-rdb machine removed</title>
7125
7126 <para>
7127 The MPC8315E-RDB machine is old/obsolete and unobtainable, thus given the maintenance burden
7128 the <filename>mpc8315e-rdb</filename> machine configuration that supported it has been removed
7129 in this release. The removal does leave a gap in official PowerPC reference hardware
7130 support; this may change in future if a suitable machine with accompanying support resources
7131 is found.
7132 </para>
7133 </section>
7134
7135 <section id='migration-3.1-python-2-removed'>
7136 <title>Python 2 removed</title>
7137
7138 <para>
7139 Due to the expiration of upstream support in January 2020, support for Python 2 has now been removed; it is recommended that you use Python 3 instead. If absolutely needed there is a meta-python2 community layer containing Python 2, related classes and various Python 2-based modules, however it should not be considered as supported.
7140 </para>
7141 </section>
7142
7143 <section id='migration-3.1-reproducible-builds'>
7144 <title>Reproducible builds now enabled by default</title>
7145
7146 <para>
7147 In order to avoid unnecessary differences in output files (aiding binary reproducibility), the Poky distribution configuration (<filename><link linkend='var-DISTRO'>DISTRO</link> = "poky"</filename>) now inherits the <filename>reproducible_build</filename> class by default.
7148 </para>
7149 </section>
7150
7151 <section id='migration-3.1-ptest-feature-impact'>
7152 <title>Impact of ptest feature is now more significant</title>
7153
7154 <para>
7155 The Poky distribution configuration (<filename><link linkend='var-DISTRO'>DISTRO</link> = "poky"</filename>) enables ptests by default to enable runtime testing of various components. In this release, a dependency needed to be added that has resulted in a significant increase in the number of components that will be built just when building a simple image such as core-image-minimal. If you do not need runtime tests enabled for core components, then it is recommended that you remove "ptest" from <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link> to save a significant amount of build time e.g. by adding the following in your configuration:
7156
7157 <literallayout class='monospaced'>
7158 DISTRO_FEATURES_remove = "ptest"
7159 </literallayout>
7160 </para>
7161 </section>
7162
7163 <section id='migration-3.1-removed-recipes'>
7164 <title>Removed recipes</title>
7165
7166 <para>
7167 The following recipes have been removed:
7168
7169 <itemizedlist>
7170 <listitem><para><filename>chkconfig</filename>: obsolete</para></listitem>
7171 <listitem><para><filename>console-tools</filename>: obsolete</para></listitem>
7172 <listitem><para><filename>enchant</filename>: replaced by <filename>enchant2</filename></para></listitem>
7173 <listitem><para><filename>foomatic-filters</filename>: obsolete</para></listitem>
7174 <listitem><para><filename>libidn</filename>: no longer needed, moved to meta-oe</para></listitem>
7175 <listitem><para><filename>libmodulemd</filename>: replaced by <filename>libmodulemd-v1</filename></para></listitem>
7176 <listitem><para><filename>linux-yocto</filename>: drop 4.19, 5.2 version recipes (5.4 now provided)</para></listitem>
7177 <listitem><para><filename>nspr</filename>: no longer needed, moved to meta-oe</para></listitem>
7178 <listitem><para><filename>nss</filename>: no longer needed, moved to meta-oe</para></listitem>
7179 <listitem><para><filename>python</filename>: Python 2 removed (Python 3 preferred)</para></listitem>
7180 <listitem><para><filename>python-setuptools</filename>: Python 2 version removed (python3-setuptools preferred)</para></listitem>
7181 <listitem><para><filename>sysprof</filename>: no longer needed, moved to meta-oe</para></listitem>
7182 <listitem><para><filename>texi2html</filename>: obsolete</para></listitem>
7183 <listitem><para><filename>u-boot-fw-utils</filename>: functionally replaced by <filename>libubootenv</filename></para></listitem>
7184 </itemizedlist>
7185 </para>
7186 </section>
7187
7188 <section id='migration-3.1-features-check'>
7189 <title>features_check class replaces distro_features_check</title>
7190
7191 <para>
7192 The <filename>distro_features_check</filename> class has had its functionality expanded, now supporting <filename>ANY_OF_MACHINE_FEATURES</filename>, <filename>REQUIRED_MACHINE_FEATURES</filename>, <filename>CONFLICT_MACHINE_FEATURES</filename>, <filename>ANY_OF_COMBINED_FEATURES</filename>, <filename>REQUIRED_COMBINED_FEATURES</filename>, <filename>CONFLICT_COMBINED_FEATURES</filename>. As a result the class has now been renamed to <filename>features_check</filename>; the <filename>distro_features_check</filename> class still exists but generates a warning and redirects to the new class. In preparation for a future removal of the old class it is recommended that you update recipes currently inheriting <filename>distro_features_check</filename> to inherit <filename>features_check</filename> instead.
7193 </para>
7194 </section>
7195
7196 <section id='migration-3.1-removed-classes'>
7197 <title>Removed classes</title>
7198
7199 <para>
7200 The following classes have been removed:
7201
7202 <itemizedlist>
7203 <listitem><para><filename>distutils-base</filename>: moved to meta-python2</para></listitem>
7204 <listitem><para><filename>distutils</filename>: moved to meta-python2</para></listitem>
7205 <listitem><para><filename>libc-common</filename>: merged into the glibc recipe as nothing else used it.</para></listitem>
7206 <listitem><para><filename>python-dir</filename>: moved to meta-python2</para></listitem>
7207 <listitem><para><filename>pythonnative</filename>: moved to meta-python2</para></listitem>
7208 <listitem><para><filename>setuptools</filename>: moved to meta-python2</para></listitem>
7209 <listitem><para><filename>tinderclient</filename>: dropped as it was obsolete.</para></listitem>
7210 </itemizedlist>
7211 </para>
7212 </section>
7213
7214 <section id='migration-3.1-src-uri-checksums'>
7215 <title>SRC_URI checksum behaviour</title>
7216
7217 <para>
7218 Previously, recipes by tradition included both SHA256 and MD5 checksums for remotely fetched files in <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>, even though only one is actually mandated. However, the MD5 checksum does not add much given its inherent weakness; thus when a checksum fails only the SHA256 sum will now be printed. The md5sum will still be verified if it is specified.
7219 </para>
7220 </section>
7221
7222
7223 <section id='migration-3.1-npm'>
7224 <title>npm fetcher changes</title>
7225
7226 <para>
7227 The npm fetcher has been completely reworked in this release. The npm fetcher now only fetches the package source itself and no longer the dependencies; there is now also an npmsw fetcher which explicitly fetches the shrinkwrap file and the dependencies. This removes the slightly awkward <filename>NPM_LOCKDOWN</filename> and <filename>NPM_SHRINKWRAP</filename> variables which pointed to local files; the lockdown file is no longer needed at all. Additionally, the package name in <filename>npm://</filename> entries in <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link> is now specified using a <filename>package</filename> parameter instead of the earlier <filename>name</filename> which overlapped with the generic <filename>name</filename> parameter. All recipes using the npm fetcher will need to be changed as a result.
7228 </para>
7229 <para>
7230 An example of the new scheme:
7231 <literallayout class='monospaced'>
7232SRC_URI = "npm://registry.npmjs.org;package=array-flatten;version=1.1.1 \
7233 npmsw://${THISDIR}/npm-shrinkwrap.json"
7234 </literallayout>
7235 Another example where the sources are fetched from git rather than an npm repository:
7236 <literallayout class='monospaced'>
7237SRC_URI = "git://github.com/foo/bar.git;protocol=https \
7238 npmsw://${THISDIR}/npm-shrinkwrap.json"
7239 </literallayout>
7240 </para>
7241 <para>
7242 devtool and recipetool have also been updated to match with the npm fetcher changes. Other than producing working and more complete recipes for npm sources, there is also a minor change to the command line for devtool: the <filename>--fetch-dev</filename> option has been renamed to <filename>--npm-dev</filename> as it is npm-specific.
7243 </para>
7244 </section>
7245
7246
7247 <section id='migration-3.1-packaging-changes'>
7248 <title>Packaging changes</title>
7249
7250 <para>
7251 <itemizedlist>
7252 <listitem><para><filename>intltool</filename> has been removed from <filename>packagegroup-core-sdk</filename> as it is rarely needed to build modern software - gettext can do most of the things it used to be needed for. <filename>intltool</filename> has also been removed from <filename>packagegroup-core-self-hosted</filename> as it is not needed to for standard builds.</para></listitem>
7253 <listitem><para>git: <filename>git-am</filename>, <filename>git-difftool</filename>, <filename>git-submodule</filename>, and <filename>git-request-pull</filename> are no longer perl-based, so are now installed with the main <filename>git</filename> package instead of within <filename>git-perltools</filename>.</para></listitem>
7254 <listitem><para>The <filename>ldconfig</filename> binary built as part of glibc has now been moved to its own <filename>ldconfig</filename> package (note no <filename>glibc-</filename> prefix). This package is in the <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link> of the main <filename>glibc</filename> package if <filename>ldconfig</filename> is present in <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>.</para></listitem>
7255 <listitem><para><filename>libevent</filename> now splits each shared library into its own package (as Debian does). Since these are shared libraries and will be pulled in through the normal shared library dependency handling, there should be no impact to existing configurations other than less unnecessary libraries being installed in some cases.</para></listitem>
7256 <listitem><para>linux-firmware now has a new package for <filename>bcm4366c</filename> and includes available NVRAM config files into the <filename>bcm43340</filename>, <filename>bcm43362</filename>, <filename>bcm43430</filename> and <filename>bcm4356-pcie</filename> packages.</para></listitem>
7257 <listitem><para><filename>harfbuzz</filename> now splits the new <filename>libharfbuzz-subset.so</filename> library into its own package to reduce the main package size in cases where <filename>libharfbuzz-subset.so</filename> is not needed.</para></listitem>
7258 </itemizedlist>
7259 </para>
7260 </section>
7261
7262 <section id='migration-3.1-package-qa-warnings'>
7263 <title>Additional warnings</title>
7264
7265 <para>
7266 Warnings will now be shown at <filename>do_package_qa</filename> time in the following circumstances:
7267
7268 <itemizedlist>
7269 <listitem><para>A recipe installs <filename>.desktop</filename> files containing <filename>MimeType</filename> keys but does not inherit the new <filename>mime-xdg</filename> class</para></listitem>
7270 <listitem><para>A recipe installs <filename>.xml</filename> files into <filename>${datadir}/mime/packages</filename> but does not inherit the <filename>mime</filename> class</para></listitem>
7271 </itemizedlist>
7272 </para>
7273 </section>
7274
7275 <section id='migration-3.1-x86-live-wic'>
7276 <title><filename>wic</filename> image type now used instead of <filename>live</filename> by default for x86</title>
7277
7278 <para>
7279 <filename>conf/machine/include/x86-base.inc</filename> (inherited by most x86 machine configurations) now specifies <filename>wic</filename> instead of <filename>live</filename> by default in <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>. The <filename>live</filename> image type will likely be removed in a future release so it is recommended that you use <filename>wic</filename> instead.
7280 </para>
7281 </section>
7282
7283 <section id='migration-3.1-misc'>
7284 <title>Miscellaneous changes</title>
7285
7286 <para>
7287 <itemizedlist>
7288 <listitem><para>The undocumented <filename>SRC_DISTRIBUTE_LICENSES</filename> variable has now been removed in favour of a new <filename>AVAILABLE_LICENSES</filename> variable which is dynamically set based upon license files found in <filename>${COMMON_LICENSE_DIR}</filename> and <filename>${LICENSE_PATH}</filename>.</para></listitem>
7289 <listitem><para>The tune definition for big-endian microblaze machines is now <filename>microblaze</filename> instead of <filename>microblazeeb</filename>.</para></listitem>
7290 <listitem><para><filename>newlib</filename> no longer has built-in syscalls. <filename>libgloss</filename> should then provide the syscalls, <filename>crt0.o</filename> and other functions that are no longer part of <filename>newlib</filename> itself. If you are using <filename>TCLIBC = "newlib"</filename> this now means that you must link applications with both <filename>newlib</filename> and <filename>libgloss</filename>, whereas before <filename>newlib</filename> would run in many configurations by itself.</para></listitem>
7291 </itemizedlist>
7292 </para>
7293 </section>
7294
7295</section>
7296
7297
7298</chapter>
7299<!--
7300vim: expandtab tw=80 ts=4
7301-->
diff --git a/documentation/ref-manual/ref-classes.xml b/documentation/ref-manual/ref-classes.xml
deleted file mode 100644
index 1dcd5fdd03..0000000000
--- a/documentation/ref-manual/ref-classes.xml
+++ /dev/null
@@ -1,3974 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='ref-classes'>
7<title>Classes</title>
8
9<para>
10 Class files are used to abstract common functionality and share it amongst
11 multiple recipe (<filename>.bb</filename>) files.
12 To use a class file, you simply make sure the recipe inherits the class.
13 In most cases, when a recipe inherits a class it is enough to enable its
14 features.
15 There are cases, however, where in the recipe you might need to set
16 variables or override some default behavior.
17</para>
18
19<para>
20 Any <link linkend='metadata'>Metadata</link> usually
21 found in a recipe can also be placed in a class file.
22 Class files are identified by the extension <filename>.bbclass</filename>
23 and are usually placed in a <filename>classes/</filename> directory beneath
24 the <filename>meta*/</filename> directory found in the
25 <link linkend='source-directory'>Source Directory</link>.
26 Class files can also be pointed to by
27 <link linkend='var-BUILDDIR'><filename>BUILDDIR</filename></link>
28 (e.g. <filename>build/</filename>) in the same way as
29 <filename>.conf</filename> files in the <filename>conf</filename> directory.
30 Class files are searched for in
31 <link linkend='var-BBPATH'><filename>BBPATH</filename></link>
32 using the same method by which <filename>.conf</filename> files are
33 searched.
34</para>
35
36<para>
37 This chapter discusses only the most useful and important classes.
38 Other classes do exist within the <filename>meta/classes</filename>
39 directory in the Source Directory.
40 You can reference the <filename>.bbclass</filename> files directly
41 for more information.
42</para>
43
44<section id='ref-classes-allarch'>
45 <title><filename>allarch.bbclass</filename></title>
46
47 <para>
48 The <filename>allarch</filename> class is inherited
49 by recipes that do not produce architecture-specific output.
50 The class disables functionality that is normally needed for recipes
51 that produce executable binaries (such as building the cross-compiler
52 and a C library as pre-requisites, and splitting out of debug symbols
53 during packaging).
54 <note>
55 <para>Unlike some distro recipes (e.g. Debian), OpenEmbedded recipes
56 that produce packages that depend on tunings through use of the
57 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>
58 and
59 <link linkend='var-TUNE_PKGARCH'><filename>TUNE_PKGARCH</filename></link>
60 variables, should never be configured for all architectures
61 using <filename>allarch</filename>.
62 This is the case even if the recipes do not produce
63 architecture-specific output.</para>
64 <para>Configuring such recipes for all architectures causes the
65 <link linkend='ref-tasks-package_write_deb'><filename>do_package_write_*</filename></link>
66 tasks to have different signatures for the machines with different
67 tunings.
68 Additionally, unnecessary rebuilds occur every time an
69 image for a different <filename>MACHINE</filename> is built
70 even when the recipe never changes.</para>
71 </note>
72 </para>
73
74 <para>
75 By default, all recipes inherit the
76 <link linkend='ref-classes-base'><filename>base</filename></link> and
77 <link linkend='ref-classes-package'><filename>package</filename></link>
78 classes, which enable functionality
79 needed for recipes that produce executable output.
80 If your recipe, for example, only produces packages that contain
81 configuration files, media files, or scripts (e.g. Python and Perl),
82 then it should inherit the <filename>allarch</filename> class.
83 </para>
84</section>
85
86<section id='ref-classes-archiver'>
87 <title><filename>archiver.bbclass</filename></title>
88
89 <para>
90 The <filename>archiver</filename> class supports releasing
91 source code and other materials with the binaries.
92 </para>
93
94 <para>
95 For more details on the source archiver, see the
96 "<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle'>Maintaining Open Source License Compliance During Your Product's Lifecycle</ulink>"
97 section in the Yocto Project Development Tasks Manual.
98 You can also see the
99 <link linkend='var-ARCHIVER_MODE'><filename>ARCHIVER_MODE</filename></link>
100 variable for information about the variable flags (varflags)
101 that help control archive creation.
102 </para>
103</section>
104
105<section id='ref-classes-autotools'>
106 <title><filename>autotools*.bbclass</filename></title>
107
108 <para>
109 The <filename>autotools*</filename> classes support Autotooled
110 packages.
111 </para>
112
113 <para>
114 The <filename>autoconf</filename>, <filename>automake</filename>,
115 and <filename>libtool</filename> packages bring standardization.
116 This class defines a set of tasks (e.g.
117 <filename>configure</filename>, <filename>compile</filename> and
118 so forth) that
119 work for all Autotooled packages.
120 It should usually be enough to define a few standard variables
121 and then simply <filename>inherit autotools</filename>.
122 These classes can also work with software that emulates Autotools.
123 For more information, see the
124 "<ulink url='&YOCTO_DOCS_DEV_URL;#new-recipe-autotooled-package'>Autotooled Package</ulink>"
125 section in the Yocto Project Development Tasks Manual.
126 </para>
127
128 <para>
129 By default, the <filename>autotools*</filename> classes
130 use out-of-tree builds (i.e.
131 <filename>autotools.bbclass</filename> building with
132 <filename>B != S</filename>).
133 </para>
134
135 <para>
136 If the software being built by a recipe does not support
137 using out-of-tree builds, you should have the recipe inherit the
138 <filename>autotools-brokensep</filename> class.
139 The <filename>autotools-brokensep</filename> class behaves the same
140 as the <filename>autotools</filename> class but builds with
141 <link linkend='var-B'><filename>B</filename></link> ==
142 <link linkend='var-S'><filename>S</filename></link>.
143 This method is useful when out-of-tree build support is either not
144 present or is broken.
145 <note>
146 It is recommended that out-of-tree support be fixed and used
147 if at all possible.
148 </note>
149 </para>
150
151 <para>
152 It's useful to have some idea of how the tasks defined by
153 the <filename>autotools*</filename> classes work and what they do
154 behind the scenes.
155 <itemizedlist>
156 <listitem><para><link linkend='ref-tasks-configure'><filename>do_configure</filename></link> -
157 Regenerates the
158 configure script (using <filename>autoreconf</filename>) and
159 then launches it with a standard set of arguments used during
160 cross-compilation.
161 You can pass additional parameters to
162 <filename>configure</filename> through the
163 <filename><link linkend='var-EXTRA_OECONF'>EXTRA_OECONF</link></filename>
164 or
165 <link linkend='var-PACKAGECONFIG_CONFARGS'><filename>PACKAGECONFIG_CONFARGS</filename></link>
166 variables.
167 </para></listitem>
168 <listitem><para><link linkend='ref-tasks-compile'><filename>do_compile</filename></link> -
169 Runs <filename>make</filename> with arguments that specify the
170 compiler and linker.
171 You can pass additional arguments through
172 the <filename><link linkend='var-EXTRA_OEMAKE'>EXTRA_OEMAKE</link></filename>
173 variable.
174 </para></listitem>
175 <listitem><para><link linkend='ref-tasks-install'><filename>do_install</filename></link> -
176 Runs <filename>make install</filename> and passes in
177 <filename>${</filename><link linkend='var-D'><filename>D</filename></link><filename>}</filename>
178 as <filename>DESTDIR</filename>.
179 </para></listitem>
180 </itemizedlist>
181 </para>
182</section>
183
184<section id='ref-classes-base'>
185 <title><filename>base.bbclass</filename></title>
186
187 <para>
188 The <filename>base</filename> class is special in that every
189 <filename>.bb</filename> file implicitly inherits the class.
190 This class contains definitions for standard basic
191 tasks such as fetching, unpacking, configuring (empty by default),
192 compiling (runs any <filename>Makefile</filename> present), installing
193 (empty by default) and packaging (empty by default).
194 These classes are often overridden or extended by other classes
195 such as the
196 <link linkend='ref-classes-autotools'><filename>autotools</filename></link>
197 class or the
198 <link linkend='ref-classes-package'><filename>package</filename></link>
199 class.
200 </para>
201
202 <para>
203 The class also contains some commonly used functions such as
204 <filename>oe_runmake</filename>, which runs
205 <filename>make</filename> with the arguments specified in
206 <link linkend='var-EXTRA_OEMAKE'><filename>EXTRA_OEMAKE</filename></link>
207 variable as well as the arguments passed directly to
208 <filename>oe_runmake</filename>.
209 </para>
210</section>
211
212<section id='ref-classes-bash-completion'>
213 <title><filename>bash-completion.bbclass</filename></title>
214
215 <para>
216 Sets up packaging and dependencies appropriate for recipes that
217 build software that includes bash-completion data.
218 </para>
219</section>
220
221<section id='ref-classes-bin-package'>
222 <title><filename>bin_package.bbclass</filename></title>
223
224 <para>
225 The <filename>bin_package</filename> class is a
226 helper class for recipes that extract the contents of a binary package
227 (e.g. an RPM) and install those contents rather than building the
228 binary from source.
229 The binary package is extracted and new packages in the configured
230 output package format are created.
231 Extraction and installation of proprietary binaries is a good example
232 use for this class.
233 <note>
234 For RPMs and other packages that do not contain a subdirectory,
235 you should specify an appropriate fetcher parameter to point to
236 the subdirectory.
237 For example, if BitBake is using the Git fetcher
238 (<filename>git://</filename>), the "subpath" parameter limits
239 the checkout to a specific subpath of the tree.
240 Here is an example where <filename>${BP}</filename> is used so that
241 the files are extracted into the subdirectory expected by the
242 default value of
243 <link linkend='var-S'><filename>S</filename></link>:
244 <literallayout class='monospaced'>
245 SRC_URI = "git://example.com/downloads/somepackage.rpm;subpath=${BP}"
246 </literallayout>
247 See the
248 "<ulink url='&YOCTO_DOCS_BB_URL;#bb-fetchers'>Fetchers</ulink>"
249 section in the BitBake User Manual for more information on
250 supported BitBake Fetchers.
251 </note>
252 </para>
253</section>
254
255<section id='ref-classes-binconfig'>
256 <title><filename>binconfig.bbclass</filename></title>
257
258 <para>
259 The <filename>binconfig</filename> class helps to correct paths in
260 shell scripts.
261 </para>
262
263 <para>
264 Before <filename>pkg-config</filename> had become widespread, libraries
265 shipped shell scripts to give information about the libraries and
266 include paths needed to build software (usually named
267 <filename>LIBNAME-config</filename>).
268 This class assists any recipe using such scripts.
269 </para>
270
271 <para>
272 During staging, the OpenEmbedded build system installs such scripts
273 into the <filename>sysroots/</filename> directory.
274 Inheriting this class results in all paths in these scripts being
275 changed to point into the <filename>sysroots/</filename> directory so
276 that all builds that use the script use the correct directories
277 for the cross compiling layout.
278 See the
279 <link linkend='var-BINCONFIG_GLOB'><filename>BINCONFIG_GLOB</filename></link>
280 variable for more information.
281 </para>
282</section>
283
284<section id='ref-classes-binconfig-disabled'>
285 <title><filename>binconfig-disabled.bbclass</filename></title>
286
287 <para>
288 An alternative version of the
289 <link linkend='ref-classes-binconfig'><filename>binconfig</filename></link>
290 class, which disables binary configuration scripts by making them
291 return an error in favor of using <filename>pkg-config</filename>
292 to query the information.
293 The scripts to be disabled should be specified using the
294 <link linkend='var-BINCONFIG'><filename>BINCONFIG</filename></link>
295 variable within the recipe inheriting the class.
296 </para>
297</section>
298
299<section id='ref-classes-blacklist'>
300 <title><filename>blacklist.bbclass</filename></title>
301
302 <para>
303 The <filename>blacklist</filename> class prevents
304 the OpenEmbedded build system from building specific recipes
305 (blacklists them).
306 To use this class, inherit the class globally and set
307 <link linkend='var-PNBLACKLIST'><filename>PNBLACKLIST</filename></link>
308 for each recipe you wish to blacklist.
309 Specify the <link linkend='var-PN'><filename>PN</filename></link>
310 value as a variable flag (varflag) and provide a reason, which is
311 reported, if the package is requested to be built as the value.
312 For example, if you want to blacklist a recipe called "exoticware",
313 you add the following to your <filename>local.conf</filename>
314 or distribution configuration:
315 <literallayout class='monospaced'>
316 INHERIT += "blacklist"
317 PNBLACKLIST[exoticware] = "Not supported by our organization."
318 </literallayout>
319 </para>
320</section>
321
322<section id='ref-classes-buildhistory'>
323 <title><filename>buildhistory.bbclass</filename></title>
324
325 <para>
326 The <filename>buildhistory</filename> class records a
327 history of build output metadata, which can be used to detect possible
328 regressions as well as used for analysis of the build output.
329 For more information on using Build History, see the
330 "<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-build-output-quality'>Maintaining Build Output Quality</ulink>"
331 section in the Yocto Project Development Tasks Manual.
332 </para>
333</section>
334
335<section id='ref-classes-buildstats'>
336 <title><filename>buildstats.bbclass</filename></title>
337
338 <para>
339 The <filename>buildstats</filename> class records
340 performance statistics about each task executed during the build
341 (e.g. elapsed time, CPU usage, and I/O usage).
342 </para>
343
344 <para>
345 When you use this class, the output goes into the
346 <link linkend='var-BUILDSTATS_BASE'><filename>BUILDSTATS_BASE</filename></link>
347 directory, which defaults to <filename>${TMPDIR}/buildstats/</filename>.
348 You can analyze the elapsed time using
349 <filename>scripts/pybootchartgui/pybootchartgui.py</filename>, which
350 produces a cascading chart of the entire build process and can be
351 useful for highlighting bottlenecks.
352 </para>
353
354 <para>
355 Collecting build statistics is enabled by default through the
356 <link linkend='var-USER_CLASSES'><filename>USER_CLASSES</filename></link>
357 variable from your <filename>local.conf</filename> file.
358 Consequently, you do not have to do anything to enable the class.
359 However, if you want to disable the class, simply remove "buildstats"
360 from the <filename>USER_CLASSES</filename> list.
361 </para>
362</section>
363
364<section id='ref-classes-buildstats-summary'>
365 <title><filename>buildstats-summary.bbclass</filename></title>
366
367 <para>
368 When inherited globally, prints statistics at the end of the build
369 on sstate re-use.
370 In order to function, this class requires the
371 <link linkend='ref-classes-buildstats'><filename>buildstats</filename></link>
372 class be enabled.
373 </para>
374</section>
375
376<section id='ref-classes-ccache'>
377 <title><filename>ccache.bbclass</filename></title>
378
379 <para>
380 The <filename>ccache</filename> class enables the C/C++ Compiler Cache
381 for the build.
382 This class is used to give a minor performance boost during the build.
383 However, using the class can lead to unexpected side-effects.
384 Thus, it is recommended that you do not use this class.
385 See <ulink url='http://ccache.samba.org/'></ulink> for information on
386 the C/C++ Compiler Cache.
387 </para>
388</section>
389
390<section id='ref-classes-chrpath'>
391 <title><filename>chrpath.bbclass</filename></title>
392
393 <para>
394 The <filename>chrpath</filename> class
395 is a wrapper around the "chrpath" utility, which is used during the
396 build process for <filename>nativesdk</filename>,
397 <filename>cross</filename>, and
398 <filename>cross-canadian</filename> recipes to change
399 <filename>RPATH</filename> records within binaries in order to make
400 them relocatable.
401 </para>
402</section>
403
404<section id='ref-classes-clutter'>
405 <title><filename>clutter.bbclass</filename></title>
406
407 <para>
408 The <filename>clutter</filename> class consolidates the
409 major and minor version naming and other common items used by Clutter
410 and related recipes.
411 <note>
412 Unlike some other classes related to specific libraries, recipes
413 building other software that uses Clutter do not need to
414 inherit this class unless they use the same recipe versioning
415 scheme that the Clutter and related recipes do.
416 </note>
417 </para>
418</section>
419
420<section id='ref-classes-cmake'>
421 <title><filename>cmake.bbclass</filename></title>
422
423 <para>
424 The <filename>cmake</filename> class allows for recipes that need to
425 build software using the
426 <ulink url='https://cmake.org/overview/'>CMake</ulink> build system.
427 You can use the
428 <link linkend='var-EXTRA_OECMAKE'><filename>EXTRA_OECMAKE</filename></link>
429 variable to specify additional configuration options to be passed
430 using the <filename>cmake</filename> command line.
431 </para>
432
433 <para>
434 On the occasion that you would be installing custom CMake toolchain
435 files supplied by the application being built, you should install them
436 to the preferred CMake Module directory:
437 <filename>${D}${datadir}/cmake/</filename> Modules during
438 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink>.
439 </para>
440</section>
441
442<section id='ref-classes-cml1'>
443 <title><filename>cml1.bbclass</filename></title>
444
445 <para>
446 The <filename>cml1</filename> class provides basic support for the
447 Linux kernel style build configuration system.
448 </para>
449</section>
450
451<section id='ref-classes-compress_doc'>
452 <title><filename>compress_doc.bbclass</filename></title>
453
454 <para>
455 Enables compression for man pages and info pages.
456 This class is intended to be inherited globally.
457 The default compression mechanism is gz (gzip) but you can
458 select an alternative mechanism by setting the
459 <link linkend='var-DOC_COMPRESS'><filename>DOC_COMPRESS</filename></link>
460 variable.
461 </para>
462</section>
463
464<section id='ref-classes-copyleft_compliance'>
465 <title><filename>copyleft_compliance.bbclass</filename></title>
466
467 <para>
468 The <filename>copyleft_compliance</filename> class
469 preserves source code for the purposes of license compliance.
470 This class is an alternative to the <filename>archiver</filename>
471 class and is still used by some users even though it has been
472 deprecated in favor of the
473 <link linkend='ref-classes-archiver'><filename>archiver</filename></link>
474 class.
475 </para>
476</section>
477
478<section id='ref-classes-copyleft_filter'>
479 <title><filename>copyleft_filter.bbclass</filename></title>
480
481 <para>
482 A class used by the
483 <link linkend='ref-classes-archiver'><filename>archiver</filename></link>
484 and
485 <link linkend='ref-classes-copyleft_compliance'><filename>copyleft_compliance</filename></link>
486 classes for filtering licenses.
487 The <filename>copyleft_filter</filename> class is an internal class
488 and is not intended to be used directly.
489 </para>
490</section>
491
492<section id='ref-classes-core-image'>
493 <title><filename>core-image.bbclass</filename></title>
494
495 <para>
496 The <filename>core-image</filename> class
497 provides common definitions for the
498 <filename>core-image-*</filename> image recipes, such as support for
499 additional
500 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>.
501 </para>
502</section>
503
504<section id='ref-classes-cpan'>
505 <title><filename>cpan*.bbclass</filename></title>
506
507 <para>
508 The <filename>cpan*</filename> classes support Perl modules.
509 </para>
510
511 <para>
512 Recipes for Perl modules are simple.
513 These recipes usually only need to point to the source's archive and
514 then inherit the proper class file.
515 Building is split into two methods depending on which method the module
516 authors used.
517 <itemizedlist>
518 <listitem><para>Modules that use old
519 <filename>Makefile.PL</filename>-based build system require
520 <filename>cpan.bbclass</filename> in their recipes.
521 </para></listitem>
522 <listitem><para>Modules that use
523 <filename>Build.PL</filename>-based build system require
524 using <filename>cpan_build.bbclass</filename> in their recipes.
525 </para></listitem>
526 </itemizedlist>
527 Both build methods inherit the <filename>cpan-base</filename> class
528 for basic Perl support.
529 </para>
530</section>
531
532<section id='ref-classes-cross'>
533 <title><filename>cross.bbclass</filename></title>
534
535 <para>
536 The <filename>cross</filename> class provides support for the recipes
537 that build the cross-compilation tools.
538 </para>
539</section>
540
541<section id='ref-classes-cross-canadian'>
542 <title><filename>cross-canadian.bbclass</filename></title>
543
544 <para>
545 The <filename>cross-canadian</filename> class
546 provides support for the recipes that build the Canadian
547 Cross-compilation tools for SDKs.
548 See the
549 "<ulink url='&YOCTO_DOCS_OM_URL;#cross-development-toolchain-generation'>Cross-Development Toolchain Generation</ulink>"
550 section in the Yocto Project Overview and Concepts Manual for more
551 discussion on these cross-compilation tools.
552 </para>
553</section>
554
555<section id='ref-classes-crosssdk'>
556 <title><filename>crosssdk.bbclass</filename></title>
557
558 <para>
559 The <filename>crosssdk</filename> class
560 provides support for the recipes that build the cross-compilation
561 tools used for building SDKs.
562 See the
563 "<ulink url='&YOCTO_DOCS_OM_URL;#cross-development-toolchain-generation'>Cross-Development Toolchain Generation</ulink>"
564 section in the Yocto Project Overview and Concepts Manual for more
565 discussion on these cross-compilation tools.
566 </para>
567</section>
568
569<section id='ref-classes-debian'>
570 <title><filename>debian.bbclass</filename></title>
571
572 <para>
573 The <filename>debian</filename> class renames output packages so that
574 they follow the Debian naming policy (i.e. <filename>glibc</filename>
575 becomes <filename>libc6</filename> and <filename>glibc-devel</filename>
576 becomes <filename>libc6-dev</filename>.)
577 Renaming includes the library name and version as part of the package
578 name.
579 </para>
580
581 <para>
582 If a recipe creates packages for multiple libraries
583 (shared object files of <filename>.so</filename> type), use the
584 <link linkend='var-LEAD_SONAME'><filename>LEAD_SONAME</filename></link>
585 variable in the recipe to specify the library on which to apply the
586 naming scheme.
587 </para>
588</section>
589
590<section id='ref-classes-deploy'>
591 <title><filename>deploy.bbclass</filename></title>
592
593 <para>
594 The <filename>deploy</filename> class handles deploying files
595 to the
596 <link linkend='var-DEPLOY_DIR_IMAGE'><filename>DEPLOY_DIR_IMAGE</filename></link>
597 directory.
598 The main function of this class is to allow the deploy step to be
599 accelerated by shared state.
600 Recipes that inherit this class should define their own
601 <link linkend='ref-tasks-deploy'><filename>do_deploy</filename></link>
602 function to copy the files to be deployed to
603 <link linkend='var-DEPLOYDIR'><filename>DEPLOYDIR</filename></link>,
604 and use <filename>addtask</filename> to add the task at the appropriate
605 place, which is usually after
606 <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>
607 or
608 <link linkend='ref-tasks-install'><filename>do_install</filename></link>.
609 The class then takes care of staging the files from
610 <filename>DEPLOYDIR</filename> to
611 <filename>DEPLOY_DIR_IMAGE</filename>.
612 </para>
613</section>
614
615<section id='ref-classes-devshell'>
616 <title><filename>devshell.bbclass</filename></title>
617
618 <para>
619 The <filename>devshell</filename> class adds the
620 <filename>do_devshell</filename> task.
621 Distribution policy dictates whether to include this class.
622 See the
623 "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-appdev-devshell'>Using a Development Shell</ulink>" section
624 in the Yocto Project Development Tasks Manual for more information about
625 using <filename>devshell</filename>.
626 </para>
627</section>
628
629<section id='ref-classes-devupstream'>
630 <title><filename>devupstream.bbclass</filename></title>
631
632 <para>
633 The <filename>devupstream</filename> class uses
634 <link linkend='var-BBCLASSEXTEND'><filename>BBCLASSEXTEND</filename></link>
635 to add a variant of the recipe that fetches from an alternative URI
636 (e.g. Git) instead of a tarball.
637 Following is an example:
638 <literallayout class='monospaced'>
639 BBCLASSEXTEND = "devupstream:target"
640 SRC_URI_class-devupstream = "git://git.example.com/example"
641 SRCREV_class-devupstream = "abcd1234"
642 </literallayout>
643 Adding the above statements to your recipe creates a variant that has
644 <link linkend='var-DEFAULT_PREFERENCE'><filename>DEFAULT_PREFERENCE</filename></link>
645 set to "-1".
646 Consequently, you need to select the variant of the recipe to use it.
647 Any development-specific adjustments can be done by using the
648 <filename>class-devupstream</filename> override.
649 Here is an example:
650 <literallayout class='monospaced'>
651 DEPENDS_append_class-devupstream = " gperf-native"
652
653 do_configure_prepend_class-devupstream() {
654 touch ${S}/README
655 }
656 </literallayout>
657 The class currently only supports creating a development variant of
658 the target recipe, not <filename>native</filename> or
659 <filename>nativesdk</filename> variants.
660 </para>
661
662 <para>
663 The <filename>BBCLASSEXTEND</filename> syntax
664 (i.e. <filename>devupstream:target</filename>) provides support for
665 <filename>native</filename> and <filename>nativesdk</filename>
666 variants.
667 Consequently, this functionality can be added in a future release.
668 </para>
669
670 <para>
671 Support for other version control systems such as Subversion is
672 limited due to BitBake's automatic fetch dependencies (e.g.
673 <filename>subversion-native</filename>).
674 </para>
675</section>
676
677<section id='ref-classes-distro_features_check'>
678 <title><filename>distro_features_check.bbclass</filename></title>
679
680 <para>
681 The <filename>distro_features_check</filename> class
682 allows individual recipes to check for required and conflicting
683 <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>.
684 </para>
685
686 <para>
687 This class provides support for the
688 <link linkend='var-REQUIRED_DISTRO_FEATURES'><filename>REQUIRED_DISTRO_FEATURES</filename></link>
689 and
690 <link linkend='var-CONFLICT_DISTRO_FEATURES'><filename>CONFLICT_DISTRO_FEATURES</filename></link>
691 variables.
692 If any conditions specified in the recipe using the above variables are
693 not met, the recipe will be skipped.
694 </para>
695</section>
696
697<section id='ref-classes-distutils'>
698 <title><filename>distutils*.bbclass</filename></title>
699
700 <para>
701 The <filename>distutils*</filename> classes support recipes for Python
702 version 2.x extensions, which are simple.
703 These recipes usually only need to point to the source's archive and
704 then inherit the proper class.
705 Building is split into two methods depending on which method the
706 module authors used.
707 <itemizedlist>
708 <listitem><para>Extensions that use an Autotools-based build system
709 require Autotools and the classes based on
710 <filename>distutils</filename> in their recipes.
711 </para></listitem>
712 <listitem><para>Extensions that use build systems based on
713 <filename>distutils</filename> require
714 the <filename>distutils</filename> class in their recipes.
715 </para></listitem>
716 <listitem><para>Extensions that use build systems based on
717 <filename>setuptools</filename> require the
718 <link linkend='ref-classes-setuptools'><filename>setuptools</filename></link>
719 class in their recipes.
720 </para></listitem>
721 </itemizedlist>
722 The <filename>distutils-common-base</filename> class is required by
723 some of the <filename>distutils*</filename> classes to provide common
724 Python2 support.
725 </para>
726</section>
727
728<section id='ref-classes-distutils3'>
729 <title><filename>distutils3*.bbclass</filename></title>
730
731 <para>
732 The <filename>distutils3*</filename> classes support recipes for Python
733 version 3.x extensions, which are simple.
734 These recipes usually only need to point to the source's archive and
735 then inherit the proper class.
736 Building is split into three methods depending on which method the
737 module authors used.
738 <itemizedlist>
739 <listitem><para>Extensions that use an Autotools-based build system
740 require Autotools and
741 <filename>distutils</filename>-based classes in their recipes.
742 </para></listitem>
743 <listitem><para>Extensions that use
744 <filename>distutils</filename>-based build systems require
745 the <filename>distutils</filename> class in their recipes.
746 </para></listitem>
747 <listitem><para>Extensions that use build systems based on
748 <filename>setuptools3</filename> require the
749 <link linkend='ref-classes-setuptools'><filename>setuptools3</filename></link>
750 class in their recipes.
751 </para></listitem>
752 </itemizedlist>
753 The <filename>distutils3*</filename> classes either inherit their
754 corresponding <filename>distutils*</filename> class or replicate them
755 using a Python3 version instead (e.g.
756 <filename>distutils3-base</filename> inherits
757 <filename>distutils-common-base</filename>, which is the same as
758 <filename>distutils-base</filename> but inherits
759 <filename>python3native</filename> instead of
760 <filename>pythonnative</filename>).
761 </para>
762</section>
763
764<section id='ref-classes-externalsrc'>
765 <title><filename>externalsrc.bbclass</filename></title>
766
767 <para>
768 The <filename>externalsrc</filename> class supports building software
769 from source code that is external to the OpenEmbedded build system.
770 Building software from an external source tree means that the build
771 system's normal fetch, unpack, and patch process is not used.
772 </para>
773
774 <para>
775 By default, the OpenEmbedded build system uses the
776 <link linkend='var-S'><filename>S</filename></link> and
777 <link linkend='var-B'><filename>B</filename></link> variables to
778 locate unpacked recipe source code and to build it, respectively.
779 When your recipe inherits the <filename>externalsrc</filename> class,
780 you use the
781 <link linkend='var-EXTERNALSRC'><filename>EXTERNALSRC</filename></link>
782 and
783 <link linkend='var-EXTERNALSRC_BUILD'><filename>EXTERNALSRC_BUILD</filename></link>
784 variables to ultimately define <filename>S</filename> and
785 <filename>B</filename>.
786 </para>
787
788 <para>
789 By default, this class expects the source code to support recipe builds
790 that use the <link linkend='var-B'><filename>B</filename></link>
791 variable to point to the directory in which the OpenEmbedded build
792 system places the generated objects built from the recipes.
793 By default, the <filename>B</filename> directory is set to the
794 following, which is separate from the source directory
795 (<filename>S</filename>):
796 <literallayout class='monospaced'>
797 ${WORKDIR}/${BPN}/{PV}/
798 </literallayout>
799 See these variables for more information:
800 <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>,
801 <link linkend='var-BPN'><filename>BPN</filename></link>, and
802 <link linkend='var-PV'><filename>PV</filename></link>,
803 </para>
804
805 <para>
806 For more information on the
807 <filename>externalsrc</filename> class, see the comments in
808 <filename>meta/classes/externalsrc.bbclass</filename> in the
809 <link linkend='source-directory'>Source Directory</link>.
810 For information on how to use the <filename>externalsrc</filename>
811 class, see the
812 "<ulink url='&YOCTO_DOCS_DEV_URL;#building-software-from-an-external-source'>Building Software from an External Source</ulink>"
813 section in the Yocto Project Development Tasks Manual.
814 </para>
815</section>
816
817<section id='ref-classes-extrausers'>
818 <title><filename>extrausers.bbclass</filename></title>
819
820 <para>
821 The <filename>extrausers</filename> class allows
822 additional user and group configuration to be applied at the image
823 level.
824 Inheriting this class either globally or from an image recipe allows
825 additional user and group operations to be performed using the
826 <link linkend='var-EXTRA_USERS_PARAMS'><filename>EXTRA_USERS_PARAMS</filename></link>
827 variable.
828 <note>
829 The user and group operations added using the
830 <filename>extrausers</filename> class are not tied to a specific
831 recipe outside of the recipe for the image.
832 Thus, the operations can be performed across the image as a whole.
833 Use the
834 <link linkend='ref-classes-useradd'><filename>useradd</filename></link>
835 class to add user and group configuration to a specific recipe.
836 </note>
837 Here is an example that uses this class in an image recipe:
838 <literallayout class='monospaced'>
839 inherit extrausers
840 EXTRA_USERS_PARAMS = "\
841 useradd -p '' tester; \
842 groupadd developers; \
843 userdel nobody; \
844 groupdel -g video; \
845 groupmod -g 1020 developers; \
846 usermod -s /bin/sh tester; \
847 "
848 </literallayout>
849 Here is an example that adds two users named "tester-jim" and
850 "tester-sue" and assigns passwords:
851 <literallayout class='monospaced'>
852 inherit extrausers
853 EXTRA_USERS_PARAMS = "\
854 useradd -P tester01 tester-jim; \
855 useradd -P tester01 tester-sue; \
856 "
857 </literallayout>
858 Finally, here is an example that sets the root password to
859 "1876*18":
860 <literallayout class='monospaced'>
861 inherit extrausers
862 EXTRA_USERS_PARAMS = "\
863 usermod -P 1876*18 root; \
864 "
865 </literallayout>
866 </para>
867</section>
868
869<section id='ref-classes-fontcache'>
870 <title><filename>fontcache.bbclass</filename></title>
871
872 <para>
873 The <filename>fontcache</filename> class generates the
874 proper post-install and post-remove (postinst and postrm)
875 scriptlets for font packages.
876 These scriptlets call <filename>fc-cache</filename> (part of
877 <filename>Fontconfig</filename>) to add the fonts to the font
878 information cache.
879 Since the cache files are architecture-specific,
880 <filename>fc-cache</filename> runs using QEMU if the postinst
881 scriptlets need to be run on the build host during image creation.
882 </para>
883
884 <para>
885 If the fonts being installed are in packages other than the main
886 package, set
887 <link linkend='var-FONT_PACKAGES'><filename>FONT_PACKAGES</filename></link>
888 to specify the packages containing the fonts.
889 </para>
890</section>
891
892<section id='ref-classes-fs-uuid'>
893 <title><filename>fs-uuid.bbclass</filename></title>
894
895 <para>
896 The <filename>fs-uuid</filename> class extracts UUID from
897 <filename>${</filename><link linkend='var-ROOTFS'><filename>ROOTFS</filename></link><filename>}</filename>,
898 which must have been built by the time that this function gets called.
899 The <filename>fs-uuid</filename> class only works on
900 <filename>ext</filename> file systems and depends on
901 <filename>tune2fs</filename>.
902 </para>
903</section>
904
905<section id='ref-classes-gconf'>
906 <title><filename>gconf.bbclass</filename></title>
907
908 <para>
909 The <filename>gconf</filename> class provides common
910 functionality for recipes that need to install GConf schemas.
911 The schemas will be put into a separate package
912 (<filename>${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}-gconf</filename>)
913 that is created automatically when this class is inherited.
914 This package uses the appropriate post-install and post-remove
915 (postinst/postrm) scriptlets to register and unregister the schemas
916 in the target image.
917 </para>
918</section>
919
920<section id='ref-classes-gettext'>
921 <title><filename>gettext.bbclass</filename></title>
922
923 <para>
924 The <filename>gettext</filename> class provides support for
925 building software that uses the GNU <filename>gettext</filename>
926 internationalization and localization system.
927 All recipes building software that use
928 <filename>gettext</filename> should inherit this class.
929 </para>
930</section>
931
932<section id='ref-classes-gnomebase'>
933 <title><filename>gnomebase.bbclass</filename></title>
934
935 <para>
936 The <filename>gnomebase</filename> class is the base
937 class for recipes that build software from the GNOME stack.
938 This class sets
939 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link> to
940 download the source from the GNOME mirrors as well as extending
941 <link linkend='var-FILES'><filename>FILES</filename></link>
942 with the typical GNOME installation paths.
943 </para>
944</section>
945
946<section id='ref-classes-gobject-introspection'>
947 <title><filename>gobject-introspection.bbclass</filename></title>
948
949 <para>
950 Provides support for recipes building software that
951 supports GObject introspection.
952 This functionality is only enabled if the
953 "gobject-introspection-data" feature is in
954 <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>
955 as well as "qemu-usermode" being in
956 <link linkend='var-MACHINE_FEATURES'><filename>MACHINE_FEATURES</filename></link>.
957 <note>
958 This functionality is backfilled by default and,
959 if not applicable, should be disabled through
960 <link linkend='var-DISTRO_FEATURES_BACKFILL_CONSIDERED'><filename>DISTRO_FEATURES_BACKFILL_CONSIDERED</filename></link>
961 or
962 <link linkend='var-MACHINE_FEATURES_BACKFILL_CONSIDERED'><filename>MACHINE_FEATURES_BACKFILL_CONSIDERED</filename></link>,
963 respectively.
964 </note>
965 </para>
966</section>
967
968<section id='ref-classes-grub-efi'>
969 <title><filename>grub-efi.bbclass</filename></title>
970
971 <para>
972 The <filename>grub-efi</filename>
973 class provides <filename>grub-efi</filename>-specific functions for
974 building bootable images.
975 </para>
976
977 <para>
978 This class supports several variables:
979 <itemizedlist>
980 <listitem><para>
981 <link linkend='var-INITRD'><filename>INITRD</filename></link>:
982 Indicates list of filesystem images to concatenate and use
983 as an initial RAM disk (initrd) (optional).
984 </para></listitem>
985 <listitem><para>
986 <link linkend='var-ROOTFS'><filename>ROOTFS</filename></link>:
987 Indicates a filesystem image to include as the root filesystem
988 (optional).</para></listitem>
989 <listitem><para>
990 <link linkend='var-GRUB_GFXSERIAL'><filename>GRUB_GFXSERIAL</filename></link>:
991 Set this to "1" to have graphics and serial in the boot menu.
992 </para></listitem>
993 <listitem><para>
994 <link linkend='var-LABELS'><filename>LABELS</filename></link>:
995 A list of targets for the automatic configuration.
996 </para></listitem>
997 <listitem><para>
998 <link linkend='var-APPEND'><filename>APPEND</filename></link>:
999 An override list of append strings for each
1000 <filename>LABEL</filename>.
1001 </para></listitem>
1002 <listitem><para>
1003 <link linkend='var-GRUB_OPTS'><filename>GRUB_OPTS</filename></link>:
1004 Additional options to add to the configuration (optional).
1005 Options are delimited using semi-colon characters
1006 (<filename>;</filename>).</para></listitem>
1007 <listitem><para>
1008 <link linkend='var-GRUB_TIMEOUT'><filename>GRUB_TIMEOUT</filename></link>:
1009 Timeout before executing the default <filename>LABEL</filename>
1010 (optional).
1011 </para></listitem>
1012 </itemizedlist>
1013 </para>
1014</section>
1015
1016<section id='ref-classes-gsettings'>
1017 <title><filename>gsettings.bbclass</filename></title>
1018
1019 <para>
1020 The <filename>gsettings</filename> class
1021 provides common functionality for recipes that need to install
1022 GSettings (glib) schemas.
1023 The schemas are assumed to be part of the main package.
1024 Appropriate post-install and post-remove (postinst/postrm)
1025 scriptlets are added to register and unregister the schemas in the
1026 target image.
1027 </para>
1028</section>
1029
1030<section id='ref-classes-gtk-doc'>
1031 <title><filename>gtk-doc.bbclass</filename></title>
1032
1033 <para>
1034 The <filename>gtk-doc</filename> class
1035 is a helper class to pull in the appropriate
1036 <filename>gtk-doc</filename> dependencies and disable
1037 <filename>gtk-doc</filename>.
1038 </para>
1039</section>
1040
1041<section id='ref-classes-gtk-icon-cache'>
1042 <title><filename>gtk-icon-cache.bbclass</filename></title>
1043
1044 <para>
1045 The <filename>gtk-icon-cache</filename> class
1046 generates the proper post-install and post-remove (postinst/postrm)
1047 scriptlets for packages that use GTK+ and install icons.
1048 These scriptlets call <filename>gtk-update-icon-cache</filename> to add
1049 the fonts to GTK+'s icon cache.
1050 Since the cache files are architecture-specific,
1051 <filename>gtk-update-icon-cache</filename> is run using QEMU if the
1052 postinst scriptlets need to be run on the build host during image
1053 creation.
1054 </para>
1055</section>
1056
1057<section id='ref-classes-gtk-immodules-cache'>
1058 <title><filename>gtk-immodules-cache.bbclass</filename></title>
1059
1060 <para>
1061 The <filename>gtk-immodules-cache</filename> class
1062 generates the proper post-install and post-remove (postinst/postrm)
1063 scriptlets for packages that install GTK+ input method modules for
1064 virtual keyboards.
1065 These scriptlets call <filename>gtk-update-icon-cache</filename> to add
1066 the input method modules to the cache.
1067 Since the cache files are architecture-specific,
1068 <filename>gtk-update-icon-cache</filename> is run using QEMU if the
1069 postinst scriptlets need to be run on the build host during image
1070 creation.
1071 </para>
1072
1073 <para>
1074 If the input method modules being installed are in packages other than
1075 the main package, set
1076 <link linkend='var-GTKIMMODULES_PACKAGES'><filename>GTKIMMODULES_PACKAGES</filename></link>
1077 to specify the packages containing the modules.
1078 </para>
1079</section>
1080
1081<section id='ref-classes-gzipnative'>
1082 <title><filename>gzipnative.bbclass</filename></title>
1083
1084 <para>
1085 The <filename>gzipnative</filename> class enables the use of
1086 different native versions of <filename>gzip</filename>
1087 and <filename>pigz</filename> rather than the versions of these tools
1088 from the build host.
1089 </para>
1090</section>
1091
1092<section id='ref-classes-icecc'>
1093 <title><filename>icecc.bbclass</filename></title>
1094
1095 <para>
1096 The <filename>icecc</filename> class supports
1097 <ulink url='https://github.com/icecc/icecream'>Icecream</ulink>, which
1098 facilitates taking compile jobs and distributing them among remote
1099 machines.
1100 </para>
1101
1102 <para>
1103 The class stages directories with symlinks from <filename>gcc</filename>
1104 and <filename>g++</filename> to <filename>icecc</filename>, for both
1105 native and cross compilers.
1106 Depending on each configure or compile, the OpenEmbedded build system
1107 adds the directories at the head of the <filename>PATH</filename> list
1108 and then sets the <filename>ICECC_CXX</filename> and
1109 <filename>ICEC_CC</filename> variables, which are the paths to the
1110 <filename>g++</filename> and <filename>gcc</filename> compilers,
1111 respectively.
1112 </para>
1113
1114 <para>
1115 For the cross compiler, the class creates a <filename>tar.gz</filename>
1116 file that contains the Yocto Project toolchain and sets
1117 <filename>ICECC_VERSION</filename>, which is the version of the
1118 cross-compiler used in the cross-development toolchain, accordingly.
1119 </para>
1120
1121 <para>
1122 The class handles all three different compile stages
1123 (i.e native ,cross-kernel and target) and creates the necessary
1124 environment <filename>tar.gz</filename> file to be used by the remote
1125 machines.
1126 The class also supports SDK generation.
1127 </para>
1128
1129 <para>
1130 If <link linkend='var-ICECC_PATH'><filename>ICECC_PATH</filename></link>
1131 is not set in your <filename>local.conf</filename> file, then the
1132 class tries to locate the <filename>icecc</filename> binary
1133 using <filename>which</filename>.
1134
1135 If
1136 <link linkend='var-ICECC_ENV_EXEC'><filename>ICECC_ENV_EXEC</filename></link>
1137 is set in your <filename>local.conf</filename> file, the variable should
1138 point to the <filename>icecc-create-env</filename> script
1139 provided by the user.
1140 If you do not point to a user-provided script, the build system
1141 uses the default script provided by the recipe
1142 <filename>icecc-create-env-native.bb</filename>.
1143 <note>
1144 This script is a modified version and not the one that comes with
1145 <filename>icecc</filename>.
1146 </note>
1147 </para>
1148
1149 <para>
1150 If you do not want the Icecream distributed compile support to apply
1151 to specific recipes or classes, you can effectively "blacklist" them
1152 by listing the recipes and classes using the
1153 <link linkend='var-ICECC_USER_PACKAGE_BL'><filename>ICECC_USER_PACKAGE_BL</filename></link>
1154 and
1155 <link linkend='var-ICECC_USER_CLASS_BL'><filename>ICECC_USER_CLASS_BL</filename></link>,
1156 variables, respectively, in your <filename>local.conf</filename> file.
1157 Doing so causes the OpenEmbedded build system to handle these
1158 compilations locally.
1159 </para>
1160
1161 <para>
1162 Additionally, you can list recipes using the
1163 <link linkend='var-ICECC_USER_PACKAGE_WL'><filename>ICECC_USER_PACKAGE_WL</filename></link>
1164 variable in your <filename>local.conf</filename> file to force
1165 <filename>icecc</filename> to be enabled for recipes using an empty
1166 <link linkend='var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></link>
1167 variable.
1168 </para>
1169
1170 <para>
1171 Inheriting the <filename>icecc</filename> class changes all sstate
1172 signatures.
1173 Consequently, if a development team has a dedicated build system
1174 that populates
1175 <link linkend='var-SSTATE_MIRRORS'><filename>STATE_MIRRORS</filename></link>
1176 and they want to reuse sstate from
1177 <filename>STATE_MIRRORS</filename>, then all developers and the
1178 build system need to either inherit the <filename>icecc</filename>
1179 class or nobody should.
1180 </para>
1181
1182 <para>
1183 At the distribution level, you can inherit the
1184 <filename>icecc</filename> class to be sure that all builders start
1185 with the same sstate signatures.
1186 After inheriting the class, you can then disable the feature by setting
1187 the
1188 <link linkend='var-ICECC_DISABLED'><filename>ICECC_DISABLED</filename></link>
1189 variable to "1" as follows:
1190 <literallayout class='monospaced'>
1191 INHERIT_DISTRO_append = " icecc"
1192 ICECC_DISABLED ??= "1"
1193 </literallayout>
1194 This practice makes sure everyone is using the same signatures but also
1195 requires individuals that do want to use Icecream to enable the feature
1196 individually as follows in your <filename>local.conf</filename> file:
1197 <literallayout class='monospaced'>
1198 ICECC_DISABLED = ""
1199 </literallayout>
1200 </para>
1201</section>
1202
1203<section id='ref-classes-image'>
1204 <title><filename>image.bbclass</filename></title>
1205
1206 <para>
1207 The <filename>image</filename> class helps support creating images
1208 in different formats.
1209 First, the root filesystem is created from packages using
1210 one of the <filename>rootfs*.bbclass</filename>
1211 files (depending on the package format used) and then one or more image
1212 files are created.
1213 <itemizedlist>
1214 <listitem><para>The
1215 <filename><link linkend='var-IMAGE_FSTYPES'>IMAGE_FSTYPES</link></filename>
1216 variable controls the types of images to generate.
1217 </para></listitem>
1218 <listitem><para>The
1219 <filename><link linkend='var-IMAGE_INSTALL'>IMAGE_INSTALL</link></filename>
1220 variable controls the list of packages to install into the
1221 image.</para></listitem>
1222 </itemizedlist>
1223 For information on customizing images, see the
1224 "<ulink url='&YOCTO_DOCS_DEV_URL;#usingpoky-extend-customimage'>Customizing Images</ulink>"
1225 section in the Yocto Project Development Tasks Manual.
1226 For information on how images are created, see the
1227 "<ulink url='&YOCTO_DOCS_OM_URL;#images-dev-environment'>Images</ulink>"
1228 section in the Yocto Project Overview and Concpets Manual.
1229 </para>
1230</section>
1231
1232<section id='ref-classes-image-buildinfo'>
1233 <title><filename>image-buildinfo.bbclass</filename></title>
1234
1235 <para>
1236 The <filename>image-buildinfo</filename> class writes information
1237 to the target filesystem on <filename>/etc/build</filename>.
1238 </para>
1239</section>
1240
1241<section id='ref-classes-image_types'>
1242 <title><filename>image_types.bbclass</filename></title>
1243
1244 <para>
1245 The <filename>image_types</filename> class defines all of the
1246 standard image output types that you can enable through the
1247 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
1248 variable.
1249 You can use this class as a reference on how to add support for
1250 custom image output types.
1251 </para>
1252
1253 <para>
1254 By default, the
1255 <link linkend='ref-classes-image'><filename>image</filename></link>
1256 class automatically enables the <filename>image_types</filename> class.
1257 The <filename>image</filename> class uses the
1258 <filename>IMGCLASSES</filename> variable as follows:
1259 <literallayout class='monospaced'>
1260 IMGCLASSES = "rootfs_${IMAGE_PKGTYPE} image_types ${IMAGE_CLASSES}"
1261 IMGCLASSES += "${@['populate_sdk_base', 'populate_sdk_ext']['linux' in d.getVar("SDK_OS")]}"
1262 IMGCLASSES += "${@bb.utils.contains_any('IMAGE_FSTYPES', 'live iso hddimg', 'image-live', '', d)}"
1263 IMGCLASSES += "${@bb.utils.contains('IMAGE_FSTYPES', 'container', 'image-container', '', d)}"
1264 IMGCLASSES += "image_types_wic"
1265 IMGCLASSES += "rootfs-postcommands"
1266 IMGCLASSES += "image-postinst-intercepts"
1267 inherit ${IMGCLASSES}
1268 </literallayout>
1269 </para>
1270
1271 <para>
1272 The <filename>image_types</filename> class also handles conversion and
1273 compression of images.
1274 <note>
1275 To build a VMware VMDK image, you need to add "wic.vmdk" to
1276 <filename>IMAGE_FSTYPES</filename>.
1277 This would also be similar for Virtual Box Virtual Disk Image
1278 ("vdi") and QEMU Copy On Write Version 2 ("qcow2") images.
1279 </note>
1280 </para>
1281</section>
1282
1283<section id='ref-classes-image-live'>
1284 <title><filename>image-live.bbclass</filename></title>
1285
1286 <para>
1287 This class controls building "live" (i.e. HDDIMG and ISO) images.
1288 Live images contain syslinux for legacy booting, as well as the
1289 bootloader specified by
1290 <link linkend='var-EFI_PROVIDER'><filename>EFI_PROVIDER</filename></link>
1291 if
1292 <link linkend='var-MACHINE_FEATURES'><filename>MACHINE_FEATURES</filename></link>
1293 contains "efi".
1294 </para>
1295
1296 <para>
1297 Normally, you do not use this class directly.
1298 Instead, you add "live" to
1299 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>.
1300 </para>
1301</section>
1302
1303<section id='ref-classes-image-mklibs'>
1304 <title><filename>image-mklibs.bbclass</filename></title>
1305
1306 <para>
1307 The <filename>image-mklibs</filename> class
1308 enables the use of the <filename>mklibs</filename> utility during the
1309 <link linkend='ref-tasks-rootfs'><filename>do_rootfs</filename></link>
1310 task, which optimizes the size of
1311 libraries contained in the image.
1312 </para>
1313
1314 <para>
1315 By default, the class is enabled in the
1316 <filename>local.conf.template</filename> using the
1317 <link linkend='var-USER_CLASSES'><filename>USER_CLASSES</filename></link>
1318 variable as follows:
1319 <literallayout class='monospaced'>
1320 USER_CLASSES ?= "buildstats image-mklibs image-prelink"
1321 </literallayout>
1322 </para>
1323</section>
1324
1325<section id='ref-classes-image-prelink'>
1326 <title><filename>image-prelink.bbclass</filename></title>
1327
1328 <para>
1329 The <filename>image-prelink</filename> class
1330 enables the use of the <filename>prelink</filename> utility during
1331 the
1332 <link linkend='ref-tasks-rootfs'><filename>do_rootfs</filename></link>
1333 task, which optimizes the dynamic
1334 linking of shared libraries to reduce executable startup time.
1335 </para>
1336
1337 <para>
1338 By default, the class is enabled in the
1339 <filename>local.conf.template</filename> using the
1340 <link linkend='var-USER_CLASSES'><filename>USER_CLASSES</filename></link>
1341 variable as follows:
1342 <literallayout class='monospaced'>
1343 USER_CLASSES ?= "buildstats image-mklibs image-prelink"
1344 </literallayout>
1345 </para>
1346</section>
1347
1348<section id='ref-classes-insane'>
1349 <title><filename>insane.bbclass</filename></title>
1350
1351 <para>
1352 The <filename>insane</filename> class adds a step to the package
1353 generation process so that output quality assurance checks are
1354 generated by the OpenEmbedded build system.
1355 A range of checks are performed that check the build's output
1356 for common problems that show up during runtime.
1357 Distribution policy usually dictates whether to include this class.
1358 </para>
1359
1360 <para>
1361 You can configure the sanity checks so that specific test failures
1362 either raise a warning or an error message.
1363 Typically, failures for new tests generate a warning.
1364 Subsequent failures for the same test would then generate an error
1365 message once the metadata is in a known and good condition.
1366 See the
1367 "<link linkend='ref-qa-checks'>QA Error and Warning Messages</link>"
1368 Chapter for a list of all the warning and error messages
1369 you might encounter using a default configuration.
1370 </para>
1371
1372 <para>
1373 Use the
1374 <link linkend='var-WARN_QA'><filename>WARN_QA</filename></link> and
1375 <link linkend='var-ERROR_QA'><filename>ERROR_QA</filename></link>
1376 variables to control the behavior of
1377 these checks at the global level (i.e. in your custom distro
1378 configuration).
1379 However, to skip one or more checks in recipes, you should use
1380 <link linkend='var-INSANE_SKIP'><filename>INSANE_SKIP</filename></link>.
1381 For example, to skip the check for symbolic link
1382 <filename>.so</filename> files in the main package of a recipe,
1383 add the following to the recipe.
1384 You need to realize that the package name override, in this example
1385 <filename>${PN}</filename>, must be used:
1386 <literallayout class='monospaced'>
1387 INSANE_SKIP_${PN} += "dev-so"
1388 </literallayout>
1389 Please keep in mind that the QA checks exist in order to detect real
1390 or potential problems in the packaged output.
1391 So exercise caution when disabling these checks.
1392 </para>
1393
1394 <para>
1395 The following list shows the tests you can list with the
1396 <filename>WARN_QA</filename> and <filename>ERROR_QA</filename>
1397 variables:
1398 <itemizedlist>
1399 <listitem><para><emphasis><filename>already-stripped:</filename></emphasis>
1400 Checks that produced binaries have not already been
1401 stripped prior to the build system extracting debug symbols.
1402 It is common for upstream software projects to default to
1403 stripping debug symbols for output binaries.
1404 In order for debugging to work on the target using
1405 <filename>-dbg</filename> packages, this stripping must be
1406 disabled.
1407 </para></listitem>
1408 <listitem><para><emphasis><filename>arch:</filename></emphasis>
1409 Checks the Executable and Linkable Format (ELF) type, bit size,
1410 and endianness of any binaries to ensure they match the target
1411 architecture.
1412 This test fails if any binaries do not match the type since
1413 there would be an incompatibility.
1414 The test could indicate that the
1415 wrong compiler or compiler options have been used.
1416 Sometimes software, like bootloaders, might need to bypass
1417 this check.
1418 </para></listitem>
1419 <listitem><para><emphasis><filename>buildpaths:</filename></emphasis>
1420 Checks for paths to locations on the build host inside the
1421 output files.
1422 Currently, this test triggers too many false positives and
1423 thus is not normally enabled.
1424 </para></listitem>
1425 <listitem><para><emphasis><filename>build-deps:</filename></emphasis>
1426 Determines if a build-time dependency that is specified through
1427 <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>,
1428 explicit
1429 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>,
1430 or task-level dependencies exists to match any runtime
1431 dependency.
1432 This determination is particularly useful to discover where
1433 runtime dependencies are detected and added during packaging.
1434 If no explicit dependency has been specified within the
1435 metadata, at the packaging stage it is too late to ensure that
1436 the dependency is built, and thus you can end up with an
1437 error when the package is installed into the image during the
1438 <link linkend='ref-tasks-rootfs'><filename>do_rootfs</filename></link>
1439 task because the auto-detected dependency was not satisfied.
1440 An example of this would be where the
1441 <link linkend='ref-classes-update-rc.d'><filename>update-rc.d</filename></link>
1442 class automatically adds a dependency on the
1443 <filename>initscripts-functions</filename> package to packages
1444 that install an initscript that refers to
1445 <filename>/etc/init.d/functions</filename>.
1446 The recipe should really have an explicit
1447 <filename>RDEPENDS</filename> for the package in question on
1448 <filename>initscripts-functions</filename> so that the
1449 OpenEmbedded build system is able to ensure that the
1450 <filename>initscripts</filename> recipe is actually built and
1451 thus the <filename>initscripts-functions</filename> package is
1452 made available.
1453 </para></listitem>
1454 <listitem><para><emphasis><filename>compile-host-path:</filename></emphasis>
1455 Checks the
1456 <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>
1457 log for indications
1458 that paths to locations on the build host were used.
1459 Using such paths might result in host contamination of the
1460 build output.
1461 </para></listitem>
1462 <listitem><para><emphasis><filename>debug-deps:</filename></emphasis>
1463 Checks that all packages except <filename>-dbg</filename>
1464 packages do not depend on <filename>-dbg</filename>
1465 packages, which would cause a packaging bug.
1466 </para></listitem>
1467 <listitem><para><emphasis><filename>debug-files:</filename></emphasis>
1468 Checks for <filename>.debug</filename> directories in anything but the
1469 <filename>-dbg</filename> package.
1470 The debug files should all be in the <filename>-dbg</filename> package.
1471 Thus, anything packaged elsewhere is incorrect packaging.</para></listitem>
1472 <listitem><para><emphasis><filename>dep-cmp:</filename></emphasis>
1473 Checks for invalid version comparison statements in runtime
1474 dependency relationships between packages (i.e. in
1475 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>,
1476 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>,
1477 <link linkend='var-RSUGGESTS'><filename>RSUGGESTS</filename></link>,
1478 <link linkend='var-RPROVIDES'><filename>RPROVIDES</filename></link>,
1479 <link linkend='var-RREPLACES'><filename>RREPLACES</filename></link>,
1480 and
1481 <link linkend='var-RCONFLICTS'><filename>RCONFLICTS</filename></link>
1482 variable values).
1483 Any invalid comparisons might trigger failures or undesirable
1484 behavior when passed to the package manager.
1485 </para></listitem>
1486 <listitem><para><emphasis><filename>desktop:</filename></emphasis>
1487 Runs the <filename>desktop-file-validate</filename> program
1488 against any <filename>.desktop</filename> files to validate
1489 their contents against the specification for
1490 <filename>.desktop</filename> files.</para></listitem>
1491 <listitem><para><emphasis><filename>dev-deps:</filename></emphasis>
1492 Checks that all packages except <filename>-dev</filename>
1493 or <filename>-staticdev</filename> packages do not depend on
1494 <filename>-dev</filename> packages, which would be a
1495 packaging bug.</para></listitem>
1496 <listitem><para><emphasis><filename>dev-so:</filename></emphasis>
1497 Checks that the <filename>.so</filename> symbolic links are in the
1498 <filename>-dev</filename> package and not in any of the other packages.
1499 In general, these symlinks are only useful for development purposes.
1500 Thus, the <filename>-dev</filename> package is the correct location for
1501 them.
1502 Some very rare cases do exist for dynamically loaded modules where
1503 these symlinks are needed instead in the main package.
1504 </para></listitem>
1505 <listitem><para><emphasis><filename>file-rdeps:</filename></emphasis>
1506 Checks that file-level dependencies identified by the
1507 OpenEmbedded build system at packaging time are satisfied.
1508 For example, a shell script might start with the line
1509 <filename>#!/bin/bash</filename>.
1510 This line would translate to a file dependency on
1511 <filename>/bin/bash</filename>.
1512 Of the three package managers that the OpenEmbedded build
1513 system supports, only RPM directly handles file-level
1514 dependencies, resolving them automatically to packages
1515 providing the files.
1516 However, the lack of that functionality in the other two
1517 package managers does not mean the dependencies do not still
1518 need resolving.
1519 This QA check attempts to ensure that explicitly declared
1520 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>
1521 exist to handle any file-level dependency detected in
1522 packaged files.
1523 </para></listitem>
1524 <listitem><para><emphasis><filename>files-invalid:</filename></emphasis>
1525 Checks for
1526 <link linkend='var-FILES'><filename>FILES</filename></link>
1527 variable values that contain "//", which is invalid.
1528 </para></listitem>
1529 <listitem><para id='insane-host-user-contaminated'>
1530 <emphasis><filename>host-user-contaminated:</filename></emphasis>
1531 Checks that no package produced by the recipe contains any
1532 files outside of <filename>/home</filename> with a user or
1533 group ID that matches the user running BitBake.
1534 A match usually indicates that the files are being installed
1535 with an incorrect UID/GID, since target IDs are independent
1536 from host IDs.
1537 For additional information, see the section describing the
1538 <link linkend='ref-tasks-install'><filename>do_install</filename></link>
1539 task.
1540 </para></listitem>
1541 <listitem><para><emphasis><filename>incompatible-license:</filename></emphasis>
1542 Report when packages are excluded from being created due to
1543 being marked with a license that is in
1544 <link linkend='var-INCOMPATIBLE_LICENSE'><filename>INCOMPATIBLE_LICENSE</filename></link>.
1545 </para></listitem>
1546 <listitem><para><emphasis><filename>install-host-path:</filename></emphasis>
1547 Checks the
1548 <link linkend='ref-tasks-install'><filename>do_install</filename></link>
1549 log for indications
1550 that paths to locations on the build host were used.
1551 Using such paths might result in host contamination of the
1552 build output.
1553 </para></listitem>
1554 <listitem><para><emphasis><filename>installed-vs-shipped:</filename></emphasis>
1555 Reports when files have been installed within
1556 <filename>do_install</filename> but have not been included in
1557 any package by way of the
1558 <link linkend='var-FILES'><filename>FILES</filename></link>
1559 variable.
1560 Files that do not appear in any package cannot be present in
1561 an image later on in the build process.
1562 Ideally, all installed files should be packaged or not
1563 installed at all.
1564 These files can be deleted at the end of
1565 <filename>do_install</filename> if the files are not
1566 needed in any package.
1567 </para></listitem>
1568 <listitem><para><emphasis><filename>invalid-chars:</filename></emphasis>
1569 Checks that the recipe metadata variables
1570 <link linkend='var-DESCRIPTION'><filename>DESCRIPTION</filename></link>,
1571 <link linkend='var-SUMMARY'><filename>SUMMARY</filename></link>,
1572 <link linkend='var-LICENSE'><filename>LICENSE</filename></link>,
1573 and
1574 <link linkend='var-SECTION'><filename>SECTION</filename></link>
1575 do not contain non-UTF-8 characters.
1576 Some package managers do not support such characters.
1577 </para></listitem>
1578 <listitem><para><emphasis><filename>invalid-packageconfig:</filename></emphasis>
1579 Checks that no undefined features are being added to
1580 <link linkend='var-PACKAGECONFIG'><filename>PACKAGECONFIG</filename></link>.
1581 For example, any name "foo" for which the following form
1582 does not exist:
1583 <literallayout class='monospaced'>
1584 PACKAGECONFIG[foo] = "..."
1585 </literallayout>
1586 </para></listitem>
1587 <listitem><para><emphasis><filename>la:</filename></emphasis>
1588 Checks <filename>.la</filename> files for any <filename>TMPDIR</filename>
1589 paths.
1590 Any <filename>.la</filename> file containing these paths is incorrect since
1591 <filename>libtool</filename> adds the correct sysroot prefix when using the
1592 files automatically itself.</para></listitem>
1593 <listitem><para><emphasis><filename>ldflags:</filename></emphasis>
1594 Ensures that the binaries were linked with the
1595 <link linkend='var-LDFLAGS'><filename>LDFLAGS</filename></link>
1596 options provided by the build system.
1597 If this test fails, check that the <filename>LDFLAGS</filename> variable
1598 is being passed to the linker command.</para></listitem>
1599 <listitem><para><emphasis><filename>libdir:</filename></emphasis>
1600 Checks for libraries being installed into incorrect
1601 (possibly hardcoded) installation paths.
1602 For example, this test will catch recipes that install
1603 <filename>/lib/bar.so</filename> when
1604 <filename>${base_libdir}</filename> is "lib32".
1605 Another example is when recipes install
1606 <filename>/usr/lib64/foo.so</filename> when
1607 <filename>${libdir}</filename> is "/usr/lib".
1608 </para></listitem>
1609 <listitem><para><emphasis><filename>libexec:</filename></emphasis>
1610 Checks if a package contains files in
1611 <filename>/usr/libexec</filename>.
1612 This check is not performed if the
1613 <filename>libexecdir</filename> variable has been set
1614 explicitly to <filename>/usr/libexec</filename>.
1615 </para></listitem>
1616 <listitem><para><emphasis><filename>packages-list:</filename></emphasis>
1617 Checks for the same package being listed multiple times through
1618 the <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>
1619 variable value.
1620 Installing the package in this manner can cause errors during
1621 packaging.
1622 </para></listitem>
1623 <listitem><para><emphasis><filename>perm-config:</filename></emphasis>
1624 Reports lines in <filename>fs-perms.txt</filename> that have
1625 an invalid format.
1626 </para></listitem>
1627 <listitem><para><emphasis><filename>perm-line:</filename></emphasis>
1628 Reports lines in <filename>fs-perms.txt</filename> that have
1629 an invalid format.
1630 </para></listitem>
1631 <listitem><para><emphasis><filename>perm-link:</filename></emphasis>
1632 Reports lines in <filename>fs-perms.txt</filename> that
1633 specify 'link' where the specified target already exists.
1634 </para></listitem>
1635 <listitem><para><emphasis><filename>perms:</filename></emphasis>
1636 Currently, this check is unused but reserved.
1637 </para></listitem>
1638 <listitem><para><emphasis><filename>pkgconfig:</filename></emphasis>
1639 Checks <filename>.pc</filename> files for any
1640 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>/<link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>
1641 paths.
1642 Any <filename>.pc</filename> file containing these paths is incorrect
1643 since <filename>pkg-config</filename> itself adds the correct sysroot prefix
1644 when the files are accessed.</para></listitem>
1645 <listitem><para><emphasis><filename>pkgname:</filename></emphasis>
1646 Checks that all packages in
1647 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>
1648 have names that do not contain invalid characters (i.e.
1649 characters other than 0-9, a-z, ., +, and -).
1650 </para></listitem>
1651 <listitem><para><emphasis><filename>pkgv-undefined:</filename></emphasis>
1652 Checks to see if the <filename>PKGV</filename> variable
1653 is undefined during
1654 <link linkend='ref-tasks-package'><filename>do_package</filename></link>.
1655 </para></listitem>
1656 <listitem><para><emphasis><filename>pkgvarcheck:</filename></emphasis>
1657 Checks through the variables
1658 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>,
1659 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>,
1660 <link linkend='var-RSUGGESTS'><filename>RSUGGESTS</filename></link>,
1661 <link linkend='var-RCONFLICTS'><filename>RCONFLICTS</filename></link>,
1662 <link linkend='var-RPROVIDES'><filename>RPROVIDES</filename></link>,
1663 <link linkend='var-RREPLACES'><filename>RREPLACES</filename></link>,
1664 <link linkend='var-FILES'><filename>FILES</filename></link>,
1665 <link linkend='var-ALLOW_EMPTY'><filename>ALLOW_EMPTY</filename></link>,
1666 <filename>pkg_preinst</filename>,
1667 <filename>pkg_postinst</filename>,
1668 <filename>pkg_prerm</filename>
1669 and <filename>pkg_postrm</filename>, and reports if there are
1670 variable sets that are not package-specific.
1671 Using these variables without a package suffix is bad practice,
1672 and might unnecessarily complicate dependencies of other packages
1673 within the same recipe or have other unintended consequences.
1674 </para></listitem>
1675 <listitem><para><emphasis><filename>pn-overrides:</filename></emphasis>
1676 Checks that a recipe does not have a name
1677 (<link linkend='var-PN'><filename>PN</filename></link>) value
1678 that appears in
1679 <link linkend='var-OVERRIDES'><filename>OVERRIDES</filename></link>.
1680 If a recipe is named such that its <filename>PN</filename>
1681 value matches something already in
1682 <filename>OVERRIDES</filename> (e.g. <filename>PN</filename>
1683 happens to be the same as
1684 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>
1685 or
1686 <link linkend='var-DISTRO'><filename>DISTRO</filename></link>),
1687 it can have unexpected consequences.
1688 For example, assignments such as
1689 <filename>FILES_${PN} = "xyz"</filename> effectively turn into
1690 <filename>FILES = "xyz"</filename>.
1691 </para></listitem>
1692 <listitem><para><emphasis><filename>rpaths:</filename></emphasis>
1693 Checks for rpaths in the binaries that contain build system paths such
1694 as <filename>TMPDIR</filename>.
1695 If this test fails, bad <filename>-rpath</filename> options are being
1696 passed to the linker commands and your binaries have potential security
1697 issues.</para></listitem>
1698 <listitem><para><emphasis><filename>split-strip:</filename></emphasis>
1699 Reports that splitting or stripping debug symbols from binaries
1700 has failed.
1701 </para></listitem>
1702 <listitem><para><emphasis><filename>staticdev:</filename></emphasis>
1703 Checks for static library files (<filename>*.a</filename>) in
1704 non-<filename>staticdev</filename> packages.
1705 </para></listitem>
1706 <listitem><para><emphasis><filename>symlink-to-sysroot:</filename></emphasis>
1707 Checks for symlinks in packages that point into
1708 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
1709 on the host.
1710 Such symlinks will work on the host, but are clearly invalid
1711 when running on the target.
1712 </para></listitem>
1713 <listitem><para><emphasis><filename>textrel:</filename></emphasis>
1714 Checks for ELF binaries that contain relocations in their
1715 <filename>.text</filename> sections, which can result in a
1716 performance impact at runtime.
1717 See the explanation for the
1718 <link linkend='qa-issue-textrel'><filename>ELF binary</filename></link>
1719 message for more information regarding runtime performance issues.
1720 </para></listitem>
1721<!--
1722This check was removed for YP 2.3 release
1723
1724 <listitem><para><emphasis><filename>unsafe-references-in-binaries:</filename></emphasis>
1725 Reports when a binary installed in
1726 <filename>${base_libdir}</filename>,
1727 <filename>${base_bindir}</filename>, or
1728 <filename>${base_sbindir}</filename>, depends on another
1729 binary installed under <filename>${exec_prefix}</filename>.
1730 This dependency is a concern if you want the system to remain
1731 basically operable if <filename>/usr</filename> is mounted
1732 separately and is not mounted.
1733 <note>
1734 Defaults for binaries installed in
1735 <filename>${base_libdir}</filename>,
1736 <filename>${base_bindir}</filename>, and
1737 <filename>${base_sbindir}</filename> are
1738 <filename>/lib</filename>, <filename>/bin</filename>, and
1739 <filename>/sbin</filename>, respectively.
1740 The default for a binary installed
1741 under <filename>${exec_prefix}</filename> is
1742 <filename>/usr</filename>.
1743 </note>
1744 </para></listitem>
1745-->
1746 <listitem><para><emphasis><filename>unlisted-pkg-lics:</filename></emphasis>
1747 Checks that all declared licenses applying for a package are also
1748 declared on the recipe level (i.e. any license in
1749 <filename>LICENSE_*</filename> should appear in
1750 <link linkend='var-LICENSE'><filename>LICENSE</filename></link>).
1751 </para></listitem>
1752 <listitem><para><emphasis><filename>useless-rpaths:</filename></emphasis>
1753 Checks for dynamic library load paths (rpaths) in the binaries that
1754 by default on a standard system are searched by the linker (e.g.
1755 <filename>/lib</filename> and <filename>/usr/lib</filename>).
1756 While these paths will not cause any breakage, they do waste space and
1757 are unnecessary.</para></listitem>
1758 <listitem><para><emphasis><filename>var-undefined:</filename></emphasis>
1759 Reports when variables fundamental to packaging (i.e.
1760 <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>,
1761 <link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link>,
1762 <link linkend='var-D'><filename>D</filename></link>,
1763 <link linkend='var-PN'><filename>PN</filename></link>, and
1764 <link linkend='var-PKGD'><filename>PKGD</filename></link>) are
1765 undefined during
1766 <link linkend='ref-tasks-package'><filename>do_package</filename></link>.
1767 </para></listitem>
1768 <listitem><para><emphasis><filename>version-going-backwards:</filename></emphasis>
1769 If Build History is enabled, reports when a package
1770 being written out has a lower version than the previously
1771 written package under the same name.
1772 If you are placing output packages into a feed and
1773 upgrading packages on a target system using that feed, the
1774 version of a package going backwards can result in the target
1775 system not correctly upgrading to the "new" version of the
1776 package.
1777 <note>
1778 If you are not using runtime package management on your
1779 target system, then you do not need to worry about
1780 this situation.
1781 </note>
1782 </para></listitem>
1783 <listitem><para><emphasis><filename>xorg-driver-abi:</filename></emphasis>
1784 Checks that all packages containing Xorg drivers have ABI
1785 dependencies.
1786 The <filename>xserver-xorg</filename> recipe provides driver
1787 ABI names.
1788 All drivers should depend on the ABI versions that they have
1789 been built against.
1790 Driver recipes that include
1791 <filename>xorg-driver-input.inc</filename>
1792 or <filename>xorg-driver-video.inc</filename> will
1793 automatically get these versions.
1794 Consequently, you should only need to explicitly add
1795 dependencies to binary driver recipes.
1796 </para></listitem>
1797 </itemizedlist>
1798 </para>
1799</section>
1800
1801<section id='ref-classes-insserv'>
1802 <title><filename>insserv.bbclass</filename></title>
1803
1804 <para>
1805 The <filename>insserv</filename> class
1806 uses the <filename>insserv</filename> utility to update the order of
1807 symbolic links in <filename>/etc/rc?.d/</filename> within an image
1808 based on dependencies specified by LSB headers in the
1809 <filename>init.d</filename> scripts themselves.
1810 </para>
1811</section>
1812
1813<section id='ref-classes-kernel'>
1814 <title><filename>kernel.bbclass</filename></title>
1815
1816 <para>
1817 The <filename>kernel</filename> class handles building Linux kernels.
1818 The class contains code to build all kernel trees.
1819 All needed headers are staged into the
1820 <filename><link linkend='var-STAGING_KERNEL_DIR'>STAGING_KERNEL_DIR</link></filename>
1821 directory to allow out-of-tree module builds using
1822 the
1823 <link linkend='ref-classes-module'><filename>module</filename></link>
1824 class.
1825 </para>
1826
1827 <para>
1828 This means that each built kernel module is packaged separately and
1829 inter-module dependencies are created by parsing the
1830 <filename>modinfo</filename> output.
1831 If all modules are required, then installing the
1832 <filename>kernel-modules</filename> package installs all packages with
1833 modules and various other kernel packages such as
1834 <filename>kernel-vmlinux</filename>.
1835 </para>
1836
1837 <para>
1838 The <filename>kernel</filename> class contains logic that allows
1839 you to embed an initial RAM filesystem (initramfs) image when
1840 you build the kernel image.
1841 For information on how to build an initramfs, see the
1842 "<ulink url='&YOCTO_DOCS_DEV_URL;#building-an-initramfs-image'>Building an Initial RAM Filesystem (initramfs) Image</ulink>"
1843 section in the Yocto Project Development Tasks Manual.
1844 </para>
1845
1846 <para>
1847 Various other classes are used by the <filename>kernel</filename>
1848 and <filename>module</filename> classes internally including the
1849 <link linkend='ref-classes-kernel-arch'><filename>kernel-arch</filename></link>,
1850 <link linkend='ref-classes-module-base'><filename>module-base</filename></link>,
1851 and
1852 <link linkend='ref-classes-linux-kernel-base'><filename>linux-kernel-base</filename></link>
1853 classes.
1854 </para>
1855</section>
1856
1857<section id='ref-classes-kernel-arch'>
1858 <title><filename>kernel-arch.bbclass</filename></title>
1859
1860 <para>
1861 The <filename>kernel-arch</filename> class
1862 sets the <filename>ARCH</filename> environment variable for Linux
1863 kernel compilation (including modules).
1864 </para>
1865</section>
1866
1867<section id='ref-classes-kernel-devicetree'>
1868 <title><filename>kernel-devicetree.bbclass</filename></title>
1869
1870 <para>
1871 The <filename>kernel-devicetree</filename> class, which is inherited by
1872 the
1873 <link linkend='ref-classes-kernel'><filename>kernel</filename></link>
1874 class, supports device tree generation.
1875 </para>
1876</section>
1877
1878<section id='ref-classes-kernel-fitimage'>
1879 <title><filename>kernel-fitimage.bbclass</filename></title>
1880
1881 <para>
1882 The <filename>kernel-fitimage</filename> class provides support to
1883 pack a kernel Image, device trees and a RAM disk into a single
1884 FIT image. In theory, a FIT image can support any number of kernels,
1885 RAM disks and device-trees.
1886 However, <filename>kernel-fitimage</filename> currently only supports
1887 limited usescases: just one kernel image, an optional RAM disk, and
1888 any number of device tree.
1889 </para>
1890
1891 <para>
1892 To create a FIT image, it is required that
1893 <filename><link linkend='var-KERNEL_CLASSES'>KERNEL_CLASSES</link></filename>
1894 is set to "kernel-fitimage" and
1895 <filename><link linkend='var-KERNEL_IMAGETYPE'>KERNEL_IMAGETYPE</link></filename>
1896 is set to "fitImage".
1897 </para>
1898
1899 <para>
1900 The options for the device tree compiler passed to mkimage -D feature
1901 when creating the FIT image are specified using the
1902 <filename><link linkend='var-UBOOT_MKIMAGE_DTCOPTS'>UBOOT_MKIMAGE_DTCOPTS</link></filename>
1903 variable.
1904 </para>
1905
1906 <para>
1907 Only a single kernel can be added to the FIT image created by
1908 <filename>kernel-fitimage</filename> and the kernel image in FIT is
1909 mandatory.
1910 The address where the kernel image is to be loaded by U-boot is
1911 specified by
1912 <filename><link linkend='var-UBOOT_LOADADDRESS'>UBOOT_LOADADDRESS</link></filename>
1913 and the entrypoint by
1914 <filename><link linkend='var-UBOOT_ENTRYPOINT'>UBOOT_ENTRYPOINT</link></filename>.
1915 </para>
1916
1917 <para>
1918 Multiple device trees can be added to the FIT image created by
1919 <filename>kernel-fitimage</filename> and the device tree is optional.
1920 The address where the device tree is to be loaded by U-boot is
1921 specified by
1922 <filename><link linkend='var-UBOOT_DTBO_LOADADDRESS'>UBOOT_DTBO_LOADADDRESS</link></filename>
1923 for device tree overlays and by
1924 <filename><link linkend='var-UBOOT_DTB_LOADADDRESS'>UBOOT_DTB_LOADADDRESS</link></filename>
1925 for device tree binaries.
1926 </para>
1927
1928 <para>
1929 Only a single RAM disk can be added to the FIT image created by
1930 <filename>kernel-fitimage</filename> and the RAM disk in FIT is
1931 optional.
1932 The address where the RAM disk image is to be loaded by U-boot
1933 is specified by
1934 <filename><link linkend='var-UBOOT_RD_LOADADDRESS'>UBOOT_RD_LOADADDRESS</link></filename>
1935 and the entrypoint by
1936 <filename><link linkend='var-UBOOT_RD_ENTRYPOINT'>UBOOT_RD_ENTRYPOINT</link></filename>.
1937 The ramdisk is added to FIT image when
1938 <filename><link linkend='var-INITRAMFS_IMAGE'>INITRAMFS_IMAGE</link></filename>
1939 is specified.
1940 </para>
1941
1942 <para>
1943 The FIT image generated by <filename>kernel-fitimage</filename> class
1944 is signed when the variables
1945 <filename><link linkend='var-UBOOT_SIGN_ENABLE'>UBOOT_SIGN_ENABLE</link></filename>,
1946 <filename><link linkend='var-UBOOT_MKIMAGE_DTCOPTS'>UBOOT_MKIMAGE_DTCOPTS</link></filename>,
1947 <filename><link linkend='var-UBOOT_SIGN_KEYDIR'>UBOOT_SIGN_KEYDIR</link></filename>
1948 and
1949 <filename><link linkend='var-UBOOT_SIGN_KEYNAME'>UBOOT_SIGN_KEYNAME</link></filename>
1950 are set appropriately.
1951 The default values used for
1952 <filename><link linkend='var-FIT_HASH_ALG'>FIT_HASH_ALG</link></filename>
1953 and
1954 <filename><link linkend='var-FIT_SIGN_ALG'>FIT_SIGN_ALG</link></filename>
1955 in <filename>kernel-fitimage</filename> are "sha256" and "rsa2048"
1956 respectively.
1957 </para>
1958
1959</section>
1960
1961<section id='ref-classes-kernel-grub'>
1962 <title><filename>kernel-grub.bbclass</filename></title>
1963
1964 <para>
1965 The <filename>kernel-grub</filename> class updates the boot area and
1966 the boot menu with the kernel as the priority boot mechanism while
1967 installing a RPM to update the kernel on a deployed target.
1968 </para>
1969</section>
1970
1971<section id='ref-classes-kernel-module-split'>
1972 <title><filename>kernel-module-split.bbclass</filename></title>
1973
1974 <para>
1975 The <filename>kernel-module-split</filename> class
1976 provides common functionality for splitting Linux kernel modules into
1977 separate packages.
1978 </para>
1979</section>
1980
1981<section id='ref-classes-kernel-uboot'>
1982 <title><filename>kernel-uboot.bbclass</filename></title>
1983
1984 <para>
1985 The <filename>kernel-uboot</filename> class provides support for
1986 building from vmlinux-style kernel sources.
1987 </para>
1988</section>
1989
1990<section id='ref-classes-kernel-uimage'>
1991 <title><filename>kernel-uimage.bbclass</filename></title>
1992
1993 <para>
1994 The <filename>kernel-uimage</filename> class provides support to
1995 pack uImage.
1996 </para>
1997</section>
1998
1999<section id='ref-classes-kernel-yocto'>
2000 <title><filename>kernel-yocto.bbclass</filename></title>
2001
2002 <para>
2003 The <filename>kernel-yocto</filename> class
2004 provides common functionality for building from linux-yocto style
2005 kernel source repositories.
2006 </para>
2007</section>
2008
2009<section id='ref-classes-kernelsrc'>
2010 <title><filename>kernelsrc.bbclass</filename></title>
2011
2012 <para>
2013 The <filename>kernelsrc</filename> class sets the Linux kernel
2014 source and version.
2015 </para>
2016</section>
2017
2018<section id='ref-classes-lib_package'>
2019 <title><filename>lib_package.bbclass</filename></title>
2020
2021 <para>
2022 The <filename>lib_package</filename> class
2023 supports recipes that build libraries and produce executable
2024 binaries, where those binaries should not be installed by default
2025 along with the library.
2026 Instead, the binaries are added to a separate
2027 <filename>${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}-bin</filename>
2028 package to make their installation optional.
2029 </para>
2030</section>
2031
2032<section id='ref-classes-libc*'>
2033 <title><filename>libc*.bbclass</filename></title>
2034
2035 <para>
2036 The <filename>libc*</filename> classes support recipes that build
2037 packages with <filename>libc</filename>:
2038 <itemizedlist>
2039 <listitem><para>The <filename>libc-common</filename> class
2040 provides common support for building with
2041 <filename>libc</filename>.
2042 </para></listitem>
2043 <listitem><para>The <filename>libc-package</filename> class
2044 supports packaging up <filename>glibc</filename> and
2045 <filename>eglibc</filename>.
2046 </para></listitem>
2047 </itemizedlist>
2048 </para>
2049</section>
2050
2051<section id='ref-classes-license'>
2052 <title><filename>license.bbclass</filename></title>
2053
2054 <para>
2055 The <filename>license</filename> class provides license
2056 manifest creation and license exclusion.
2057 This class is enabled by default using the default value for the
2058 <link linkend='var-INHERIT_DISTRO'><filename>INHERIT_DISTRO</filename></link>
2059 variable.
2060 </para>
2061</section>
2062
2063<section id='ref-classes-linux-kernel-base'>
2064 <title><filename>linux-kernel-base.bbclass</filename></title>
2065
2066 <para>
2067 The <filename>linux-kernel-base</filename> class
2068 provides common functionality for recipes that build out of the Linux
2069 kernel source tree.
2070 These builds goes beyond the kernel itself.
2071 For example, the Perf recipe also inherits this class.
2072 </para>
2073</section>
2074
2075<section id='ref-classes-linuxloader'>
2076 <title><filename>linuxloader.bbclass</filename></title>
2077
2078 <para>
2079 Provides the function <filename>linuxloader()</filename>, which gives
2080 the value of the dynamic loader/linker provided on the platform.
2081 This value is used by a number of other classes.
2082 </para>
2083</section>
2084
2085<section id='ref-classes-logging'>
2086 <title><filename>logging.bbclass</filename></title>
2087
2088 <para>
2089 The <filename>logging</filename> class provides the standard
2090 shell functions used to log messages for various BitBake severity levels
2091 (i.e. <filename>bbplain</filename>, <filename>bbnote</filename>,
2092 <filename>bbwarn</filename>, <filename>bberror</filename>,
2093 <filename>bbfatal</filename>, and <filename>bbdebug</filename>).
2094 </para>
2095
2096 <para>
2097 This class is enabled by default since it is inherited by
2098 the <filename>base</filename> class.
2099 </para>
2100</section>
2101
2102<section id='ref-classes-meta'>
2103 <title><filename>meta.bbclass</filename></title>
2104
2105 <para>
2106 The <filename>meta</filename> class is inherited by recipes
2107 that do not build any output packages themselves, but act as a "meta"
2108 target for building other recipes.
2109 </para>
2110</section>
2111
2112<section id='ref-classes-metadata_scm'>
2113 <title><filename>metadata_scm.bbclass</filename></title>
2114
2115 <para>
2116 The <filename>metadata_scm</filename> class provides functionality for
2117 querying the branch and revision of a Source Code Manager (SCM)
2118 repository.
2119 </para>
2120
2121 <para>
2122 The <link linkend='ref-classes-base'><filename>base</filename></link>
2123 class uses this class to print the revisions of each layer before
2124 starting every build.
2125 The <filename>metadata_scm</filename> class is enabled by default
2126 because it is inherited by the <filename>base</filename> class.
2127 </para>
2128</section>
2129
2130<section id='ref-classes-migrate_localcount'>
2131 <title><filename>migrate_localcount.bbclass</filename></title>
2132
2133 <para>
2134 The <filename>migrate_localcount</filename> class verifies a recipe's
2135 localcount data and increments it appropriately.
2136 </para>
2137</section>
2138
2139<section id='ref-classes-mime'>
2140 <title><filename>mime.bbclass</filename></title>
2141
2142 <para>
2143 The <filename>mime</filename> class generates the proper
2144 post-install and post-remove (postinst/postrm) scriptlets for packages
2145 that install MIME type files.
2146 These scriptlets call <filename>update-mime-database</filename> to add
2147 the MIME types to the shared database.
2148 </para>
2149</section>
2150
2151<section id='ref-classes-mirrors'>
2152 <title><filename>mirrors.bbclass</filename></title>
2153
2154 <para>
2155 The <filename>mirrors</filename> class sets up some standard
2156 <link linkend='var-MIRRORS'><filename>MIRRORS</filename></link> entries
2157 for source code mirrors.
2158 These mirrors provide a fall-back path in case the upstream source
2159 specified in
2160 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
2161 within recipes is unavailable.
2162 </para>
2163
2164 <para>
2165 This class is enabled by default since it is inherited by the
2166 <link linkend='ref-classes-base'><filename>base</filename></link> class.
2167 </para>
2168</section>
2169
2170<section id='ref-classes-module'>
2171 <title><filename>module.bbclass</filename></title>
2172
2173 <para>
2174 The <filename>module</filename> class provides support for building
2175 out-of-tree Linux kernel modules.
2176 The class inherits the
2177 <link linkend='ref-classes-module-base'><filename>module-base</filename></link>
2178 and
2179 <link linkend='ref-classes-kernel-module-split'><filename>kernel-module-split</filename></link>
2180 classes, and implements the
2181 <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>
2182 and
2183 <link linkend='ref-tasks-install'><filename>do_install</filename></link>
2184 tasks.
2185 The class provides everything needed to build and package a kernel
2186 module.
2187 </para>
2188
2189 <para>
2190 For general information on out-of-tree Linux kernel modules, see the
2191 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#incorporating-out-of-tree-modules'>Incorporating Out-of-Tree Modules</ulink>"
2192 section in the Yocto Project Linux Kernel Development Manual.
2193 </para>
2194</section>
2195
2196<section id='ref-classes-module-base'>
2197 <title><filename>module-base.bbclass</filename></title>
2198
2199 <para>
2200 The <filename>module-base</filename> class provides the base
2201 functionality for building Linux kernel modules.
2202 Typically, a recipe that builds software that includes one or
2203 more kernel modules and has its own means of building
2204 the module inherits this class as opposed to inheriting the
2205 <link linkend='ref-classes-module'><filename>module</filename></link>
2206 class.
2207 </para>
2208</section>
2209
2210<section id='ref-classes-multilib*'>
2211 <title><filename>multilib*.bbclass</filename></title>
2212
2213 <para>
2214 The <filename>multilib*</filename> classes provide support
2215 for building libraries with different target optimizations or target
2216 architectures and installing them side-by-side in the same image.
2217 </para>
2218
2219 <para>
2220 For more information on using the Multilib feature, see the
2221 "<ulink url='&YOCTO_DOCS_DEV_URL;#combining-multiple-versions-library-files-into-one-image'>Combining Multiple Versions of Library Files into One Image</ulink>"
2222 section in the Yocto Project Development Tasks Manual.
2223 </para>
2224</section>
2225
2226<section id='ref-classes-native'>
2227 <title><filename>native.bbclass</filename></title>
2228
2229 <para>
2230 The <filename>native</filename> class provides common
2231 functionality for recipes that build tools to run on the
2232 <link linkend='hardware-build-system-term'>build host</link>
2233 (i.e. tools that use the compiler or other tools from the
2234 build host).
2235 </para>
2236
2237 <para>
2238 You can create a recipe that builds tools that run natively on the
2239 host a couple different ways:
2240 <itemizedlist>
2241 <listitem><para>
2242 Create a
2243 <replaceable>myrecipe</replaceable><filename>-native.bb</filename>
2244 recipe that inherits the <filename>native</filename> class.
2245 If you use this method, you must order the inherit statement
2246 in the recipe after all other inherit statements so that the
2247 <filename>native</filename> class is inherited last.
2248 <note><title>Warning</title>
2249 When creating a recipe this way, the recipe name must
2250 follow this naming convention:
2251 <literallayout class='monospaced'>
2252 <replaceable>myrecipe</replaceable>-native.bb
2253 </literallayout>
2254 Not using this naming convention can lead to subtle
2255 problems caused by existing code that depends on that
2256 naming convention.
2257 </note>
2258 </para></listitem>
2259 <listitem><para>
2260 Create or modify a target recipe that contains the following:
2261 <literallayout class='monospaced'>
2262 <link linkend='var-BBCLASSEXTEND'><filename>BBCLASSEXTEND</filename></link> = "native"
2263 </literallayout>
2264 Inside the recipe, use <filename>_class-native</filename> and
2265 <filename>_class-target</filename> overrides to specify any
2266 functionality specific to the respective native or target
2267 case.
2268 </para></listitem>
2269 </itemizedlist>
2270 </para>
2271
2272 <para>
2273 Although applied differently, the <filename>native</filename> class is
2274 used with both methods.
2275 The advantage of the second method is that you do not need to have two
2276 separate recipes (assuming you need both) for native and target.
2277 All common parts of the recipe are automatically shared.
2278 </para>
2279</section>
2280
2281<section id='ref-classes-nativesdk'>
2282 <title><filename>nativesdk.bbclass</filename></title>
2283
2284 <para>
2285 The <filename>nativesdk</filename> class provides common
2286 functionality for recipes that wish to build tools to run as part of
2287 an SDK (i.e. tools that run on
2288 <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>).
2289 </para>
2290
2291 <para>
2292 You can create a recipe that builds tools that run on the SDK machine
2293 a couple different ways:
2294 <itemizedlist>
2295 <listitem><para>Create a
2296 <filename>nativesdk-</filename><replaceable>myrecipe</replaceable><filename>.bb</filename>
2297 recipe that inherits the <filename>nativesdk</filename> class.
2298 If you use this method, you must order the inherit statement
2299 in the recipe after all other inherit statements so that the
2300 <filename>nativesdk</filename> class is inherited last.
2301 </para></listitem>
2302 <listitem><para>Create a <filename>nativesdk</filename> variant
2303 of any recipe by adding the following:
2304 <literallayout class='monospaced'>
2305 <link linkend='var-BBCLASSEXTEND'><filename>BBCLASSEXTEND</filename></link> = "nativesdk"
2306 </literallayout>
2307 Inside the recipe, use <filename>_class-nativesdk</filename> and
2308 <filename>_class-target</filename> overrides to specify any
2309 functionality specific to the respective SDK machine or target
2310 case.</para></listitem>
2311 </itemizedlist>
2312 <note><title>Warning</title>
2313 When creating a recipe, you must follow this naming convention:
2314 <literallayout class='monospaced'>
2315 nativesdk-<replaceable>myrecipe</replaceable>.bb
2316 </literallayout>
2317 Not doing so can lead to subtle problems because code exists
2318 that depends on the naming convention.
2319 </note>
2320 </para>
2321
2322 <para>
2323 Although applied differently, the <filename>nativesdk</filename> class
2324 is used with both methods.
2325 The advantage of the second method is that you do not need to have two
2326 separate recipes (assuming you need both) for the SDK machine and the
2327 target.
2328 All common parts of the recipe are automatically shared.
2329 </para>
2330</section>
2331
2332<section id='ref-classes-nopackages'>
2333 <title><filename>nopackages.bbclass</filename></title>
2334
2335 <para>
2336 Disables packaging tasks for those recipes and classes where
2337 packaging is not needed.
2338 </para>
2339</section>
2340
2341<section id='ref-classes-npm'>
2342 <title><filename>npm.bbclass</filename></title>
2343
2344 <para>
2345 Provides support for building Node.js software fetched using the
2346 <ulink url='https://en.wikipedia.org/wiki/Npm_(software)'>node package manager (NPM)</ulink>.
2347 <note>
2348 Currently, recipes inheriting this class must use the
2349 <filename>npm://</filename> fetcher to have dependencies fetched
2350 and packaged automatically.
2351 </note>
2352 For information on how to create NPM packages, see the
2353 "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-node-package-manager-npm-packages'>Creating Node Package Manager (NPM) Packages</ulink>"
2354 section in the Yocto Project Development Tasks Manual.
2355 </para>
2356</section>
2357
2358<section id='ref-classes-oelint'>
2359 <title><filename>oelint.bbclass</filename></title>
2360
2361 <para>
2362 The <filename>oelint</filename> class is an
2363 obsolete lint checking tool that exists in
2364 <filename>meta/classes</filename> in the
2365 <link linkend='source-directory'>Source Directory</link>.
2366 </para>
2367
2368 <para>
2369 A number of classes exist that could be generally useful in
2370 OE-Core but are never actually used within OE-Core itself.
2371 The <filename>oelint</filename> class is one such example.
2372 However, being aware of this class can reduce the proliferation of
2373 different versions of similar classes across multiple layers.
2374 </para>
2375</section>
2376
2377<section id='ref-classes-own-mirrors'>
2378 <title><filename>own-mirrors.bbclass</filename></title>
2379
2380 <para>
2381 The <filename>own-mirrors</filename> class makes it
2382 easier to set up your own
2383 <link linkend='var-PREMIRRORS'><filename>PREMIRRORS</filename></link>
2384 from which to first fetch source before attempting to fetch it from the
2385 upstream specified in
2386 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
2387 within each recipe.
2388 </para>
2389
2390 <para>
2391 To use this class, inherit it globally and specify
2392 <link linkend='var-SOURCE_MIRROR_URL'><filename>SOURCE_MIRROR_URL</filename></link>.
2393 Here is an example:
2394 <literallayout class='monospaced'>
2395 INHERIT += "own-mirrors"
2396 SOURCE_MIRROR_URL = "http://example.com/my-source-mirror"
2397 </literallayout>
2398 You can specify only a single URL in
2399 <filename>SOURCE_MIRROR_URL</filename>.
2400 </para>
2401</section>
2402
2403<section id='ref-classes-package'>
2404 <title><filename>package.bbclass</filename></title>
2405
2406 <para>
2407 The <filename>package</filename> class supports generating
2408 packages from a build's output.
2409 The core generic functionality is in
2410 <filename>package.bbclass</filename>.
2411 The code specific to particular package types resides in these
2412 package-specific classes:
2413 <link linkend='ref-classes-package_deb'><filename>package_deb</filename></link>,
2414 <link linkend='ref-classes-package_rpm'><filename>package_rpm</filename></link>,
2415 <link linkend='ref-classes-package_ipk'><filename>package_ipk</filename></link>,
2416 and
2417 <link linkend='ref-classes-package_tar'><filename>package_tar</filename></link>.
2418 <note><title>Warning</title>
2419 The <filename>package_tar</filename> class is broken and not
2420 supported.
2421 It is recommended that you do not use this class.
2422 </note>
2423 </para>
2424
2425 <para>
2426 You can control the list of resulting package formats by using the
2427 <filename><link linkend='var-PACKAGE_CLASSES'>PACKAGE_CLASSES</link></filename>
2428 variable defined in your <filename>conf/local.conf</filename>
2429 configuration file, which is located in the
2430 <link linkend='build-directory'>Build Directory</link>.
2431 When defining the variable, you can specify one or more package types.
2432 Since images are generated from packages, a packaging class is
2433 needed to enable image generation.
2434 The first class listed in this variable is used for image generation.
2435 </para>
2436
2437 <para>
2438 If you take the optional step to set up a repository (package feed)
2439 on the development host that can be used by DNF, you can
2440 install packages from the feed while you are running the image
2441 on the target (i.e. runtime installation of packages).
2442 For more information, see the
2443 "<ulink url='&YOCTO_DOCS_DEV_URL;#using-runtime-package-management'>Using Runtime Package Management</ulink>"
2444 section in the Yocto Project Development Tasks Manual.
2445 </para>
2446
2447 <para>
2448 The package-specific class you choose can affect build-time performance
2449 and has space ramifications.
2450 In general, building a package with IPK takes about thirty percent less
2451 time as compared to using RPM to build the same or similar package.
2452 This comparison takes into account a complete build of the package with
2453 all dependencies previously built.
2454 The reason for this discrepancy is because the RPM package manager
2455 creates and processes more
2456 <link linkend='metadata'>Metadata</link> than the
2457 IPK package manager.
2458 Consequently, you might consider setting
2459 <filename>PACKAGE_CLASSES</filename> to "package_ipk" if you are
2460 building smaller systems.
2461 </para>
2462
2463 <para>
2464 Before making your package manager decision, however, you should
2465 consider some further things about using RPM:
2466 <itemizedlist>
2467 <listitem><para>
2468 RPM starts to provide more abilities than IPK due to
2469 the fact that it processes more Metadata.
2470 For example, this information includes individual file types,
2471 file checksum generation and evaluation on install, sparse file
2472 support, conflict detection and resolution for Multilib systems,
2473 ACID style upgrade, and repackaging abilities for rollbacks.
2474 </para></listitem>
2475 <listitem><para>
2476 For smaller systems, the extra space used for the Berkeley
2477 Database and the amount of metadata when using RPM can affect
2478 your ability to perform on-device upgrades.
2479 </para></listitem>
2480 </itemizedlist>
2481 </para>
2482
2483 <para>
2484 You can find additional information on the effects of the package
2485 class at these two Yocto Project mailing list links:
2486 <itemizedlist>
2487 <listitem><para><ulink url='&YOCTO_LISTS_URL;/pipermail/poky/2011-May/006362.html'>
2488 https://lists.yoctoproject.org/pipermail/poky/2011-May/006362.html</ulink></para></listitem>
2489 <listitem><para><ulink url='&YOCTO_LISTS_URL;/pipermail/poky/2011-May/006363.html'>
2490 https://lists.yoctoproject.org/pipermail/poky/2011-May/006363.html</ulink></para></listitem>
2491 </itemizedlist>
2492 </para>
2493</section>
2494
2495<section id='ref-classes-package_deb'>
2496 <title><filename>package_deb.bbclass</filename></title>
2497
2498 <para>
2499 The <filename>package_deb</filename> class
2500 provides support for creating packages that use the Debian
2501 (i.e. <filename>.deb</filename>) file format.
2502 The class ensures the packages are written out in a
2503 <filename>.deb</filename> file format to the
2504 <filename>${</filename><link linkend='var-DEPLOY_DIR_DEB'><filename>DEPLOY_DIR_DEB</filename></link><filename>}</filename>
2505 directory.
2506 </para>
2507
2508 <para>
2509 This class inherits the
2510 <link linkend='ref-classes-package'><filename>package</filename></link>
2511 class and is enabled through the
2512 <link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>
2513 variable in the <filename>local.conf</filename> file.
2514 </para>
2515</section>
2516
2517<section id='ref-classes-package_ipk'>
2518 <title><filename>package_ipk.bbclass</filename></title>
2519
2520 <para>
2521 The <filename>package_ipk</filename> class
2522 provides support for creating packages that use the IPK
2523 (i.e. <filename>.ipk</filename>) file format.
2524 The class ensures the packages are written out in a
2525 <filename>.ipk</filename> file format to the
2526 <filename>${</filename><link linkend='var-DEPLOY_DIR_IPK'><filename>DEPLOY_DIR_IPK</filename></link><filename>}</filename>
2527 directory.
2528 </para>
2529
2530 <para>
2531 This class inherits the
2532 <link linkend='ref-classes-package'><filename>package</filename></link>
2533 class and is enabled through the
2534 <link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>
2535 variable in the <filename>local.conf</filename> file.
2536 </para>
2537</section>
2538
2539<section id='ref-classes-package_rpm'>
2540 <title><filename>package_rpm.bbclass</filename></title>
2541
2542 <para>
2543 The <filename>package_rpm</filename> class
2544 provides support for creating packages that use the RPM
2545 (i.e. <filename>.rpm</filename>) file format.
2546 The class ensures the packages are written out in a
2547 <filename>.rpm</filename> file format to the
2548 <filename>${</filename><link linkend='var-DEPLOY_DIR_RPM'><filename>DEPLOY_DIR_RPM</filename></link><filename>}</filename>
2549 directory.
2550 </para>
2551
2552 <para>
2553 This class inherits the
2554 <link linkend='ref-classes-package'><filename>package</filename></link>
2555 class and is enabled through the
2556 <link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>
2557 variable in the <filename>local.conf</filename> file.
2558 </para>
2559</section>
2560
2561<section id='ref-classes-package_tar'>
2562 <title><filename>package_tar.bbclass</filename></title>
2563
2564 <para>
2565 The <filename>package_tar</filename> class
2566 provides support for creating tarballs.
2567 The class ensures the packages are written out in a
2568 tarball format to the
2569 <filename>${</filename><link linkend='var-DEPLOY_DIR_TAR'><filename>DEPLOY_DIR_TAR</filename></link><filename>}</filename>
2570 directory.
2571 </para>
2572
2573 <para>
2574 This class inherits the
2575 <link linkend='ref-classes-package'><filename>package</filename></link>
2576 class and is enabled through the
2577 <link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>
2578 variable in the <filename>local.conf</filename> file.
2579 <note>
2580 You cannot specify the <filename>package_tar</filename> class
2581 first using the <filename>PACKAGE_CLASSES</filename> variable.
2582 You must use <filename>.deb</filename>,
2583 <filename>.ipk</filename>, or <filename>.rpm</filename> file
2584 formats for your image or SDK.
2585 </note>
2586 </para>
2587</section>
2588
2589<section id='ref-classes-packagedata'>
2590 <title><filename>packagedata.bbclass</filename></title>
2591
2592 <para>
2593 The <filename>packagedata</filename> class provides
2594 common functionality for reading <filename>pkgdata</filename> files
2595 found in
2596 <link linkend='var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></link>.
2597 These files contain information about each output package produced by
2598 the OpenEmbedded build system.
2599 </para>
2600
2601 <para>
2602 This class is enabled by default because it is inherited by the
2603 <link linkend='ref-classes-package'><filename>package</filename></link>
2604 class.
2605 </para>
2606</section>
2607
2608<section id='ref-classes-packagegroup'>
2609 <title><filename>packagegroup.bbclass</filename></title>
2610
2611 <para>
2612 The <filename>packagegroup</filename> class sets default values
2613 appropriate for package group recipes (e.g.
2614 <filename><link linkend='var-PACKAGES'>PACKAGES</link></filename>,
2615 <filename><link linkend='var-PACKAGE_ARCH'>PACKAGE_ARCH</link></filename>,
2616 <filename><link linkend='var-ALLOW_EMPTY'>ALLOW_EMPTY</link></filename>,
2617 and so forth).
2618 It is highly recommended that all package group recipes inherit this class.
2619 </para>
2620
2621 <para>
2622 For information on how to use this class, see the
2623 "<ulink url='&YOCTO_DOCS_DEV_URL;#usingpoky-extend-customimage-customtasks'>Customizing Images Using Custom Package Groups</ulink>"
2624 section in the Yocto Project Development Tasks Manual.
2625 </para>
2626
2627 <para>
2628 Previously, this class was called the <filename>task</filename> class.
2629 </para>
2630</section>
2631
2632<section id='ref-classes-patch'>
2633 <title><filename>patch.bbclass</filename></title>
2634
2635 <para>
2636 The <filename>patch</filename> class provides all functionality for
2637 applying patches during the
2638 <link linkend='ref-tasks-patch'><filename>do_patch</filename></link>
2639 task.
2640 </para>
2641
2642 <para>
2643 This class is enabled by default because it is inherited by the
2644 <link linkend='ref-classes-base'><filename>base</filename></link>
2645 class.
2646 </para>
2647</section>
2648
2649<section id='ref-classes-perlnative'>
2650 <title><filename>perlnative.bbclass</filename></title>
2651
2652 <para>
2653 When inherited by a recipe, the <filename>perlnative</filename> class
2654 supports using the native version of Perl built by the build system
2655 rather than using the version provided by the build host.
2656 </para>
2657</section>
2658
2659<section id='ref-classes-pixbufcache'>
2660 <title><filename>pixbufcache.bbclass</filename></title>
2661
2662 <para>
2663 The <filename>pixbufcache</filename> class generates the proper
2664 post-install and post-remove (postinst/postrm) scriptlets for packages
2665 that install pixbuf loaders, which are used with
2666 <filename>gdk-pixbuf</filename>.
2667 These scriptlets call <filename>update_pixbuf_cache</filename>
2668 to add the pixbuf loaders to the cache.
2669 Since the cache files are architecture-specific,
2670 <filename>update_pixbuf_cache</filename> is run using QEMU if the
2671 postinst scriptlets need to be run on the build host during image
2672 creation.
2673 </para>
2674
2675 <para>
2676 If the pixbuf loaders being installed are in packages other
2677 than the recipe's main package, set
2678 <link linkend='var-PIXBUF_PACKAGES'><filename>PIXBUF_PACKAGES</filename></link>
2679 to specify the packages containing the loaders.
2680 </para>
2681</section>
2682
2683<section id='ref-classes-pkgconfig'>
2684 <title><filename>pkgconfig.bbclass</filename></title>
2685
2686 <para>
2687 The <filename>pkgconfig</filename> class provides a standard way to get
2688 header and library information by using <filename>pkg-config</filename>.
2689 This class aims to smooth integration of
2690 <filename>pkg-config</filename> into libraries that use it.
2691 </para>
2692
2693 <para>
2694 During staging, BitBake installs <filename>pkg-config</filename>
2695 data into the <filename>sysroots/</filename> directory.
2696 By making use of sysroot functionality within
2697 <filename>pkg-config</filename>, the <filename>pkgconfig</filename>
2698 class no longer has to manipulate the files.
2699 </para>
2700</section>
2701
2702<section id='ref-classes-populate-sdk'>
2703 <title><filename>populate_sdk.bbclass</filename></title>
2704
2705 <para>
2706 The <filename>populate_sdk</filename> class provides support for
2707 SDK-only recipes.
2708 For information on advantages gained when building a cross-development
2709 toolchain using the
2710 <link linkend='ref-tasks-populate_sdk'><filename>do_populate_sdk</filename></link>
2711 task, see the
2712 "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-building-an-sdk-installer'>Building an SDK Installer</ulink>"
2713 section in the Yocto Project Application Development and the
2714 Extensible Software Development Kit (eSDK) manual.
2715 </para>
2716</section>
2717
2718<section id='ref-classes-populate-sdk-*'>
2719 <title><filename>populate_sdk_*.bbclass</filename></title>
2720
2721 <para>
2722 The <filename>populate_sdk_*</filename> classes support SDK creation
2723 and consist of the following classes:
2724 <itemizedlist>
2725 <listitem><para><emphasis><filename>populate_sdk_base</filename>:</emphasis>
2726 The base class supporting SDK creation under all package
2727 managers (i.e. DEB, RPM, and opkg).</para></listitem>
2728 <listitem><para><emphasis><filename>populate_sdk_deb</filename>:</emphasis>
2729 Supports creation of the SDK given the Debian package manager.
2730 </para></listitem>
2731 <listitem><para><emphasis><filename>populate_sdk_rpm</filename>:</emphasis>
2732 Supports creation of the SDK given the RPM package manager.
2733 </para></listitem>
2734 <listitem><para><emphasis><filename>populate_sdk_ipk</filename>:</emphasis>
2735 Supports creation of the SDK given the opkg (IPK format)
2736 package manager.
2737 </para></listitem>
2738 <listitem><para><emphasis><filename>populate_sdk_ext</filename>:</emphasis>
2739 Supports extensible SDK creation under all package managers.
2740 </para></listitem>
2741 </itemizedlist>
2742 </para>
2743
2744 <para>
2745 The <filename>populate_sdk_base</filename> class inherits the
2746 appropriate <filename>populate_sdk_*</filename> (i.e.
2747 <filename>deb</filename>, <filename>rpm</filename>, and
2748 <filename>ipk</filename>) based on
2749 <link linkend='var-IMAGE_PKGTYPE'><filename>IMAGE_PKGTYPE</filename></link>.
2750 </para>
2751
2752 <para>
2753 The base class ensures all source and destination directories are
2754 established and then populates the SDK.
2755 After populating the SDK, the <filename>populate_sdk_base</filename>
2756 class constructs two sysroots:
2757 <filename>${</filename><link linkend='var-SDK_ARCH'><filename>SDK_ARCH</filename></link><filename>}-nativesdk</filename>,
2758 which contains the cross-compiler and associated tooling, and the
2759 target, which contains a target root filesystem that is configured for
2760 the SDK usage.
2761 These two images reside in
2762 <link linkend='var-SDK_OUTPUT'><filename>SDK_OUTPUT</filename></link>,
2763 which consists of the following:
2764 <literallayout class='monospaced'>
2765 ${SDK_OUTPUT}/${SDK_ARCH}<replaceable>-nativesdk-pkgs</replaceable>
2766 ${SDK_OUTPUT}/${SDKTARGETSYSROOT}/<replaceable>target-pkgs</replaceable>
2767 </literallayout>
2768 </para>
2769
2770 <para>
2771 Finally, the base populate SDK class creates the toolchain
2772 environment setup script, the tarball of the SDK, and the installer.
2773 </para>
2774
2775 <para>
2776 The respective <filename>populate_sdk_deb</filename>,
2777 <filename>populate_sdk_rpm</filename>, and
2778 <filename>populate_sdk_ipk</filename> classes each support the
2779 specific type of SDK.
2780 These classes are inherited by and used with the
2781 <filename>populate_sdk_base</filename> class.
2782 </para>
2783
2784 <para>
2785 For more information on the cross-development toolchain
2786 generation, see the
2787 "<ulink url='&YOCTO_DOCS_OM_URL;#cross-development-toolchain-generation'>Cross-Development Toolchain Generation</ulink>"
2788 section in the Yocto Project Overview and Concepts Manual.
2789 For information on advantages gained when building a
2790 cross-development toolchain using the
2791 <link linkend='ref-tasks-populate_sdk'><filename>do_populate_sdk</filename></link>
2792 task, see the
2793 "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-building-an-sdk-installer'>Building an SDK Installer</ulink>"
2794 section in the Yocto Project Application Development and the
2795 Extensible Software Development Kit (eSDK) manual.
2796 </para>
2797</section>
2798
2799<section id='ref-classes-prexport'>
2800 <title><filename>prexport.bbclass</filename></title>
2801
2802 <para>
2803 The <filename>prexport</filename> class provides functionality for
2804 exporting
2805 <link linkend='var-PR'><filename>PR</filename></link> values.
2806 <note>
2807 This class is not intended to be used directly.
2808 Rather, it is enabled when using
2809 "<filename>bitbake-prserv-tool export</filename>".
2810 </note>
2811 </para>
2812</section>
2813
2814<section id='ref-classes-primport'>
2815 <title><filename>primport.bbclass</filename></title>
2816
2817 <para>
2818 The <filename>primport</filename> class provides functionality for
2819 importing
2820 <link linkend='var-PR'><filename>PR</filename></link> values.
2821 <note>
2822 This class is not intended to be used directly.
2823 Rather, it is enabled when using
2824 "<filename>bitbake-prserv-tool import</filename>".
2825 </note>
2826 </para>
2827</section>
2828
2829<section id='ref-classes-prserv'>
2830 <title><filename>prserv.bbclass</filename></title>
2831
2832 <para>
2833 The <filename>prserv</filename> class provides functionality for
2834 using a
2835 <ulink url='&YOCTO_DOCS_DEV_URL;#working-with-a-pr-service'>PR service</ulink>
2836 in order to automatically manage the incrementing of the
2837 <link linkend='var-PR'><filename>PR</filename></link> variable for
2838 each recipe.
2839 </para>
2840
2841 <para>
2842 This class is enabled by default because it is inherited by the
2843 <link linkend='ref-classes-package'><filename>package</filename></link>
2844 class.
2845 However, the OpenEmbedded build system will not enable the
2846 functionality of this class unless
2847 <link linkend='var-PRSERV_HOST'><filename>PRSERV_HOST</filename></link>
2848 has been set.
2849 </para>
2850</section>
2851
2852<section id='ref-classes-ptest'>
2853 <title><filename>ptest.bbclass</filename></title>
2854
2855 <para>
2856 The <filename>ptest</filename> class provides functionality for
2857 packaging and installing runtime tests for recipes that build software
2858 that provides these tests.
2859 </para>
2860
2861 <para>
2862 This class is intended to be inherited by individual recipes.
2863 However, the class' functionality is largely disabled unless "ptest"
2864 appears in
2865 <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>.
2866 See the
2867 "<ulink url='&YOCTO_DOCS_DEV_URL;#testing-packages-with-ptest'>Testing Packages With ptest</ulink>"
2868 section in the Yocto Project Development Tasks Manual for more
2869 information on ptest.
2870 </para>
2871</section>
2872
2873<section id='ref-classes-ptest-gnome'>
2874 <title><filename>ptest-gnome.bbclass</filename></title>
2875
2876 <para>
2877 Enables package tests (ptests) specifically for GNOME packages,
2878 which have tests intended to be executed with
2879 <filename>gnome-desktop-testing</filename>.
2880 </para>
2881
2882 <para>
2883 For information on setting up and running ptests, see the
2884 "<ulink url='&YOCTO_DOCS_DEV_URL;#testing-packages-with-ptest'>Testing Packages With ptest</ulink>"
2885 section in the Yocto Project Development Tasks Manual.
2886 </para>
2887</section>
2888
2889<section id='ref-classes-python-dir'>
2890 <title><filename>python-dir.bbclass</filename></title>
2891
2892 <para>
2893 The <filename>python-dir</filename> class provides the base version,
2894 location, and site package location for Python.
2895 </para>
2896</section>
2897
2898<section id='ref-classes-python3native'>
2899 <title><filename>python3native.bbclass</filename></title>
2900
2901 <para>
2902 The <filename>python3native</filename> class supports using the
2903 native version of Python 3 built by the build system rather than
2904 support of the version provided by the build host.
2905 </para>
2906</section>
2907
2908<section id='ref-classes-pythonnative'>
2909 <title><filename>pythonnative.bbclass</filename></title>
2910
2911 <para>
2912 When inherited by a recipe, the <filename>pythonnative</filename> class
2913 supports using the native version of Python built by the build system
2914 rather than using the version provided by the build host.
2915 </para>
2916</section>
2917
2918<section id='ref-classes-qemu'>
2919 <title><filename>qemu.bbclass</filename></title>
2920
2921 <para>
2922 The <filename>qemu</filename> class provides functionality for recipes
2923 that either need QEMU or test for the existence of QEMU.
2924 Typically, this class is used to run programs for a target system on
2925 the build host using QEMU's application emulation mode.
2926 </para>
2927</section>
2928
2929<section id='ref-classes-recipe_sanity'>
2930 <title><filename>recipe_sanity.bbclass</filename></title>
2931
2932 <para>
2933 The <filename>recipe_sanity</filename> class checks for the presence
2934 of any host system recipe prerequisites that might affect the
2935 build (e.g. variables that are set or software that is present).
2936 </para>
2937</section>
2938
2939<section id='ref-classes-relocatable'>
2940 <title><filename>relocatable.bbclass</filename></title>
2941
2942 <para>
2943 The <filename>relocatable</filename> class enables relocation of
2944 binaries when they are installed into the sysroot.
2945 </para>
2946
2947 <para>
2948 This class makes use of the
2949 <link linkend='ref-classes-chrpath'><filename>chrpath</filename></link>
2950 class and is used by both the
2951 <link linkend='ref-classes-cross'><filename>cross</filename></link>
2952 and
2953 <link linkend='ref-classes-native'><filename>native</filename></link>
2954 classes.
2955 </para>
2956</section>
2957
2958<section id='ref-classes-remove-libtool'>
2959 <title><filename>remove-libtool.bbclass</filename></title>
2960
2961 <para>
2962 The <filename>remove-libtool</filename> class adds a post function
2963 to the
2964 <link linkend='ref-tasks-install'><filename>do_install</filename></link>
2965 task to remove all <filename>.la</filename> files installed by
2966 <filename>libtool</filename>.
2967 Removing these files results in them being absent from both the
2968 sysroot and target packages.
2969 </para>
2970
2971 <para>
2972 If a recipe needs the <filename>.la</filename> files to be installed,
2973 then the recipe can override the removal by setting
2974 <filename>REMOVE_LIBTOOL_LA</filename> to "0" as follows:
2975 <literallayout class='monospaced'>
2976 REMOVE_LIBTOOL_LA = "0"
2977 </literallayout>
2978 <note>
2979 The <filename>remove-libtool</filename> class is not enabled by
2980 default.
2981 </note>
2982 </para>
2983</section>
2984
2985<section id='ref-classes-report-error'>
2986 <title><filename>report-error.bbclass</filename></title>
2987
2988 <para>
2989 The <filename>report-error</filename> class supports enabling the
2990 <ulink url='&YOCTO_DOCS_DEV_URL;#using-the-error-reporting-tool'>error reporting tool</ulink>,
2991 which allows you to submit build error information to a central
2992 database.
2993 </para>
2994
2995 <para>
2996 The class collects debug information for recipe, recipe version, task,
2997 machine, distro, build system, target system, host distro, branch,
2998 commit, and log.
2999 From the information, report files using a JSON format are created and
3000 stored in
3001 <filename>${</filename><link linkend='var-LOG_DIR'><filename>LOG_DIR</filename></link><filename>}/error-report</filename>.
3002 </para>
3003</section>
3004
3005<section id='ref-classes-rm-work'>
3006 <title><filename>rm_work.bbclass</filename></title>
3007
3008 <para>
3009 The <filename>rm_work</filename> class supports deletion of temporary
3010 workspace, which can ease your hard drive demands during builds.
3011 </para>
3012
3013 <para>
3014 The OpenEmbedded build system can use a substantial amount of disk
3015 space during the build process.
3016 A portion of this space is the work files under the
3017 <filename>${TMPDIR}/work</filename> directory for each recipe.
3018 Once the build system generates the packages for a recipe, the work
3019 files for that recipe are no longer needed.
3020 However, by default, the build system preserves these files
3021 for inspection and possible debugging purposes.
3022 If you would rather have these files deleted to save disk space
3023 as the build progresses, you can enable <filename>rm_work</filename>
3024 by adding the following to your <filename>local.conf</filename> file,
3025 which is found in the
3026 <link linkend='build-directory'>Build Directory</link>.
3027 <literallayout class='monospaced'>
3028 INHERIT += "rm_work"
3029 </literallayout>
3030 If you are modifying and building source code out of the work directory
3031 for a recipe, enabling <filename>rm_work</filename> will potentially
3032 result in your changes to the source being lost.
3033 To exclude some recipes from having their work directories deleted by
3034 <filename>rm_work</filename>, you can add the names of the recipe or
3035 recipes you are working on to the <filename>RM_WORK_EXCLUDE</filename>
3036 variable, which can also be set in your <filename>local.conf</filename>
3037 file.
3038 Here is an example:
3039 <literallayout class='monospaced'>
3040 RM_WORK_EXCLUDE += "busybox glibc"
3041 </literallayout>
3042 </para>
3043</section>
3044
3045<section id='ref-classes-rootfs*'>
3046 <title><filename>rootfs*.bbclass</filename></title>
3047
3048 <para>
3049 The <filename>rootfs*</filename> classes support creating
3050 the root filesystem for an image and consist of the following classes:
3051 <itemizedlist>
3052 <listitem><para>
3053 The <filename>rootfs-postcommands</filename> class, which
3054 defines filesystem post-processing functions for image recipes.
3055 </para></listitem>
3056 <listitem><para>
3057 The <filename>rootfs_deb</filename> class, which supports
3058 creation of root filesystems for images built using
3059 <filename>.deb</filename> packages.</para></listitem>
3060 <listitem><para>
3061 The <filename>rootfs_rpm</filename> class, which supports
3062 creation of root filesystems for images built using
3063 <filename>.rpm</filename> packages.</para></listitem>
3064 <listitem><para>
3065 The <filename>rootfs_ipk</filename> class, which supports
3066 creation of root filesystems for images built using
3067 <filename>.ipk</filename> packages.</para></listitem>
3068 <listitem><para>
3069 The <filename>rootfsdebugfiles</filename> class, which installs
3070 additional files found on the build host directly into the
3071 root filesystem.
3072 </para></listitem>
3073 </itemizedlist>
3074 </para>
3075
3076 <para>
3077 The root filesystem is created from packages using one of the
3078 <filename>rootfs*.bbclass</filename> files as determined by the
3079 <link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>
3080 variable.
3081 </para>
3082
3083 <para>
3084 For information on how root filesystem images are created, see the
3085 "<ulink url='&YOCTO_DOCS_OM_URL;#image-generation-dev-environment'>Image Generation</ulink>"
3086 section in the Yocto Project Overview and Concepts Manual.
3087 </para>
3088</section>
3089
3090<section id='ref-classes-sanity'>
3091 <title><filename>sanity.bbclass</filename></title>
3092
3093 <para>
3094 The <filename>sanity</filename> class checks to see if prerequisite
3095 software is present on the host system so that users can be notified
3096 of potential problems that might affect their build.
3097 The class also performs basic user configuration checks from
3098 the <filename>local.conf</filename> configuration file to
3099 prevent common mistakes that cause build failures.
3100 Distribution policy usually determines whether to include this class.
3101 </para>
3102</section>
3103
3104<section id='ref-classes-scons'>
3105 <title><filename>scons.bbclass</filename></title>
3106
3107 <para>
3108 The <filename>scons</filename> class supports recipes that need to
3109 build software that uses the SCons build system.
3110 You can use the
3111 <link linkend='var-EXTRA_OESCONS'><filename>EXTRA_OESCONS</filename></link>
3112 variable to specify additional configuration options you want to pass
3113 SCons command line.
3114 </para>
3115</section>
3116
3117<section id='ref-classes-sdl'>
3118 <title><filename>sdl.bbclass</filename></title>
3119
3120 <para>
3121 The <filename>sdl</filename> class supports recipes that need to build
3122 software that uses the Simple DirectMedia Layer (SDL) library.
3123 </para>
3124</section>
3125
3126<section id='ref-classes-setuptools'>
3127 <title><filename>setuptools.bbclass</filename></title>
3128
3129 <para>
3130 The <filename>setuptools</filename> class supports Python
3131 version 2.x extensions that use build systems based on
3132 <filename>setuptools</filename>.
3133 If your recipe uses these build systems, the recipe needs to
3134 inherit the <filename>setuptools</filename> class.
3135 </para>
3136</section>
3137
3138<section id='ref-classes-setuptools3'>
3139 <title><filename>setuptools3.bbclass</filename></title>
3140
3141 <para>
3142 The <filename>setuptools3</filename> class supports Python
3143 version 3.x extensions that use build systems based on
3144 <filename>setuptools3</filename>.
3145 If your recipe uses these build systems, the recipe needs to
3146 inherit the <filename>setuptools3</filename> class.
3147 </para>
3148</section>
3149
3150<section id='ref-classes-sign_rpm'>
3151 <title><filename>sign_rpm.bbclass</filename></title>
3152
3153 <para>
3154 The <filename>sign_rpm</filename> class supports generating signed
3155 RPM packages.
3156 </para>
3157</section>
3158
3159<section id='ref-classes-sip'>
3160 <title><filename>sip.bbclass</filename></title>
3161
3162 <para>
3163 The <filename>sip</filename> class
3164 supports recipes that build or package SIP-based Python bindings.
3165 </para>
3166</section>
3167
3168<section id='ref-classes-siteconfig'>
3169 <title><filename>siteconfig.bbclass</filename></title>
3170
3171 <para>
3172 The <filename>siteconfig</filename> class
3173 provides functionality for handling site configuration.
3174 The class is used by the
3175 <link linkend='ref-classes-autotools'><filename>autotools</filename></link>
3176 class to accelerate the
3177 <link linkend='ref-tasks-configure'><filename>do_configure</filename></link>
3178 task.
3179 </para>
3180</section>
3181
3182<section id='ref-classes-siteinfo'>
3183 <title><filename>siteinfo.bbclass</filename></title>
3184
3185 <para>
3186 The <filename>siteinfo</filename> class provides information about
3187 the targets that might be needed by other classes or recipes.
3188 </para>
3189
3190 <para>
3191 As an example, consider Autotools, which can require tests that must
3192 execute on the target hardware.
3193 Since this is not possible in general when cross compiling, site
3194 information is used to provide cached test results so these tests can
3195 be skipped over but still make the correct values available.
3196 The
3197 <filename><link linkend='structure-meta-site'>meta/site directory</link></filename>
3198 contains test results sorted into different categories such as
3199 architecture, endianness, and the <filename>libc</filename> used.
3200 Site information provides a list of files containing data relevant to
3201 the current build in the
3202 <filename><link linkend='var-CONFIG_SITE'>CONFIG_SITE</link></filename> variable
3203 that Autotools automatically picks up.
3204 </para>
3205
3206 <para>
3207 The class also provides variables like
3208 <filename><link linkend='var-SITEINFO_ENDIANNESS'>SITEINFO_ENDIANNESS</link></filename>
3209 and <filename><link linkend='var-SITEINFO_BITS'>SITEINFO_BITS</link></filename>
3210 that can be used elsewhere in the metadata.
3211 </para>
3212</section>
3213
3214<section id='ref-classes-spdx'>
3215 <title><filename>spdx.bbclass</filename></title>
3216
3217 <para>
3218 The <filename>spdx</filename> class integrates real-time license
3219 scanning, generation of SPDX standard output, and verification
3220 of license information during the build.
3221 <note>
3222 This class is currently at the prototype stage in the 1.6
3223 release.
3224 </note>
3225 </para>
3226</section>
3227
3228<section id='ref-classes-sstate'>
3229 <title><filename>sstate.bbclass</filename></title>
3230
3231 <para>
3232 The <filename>sstate</filename> class provides support for Shared
3233 State (sstate).
3234 By default, the class is enabled through the
3235 <link linkend='var-INHERIT_DISTRO'><filename>INHERIT_DISTRO</filename></link>
3236 variable's default value.
3237 </para>
3238
3239 <para>
3240 For more information on sstate, see the
3241 "<ulink url='&YOCTO_DOCS_OM_URL;#shared-state-cache'>Shared State Cache</ulink>"
3242 section in the Yocto Project Overview and Concepts Manual.
3243 </para>
3244</section>
3245
3246<section id='ref-classes-staging'>
3247 <title><filename>staging.bbclass</filename></title>
3248
3249 <para>
3250 The <filename>staging</filename> class installs files into individual
3251 recipe work directories for sysroots.
3252 The class contains the following key tasks:
3253 <itemizedlist>
3254 <listitem><para>
3255 The
3256 <link linkend='ref-tasks-populate_sysroot'><filename>do_populate_sysroot</filename></link>
3257 task, which is responsible for handing the files that end up
3258 in the recipe sysroots.
3259 </para></listitem>
3260 <listitem><para>
3261 The
3262 <link linkend='ref-tasks-prepare_recipe_sysroot'><filename>do_prepare_recipe_sysroot</filename></link>
3263 task (a "partner" task to the
3264 <filename>populate_sysroot</filename> task), which installs
3265 the files into the individual recipe work directories (i.e.
3266 <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>).
3267 </para></listitem>
3268 </itemizedlist>
3269 </para>
3270
3271 <para>
3272 The code in the <filename>staging</filename> class is complex and
3273 basically works in two stages:
3274 <itemizedlist>
3275 <listitem><para>
3276 <emphasis>Stage One:</emphasis>
3277 The first stage addresses recipes that have files they want
3278 to share with other recipes that have dependencies on the
3279 originating recipe.
3280 Normally these dependencies are installed through the
3281 <link linkend='ref-tasks-install'><filename>do_install</filename></link>
3282 task into
3283 <filename>${</filename><link linkend='var-D'><filename>D</filename></link><filename>}</filename>.
3284 The <filename>do_populate_sysroot</filename> task copies
3285 a subset of these files into
3286 <filename>${SYSROOT_DESTDIR}</filename>.
3287 This subset of files is controlled by the
3288 <link linkend='var-SYSROOT_DIRS'><filename>SYSROOT_DIRS</filename></link>,
3289 <link linkend='var-SYSROOT_DIRS_NATIVE'><filename>SYSROOT_DIRS_NATIVE</filename></link>,
3290 and
3291 <link linkend='var-SYSROOT_DIRS_BLACKLIST'><filename>SYSROOT_DIRS_BLACKLIST</filename></link>
3292 variables.
3293 <note>
3294 Additionally, a recipe can customize the files further by
3295 declaring a processing function in the
3296 <link linkend='var-SYSROOT_PREPROCESS_FUNCS'><filename>SYSROOT_PREPROCESS_FUNCS</filename></link>
3297 variable.
3298 </note>
3299 </para>
3300
3301 <para>
3302 A shared state (sstate) object is built from these files
3303 and the files are placed into a subdirectory of
3304 <link linkend='structure-build-tmp-sysroots-components'><filename>tmp/sysroots-components/</filename></link>.
3305 The files are scanned for hardcoded paths to the original
3306 installation location.
3307 If the location is found in text files, the hardcoded
3308 locations are replaced by tokens and a list of the files
3309 needing such replacements is created.
3310 These adjustments are referred to as "FIXMEs".
3311 The list of files that are scanned for paths is controlled by
3312 the
3313 <link linkend='var-SSTATE_SCAN_FILES'><filename>SSTATE_SCAN_FILES</filename></link>
3314 variable.
3315 </para></listitem>
3316 <listitem><para>
3317 <emphasis>Stage Two:</emphasis>
3318 The second stage addresses recipes that want to use something
3319 from another recipe and declare a dependency on that recipe
3320 through the
3321 <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>
3322 variable.
3323 The recipe will have a
3324 <link linkend='ref-tasks-prepare_recipe_sysroot'><filename>do_prepare_recipe_sysroot</filename></link>
3325 task and when
3326 this task executes, it creates the
3327 <filename>recipe-sysroot</filename> and
3328 <filename>recipe-sysroot-native</filename> in the recipe
3329 work directory (i.e.
3330 <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>).
3331 The OpenEmbedded build system creates hard links to copies of the
3332 relevant files from <filename>sysroots-components</filename>
3333 into the recipe work directory.
3334 <note>
3335 If hard links are not possible, the build system uses
3336 actual copies.
3337 </note>
3338 The build system then addresses any "FIXMEs" to paths as
3339 defined from the list created in the first stage.
3340 </para>
3341
3342 <para>
3343 Finally, any files in <filename>${bindir}</filename>
3344 within the sysroot that have the prefix
3345 "<filename>postinst-</filename>" are executed.
3346 <note>
3347 Although such sysroot post installation scripts are not
3348 recommended for general use, the files do allow some issues
3349 such as user creation and module indexes to be addressed.
3350 </note>
3351 </para>
3352
3353 <para>
3354 Because recipes can have other dependencies outside of
3355 <filename>DEPENDS</filename> (e.g.
3356 <filename>do_unpack[depends] += "tar-native:do_populate_sysroot"</filename>),
3357 the sysroot creation function
3358 <filename>extend_recipe_sysroot</filename> is also added as
3359 a pre-function for those tasks whose dependencies are not
3360 through <filename>DEPENDS</filename> but operate similarly.
3361 </para>
3362
3363 <para>
3364 When installing dependencies into the sysroot, the code
3365 traverses the dependency graph and processes dependencies
3366 in exactly the same way as the dependencies would or would not
3367 be when installed from sstate.
3368 This processing means, for example, a native tool would have
3369 its native dependencies added but a target library would not
3370 have its dependencies traversed or installed.
3371 The same sstate dependency code is used so that
3372 builds should be identical regardless of whether sstate
3373 was used or not.
3374 For a closer look, see the
3375 <filename>setscene_depvalid()</filename> function in the
3376 <link linkend='ref-classes-sstate'><filename>sstate</filename></link>
3377 class.
3378 </para>
3379
3380 <para>
3381 The build system is careful to maintain manifests of the files
3382 it installs so that any given dependency can be installed as
3383 needed.
3384 The sstate hash of the installed item is also stored so that
3385 if it changes, the build system can reinstall it.
3386 </para></listitem>
3387 </itemizedlist>
3388 </para>
3389</section>
3390
3391<section id='ref-classes-syslinux'>
3392 <title><filename>syslinux.bbclass</filename></title>
3393
3394 <para>
3395 The <filename>syslinux</filename> class provides syslinux-specific
3396 functions for building bootable images.
3397 </para>
3398
3399 <para>
3400 The class supports the following variables:
3401 <itemizedlist>
3402 <listitem><para><link linkend='var-INITRD'><filename>INITRD</filename></link>:
3403 Indicates list of filesystem images to concatenate and use as
3404 an initial RAM disk (initrd).
3405 This variable is optional.</para></listitem>
3406 <listitem><para><link linkend='var-ROOTFS'><filename>ROOTFS</filename></link>:
3407 Indicates a filesystem image to include as the root filesystem.
3408 This variable is optional.</para></listitem>
3409 <listitem><para><link linkend='var-AUTO_SYSLINUXMENU'><filename>AUTO_SYSLINUXMENU</filename></link>:
3410 Enables creating an automatic menu when set to "1".
3411 </para></listitem>
3412 <listitem><para><link linkend='var-LABELS'><filename>LABELS</filename></link>:
3413 Lists targets for automatic configuration.
3414 </para></listitem>
3415 <listitem><para><link linkend='var-APPEND'><filename>APPEND</filename></link>:
3416 Lists append string overrides for each label.
3417 </para></listitem>
3418 <listitem><para><link linkend='var-SYSLINUX_OPTS'><filename>SYSLINUX_OPTS</filename></link>:
3419 Lists additional options to add to the syslinux file.
3420 Semicolon characters separate multiple options.
3421 </para></listitem>
3422 <listitem><para><link linkend='var-SYSLINUX_SPLASH'><filename>SYSLINUX_SPLASH</filename></link>:
3423 Lists a background for the VGA boot menu when you are using the
3424 boot menu.</para></listitem>
3425 <listitem><para><link linkend='var-SYSLINUX_DEFAULT_CONSOLE'><filename>SYSLINUX_DEFAULT_CONSOLE</filename></link>:
3426 Set to "console=ttyX" to change kernel boot default console.
3427 </para></listitem>
3428 <listitem><para><link linkend='var-SYSLINUX_SERIAL'><filename>SYSLINUX_SERIAL</filename></link>:
3429 Sets an alternate serial port.
3430 Or, turns off serial when the variable is set with an
3431 empty string.</para></listitem>
3432 <listitem><para><link linkend='var-SYSLINUX_SERIAL_TTY'><filename>SYSLINUX_SERIAL_TTY</filename></link>:
3433 Sets an alternate "console=tty..." kernel boot argument.
3434 </para></listitem>
3435 </itemizedlist>
3436 </para>
3437</section>
3438
3439<section id='ref-classes-systemd'>
3440 <title><filename>systemd.bbclass</filename></title>
3441
3442 <para>
3443 The <filename>systemd</filename> class provides support for recipes
3444 that install systemd unit files.
3445 </para>
3446
3447 <para>
3448 The functionality for this class is disabled unless you have "systemd"
3449 in
3450 <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>.
3451 </para>
3452
3453 <para>
3454 Under this class, the recipe or Makefile (i.e. whatever the recipe is
3455 calling during the
3456 <link linkend='ref-tasks-install'><filename>do_install</filename></link>
3457 task) installs unit files into
3458 <filename>${</filename><link linkend='var-D'><filename>D</filename></link><filename>}${systemd_unitdir}/system</filename>.
3459 If the unit files being installed go into packages other than the
3460 main package, you need to set
3461 <link linkend='var-SYSTEMD_PACKAGES'><filename>SYSTEMD_PACKAGES</filename></link>
3462 in your recipe to identify the packages in which the files will be
3463 installed.
3464 </para>
3465
3466 <para>
3467 You should set
3468 <link linkend='var-SYSTEMD_SERVICE'><filename>SYSTEMD_SERVICE</filename></link>
3469 to the name of the service file.
3470 You should also use a package name override to indicate the package
3471 to which the value applies.
3472 If the value applies to the recipe's main package, use
3473 <filename>${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}</filename>.
3474 Here is an example from the connman recipe:
3475 <literallayout class='monospaced'>
3476 SYSTEMD_SERVICE_${PN} = "connman.service"
3477 </literallayout>
3478 Services are set up to start on boot automatically unless
3479 you have set
3480 <link linkend='var-SYSTEMD_AUTO_ENABLE'><filename>SYSTEMD_AUTO_ENABLE</filename></link>
3481 to "disable".
3482 </para>
3483
3484 <para>
3485 For more information on <filename>systemd</filename>, see the
3486 "<ulink url='&YOCTO_DOCS_DEV_URL;#selecting-an-initialization-manager'>Selecting an Initialization Manager</ulink>"
3487 section in the Yocto Project Development Tasks Manual.
3488 </para>
3489</section>
3490
3491<section id='ref-classes-systemd-boot'>
3492 <title><filename>systemd-boot.bbclass</filename></title>
3493
3494 <para>
3495 The <filename>systemd-boot</filename> class provides functions specific
3496 to the systemd-boot bootloader for building bootable images.
3497 This is an internal class and is not intended to be used directly.
3498 <note>
3499 The <filename>systemd-boot</filename> class is a result from
3500 merging the <filename>gummiboot</filename> class used in previous
3501 Yocto Project releases with the <filename>systemd</filename>
3502 project.
3503 </note>
3504 Set the
3505 <link linkend='var-EFI_PROVIDER'><filename>EFI_PROVIDER</filename></link>
3506 variable to "systemd-boot" to use this class.
3507 Doing so creates a standalone EFI bootloader that is not dependent
3508 on systemd.
3509 </para>
3510
3511 <para>
3512 For information on more variables used and supported in this class,
3513 see the
3514 <link linkend='var-SYSTEMD_BOOT_CFG'><filename>SYSTEMD_BOOT_CFG</filename></link>,
3515 <link linkend='var-SYSTEMD_BOOT_ENTRIES'><filename>SYSTEMD_BOOT_ENTRIES</filename></link>,
3516 and
3517 <link linkend='var-SYSTEMD_BOOT_TIMEOUT'><filename>SYSTEMD_BOOT_TIMEOUT</filename></link>
3518 variables.
3519 </para>
3520
3521 <para>
3522 You can also see the
3523 <ulink url='http://www.freedesktop.org/wiki/Software/systemd/systemd-boot/'>Systemd-boot documentation</ulink>
3524 for more information.
3525 </para>
3526</section>
3527
3528<section id='ref-classes-terminal'>
3529 <title><filename>terminal.bbclass</filename></title>
3530
3531 <para>
3532 The <filename>terminal</filename> class provides support for starting
3533 a terminal session.
3534 The
3535 <link linkend='var-OE_TERMINAL'><filename>OE_TERMINAL</filename></link>
3536 variable controls which terminal emulator is used for the session.
3537 </para>
3538
3539 <para>
3540 Other classes use the <filename>terminal</filename> class anywhere a
3541 separate terminal session needs to be started.
3542 For example, the
3543 <link linkend='ref-classes-patch'><filename>patch</filename></link>
3544 class assuming
3545 <link linkend='var-PATCHRESOLVE'><filename>PATCHRESOLVE</filename></link>
3546 is set to "user", the
3547 <link linkend='ref-classes-cml1'><filename>cml1</filename></link>
3548 class, and the
3549 <link linkend='ref-classes-devshell'><filename>devshell</filename></link>
3550 class all use the <filename>terminal</filename> class.
3551 </para>
3552</section>
3553
3554<section id='ref-classes-testimage*'>
3555 <title><filename>testimage*.bbclass</filename></title>
3556
3557 <para>
3558 The <filename>testimage*</filename> classes support running
3559 automated tests against images using QEMU and on actual hardware.
3560 The classes handle loading the tests and starting the image.
3561 To use the classes, you need to perform steps to set up the
3562 environment.
3563 <note><title>Tip</title>
3564 Best practices include using
3565 <link linkend='var-IMAGE_CLASSES'><filename>IMAGE_CLASSES</filename></link>
3566 rather than
3567 <link linkend='var-INHERIT'><filename>INHERIT</filename></link> to
3568 inherit the <filename>testimage</filename> class for automated
3569 image testing.
3570 </note>
3571 </para>
3572
3573 <para>
3574 The tests are commands that run on the target system over
3575 <filename>ssh</filename>.
3576 Each test is written in Python and makes use of the
3577 <filename>unittest</filename> module.
3578 </para>
3579
3580 <para>
3581 The <filename>testimage.bbclass</filename> runs tests on an image
3582 when called using the following:
3583 <literallayout class='monospaced'>
3584 $ bitbake -c testimage <replaceable>image</replaceable>
3585 </literallayout>
3586 The <filename>testimage-auto</filename> class runs tests on an image
3587 after the image is constructed (i.e.
3588 <link linkend='var-TESTIMAGE_AUTO'><filename>TESTIMAGE_AUTO</filename></link>
3589 must be set to "1").
3590 </para>
3591
3592 <para>
3593 For information on how to enable, run, and create new tests, see the
3594 "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
3595 section in the Yocto Project Development Tasks Manual.
3596 </para>
3597</section>
3598
3599<section id='ref-classes-testsdk'>
3600 <title><filename>testsdk.bbclass</filename></title>
3601
3602 <para>
3603 This class supports running automated tests against
3604 software development kits (SDKs).
3605 The <filename>testsdk</filename> class runs tests on an SDK when
3606 called using the following:
3607 <literallayout class='monospaced'>
3608 $ bitbake -c testsdk image
3609 </literallayout>
3610 <note><title>Tip</title>
3611 Best practices include using
3612 <link linkend='var-IMAGE_CLASSES'><filename>IMAGE_CLASSES</filename></link>
3613 rather than
3614 <link linkend='var-INHERIT'><filename>INHERIT</filename></link> to
3615 inherit the <filename>testsdk</filename> class for automated
3616 SDK testing.
3617 </note>
3618 </para>
3619</section>
3620
3621<section id='ref-classes-texinfo'>
3622 <title><filename>texinfo.bbclass</filename></title>
3623
3624 <para>
3625 This class should be inherited by recipes whose upstream packages
3626 invoke the <filename>texinfo</filename> utilities at build-time.
3627 Native and cross recipes are made to use the dummy scripts provided
3628 by <filename>texinfo-dummy-native</filename>, for improved performance.
3629 Target architecture recipes use the genuine
3630 Texinfo utilities.
3631 By default, they use the Texinfo utilities on the host system.
3632 <note>
3633 If you want to use the Texinfo recipe shipped with the build
3634 system, you can remove "texinfo-native" from
3635 <link linkend='var-ASSUME_PROVIDED'><filename>ASSUME_PROVIDED</filename></link>
3636 and makeinfo from
3637 <link linkend='var-SANITY_REQUIRED_UTILITIES'><filename>SANITY_REQUIRED_UTILITIES</filename></link>.
3638 </note>
3639 </para>
3640</section>
3641
3642<section id='ref-classes-tinderclient'>
3643 <title><filename>tinderclient.bbclass</filename></title>
3644
3645 <para>
3646 The <filename>tinderclient</filename> class submits build results to
3647 an external Tinderbox instance.
3648 <note>
3649 This class is currently unmaintained.
3650 </note>
3651 </para>
3652</section>
3653
3654<section id='ref-classes-toaster'>
3655 <title><filename>toaster.bbclass</filename></title>
3656
3657 <para>
3658 The <filename>toaster</filename> class collects information about
3659 packages and images and sends them as events that the BitBake
3660 user interface can receive.
3661 The class is enabled when the Toaster user interface is running.
3662 </para>
3663
3664 <para>
3665 This class is not intended to be used directly.
3666 </para>
3667</section>
3668
3669<section id='ref-classes-toolchain-scripts'>
3670 <title><filename>toolchain-scripts.bbclass</filename></title>
3671
3672 <para>
3673 The <filename>toolchain-scripts</filename> class provides the scripts
3674 used for setting up the environment for installed SDKs.
3675 </para>
3676</section>
3677
3678<section id='ref-classes-typecheck'>
3679 <title><filename>typecheck.bbclass</filename></title>
3680
3681 <para>
3682 The <filename>typecheck</filename> class provides support for
3683 validating the values of variables set at the configuration level
3684 against their defined types.
3685 The OpenEmbedded build system allows you to define the type of a
3686 variable using the "type" varflag.
3687 Here is an example:
3688 <literallayout class='monospaced'>
3689 IMAGE_FEATURES[type] = "list"
3690 </literallayout>
3691 </para>
3692</section>
3693
3694<section id='ref-classes-uboot-config'>
3695 <title><filename>uboot-config.bbclass</filename></title>
3696
3697 <para>
3698 The <filename>uboot-config</filename> class provides support for
3699 U-Boot configuration for a machine.
3700 Specify the machine in your recipe as follows:
3701 <literallayout class='monospaced'>
3702 UBOOT_CONFIG ??= &lt;default&gt;
3703 UBOOT_CONFIG[foo] = "config,images"
3704 </literallayout>
3705 You can also specify the machine using this method:
3706 <literallayout class='monospaced'>
3707 UBOOT_MACHINE = "config"
3708 </literallayout>
3709 See the
3710 <link linkend='var-UBOOT_CONFIG'><filename>UBOOT_CONFIG</filename></link>
3711 and
3712 <link linkend='var-UBOOT_MACHINE'><filename>UBOOT_MACHINE</filename></link>
3713 variables for additional information.
3714 </para>
3715</section>
3716
3717<section id='ref-classes-uninative'>
3718 <title><filename>uninative.bbclass</filename></title>
3719
3720 <para>
3721 Attempts to isolate the build system from the host
3722 distribution's C library in order to make re-use of native shared state
3723 artifacts across different host distributions practical.
3724 With this class enabled, a tarball containing a pre-built C library
3725 is downloaded at the start of the build.
3726 In the Poky reference distribution this is enabled by default
3727 through
3728 <filename>meta/conf/distro/include/yocto-uninative.inc</filename>.
3729 Other distributions that do not derive from poky can also
3730 "<filename>require conf/distro/include/yocto-uninative.inc</filename>"
3731 to use this.
3732 Alternatively if you prefer, you can build the uninative-tarball recipe
3733 yourself, publish the resulting tarball (e.g. via HTTP) and set
3734 <filename>UNINATIVE_URL</filename> and
3735 <filename>UNINATIVE_CHECKSUM</filename> appropriately.
3736 For an example, see the
3737 <filename>meta/conf/distro/include/yocto-uninative.inc</filename>.
3738 </para>
3739
3740 <para>
3741 The <filename>uninative</filename> class is also used unconditionally
3742 by the extensible SDK.
3743 When building the extensible SDK,
3744 <filename>uninative-tarball</filename> is built and the resulting
3745 tarball is included within the SDK.
3746 </para>
3747</section>
3748
3749<section id='ref-classes-update-alternatives'>
3750 <title><filename>update-alternatives.bbclass</filename></title>
3751
3752 <para>
3753 The <filename>update-alternatives</filename> class helps the
3754 alternatives system when multiple sources provide the same command.
3755 This situation occurs when several programs that have the same or
3756 similar function are installed with the same name.
3757 For example, the <filename>ar</filename> command is available from the
3758 <filename>busybox</filename>, <filename>binutils</filename> and
3759 <filename>elfutils</filename> packages.
3760 The <filename>update-alternatives</filename> class handles
3761 renaming the binaries so that multiple packages can be installed
3762 without conflicts.
3763 The <filename>ar</filename> command still works regardless of which
3764 packages are installed or subsequently removed.
3765 The class renames the conflicting binary in each package and symlinks
3766 the highest priority binary during installation or removal of packages.
3767 </para>
3768
3769 <para>
3770 To use this class, you need to define a number of variables:
3771 <itemizedlist>
3772 <listitem><para><link linkend='var-ALTERNATIVE'><filename>ALTERNATIVE</filename></link>
3773 </para></listitem>
3774 <listitem><para><link linkend='var-ALTERNATIVE_LINK_NAME'><filename>ALTERNATIVE_LINK_NAME</filename></link>
3775 </para></listitem>
3776 <listitem><para><link linkend='var-ALTERNATIVE_TARGET'><filename>ALTERNATIVE_TARGET</filename></link>
3777 </para></listitem>
3778 <listitem><para><link linkend='var-ALTERNATIVE_PRIORITY'><filename>ALTERNATIVE_PRIORITY</filename></link>
3779 </para></listitem>
3780 </itemizedlist>
3781 These variables list alternative commands needed by a package,
3782 provide pathnames for links, default links for targets, and
3783 so forth.
3784 For details on how to use this class, see the comments in the
3785 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta/classes/update-alternatives.bbclass'><filename>update-alternatives.bbclass</filename></ulink>
3786 file.
3787 </para>
3788
3789 <note>
3790 You can use the <filename>update-alternatives</filename> command
3791 directly in your recipes.
3792 However, this class simplifies things in most cases.
3793 </note>
3794</section>
3795
3796<section id='ref-classes-update-rc.d'>
3797 <title><filename>update-rc.d.bbclass</filename></title>
3798
3799 <para>
3800 The <filename>update-rc.d</filename> class uses
3801 <filename>update-rc.d</filename> to safely install an
3802 initialization script on behalf of the package.
3803 The OpenEmbedded build system takes care of details such as making
3804 sure the script is stopped before a package is removed and started when
3805 the package is installed.
3806 </para>
3807
3808 <para>
3809 Three variables control this class:
3810 <filename><link linkend='var-INITSCRIPT_PACKAGES'>INITSCRIPT_PACKAGES</link></filename>,
3811 <filename><link linkend='var-INITSCRIPT_NAME'>INITSCRIPT_NAME</link></filename> and
3812 <filename><link linkend='var-INITSCRIPT_PARAMS'>INITSCRIPT_PARAMS</link></filename>.
3813 See the variable links for details.
3814 </para>
3815</section>
3816
3817<section id='ref-classes-useradd'>
3818 <title><filename>useradd*.bbclass</filename></title>
3819
3820 <para>
3821 The <filename>useradd*</filename> classes support the addition of users
3822 or groups for usage by the package on the target.
3823 For example, if you have packages that contain system services that
3824 should be run under their own user or group, you can use these classes
3825 to enable creation of the user or group.
3826 The
3827 <filename>meta-skeleton/recipes-skeleton/useradd/useradd-example.bb</filename>
3828 recipe in the <link linkend='source-directory'>Source Directory</link>
3829 provides a simple example that shows how to add three
3830 users and groups to two packages.
3831 See the <filename>useradd-example.bb</filename> recipe for more
3832 information on how to use these classes.
3833 </para>
3834
3835 <para>
3836 The <filename>useradd_base</filename> class provides basic
3837 functionality for user or groups settings.
3838 </para>
3839
3840 <para>
3841 The <filename>useradd*</filename> classes support the
3842 <link linkend='var-USERADD_PACKAGES'><filename>USERADD_PACKAGES</filename></link>,
3843 <link linkend='var-USERADD_PARAM'><filename>USERADD_PARAM</filename></link>,
3844 <link linkend='var-GROUPADD_PARAM'><filename>GROUPADD_PARAM</filename></link>,
3845 and
3846 <link linkend='var-GROUPMEMS_PARAM'><filename>GROUPMEMS_PARAM</filename></link>
3847 variables.
3848 </para>
3849
3850 <para>
3851 The <filename>useradd-staticids</filename> class supports the addition
3852 of users or groups that have static user identification
3853 (<filename>uid</filename>) and group identification
3854 (<filename>gid</filename>) values.
3855 </para>
3856
3857 <para>
3858 The default behavior of the OpenEmbedded build system for assigning
3859 <filename>uid</filename> and <filename>gid</filename> values when
3860 packages add users and groups during package install time is to
3861 add them dynamically.
3862 This works fine for programs that do not care what the values of the
3863 resulting users and groups become.
3864 In these cases, the order of the installation determines the final
3865 <filename>uid</filename> and <filename>gid</filename> values.
3866 However, if non-deterministic
3867 <filename>uid</filename> and <filename>gid</filename> values are a
3868 problem, you can override the default, dynamic application of these
3869 values by setting static values.
3870 When you set static values, the OpenEmbedded build system looks in
3871 <link linkend='var-BBPATH'><filename>BBPATH</filename></link> for
3872 <filename>files/passwd</filename> and <filename>files/group</filename>
3873 files for the values.
3874 </para>
3875
3876 <para>
3877 To use static <filename>uid</filename> and <filename>gid</filename>
3878 values, you need to set some variables.
3879 See the
3880 <link linkend='var-USERADDEXTENSION'><filename>USERADDEXTENSION</filename></link>,
3881 <link linkend='var-USERADD_UID_TABLES'><filename>USERADD_UID_TABLES</filename></link>,
3882 <link linkend='var-USERADD_GID_TABLES'><filename>USERADD_GID_TABLES</filename></link>,
3883 and
3884 <link linkend='var-USERADD_ERROR_DYNAMIC'><filename>USERADD_ERROR_DYNAMIC</filename></link>
3885 variables.
3886 You can also see the
3887 <link linkend='ref-classes-useradd'><filename>useradd</filename></link>
3888 class for additional information.
3889 </para>
3890
3891 <note><title>Notes</title>
3892 You do not use the <filename>useradd-staticids</filename>
3893 class directly.
3894 You either enable or disable the class by setting the
3895 <filename>USERADDEXTENSION</filename> variable.
3896 If you enable or disable the class in a configured system,
3897 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
3898 might contain incorrect <filename>uid</filename> and
3899 <filename>gid</filename> values.
3900 Deleting the <filename>TMPDIR</filename> directory
3901 will correct this condition.
3902 </note>
3903</section>
3904
3905<section id='ref-classes-utility-tasks'>
3906 <title><filename>utility-tasks.bbclass</filename></title>
3907
3908 <para>
3909 The <filename>utility-tasks</filename> class provides support for
3910 various "utility" type tasks that are applicable to all recipes,
3911 such as
3912 <link linkend='ref-tasks-clean'><filename>do_clean</filename></link> and
3913 <link linkend='ref-tasks-listtasks'><filename>do_listtasks</filename></link>.
3914 </para>
3915
3916 <para>
3917 This class is enabled by default because it is inherited by
3918 the
3919 <link linkend='ref-classes-base'><filename>base</filename></link>
3920 class.
3921 </para>
3922</section>
3923
3924<section id='ref-classes-utils'>
3925 <title><filename>utils.bbclass</filename></title>
3926
3927 <para>
3928 The <filename>utils</filename> class provides some useful Python
3929 functions that are typically used in inline Python expressions
3930 (e.g. <filename>${@...}</filename>).
3931 One example use is for <filename>bb.utils.contains()</filename>.
3932 </para>
3933
3934 <para>
3935 This class is enabled by default because it is inherited by the
3936 <link linkend='ref-classes-base'><filename>base</filename></link>
3937 class.
3938 </para>
3939</section>
3940
3941<section id='ref-classes-vala'>
3942 <title><filename>vala.bbclass</filename></title>
3943
3944 <para>
3945 The <filename>vala</filename> class supports recipes that need to
3946 build software written using the Vala programming language.
3947 </para>
3948</section>
3949
3950<section id='ref-classes-waf'>
3951 <title><filename>waf.bbclass</filename></title>
3952
3953 <para>
3954 The <filename>waf</filename> class supports recipes that need to build
3955 software that uses the Waf build system.
3956 You can use the
3957 <link linkend='var-EXTRA_OECONF'><filename>EXTRA_OECONF</filename></link>
3958 or
3959 <link linkend='var-PACKAGECONFIG_CONFARGS'><filename>PACKAGECONFIG_CONFARGS</filename></link>
3960 variables to specify additional configuration options to be passed on
3961 the Waf command line.
3962 </para>
3963</section>
3964
3965<!-- Undocumented classes are:
3966 image-empty.bbclass (possibly being dropped)
3967 migrate_localcount.bbclass (still need a description)
3968-->
3969
3970
3971</chapter>
3972<!--
3973vim: expandtab tw=80 ts=4
3974-->
diff --git a/documentation/ref-manual/ref-devtool-reference.xml b/documentation/ref-manual/ref-devtool-reference.xml
deleted file mode 100644
index 6c3ccc3034..0000000000
--- a/documentation/ref-manual/ref-devtool-reference.xml
+++ /dev/null
@@ -1,842 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='ref-devtool-reference'>
7 <title><filename>devtool</filename> Quick Reference</title>
8
9 <para>
10 The <filename>devtool</filename> command-line tool provides a number
11 of features that help you build, test, and package software.
12 This command is available alongside the <filename>bitbake</filename>
13 command.
14 Additionally, the <filename>devtool</filename> command is a key
15 part of the extensible SDK.
16 </para>
17
18 <para>
19 This chapter provides a Quick Reference for the
20 <filename>devtool</filename> command.
21 For more information on how to apply the command when using the
22 extensible SDK, see the
23 "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-extensible'>Using the Extensible SDK</ulink>"
24 chapter in the Yocto Project Application Development and the
25 Extensible Software Development Kit (eSDK) manual.
26 </para>
27
28 <section id='devtool-getting-help'>
29 <title>Getting Help</title>
30
31 <para>
32 The <filename>devtool</filename> command line is organized
33 similarly to Git in that it has a number of sub-commands for
34 each function.
35 You can run <filename>devtool --help</filename> to see all
36 the commands:
37 <literallayout class='monospaced'>
38 $ devtool -h
39 NOTE: Starting bitbake server...
40 usage: devtool [--basepath BASEPATH] [--bbpath BBPATH] [-d] [-q]
41 [--color COLOR] [-h]
42 &lt;subcommand&gt; ...
43
44 OpenEmbedded development tool
45
46 options:
47 --basepath BASEPATH Base directory of SDK / build directory
48 --bbpath BBPATH Explicitly specify the BBPATH, rather than getting it
49 from the metadata
50 -d, --debug Enable debug output
51 -q, --quiet Print only errors
52 --color COLOR Colorize output (where COLOR is auto, always, never)
53 -h, --help show this help message and exit
54
55 subcommands:
56 Beginning work on a recipe:
57 add Add a new recipe
58 modify Modify the source for an existing recipe
59 upgrade Upgrade an existing recipe
60 Getting information:
61 status Show workspace status
62 search Search available recipes
63 latest-version Report the latest version of an existing recipe
64 check-upgrade-status Report upgradability for multiple (or all) recipes
65 Working on a recipe in the workspace:
66 build Build a recipe
67 rename Rename a recipe file in the workspace
68 edit-recipe Edit a recipe file
69 find-recipe Find a recipe file
70 configure-help Get help on configure script options
71 update-recipe Apply changes from external source tree to recipe
72 reset Remove a recipe from your workspace
73 finish Finish working on a recipe in your workspace
74 Testing changes on target:
75 deploy-target Deploy recipe output files to live target machine
76 undeploy-target Undeploy recipe output files in live target machine
77 build-image Build image including workspace recipe packages
78 Advanced:
79 create-workspace Set up workspace in an alternative location
80 export Export workspace into a tar archive
81 import Import exported tar archive into workspace
82 extract Extract the source for an existing recipe
83 sync Synchronize the source tree for an existing recipe
84 Use devtool &lt;subcommand&gt; --help to get help on a specific command
85 </literallayout>
86 As directed in the general help output, you can get more syntax
87 on a specific command by providing the command name and using
88 "--help":
89 <literallayout class='monospaced'>
90 $ devtool add --help
91 NOTE: Starting bitbake server...
92 usage: devtool add [-h] [--same-dir | --no-same-dir] [--fetch URI]
93 [--fetch-dev] [--version VERSION] [--no-git]
94 [--srcrev SRCREV | --autorev] [--srcbranch SRCBRANCH]
95 [--binary] [--also-native] [--src-subdir SUBDIR]
96 [--mirrors] [--provides PROVIDES]
97 [recipename] [srctree] [fetchuri]
98
99 Adds a new recipe to the workspace to build a specified source tree. Can
100 optionally fetch a remote URI and unpack it to create the source tree.
101
102 arguments:
103 recipename Name for new recipe to add (just name - no version,
104 path or extension). If not specified, will attempt to
105 auto-detect it.
106 srctree Path to external source tree. If not specified, a
107 subdirectory of
108 /home/scottrif/poky/build/workspace/sources will be
109 used.
110 fetchuri Fetch the specified URI and extract it to create the
111 source tree
112
113 options:
114 -h, --help show this help message and exit
115 --same-dir, -s Build in same directory as source
116 --no-same-dir Force build in a separate build directory
117 --fetch URI, -f URI Fetch the specified URI and extract it to create the
118 source tree (deprecated - pass as positional argument
119 instead)
120 --fetch-dev For npm, also fetch devDependencies
121 --version VERSION, -V VERSION
122 Version to use within recipe (PV)
123 --no-git, -g If fetching source, do not set up source tree as a git
124 repository
125 --srcrev SRCREV, -S SRCREV
126 Source revision to fetch if fetching from an SCM such
127 as git (default latest)
128 --autorev, -a When fetching from a git repository, set SRCREV in the
129 recipe to a floating revision instead of fixed
130 --srcbranch SRCBRANCH, -B SRCBRANCH
131 Branch in source repository if fetching from an SCM
132 such as git (default master)
133 --binary, -b Treat the source tree as something that should be
134 installed verbatim (no compilation, same directory
135 structure). Useful with binary packages e.g. RPMs.
136 --also-native Also add native variant (i.e. support building recipe
137 for the build host as well as the target machine)
138 --src-subdir SUBDIR Specify subdirectory within source tree to use
139 --mirrors Enable PREMIRRORS and MIRRORS for source tree fetching
140 (disable by default).
141 --provides PROVIDES, -p PROVIDES
142 Specify an alias for the item provided by the recipe.
143 E.g. virtual/libgl
144 </literallayout>
145 </para>
146 </section>
147
148 <section id='devtool-the-workspace-layer-structure'>
149 <title>The Workspace Layer Structure</title>
150
151 <para>
152 <filename>devtool</filename> uses a "Workspace" layer
153 in which to accomplish builds.
154 This layer is not specific to any single
155 <filename>devtool</filename> command but is rather a common
156 working area used across the tool.
157 </para>
158
159 <para>
160 The following figure shows the workspace structure:
161 </para>
162
163 <para>
164 <imagedata fileref="figures/build-workspace-directory.png"
165 width="6in" depth="5in" align="left" scale="70" />
166 </para>
167
168 <para>
169 <literallayout class='monospaced'>
170 attic - A directory created if devtool believes it must preserve
171 anything when you run "devtool reset". For example, if you
172 run "devtool add", make changes to the recipe, and then
173 run "devtool reset", devtool takes notice that the file has
174 been changed and moves it into the attic should you still
175 want the recipe.
176
177 README - Provides information on what is in workspace layer and how to
178 manage it.
179
180 .devtool_md5 - A checksum file used by devtool.
181
182 appends - A directory that contains *.bbappend files, which point to
183 external source.
184
185 conf - A configuration directory that contains the layer.conf file.
186
187 recipes - A directory containing recipes. This directory contains a
188 folder for each directory added whose name matches that of the
189 added recipe. devtool places the <replaceable>recipe</replaceable>.bb file
190 within that sub-directory.
191
192 sources - A directory containing a working copy of the source files used
193 when building the recipe. This is the default directory used
194 as the location of the source tree when you do not provide a
195 source tree path. This directory contains a folder for each
196 set of source files matched to a corresponding recipe.
197 </literallayout>
198 </para>
199 </section>
200
201 <section id='devtool-adding-a-new-recipe-to-the-workspace'>
202 <title>Adding a New Recipe to the Workspace Layer</title>
203
204 <para>
205 Use the <filename>devtool add</filename> command to add a new recipe
206 to the workspace layer.
207 The recipe you add should not exist -
208 <filename>devtool</filename> creates it for you.
209 The source files the recipe uses should exist in an external
210 area.
211 </para>
212
213 <para>
214 The following example creates and adds a new recipe named
215 <filename>jackson</filename> to a workspace layer the tool creates.
216 The source code built by the recipes resides in
217 <filename>/home/<replaceable>user</replaceable>/sources/jackson</filename>:
218 <literallayout class='monospaced'>
219 $ devtool add jackson /home/<replaceable>user</replaceable>/sources/jackson
220 </literallayout>
221 </para>
222
223 <para>
224 If you add a recipe and the workspace layer does not exist,
225 the command creates the layer and populates it as
226 described in
227 "<link linkend='devtool-the-workspace-layer-structure'>The Workspace Layer Structure</link>"
228 section.
229 </para>
230
231 <para>
232 Running <filename>devtool add</filename> when the
233 workspace layer exists causes the tool to add the recipe,
234 append files, and source files into the existing workspace layer.
235 The <filename>.bbappend</filename> file is created to point
236 to the external source tree.
237 <note>
238 If your recipe has runtime dependencies defined, you must be sure
239 that these packages exist on the target hardware before attempting
240 to run your application.
241 If dependent packages (e.g. libraries) do not exist on the target,
242 your application, when run, will fail to find those functions.
243 For more information, see the
244 "<link linkend='devtool-deploying-your-software-on-the-target-machine'>Deploying Your Software on the Target Machine</link>"
245 section.
246 </note>
247 </para>
248
249 <para>
250 By default, <filename>devtool add</filename> uses the latest
251 revision (i.e. master) when unpacking files from a remote URI.
252 In some cases, you might want to specify a source revision by
253 branch, tag, or commit hash. You can specify these options when
254 using the <filename>devtool add</filename> command:
255 <itemizedlist>
256 <listitem><para>
257 To specify a source branch, use the
258 <filename>--srcbranch</filename> option:
259 <literallayout class='monospaced'>
260 $ devtool add --srcbranch &DISTRO_NAME_NO_CAP; jackson /home/<replaceable>user</replaceable>/sources/jackson
261 </literallayout>
262 In the previous example, you are checking out the
263 &DISTRO_NAME_NO_CAP; branch.
264 </para></listitem>
265 <listitem><para>
266 To specify a specific tag or commit hash, use the
267 <filename>--srcrev</filename> option:
268 <literallayout class='monospaced'>
269 $ devtool add --srcrev &DISTRO_REL_TAG; jackson /home/<replaceable>user</replaceable>/sources/jackson
270 $ devtool add --srcrev <replaceable>some_commit_hash</replaceable> /home/<replaceable>user</replaceable>/sources/jackson
271 </literallayout>
272 The previous examples check out the &DISTRO_REL_TAG; tag
273 and the commit associated with the
274 <replaceable>some_commit_hash</replaceable> hash.
275 </para></listitem>
276 </itemizedlist>
277 <note>
278 If you prefer to use the latest revision every time the recipe is
279 built, use the options <filename>--autorev</filename>
280 or <filename>-a</filename>.
281 </note>
282 </para>
283 </section>
284
285 <section id='devtool-extracting-the-source-for-an-existing-recipe'>
286 <title>Extracting the Source for an Existing Recipe</title>
287
288 <para>
289 Use the <filename>devtool extract</filename> command to
290 extract the source for an existing recipe.
291 When you use this command, you must supply the root name
292 of the recipe (i.e. no version, paths, or extensions), and
293 you must supply the directory to which you want the source
294 extracted.
295 </para>
296
297 <para>
298 Additional command options let you control the name of a
299 development branch into which you can checkout the source
300 and whether or not to keep a temporary directory, which is
301 useful for debugging.
302 </para>
303 </section>
304
305 <section id='devtool-synchronizing-a-recipes-extracted-source-tree'>
306 <title>Synchronizing a Recipe's Extracted Source Tree</title>
307
308 <para>
309 Use the <filename>devtool sync</filename> command to
310 synchronize a previously extracted source tree for an
311 existing recipe.
312 When you use this command, you must supply the root name
313 of the recipe (i.e. no version, paths, or extensions), and
314 you must supply the directory to which you want the source
315 extracted.
316 </para>
317
318 <para>
319 Additional command options let you control the name of a
320 development branch into which you can checkout the source
321 and whether or not to keep a temporary directory, which is
322 useful for debugging.
323 </para>
324 </section>
325
326 <section id='devtool-modifying-a-recipe'>
327 <title>Modifying an Existing Recipe</title>
328
329 <para>
330 Use the <filename>devtool modify</filename> command to begin
331 modifying the source of an existing recipe.
332 This command is very similar to the
333 <link linkend='devtool-adding-a-new-recipe-to-the-workspace'><filename>add</filename></link>
334 command except that it does not physically create the
335 recipe in the workspace layer because the recipe already
336 exists in an another layer.
337 </para>
338
339 <para>
340 The <filename>devtool modify</filename> command extracts the
341 source for a recipe, sets it up as a Git repository if the
342 source had not already been fetched from Git, checks out a
343 branch for development, and applies any patches from the recipe
344 as commits on top.
345 You can use the following command to checkout the source
346 files:
347 <literallayout class='monospaced'>
348 $ devtool modify <replaceable>recipe</replaceable>
349 </literallayout>
350 Using the above command form, <filename>devtool</filename> uses
351 the existing recipe's
352 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
353 statement to locate the upstream source, extracts the source
354 into the default sources location in the workspace.
355 The default development branch used is "devtool".
356 </para>
357 </section>
358
359 <section id='devtool-edit-an-existing-recipe'>
360 <title>Edit an Existing Recipe</title>
361
362 <para>
363 Use the <filename>devtool edit-recipe</filename> command
364 to run the default editor, which is identified using the
365 <filename>EDITOR</filename> variable, on the specified recipe.
366 </para>
367
368 <para>
369 When you use the <filename>devtool edit-recipe</filename>
370 command, you must supply the root name of the recipe
371 (i.e. no version, paths, or extensions).
372 Also, the recipe file itself must reside in the workspace
373 as a result of the <filename>devtool add</filename> or
374 <filename>devtool upgrade</filename> commands.
375 However, you can override that requirement by using the
376 "-a" or "--any-recipe" option.
377 Using either of these options allows you to edit any recipe
378 regardless of its location.
379 </para>
380 </section>
381
382 <section id='devtool-updating-a-recipe'>
383 <title>Updating a Recipe</title>
384
385 <para>
386 Use the <filename>devtool update-recipe</filename> command to
387 update your recipe with patches that reflect changes you make
388 to the source files.
389 For example, if you know you are going to work on some
390 code, you could first use the
391 <link linkend='devtool-modifying-a-recipe'><filename>devtool modify</filename></link>
392 command to extract the code and set up the workspace.
393 After which, you could modify, compile, and test the code.
394 </para>
395
396 <para>
397 When you are satisfied with the results and you have committed
398 your changes to the Git repository, you can then
399 run the <filename>devtool update-recipe</filename> to create the
400 patches and update the recipe:
401 <literallayout class='monospaced'>
402 $ devtool update-recipe <replaceable>recipe</replaceable>
403 </literallayout>
404 If you run the <filename>devtool update-recipe</filename>
405 without committing your changes, the command ignores the
406 changes.
407 </para>
408
409 <para>
410 Often, you might want to apply customizations made to your
411 software in your own layer rather than apply them to the
412 original recipe.
413 If so, you can use the
414 <filename>-a</filename> or <filename>--append</filename>
415 option with the <filename>devtool update-recipe</filename>
416 command.
417 These options allow you to specify the layer into which to
418 write an append file:
419 <literallayout class='monospaced'>
420 $ devtool update-recipe <replaceable>recipe</replaceable> -a <replaceable>base-layer-directory</replaceable>
421 </literallayout>
422 The <filename>*.bbappend</filename> file is created at the
423 appropriate path within the specified layer directory, which
424 may or may not be in your <filename>bblayers.conf</filename>
425 file.
426 If an append file already exists, the command updates it
427 appropriately.
428 </para>
429 </section>
430
431 <section id='devtool-checking-on-the-upgrade-status-of-a-recipe'>
432 <title>Checking on the Upgrade Status of a Recipe</title>
433
434 <para>
435 Upstream recipes change over time.
436 Consequently, you might find that you need to determine if you
437 can upgrade a recipe to a newer version.
438 </para>
439
440 <para>
441 To check on the upgrade status of a recipe, use the
442 <filename>devtool check-upgrade-status</filename> command.
443 The command displays a table of your current recipe versions,
444 the latest upstream versions, the email address of the recipe's
445 maintainer, and any additional information such as commit hash
446 strings and reasons you might not be able to upgrade a particular
447 recipe.
448 <note><title>NOTES:</title>
449 <itemizedlist>
450 <listitem><para>
451 For the <filename>oe-core</filename> layer, recipe
452 maintainers come from the
453 <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/conf/distro/include/maintainers.inc'><filename>maintainers.inc</filename></ulink>
454 file.
455 </para></listitem>
456 <listitem><para>
457 If the recipe is using the
458 <ulink url='&YOCTO_DOCS_BB_URL;#git-fetcher'>Git fetcher</ulink>
459 rather than a tarball, the commit hash points to the
460 commit that matches the recipe's latest version tag.
461 </para></listitem>
462 </itemizedlist>
463 </note>
464 </para>
465
466 <para>
467 As with all <filename>devtool</filename> commands, you can get
468 help on the individual command:
469 <literallayout class='monospaced'>
470 $ devtool check-upgrade-status -h
471 NOTE: Starting bitbake server...
472 usage: devtool check-upgrade-status [-h] [--all] [recipe [recipe ...]]
473
474 Prints a table of recipes together with versions currently provided by
475 recipes, and latest upstream versions, when there is a later version available
476
477 arguments:
478 recipe Name of the recipe to report (omit to report upgrade info for
479 all recipes)
480
481 options:
482 -h, --help show this help message and exit
483 --all, -a Show all recipes, not just recipes needing upgrade
484 </literallayout>
485 </para>
486
487 <para>
488 Unless you provide a specific recipe name on the command line,
489 the command checks all recipes in all configured layers.
490 </para>
491
492 <para>
493 Following is a partial example table that reports on all the
494 recipes.
495 Notice the reported reason for not upgrading the
496 <filename>base-passwd</filename> recipe.
497 In this example, while a new version is available upstream,
498 you do not want to use it because the dependency on
499 <filename>cdebconf</filename> is not easily satisfied.
500 <note>
501 When a reason for not upgrading displays, the reason is
502 usually written into the recipe using the
503 <filename>RECIPE_NO_UPDATE_REASON</filename> variable.
504 See the
505 <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb'><filename>base-passwd.bb</filename></ulink>
506 recipe for an example.
507 </note>
508 <literallayout class='monospaced'>
509 $ devtool check-upgrade-status
510 ...
511 NOTE: acpid 2.0.30 2.0.31
512 Ross Burton &lt;ross.burton@intel.com&gt;
513 NOTE: u-boot-fw-utils 2018.11 2019.01
514 Marek Vasut &lt;marek.vasut@gmail.com&gt;
515 d3689267f92c5956e09cc7d1baa4700141662bff
516 NOTE: u-boot-tools 2018.11 2019.01
517 Marek Vasut &lt;marek.vasut@gmail.com&gt;
518 d3689267f92c5956e09cc7d1baa4700141662bff
519 .
520 .
521 .
522 NOTE: base-passwd 3.5.29 3.5.45
523 Anuj Mittal &lt;anuj.mittal@intel.com&gt; cannot be updated due to: Version
524 3.5.38 requires cdebconf for update-passwd utility
525 NOTE: busybox 1.29.2 1.30.0
526 Andrej Valek &lt;andrej.valek@siemens.com&gt;
527 NOTE: dbus-test 1.12.10 1.12.12
528 Chen Qi &lt;Qi.Chen@windriver.com&gt;
529 </literallayout>
530 </para>
531 </section>
532
533 <section id='devtool-upgrading-a-recipe'>
534 <title>Upgrading a Recipe</title>
535
536 <para>
537 As software matures, upstream recipes are upgraded to newer
538 versions.
539 As a developer, you need to keep your local recipes up-to-date
540 with the upstream version releases.
541 Several methods exist by which you can upgrade recipes.
542 You can read about them in the
543 "<ulink url='&YOCTO_DOCS_DEV_URL;#gs-upgrading-recipes'>Upgrading Recipes</ulink>"
544 section of the Yocto Project Development Tasks Manual.
545 This section overviews the <filename>devtool upgrade</filename>
546 command.
547 <note>
548 Before you upgrade a recipe, you can check on its upgrade
549 status.
550 See the
551 "<link linkend='devtool-checking-on-the-upgrade-status-of-a-recipe'>Checking on the Upgrade Status of a Recipe</link>"
552 for more information.
553 </note>
554 </para>
555
556 <para>
557 The <filename>devtool upgrade</filename> command
558 upgrades an existing recipe to a more recent version of the
559 recipe upstream.
560 The command puts the upgraded recipe file along with any associated
561 files into a "workspace" and, if necessary, extracts the source
562 tree to a specified location.
563 During the upgrade, patches associated with the recipe are
564 rebased or added as needed.
565 </para>
566
567 <para>
568 When you use the <filename>devtool upgrade</filename> command,
569 you must supply the root name of the recipe (i.e. no version,
570 paths, or extensions), and you must supply the directory
571 to which you want the source extracted.
572 Additional command options let you control things such as
573 the version number to which you want to upgrade (i.e. the
574 <link linkend='var-PV'><filename>PV</filename></link>),
575 the source revision to which you want to upgrade (i.e. the
576 <link linkend='var-SRCREV'><filename>SRCREV</filename></link>),
577 whether or not to apply patches, and so forth.
578 </para>
579
580 <para>
581 You can read more on the <filename>devtool upgrade</filename>
582 workflow in the
583 "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-devtool-use-devtool-upgrade-to-create-a-version-of-the-recipe-that-supports-a-newer-version-of-the-software'>Use <filename>devtool upgrade</filename> to Create a Version of the Recipe that Supports a Newer Version of the Software</ulink>"
584 section in the Yocto Project Application Development and the
585 Extensible Software Development Kit (eSDK) manual.
586 You can also see an example of how to use
587 <filename>devtool upgrade</filename> in the
588 "<ulink url='&YOCTO_DOCS_DEV_URL;#gs-using-devtool-upgrade'>Using <filename>devtool upgrade</filename></ulink>"
589 section in the Yocto Project Development Tasks Manual.
590 </para>
591 </section>
592
593 <section id='devtool-resetting-a-recipe'>
594 <title>Resetting a Recipe</title>
595
596 <para>
597 Use the <filename>devtool reset</filename> command to remove a
598 recipe and its configuration (e.g. the corresponding
599 <filename>.bbappend</filename> file) from the workspace layer.
600 Realize that this command deletes the recipe and the
601 append file.
602 The command does not physically move them for you.
603 Consequently, you must be sure to physically relocate your
604 updated recipe and the append file outside of the workspace
605 layer before running the <filename>devtool reset</filename>
606 command.
607 </para>
608
609 <para>
610 If the <filename>devtool reset</filename> command detects that
611 the recipe or the append files have been modified, the
612 command preserves the modified files in a separate "attic"
613 subdirectory under the workspace layer.
614 </para>
615
616 <para>
617 Here is an example that resets the workspace directory that
618 contains the <filename>mtr</filename> recipe:
619 <literallayout class='monospaced'>
620 $ devtool reset mtr
621 NOTE: Cleaning sysroot for recipe mtr...
622 NOTE: Leaving source tree /home/scottrif/poky/build/workspace/sources/mtr as-is; if you no
623 longer need it then please delete it manually
624 $
625 </literallayout>
626 </para>
627 </section>
628
629 <section id='devtool-building-your-recipe'>
630 <title>Building Your Recipe</title>
631
632 <para>
633 Use the <filename>devtool build</filename> command to build your
634 recipe.
635 The <filename>devtool build</filename> command is equivalent to
636 the <filename>bitbake -c populate_sysroot</filename> command.
637 </para>
638
639 <para>
640 When you use the <filename>devtool build</filename> command,
641 you must supply the root name of the recipe (i.e. do not provide
642 versions, paths, or extensions).
643 You can use either the "-s" or the "--disable-parallel-make"
644 options to disable parallel makes during the build.
645 Here is an example:
646 <literallayout class='monospaced'>
647 $ devtool build <replaceable>recipe</replaceable>
648 </literallayout>
649 </para>
650 </section>
651
652 <section id='devtool-building-your-image'>
653 <title>Building Your Image</title>
654
655 <para>
656 Use the <filename>devtool build-image</filename> command
657 to build an image, extending it to include packages from
658 recipes in the workspace.
659 Using this command is useful when you want an image that
660 ready for immediate deployment onto a device for testing.
661 For proper integration into a final image, you need to
662 edit your custom image recipe appropriately.
663 </para>
664
665 <para>
666 When you use the <filename>devtool build-image</filename>
667 command, you must supply the name of the image.
668 This command has no command line options:
669 <literallayout class='monospaced'>
670 $ devtool build-image <replaceable>image</replaceable>
671 </literallayout>
672 </para>
673 </section>
674
675 <section id='devtool-deploying-your-software-on-the-target-machine'>
676 <title>Deploying Your Software on the Target Machine</title>
677
678 <para>
679 Use the <filename>devtool deploy-target</filename> command to
680 deploy the recipe's build output to the live target machine:
681 <literallayout class='monospaced'>
682 $ devtool deploy-target <replaceable>recipe</replaceable>&nbsp;<replaceable>target</replaceable>
683 </literallayout>
684 The <replaceable>target</replaceable> is the address of the
685 target machine, which must be running an SSH server (i.e.
686 <filename>user@hostname[:destdir]</filename>).
687 </para>
688
689 <para>
690 This command deploys all files installed during the
691 <link linkend='ref-tasks-install'><filename>do_install</filename></link>
692 task.
693 Furthermore, you do not need to have package management enabled
694 within the target machine.
695 If you do, the package manager is bypassed.
696 <note><title>Notes</title>
697 <para>
698 The <filename>deploy-target</filename>
699 functionality is for development only.
700 You should never use it to update an image that will be
701 used in production.
702 </para>
703 </note>
704 </para>
705
706 <para>
707 Some conditions exist that could prevent a deployed application
708 from behaving as expected.
709 When both of the following conditions exist, your application has
710 the potential to not behave correctly when run on the target:
711 <itemizedlist>
712 <listitem><para>
713 You are deploying a new application to the target and
714 the recipe you used to build the application had
715 correctly defined runtime dependencies.
716 </para></listitem>
717 <listitem><para>
718 The target does not physically have the packages on which
719 the application depends installed.
720 </para></listitem>
721 </itemizedlist>
722 If both of these conditions exist, your application will not
723 behave as expected.
724 The reason for this misbehavior is because the
725 <filename>devtool deploy-target</filename> command does not deploy
726 the packages (e.g. libraries) on which your new application
727 depends.
728 The assumption is that the packages are already on the target.
729 Consequently, when a runtime call is made in the application
730 for a dependent function (e.g. a library call), the function
731 cannot be found.
732 </para>
733
734 <para>
735 To be sure you have all the dependencies local to the target, you
736 need to be sure that the packages are pre-deployed (installed)
737 on the target before attempting to run your application.
738 </para>
739 </section>
740
741 <section id='devtool-removing-your-software-from-the-target-machine'>
742 <title>Removing Your Software from the Target Machine</title>
743
744 <para>
745 Use the <filename>devtool undeploy-target</filename> command to
746 remove deployed build output from the target machine.
747 For the <filename>devtool undeploy-target</filename> command to
748 work, you must have previously used the
749 <link linkend='devtool-deploying-your-software-on-the-target-machine'><filename>devtool deploy-target</filename></link>
750 command.
751 <literallayout class='monospaced'>
752 $ devtool undeploy-target <replaceable>recipe</replaceable>&nbsp;<replaceable>target</replaceable>
753 </literallayout>
754 The <replaceable>target</replaceable> is the address of the
755 target machine, which must be running an SSH server (i.e.
756 <filename>user@hostname</filename>).
757 </para>
758 </section>
759
760 <section id='devtool-creating-the-workspace'>
761 <title>Creating the Workspace Layer in an Alternative Location</title>
762
763 <para>
764 Use the <filename>devtool create-workspace</filename> command to
765 create a new workspace layer in your
766 <link linkend='build-directory'>Build Directory</link>.
767 When you create a new workspace layer, it is populated with the
768 <filename>README</filename> file and the
769 <filename>conf</filename> directory only.
770 </para>
771
772 <para>
773 The following example creates a new workspace layer in your
774 current working and by default names the workspace layer
775 "workspace":
776 <literallayout class='monospaced'>
777 $ devtool create-workspace
778 </literallayout>
779 </para>
780
781 <para>
782 You can create a workspace layer anywhere by supplying
783 a pathname with the command.
784 The following command creates a new workspace layer named
785 "new-workspace":
786 <literallayout class='monospaced'>
787 $ devtool create-workspace /home/scottrif/new-workspace
788 </literallayout>
789 </para>
790 </section>
791
792 <section id='devtool-get-the-status-of-the-recipes-in-your-workspace'>
793 <title>Get the Status of the Recipes in Your Workspace</title>
794
795 <para>
796 Use the <filename>devtool status</filename> command to
797 list the recipes currently in your workspace.
798 Information includes the paths to their respective
799 external source trees.
800 </para>
801
802 <para>
803 The <filename>devtool status</filename> command has no
804 command-line options:
805 <literallayout class='monospaced'>
806 $ devtool status
807 </literallayout>
808 Following is sample output after using
809 <link linkend='devtool-adding-a-new-recipe-to-the-workspace'><filename>devtool add</filename></link>
810 to create and add the <filename>mtr_0.86.bb</filename> recipe
811 to the <filename>workspace</filename> directory:
812 <literallayout class='monospaced'>
813 $ devtool status
814 mtr: /home/scottrif/poky/build/workspace/sources/mtr (/home/scottrif/poky/build/workspace/recipes/mtr/mtr_0.86.bb)
815 $
816 </literallayout>
817 </para>
818 </section>
819
820 <section id='devtool-search-for-available-target-recipes'>
821 <title>Search for Available Target Recipes</title>
822
823 <para>
824 Use the <filename>devtool search</filename> command to
825 search for available target recipes.
826 The command matches the recipe name, package name,
827 description, and installed files.
828 The command displays the recipe name as a result of a
829 match.
830 </para>
831
832 <para>
833 When you use the <filename>devtool search</filename> command,
834 you must supply a <replaceable>keyword</replaceable>.
835 The command uses the <replaceable>keyword</replaceable> when
836 searching for a match.
837 </para>
838 </section>
839</chapter>
840<!--
841vim: expandtab tw=80 ts=4
842-->
diff --git a/documentation/ref-manual/ref-features.xml b/documentation/ref-manual/ref-features.xml
deleted file mode 100644
index 8cab5ec3a8..0000000000
--- a/documentation/ref-manual/ref-features.xml
+++ /dev/null
@@ -1,461 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='ref-features'>
7 <title>Features</title>
8
9 <para>
10 This chapter provides a reference of shipped machine and distro features
11 you can include as part of your image, a reference on image features you can
12 select, and a reference on feature backfilling.
13 </para>
14
15 <para>
16 Features provide a mechanism for working out which packages
17 should be included in the generated images.
18 Distributions can select which features they want to support through the
19 <filename><link linkend='var-DISTRO_FEATURES'>DISTRO_FEATURES</link></filename>
20 variable, which is set or appended to in a distribution's configuration file such as
21 <filename>poky.conf</filename>,
22 <filename>poky-tiny.conf</filename>,
23 <filename>poky-lsb.conf</filename> and so forth.
24 Machine features are set in the
25 <filename><link linkend='var-MACHINE_FEATURES'>MACHINE_FEATURES</link></filename>
26 variable, which is set in the machine configuration file and
27 specifies the hardware features for a given machine.
28 </para>
29
30 <para>
31 These two variables combine to work out which kernel modules,
32 utilities, and other packages to include.
33 A given distribution can support a selected subset of features so some machine features might not
34 be included if the distribution itself does not support them.
35 </para>
36
37 <para>
38 One method you can use to determine which recipes are checking to see if a
39 particular feature is contained or not is to <filename>grep</filename> through
40 the <link linkend='metadata'>Metadata</link>
41 for the feature.
42 Here is an example that discovers the recipes whose build is potentially
43 changed based on a given feature:
44 <literallayout class='monospaced'>
45 $ cd poky
46 $ git grep 'contains.*MACHINE_FEATURES.*<replaceable>feature</replaceable>'
47 </literallayout>
48 </para>
49
50 <section id='ref-features-machine'>
51 <title>Machine Features</title>
52
53 <para>
54 The items below are features you can use with
55 <link linkend='var-MACHINE_FEATURES'><filename>MACHINE_FEATURES</filename></link>.
56 Features do not have a one-to-one correspondence to packages, and they can
57 go beyond simply controlling the installation of a package or packages.
58 Sometimes a feature can influence how certain recipes are built.
59 For example, a feature might determine whether a particular configure option
60 is specified within the
61 <link linkend='ref-tasks-configure'><filename>do_configure</filename></link>
62 task for a particular recipe.
63 </para>
64
65 <para>
66 This feature list only represents features as shipped with the Yocto Project metadata:
67 <itemizedlist>
68 <listitem><para><emphasis>acpi:</emphasis> Hardware has ACPI (x86/x86_64 only)
69 </para></listitem>
70 <listitem><para><emphasis>alsa:</emphasis> Hardware has ALSA audio drivers
71 </para></listitem>
72 <listitem><para><emphasis>apm:</emphasis> Hardware uses APM (or APM emulation)
73 </para></listitem>
74 <listitem><para><emphasis>bluetooth:</emphasis> Hardware has integrated BT
75 </para></listitem>
76 <listitem><para><emphasis>efi:</emphasis> Support for booting through EFI
77 </para></listitem>
78 <listitem><para><emphasis>ext2:</emphasis> Hardware HDD or Microdrive
79 </para></listitem>
80 <listitem><para><emphasis>keyboard:</emphasis> Hardware has a keyboard
81 </para></listitem>
82 <listitem><para><emphasis>pcbios:</emphasis> Support for booting through BIOS
83 </para></listitem>
84 <listitem><para><emphasis>pci:</emphasis> Hardware has a PCI bus
85 </para></listitem>
86 <listitem><para><emphasis>pcmcia:</emphasis> Hardware has PCMCIA or CompactFlash sockets
87 </para></listitem>
88 <listitem><para><emphasis>phone:</emphasis> Mobile phone (voice) support
89 </para></listitem>
90 <listitem><para><emphasis>qvga:</emphasis> Machine has a QVGA (320x240) display
91 </para></listitem>
92 <listitem><para><emphasis>rtc:</emphasis> Machine has a Real-Time Clock
93 </para></listitem>
94 <listitem><para><emphasis>screen:</emphasis> Hardware has a screen
95 </para></listitem>
96 <listitem><para><emphasis>serial:</emphasis> Hardware has serial support (usually RS232)
97 </para></listitem>
98 <listitem><para><emphasis>touchscreen:</emphasis> Hardware has a touchscreen
99 </para></listitem>
100 <listitem><para><emphasis>usbgadget:</emphasis> Hardware is USB gadget device capable
101 </para></listitem>
102 <listitem><para><emphasis>usbhost:</emphasis> Hardware is USB Host capable
103 </para></listitem>
104 <listitem><para><emphasis>vfat:</emphasis> FAT file system support
105 </para></listitem>
106 <listitem><para><emphasis>wifi:</emphasis> Hardware has integrated WiFi
107 </para></listitem>
108 </itemizedlist>
109 </para>
110 </section>
111
112 <section id='ref-features-distro'>
113 <title>Distro Features</title>
114
115 <para>
116 The items below are features you can use with
117 <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>
118 to enable features across your distribution.
119 Features do not have a one-to-one correspondence to packages,
120 and they can go beyond simply controlling the installation of a
121 package or packages.
122 In most cases, the presence or absence of a feature translates to
123 the appropriate option supplied to the configure script during the
124 <link linkend='ref-tasks-configure'><filename>do_configure</filename></link>
125 task for the recipes that optionally
126 support the feature.
127 </para>
128
129 <para>
130 Some distro features are also machine features.
131 These select features make sense to be controlled both at
132 the machine and distribution configuration level.
133 See the
134 <link linkend='var-COMBINED_FEATURES'><filename>COMBINED_FEATURES</filename></link>
135 variable for more information.
136 </para>
137
138 <para>
139 This list only represents features as shipped with the Yocto Project metadata:
140 <itemizedlist>
141 <listitem><para><emphasis>alsa:</emphasis> Include ALSA support
142 (OSS compatibility kernel modules installed if available).
143 </para></listitem>
144 <listitem><para><emphasis>api-documentation:</emphasis>
145 Enables generation of API documentation during recipe
146 builds.
147 The resulting documentation is added to SDK tarballs
148 when the
149 <filename>bitbake -c populate_sdk</filename> command
150 is used.
151 See the
152 "<ulink url='&YOCTO_DOCS_SDK_URL;#adding-api-documentation-to-the-standard-sdk'>Adding API Documentation to the Standard SDK</ulink>"
153 section in the Yocto Project Application Development and
154 the Extensible Software Development Kit (eSDK) manual.
155 </para></listitem>
156 <listitem><para><emphasis>bluetooth:</emphasis> Include
157 bluetooth support (integrated BT only).</para></listitem>
158 <listitem><para><emphasis>cramfs:</emphasis> Include CramFS
159 support.</para></listitem>
160 <listitem><para><emphasis>directfb:</emphasis>
161 Include DirectFB support.
162 </para></listitem>
163 <listitem><para><emphasis>ext2:</emphasis> Include tools for
164 supporting for devices with internal HDD/Microdrive for
165 storing files (instead of Flash only devices).
166 </para></listitem>
167 <listitem><para><emphasis>ipsec:</emphasis> Include IPSec
168 support.</para></listitem>
169 <listitem><para><emphasis>ipv6:</emphasis> Include IPv6 support.
170 </para></listitem>
171 <listitem><para><emphasis>keyboard:</emphasis> Include keyboard
172 support (e.g. keymaps will be loaded during boot).
173 </para></listitem>
174 <listitem><para><emphasis>ldconfig:</emphasis>
175 Include support for ldconfig and
176 <filename>ld.so.conf</filename> on the target.
177 </para></listitem>
178 <listitem><para><emphasis>nfs:</emphasis> Include NFS client
179 support (for mounting NFS exports on device).
180 </para></listitem>
181 <listitem><para><emphasis>opengl:</emphasis>
182 Include the Open Graphics Library, which is a
183 cross-language, multi-platform application programming
184 interface used for rendering two and three-dimensional
185 graphics.</para></listitem>
186 <listitem><para><emphasis>pci:</emphasis> Include PCI bus
187 support.</para></listitem>
188 <listitem><para><emphasis>pcmcia:</emphasis> Include
189 PCMCIA/CompactFlash support.</para></listitem>
190 <listitem><para><emphasis>ppp:</emphasis> Include PPP dialup
191 support.</para></listitem>
192 <listitem><para><emphasis>ptest:</emphasis> Enables building
193 the package tests where supported by individual recipes.
194 For more information on package tests, see the
195 "<ulink url='&YOCTO_DOCS_DEV_URL;#testing-packages-with-ptest'>Testing Packages With ptest</ulink>"
196 section in the Yocto Project Development Tasks Manual.
197 </para></listitem>
198 <listitem><para><emphasis>smbfs:</emphasis> Include SMB networks
199 client support (for mounting Samba/Microsoft Windows shares
200 on device).</para></listitem>
201 <listitem><para><emphasis>systemd:</emphasis> Include support
202 for this <filename>init</filename> manager, which is a full
203 replacement of for <filename>init</filename> with parallel
204 starting of services, reduced shell overhead, and other
205 features.
206 This <filename>init</filename> manager is used by many
207 distributions.</para></listitem>
208 <listitem><para><emphasis>usbgadget:</emphasis> Include USB
209 Gadget Device support (for USB networking/serial/storage).
210 </para></listitem>
211 <listitem><para><emphasis>usbhost:</emphasis> Include USB Host
212 support (allows to connect external keyboard, mouse,
213 storage, network etc).</para></listitem>
214 <listitem><para><emphasis>usrmerge:</emphasis> Merges the
215 <filename>/bin</filename>, <filename>/sbin</filename>,
216 <filename>/lib</filename>, and <filename>/lib64</filename>
217 directories into their respective counterparts in the
218 <filename>/usr</filename> directory to provide better package
219 and application compatibility.</para></listitem>
220 <listitem><para><emphasis>wayland:</emphasis> Include the
221 Wayland display server protocol and the library that
222 supports it.</para></listitem>
223 <listitem><para><emphasis>wifi:</emphasis> Include WiFi support
224 (integrated only).</para></listitem>
225 <listitem><para><emphasis>x11:</emphasis> Include the X server
226 and libraries.</para></listitem>
227 </itemizedlist>
228 </para>
229 </section>
230
231 <section id='ref-features-image'>
232 <title>Image Features</title>
233
234 <para>
235 The contents of images generated by the OpenEmbedded build system
236 can be controlled by the
237 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>
238 and
239 <link linkend='var-EXTRA_IMAGE_FEATURES'><filename>EXTRA_IMAGE_FEATURES</filename></link>
240 variables that you typically configure in your image recipes.
241 Through these variables, you can add several different
242 predefined packages such as development utilities or packages with
243 debug information needed to investigate application problems or
244 profile applications.
245 </para>
246
247 <para>
248 The following image features are available for all images:
249 <itemizedlist>
250 <listitem><para><emphasis>allow-empty-password:</emphasis>
251 Allows Dropbear and OpenSSH to accept root logins
252 and logins from accounts having an empty password string.
253 </para></listitem>
254 <listitem><para><emphasis>dbg-pkgs:</emphasis>
255 Installs debug symbol packages for all packages installed
256 in a given image.
257 </para></listitem>
258 <listitem><para><emphasis>debug-tweaks:</emphasis>
259 Makes an image suitable for development (e.g.
260 allows root logins without passwords and enables
261 post-installation logging).
262 See the 'allow-empty-password', 'empty-root-password',
263 and 'post-install-logging' features in this list for
264 additional information.
265 </para></listitem>
266 <listitem><para><emphasis>dev-pkgs:</emphasis>
267 Installs development packages (headers and extra library
268 links) for all packages installed in a given image.
269 </para></listitem>
270 <listitem><para><emphasis>doc-pkgs:</emphasis> Installs
271 documentation packages for all packages installed in a
272 given image.
273 </para></listitem>
274 <listitem><para><emphasis>empty-root-password:</emphasis>
275 Sets the root password to an empty string, which allows
276 logins with a blank password.
277 </para></listitem>
278 <listitem><para><emphasis>package-management:</emphasis>
279 Installs package management tools and preserves the package
280 manager database.
281 </para></listitem>
282 <listitem><para><emphasis>post-install-logging:</emphasis>
283 Enables logging postinstall script runs to
284 the <filename>/var/log/postinstall.log</filename> file
285 on first boot of the image on the target system.
286 <note>
287 To make the <filename>/var/log</filename> directory
288 on the target persistent, use the
289 <link linkend='var-VOLATILE_LOG_DIR'><filename>VOLATILE_LOG_DIR</filename></link>
290 variable by setting it to "no".
291 </note>
292 </para></listitem>
293 <listitem><para><emphasis>ptest-pkgs:</emphasis>
294 Installs ptest packages for all ptest-enabled recipes.
295 </para></listitem>
296 <listitem><para><emphasis>read-only-rootfs:</emphasis>
297 Creates an image whose root filesystem is read-only.
298 See the
299 "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-read-only-root-filesystem'>Creating a Read-Only Root Filesystem</ulink>"
300 section in the Yocto Project Development Tasks Manual for
301 more information.
302 </para></listitem>
303 <listitem><para><emphasis>splash:</emphasis>
304 Enables showing a splash screen during boot.
305 By default, this screen is provided by
306 <filename>psplash</filename>, which does allow
307 customization.
308 If you prefer to use an alternative splash screen package,
309 you can do so by setting the <filename>SPLASH</filename>
310 variable to a different package name (or names) within the
311 image recipe or at the distro configuration level.
312 </para></listitem>
313 <listitem><para><emphasis>staticdev-pkgs:</emphasis>
314 Installs static development packages, which are
315 static libraries (i.e. <filename>*.a</filename> files), for
316 all packages installed in a given image.
317 </para></listitem>
318 </itemizedlist>
319 </para>
320
321 <para>
322 Some image features are available only when you inherit the
323 <link linkend='ref-classes-core-image'><filename>core-image</filename></link>
324 class.
325 The current list of these valid features is as follows:
326 <itemizedlist>
327 <listitem><para><emphasis>hwcodecs:</emphasis> Installs
328 hardware acceleration codecs.
329 </para></listitem>
330 <listitem><para><emphasis>nfs-server:</emphasis>
331 Installs an NFS server.
332 </para></listitem>
333 <listitem><para><emphasis>perf:</emphasis>
334 Installs profiling tools such as
335 <filename>perf</filename>, <filename>systemtap</filename>,
336 and <filename>LTTng</filename>.
337 For general information on user-space tools, see the
338 <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
339 manual.
340 </para></listitem>
341 <listitem><para><emphasis>ssh-server-dropbear:</emphasis>
342 Installs the Dropbear minimal SSH server.
343 </para></listitem>
344 <listitem><para><emphasis>ssh-server-openssh:</emphasis>
345 Installs the OpenSSH SSH server, which is more
346 full-featured than Dropbear.
347 Note that if both the OpenSSH SSH server and the Dropbear
348 minimal SSH server are present in
349 <filename>IMAGE_FEATURES</filename>, then OpenSSH will take
350 precedence and Dropbear will not be installed.
351 </para></listitem>
352 <listitem><para><emphasis>tools-debug:</emphasis>
353 Installs debugging tools such as
354 <filename>strace</filename> and <filename>gdb</filename>.
355 For information on GDB, see the
356 "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-gdb-remotedebug'>Debugging With the GNU Project Debugger (GDB) Remotely</ulink>"
357 section in the Yocto Project Development Tasks Manual.
358 For information on tracing and profiling, see the
359 <ulink url='&YOCTO_DOCS_PROF_URL;'>Yocto Project Profiling and Tracing Manual</ulink>.
360 </para></listitem>
361 <listitem><para><emphasis>tools-sdk:</emphasis>
362 Installs a full SDK that runs on the device.
363 </para></listitem>
364 <listitem><para><emphasis>tools-testapps:</emphasis>
365 Installs device testing tools (e.g. touchscreen debugging).
366 </para></listitem>
367 <listitem><para><emphasis>x11:</emphasis>
368 Installs the X server.
369 </para></listitem>
370 <listitem><para><emphasis>x11-base:</emphasis>
371 Installs the X server with a minimal environment.
372 </para></listitem>
373 <listitem><para><emphasis>x11-sato:</emphasis>
374 Installs the OpenedHand Sato environment.
375 </para></listitem>
376 </itemizedlist>
377 </para>
378
379 </section>
380
381 <section id='ref-features-backfill'>
382 <title>Feature Backfilling</title>
383
384 <para>
385 Sometimes it is necessary in the OpenEmbedded build system to extend
386 <link linkend='var-MACHINE_FEATURES'><filename>MACHINE_FEATURES</filename></link>
387 or <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>
388 to control functionality that was previously enabled and not able
389 to be disabled.
390 For these cases, we need to add an
391 additional feature item to appear in one of these variables,
392 but we do not want to force developers who have existing values
393 of the variables in their configuration to add the new feature
394 in order to retain the same overall level of functionality.
395 Thus, the OpenEmbedded build system has a mechanism to
396 automatically "backfill" these added features into existing
397 distro or machine configurations.
398 You can see the list of features for which this is done by
399 finding the
400 <link linkend='var-DISTRO_FEATURES_BACKFILL'><filename>DISTRO_FEATURES_BACKFILL</filename></link>
401 and <link linkend='var-MACHINE_FEATURES_BACKFILL'><filename>MACHINE_FEATURES_BACKFILL</filename></link>
402 variables in the <filename>meta/conf/bitbake.conf</filename> file.
403 </para>
404
405 <para>
406 Because such features are backfilled by default into all
407 configurations as described in the previous paragraph, developers
408 who wish to disable the new features need to be able to selectively
409 prevent the backfilling from occurring.
410 They can do this by adding the undesired feature or features to the
411 <link linkend='var-DISTRO_FEATURES_BACKFILL_CONSIDERED'><filename>DISTRO_FEATURES_BACKFILL_CONSIDERED</filename></link>
412 or <link linkend='var-MACHINE_FEATURES_BACKFILL_CONSIDERED'><filename>MACHINE_FEATURES_BACKFILL_CONSIDERED</filename></link>
413 variables for distro features and machine features respectively.
414 </para>
415
416 <para>
417 Here are two examples to help illustrate feature backfilling:
418 <itemizedlist>
419 <listitem><para><emphasis>The "pulseaudio" distro feature option</emphasis>:
420 Previously, PulseAudio support was enabled within the Qt and
421 GStreamer frameworks.
422 Because of this, the feature is backfilled and thus
423 enabled for all distros through the
424 <filename>DISTRO_FEATURES_BACKFILL</filename>
425 variable in the <filename>meta/conf/bitbake.conf</filename> file.
426 However, your distro needs to disable the feature.
427 You can disable the feature without affecting
428 other existing distro configurations that need PulseAudio support
429 by adding "pulseaudio" to
430 <filename>DISTRO_FEATURES_BACKFILL_CONSIDERED</filename>
431 in your distro's <filename>.conf</filename> file.
432 Adding the feature to this variable when it also
433 exists in the <filename>DISTRO_FEATURES_BACKFILL</filename>
434 variable prevents the build system from adding the feature to
435 your configuration's <filename>DISTRO_FEATURES</filename>, effectively disabling
436 the feature for that particular distro.</para></listitem>
437 <listitem><para><emphasis>The "rtc" machine feature option</emphasis>:
438 Previously, real time clock (RTC) support was enabled for all
439 target devices.
440 Because of this, the feature is backfilled and thus enabled
441 for all machines through the <filename>MACHINE_FEATURES_BACKFILL</filename>
442 variable in the <filename>meta/conf/bitbake.conf</filename> file.
443 However, your target device does not have this capability.
444 You can disable RTC support for your device without
445 affecting other machines that need RTC support
446 by adding the feature to your machine's
447 <filename>MACHINE_FEATURES_BACKFILL_CONSIDERED</filename>
448 list in the machine's <filename>.conf</filename> file.
449 Adding the feature to this variable when it also
450 exists in the <filename>MACHINE_FEATURES_BACKFILL</filename>
451 variable prevents the build system from adding the feature to
452 your configuration's <filename>MACHINE_FEATURES</filename>, effectively
453 disabling RTC support for that particular machine.</para></listitem>
454 </itemizedlist>
455 </para>
456 </section>
457</chapter>
458
459<!--
460vim: expandtab tw=80 ts=4 spell spelllang=en_gb
461-->
diff --git a/documentation/ref-manual/ref-images.xml b/documentation/ref-manual/ref-images.xml
deleted file mode 100644
index 6f10a6fd2a..0000000000
--- a/documentation/ref-manual/ref-images.xml
+++ /dev/null
@@ -1,170 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='ref-images'>
7 <title>Images</title>
8
9 <para>
10 The OpenEmbedded build system provides several example
11 images to satisfy different needs.
12 When you issue the <filename>bitbake</filename> command you provide a "top-level" recipe
13 that essentially begins the build for the type of image you want.
14 </para>
15
16 <note>
17 Building an image without GNU General Public License Version 3 (GPLv3),
18 GNU Lesser General Public License Version 3 (LGPLv3), and the
19 GNU Affero General Public License Version 3 (AGPL-3.0) components
20 is only supported for minimal and base images.
21 Furthermore, if you are going to build an image using non-GPLv3 and
22 similarly licensed components, you must make the following changes in
23 the <filename>local.conf</filename> file before using the BitBake
24 command to build the minimal or base image:
25 <literallayout class='monospaced'>
26 1. Comment out the EXTRA_IMAGE_FEATURES line
27 2. Set INCOMPATIBLE_LICENSE = "GPL-3.0 LGPL-3.0 AGPL-3.0"
28 </literallayout>
29 </note>
30
31 <para>
32 From within the <filename>poky</filename> Git repository, you can use
33 the following command to display the list of directories within the
34 <link linkend='source-directory'>Source Directory</link>
35 that contain image recipe files:
36 <literallayout class='monospaced'>
37 $ ls meta*/recipes*/images/*.bb
38 </literallayout>
39 </para>
40
41 <para>
42 Following is a list of supported recipes:
43 <itemizedlist>
44 <listitem><para>
45 <filename>build-appliance-image</filename>:
46 An example virtual machine that contains all the pieces
47 required to run builds using the build system as well as the
48 build system itself.
49 You can boot and run the image using either the
50 <ulink url='http://www.vmware.com/products/player/overview.html'>VMware Player</ulink>
51 or
52 <ulink url='http://www.vmware.com/products/workstation/overview.html'>VMware Workstation</ulink>.
53 For more information on this image, see the
54 <ulink url='&YOCTO_HOME_URL;/software-item/build-appliance/'>Build Appliance</ulink>
55 page on the Yocto Project website.
56 </para></listitem>
57 <listitem><para><filename>core-image-base</filename>:
58 A console-only image that fully supports the target device hardware.</para></listitem>
59 <listitem><para><filename>core-image-clutter</filename>:
60 An image with support for the Open GL-based toolkit Clutter, which enables development of
61 rich and animated graphical user interfaces.</para></listitem>
62 <listitem><para><filename>core-image-full-cmdline</filename>:
63 A console-only image with more full-featured Linux system
64 functionality installed.</para></listitem>
65 <listitem><para><filename>core-image-lsb</filename>:
66 An image that conforms to the Linux Standard Base (LSB)
67 specification.
68 This image requires a distribution configuration that
69 enables LSB compliance (e.g. <filename>poky-lsb</filename>).
70 If you build <filename>core-image-lsb</filename> without that
71 configuration, the image will not be LSB-compliant.
72 </para></listitem>
73 <listitem><para><filename>core-image-lsb-dev</filename>:
74 A <filename>core-image-lsb</filename> image that is suitable for development work
75 using the host.
76 The image includes headers and libraries you can use in a host development
77 environment.
78 This image requires a distribution configuration that
79 enables LSB compliance (e.g. <filename>poky-lsb</filename>).
80 If you build <filename>core-image-lsb-dev</filename> without that
81 configuration, the image will not be LSB-compliant.
82 </para></listitem>
83 <listitem><para><filename>core-image-lsb-sdk</filename>:
84 A <filename>core-image-lsb</filename> that includes everything in
85 the cross-toolchain but also includes development headers and libraries
86 to form a complete standalone SDK.
87 This image requires a distribution configuration that
88 enables LSB compliance (e.g. <filename>poky-lsb</filename>).
89 If you build <filename>core-image-lsb-sdk</filename> without that
90 configuration, the image will not be LSB-compliant.
91 This image is suitable for development using the target.</para></listitem>
92 <listitem><para><filename>core-image-minimal</filename>:
93 A small image just capable of allowing a device to boot.</para></listitem>
94 <listitem><para><filename>core-image-minimal-dev</filename>:
95 A <filename>core-image-minimal</filename> image suitable for development work
96 using the host.
97 The image includes headers and libraries you can use in a host development
98 environment.
99 </para></listitem>
100 <listitem><para id='images-core-image-minimal-initramfs'><filename>core-image-minimal-initramfs</filename>:
101 A <filename>core-image-minimal</filename> image that has the Minimal RAM-based
102 Initial Root Filesystem (initramfs) as part of the kernel,
103 which allows the system to find the first "init" program more efficiently.
104 See the
105 <link linkend='var-PACKAGE_INSTALL'><filename>PACKAGE_INSTALL</filename></link>
106 variable for additional information helpful when working with
107 initramfs images.
108 </para></listitem>
109 <listitem><para><filename>core-image-minimal-mtdutils</filename>:
110 A <filename>core-image-minimal</filename> image that has support
111 for the Minimal MTD Utilities, which let the user interact with the
112 MTD subsystem in the kernel to perform operations on flash devices.
113 </para></listitem>
114 <listitem><para><filename>core-image-rt</filename>:
115 A <filename>core-image-minimal</filename> image plus a real-time test suite and
116 tools appropriate for real-time use.</para></listitem>
117 <listitem><para><filename>core-image-rt-sdk</filename>:
118 A <filename>core-image-rt</filename> image that includes everything in
119 the cross-toolchain.
120 The image also includes development headers and libraries to form a complete
121 stand-alone SDK and is suitable for development using the target.
122 </para></listitem>
123 <listitem><para><filename>core-image-sato</filename>:
124 An image with Sato support, a mobile environment and visual style that works well
125 with mobile devices.
126 The image supports X11 with a Sato theme and applications such as
127 a terminal, editor, file manager, media player, and so forth.
128 </para></listitem>
129 <listitem><para><filename>core-image-sato-dev</filename>:
130 A <filename>core-image-sato</filename> image suitable for development
131 using the host.
132 The image includes libraries needed to build applications on the device itself,
133 testing and profiling tools, and debug symbols.
134 This image was formerly <filename>core-image-sdk</filename>.
135 </para></listitem>
136 <listitem><para><filename>core-image-sato-sdk</filename>:
137 A <filename>core-image-sato</filename> image that includes everything in
138 the cross-toolchain.
139 The image also includes development headers and libraries to form a complete standalone SDK
140 and is suitable for development using the target.</para></listitem>
141 <listitem><para><filename>core-image-testmaster</filename>:
142 A "master" image designed to be used for automated runtime testing.
143 Provides a "known good" image that is deployed to a separate
144 partition so that you can boot into it and use it to deploy a
145 second image to be tested.
146 You can find more information about runtime testing in the
147 "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
148 section in the Yocto Project Development Tasks Manual.
149 </para></listitem>
150 <listitem><para><filename>core-image-testmaster-initramfs</filename>:
151 A RAM-based Initial Root Filesystem (initramfs) image tailored for
152 use with the <filename>core-image-testmaster</filename> image.
153 </para></listitem>
154 <listitem><para><filename>core-image-weston</filename>:
155 A very basic Wayland image with a terminal.
156 This image provides the Wayland protocol libraries and the
157 reference Weston compositor.
158 For more information, see the
159 "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-using-wayland-and-weston'>Using Wayland and Weston</ulink>"
160 section in the Yocto Project Development Tasks Manual.
161 </para></listitem>
162 <listitem><para><filename>core-image-x11</filename>:
163 A very basic X11 image with a terminal.
164 </para></listitem>
165 </itemizedlist>
166 </para>
167</chapter>
168<!--
169vim: expandtab tw=80 ts=4
170-->
diff --git a/documentation/ref-manual/ref-kickstart.xml b/documentation/ref-manual/ref-kickstart.xml
deleted file mode 100644
index 45db1c0ff8..0000000000
--- a/documentation/ref-manual/ref-kickstart.xml
+++ /dev/null
@@ -1,335 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='ref-kickstart'>
7<title>OpenEmbedded Kickstart (<filename>.wks</filename>) Reference</title>
8
9 <section id='openembedded-kickstart-wks-reference'>
10 <title>Introduction</title>
11
12 <para>
13 The current Wic implementation supports only the basic kickstart
14 partitioning commands:
15 <filename>partition</filename> (or <filename>part</filename>
16 for short) and <filename>bootloader</filename>.
17 <note>
18 Future updates will implement more commands and options.
19 If you use anything that is not specifically supported, results
20 can be unpredictable.
21 </note>
22 </para>
23
24 <para>
25 This chapter provides a reference on the available kickstart
26 commands.
27 The information lists the commands, their syntax, and meanings.
28 Kickstart commands are based on the Fedora kickstart versions but
29 with modifications to reflect Wic capabilities.
30 You can see the original documentation for those commands at the
31 following link:
32 <literallayout class='monospaced'>
33 <ulink url='http://pykickstart.readthedocs.io/en/latest/kickstart-docs.html'>http://pykickstart.readthedocs.io/en/latest/kickstart-docs.html</ulink>
34 </literallayout>
35 </para>
36 </section>
37
38 <section id='command-part-or-partition'>
39 <title>Command: part or partition</title>
40
41 <para>
42 Either of these commands creates a partition on the system and uses
43 the following syntax:
44 <literallayout class='monospaced'>
45 part [<replaceable>mntpoint</replaceable>]
46 partition [<replaceable>mntpoint</replaceable>]
47 </literallayout>
48 If you do not provide <replaceable>mntpoint</replaceable>, Wic
49 creates a partition but does not mount it.
50 </para>
51
52 <para>
53 The <filename><replaceable>mntpoint</replaceable></filename> is
54 where the partition is mounted and must be in one of the
55 following forms:
56 <itemizedlist>
57 <listitem><para>
58 <filename>/<replaceable>path</replaceable></filename>:
59 For example, "/", "/usr", or "/home"
60 </para></listitem>
61 <listitem><para>
62 <filename>swap</filename>:
63 The created partition is used as swap space
64 </para></listitem>
65 </itemizedlist>
66 </para>
67
68 <para>
69 Specifying a <replaceable>mntpoint</replaceable> causes the
70 partition to automatically be mounted.
71 Wic achieves this by adding entries to the filesystem table (fstab)
72 during image generation.
73 In order for Wic to generate a valid fstab, you must also provide
74 one of the <filename>--ondrive</filename>,
75 <filename>--ondisk</filename>, or
76 <filename>--use-uuid</filename> partition options as part of the
77 command.
78 <note>
79 The mount program must understand the PARTUUID syntax you use
80 with <filename>--use-uuid</filename> and non-root
81 <replaceable>mountpoint</replaceable>, including swap.
82 The busybox versions of these application are currently
83 excluded.
84 </note>
85 Here is an example that uses "/" as the
86 <replaceable>mountpoint</replaceable>.
87 The command uses <filename>--ondisk</filename> to force the
88 partition onto the
89 <filename>sdb</filename> disk:
90 <literallayout class='monospaced'>
91 part / --source rootfs --ondisk sdb --fstype=ext3 --label platform --align 1024
92 </literallayout>
93 </para>
94
95 <para>
96 Here is a list that describes other supported options you can use
97 with the <filename>part</filename> and
98 <filename>partition</filename> commands:
99 <itemizedlist>
100 <listitem><para>
101 <emphasis><filename>--size</filename>:</emphasis>
102 The minimum partition size in MBytes.
103 Specify an integer value such as 500.
104 Do not append the number with "MB".
105 You do not need this option if you use
106 <filename>--source</filename>.
107 </para></listitem>
108 <listitem><para>
109 <emphasis><filename>--fixed-size</filename>:</emphasis>
110 The exact partition size in MBytes.
111 You cannot specify with <filename>--size</filename>.
112 An error occurs when assembling the disk image if the
113 partition data is larger than
114 <filename>--fixed-size</filename>.
115 </para></listitem>
116 <listitem><para>
117 <emphasis><filename>--source</filename>:</emphasis>
118 This option is a Wic-specific option that names the source
119 of the data that populates the partition.
120 The most common value for this option is "rootfs", but you
121 can use any value that maps to a valid source plugin.
122 For information on the source plugins, see the
123 "<ulink url='&YOCTO_DOCS_DEV_URL;#wic-using-the-wic-plugin-interface'>Using the Wic Plugins Interface</ulink>"
124 section in the Yocto Project Development Tasks Manual.
125 </para>
126
127 <para>If you use <filename>--source rootfs</filename>, Wic
128 creates a partition as large as needed and fills it with
129 the contents of the root filesystem pointed to by the
130 <filename>-r</filename> command-line option or the
131 equivalent rootfs derived from the <filename>-e</filename>
132 command-line option.
133 The filesystem type used to create the partition is driven
134 by the value of the <filename>--fstype</filename> option
135 specified for the partition.
136 See the entry on <filename>--fstype</filename> that follows
137 for more information.</para>
138
139 <para>If you use
140 <filename>--source <replaceable>plugin-name</replaceable></filename>,
141 Wic creates a partition as large as needed and fills it
142 with the contents of the partition that is generated by the
143 specified plugin name using the data pointed to by the
144 <filename>-r</filename> command-line option or the
145 equivalent rootfs derived from the <filename>-e</filename>
146 command-line option.
147 Exactly what those contents are and filesystem type used are
148 dependent on the given plugin implementation.
149 </para>
150
151 <para>If you do not use the <filename>--source</filename>
152 option, the <filename>wic</filename> command creates an
153 empty partition.
154 Consequently, you must use the <filename>--size</filename>
155 option to specify the size of the empty partition.
156 </para></listitem>
157 <listitem><para>
158 <emphasis><filename>--ondisk</filename> or <filename>--ondrive</filename>:</emphasis>
159 Forces the partition to be created on a particular disk.
160 </para></listitem>
161 <listitem><para>
162 <emphasis><filename>--fstype</filename>:</emphasis>
163 Sets the file system type for the partition.
164 Valid values are:
165 <itemizedlist>
166 <listitem><para>
167 <filename>ext4</filename>
168 </para></listitem>
169 <listitem><para>
170 <filename>ext3</filename>
171 </para></listitem>
172 <listitem><para>
173 <filename>ext2</filename>
174 </para></listitem>
175 <listitem><para>
176 <filename>btrfs</filename>
177 </para></listitem>
178 <listitem><para>
179 <filename>squashfs</filename>
180 </para></listitem>
181 <listitem><para>
182 <filename>swap</filename>
183 </para></listitem>
184 </itemizedlist>
185 </para></listitem>
186 <listitem><para>
187 <emphasis><filename>--fsoptions</filename>:</emphasis>
188 Specifies a free-form string of options to be used when
189 mounting the filesystem.
190 This string is copied into the
191 <filename>/etc/fstab</filename> file of the installed
192 system and should be enclosed in quotes.
193 If not specified, the default string is "defaults".
194 </para></listitem>
195 <listitem><para>
196 <emphasis><filename>--label label</filename>:</emphasis>
197 Specifies the label to give to the filesystem to be made on
198 the partition.
199 If the given label is already in use by another filesystem,
200 a new label is created for the partition.
201 </para></listitem>
202 <listitem><para>
203 <emphasis><filename>--active</filename>:</emphasis>
204 Marks the partition as active.
205 </para></listitem>
206 <listitem><para>
207 <emphasis><filename>--align (in KBytes)</filename>:</emphasis>
208 This option is a Wic-specific option that says to start
209 partitions on boundaries given
210 <replaceable>x</replaceable> KBytes.
211 </para></listitem>
212 <listitem><para>
213 <emphasis><filename>--no-table</filename>:</emphasis>
214 This option is a Wic-specific option.
215 Using the option reserves space for the partition and
216 causes it to become populated.
217 However, the partition is not added to the partition table.
218 </para></listitem>
219 <listitem><para>
220 <emphasis><filename>--exclude-path</filename>:</emphasis>
221 This option is a Wic-specific option that excludes the given
222 relative path from the resulting image.
223 This option is only effective with the rootfs source
224 plugin.
225 </para></listitem>
226 <listitem><para>
227 <emphasis><filename>--extra-space</filename>:</emphasis>
228 This option is a Wic-specific option that adds extra space
229 after the space filled by the content of the partition.
230 The final size can exceed the size specified by the
231 <filename>--size</filename> option.
232 The default value is 10 Mbytes.
233 </para></listitem>
234 <listitem><para>
235 <emphasis><filename>--overhead-factor</filename>:</emphasis>
236 This option is a Wic-specific option that multiplies the
237 size of the partition by the option's value.
238 You must supply a value greater than or equal to "1".
239 The default value is "1.3".
240 </para></listitem>
241 <listitem><para>
242 <emphasis><filename>--part-name</filename>:</emphasis>
243 This option is a Wic-specific option that specifies a name
244 for GPT partitions.
245 </para></listitem>
246 <listitem><para>
247 <emphasis><filename>--part-type</filename>:</emphasis>
248 This option is a Wic-specific option that specifies the
249 partition type globally unique identifier (GUID) for GPT
250 partitions.
251 You can find the list of partition type GUIDs at
252 <ulink url='http://en.wikipedia.org/wiki/GUID_Partition_Table#Partition_type_GUIDs'></ulink>.
253 </para></listitem>
254 <listitem><para>
255 <emphasis><filename>--use-uuid</filename>:</emphasis>
256 This option is a Wic-specific option that causes Wic to
257 generate a random GUID for the partition.
258 The generated identifier is used in the bootloader
259 configuration to specify the root partition.
260 </para></listitem>
261 <listitem><para>
262 <emphasis><filename>--uuid</filename>:</emphasis>
263 This option is a Wic-specific option that specifies the
264 partition UUID.
265 </para></listitem>
266 <listitem><para>
267 <emphasis><filename>--fsuuid</filename>:</emphasis>
268 This option is a Wic-specific option that specifies the
269 filesystem UUID.
270 You can generate or modify
271 <link linkend='var-WKS_FILE'><filename>WKS_FILE</filename></link>
272 with this option if a preconfigured filesystem UUID is
273 added to the kernel command line in the bootloader
274 configuration before you run Wic.
275 </para></listitem>
276 <listitem><para>
277 <emphasis><filename>--system-id</filename>:</emphasis>
278 This option is a Wic-specific option that specifies the
279 partition system ID, which is a one byte long, hexadecimal
280 parameter with or without the 0x prefix.
281 </para></listitem>
282 <listitem><para>
283 <emphasis><filename>--mkfs-extraopts</filename>:</emphasis>
284 This option specifies additional options to pass to the
285 <filename>mkfs</filename> utility.
286 Some default options for certain filesystems do not take
287 effect.
288 See Wic's help on kickstart
289 (i.e. <filename>wic help kickstart</filename>).
290 </para></listitem>
291 </itemizedlist>
292 </para>
293 </section>
294
295 <section id='command-bootloader'>
296 <title>Command: bootloader</title>
297
298 <para>
299 This command specifies how the bootloader should be configured and
300 supports the following options:
301 <note>
302 Bootloader functionality and boot partitions are implemented by
303 the various <filename>--source</filename> plugins that
304 implement bootloader functionality.
305 The bootloader command essentially provides a means of
306 modifying bootloader configuration.
307 </note>
308 <itemizedlist>
309 <listitem><para>
310 <emphasis><filename>--timeout</filename>:</emphasis>
311 Specifies the number of seconds before the bootloader times
312 out and boots the default option.
313 </para></listitem>
314 <listitem><para>
315 <emphasis><filename>--append</filename>:</emphasis>
316 Specifies kernel parameters.
317 These parameters will be added to the syslinux
318 <filename>APPEND</filename> or <filename>grub</filename>
319 kernel command line.
320 </para></listitem>
321 <listitem><para>
322 <emphasis><filename>--configfile</filename>:</emphasis>
323 Specifies a user-defined configuration file for the
324 bootloader.
325 You can provide a full pathname for the file or a file that
326 exists in the <filename>canned-wks</filename> folder.
327 This option overrides all other bootloader options.
328 </para></listitem>
329 </itemizedlist>
330 </para>
331 </section>
332</chapter>
333<!--
334vim: expandtab tw=80 ts=4
335-->
diff --git a/documentation/ref-manual/ref-manual-customization.xsl b/documentation/ref-manual/ref-manual-customization.xsl
deleted file mode 100644
index 3181f618e2..0000000000
--- a/documentation/ref-manual/ref-manual-customization.xsl
+++ /dev/null
@@ -1,31 +0,0 @@
1<?xml version='1.0'?>
2<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
3
4<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
5
6 <xsl:import href="http://downloads.yoctoproject.org/mirror/docbook-mirror/docbook-xsl-1.76.1/xhtml/docbook.xsl" />
7
8<!--
9
10 <xsl:import href="../template/1.76.1/docbook-xsl-1.76.1/xhtml/docbook.xsl" />
11
12 <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.76.1/xhtml/docbook.xsl" />
13
14-->
15
16 <xsl:include href="../template/permalinks.xsl"/>
17 <xsl:include href="../template/section.title.xsl"/>
18 <xsl:include href="../template/component.title.xsl"/>
19 <xsl:include href="../template/division.title.xsl"/>
20 <xsl:include href="../template/formal.object.heading.xsl"/>
21 <xsl:include href="../template/gloss-permalinks.xsl"/>
22 <xsl:include href="../template/qa-code-permalinks.xsl"/>
23
24 <xsl:param name="html.stylesheet" select="'ref-style.css'" />
25 <xsl:param name="chapter.autolabel" select="1" />
26 <xsl:param name="appendix.autolabel" select="A" />
27 <xsl:param name="section.autolabel" select="1" />
28 <xsl:param name="section.label.includes.component.label" select="1" />
29 <xsl:param name="generate.id.attributes" select="1" />
30
31</xsl:stylesheet>
diff --git a/documentation/ref-manual/ref-manual.xml b/documentation/ref-manual/ref-manual.xml
deleted file mode 100755
index 9a914f19cf..0000000000
--- a/documentation/ref-manual/ref-manual.xml
+++ /dev/null
@@ -1,232 +0,0 @@
1<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4
5<book id='ref-manual' lang='en'
6 xmlns:xi="http://www.w3.org/2003/XInclude"
7 xmlns="http://docbook.org/ns/docbook"
8 >
9 <bookinfo>
10
11 <mediaobject>
12 <imageobject>
13 <imagedata fileref='figures/poky-title.png'
14 format='SVG'
15 align='left' scalefit='1' width='100%'/>
16 </imageobject>
17 </mediaobject>
18
19 <title>
20 Yocto Project Reference Manual
21 </title>
22
23 <authorgroup>
24 <author>
25 <affiliation>
26 <orgname>&ORGNAME;</orgname>
27 </affiliation>
28 <email>&ORGEMAIL;</email>
29 </author>
30
31 </authorgroup>
32
33 <revhistory>
34 <revision>
35 <revnumber>4.0+git</revnumber>
36 <date>November 2010</date>
37 <revremark>The initial document released with the Yocto Project 0.9 Release</revremark>
38 </revision>
39 <revision>
40 <revnumber>1.0</revnumber>
41 <date>April 2011</date>
42 <revremark>Released with the Yocto Project 1.0 Release.</revremark>
43 </revision>
44 <revision>
45 <revnumber>1.1</revnumber>
46 <date>October 2011</date>
47 <revremark>Released with the Yocto Project 1.1 Release.</revremark>
48 </revision>
49 <revision>
50 <revnumber>1.2</revnumber>
51 <date>April 2012</date>
52 <revremark>Released with the Yocto Project 1.2 Release.</revremark>
53 </revision>
54 <revision>
55 <revnumber>1.3</revnumber>
56 <date>October 2012</date>
57 <revremark>Released with the Yocto Project 1.3 Release.</revremark>
58 </revision>
59 <revision>
60 <revnumber>1.4</revnumber>
61 <date>April 2013</date>
62 <revremark>Released with the Yocto Project 1.4 Release.</revremark>
63 </revision>
64 <revision>
65 <revnumber>1.5</revnumber>
66 <date>October 2013</date>
67 <revremark>Released with the Yocto Project 1.5 Release.</revremark>
68 </revision>
69 <revision>
70 <revnumber>1.6</revnumber>
71 <date>April 2014</date>
72 <revremark>Released with the Yocto Project 1.6 Release.</revremark>
73 </revision>
74 <revision>
75 <revnumber>1.7</revnumber>
76 <date>October 2014</date>
77 <revremark>Released with the Yocto Project 1.7 Release.</revremark>
78 </revision>
79 <revision>
80 <revnumber>1.8</revnumber>
81 <date>April 2015</date>
82 <revremark>Released with the Yocto Project 1.8 Release.</revremark>
83 </revision>
84 <revision>
85 <revnumber>2.0</revnumber>
86 <date>October 2015</date>
87 <revremark>Released with the Yocto Project 2.0 Release.</revremark>
88 </revision>
89 <revision>
90 <revnumber>2.1</revnumber>
91 <date>April 2016</date>
92 <revremark>Released with the Yocto Project 2.1 Release.</revremark>
93 </revision>
94 <revision>
95 <revnumber>2.2</revnumber>
96 <date>October 2016</date>
97 <revremark>Released with the Yocto Project 2.2 Release.</revremark>
98 </revision>
99 <revision>
100 <revnumber>2.3</revnumber>
101 <date>May 2017</date>
102 <revremark>Released with the Yocto Project 2.3 Release.</revremark>
103 </revision>
104 <revision>
105 <revnumber>2.4</revnumber>
106 <date>October 2017</date>
107 <revremark>Released with the Yocto Project 2.4 Release.</revremark>
108 </revision>
109 <revision>
110 <revnumber>2.5</revnumber>
111 <date>May 2018</date>
112 <revremark>Released with the Yocto Project 2.5 Release.</revremark>
113 </revision>
114 <revision>
115 <revnumber>2.6</revnumber>
116 <date>November 2018</date>
117 <revremark>Released with the Yocto Project 2.6 Release.</revremark>
118 </revision>
119 <revision>
120 <revnumber>2.7</revnumber>
121 <date>May 2019</date>
122 <revremark>Released with the Yocto Project 2.7 Release.</revremark>
123 </revision>
124 <revision>
125 <revnumber>3.0</revnumber>
126 <date>October 2019</date>
127 <revremark>Released with the Yocto Project 3.0 Release.</revremark>
128 </revision>
129 <revision>
130 <revnumber>3.1</revnumber>
131 <date>&REL_MONTH_YEAR;</date>
132 <revremark>Released with the Yocto Project 3.1 Release.</revremark>
133 </revision>
134 </revhistory>
135
136 <copyright>
137 <year>&COPYRIGHT_YEAR;</year>
138 <holder>Linux Foundation</holder>
139 </copyright>
140
141 <legalnotice>
142 <para>
143 Permission is granted to copy, distribute and/or modify this document under
144 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 &amp; Wales</ulink> as published by Creative Commons.
145 </para>
146 <note><title>Manual Notes</title>
147 <itemizedlist>
148 <listitem><para>
149 This version of the
150 <emphasis>Yocto Project Reference Manual</emphasis>
151 is for the &YOCTO_DOC_VERSION; release of the
152 Yocto Project.
153 To be sure you have the latest version of the manual
154 for this release, go to the
155 <ulink url='&YOCTO_DOCS_URL;'>Yocto Project documentation page</ulink>
156 and select the manual from that site.
157 Manuals from the site are more up-to-date than manuals
158 derived from the Yocto Project released TAR files.
159 </para></listitem>
160 <listitem><para>
161 If you located this manual through a web search, the
162 version of the manual might not be the one you want
163 (e.g. the search might have returned a manual much
164 older than the Yocto Project version with which you
165 are working).
166 You can see all Yocto Project major releases by
167 visiting the
168 <ulink url='&YOCTO_WIKI_URL;/wiki/Releases'>Releases</ulink>
169 page.
170 If you need a version of this manual for a different
171 Yocto Project release, visit the
172 <ulink url='&YOCTO_DOCS_URL;'>Yocto Project documentation page</ulink>
173 and select the manual set by using the
174 "ACTIVE RELEASES DOCUMENTATION" or "DOCUMENTS ARCHIVE"
175 pull-down menus.
176 </para></listitem>
177 <listitem>
178 <para>
179 To report any inaccuracies or problems with this
180 (or any other Yocto Project) manual, send an email to
181 the Yocto Project documentation mailing list at
182 <filename>docs@lists.yoctoproject.org</filename> or
183 log into the freenode <filename>#yocto</filename> channel.
184 </para>
185 </listitem>
186 </itemizedlist>
187 </note>
188 </legalnotice>
189
190 </bookinfo>
191
192 <xi:include href="ref-system-requirements.xml"/>
193
194 <xi:include href="ref-terms.xml"/>
195
196 <xi:include href="ref-release-process.xml"/>
197
198 <xi:include href="migration.xml"/>
199
200 <xi:include href="ref-structure.xml"/>
201
202 <xi:include href="ref-classes.xml"/>
203
204 <xi:include href="ref-tasks.xml"/>
205
206 <xi:include href="ref-devtool-reference.xml"/>
207
208 <xi:include href="ref-kickstart.xml"/>
209
210 <xi:include href="ref-qa-checks.xml"/>
211
212 <xi:include href="ref-images.xml"/>
213
214 <xi:include href="ref-features.xml"/>
215
216 <xi:include href="ref-variables.xml"/>
217
218 <xi:include href="ref-varlocality.xml"/>
219
220 <xi:include href="faq.xml"/>
221
222 <xi:include href="resources.xml"/>
223
224<!-- <index id='index'>
225 <title>Index</title>
226 </index>
227-->
228
229</book>
230<!--
231vim: expandtab tw=80 ts=4
232-->
diff --git a/documentation/ref-manual/ref-qa-checks.xml b/documentation/ref-manual/ref-qa-checks.xml
deleted file mode 100644
index 0071e4a55d..0000000000
--- a/documentation/ref-manual/ref-qa-checks.xml
+++ /dev/null
@@ -1,1225 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='ref-qa-checks'>
7<title>QA Error and Warning Messages</title>
8
9<section id='qa-introduction'>
10 <title>Introduction</title>
11
12 <para>
13 When building a recipe, the OpenEmbedded build system performs
14 various QA checks on the output to ensure that common issues are
15 detected and reported.
16 Sometimes when you create a new recipe to build new software,
17 it will build with no problems.
18 When this is not the case, or when you have QA issues building any
19 software, it could take a little time to resolve them.
20 </para>
21
22 <para>
23 While it is tempting to ignore a QA message or even to
24 disable QA checks, it is best to try and resolve any
25 reported QA issues.
26 This chapter provides a list of the QA messages and brief explanations
27 of the issues you could encounter so that you can properly resolve
28 problems.
29 </para>
30
31 <para>
32 The next section provides a list of all QA error and warning
33 messages based on a default configuration.
34 Each entry provides the message or error form along with an
35 explanation.
36 <note>
37 <title>Notes</title>
38 <itemizedlist>
39 <listitem><para>
40 At the end of each message, the name of the associated
41 QA test (as listed in the
42 "<link linkend='ref-classes-insane'><filename>insane.bbclass</filename></link>"
43 section) appears within square brackets.
44 </para></listitem>
45 <listitem><para>
46 As mentioned, this list of error and warning messages is for
47 QA checks only.
48 The list does not cover all possible build errors or
49 warnings you could encounter.
50 </para></listitem>
51 <listitem><para>
52 Because some QA checks are disabled by default, this list
53 does not include all possible QA check errors and warnings.
54 </para></listitem>
55 </itemizedlist>
56 </note>
57 </para>
58</section>
59
60<section id='qa-errors-and-warnings'>
61 <title>Errors and Warnings</title>
62
63<!--
64This section uses the <para><code> construct to enable permalinks for the
65various QA issue and warning messages. The file templates/qa-code-permalinks.xsl
66is used to locate the construct and generate the permalink. This solution
67leverages the fact that right now this section in the ref-manual is the only
68place is all the YP docs that uses the <para><code> construct. If, in the
69future, that construct were to appear in the ref-manual, a generic permalink
70would be generated for the text between <code></code>. If a better solution
71can be found then it should be implemented. I can't find one at the moment.
72-->
73
74 <para>
75 <itemizedlist>
76 <listitem>
77 <para id='qa-issue-libexec'>
78 <code>
79 &lt;packagename&gt;: &lt;path&gt; is using libexec please relocate to &lt;libexecdir&gt; [libexec]
80 </code>
81 </para>
82
83 <para>
84 The specified package contains files in
85 <filename>/usr/libexec</filename> when the distro
86 configuration uses a different path for
87 <filename>&lt;libexecdir&gt;</filename>
88 By default, <filename>&lt;libexecdir&gt;</filename> is
89 <filename>$prefix/libexec</filename>.
90 However, this default can be changed (e.g.
91 <filename>${libdir}</filename>).
92 </para>
93
94 <para>
95 &nbsp;
96 </para>
97 </listitem>
98 </itemizedlist>
99 </para>
100
101 <para>
102 <itemizedlist>
103 <listitem>
104 <para id='qa-issue-rpaths'>
105 <code>
106 package &lt;packagename&gt; contains bad RPATH &lt;rpath&gt; in file &lt;file&gt; [rpaths]
107 </code>
108 </para>
109
110 <para>
111 The specified binary produced by the recipe contains dynamic
112 library load paths (rpaths) that contain build system paths
113 such as
114 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>,
115 which are incorrect for the target and could potentially
116 be a security issue.
117 Check for bad <filename>-rpath</filename> options being
118 passed to the linker in your
119 <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>
120 log.
121 Depending on the build system used by the software being
122 built, there might be a configure option to disable rpath
123 usage completely within the build of the software.
124 </para>
125
126 <para>
127 &nbsp;
128 </para>
129 </listitem>
130 </itemizedlist>
131 </para>
132
133 <para>
134 <itemizedlist>
135 <listitem>
136 <para id='qa-issue-useless-rpaths'>
137 <code>
138 &lt;packagename&gt;: &lt;file&gt; contains probably-redundant RPATH &lt;rpath&gt; [useless-rpaths]
139 </code>
140 </para>
141
142 <para>
143 The specified binary produced by the recipe contains dynamic
144 library load paths (rpaths) that on a standard system are
145 searched by default by the linker (e.g.
146 <filename>/lib</filename> and <filename>/usr/lib</filename>).
147 While these paths will not cause any breakage, they do waste
148 space and are unnecessary.
149 Depending on the build system used by the software being
150 built, there might be a configure option to disable rpath
151 usage completely within the build of the software.
152 </para>
153
154 <para>
155 &nbsp;
156 </para>
157 </listitem>
158 </itemizedlist>
159 </para>
160
161 <para>
162 <itemizedlist>
163 <listitem>
164 <para id='qa-issue-file-rdeps'>
165 <code>
166 &lt;packagename&gt; requires &lt;files&gt;, but no providers in its RDEPENDS [file-rdeps]
167 </code>
168 </para>
169
170 <para>
171 A file-level dependency has been identified from the
172 specified package on the specified files, but there is
173 no explicit corresponding entry in
174 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>.
175 If particular files are required at runtime then
176 <filename>RDEPENDS</filename> should be declared in the
177 recipe to ensure the packages providing them are built.
178 </para>
179
180 <para>
181 &nbsp;
182 </para>
183 </listitem>
184 </itemizedlist>
185 </para>
186
187 <para>
188 <itemizedlist>
189 <listitem>
190 <para id='qa-issue-build-deps'>
191 <code>
192 &lt;packagename1&gt; rdepends on &lt;packagename2&gt;, but it isn't a build dependency? [build-deps]
193 </code>
194 </para>
195
196 <para>
197 A runtime dependency exists between the two specified
198 packages, but there is nothing explicit within the recipe
199 to enable the OpenEmbedded build system to ensure that
200 dependency is satisfied.
201 This condition is usually triggered by an
202 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>
203 value being added at the packaging stage rather than up
204 front, which is usually automatic based on the contents of
205 the package.
206 In most cases, you should change the recipe to add an
207 explicit <filename>RDEPENDS</filename> for the dependency.
208 </para>
209
210 <para>
211 &nbsp;
212 </para>
213 </listitem>
214 </itemizedlist>
215 </para>
216
217 <para>
218 <itemizedlist>
219 <listitem>
220 <para id='qa-issue-dev-so'>
221 <code>
222 non -dev/-dbg/nativesdk- package contains symlink .so: &lt;packagename&gt; path '&lt;path&gt;' [dev-so]
223 </code>
224 </para>
225
226 <para>
227 Symlink <filename>.so</filename> files are for development
228 only, and should therefore go into the
229 <filename>-dev</filename> package.
230 This situation might occur if you add
231 <filename>*.so*</filename> rather than
232 <filename>*.so.*</filename> to a non-dev package.
233 Change
234 <link linkend='var-FILES'><filename>FILES</filename></link>
235 (and possibly
236 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>)
237 such that the specified <filename>.so</filename> file goes
238 into an appropriate <filename>-dev</filename> package.
239 </para>
240
241 <para>
242 &nbsp;
243 </para>
244 </listitem>
245 </itemizedlist>
246 </para>
247
248 <para>
249 <itemizedlist>
250 <listitem>
251 <para id='qa-issue-staticdev'>
252 <code>
253 non -staticdev package contains static .a library: &lt;packagename&gt; path '&lt;path&gt;' [staticdev]
254 </code>
255 </para>
256
257 <para>
258 Static <filename>.a</filename> library files should go into
259 a <filename>-staticdev</filename> package.
260 Change
261 <link linkend='var-FILES'><filename>FILES</filename></link>
262 (and possibly
263 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>)
264 such that the specified <filename>.a</filename> file goes
265 into an appropriate <filename>-staticdev</filename> package.
266 </para>
267
268 <para>
269 &nbsp;
270 </para>
271 </listitem>
272 </itemizedlist>
273 </para>
274
275 <para>
276 <itemizedlist>
277 <listitem>
278 <para id='qa-issue-libdir'>
279 <code>
280 &lt;packagename&gt;: found library in wrong location [libdir]
281 </code>
282 </para>
283
284 <para>
285 The specified file may have been installed into an incorrect
286 (possibly hardcoded) installation path.
287 For example, this test will catch recipes that install
288 <filename>/lib/bar.so</filename> when
289 <filename>${base_libdir}</filename> is "lib32".
290 Another example is when recipes install
291 <filename>/usr/lib64/foo.so</filename> when
292 <filename>${libdir}</filename> is "/usr/lib".
293 False positives occasionally exist.
294 For these cases add "libdir" to
295 <link linkend='var-INSANE_SKIP'><filename>INSANE_SKIP</filename></link>
296 for the package.
297 </para>
298
299 <para>
300 &nbsp;
301 </para>
302 </listitem>
303 </itemizedlist>
304 </para>
305
306 <para>
307 <itemizedlist>
308 <listitem>
309 <para id='qa-issue-debug-files'>
310 <code>
311 non debug package contains .debug directory: &lt;packagename&gt; path &lt;path&gt; [debug-files]
312 </code>
313 </para>
314
315 <para>
316 The specified package contains a
317 <filename>.debug</filename> directory, which should not
318 appear in anything but the <filename>-dbg</filename>
319 package.
320 This situation might occur if you add a path which contains
321 a <filename>.debug</filename> directory and do not
322 explicitly add the <filename>.debug</filename> directory
323 to the <filename>-dbg</filename> package.
324 If this is the case, add the <filename>.debug</filename>
325 directory explicitly to
326 <filename>FILES_${PN}-dbg</filename>.
327 See
328 <link linkend='var-FILES'><filename>FILES</filename></link>
329 for additional information on <filename>FILES</filename>.
330 </para>
331
332 <para>
333 &nbsp;
334 </para>
335 </listitem>
336 </itemizedlist>
337 </para>
338
339 <para>
340 <itemizedlist>
341 <listitem>
342 <para id='qa-issue-arch'>
343 <code>
344 Architecture did not match (&lt;machine_arch&gt; to &lt;file_arch&gt;) on &lt;file&gt; [arch]
345 </code>
346 </para>
347
348 <para>
349 By default, the OpenEmbedded build system checks the
350 Executable and Linkable Format (ELF) type, bit size, and
351 endianness of any binaries to ensure they match the
352 target architecture.
353 This test fails if any binaries do not match the type since
354 there would be an incompatibility.
355 The test could indicate that the wrong compiler or compiler
356 options have been used.
357 Sometimes software, like bootloaders, might need to
358 bypass this check.
359 If the file you receive the error for is firmware
360 that is not intended to be executed within the target
361 operating system or is intended to run on a separate
362 processor within the device, you can add "arch" to
363 <link linkend='var-INSANE_SKIP'><filename>INSANE_SKIP</filename></link>
364 for the package.
365 Another option is to check the
366 <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>
367 log and verify that the compiler options being used
368 are correct.
369 </para>
370
371 <para>
372 &nbsp;
373 </para>
374 </listitem>
375 </itemizedlist>
376 </para>
377
378 <para>
379 <itemizedlist>
380 <listitem>
381 <para id='qa-issue-arch-bit-size-no-match'>
382 <code>
383 Bit size did not match (&lt;machine_bits&gt; to &lt;file_bits&gt;) &lt;recipe&gt; on &lt;file&gt; [arch]
384 </code>
385 </para>
386
387 <para>
388 By default, the OpenEmbedded build system checks
389 the Executable and Linkable Format (ELF) type,
390 bit size, and endianness of any binaries to ensure
391 they match the target architecture.
392 This test fails if any binaries do not match the type since
393 there would be an incompatibility.
394 The test could indicate that the wrong compiler or compiler
395 options have been used.
396 Sometimes software, like bootloaders, might need to
397 bypass this check.
398 If the file you receive the error for is firmware that
399 is not intended to be executed within the target
400 operating system or is intended to run on a separate
401 processor within the device, you can add "arch" to
402 <link linkend='var-INSANE_SKIP'><filename>INSANE_SKIP</filename></link>
403 for the package.
404 Another option is to check the
405 <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>
406 log and verify that the compiler options being used are
407 correct.
408 </para>
409
410 <para>
411 &nbsp;
412 </para>
413 </listitem>
414 </itemizedlist>
415 </para>
416
417 <para>
418 <itemizedlist>
419 <listitem>
420 <para id='qa-issue-arch-endianness-no-match'>
421 <code>
422 Endianness did not match (&lt;machine_endianness&gt; to &lt;file_endianness&gt;) on &lt;file&gt; [arch]
423 </code>
424 </para>
425
426 <para>
427 By default, the OpenEmbedded build system checks
428 the Executable and Linkable Format (ELF) type, bit
429 size, and endianness of any binaries to ensure they
430 match the target architecture.
431 This test fails if any binaries do not match the type since
432 there would be an incompatibility.
433 The test could indicate that the wrong compiler or compiler
434 options have been used.
435 Sometimes software, like bootloaders, might need to
436 bypass this check.
437 If the file you receive the error for is firmware
438 that is not intended to be executed within the target
439 operating system or is intended to run on a separate
440 processor within the device, you can add "arch" to
441 <link linkend='var-INSANE_SKIP'><filename>INSANE_SKIP</filename></link>
442 for the package.
443 Another option is to check the
444 <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>
445 log and verify that the compiler options being used
446 are correct.
447 </para>
448
449 <para>
450 &nbsp;
451 </para>
452 </listitem>
453 </itemizedlist>
454 </para>
455
456 <para>
457 <itemizedlist>
458 <listitem>
459 <para id='qa-issue-textrel'>
460 <code>
461 ELF binary '&lt;file&gt;' has relocations in .text [textrel]
462 </code>
463 </para>
464
465 <para>
466 The specified ELF binary contains relocations in its
467 <filename>.text</filename> sections.
468 This situation can result in a performance impact
469 at runtime.
470 </para>
471
472 <para>
473 Typically, the way to solve this performance issue is to
474 add "-fPIC" or "-fpic" to the compiler command-line
475 options.
476 For example, given software that reads
477 <link linkend='var-CFLAGS'><filename>CFLAGS</filename></link>
478 when you build it, you could add the following to your
479 recipe:
480 <literallayout class='monospaced'>
481 CFLAGS_append = " -fPIC "
482 </literallayout>
483 </para>
484
485 <para>
486 For more information on text relocations at runtime, see
487 <ulink url='http://www.akkadia.org/drepper/textrelocs.html'></ulink>.
488 </para>
489
490 <para>
491 &nbsp;
492 </para>
493 </listitem>
494 </itemizedlist>
495 </para>
496
497 <para>
498 <itemizedlist>
499 <listitem>
500 <para id='qa-issue-ldflags'>
501 <code>
502 No GNU_HASH in the elf binary: '&lt;file&gt;' [ldflags]
503 </code>
504 </para>
505
506 <para>
507 This indicates that binaries produced when building the
508 recipe have not been linked with the
509 <link linkend='var-LDFLAGS'><filename>LDFLAGS</filename></link>
510 options provided by the build system.
511 Check to be sure that the <filename>LDFLAGS</filename>
512 variable is being passed to the linker command.
513 A common workaround for this situation is to pass in
514 <filename>LDFLAGS</filename> using
515 <link linkend='var-TARGET_CC_ARCH'><filename>TARGET_CC_ARCH</filename></link>
516 within the recipe as follows:
517 <literallayout class='monospaced'>
518 TARGET_CC_ARCH += "${LDFLAGS}"
519 </literallayout>
520 </para>
521
522 <para>
523 &nbsp;
524 </para>
525 </listitem>
526 </itemizedlist>
527 </para>
528
529 <para>
530 <itemizedlist>
531 <listitem>
532 <para id='qa-issue-xorg-driver-abi'>
533 <code>
534 Package &lt;packagename&gt; contains Xorg driver (&lt;driver&gt;) but no xorg-abi- dependencies [xorg-driver-abi]
535 </code>
536 </para>
537
538 <para>
539 The specified package contains an Xorg driver, but does not
540 have a corresponding ABI package dependency.
541 The xserver-xorg recipe provides driver ABI names.
542 All drivers should depend on the ABI versions that they have
543 been built against.
544 Driver recipes that include
545 <filename>xorg-driver-input.inc</filename> or
546 <filename>xorg-driver-video.inc</filename> will
547 automatically get these versions.
548 Consequently, you should only need to explicitly add
549 dependencies to binary driver recipes.
550 </para>
551
552 <para>
553 &nbsp;
554 </para>
555 </listitem>
556 </itemizedlist>
557 </para>
558
559 <para>
560 <itemizedlist>
561 <listitem>
562 <para id='qa-issue-infodir'>
563 <code>
564 The /usr/share/info/dir file is not meant to be shipped in a particular package. [infodir]
565 </code>
566 </para>
567
568 <para>
569 The <filename>/usr/share/info/dir</filename> should not be
570 packaged.
571 Add the following line to your
572 <link linkend='ref-tasks-install'><filename>do_install</filename></link>
573 task or to your <filename>do_install_append</filename>
574 within the recipe as follows:
575 <literallayout class='monospaced'>
576 rm ${D}${infodir}/dir
577 </literallayout>
578 </para>
579
580 <para>
581 &nbsp;
582 </para>
583 </listitem>
584 </itemizedlist>
585 </para>
586
587 <para>
588 <itemizedlist>
589 <listitem>
590 <para id='qa-issue-symlink-to-sysroot'>
591 <code>
592 Symlink &lt;path&gt; in &lt;packagename&gt; points to TMPDIR [symlink-to-sysroot]
593 </code>
594 </para>
595
596 <para>
597 The specified symlink points into
598 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
599 on the host.
600 Such symlinks will work on the host.
601 However, they are clearly invalid when running on
602 the target.
603 You should either correct the symlink to use a relative
604 path or remove the symlink.
605 </para>
606
607 <para>
608 &nbsp;
609 </para>
610 </listitem>
611 </itemizedlist>
612 </para>
613
614 <para>
615 <itemizedlist>
616 <listitem>
617 <para id='qa-issue-la'>
618 <code>
619 &lt;file&gt; failed sanity test (workdir) in path &lt;path&gt; [la]
620 </code>
621 </para>
622
623 <para>
624 The specified <filename>.la</filename> file contains
625 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
626 paths.
627 Any <filename>.la</filename> file containing these paths
628 is incorrect since <filename>libtool</filename> adds the
629 correct sysroot prefix when using the files automatically
630 itself.
631 </para>
632
633 <para>
634 &nbsp;
635 </para>
636 </listitem>
637 </itemizedlist>
638 </para>
639
640 <para>
641 <itemizedlist>
642 <listitem>
643 <para id='qa-issue-pkgconfig'>
644 <code>
645 &lt;file&gt; failed sanity test (tmpdir) in path &lt;path&gt; [pkgconfig]
646 </code>
647 </para>
648
649 <para>
650 The specified <filename>.pc</filename> file contains
651 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link><filename>/</filename><link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>
652 paths.
653 Any <filename>.pc</filename> file containing these paths is
654 incorrect since <filename>pkg-config</filename> itself adds
655 the correct sysroot prefix when the files are accessed.
656 </para>
657
658 <para>
659 &nbsp;
660 </para>
661 </listitem>
662 </itemizedlist>
663 </para>
664
665 <para>
666 <itemizedlist>
667 <listitem>
668 <para id='qa-issue-debug-deps'>
669 <code>
670 &lt;packagename&gt; rdepends on &lt;debug_packagename&gt; [debug-deps]
671 </code>
672 </para>
673
674 <para>
675 A dependency exists between the specified non-dbg package
676 (i.e. a package whose name does not end in
677 <filename>-dbg</filename>) and a package that is a
678 <filename>dbg</filename> package.
679 The <filename>dbg</filename> packages contain
680 debug symbols and are brought in using several
681 different methods:
682 <itemizedlist>
683 <listitem><para>
684 Using the <filename>dbg-pkgs</filename>
685 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>
686 value.
687 </para></listitem>
688 <listitem><para>
689 Using
690 <link linkend='var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></link>.
691 </para></listitem>
692 <listitem><para>
693 As a dependency of another
694 <filename>dbg</filename> package that was brought
695 in using one of the above methods.
696 </para></listitem>
697 </itemizedlist>
698 The dependency might have been automatically added
699 because the <filename>dbg</filename> package erroneously
700 contains files that it should not contain (e.g. a
701 non-symlink <filename>.so</filename> file) or it might
702 have been added manually (e.g. by adding to
703 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>).
704 </para>
705
706 <para>
707 &nbsp;
708 </para>
709 </listitem>
710 </itemizedlist>
711 </para>
712
713 <para>
714 <itemizedlist>
715 <listitem>
716 <para id='qa-issue-dev-deps'>
717 <code>
718 &lt;packagename&gt; rdepends on &lt;dev_packagename&gt; [dev-deps]
719 </code>
720 </para>
721
722 <para>
723 A dependency exists between the specified non-dev package
724 (a package whose name does not end in
725 <filename>-dev</filename>) and a package that is a
726 <filename>dev</filename> package.
727 The <filename>dev</filename> packages contain development
728 headers and are usually brought in using several different
729 methods:
730 <itemizedlist>
731 <listitem><para>
732 Using the <filename>dev-pkgs</filename>
733 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>
734 value.
735 </para></listitem>
736 <listitem><para>
737 Using
738 <link linkend='var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></link>.
739 </para></listitem>
740 <listitem><para>
741 As a dependency of another
742 <filename>dev</filename> package that was brought
743 in using one of the above methods.
744 </para></listitem>
745 </itemizedlist>
746 The dependency might have been automatically added (because
747 the <filename>dev</filename> package erroneously contains
748 files that it should not have (e.g. a non-symlink
749 <filename>.so</filename> file) or it might have been added
750 manually (e.g. by adding to
751 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>).
752 </para>
753
754 <para>
755 &nbsp;
756 </para>
757 </listitem>
758 </itemizedlist>
759 </para>
760
761 <para>
762 <itemizedlist>
763 <listitem>
764 <para id='qa-issue-dep-cmp'>
765 <code>
766 &lt;var&gt;_&lt;packagename&gt; is invalid: &lt;comparison&gt; (&lt;value&gt;) only comparisons &lt;, =, &gt;, &lt;=, and &gt;= are allowed [dep-cmp]
767 </code>
768 </para>
769
770 <para>
771 If you are adding a versioned dependency relationship to one
772 of the dependency variables
773 (<link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>,
774 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>,
775 <link linkend='var-RSUGGESTS'><filename>RSUGGESTS</filename></link>,
776 <link linkend='var-RPROVIDES'><filename>RPROVIDES</filename></link>,
777 <link linkend='var-RREPLACES'><filename>RREPLACES</filename></link>,
778 or
779 <link linkend='var-RCONFLICTS'><filename>RCONFLICTS</filename></link>),
780 you must only use the named comparison operators.
781 Change the versioned dependency values you are adding
782 to match those listed in the message.
783 </para>
784
785 <para>
786 &nbsp;
787 </para>
788 </listitem>
789 </itemizedlist>
790 </para>
791
792 <para>
793 <itemizedlist>
794 <listitem>
795 <para id='qa-issue-compile-host-path'>
796 <code>
797 &lt;recipename&gt;: The compile log indicates that host include and/or library paths were used. Please check the log '&lt;logfile&gt;' for more information. [compile-host-path]
798 </code>
799 </para>
800
801 <para>
802 The log for the
803 <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>
804 task indicates that paths on the host were searched
805 for files, which is not appropriate when cross-compiling.
806 Look for "is unsafe for cross-compilation" or "CROSS COMPILE
807 Badness" in the specified log file.
808 </para>
809
810 <para>
811 &nbsp;
812 </para>
813 </listitem>
814 </itemizedlist>
815 </para>
816
817 <para>
818 <itemizedlist>
819 <listitem>
820 <para id='qa-issue-install-host-path'>
821 <code>
822 &lt;recipename&gt;: The install log indicates that host include and/or library paths were used. Please check the log '&lt;logfile&gt;' for more information. [install-host-path]
823 </code>
824 </para>
825
826 <para>
827 The log for the
828 <link linkend='ref-tasks-install'><filename>do_install</filename></link>
829 task indicates that paths on the host were searched
830 for files, which is not appropriate when cross-compiling.
831 Look for "is unsafe for cross-compilation"
832 or "CROSS COMPILE Badness" in the specified log file.
833 </para>
834
835 <para>
836 &nbsp;
837 </para>
838 </listitem>
839 </itemizedlist>
840 </para>
841
842 <para>
843 <itemizedlist>
844 <listitem>
845 <para id='qa-issue-autoconf-log'>
846 <code>
847 This autoconf log indicates errors, it looked at host include and/or library paths while determining system capabilities. Rerun configure task after fixing this. The path was '&lt;path&gt;'
848 </code>
849 </para>
850
851 <para>
852 The log for the
853 <link linkend='ref-tasks-configure'><filename>do_configure</filename></link>
854 task indicates that paths on the host were searched
855 for files, which is not appropriate when cross-compiling.
856 Look for "is unsafe for cross-compilation" or
857 "CROSS COMPILE Badness" in the specified log file.
858 </para>
859
860 <para>
861 &nbsp;
862 </para>
863 </listitem>
864 </itemizedlist>
865 </para>
866
867 <para>
868 <itemizedlist>
869 <listitem>
870 <para id='qa-issue-pkgname'>
871 <code>
872 &lt;packagename&gt; doesn't match the [a-z0-9.+-]+ regex [pkgname]
873 </code>
874 </para>
875
876 <para>
877 The convention within the OpenEmbedded build system
878 (sometimes enforced by the package manager itself) is to
879 require that package names are all lower case
880 and to allow a restricted set of characters.
881 If your recipe name does not match this, or you add
882 packages to
883 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>
884 that do not conform to the convention, then you
885 will receive this error.
886 Rename your recipe.
887 Or, if you have added a non-conforming package name to
888 <filename>PACKAGES</filename>, change the package name
889 appropriately.
890 </para>
891
892 <para>
893 &nbsp;
894 </para>
895 </listitem>
896 </itemizedlist>
897 </para>
898
899 <para>
900 <itemizedlist>
901 <listitem>
902 <para id='qa-issue-unknown-configure-option'>
903 <code>
904 &lt;recipe&gt;: configure was passed unrecognized options: &lt;options&gt; [unknown-configure-option]
905 </code>
906 </para>
907
908 <para>
909 The configure script is reporting that the specified
910 options are unrecognized.
911 This situation could be because the options
912 were previously valid but have been removed from the
913 configure script.
914 Or, there was a mistake when the options were added
915 and there is another option that should be used instead.
916 If you are unsure, consult the upstream build
917 documentation, the
918 <filename>./configure --help</filename> output,
919 and the upstream change log or release notes.
920 Once you have worked out what the appropriate
921 change is, you can update
922 <link linkend='var-EXTRA_OECONF'><filename>EXTRA_OECONF</filename></link>,
923 <link linkend='var-PACKAGECONFIG_CONFARGS'><filename>PACKAGECONFIG_CONFARGS</filename></link>,
924 or the individual
925 <link linkend='var-PACKAGECONFIG'><filename>PACKAGECONFIG</filename></link>
926 option values accordingly.
927 </para>
928
929 <para>
930 &nbsp;
931 </para>
932 </listitem>
933 </itemizedlist>
934 </para>
935
936 <para>
937 <itemizedlist>
938 <listitem>
939 <para id='qa-issue-pn-overrides'>
940 <code>
941 Recipe &lt;recipefile&gt; has PN of "&lt;recipename&gt;" which is in OVERRIDES, this can result in unexpected behavior. [pn-overrides]
942 </code>
943 </para>
944
945 <para>
946 The specified recipe has a name
947 (<link linkend='var-PN'><filename>PN</filename></link>)
948 value that appears in
949 <link linkend='var-OVERRIDES'><filename>OVERRIDES</filename></link>.
950 If a recipe is named such that its <filename>PN</filename>
951 value matches something already in
952 <filename>OVERRIDES</filename> (e.g. <filename>PN</filename>
953 happens to be the same as
954 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>
955 or
956 <link linkend='var-DISTRO'><filename>DISTRO</filename></link>),
957 it can have unexpected consequences.
958 For example, assignments such as
959 <filename>FILES_${PN} = "xyz"</filename> effectively
960 turn into <filename>FILES = "xyz"</filename>.
961 Rename your recipe (or if <filename>PN</filename> is being
962 set explicitly, change the <filename>PN</filename> value) so
963 that the conflict does not occur.
964 See
965 <link linkend='var-FILES'><filename>FILES</filename></link>
966 for additional information.
967 </para>
968
969 <para>
970 &nbsp;
971 </para>
972 </listitem>
973 </itemizedlist>
974 </para>
975
976 <para>
977 <itemizedlist>
978 <listitem>
979 <para id='qa-issue-pkgvarcheck'>
980 <code>
981 &lt;recipefile&gt;: Variable &lt;variable&gt; is set as not being package specific, please fix this. [pkgvarcheck]
982 </code>
983 </para>
984
985 <para>
986 Certain variables
987 (<link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>,
988 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>,
989 <link linkend='var-RSUGGESTS'><filename>RSUGGESTS</filename></link>,
990 <link linkend='var-RCONFLICTS'><filename>RCONFLICTS</filename></link>,
991 <link linkend='var-RPROVIDES'><filename>RPROVIDES</filename></link>,
992 <link linkend='var-RREPLACES'><filename>RREPLACES</filename></link>,
993 <link linkend='var-FILES'><filename>FILES</filename></link>,
994 <filename>pkg_preinst</filename>,
995 <filename>pkg_postinst</filename>,
996 <filename>pkg_prerm</filename>,
997 <filename>pkg_postrm</filename>, and
998 <link linkend='var-ALLOW_EMPTY'><filename>ALLOW_EMPTY</filename></link>)
999 should always be set specific to a package (i.e. they
1000 should be set with a package name override such as
1001 <filename>RDEPENDS_${PN} = "value"</filename> rather than
1002 <filename>RDEPENDS = "value"</filename>).
1003 If you receive this error, correct any assignments to these
1004 variables within your recipe.
1005 </para>
1006
1007 <para>
1008 &nbsp;
1009 </para>
1010 </listitem>
1011 </itemizedlist>
1012 </para>
1013
1014 <para>
1015 <itemizedlist>
1016 <listitem>
1017 <para id='qa-issue-already-stripped'>
1018 <code>
1019 File '&lt;file&gt;' from &lt;recipename&gt; was already stripped, this will prevent future debugging! [already-stripped]
1020 </code>
1021 </para>
1022
1023 <para>
1024 Produced binaries have already been stripped prior to the
1025 build system extracting debug symbols.
1026 It is common for upstream software projects to default to
1027 stripping debug symbols for output binaries.
1028 In order for debugging to work on the target using
1029 <filename>-dbg</filename> packages, this stripping must be
1030 disabled.
1031 </para>
1032
1033 <para>
1034 Depending on the build system used by the software being
1035 built, disabling this stripping could be as easy as
1036 specifying an additional configure option.
1037 If not, disabling stripping might involve patching
1038 the build scripts.
1039 In the latter case, look for references to "strip" or
1040 "STRIP", or the "-s" or "-S" command-line options being
1041 specified on the linker command line (possibly
1042 through the compiler command line if preceded with "-Wl,").
1043 <note>
1044 Disabling stripping here does not mean that the final
1045 packaged binaries will be unstripped.
1046 Once the OpenEmbedded build system splits out debug
1047 symbols to the <filename>-dbg</filename> package,
1048 it will then strip the symbols from the binaries.
1049 </note>
1050 </para>
1051
1052 <para>
1053 &nbsp;
1054 </para>
1055 </listitem>
1056 </itemizedlist>
1057 </para>
1058
1059 <para>
1060 <itemizedlist>
1061 <listitem>
1062 <para id='qa-issue-packages-list'>
1063 <code>
1064 &lt;packagename&gt; is listed in PACKAGES multiple times, this leads to packaging errors. [packages-list]
1065 </code>
1066 </para>
1067
1068 <para>
1069 Package names must appear only once in the
1070 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>
1071 variable.
1072 You might receive this error if you are attempting to add a
1073 package to <filename>PACKAGES</filename> that is
1074 already in the variable's value.
1075 </para>
1076
1077 <para>
1078 &nbsp;
1079 </para>
1080 </listitem>
1081 </itemizedlist>
1082 </para>
1083
1084 <para>
1085 <itemizedlist>
1086 <listitem>
1087 <para id='qa-issue-files-invalid'>
1088 <code>
1089 FILES variable for package &lt;packagename&gt; contains '//' which is invalid. Attempting to fix this but you should correct the metadata. [files-invalid]
1090 </code>
1091 </para>
1092
1093 <para>
1094 The string "//" is invalid in a Unix path.
1095 Correct all occurrences where this string appears in a
1096 <link linkend='var-FILES'><filename>FILES</filename></link>
1097 variable so that there is only a single "/".
1098 </para>
1099
1100 <para>
1101 &nbsp;
1102 </para>
1103 </listitem>
1104 </itemizedlist>
1105 </para>
1106
1107 <para>
1108 <itemizedlist>
1109 <listitem>
1110 <para id='qa-issue-installed-vs-shipped'>
1111 <code>
1112 &lt;recipename&gt;: Files/directories were installed but not shipped in any package [installed-vs-shipped]
1113 </code>
1114 </para>
1115
1116 <para>
1117 Files have been installed within the
1118 <link linkend='ref-tasks-install'><filename>do_install</filename></link>
1119 task but have not been included in any package by way of the
1120 <link linkend='var-FILES'><filename>FILES</filename></link>
1121 variable.
1122 Files that do not appear in any package cannot be present in
1123 an image later on in the build process.
1124 You need to do one of the following:
1125 <itemizedlist>
1126 <listitem><para>
1127 Add the files to <filename>FILES</filename> for the
1128 package you want them to appear in (e.g.
1129 <filename>FILES_${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}</filename> for the main
1130 package).
1131 </para></listitem>
1132 <listitem><para>
1133 Delete the files at the end of the
1134 <filename>do_install</filename> task if the files
1135 are not needed in any package.
1136 </para></listitem>
1137 </itemizedlist>
1138 </para>
1139
1140 <para>
1141 &nbsp;
1142 </para>
1143 </listitem>
1144 </itemizedlist>
1145 </para>
1146
1147 <para>
1148 <itemizedlist>
1149 <listitem>
1150 <para id='qa-issue-old-and-new-package-and-version-names'>
1151 <code>
1152 &lt;oldpackage&gt;-&lt;oldpkgversion&gt; was registered as shlib provider for &lt;library&gt;, changing it to &lt;newpackage&gt;-&lt;newpkgversion&gt; because it was built later
1153 </code>
1154 </para>
1155
1156 <para>
1157 This message means that both
1158 <filename>&lt;oldpackage&gt;</filename> and
1159 <filename>&lt;newpackage&gt;</filename> provide the specified
1160 shared library.
1161 You can expect this message when a recipe has been renamed.
1162 However, if that is not the case, the message might indicate
1163 that a private version of a library is being erroneously
1164 picked up as the provider for a common library.
1165 If that is the case, you should add the library's
1166 <filename>.so</filename> file name to
1167 <link linkend='var-PRIVATE_LIBS'><filename>PRIVATE_LIBS</filename></link>
1168 in the recipe that provides
1169 the private version of the library.
1170 </para>
1171 </listitem>
1172 </itemizedlist>
1173 </para>
1174
1175 <para>
1176 <itemizedlist>
1177 <listitem>
1178 <para id='qa-issue-unlisted-pkg-lics'>
1179 <code>
1180 LICENSE_&lt;packagename&gt; includes licenses (&lt;licenses&gt;) that are not listed in LICENSE [unlisted-pkg-lics]
1181 </code>
1182 </para>
1183
1184 <para>
1185 The <link linkend='var-LICENSE'><filename>LICENSE</filename></link>
1186 of the recipe should be a superset of all the licenses of
1187 all packages produced by this recipe.
1188 In other words, any license in <filename>LICENSE_*</filename>
1189 should also appear in
1190 <link linkend='var-LICENSE'><filename>LICENSE</filename></link>.
1191 </para>
1192
1193 <para>
1194 &nbsp;
1195 </para>
1196 </listitem>
1197 </itemizedlist>
1198 </para>
1199</section>
1200
1201<section id='configuring-and-disabling-qa-checks'>
1202 <title>Configuring and Disabling QA Checks</title>
1203
1204 <para>
1205 You can configure the QA checks globally so that specific check
1206 failures either raise a warning or an error message, using the
1207 <link linkend='var-WARN_QA'><filename>WARN_QA</filename></link> and
1208 <link linkend='var-ERROR_QA'><filename>ERROR_QA</filename></link>
1209 variables, respectively.
1210 You can also disable checks within a particular recipe using
1211 <link linkend='var-INSANE_SKIP'><filename>INSANE_SKIP</filename></link>.
1212 For information on how to work with the QA checks, see the
1213 "<link linkend='ref-classes-insane'><filename>insane.bbclass</filename></link>"
1214 section.
1215 <note><title>Tip</title>
1216 Please keep in mind that the QA checks exist in order to
1217 detect real or potential problems in the packaged output.
1218 So exercise caution when disabling these checks.
1219 </note>
1220 </para>
1221</section>
1222</chapter>
1223<!--
1224vim: expandtab tw=80 ts=4
1225-->
diff --git a/documentation/ref-manual/ref-release-process.xml b/documentation/ref-manual/ref-release-process.xml
deleted file mode 100644
index 87f5308067..0000000000
--- a/documentation/ref-manual/ref-release-process.xml
+++ /dev/null
@@ -1,256 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='ref-release-process'>
7<title>Yocto Project Releases and the Stable Release Process</title>
8
9<para>
10 The Yocto Project release process is predictable and consists of both
11 major and minor (point) releases.
12 This brief chapter provides information on how releases are named, their
13 life cycle, and their stability.
14</para>
15
16<section id='major-and-minor-release-cadence'>
17 <title>Major and Minor Release Cadence</title>
18
19 <para>
20 The Yocto Project delivers major releases (e.g. &DISTRO;) using a six
21 month cadence roughly timed each April and October of the year.
22 Following are examples of some major YP releases with their codenames
23 also shown.
24 See the
25 "<link linkend='major-release-codenames'>Major Release Codenames</link>"
26 section for information on codenames used with major releases.
27 <literallayout class='monospaced'>
28 2.2 (Morty)
29 2.1 (Krogoth)
30 2.0 (Jethro)
31 </literallayout>
32 While the cadence is never perfect, this timescale facilitates
33 regular releases that have strong QA cycles while not overwhelming
34 users with too many new releases.
35 The cadence is predictable and avoids many major holidays in various
36 geographies.
37 </para>
38
39 <para>
40 The Yocto project delivers minor (point) releases on an unscheduled
41 basis and are usually driven by the accumulation of enough significant
42 fixes or enhancements to the associated major release.
43 Following are some example past point releases:
44 <literallayout class='monospaced'>
45 2.1.1
46 2.1.2
47 2.2.1
48 </literallayout>
49 The point release indicates a point in the major release branch where
50 a full QA cycle and release process validates the content of the new
51 branch.
52 <note>
53 Realize that there can be patches merged onto the stable release
54 branches as and when they become available.
55 </note>
56 </para>
57</section>
58
59<section id='major-release-codenames'>
60 <title>Major Release Codenames</title>
61
62 <para>
63 Each major release receives a codename that identifies the release in
64 the
65 <ulink url='&YOCTO_DOCS_OM_URL;#yocto-project-repositories'>Yocto Project Source Repositories</ulink>.
66 The concept is that branches of
67 <link linkend='metadata'>Metadata</link>
68 with the same codename are likely to be compatible and thus
69 work together.
70 <note>
71 Codenames are associated with major releases because a Yocto
72 Project release number (e.g. &DISTRO;) could conflict with
73 a given layer or company versioning scheme.
74 Codenames are unique, interesting, and easily identifiable.
75 </note>
76 Releases are given a nominal release version as well but the codename
77 is used in repositories for this reason.
78 You can find information on Yocto Project releases and codenames at
79 <ulink url='https://wiki.yoctoproject.org/wiki/Releases'></ulink>.
80 </para>
81</section>
82
83<section id='stable-release-process'>
84 <title>Stable Release Process</title>
85
86 <para>
87 Once released, the release enters the stable release process at which
88 time a person is assigned as the maintainer for that stable release.
89 This maintainer monitors activity for the release by investigating
90 and handling nominated patches and backport activity.
91 Only fixes and enhancements that have first been applied on the
92 "master" branch (i.e. the current, in-development branch) are
93 considered for backporting to a stable release.
94 <note>
95 The current Yocto Project policy regarding backporting is to
96 consider bug fixes and security fixes only.
97 Policy dictates that features are not backported to a stable
98 release.
99 This policy means generic recipe version upgrades are unlikely to
100 be accepted for backporting.
101 The exception to this policy occurs when a strong reason exists
102 such as the fix happens to also be the preferred upstream approach.
103 </note>
104 </para>
105
106 <para>
107 Stable release branches have strong maintenance for about a year after
108 their initial release.
109 Should significant issues be found for any release regardless of its
110 age, fixes could be backported to older releases.
111 For issues that are not backported given an older release,
112 Community LTS trees and branches exist where
113 community members share patches for older releases.
114 However, these types of patches do not go through the same release
115 process as do point releases.
116 You can find more information about stable branch maintenance at
117 <ulink url='https://wiki.yoctoproject.org/wiki/Stable_branch_maintenance'></ulink>.
118 </para>
119</section>
120
121<section id='testing-and-quality-assurance'>
122 <title>Testing and Quality Assurance</title>
123
124 <para>
125 Part of the Yocto Project development and release process is quality
126 assurance through the execution of test strategies.
127 Test strategies provide the Yocto Project team a way to ensure a
128 release is validated.
129 Additionally, because the test strategies are visible to you as a
130 developer, you can validate your projects.
131 This section overviews the available test infrastructure used in the
132 Yocto Project.
133 For information on how to run available tests on your projects, see the
134 "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
135 section in the Yocto Project Development Tasks Manual.
136 </para>
137
138 <para>
139 The QA/testing infrastructure is woven into the project to the point
140 where core developers take some of it for granted.
141 The infrastructure consists of the following pieces:
142 <itemizedlist>
143 <listitem><para>
144 <filename>bitbake-selftest</filename>:
145 A standalone command that runs unit tests on key pieces of
146 BitBake and its fetchers.
147 </para></listitem>
148 <listitem><para>
149 <link linkend='ref-classes-sanity'><filename>sanity.bbclass</filename></link>:
150 This automatically included class checks the build environment
151 for missing tools (e.g. <filename>gcc</filename>) or common
152 misconfigurations such as
153 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>
154 set incorrectly.
155 </para></listitem>
156 <listitem><para>
157 <link linkend='ref-classes-insane'><filename>insane.bbclass</filename></link>:
158 This class checks the generated output from builds for sanity.
159 For example, if building for an ARM target, did the build
160 produce ARM binaries.
161 If, for example, the build produced PPC binaries then there
162 is a problem.
163 </para></listitem>
164 <listitem><para>
165 <link linkend='ref-classes-testimage*'><filename>testimage.bbclass</filename></link>:
166 This class performs runtime testing of images after they are
167 built.
168 The tests are usually used with
169 <ulink url='&YOCTO_DOCS_DEV_URL;#dev-manual-qemu'>QEMU</ulink>
170 to boot the images and check the combined runtime result
171 boot operation and functions.
172 However, the test can also use the IP address of a machine to
173 test.
174 </para></listitem>
175 <listitem><para>
176 <ulink url='&YOCTO_DOCS_DEV_URL;#testing-packages-with-ptest'><filename>ptest</filename></ulink>:
177 Runs tests against packages produced during the build for a
178 given piece of software.
179 The test allows the packages to be be run within a target
180 image.
181 </para></listitem>
182 <listitem><para>
183 <filename>oe-selftest</filename>:
184 Tests combination BitBake invocations.
185 These tests operate outside the OpenEmbedded build system
186 itself.
187 The <filename>oe-selftest</filename> can run all tests by
188 default or can run selected tests or test suites.
189 <note>
190 Running <filename>oe-selftest</filename> requires
191 host packages beyond the "Essential" grouping.
192 See the
193 "<link linkend='required-packages-for-the-build-host'>Required Packages for the Build Host</link>"
194 section for more information.
195 </note>
196 </para></listitem>
197 </itemizedlist>
198 </para>
199
200 <para>
201 Originally, much of this testing was done manually.
202 However, significant effort has been made to automate the tests so
203 that more people can use them and the Yocto Project development team
204 can run them faster and more efficiently.
205 </para>
206
207 <para>
208 The Yocto Project's main Autobuilder
209 (<filename>autobuilder.yoctoproject.org</filename>) publicly tests
210 each Yocto Project release's code in the
211 <link linkend='oe-core'>OE-Core</link>, Poky, and BitBake
212 repositories.
213 The testing occurs for both the current state of the
214 "master" branch and also for submitted patches.
215 Testing for submitted patches usually occurs in the
216 "ross/mut" branch in the <filename>poky-contrib</filename> repository
217 (i.e. the master-under-test branch) or in the "master-next" branch
218 in the <filename>poky</filename> repository.
219 <note>
220 You can find all these branches in the Yocto Project
221 <ulink url='&YOCTO_DOCS_OM_URL;#source-repositories'>Source Repositories</ulink>.
222 </note>
223 Testing within these public branches ensures in a publicly visible way
224 that all of the main supposed architectures and recipes in OE-Core
225 successfully build and behave properly.
226 </para>
227
228 <para>
229 Various features such as <filename>multilib</filename>, sub
230 architectures (e.g. <filename>x32</filename>,
231 <filename>poky-tiny</filename>, <filename>musl</filename>,
232 <filename>no-x11</filename> and and so forth),
233 <filename>bitbake-selftest</filename>, and
234 <filename>oe-selftest</filename> are tested as part of
235 the QA process of a release.
236 Complete testing and validation for a release takes the Autobuilder
237 workers several hours.
238 <note>
239 The Autobuilder workers are non-homogeneous, which means regular
240 testing across a variety of Linux distributions occurs.
241 The Autobuilder is limited to only testing QEMU-based setups and
242 not real hardware.
243 </note>
244 </para>
245
246 <para>
247 Finally, in addition to the Autobuilder's tests, the Yocto Project
248 QA team also performs testing on a variety of platforms, which includes
249 actual hardware, to ensure expected results.
250 </para>
251</section>
252
253</chapter>
254<!--
255vim: expandtab tw=80 ts=4
256-->
diff --git a/documentation/ref-manual/ref-structure.xml b/documentation/ref-manual/ref-structure.xml
deleted file mode 100644
index 8588e9c2dd..0000000000
--- a/documentation/ref-manual/ref-structure.xml
+++ /dev/null
@@ -1,1123 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='ref-structure'>
7
8<title>Source Directory Structure</title>
9
10<para>
11 The <link linkend='source-directory'>Source Directory</link>
12 consists of numerous files, directories and subdirectories;
13 understanding their locations and contents is key to using the
14 Yocto Project effectively.
15 This chapter describes the Source Directory and gives information about
16 those files and directories.
17</para>
18
19<para>
20 For information on how to establish a local Source Directory on your
21 development system, see the
22 "<ulink url='&YOCTO_DOCS_DEV_URL;#locating-yocto-project-source-files'>Locating Yocto Project Source Files</ulink>"
23 section in the Yocto Project Development Tasks Manual.
24</para>
25
26 <note>
27 The OpenEmbedded build system does not support file or directory names that
28 contain spaces.
29 Be sure that the Source Directory you use does not contain these types
30 of names.
31 </note>
32
33<section id='structure-core'>
34 <title>Top-Level Core Components</title>
35
36 <para>
37 This section describes the top-level components of the
38 <link linkend='source-directory'>Source Directory</link>.
39 </para>
40
41 <section id='structure-core-bitbake'>
42 <title><filename>bitbake/</filename></title>
43
44 <para>
45 This directory includes a copy of BitBake for ease of use.
46 The copy usually matches the current stable BitBake release from
47 the BitBake project.
48 BitBake, a
49 <link linkend='metadata'>Metadata</link>
50 interpreter, reads the Yocto Project Metadata and runs the tasks
51 defined by that data.
52 Failures are usually caused by errors in your Metadata and not from BitBake itself;
53 consequently, most users do not need to worry about BitBake.
54 </para>
55
56 <para>
57 When you run the <filename>bitbake</filename> command, the
58 main BitBake executable (which resides in the
59 <filename>bitbake/bin/</filename> directory) starts.
60 Sourcing the environment setup script (i.e.
61 <link linkend="structure-core-script"><filename>&OE_INIT_FILE;</filename></link>)
62 places the <filename>scripts/</filename> and
63 <filename>bitbake/bin/</filename> directories (in that order) into
64 the shell's <filename>PATH</filename> environment variable.
65 </para>
66
67 <para>
68 For more information on BitBake, see the
69 <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>.
70 </para>
71 </section>
72
73 <section id='structure-core-build'>
74 <title><filename>build/</filename></title>
75
76 <para>
77 This directory contains user configuration files and the output
78 generated by the OpenEmbedded build system in its standard configuration where
79 the source tree is combined with the output.
80 The
81 <link linkend='build-directory'>Build Directory</link>
82 is created initially when you <filename>source</filename>
83 the OpenEmbedded build environment setup script
84 (i.e.
85 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>).
86 </para>
87
88 <para>
89 It is also possible to place output and configuration
90 files in a directory separate from the
91 <link linkend='source-directory'>Source Directory</link>
92 by providing a directory name when you <filename>source</filename>
93 the setup script.
94 For information on separating output from your local
95 Source Directory files (commonly described as an "out of tree" build), see the
96 "<link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>"
97 section.
98 </para>
99 </section>
100
101 <section id='handbook'>
102 <title><filename>documentation/</filename></title>
103
104 <para>
105 This directory holds the source for the Yocto Project documentation
106 as well as templates and tools that allow you to generate PDF and HTML
107 versions of the manuals.
108 Each manual is contained in its own sub-folder;
109 for example, the files for this reference manual reside in
110 the <filename>ref-manual/</filename> directory.
111 </para>
112 </section>
113
114 <section id='structure-core-meta'>
115 <title><filename>meta/</filename></title>
116
117 <para>
118 This directory contains the minimal, underlying OpenEmbedded-Core metadata.
119 The directory holds recipes, common classes, and machine
120 configuration for strictly emulated targets (<filename>qemux86</filename>,
121 <filename>qemuarm</filename>, and so forth.)
122 </para>
123 </section>
124
125 <section id='structure-core-meta-poky'>
126 <title><filename>meta-poky/</filename></title>
127
128 <para>
129 Designed above the <filename>meta/</filename> content, this directory
130 adds just enough metadata to define the Poky reference distribution.
131 </para>
132 </section>
133
134 <section id='structure-core-meta-yocto-bsp'>
135 <title><filename>meta-yocto-bsp/</filename></title>
136
137 <para>
138 This directory contains the Yocto Project reference
139 hardware Board Support Packages (BSPs).
140 For more information on BSPs, see the
141 <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>.
142 </para>
143 </section>
144
145 <section id='structure-meta-selftest'>
146 <title><filename>meta-selftest/</filename></title>
147
148 <para>
149 This directory adds additional recipes and append files
150 used by the OpenEmbedded selftests to verify the behavior
151 of the build system.
152 You do not have to add this layer to your
153 <filename>bblayers.conf</filename> file unless you want to run the
154 selftests.
155 </para>
156 </section>
157
158 <section id='structure-meta-skeleton'>
159 <title><filename>meta-skeleton/</filename></title>
160
161 <para>
162 This directory contains template recipes for BSP and kernel development.
163 </para>
164 </section>
165
166 <section id='structure-core-scripts'>
167 <title><filename>scripts/</filename></title>
168
169 <para>
170 This directory contains various integration scripts that implement
171 extra functionality in the Yocto Project environment (e.g. QEMU scripts).
172 The <link linkend="structure-core-script"><filename>&OE_INIT_FILE;</filename></link>
173 script prepends this directory to the shell's
174 <filename>PATH</filename> environment variable.
175 </para>
176
177 <para>
178 The <filename>scripts</filename> directory has useful scripts that assist in contributing
179 back to the Yocto Project, such as <filename>create-pull-request</filename> and
180 <filename>send-pull-request</filename>.
181 </para>
182 </section>
183
184 <section id='structure-core-script'>
185 <title><filename>&OE_INIT_FILE;</filename></title>
186
187 <para>
188 This script sets up the OpenEmbedded build environment.
189 Running this script with the <filename>source</filename> command in
190 a shell makes changes to <filename>PATH</filename> and sets other
191 core BitBake variables based on the current working directory.
192 You need to run an environment setup script before running BitBake
193 commands.
194 The script uses other scripts within the
195 <filename>scripts</filename> directory to do the bulk of the work.
196 </para>
197
198 <para>
199 When you run this script, your Yocto Project environment is set
200 up, a
201 <link linkend='build-directory'>Build Directory</link>
202 is created, your working directory becomes the Build Directory,
203 and you are presented with some simple suggestions as to what to do
204 next, including a list of some possible targets to build.
205 Here is an example:
206 <literallayout class='monospaced'>
207 $ source oe-init-build-env
208
209 ### Shell environment set up for builds. ###
210
211 You can now run 'bitbake &lt;target&gt;'
212
213 Common targets are:
214 core-image-minimal
215 core-image-sato
216 meta-toolchain
217 meta-ide-support
218
219 You can also run generated qemu images with a command like 'runqemu qemux86-64'
220 </literallayout>
221 The default output of the <filename>oe-init-build-env</filename> script
222 is from the <filename>conf-notes.txt</filename> file, which is found in the
223 <filename>meta-poky</filename> directory within the
224 <link linkend='source-directory'>Source Directory</link>.
225 If you design a custom distribution, you can include your own version
226 of this configuration file to mention the targets defined by your
227 distribution.
228 See the
229 "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-custom-template-configuration-directory'>Creating a Custom Template Configuration Directory</ulink>"
230 section in the Yocto Project Development Tasks Manual for more
231 information.
232 </para>
233
234 <para>
235 By default, running this script without a Build Directory
236 argument creates the <filename>build/</filename> directory
237 in your current working directory.
238 If you provide a Build Directory argument when you
239 <filename>source</filename> the script, you direct the OpenEmbedded
240 build system to create a Build Directory of your choice.
241 For example, the following command creates a Build Directory named
242 <filename>mybuilds/</filename> that is outside of the
243 <link linkend='source-directory'>Source Directory</link>:
244 <literallayout class='monospaced'>
245 $ source &OE_INIT_FILE; ~/mybuilds
246 </literallayout>
247 The OpenEmbedded build system uses the template configuration
248 files, which are found by default in the
249 <filename>meta-poky/conf/</filename> directory in the
250 Source Directory.
251 See the
252 "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-custom-template-configuration-directory'>Creating a Custom Template Configuration Directory</ulink>"
253 section in the Yocto Project Development Tasks Manual for more
254 information.
255 <note>
256 The OpenEmbedded build system does not support file or directory names that
257 contain spaces.
258 If you attempt to run the <filename>&OE_INIT_FILE;</filename> script
259 from a Source Directory that contains spaces in either the filenames
260 or directory names, the script returns an error indicating no such
261 file or directory.
262 Be sure to use a Source Directory free of names containing spaces.
263 </note>
264 </para>
265 </section>
266
267 <section id='structure-basic-top-level'>
268 <title><filename>LICENSE, README, and README.hardware</filename></title>
269
270 <para>
271 These files are standard top-level files.
272 </para>
273 </section>
274</section>
275
276<section id='structure-build'>
277 <title>The Build Directory - <filename>build/</filename></title>
278
279 <para>
280 The OpenEmbedded build system creates the
281 <link linkend='build-directory'>Build Directory</link>
282 when you run the build environment setup script
283 <link
284linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>.
285 If you do not give the Build Directory a specific name when you run
286 the setup script, the name defaults to <filename>build/</filename>.
287 </para>
288
289 <para>
290 For subsequent parsing and processing, the name of the Build
291 directory is available via the
292 <link linkend='var-TOPDIR'><filename>TOPDIR</filename></link> variable.
293 </para>
294
295 <section id='structure-build-buildhistory'>
296 <title><filename>build/buildhistory/</filename></title>
297
298 <para>
299 The OpenEmbedded build system creates this directory when you
300 enable build history via the <filename>buildhistory</filename> class file.
301 The directory organizes build information into image, packages, and
302 SDK subdirectories.
303 For information on the build history feature, see the
304 "<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-build-output-quality'>Maintaining Build Output Quality</ulink>"
305 section in the Yocto Project Development Tasks Manual.
306 </para>
307 </section>
308
309 <section id='structure-build-conf-local.conf'>
310 <title><filename>build/conf/local.conf</filename></title>
311
312 <para>
313 This configuration file contains all the local user configurations
314 for your build environment.
315 The <filename>local.conf</filename> file contains documentation on
316 the various configuration options.
317 Any variable set here overrides any variable set elsewhere within
318 the environment unless that variable is hard-coded within a file
319 (e.g. by using '=' instead of '?=').
320 Some variables are hard-coded for various reasons but such
321 variables are relatively rare.
322 </para>
323
324 <para>
325 At a minimum, you would normally edit this file to select the target
326 <filename><link linkend='var-MACHINE'>MACHINE</link></filename>,
327 which package types you wish to use
328 (<link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>),
329 and the location from which you want to access downloaded files
330 (<filename><link linkend='var-DL_DIR'>DL_DIR</link></filename>).
331 </para>
332
333 <para>
334 If <filename>local.conf</filename> is not present when you
335 start the build, the OpenEmbedded build system creates it from
336 <filename>local.conf.sample</filename> when
337 you <filename>source</filename> the top-level build environment
338 setup script
339 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>.
340 </para>
341
342 <para>
343 The source <filename>local.conf.sample</filename> file used
344 depends on the <filename>$TEMPLATECONF</filename> script variable,
345 which defaults to <filename>meta-poky/conf/</filename>
346 when you are building from the Yocto Project development
347 environment, and to <filename>meta/conf/</filename> when
348 you are building from the OpenEmbedded-Core environment.
349 Because the script variable points to the source of the
350 <filename>local.conf.sample</filename> file, this implies that
351 you can configure your build environment from any layer by setting
352 the variable in the top-level build environment setup script as
353 follows:
354 <literallayout class='monospaced'>
355 TEMPLATECONF=<replaceable>your_layer</replaceable>/conf
356 </literallayout>
357 Once the build process gets the sample file, it uses
358 <filename>sed</filename> to substitute final
359 <filename>${</filename><link linkend='var-OEROOT'><filename>OEROOT</filename></link><filename>}</filename>
360 values for all <filename>##OEROOT##</filename> values.
361 <note>
362 You can see how the <filename>TEMPLATECONF</filename> variable
363 is used by looking at the
364 <filename>scripts/oe-setup-builddir</filename> script in the
365 <link linkend='source-directory'>Source Directory</link>.
366 You can find the Yocto Project version of the
367 <filename>local.conf.sample</filename> file in the
368 <filename>meta-poky/conf</filename> directory.
369 </note>
370 </para>
371 </section>
372
373 <section id='structure-build-conf-bblayers.conf'>
374 <title><filename>build/conf/bblayers.conf</filename></title>
375
376 <para>
377 This configuration file defines
378 <ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>layers</ulink>,
379 which are directory trees, traversed (or walked) by BitBake.
380 The <filename>bblayers.conf</filename> file uses the
381 <link linkend='var-BBLAYERS'><filename>BBLAYERS</filename></link>
382 variable to list the layers BitBake tries to find.
383 </para>
384
385 <para>
386 If <filename>bblayers.conf</filename> is not present when you
387 start the build, the OpenEmbedded build system creates it from
388 <filename>bblayers.conf.sample</filename> when
389 you <filename>source</filename> the top-level build environment
390 setup script (i.e.
391 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>).
392 </para>
393
394 <para>
395 As with the <filename>local.conf</filename> file,
396 the source <filename>bblayers.conf.sample</filename> file used
397 depends on the <filename>$TEMPLATECONF</filename> script variable,
398 which defaults to <filename>meta-poky/conf/</filename>
399 when you are building from the Yocto Project development
400 environment, and to <filename>meta/conf/</filename> when
401 you are building from the OpenEmbedded-Core environment.
402 Because the script variable points to the source of the
403 <filename>bblayers.conf.sample</filename> file, this implies that
404 you can base your build from any layer by setting the variable in
405 the top-level build environment setup script as follows:
406 <literallayout class='monospaced'>
407 TEMPLATECONF=<replaceable>your_layer</replaceable>/conf
408 </literallayout>
409 Once the build process gets the sample file, it uses
410 <filename>sed</filename> to substitute final
411 <filename>${</filename><link linkend='var-OEROOT'><filename>OEROOT</filename></link><filename>}</filename>
412 values for all <filename>##OEROOT##</filename> values.
413 <note>
414 You can see how the <filename>TEMPLATECONF</filename> variable
415 <filename>scripts/oe-setup-builddir</filename> script in the
416 <link linkend='source-directory'>Source Directory</link>.
417 You can find the Yocto Project version of the
418 <filename>bblayers.conf.sample</filename> file in the
419 <filename>meta-poky/conf/</filename> directory.
420 </note>
421 </para>
422 </section>
423
424 <section id='structure-build-conf-sanity_info'>
425 <title><filename>build/cache/sanity_info</filename></title>
426
427 <para>
428 This file indicates the state of the sanity checks and is created
429 during the build.
430 </para>
431 </section>
432
433 <section id='structure-build-downloads'>
434 <title><filename>build/downloads/</filename></title>
435
436 <para>
437 This directory contains downloaded upstream source tarballs.
438 You can reuse the directory for multiple builds or move
439 the directory to another location.
440 You can control the location of this directory through the
441 <filename><link linkend='var-DL_DIR'>DL_DIR</link></filename> variable.
442 </para>
443 </section>
444
445 <section id='structure-build-sstate-cache'>
446 <title><filename>build/sstate-cache/</filename></title>
447
448 <para>
449 This directory contains the shared state cache.
450 You can reuse the directory for multiple builds or move
451 the directory to another location.
452 You can control the location of this directory through the
453 <filename><link linkend='var-SSTATE_DIR'>SSTATE_DIR</link></filename> variable.
454 </para>
455 </section>
456
457 <section id='structure-build-tmp'>
458 <title><filename>build/tmp/</filename></title>
459
460 <para>
461 The OpenEmbedded build system creates and uses this directory
462 for all the build system's output.
463 The
464 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
465 variable points to this directory.
466 </para>
467
468 <para>
469 BitBake creates this directory if it does not exist.
470 As a last resort, to clean up a build and start it from scratch
471 (other than the downloads), you can remove everything in the
472 <filename>tmp</filename> directory or get rid of the
473 directory completely.
474 If you do, you should also completely remove the
475 <filename>build/sstate-cache</filename> directory.
476 </para>
477 </section>
478
479 <section id='structure-build-tmp-buildstats'>
480 <title><filename>build/tmp/buildstats/</filename></title>
481
482 <para>
483 This directory stores the build statistics.
484 </para>
485 </section>
486
487 <section id='structure-build-tmp-cache'>
488 <title><filename>build/tmp/cache/</filename></title>
489
490 <para>
491 When BitBake parses the metadata (recipes and configuration files),
492 it caches the results in <filename>build/tmp/cache/</filename>
493 to speed up future builds.
494 The results are stored on a per-machine basis.
495 </para>
496
497 <para>
498 During subsequent builds, BitBake checks each recipe (together
499 with, for example, any files included or appended to it) to see
500 if they have been modified.
501 Changes can be detected, for example, through file modification
502 time (mtime) changes and hashing of file contents.
503 If no changes to the file are detected, then the parsed result
504 stored in the cache is reused.
505 If the file has changed, it is reparsed.
506 </para>
507 </section>
508
509 <section id='structure-build-tmp-deploy'>
510 <title><filename>build/tmp/deploy/</filename></title>
511
512 <para>
513 This directory contains any "end result" output from the
514 OpenEmbedded build process.
515 The <link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link>
516 variable points to this directory.
517 For more detail on the contents of the <filename>deploy</filename>
518 directory, see the
519 "<ulink url='&YOCTO_DOCS_OM_URL;#images-dev-environment'>Images</ulink>"
520 and
521 "<ulink url='&YOCTO_DOCS_OM_URL;#sdk-dev-environment'>Application Development SDK</ulink>"
522 sections in the Yocto Project Overview and Concepts Manual.
523 </para>
524 </section>
525
526 <section id='structure-build-tmp-deploy-deb'>
527 <title><filename>build/tmp/deploy/deb/</filename></title>
528
529 <para>
530 This directory receives any <filename>.deb</filename> packages produced by
531 the build process.
532 The packages are sorted into feeds for different architecture types.
533 </para>
534 </section>
535
536 <section id='structure-build-tmp-deploy-rpm'>
537 <title><filename>build/tmp/deploy/rpm/</filename></title>
538
539 <para>
540 This directory receives any <filename>.rpm</filename> packages produced by
541 the build process.
542 The packages are sorted into feeds for different architecture types.
543 </para>
544 </section>
545
546 <section id='structure-build-tmp-deploy-ipk'>
547 <title><filename>build/tmp/deploy/ipk/</filename></title>
548
549 <para>
550 This directory receives <filename>.ipk</filename> packages produced by
551 the build process.
552 </para>
553 </section>
554
555 <section id='structure-build-tmp-deploy-licenses'>
556 <title><filename>build/tmp/deploy/licenses/</filename></title>
557
558 <para>
559 This directory receives package licensing information.
560 For example, the directory contains sub-directories for <filename>bash</filename>,
561 <filename>busybox</filename>, and <filename>glibc</filename> (among others) that in turn
562 contain appropriate <filename>COPYING</filename> license files with other licensing information.
563 For information on licensing, see the
564 "<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle'>Maintaining Open Source License Compliance During Your Product's Lifecycle</ulink>"
565 section in the Yocto Project Development Tasks Manual.
566 </para>
567 </section>
568
569 <section id='structure-build-tmp-deploy-images'>
570 <title><filename>build/tmp/deploy/images/</filename></title>
571
572 <para>
573 This directory is populated with the basic output objects of the
574 build (think of them as the "generated artifacts" of the build process),
575 including things like the boot loader image, kernel, root filesystem and more.
576 If you want to flash the resulting image from a build onto a device,
577 look here for the necessary components.
578 </para>
579
580 <para>
581 Be careful when deleting files in this directory.
582 You can safely delete old images from this directory (e.g.
583 <filename>core-image-*</filename>).
584 However, the kernel (<filename>*zImage*</filename>, <filename>*uImage*</filename>, etc.),
585 bootloader and other supplementary files might be deployed here prior to building an
586 image.
587 Because these files are not directly produced from the image, if you
588 delete them they will not be automatically re-created when you build the image again.
589 </para>
590
591 <para>
592 If you do accidentally delete files here, you will need to force them to be
593 re-created.
594 In order to do that, you will need to know the target that produced them.
595 For example, these commands rebuild and re-create the kernel files:
596 <literallayout class='monospaced'>
597 $ bitbake -c clean virtual/kernel
598 $ bitbake virtual/kernel
599 </literallayout>
600 </para>
601 </section>
602
603 <section id='structure-build-tmp-deploy-sdk'>
604 <title><filename>build/tmp/deploy/sdk/</filename></title>
605
606 <para>
607 The OpenEmbedded build system creates this directory to hold
608 toolchain installer scripts which, when executed, install the
609 sysroot that matches your target hardware.
610 You can find out more about these installers in the
611 "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-building-an-sdk-installer'>Building an SDK Installer</ulink>"
612 section in the Yocto Project Application Development and the
613 Extensible Software Development Kit (eSDK) manual.
614 </para>
615 </section>
616
617 <section id='structure-build-tmp-sstate-control'>
618 <title><filename>build/tmp/sstate-control/</filename></title>
619
620 <para>
621 The OpenEmbedded build system uses this directory for the
622 shared state manifest files.
623 The shared state code uses these files to record the files
624 installed by each sstate task so that the files can be removed
625 when cleaning the recipe or when a newer version is about to
626 be installed.
627 The build system also uses the manifests to detect and produce
628 a warning when files from one task are overwriting those from
629 another.
630 </para>
631 </section>
632
633 <section id='structure-build-tmp-sysroots-components'>
634 <title><filename>build/tmp/sysroots-components/</filename></title>
635
636 <para>
637 This directory is the location of the sysroot contents that the
638 task
639 <link linkend='ref-tasks-prepare_recipe_sysroot'><filename>do_prepare_recipe_sysroot</filename></link>
640 links or copies into the recipe-specific sysroot for each
641 recipe listed in
642 <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>.
643 Population of this directory is handled through shared state, while
644 the path is specified by the
645 <link linkend='var-COMPONENTS_DIR'><filename>COMPONENTS_DIR</filename></link>
646 variable. Apart from a few unusual circumstances, handling of the
647 <filename>sysroots-components</filename> directory should be
648 automatic, and recipes should not directly reference
649 <filename>build/tmp/sysroots-components</filename>.
650 </para>
651 </section>
652
653 <section id='structure-build-tmp-sysroots'>
654 <title><filename>build/tmp/sysroots/</filename></title>
655
656 <para>
657 Previous versions of the OpenEmbedded build system used to
658 create a global shared sysroot per machine along with a native
659 sysroot.
660 Beginning with the &DISTRO; version of the Yocto Project,
661 sysroots exist in recipe-specific
662 <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>
663 directories.
664 Thus, the <filename>build/tmp/sysroots/</filename> directory
665 is unused.
666 <note>
667 The <filename>build/tmp/sysroots/</filename> directory
668 can still be populated using the
669 <filename>bitbake build-sysroots</filename> command and can
670 be used for compatibility in some cases.
671 However, in general it is not recommended to populate
672 this directory.
673 Individual recipe-specific sysroots should be used.
674 </note>
675 </para>
676 </section>
677
678 <section id='structure-build-tmp-stamps'>
679 <title><filename>build/tmp/stamps/</filename></title>
680
681 <para>
682 This directory holds information that BitBake uses for
683 accounting purposes to track what tasks have run and when they
684 have run.
685 The directory is sub-divided by architecture, package name, and
686 version.
687 Following is an example:
688 <literallayout class='monospaced'>
689 stamps/all-poky-linux/distcc-config/1.0-r0.do_build-2fdd....2do
690 </literallayout>
691 Although the files in the directory are empty of data,
692 BitBake uses the filenames and timestamps for tracking purposes.
693 </para>
694
695 <para>
696 For information on how BitBake uses stamp files to determine if
697 a task should be rerun, see the
698 "<ulink url='&YOCTO_DOCS_OM_URL;#stamp-files-and-the-rerunning-of-tasks'>Stamp Files and the Rerunning of Tasks</ulink>"
699 section in the Yocto Project Overview and Concepts Manual.
700 </para>
701 </section>
702
703 <section id='structure-build-tmp-log'>
704 <title><filename>build/tmp/log/</filename></title>
705
706 <para>
707 This directory contains general logs that are not otherwise placed using the
708 package's <filename><link linkend='var-WORKDIR'>WORKDIR</link></filename>.
709 Examples of logs are the output from the
710 <filename>do_check_pkg</filename> or
711 <filename>do_distro_check</filename> tasks.
712 Running a build does not necessarily mean this directory is created.
713 </para>
714 </section>
715
716 <section id='structure-build-tmp-work'>
717 <title><filename>build/tmp/work/</filename></title>
718
719 <para>
720 This directory contains architecture-specific work sub-directories
721 for packages built by BitBake.
722 All tasks execute from the appropriate work directory.
723 For example, the source for a particular package is unpacked,
724 patched, configured and compiled all within its own work directory.
725 Within the work directory, organization is based on the package group
726 and version for which the source is being compiled
727 as defined by the
728 <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>.
729 </para>
730
731 <para>
732 It is worth considering the structure of a typical work directory.
733 As an example, consider <filename>linux-yocto-kernel-3.0</filename>
734 on the machine <filename>qemux86</filename>
735 built within the Yocto Project.
736 For this package, a work directory of
737 <filename>tmp/work/qemux86-poky-linux/linux-yocto/3.0+git1+&lt;.....&gt;</filename>,
738 referred to as the <filename>WORKDIR</filename>, is created.
739 Within this directory, the source is unpacked to
740 <filename>linux-qemux86-standard-build</filename> and then patched by Quilt.
741 (See the
742 "<ulink url='&YOCTO_DOCS_DEV_URL;#using-a-quilt-workflow'>Using Quilt in Your Workflow</ulink>"
743 section in the Yocto Project Development Tasks Manual for more
744 information.)
745 Within the <filename>linux-qemux86-standard-build</filename> directory,
746 standard Quilt directories <filename>linux-3.0/patches</filename>
747 and <filename>linux-3.0/.pc</filename> are created,
748 and standard Quilt commands can be used.
749 </para>
750
751 <para>
752 There are other directories generated within <filename>WORKDIR</filename>.
753 The most important directory is <filename>WORKDIR/temp/</filename>,
754 which has log files for each task (<filename>log.do_*.pid</filename>)
755 and contains the scripts BitBake runs for each task
756 (<filename>run.do_*.pid</filename>).
757 The <filename>WORKDIR/image/</filename> directory is where "make
758 install" places its output that is then split into sub-packages
759 within <filename>WORKDIR/packages-split/</filename>.
760 </para>
761 </section>
762
763 <section id='structure-build-tmp-work-tunearch-recipename-version'>
764 <title><filename>build/tmp/work/<replaceable>tunearch</replaceable>/<replaceable>recipename</replaceable>/<replaceable>version</replaceable>/</filename></title>
765
766 <para>
767 The recipe work directory - <filename>${WORKDIR}</filename>.
768 </para>
769
770 <para>
771 As described earlier in the
772 "<link linkend='structure-build-tmp-sysroots'><filename>build/tmp/sysroots/</filename></link>"
773 section, beginning with the &DISTRO; release of the Yocto
774 Project, the OpenEmbedded build system builds each recipe in its
775 own work directory (i.e.
776 <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>).
777 The path to the work directory is constructed using the
778 architecture of the given build (e.g.
779 <link linkend='var-TUNE_PKGARCH'><filename>TUNE_PKGARCH</filename></link>,
780 <link linkend='var-MACHINE_ARCH'><filename>MACHINE_ARCH</filename></link>,
781 or "allarch"), the recipe name, and the version of the recipe (i.e.
782 <link linkend='var-PE'><filename>PE</filename></link><filename>:</filename><link linkend='var-PV'><filename>PV</filename></link><filename>-</filename><link linkend='var-PR'><filename>PR</filename></link>).
783 </para>
784
785 <para>
786 A number of key subdirectories exist within each recipe
787 work directory:
788 <itemizedlist>
789 <listitem><para>
790 <filename>${WORKDIR}/temp</filename>:
791 Contains the log files of each task executed for this
792 recipe, the "run" files for each executed task, which
793 contain the code run, and a
794 <filename>log.task_order</filename> file, which lists the
795 order in which tasks were executed.
796 </para></listitem>
797 <listitem><para>
798 <filename>${WORKDIR}/image</filename>:
799 Contains the output of the
800 <link linkend='ref-tasks-install'><filename>do_install</filename></link>
801 task, which corresponds to the
802 <filename>${</filename><link linkend='var-D'><filename>D</filename></link><filename>}</filename>
803 variable in that task.
804 </para></listitem>
805 <listitem><para>
806 <filename>${WORKDIR}/pseudo</filename>:
807 Contains the pseudo database and log for any tasks executed
808 under pseudo for the recipe.
809 </para></listitem>
810 <listitem><para>
811 <filename>${WORKDIR}/sysroot-destdir</filename>:
812 Contains the output of the
813 <link linkend='ref-tasks-populate_sysroot'><filename>do_populate_sysroot</filename></link>
814 task.
815 </para></listitem>
816 <listitem><para>
817 <filename>${WORKDIR}/package</filename>:
818 Contains the output of the
819 <link linkend='ref-tasks-package'><filename>do_package</filename></link>
820 task before the output is split into individual packages.
821 </para></listitem>
822 <listitem><para>
823 <filename>${WORKDIR}/packages-split</filename>:
824 Contains the output of the <filename>do_package</filename>
825 task after the output has been split into individual
826 packages.
827 Subdirectories exist for each individual package created
828 by the recipe.
829 </para></listitem>
830 <listitem><para>
831 <filename>${WORKDIR}/recipe-sysroot</filename>:
832 A directory populated with the target dependencies of the
833 recipe.
834 This directory looks like the target filesystem and
835 contains libraries that the recipe might need to link
836 against (e.g. the C library).
837 </para></listitem>
838 <listitem><para>
839 <filename>${WORKDIR}/recipe-sysroot-native</filename>:
840 A directory populated with the native dependencies of the
841 recipe.
842 This directory contains the tools the recipe needs to build
843 (e.g. the compiler, Autoconf, libtool, and so forth).
844 </para></listitem>
845 <listitem><para>
846 <filename>${WORKDIR}/build</filename>:
847 This subdirectory applies only to recipes that support
848 builds where the source is separate from the
849 build artifacts.
850 The OpenEmbedded build system uses this directory as a
851 separate build directory (i.e.
852 <filename>${</filename><link linkend='var-B'><filename>B</filename></link><filename>}</filename>).
853 </para></listitem>
854 </itemizedlist>
855 </para>
856 </section>
857
858 <section id='structure-build-work-shared'>
859 <title><filename>build/tmp/work-shared/</filename></title>
860
861 <para>
862 For efficiency, the OpenEmbedded build system creates and uses
863 this directory to hold recipes that share a work directory with
864 other recipes.
865 In practice, this is only used for <filename>gcc</filename>
866 and its variants (e.g. <filename>gcc-cross</filename>,
867 <filename>libgcc</filename>, <filename>gcc-runtime</filename>,
868 and so forth).
869 </para>
870 </section>
871</section>
872
873<section id='structure-meta'>
874 <title>The Metadata - <filename>meta/</filename></title>
875
876 <para>
877 As mentioned previously,
878 <link linkend='metadata'>Metadata</link> is the core
879 of the Yocto Project.
880 Metadata has several important subdivisions:
881 </para>
882
883 <section id='structure-meta-classes'>
884 <title><filename>meta/classes/</filename></title>
885
886 <para>
887 This directory contains the <filename>*.bbclass</filename> files.
888 Class files are used to abstract common code so it can be reused by multiple
889 packages.
890 Every package inherits the <filename>base.bbclass</filename> file.
891 Examples of other important classes are <filename>autotools.bbclass</filename>, which
892 in theory allows any Autotool-enabled package to work with the Yocto Project with minimal effort.
893 Another example is <filename>kernel.bbclass</filename> that contains common code and functions
894 for working with the Linux kernel.
895 Functions like image generation or packaging also have their specific class files
896 such as <filename>image.bbclass</filename>, <filename>rootfs_*.bbclass</filename> and
897 <filename>package*.bbclass</filename>.
898 </para>
899
900 <para>
901 For reference information on classes, see the
902 "<link linkend='ref-classes'>Classes</link>" chapter.
903 </para>
904 </section>
905
906 <section id='structure-meta-conf'>
907 <title><filename>meta/conf/</filename></title>
908
909 <para>
910 This directory contains the core set of configuration files that start from
911 <filename>bitbake.conf</filename> and from which all other configuration
912 files are included.
913 See the include statements at the end of the
914 <filename>bitbake.conf</filename> file and you will note that even
915 <filename>local.conf</filename> is loaded from there.
916 While <filename>bitbake.conf</filename> sets up the defaults, you can often override
917 these by using the (<filename>local.conf</filename>) file, machine file or
918 the distribution configuration file.
919 </para>
920 </section>
921
922 <section id='structure-meta-conf-machine'>
923 <title><filename>meta/conf/machine/</filename></title>
924
925 <para>
926 This directory contains all the machine configuration files.
927 If you set <filename>MACHINE = "qemux86"</filename>,
928 the OpenEmbedded build system looks for a <filename>qemux86.conf</filename> file in this
929 directory.
930 The <filename>include</filename> directory contains various data common to multiple machines.
931 If you want to add support for a new machine to the Yocto Project, look in this directory.
932 </para>
933 </section>
934
935 <section id='structure-meta-conf-distro'>
936 <title><filename>meta/conf/distro/</filename></title>
937
938 <para>
939 The contents of this directory controls any distribution-specific
940 configurations.
941 For the Yocto Project, the <filename>defaultsetup.conf</filename> is the main file here.
942 This directory includes the versions and the
943 <filename>SRCDATE</filename> definitions for applications that are configured here.
944 An example of an alternative configuration might be <filename>poky-bleeding.conf</filename>.
945 Although this file mainly inherits its configuration from Poky.
946 </para>
947 </section>
948
949 <section id='structure-meta-conf-machine-sdk'>
950 <title><filename>meta/conf/machine-sdk/</filename></title>
951
952 <para>
953 The OpenEmbedded build system searches this directory for
954 configuration files that correspond to the value of
955 <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>.
956 By default, 32-bit and 64-bit x86 files ship with the Yocto
957 Project that support some SDK hosts.
958 However, it is possible to extend that support to other SDK hosts
959 by adding additional configuration files in this subdirectory
960 within another layer.
961 </para>
962 </section>
963
964 <section id='structure-meta-files'>
965 <title><filename>meta/files/</filename></title>
966
967 <para>
968 This directory contains common license files and several text files
969 used by the build system.
970 The text files contain minimal device information and
971 lists of files and directories with known permissions.
972 </para>
973 </section>
974
975 <section id='structure-meta-lib'>
976 <title><filename>meta/lib/</filename></title>
977
978 <para>
979 This directory contains OpenEmbedded Python library code
980 used during the build process.
981 </para>
982 </section>
983
984 <section id='structure-meta-recipes-bsp'>
985 <title><filename>meta/recipes-bsp/</filename></title>
986
987 <para>
988 This directory contains anything linking to specific hardware or hardware
989 configuration information such as "u-boot" and "grub".
990 </para>
991 </section>
992
993 <section id='structure-meta-recipes-connectivity'>
994 <title><filename>meta/recipes-connectivity/</filename></title>
995
996 <para>
997 This directory contains libraries and applications related to communication with other devices.
998 </para>
999 </section>
1000
1001 <section id='structure-meta-recipes-core'>
1002 <title><filename>meta/recipes-core/</filename></title>
1003
1004 <para>
1005 This directory contains what is needed to build a basic working Linux image
1006 including commonly used dependencies.
1007 </para>
1008 </section>
1009
1010 <section id='structure-meta-recipes-devtools'>
1011 <title><filename>meta/recipes-devtools/</filename></title>
1012
1013 <para>
1014 This directory contains tools that are primarily used by the build system.
1015 The tools, however, can also be used on targets.
1016 </para>
1017 </section>
1018
1019 <section id='structure-meta-recipes-extended'>
1020 <title><filename>meta/recipes-extended/</filename></title>
1021
1022 <para>
1023 This directory contains non-essential applications that add features compared to the
1024 alternatives in core.
1025 You might need this directory for full tool functionality or for Linux Standard Base (LSB)
1026 compliance.
1027 </para>
1028 </section>
1029
1030 <section id='structure-meta-recipes-gnome'>
1031 <title><filename>meta/recipes-gnome/</filename></title>
1032
1033 <para>
1034 This directory contains all things related to the GTK+ application framework.
1035 </para>
1036 </section>
1037
1038 <section id='structure-meta-recipes-graphics'>
1039 <title><filename>meta/recipes-graphics/</filename></title>
1040
1041 <para>
1042 This directory contains X and other graphically related system libraries.
1043 </para>
1044 </section>
1045
1046 <section id='structure-meta-recipes-kernel'>
1047 <title><filename>meta/recipes-kernel/</filename></title>
1048
1049 <para>
1050 This directory contains the kernel and generic applications and libraries that
1051 have strong kernel dependencies.
1052 </para>
1053 </section>
1054
1055 <section id='structure-meta-recipes-lsb4'>
1056 <title><filename>meta/recipes-lsb4/</filename></title>
1057
1058 <para>
1059 This directory contains recipes specifically added to support
1060 the Linux Standard Base (LSB) version 4.x.
1061 </para>
1062 </section>
1063
1064 <section id='structure-meta-recipes-multimedia'>
1065 <title><filename>meta/recipes-multimedia/</filename></title>
1066
1067 <para>
1068 This directory contains codecs and support utilities for audio, images and video.
1069 </para>
1070 </section>
1071
1072 <section id='structure-meta-recipes-rt'>
1073 <title><filename>meta/recipes-rt/</filename></title>
1074
1075 <para>
1076 This directory contains package and image recipes for using and testing
1077 the <filename>PREEMPT_RT</filename> kernel.
1078 </para>
1079 </section>
1080
1081 <section id='structure-meta-recipes-sato'>
1082 <title><filename>meta/recipes-sato/</filename></title>
1083
1084 <para>
1085 This directory contains the Sato demo/reference UI/UX and its associated applications
1086 and configuration data.
1087 </para>
1088 </section>
1089
1090 <section id='structure-meta-recipes-support'>
1091 <title><filename>meta/recipes-support/</filename></title>
1092
1093 <para>
1094 This directory contains recipes used by other recipes, but that are
1095 not directly included in images (i.e. dependencies of other
1096 recipes).
1097 </para>
1098 </section>
1099
1100 <section id='structure-meta-site'>
1101 <title><filename>meta/site/</filename></title>
1102
1103 <para>
1104 This directory contains a list of cached results for various architectures.
1105 Because certain "autoconf" test results cannot be determined when cross-compiling due to
1106 the tests not able to run on a live system, the information in this directory is
1107 passed to "autoconf" for the various architectures.
1108 </para>
1109 </section>
1110
1111 <section id='structure-meta-recipes-txt'>
1112 <title><filename>meta/recipes.txt</filename></title>
1113
1114 <para>
1115 This file is a description of the contents of <filename>recipes-*</filename>.
1116 </para>
1117 </section>
1118</section>
1119
1120</chapter>
1121<!--
1122vim: expandtab tw=80 ts=4
1123-->
diff --git a/documentation/ref-manual/ref-style.css b/documentation/ref-manual/ref-style.css
deleted file mode 100644
index 622ceb8f7e..0000000000
--- a/documentation/ref-manual/ref-style.css
+++ /dev/null
@@ -1,1035 +0,0 @@
1/*
2
3 SPDX-License-Identifier: CC-BY-2.0-UK
4
5 Generic XHTML / DocBook XHTML CSS Stylesheet.
6
7 Browser wrangling and typographic design by
8 Oyvind Kolas / pippin@gimp.org
9
10 Customised for Poky by
11 Matthew Allum / mallum@o-hand.com
12
13 Thanks to:
14 Liam R. E. Quin
15 William Skaggs
16 Jakub Steiner
17
18 Structure
19 ---------
20
21 The stylesheet is divided into the following sections:
22
23 Positioning
24 Margins, paddings, width, font-size, clearing.
25 Decorations
26 Borders, style
27 Colors
28 Colors
29 Graphics
30 Graphical backgrounds
31 Nasty IE tweaks
32 Workarounds needed to make it work in internet explorer,
33 currently makes the stylesheet non validating, but up until
34 this point it is validating.
35 Mozilla extensions
36 Transparency for footer
37 Rounded corners on boxes
38
39*/
40
41
42 /*************** /
43 / Positioning /
44/ ***************/
45
46body {
47 font-family: Verdana, Sans, sans-serif;
48
49 min-width: 640px;
50 width: 80%;
51 margin: 0em auto;
52 padding: 2em 5em 5em 5em;
53 color: #333;
54}
55
56h1,h2,h3,h4,h5,h6,h7 {
57 font-family: Arial, Sans;
58 color: #00557D;
59 clear: both;
60}
61
62h1 {
63 font-size: 2em;
64 text-align: left;
65 padding: 0em 0em 0em 0em;
66 margin: 2em 0em 0em 0em;
67}
68
69h2.subtitle {
70 margin: 0.10em 0em 3.0em 0em;
71 padding: 0em 0em 0em 0em;
72 font-size: 1.8em;
73 padding-left: 20%;
74 font-weight: normal;
75 font-style: italic;
76}
77
78h2 {
79 margin: 2em 0em 0.66em 0em;
80 padding: 0.5em 0em 0em 0em;
81 font-size: 1.5em;
82 font-weight: bold;
83}
84
85h3.subtitle {
86 margin: 0em 0em 1em 0em;
87 padding: 0em 0em 0em 0em;
88 font-size: 142.14%;
89 text-align: right;
90}
91
92h3 {
93 margin: 1em 0em 0.5em 0em;
94 padding: 1em 0em 0em 0em;
95 font-size: 140%;
96 font-weight: bold;
97}
98
99h4 {
100 margin: 1em 0em 0.5em 0em;
101 padding: 1em 0em 0em 0em;
102 font-size: 120%;
103 font-weight: bold;
104}
105
106h5 {
107 margin: 1em 0em 0.5em 0em;
108 padding: 1em 0em 0em 0em;
109 font-size: 110%;
110 font-weight: bold;
111}
112
113h6 {
114 margin: 1em 0em 0em 0em;
115 padding: 1em 0em 0em 0em;
116 font-size: 110%;
117 font-weight: bold;
118}
119
120.authorgroup {
121 background-color: transparent;
122 background-repeat: no-repeat;
123 padding-top: 256px;
124 background-image: url("figures/poky-title.png");
125 background-position: left top;
126 margin-top: -256px;
127 padding-right: 50px;
128 margin-left: 0px;
129 text-align: right;
130 width: 740px;
131}
132
133h3.author {
134 margin: 0em 0me 0em 0em;
135 padding: 0em 0em 0em 0em;
136 font-weight: normal;
137 font-size: 100%;
138 color: #333;
139 clear: both;
140}
141
142.author tt.email {
143 font-size: 66%;
144}
145
146.titlepage hr {
147 width: 0em;
148 clear: both;
149}
150
151.revhistory {
152 padding-top: 2em;
153 clear: both;
154}
155
156.toc,
157.list-of-tables,
158.list-of-examples,
159.list-of-figures {
160 padding: 1.33em 0em 2.5em 0em;
161 color: #00557D;
162}
163
164.toc p,
165.list-of-tables p,
166.list-of-figures p,
167.list-of-examples p {
168 padding: 0em 0em 0em 0em;
169 padding: 0em 0em 0.3em;
170 margin: 1.5em 0em 0em 0em;
171}
172
173.toc p b,
174.list-of-tables p b,
175.list-of-figures p b,
176.list-of-examples p b{
177 font-size: 100.0%;
178 font-weight: bold;
179}
180
181.toc dl,
182.list-of-tables dl,
183.list-of-figures dl,
184.list-of-examples dl {
185 margin: 0em 0em 0.5em 0em;
186 padding: 0em 0em 0em 0em;
187}
188
189.toc dt {
190 margin: 0em 0em 0em 0em;
191 padding: 0em 0em 0em 0em;
192}
193
194.toc dd {
195 margin: 0em 0em 0em 2.6em;
196 padding: 0em 0em 0em 0em;
197}
198
199/* Use this set when you decide to get the images in for variables.
200
201div.glossary dl,
202div.variablelist dl {
203}
204
205.glossary dl dt,
206.variablelist dl dt,
207.variablelist dl dt span.term {
208 font-weight: normal;
209 width: 0em;
210 text-align: right;
211}
212
213.variablelist dl dt {
214 margin-top: 0.5em;
215}
216
217.glossary dl dd,
218.variablelist dl dd {
219 margin-top: 0em;
220 margin-left: 15.5em;
221 margin-bottom: 2em;
222}
223
224.glossary dd p,
225.variablelist dd p {
226 margin-top: 0em;
227 margin-bottom: 1em;
228}
229
230.glossdeffirst {
231 text-indent: -70px;
232}
233*/
234
235/* Start of non-image set */
236
237div.glossary dl,
238div.variablelist dl {
239}
240
241.glossary dl dt,
242.variablelist dl dt,
243.variablelist dl dt span.term {
244 font-weight: normal;
245 width: 20em;
246 text-align: right;
247}
248
249.variablelist dl dt {
250 margin-top: 0.5em;
251}
252
253.glossary dl dd,
254.variablelist dl dd {
255 margin-top: 0em;
256 margin-left: 25.5em;
257}
258
259.glossary dd p,
260.variablelist dd p {
261 margin-top: 0em;
262 margin-bottom: 1em;
263}
264
265.glossdeffirst {
266 text-indent: 0px;
267}
268
269/* End of non-image set */
270
271div.calloutlist table td {
272 padding: 0em 0em 0em 0em;
273 margin: 0em 0em 0em 0em;
274}
275
276div.calloutlist table td p {
277 margin-top: 0em;
278 margin-bottom: 1em;
279}
280
281div p.copyright {
282 text-align: left;
283}
284
285div.legalnotice p.legalnotice-title {
286 margin-bottom: 0em;
287}
288
289p {
290 line-height: 1.5em;
291 margin-top: 0em;
292
293}
294
295dl {
296 padding-top: 0em;
297}
298
299hr {
300 border: solid 1px;
301}
302
303
304.mediaobject,
305.mediaobjectco {
306 text-align: center;
307}
308
309img {
310 border: none;
311}
312
313ul {
314 padding: 0em 0em 0em 1.5em;
315}
316
317ul li {
318 padding: 0em 0em 0em 0em;
319}
320
321ul li p {
322 text-align: left;
323}
324
325table {
326 width :100%;
327}
328
329th {
330 padding: 0.25em;
331 text-align: left;
332 font-weight: normal;
333 vertical-align: top;
334}
335
336td {
337 padding: 0.25em;
338 vertical-align: top;
339}
340
341p a[id] {
342 margin: 0px;
343 padding: 0px;
344 display: inline;
345 background-image: none;
346}
347
348a {
349 text-decoration: underline;
350 color: #444;
351}
352
353pre {
354 overflow: auto;
355}
356
357a:hover {
358 text-decoration: underline;
359 /*font-weight: bold;*/
360}
361
362/* This style defines how the permalink character
363 appears by itself and when hovered over with
364 the mouse. */
365
366[alt='Permalink'] { color: #eee; }
367[alt='Permalink']:hover { color: black; }
368
369
370div.informalfigure,
371div.informalexample,
372div.informaltable,
373div.figure,
374div.table,
375div.example {
376 margin: 1em 0em;
377 padding: 1em;
378 page-break-inside: avoid;
379}
380
381
382div.informalfigure p.title b,
383div.informalexample p.title b,
384div.informaltable p.title b,
385div.figure p.title b,
386div.example p.title b,
387div.table p.title b{
388 padding-top: 0em;
389 margin-top: 0em;
390 font-size: 100%;
391 font-weight: normal;
392}
393
394.mediaobject .caption,
395.mediaobject .caption p {
396 text-align: center;
397 font-size: 80%;
398 padding-top: 0.5em;
399 padding-bottom: 0.5em;
400}
401
402.epigraph {
403 padding-left: 55%;
404 margin-bottom: 1em;
405}
406
407.epigraph p {
408 text-align: left;
409}
410
411.epigraph .quote {
412 font-style: italic;
413}
414.epigraph .attribution {
415 font-style: normal;
416 text-align: right;
417}
418
419span.application {
420 font-style: italic;
421}
422
423.programlisting {
424 font-family: monospace;
425 font-size: 80%;
426 white-space: pre;
427 margin: 1.33em 0em;
428 padding: 1.33em;
429}
430
431.tip,
432.warning,
433.caution,
434.note {
435 margin-top: 1em;
436 margin-bottom: 1em;
437
438}
439
440/* force full width of table within div */
441.tip table,
442.warning table,
443.caution table,
444.note table {
445 border: none;
446 width: 100%;
447}
448
449
450.tip table th,
451.warning table th,
452.caution table th,
453.note table th {
454 padding: 0.8em 0.0em 0.0em 0.0em;
455 margin : 0em 0em 0em 0em;
456}
457
458.tip p,
459.warning p,
460.caution p,
461.note p {
462 margin-top: 0.5em;
463 margin-bottom: 0.5em;
464 padding-right: 1em;
465 text-align: left;
466}
467
468.acronym {
469 text-transform: uppercase;
470}
471
472b.keycap,
473.keycap {
474 padding: 0.09em 0.3em;
475 margin: 0em;
476}
477
478.itemizedlist li {
479 clear: none;
480}
481
482.filename {
483 font-size: medium;
484 font-family: Courier, monospace;
485}
486
487
488div.navheader, div.heading{
489 position: absolute;
490 left: 0em;
491 top: 0em;
492 width: 100%;
493 background-color: #cdf;
494 width: 100%;
495}
496
497div.navfooter, div.footing{
498 position: fixed;
499 left: 0em;
500 bottom: 0em;
501 background-color: #eee;
502 width: 100%;
503}
504
505
506div.navheader td,
507div.navfooter td {
508 font-size: 66%;
509}
510
511div.navheader table th {
512 /*font-family: Georgia, Times, serif;*/
513 /*font-size: x-large;*/
514 font-size: 80%;
515}
516
517div.navheader table {
518 border-left: 0em;
519 border-right: 0em;
520 border-top: 0em;
521 width: 100%;
522}
523
524div.navfooter table {
525 border-left: 0em;
526 border-right: 0em;
527 border-bottom: 0em;
528 width: 100%;
529}
530
531div.navheader table td a,
532div.navfooter table td a {
533 color: #777;
534 text-decoration: none;
535}
536
537/* normal text in the footer */
538div.navfooter table td {
539 color: black;
540}
541
542div.navheader table td a:visited,
543div.navfooter table td a:visited {
544 color: #444;
545}
546
547
548/* links in header and footer */
549div.navheader table td a:hover,
550div.navfooter table td a:hover {
551 text-decoration: underline;
552 background-color: transparent;
553 color: #33a;
554}
555
556div.navheader hr,
557div.navfooter hr {
558 display: none;
559}
560
561
562.qandaset tr.question td p {
563 margin: 0em 0em 1em 0em;
564 padding: 0em 0em 0em 0em;
565}
566
567.qandaset tr.answer td p {
568 margin: 0em 0em 1em 0em;
569 padding: 0em 0em 0em 0em;
570}
571.answer td {
572 padding-bottom: 1.5em;
573}
574
575.emphasis {
576 font-weight: bold;
577}
578
579
580 /************* /
581 / decorations /
582/ *************/
583
584.titlepage {
585}
586
587.part .title {
588}
589
590.subtitle {
591 border: none;
592}
593
594/*
595h1 {
596 border: none;
597}
598
599h2 {
600 border-top: solid 0.2em;
601 border-bottom: solid 0.06em;
602}
603
604h3 {
605 border-top: 0em;
606 border-bottom: solid 0.06em;
607}
608
609h4 {
610 border: 0em;
611 border-bottom: solid 0.06em;
612}
613
614h5 {
615 border: 0em;
616}
617*/
618
619.programlisting {
620 border: solid 1px;
621}
622
623div.figure,
624div.table,
625div.informalfigure,
626div.informaltable,
627div.informalexample,
628div.example {
629 border: 1px solid;
630}
631
632
633
634.tip,
635.warning,
636.caution,
637.note {
638 border: 1px solid;
639}
640
641.tip table th,
642.warning table th,
643.caution table th,
644.note table th {
645 border-bottom: 1px solid;
646}
647
648.question td {
649 border-top: 1px solid black;
650}
651
652.answer {
653}
654
655
656b.keycap,
657.keycap {
658 border: 1px solid;
659}
660
661
662div.navheader, div.heading{
663 border-bottom: 1px solid;
664}
665
666
667div.navfooter, div.footing{
668 border-top: 1px solid;
669}
670
671 /********* /
672 / colors /
673/ *********/
674
675body {
676 color: #333;
677 background: white;
678}
679
680a {
681 background: transparent;
682}
683
684a:hover {
685 background-color: #dedede;
686}
687
688
689h1,
690h2,
691h3,
692h4,
693h5,
694h6,
695h7,
696h8 {
697 background-color: transparent;
698}
699
700hr {
701 border-color: #aaa;
702}
703
704
705.tip, .warning, .caution, .note {
706 border-color: #fff;
707}
708
709
710.tip table th,
711.warning table th,
712.caution table th,
713.note table th {
714 border-bottom-color: #fff;
715}
716
717
718.warning {
719 background-color: #f0f0f2;
720}
721
722.caution {
723 background-color: #f0f0f2;
724}
725
726.tip {
727 background-color: #f0f0f2;
728}
729
730.note {
731 background-color: #f0f0f2;
732}
733
734.glossary dl dt,
735.variablelist dl dt,
736.variablelist dl dt span.term {
737 color: #044;
738}
739
740div.figure,
741div.table,
742div.example,
743div.informalfigure,
744div.informaltable,
745div.informalexample {
746 border-color: #aaa;
747}
748
749pre.programlisting {
750 color: black;
751 background-color: #fff;
752 border-color: #aaa;
753 border-width: 2px;
754}
755
756.guimenu,
757.guilabel,
758.guimenuitem {
759 background-color: #eee;
760}
761
762
763b.keycap,
764.keycap {
765 background-color: #eee;
766 border-color: #999;
767}
768
769
770div.navheader {
771 border-color: black;
772}
773
774
775div.navfooter {
776 border-color: black;
777}
778
779.writernotes {
780 color: red;
781}
782
783
784 /*********** /
785 / graphics /
786/ ***********/
787
788/*
789body {
790 background-image: url("images/body_bg.jpg");
791 background-attachment: fixed;
792}
793
794.navheader,
795.note,
796.tip {
797 background-image: url("images/note_bg.jpg");
798 background-attachment: fixed;
799}
800
801.warning,
802.caution {
803 background-image: url("images/warning_bg.jpg");
804 background-attachment: fixed;
805}
806
807.figure,
808.informalfigure,
809.example,
810.informalexample,
811.table,
812.informaltable {
813 background-image: url("images/figure_bg.jpg");
814 background-attachment: fixed;
815}
816
817*/
818h1,
819h2,
820h3,
821h4,
822h5,
823h6,
824h7{
825}
826
827/*
828Example of how to stick an image as part of the title.
829
830div.article .titlepage .title
831{
832 background-image: url("figures/white-on-black.png");
833 background-position: center;
834 background-repeat: repeat-x;
835}
836*/
837
838div.preface .titlepage .title,
839div.colophon .title,
840div.chapter .titlepage .title,
841div.article .titlepage .title
842{
843}
844
845div.section div.section .titlepage .title,
846div.sect2 .titlepage .title {
847 background: none;
848}
849
850
851h1.title {
852 background-color: transparent;
853 background-image: url("figures/poky-title.png");
854 background-repeat: no-repeat;
855 height: 256px;
856 text-indent: -9000px;
857 overflow:hidden;
858}
859
860h2.subtitle {
861 background-color: transparent;
862 text-indent: -9000px;
863 overflow:hidden;
864 width: 0px;
865 display: none;
866}
867
868 /*************************************** /
869 / pippin.gimp.org specific alterations /
870/ ***************************************/
871
872/*
873div.heading, div.navheader {
874 color: #777;
875 font-size: 80%;
876 padding: 0;
877 margin: 0;
878 text-align: left;
879 position: absolute;
880 top: 0px;
881 left: 0px;
882 width: 100%;
883 height: 50px;
884 background: url('/gfx/heading_bg.png') transparent;
885 background-repeat: repeat-x;
886 background-attachment: fixed;
887 border: none;
888}
889
890div.heading a {
891 color: #444;
892}
893
894div.footing, div.navfooter {
895 border: none;
896 color: #ddd;
897 font-size: 80%;
898 text-align:right;
899
900 width: 100%;
901 padding-top: 10px;
902 position: absolute;
903 bottom: 0px;
904 left: 0px;
905
906 background: url('/gfx/footing_bg.png') transparent;
907}
908*/
909
910
911
912 /****************** /
913 / nasty ie tweaks /
914/ ******************/
915
916/*
917div.heading, div.navheader {
918 width:expression(document.body.clientWidth + "px");
919}
920
921div.footing, div.navfooter {
922 width:expression(document.body.clientWidth + "px");
923 margin-left:expression("-5em");
924}
925body {
926 padding:expression("4em 5em 0em 5em");
927}
928*/
929
930 /**************************************** /
931 / mozilla vendor specific css extensions /
932/ ****************************************/
933/*
934div.navfooter, div.footing{
935 -moz-opacity: 0.8em;
936}
937
938div.figure,
939div.table,
940div.informalfigure,
941div.informaltable,
942div.informalexample,
943div.example,
944.tip,
945.warning,
946.caution,
947.note {
948 -moz-border-radius: 0.5em;
949}
950
951b.keycap,
952.keycap {
953 -moz-border-radius: 0.3em;
954}
955*/
956
957table tr td table tr td {
958 display: none;
959}
960
961
962hr {
963 display: none;
964}
965
966table {
967 border: 0em;
968}
969
970 .photo {
971 float: right;
972 margin-left: 1.5em;
973 margin-bottom: 1.5em;
974 margin-top: 0em;
975 max-width: 17em;
976 border: 1px solid gray;
977 padding: 3px;
978 background: white;
979}
980 .seperator {
981 padding-top: 2em;
982 clear: both;
983 }
984
985 #validators {
986 margin-top: 5em;
987 text-align: right;
988 color: #777;
989 }
990 @media print {
991 body {
992 font-size: 8pt;
993 }
994 .noprint {
995 display: none;
996 }
997 }
998
999
1000.tip,
1001.note {
1002 background: #f0f0f2;
1003 color: #333;
1004 padding: 20px;
1005 margin: 20px;
1006}
1007
1008.tip h3,
1009.note h3 {
1010 padding: 0em;
1011 margin: 0em;
1012 font-size: 2em;
1013 font-weight: bold;
1014 color: #333;
1015}
1016
1017.tip a,
1018.note a {
1019 color: #333;
1020 text-decoration: underline;
1021}
1022
1023.footnote {
1024 font-size: small;
1025 color: #333;
1026}
1027
1028/* Changes the announcement text */
1029.tip h3,
1030.warning h3,
1031.caution h3,
1032.note h3 {
1033 font-size:large;
1034 color: #00557D;
1035}
diff --git a/documentation/ref-manual/ref-system-requirements.xml b/documentation/ref-manual/ref-system-requirements.xml
deleted file mode 100644
index ac8b0032db..0000000000
--- a/documentation/ref-manual/ref-system-requirements.xml
+++ /dev/null
@@ -1,577 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='ref-manual-system-requirements'>
7<title>System Requirements</title>
8
9 <para>
10 Welcome to the Yocto Project Reference Manual!
11 This manual provides reference information for the current release
12 of the Yocto Project, and
13 is most effectively used after you have an understanding
14 of the basics of the Yocto Project.
15 The manual is neither meant to be read as a starting point to the
16 Yocto Project, nor read from start to finish.
17 Rather, use this manual to find variable definitions, class
18 descriptions, and so forth as needed during the course of using
19 the Yocto Project.
20 </para>
21
22 <para>
23 For introductory information on the Yocto Project, see the
24 <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink> and the
25 "<ulink url='&YOCTO_DOCS_OM_URL;#overview-development-environment'>Yocto Project Development Environment</ulink>"
26 chapter in the Yocto Project Overview and Concepts Manual.
27 </para>
28
29 <para>
30 If you want to use the Yocto Project to quickly build an image
31 without having to understand concepts, work through the
32 <ulink url='&YOCTO_DOCS_BRIEF_URL;'>Yocto Project Quick Build</ulink>
33 document.
34 You can find "how-to" information in the
35 <ulink url='&YOCTO_DOCS_DEV_URL;'>Yocto Project Development Tasks Manual</ulink>.
36 You can find Yocto Project overview and conceptual information in the
37 <ulink url='&YOCTO_DOCS_OM_URL;'>Yocto Project Overview and Concepts Manual</ulink>.
38 <note><title>Tip</title>
39 For more information about the Yocto Project Documentation set,
40 see the
41 "<link linkend='resources-links-and-related-documentation'>Links and Related Documentation</link>"
42 section.
43 </note>
44 </para>
45
46 <section id='detailed-supported-distros'>
47 <title>Supported Linux Distributions</title>
48
49 <para>
50 Currently, the Yocto Project is supported on the following
51 distributions:
52 <note><title>Notes</title>
53 <itemizedlist>
54 <listitem><para>
55 Yocto Project releases are tested against the stable
56 Linux distributions in the following list.
57 The Yocto Project should work on other distributions but
58 validation is not performed against them.
59 </para></listitem>
60 <listitem><para>
61 In particular, the Yocto Project does not support
62 and currently has no plans to support
63 rolling-releases or development distributions due to
64 their constantly changing nature.
65 We welcome patches and bug reports, but keep in mind
66 that our priority is on the supported platforms listed
67 below.
68 </para></listitem>
69 <listitem><para>
70 You may use Windows Subsystem For Linux v2 to set up a build
71 host using Windows 10, but validation is not performed
72 against build hosts using WSLv2.
73 <note>
74 The Yocto Project is not compatible with WSLv1, it is
75 compatible but not officially supported nor validated
76 with WSLv2, if you still decide to use WSL please upgrade
77 to WSLv2.
78 </note>
79 </para></listitem>
80 <listitem><para>
81 If you encounter problems, please go to
82 <ulink url='&YOCTO_BUGZILLA_URL;'>Yocto Project Bugzilla</ulink>
83 and submit a bug.
84 We are interested in hearing about your experience.
85 For information on how to submit a bug, see the
86 Yocto Project
87 <ulink url='&YOCTO_WIKI_URL;/wiki/Bugzilla_Configuration_and_Bug_Tracking'>Bugzilla wiki page</ulink>
88 and the
89 "<ulink url='&YOCTO_DOCS_DEV_URL;#submitting-a-defect-against-the-yocto-project'>Submitting a Defect Against the Yocto Project</ulink>"
90 section in the Yocto Project Development Tasks Manual.
91 </para></listitem>
92 </itemizedlist>
93 </note>
94 <itemizedlist>
95 <listitem><para>Ubuntu 16.04 (LTS)</para></listitem>
96 <listitem><para>Ubuntu 18.04 (LTS)</para></listitem>
97 <listitem><para>Ubuntu 20.04</para></listitem>
98 <listitem><para>Fedora 30</para></listitem>
99 <listitem><para>Fedora 31</para></listitem>
100 <listitem><para>Fedora 32</para></listitem>
101 <listitem><para>CentOS 7.x</para></listitem>
102 <listitem><para>CentOS 8.x</para></listitem>
103 <listitem><para>Debian GNU/Linux 8.x (Jessie)</para></listitem>
104 <listitem><para>Debian GNU/Linux 9.x (Stretch)</para></listitem>
105 <listitem><para>Debian GNU/Linux 10.x (Buster)</para></listitem>
106 <listitem><para>OpenSUSE Leap 15.1</para></listitem>
107 </itemizedlist>
108 </para>
109
110 <note>
111 While the Yocto Project Team attempts to ensure all Yocto Project
112 releases are one hundred percent compatible with each officially
113 supported Linux distribution, instances might exist where you
114 encounter a problem while using the Yocto Project on a specific
115 distribution.
116 </note>
117 </section>
118
119 <section id='required-packages-for-the-build-host'>
120 <title>Required Packages for the Build Host</title>
121
122 <para>
123 The list of packages you need on the host development system can
124 be large when covering all build scenarios using the Yocto Project.
125 This section describes required packages according to
126 Linux distribution and function.
127 </para>
128
129 <section id='ubuntu-packages'>
130 <title>Ubuntu and Debian</title>
131
132 <para>
133 The following list shows the required packages by function
134 given a supported Ubuntu or Debian Linux distribution:
135 <note><title>Notes</title>
136 <itemizedlist>
137 <listitem><para>
138 If your build system has the
139 <filename>oss4-dev</filename> package installed, you
140 might experience QEMU build failures due to the package
141 installing its own custom
142 <filename>/usr/include/linux/soundcard.h</filename> on
143 the Debian system.
144 If you run into this situation, either of the following
145 solutions exist:
146 <literallayout class='monospaced'>
147 $ sudo apt-get build-dep qemu
148 $ sudo apt-get remove oss4-dev
149 </literallayout>
150 </para></listitem>
151 <listitem><para>
152 For Debian-8, <filename>python3-git</filename> and <filename>pylint3</filename> are no longer available via <filename>apt-get</filename>.
153 <literallayout class='monospaced'>
154 $ sudo pip3 install GitPython pylint==1.9.5
155 </literallayout>
156 </para></listitem>
157 </itemizedlist>
158 </note>
159 <itemizedlist>
160 <listitem><para><emphasis>Essentials:</emphasis>
161 Packages needed to build an image on a headless
162 system:
163 <literallayout class='monospaced'>
164 $ sudo apt-get install &UBUNTU_HOST_PACKAGES_ESSENTIAL;
165 </literallayout></para></listitem>
166 <listitem><para><emphasis>Documentation:</emphasis>
167 Packages needed if you are going to build out the
168 Yocto Project documentation manuals:
169 <literallayout class='monospaced'>
170 $ sudo apt-get install make xsltproc docbook-utils fop dblatex xmlto
171 </literallayout></para></listitem>
172 </itemizedlist>
173 </para>
174 </section>
175
176 <section id='fedora-packages'>
177 <title>Fedora Packages</title>
178
179 <para>
180 The following list shows the required packages by function
181 given a supported Fedora Linux distribution:
182 <itemizedlist>
183 <listitem><para><emphasis>Essentials:</emphasis>
184 Packages needed to build an image for a headless
185 system:
186 <literallayout class='monospaced'>
187 $ sudo dnf install &FEDORA_HOST_PACKAGES_ESSENTIAL;
188 </literallayout></para></listitem>
189 <listitem><para><emphasis>Documentation:</emphasis>
190 Packages needed if you are going to build out the
191 Yocto Project documentation manuals:
192 <literallayout class='monospaced'>
193 $ sudo dnf install docbook-style-dsssl docbook-style-xsl \
194 docbook-dtds docbook-utils fop libxslt dblatex xmlto
195 </literallayout></para></listitem>
196 </itemizedlist>
197 </para>
198 </section>
199
200 <section id='opensuse-packages'>
201 <title>openSUSE Packages</title>
202
203 <para>
204 The following list shows the required packages by function
205 given a supported openSUSE Linux distribution:
206 <itemizedlist>
207 <listitem><para><emphasis>Essentials:</emphasis>
208 Packages needed to build an image for a headless
209 system:
210 <literallayout class='monospaced'>
211 $ sudo zypper install &OPENSUSE_HOST_PACKAGES_ESSENTIAL;
212 </literallayout></para></listitem>
213 <listitem><para><emphasis>Documentation:</emphasis>
214 Packages needed if you are going to build out the
215 Yocto Project documentation manuals:
216 <literallayout class='monospaced'>
217 $ sudo zypper install dblatex xmlto
218 </literallayout></para></listitem>
219 </itemizedlist>
220 </para>
221 </section>
222
223 <section id='centos-7-packages'>
224 <title>CentOS-7 Packages</title>
225
226 <para>
227 The following list shows the required packages by function
228 given a supported CentOS-7 Linux distribution:
229 <itemizedlist>
230 <listitem><para><emphasis>Essentials:</emphasis>
231 Packages needed to build an image for a headless
232 system:
233 <literallayout class='monospaced'>
234 $ sudo yum install &CENTOS7_HOST_PACKAGES_ESSENTIAL;
235 </literallayout>
236 <note><title>Notes</title>
237 <itemizedlist>
238 <listitem><para>
239 Extra Packages for Enterprise Linux
240 (i.e. <filename>epel-release</filename>)
241 is a collection of packages from Fedora
242 built on RHEL/CentOS for easy installation
243 of packages not included in enterprise
244 Linux by default.
245 You need to install these packages
246 separately.
247 </para></listitem>
248 <listitem><para>
249 The <filename>makecache</filename> command
250 consumes additional Metadata from
251 <filename>epel-release</filename>.
252 </para></listitem>
253 </itemizedlist>
254 </note>
255 </para></listitem>
256 <listitem><para><emphasis>Documentation:</emphasis>
257 Packages needed if you are going to build out the
258 Yocto Project documentation manuals:
259 <literallayout class='monospaced'>
260 $ sudo yum install docbook-style-dsssl docbook-style-xsl \
261 docbook-dtds docbook-utils fop libxslt dblatex xmlto
262 </literallayout>
263 </para></listitem>
264 </itemizedlist>
265 </para>
266 </section>
267
268 <section id='centos-8-packages'>
269 <title>CentOS-8 Packages</title>
270
271 <para>
272 The following list shows the required packages by function
273 given a supported CentOS-8 Linux distribution:
274 <itemizedlist>
275 <listitem><para><emphasis>Essentials:</emphasis>
276 Packages needed to build an image for a headless
277 system:
278 <literallayout class='monospaced'>
279 $ sudo dnf install &CENTOS8_HOST_PACKAGES_ESSENTIAL;
280 </literallayout>
281 <note><title>Notes</title>
282 <itemizedlist>
283 <listitem><para>
284 Extra Packages for Enterprise Linux
285 (i.e. <filename>epel-release</filename>)
286 is a collection of packages from Fedora
287 built on RHEL/CentOS for easy installation
288 of packages not included in enterprise
289 Linux by default.
290 You need to install these packages
291 separately.
292 </para></listitem>
293 <listitem><para>
294 The <filename>PowerTools</filename> repo
295 provides additional packages such as
296 <filename>rpcgen</filename> and
297 <filename>texinfo</filename>.
298 </para></listitem>
299 <listitem><para>
300 The <filename>makecache</filename> command
301 consumes additional Metadata from
302 <filename>epel-release</filename>.
303 </para></listitem>
304 </itemizedlist>
305 </note>
306 </para></listitem>
307 <listitem><para><emphasis>Documentation:</emphasis>
308 Packages needed if you are going to build out the
309 Yocto Project documentation manuals:
310 <literallayout class='monospaced'>
311 $ sudo dnf install docbook-style-dsssl docbook-style-xsl \
312 docbook-dtds docbook-utils fop libxslt dblatex xmlto
313 </literallayout>
314 </para></listitem>
315 </itemizedlist>
316 </para>
317 </section>
318 </section>
319
320 <section id='required-git-tar-python-and-gcc-versions'>
321 <title>Required Git, tar, Python and gcc Versions</title>
322
323 <para>
324 In order to use the build system, your host development system
325 must meet the following version requirements for Git, tar, and
326 Python:
327 <itemizedlist>
328 <listitem><para>Git 1.8.3.1 or greater</para></listitem>
329 <listitem><para>tar 1.28 or greater</para></listitem>
330 <listitem><para>Python 3.5.0 or greater</para></listitem>
331 </itemizedlist>
332 </para>
333
334 <para>
335 If your host development system does not meet all these requirements,
336 you can resolve this by installing a <filename>buildtools</filename>
337 tarball that contains these tools.
338 You can get the tarball one of two ways: download a pre-built
339 tarball or use BitBake to build the tarball.
340 </para>
341
342 <para>
343 In addition, your host development system must meet the following
344 version requirement for gcc:
345 <itemizedlist>
346 <listitem><para>gcc 5.0 or greater</para></listitem>
347 </itemizedlist>
348 </para>
349
350 <para>
351 If your host development system does not meet this requirement,
352 you can resolve this by installing a <filename>buildtools-extended</filename>
353 tarball that contains additional tools, the equivalent of <filename>buildtools-essential</filename>.
354 </para>
355 <section id='installing-a-pre-built-buildtools-tarball-with-install-buildtools-script'>
356 <title>Installing a Pre-Built <filename>buildtools</filename> Tarball with <filename>install-buildtools</filename> script</title>
357
358 <para>
359 The <filename>install-buildtools</filename> script is the easiest
360 of the three methods by which you can get these tools. It downloads
361 a pre-built buildtools installer and automatically installs the tools
362 for you:
363 <orderedlist>
364 <listitem><para>
365 Execute the <filename>install-buildtools</filename> script.
366 Here is an example:
367 <literallayout class='monospaced'>
368 $ cd poky
369 $ scripts/install-buildtools --without-extended-buildtools \
370 --base-url &YOCTO_DL_URL;/releases/yocto \
371 --release yocto-&DISTRO; \
372 --installer-version &DISTRO;
373 </literallayout>
374 <para>
375 During execution, the buildtools tarball will be downloaded,
376 the checksum of the download will be verified, the installer
377 will be run for you, and some basic checks will be run to
378 to make sure the installation is functional.
379 </para>
380 <para>
381 To avoid the need of <filename>sudo</filename> privileges,
382 the <filename>install-buildtools</filename> script will
383 by default tell the installer to install in:
384 <literallayout class='monospaced'>
385 <replaceable>/path/to/</replaceable>poky/buildtools
386 </literallayout>
387 </para>
388 <para>
389 If your host development system needs the additional tools
390 provided in the <filename>buildtools-extended</filename>
391 tarball, you can instead execute the
392 <filename>install-buildtools</filename> script with the
393 default parameters:
394 <literallayout class='monospaced'>
395 $ cd poky
396 $ scripts/install-buildtools
397 </literallayout>
398 </para>
399 </para></listitem>
400 <listitem><para>
401 Source the tools environment setup script by using a
402 command like the following:
403 <literallayout class='monospaced'>
404 $ source <replaceable>/path/to/</replaceable>poky/buildtools/environment-setup-x86_64-pokysdk-linux
405 </literallayout>
406 Of course, you need to supply your installation directory and be
407 sure to use the right file (i.e. i586 or x86_64).
408 </para>
409 <para>
410 After you have sourced the setup script,
411 the tools are added to <filename>PATH</filename>
412 and any other environment variables required to run the
413 tools are initialized.
414 The results are working versions versions of Git, tar,
415 Python and <filename>chrpath</filename>. And in the case of
416 the <filename>buildtools-extended</filename> tarball, additional
417 working versions of tools including <filename>gcc</filename>,
418 <filename>make</filename> and the other tools included in
419 <filename>packagegroup-core-buildessential</filename>.
420 </para></listitem>
421 </orderedlist>
422 </para>
423 </section>
424
425 <section id='downloading-a-pre-built-buildtools-tarball'>
426 <title>Downloading a Pre-Built <filename>buildtools</filename> Tarball</title>
427
428 <para>
429 Downloading and running a pre-built buildtools installer is
430 the easiest of the two methods by which you can get these tools:
431 <orderedlist>
432 <listitem><para>
433 Locate and download the <filename>*.sh</filename> at
434 <ulink url='&YOCTO_RELEASE_DL_URL;/buildtools/'></ulink>.
435 </para></listitem>
436 <listitem><para>
437 Execute the installation script.
438 Here is an example for the traditional installer:
439 <literallayout class='monospaced'>
440 $ sh ~/Downloads/x86_64-buildtools-nativesdk-standalone-&DISTRO;.sh
441 </literallayout>
442 Here is an example for the extended installer:
443 <literallayout class='monospaced'>
444 $ sh ~/Downloads/x86_64-buildtools-extended-nativesdk-standalone-&DISTRO;.sh
445 </literallayout>
446 During execution, a prompt appears that allows you to
447 choose the installation directory.
448 For example, you could choose the following:
449 <literallayout class='monospaced'>
450 /home/<replaceable>your-username</replaceable>/buildtools
451 </literallayout>
452 </para></listitem>
453 <listitem><para>
454 Source the tools environment setup script by using a
455 command like the following:
456 <literallayout class='monospaced'>
457 $ source /home/<replaceable>your_username</replaceable>/buildtools/environment-setup-i586-poky-linux
458 </literallayout>
459 Of course, you need to supply your installation directory and be
460 sure to use the right file (i.e. i585 or x86-64).
461 </para>
462 <para>
463 After you have sourced the setup script,
464 the tools are added to <filename>PATH</filename>
465 and any other environment variables required to run the
466 tools are initialized.
467 The results are working versions versions of Git, tar,
468 Python and <filename>chrpath</filename>. And in the case of
469 the <filename>buildtools-extended</filename> tarball, additional
470 working versions of tools including <filename>gcc</filename>,
471 <filename>make</filename> and the other tools included in
472 <filename>packagegroup-core-buildessential</filename>.
473 </para></listitem>
474 </orderedlist>
475 </para>
476 </section>
477
478 <section id='building-your-own-buildtools-tarball'>
479 <title>Building Your Own <filename>buildtools</filename> Tarball</title>
480
481 <para>
482 Building and running your own buildtools installer applies
483 only when you have a build host that can already run BitBake.
484 In this case, you use that machine to build the
485 <filename>.sh</filename> file and then
486 take steps to transfer and run it on a
487 machine that does not meet the minimal Git, tar, and Python
488 (or gcc) requirements.
489 </para>
490
491 <para>
492 Here are the steps to take to build and run your own
493 buildtools installer:
494 <orderedlist>
495 <listitem><para>
496 On the machine that is able to run BitBake,
497 be sure you have set up your build environment with
498 the setup script
499 (<link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>).
500 </para></listitem>
501 <listitem><para>
502 Run the BitBake command to build the tarball:
503 <literallayout class='monospaced'>
504 $ bitbake buildtools-tarball
505 </literallayout>
506 or run the BitBake command to build the extended tarball:
507 <literallayout class='monospaced'>
508 $ bitbake buildtools-extended-tarball
509 </literallayout>
510 <note>
511 The
512 <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>
513 variable in your <filename>local.conf</filename> file
514 determines whether you build tools for a 32-bit
515 or 64-bit system.
516 </note>
517 Once the build completes, you can find the
518 <filename>.sh</filename> file that installs
519 the tools in the <filename>tmp/deploy/sdk</filename>
520 subdirectory of the
521 <link linkend='build-directory'>Build Directory</link>.
522 The installer file has the string "buildtools"
523 (or "buildtools-extended") in the name.
524 </para></listitem>
525 <listitem><para>
526 Transfer the <filename>.sh</filename> file from the
527 build host to the machine that does not meet the
528 Git, tar, or Python (or gcc) requirements.
529 </para></listitem>
530 <listitem><para>
531 On the machine that does not meet the requirements,
532 run the <filename>.sh</filename> file
533 to install the tools.
534 Here is an example for the traditional installer:
535 <literallayout class='monospaced'>
536 $ sh ~/Downloads/x86_64-buildtools-nativesdk-standalone-&DISTRO;.sh
537 </literallayout>
538 Here is an example for the extended installer:
539 <literallayout class='monospaced'>
540 $ sh ~/Downloads/x86_64-buildtools-extended-nativesdk-standalone-&DISTRO;.sh
541 </literallayout>
542 During execution, a prompt appears that allows you to
543 choose the installation directory.
544 For example, you could choose the following:
545 <literallayout class='monospaced'>
546 /home/<replaceable>your_username</replaceable>/buildtools
547 </literallayout>
548 </para></listitem>
549 <listitem><para>
550 Source the tools environment setup script by using a
551 command like the following:
552 <literallayout class='monospaced'>
553 $ source /home/<replaceable>your_username</replaceable>/buildtools/environment-setup-x86_64-poky-linux
554 </literallayout>
555 Of course, you need to supply your installation directory and be
556 sure to use the right file (i.e. i586 or x86_64).
557 </para>
558 <para>
559 After you have sourced the setup script,
560 the tools are added to <filename>PATH</filename>
561 and any other environment variables required to run the
562 tools are initialized.
563 The results are working versions versions of Git, tar,
564 Python and <filename>chrpath</filename>. And in the case of
565 the <filename>buildtools-extended</filename> tarball, additional
566 working versions of tools including <filename>gcc</filename>,
567 <filename>make</filename> and the other tools included in
568 <filename>packagegroup-core-buildessential</filename>.
569 </para></listitem>
570 </orderedlist>
571 </para>
572 </section>
573 </section>
574</chapter>
575<!--
576vim: expandtab tw=80 ts=4
577-->
diff --git a/documentation/ref-manual/ref-tasks.xml b/documentation/ref-manual/ref-tasks.xml
deleted file mode 100644
index 5b09b3f2e8..0000000000
--- a/documentation/ref-manual/ref-tasks.xml
+++ /dev/null
@@ -1,1131 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='ref-tasks'>
7<title>Tasks</title>
8
9<para>
10 Tasks are units of execution for BitBake.
11 Recipes (<filename>.bb</filename> files) use tasks to complete
12 configuring, compiling, and packaging software.
13 This chapter provides a reference of the tasks defined in the
14 OpenEmbedded build system.
15</para>
16
17<section id='normal-recipe-build-tasks'>
18 <title>Normal Recipe Build Tasks</title>
19
20 <para>
21 The following sections describe normal tasks associated with building
22 a recipe.
23 For more information on tasks and dependencies, see the
24 "<ulink url='&YOCTO_DOCS_BB_URL;#tasks'>Tasks</ulink>" and
25 "<ulink url='&YOCTO_DOCS_BB_URL;#dependencies'>Dependencies</ulink>"
26 sections in the BitBake User Manual.
27 </para>
28
29 <section id='ref-tasks-build'>
30 <title><filename>do_build</filename></title>
31
32 <para>
33 The default task for all recipes.
34 This task depends on all other normal tasks
35 required to build a recipe.
36 </para>
37 </section>
38
39 <section id='ref-tasks-compile'>
40 <title><filename>do_compile</filename></title>
41
42 <para>
43 Compiles the source code.
44 This task runs with the current working directory set
45 to
46 <filename>${</filename><link linkend='var-B'><filename>B</filename></link><filename>}</filename>.
47 </para>
48
49 <para>
50 The default behavior of this task is to run the
51 <filename>oe_runmake</filename> function if a makefile
52 (<filename>Makefile</filename>, <filename>makefile</filename>,
53 or <filename>GNUmakefile</filename>) is found.
54 If no such file is found, the <filename>do_compile</filename>
55 task does nothing.
56 </para>
57 </section>
58
59 <section id='ref-tasks-compile_ptest_base'>
60 <title><filename>do_compile_ptest_base</filename></title>
61
62 <para>
63 Compiles the runtime test suite included in the software being
64 built.
65 </para>
66 </section>
67
68 <section id='ref-tasks-configure'>
69 <title><filename>do_configure</filename></title>
70
71 <para>
72 Configures the source by enabling and disabling any build-time and
73 configuration options for the software being built.
74 The task runs with the current working directory set to
75 <filename>${</filename><link linkend='var-B'><filename>B</filename></link><filename>}</filename>.
76 </para>
77
78 <para>
79 The default behavior of this task is to run
80 <filename>oe_runmake clean</filename> if a makefile
81 (<filename>Makefile</filename>, <filename>makefile</filename>,
82 or <filename>GNUmakefile</filename>) is found and
83 <link linkend='var-CLEANBROKEN'><filename>CLEANBROKEN</filename></link>
84 is not set to "1".
85 If no such file is found or the <filename>CLEANBROKEN</filename>
86 variable is set to "1", the <filename>do_configure</filename>
87 task does nothing.
88 </para>
89 </section>
90
91 <section id='ref-tasks-configure_ptest_base'>
92 <title><filename>do_configure_ptest_base</filename></title>
93
94 <para>
95 Configures the runtime test suite included in the software being
96 built.
97 </para>
98 </section>
99
100 <section id='ref-tasks-deploy'>
101 <title><filename>do_deploy</filename></title>
102
103 <para>
104 Writes output files that are to be deployed to
105 <filename>${</filename><link linkend='var-DEPLOY_DIR_IMAGE'><filename>DEPLOY_DIR_IMAGE</filename></link><filename>}</filename>.
106 The task runs with the current working directory set to
107 <filename>${</filename><link linkend='var-B'><filename>B</filename></link><filename>}</filename>.
108 </para>
109
110 <para>
111 Recipes implementing this task should inherit the
112 <link linkend='ref-classes-deploy'><filename>deploy</filename></link>
113 class and should write the output to
114 <filename>${</filename><link linkend='var-DEPLOYDIR'><filename>DEPLOYDIR</filename></link><filename>}</filename>,
115 which is not to be confused with <filename>${DEPLOY_DIR}</filename>.
116 The <filename>deploy</filename> class sets up
117 <filename>do_deploy</filename> as a shared state (sstate) task that
118 can be accelerated through sstate use.
119 The sstate mechanism takes care of copying the output from
120 <filename>${DEPLOYDIR}</filename> to
121 <filename>${DEPLOY_DIR_IMAGE}</filename>.
122 <note>
123 <title>Caution</title>
124 Do not write the output directly to
125 <filename>${DEPLOY_DIR_IMAGE}</filename>, as this causes
126 the sstate mechanism to malfunction.
127 </note>
128 </para>
129
130 <para>
131 The <filename>do_deploy</filename> task is not added as a task
132 by default and consequently needs to be added manually.
133 If you want the task to run after
134 <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>,
135 you can add it by doing the following:
136 <literallayout class='monospaced'>
137 addtask deploy after do_compile
138 </literallayout>
139 Adding <filename>do_deploy</filename> after other tasks works the
140 same way.
141 <note>
142 You do not need to add <filename>before do_build</filename>
143 to the <filename>addtask</filename> command (though it is
144 harmless), because the
145 <link linkend='ref-classes-base'><filename>base</filename></link>
146 class contains the following:
147 <literallayout class='monospaced'>
148 do_build[recrdeptask] += "do_deploy"
149 </literallayout>
150 See the
151 "<ulink url='&YOCTO_DOCS_BB_URL;#dependencies'>Dependencies</ulink>"
152 section in the BitBake User Manual for more information.
153 </note>
154 </para>
155
156 <para>
157 If the <filename>do_deploy</filename> task re-executes, any
158 previous output is removed (i.e. "cleaned").
159 </para>
160 </section>
161
162 <section id='ref-tasks-fetch'>
163 <title><filename>do_fetch</filename></title>
164
165 <para>
166 Fetches the source code.
167 This task uses the
168 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
169 variable and the argument's prefix to determine the correct
170 <ulink url='&YOCTO_DOCS_BB_URL;#bb-fetchers'>fetcher</ulink>
171 module.
172 </para>
173 </section>
174
175 <section id='ref-tasks-image'>
176 <title><filename>do_image</filename></title>
177
178 <para>
179 Starts the image generation process.
180 The <filename>do_image</filename> task runs after the
181 OpenEmbedded build system has run the
182 <link linkend='ref-tasks-rootfs'><filename>do_rootfs</filename></link>
183 task during which packages are identified for installation into
184 the image and the root filesystem is created, complete with
185 post-processing.
186 </para>
187
188 <para>
189 The <filename>do_image</filename> task performs pre-processing
190 on the image through the
191 <link linkend='var-IMAGE_PREPROCESS_COMMAND'><filename>IMAGE_PREPROCESS_COMMAND</filename></link>
192 and dynamically generates supporting
193 <filename>do_image_*</filename> tasks as needed.
194 </para>
195
196 <para>
197 For more information on image creation, see the
198 "<ulink url='&YOCTO_DOCS_OM_URL;#image-generation-dev-environment'>Image Generation</ulink>"
199 section in the Yocto Project Overview and Concepts Manual.
200 </para>
201 </section>
202
203 <section id='ref-tasks-image-complete'>
204 <title><filename>do_image_complete</filename></title>
205
206 <para>
207 Completes the image generation process.
208 The <filename>do_image_complete</filename> task runs after the
209 OpenEmbedded build system has run the
210 <link linkend='ref-tasks-image'><filename>do_image</filename></link>
211 task during which image pre-processing occurs and through
212 dynamically generated <filename>do_image_*</filename> tasks the
213 image is constructed.
214 </para>
215
216 <para>
217 The <filename>do_image_complete</filename> task performs
218 post-processing on the image through the
219 <link linkend='var-IMAGE_POSTPROCESS_COMMAND'><filename>IMAGE_POSTPROCESS_COMMAND</filename></link>.
220 </para>
221
222 <para>
223 For more information on image creation, see the
224 "<ulink url='&YOCTO_DOCS_OM_URL;#image-generation-dev-environment'>Image Generation</ulink>"
225 section in the Yocto Project Overview and Concepts Manual.
226 </para>
227 </section>
228
229 <section id='ref-tasks-install'>
230 <title><filename>do_install</filename></title>
231
232 <para>
233 Copies files that are to be packaged into the holding area
234 <filename>${</filename><link linkend='var-D'><filename>D</filename></link><filename>}</filename>.
235 This task runs with the current working directory set to
236 <filename>${</filename><link linkend='var-B'><filename>B</filename></link><filename>}</filename>,
237 which is the compilation directory.
238 The <filename>do_install</filename> task, as well as other tasks
239 that either directly or indirectly depend on the installed files
240 (e.g.
241 <link linkend='ref-tasks-package'><filename>do_package</filename></link>,
242 <link linkend='ref-tasks-package_write_deb'><filename>do_package_write_*</filename></link>,
243 and
244 <link linkend='ref-tasks-rootfs'><filename>do_rootfs</filename></link>),
245 run under
246 <ulink url='&YOCTO_DOCS_OM_URL;#fakeroot-and-pseudo'>fakeroot</ulink>.
247 <note>
248 <title>Caution</title>
249
250 <para>
251 When installing files, be careful not to set the owner and
252 group IDs of the installed files to unintended values.
253 Some methods of copying files, notably when using the
254 recursive <filename>cp</filename> command, can preserve the
255 UID and/or GID of the original file, which is usually not
256 what you want.
257 The
258 <link linkend='insane-host-user-contaminated'><filename>host-user-contaminated</filename></link>
259 QA check checks for files that probably have the wrong
260 ownership.
261 </para>
262
263 <para>
264 Safe methods for installing files include the following:
265 <itemizedlist>
266 <listitem><para>
267 The <filename>install</filename> utility.
268 This utility is the preferred method.
269 </para></listitem>
270 <listitem><para>
271 The <filename>cp</filename> command with the
272 "--no-preserve=ownership" option.
273 </para></listitem>
274 <listitem><para>
275 The <filename>tar</filename> command with the
276 "--no-same-owner" option.
277 See the <filename>bin_package.bbclass</filename>
278 file in the <filename>meta/classes</filename>
279 directory of the
280 <link linkend='source-directory'>Source Directory</link>
281 for an example.
282 </para></listitem>
283 </itemizedlist>
284 </para>
285 </note>
286 </para>
287 </section>
288
289 <section id='ref-tasks-install_ptest_base'>
290 <title><filename>do_install_ptest_base</filename></title>
291
292 <para>
293 Copies the runtime test suite files from the compilation directory
294 to a holding area.
295 </para>
296 </section>
297
298 <section id='ref-tasks-package'>
299 <title><filename>do_package</filename></title>
300
301 <para>
302 Analyzes the content of the holding area
303 <filename>${</filename><link linkend='var-D'><filename>D</filename></link><filename>}</filename>
304 and splits the content into subsets based on available packages
305 and files.
306 This task makes use of the
307 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>
308 and
309 <link linkend='var-FILES'><filename>FILES</filename></link>
310 variables.
311 </para>
312
313 <para>
314 The <filename>do_package</filename> task, in conjunction with the
315 <link linkend='ref-tasks-packagedata'><filename>do_packagedata</filename></link>
316 task, also saves some important package metadata.
317 For additional information, see the
318 <link linkend='var-PKGDESTWORK'><filename>PKGDESTWORK</filename></link>
319 variable and the
320 "<ulink url='&YOCTO_DOCS_OM_URL;#automatically-added-runtime-dependencies'>Automatically Added Runtime Dependencies</ulink>"
321 section in the Yocto Project Overview and Concepts Manual.
322 </para>
323 </section>
324
325 <section id='ref-tasks-package_qa'>
326 <title><filename>do_package_qa</filename></title>
327
328 <para>
329 Runs QA checks on packaged files.
330 For more information on these checks, see the
331 <link linkend='ref-classes-insane'><filename>insane</filename></link>
332 class.
333 </para>
334 </section>
335
336 <section id='ref-tasks-package_write_deb'>
337 <title><filename>do_package_write_deb</filename></title>
338
339 <para>
340 Creates Debian packages (i.e. <filename>*.deb</filename> files) and
341 places them in the
342 <filename>${</filename><link linkend='var-DEPLOY_DIR_DEB'><filename>DEPLOY_DIR_DEB</filename></link><filename>}</filename>
343 directory in the package feeds area.
344 For more information, see the
345 "<ulink url='&YOCTO_DOCS_OM_URL;#package-feeds-dev-environment'>Package Feeds</ulink>"
346 section in the Yocto Project Overview and Concepts Manual.
347 </para>
348 </section>
349
350 <section id='ref-tasks-package_write_ipk'>
351 <title><filename>do_package_write_ipk</filename></title>
352
353 <para>
354 Creates IPK packages (i.e. <filename>*.ipk</filename> files) and
355 places them in the
356 <filename>${</filename><link linkend='var-DEPLOY_DIR_IPK'><filename>DEPLOY_DIR_IPK</filename></link><filename>}</filename>
357 directory in the package feeds area.
358 For more information, see the
359 "<ulink url='&YOCTO_DOCS_OM_URL;#package-feeds-dev-environment'>Package Feeds</ulink>"
360 section in the Yocto Project Overview and Concepts Manual.
361 </para>
362 </section>
363
364 <section id='ref-tasks-package_write_rpm'>
365 <title><filename>do_package_write_rpm</filename></title>
366
367 <para>
368 Creates RPM packages (i.e. <filename>*.rpm</filename> files) and
369 places them in the
370 <filename>${</filename><link linkend='var-DEPLOY_DIR_RPM'><filename>DEPLOY_DIR_RPM</filename></link><filename>}</filename>
371 directory in the package feeds area.
372 For more information, see the
373 "<ulink url='&YOCTO_DOCS_OM_URL;#package-feeds-dev-environment'>Package Feeds</ulink>"
374 section in the Yocto Project Overview and Concepts Manual.
375 </para>
376 </section>
377
378 <section id='ref-tasks-package_write_tar'>
379 <title><filename>do_package_write_tar</filename></title>
380
381 <para>
382 Creates tarballs and places them in the
383 <filename>${</filename><link linkend='var-DEPLOY_DIR_TAR'><filename>DEPLOY_DIR_TAR</filename></link><filename>}</filename>
384 directory in the package feeds area.
385 For more information, see the
386 "<ulink url='&YOCTO_DOCS_OM_URL;#package-feeds-dev-environment'>Package Feeds</ulink>"
387 section in the Yocto Project Overview and Concepts Manual.
388 </para>
389 </section>
390
391 <section id='ref-tasks-packagedata'>
392 <title><filename>do_packagedata</filename></title>
393
394 <para>
395 Saves package metadata generated by the
396 <link linkend='ref-tasks-package'><filename>do_package</filename></link>
397 task in
398 <link linkend='var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></link>
399 to make it available globally.
400 </para>
401 </section>
402
403 <section id='ref-tasks-patch'>
404 <title><filename>do_patch</filename></title>
405
406 <para>
407 Locates patch files and applies them to the source code.
408 </para>
409
410 <para>
411 After fetching and unpacking source files, the build system
412 uses the recipe's
413 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
414 statements to locate and apply patch files to the source code.
415 <note>
416 The build system uses the
417 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESPATH'><filename>FILESPATH</filename></ulink>
418 variable to determine the default set of directories when
419 searching for patches.
420 </note>
421 Patch files, by default, are <filename>*.patch</filename> and
422 <filename>*.diff</filename> files created and kept in a
423 subdirectory of the directory holding the recipe file.
424 For example, consider the
425 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta/recipes-connectivity/bluez5'><filename>bluez5</filename></ulink>
426 recipe from the OE-Core layer (i.e.
427 <filename>poky/meta</filename>):
428 <literallayout class='monospaced'>
429 poky/meta/recipes-connectivity/bluez5
430 </literallayout>
431 This recipe has two patch files located here:
432 <literallayout class='monospaced'>
433 poky/meta/recipes-connectivity/bluez5/bluez5
434 </literallayout>
435 </para>
436
437 <para>
438 In the <filename>bluez5</filename> recipe, the
439 <filename>SRC_URI</filename> statements point to the source and
440 patch files needed to build the package.
441 <note>
442 In the case for the <filename>bluez5_5.48.bb</filename>
443 recipe, the <filename>SRC_URI</filename> statements are from an
444 include file <filename>bluez5.inc</filename>.
445 </note>
446 </para>
447
448 <para>
449 As mentioned earlier, the build system treats files whose file
450 types are <filename>.patch</filename> and
451 <filename>.diff</filename> as patch files.
452 However, you can use the "apply=yes" parameter with the
453 <filename>SRC_URI</filename> statement to indicate any file as a
454 patch file:
455 <literallayout class='monospaced'>
456 SRC_URI = " \
457 git://<replaceable>path_to_repo</replaceable>/<replaceable>some_package</replaceable> \
458 file://<replaceable>file</replaceable>;apply=yes \
459 "
460 </literallayout>
461 </para>
462
463 <para>
464 Conversely, if you have a directory full of patch files and you
465 want to exclude some so that the <filename>do_patch</filename>
466 task does not apply them during the patch phase, you can use
467 the "apply=no" parameter with the <filename>SRC_URI</filename>
468 statement:
469 <literallayout class='monospaced'>
470 SRC_URI = " \
471 git://<replaceable>path_to_repo</replaceable>/<replaceable>some_package</replaceable> \
472 file://<replaceable>path_to_lots_of_patch_files</replaceable> \
473 file://<replaceable>path_to_lots_of_patch_files</replaceable>/<replaceable>patch_file5</replaceable>;apply=no \
474 "
475 </literallayout>
476 In the previous example, assuming all the files in the directory
477 holding the patch files end with either <filename>.patch</filename>
478 or <filename>.diff</filename>, every file would be applied as a
479 patch by default except for the
480 <replaceable>patch_file5</replaceable> patch.
481 </para>
482
483 <para>
484 You can find out more about the patching process in the
485 "<ulink url='&YOCTO_DOCS_OM_URL;#patching-dev-environment'>Patching</ulink>"
486 section in the Yocto Project Overview and Concepts Manual and the
487 "<ulink url='&YOCTO_DOCS_DEV_URL;#new-recipe-patching-code'>Patching Code</ulink>"
488 section in the Yocto Project Development Tasks Manual.
489 </para>
490 </section>
491
492 <section id='ref-tasks-populate_lic'>
493 <title><filename>do_populate_lic</filename></title>
494
495 <para>
496 Writes license information for the recipe that is collected later
497 when the image is constructed.
498 </para>
499 </section>
500
501 <section id='ref-tasks-populate_sdk'>
502 <title><filename>do_populate_sdk</filename></title>
503
504 <para>
505 Creates the file and directory structure for an installable SDK.
506 See the
507 "<ulink url='&YOCTO_DOCS_OM_URL;#sdk-generation-dev-environment'>SDK Generation</ulink>"
508 section in the Yocto Project Overview and Concepts Manual for more
509 information.
510 </para>
511 </section>
512
513 <section id='ref-tasks-populate_sysroot'>
514 <title><filename>do_populate_sysroot</filename></title>
515
516 <para>
517 Stages (copies) a subset of the files installed by the
518 <link linkend='ref-tasks-install'><filename>do_install</filename></link>
519 task into the appropriate sysroot.
520 For information on how to access these files from other recipes,
521 see the
522 <link linkend='var-STAGING_DIR_HOST'><filename>STAGING_DIR*</filename></link>
523 variables.
524 Directories that would typically not be needed by other recipes at
525 build time (e.g. <filename>/etc</filename>) are not copied by
526 default.
527 </para>
528
529 <para>
530 For information on what directories are copied by default, see the
531 <link linkend='var-SYSROOT_DIRS'><filename>SYSROOT_DIRS*</filename></link>
532 variables.
533 You can change these variables inside your recipe if you need
534 to make additional (or fewer) directories available to other
535 recipes at build time.
536 </para>
537
538 <para>
539 The <filename>do_populate_sysroot</filename> task is a
540 shared state (sstate) task, which means that the task can
541 be accelerated through sstate use.
542 Realize also that if the task is re-executed, any previous output
543 is removed (i.e. "cleaned").
544 </para>
545 </section>
546
547 <section id='ref-tasks-prepare_recipe_sysroot'>
548 <title><filename>do_prepare_recipe_sysroot</filename></title>
549
550 <para>
551 Installs the files into the individual recipe specific sysroots
552 (i.e. <filename>recipe-sysroot</filename> and
553 <filename>recipe-sysroot-native</filename> under
554 <filename>${</filename><link linkend='var-WORKDIR'><filename>WORKDIR</filename></link><filename>}</filename>
555 based upon the dependencies specified by
556 <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>).
557 See the
558 "<link linkend='ref-classes-staging'><filename>staging</filename></link>"
559 class for more information.
560 </para>
561 </section>
562
563 <section id='ref-tasks-rm_work'>
564 <title><filename>do_rm_work</filename></title>
565
566 <para>
567 Removes work files after the OpenEmbedded build system has
568 finished with them.
569 You can learn more by looking at the
570 "<link linkend='ref-classes-rm-work'><filename>rm_work.bbclass</filename></link>"
571 section.
572 </para>
573 </section>
574
575 <section id='ref-tasks-unpack'>
576 <title><filename>do_unpack</filename></title>
577
578 <para>
579 Unpacks the source code into a working directory pointed to
580 by
581 <filename>${</filename><link linkend='var-WORKDIR'><filename>WORKDIR</filename></link><filename>}</filename>.
582 The
583 <link linkend='var-S'><filename>S</filename></link> variable also
584 plays a role in where unpacked source files ultimately reside.
585 For more information on how source files are unpacked, see the
586 "<ulink url='&YOCTO_DOCS_OM_URL;#source-fetching-dev-environment'>Source Fetching</ulink>"
587 section in the Yocto Project Overview and Concepts Manual and also
588 see the <filename>WORKDIR</filename> and
589 <filename>S</filename> variable descriptions.
590 </para>
591 </section>
592</section>
593
594<section id='manually-called-tasks'>
595 <title>Manually Called Tasks</title>
596
597 <para>
598 These tasks are typically manually triggered (e.g. by using the
599 <filename>bitbake -c</filename> command-line option):
600 </para>
601
602 <section id='ref-tasks-checkpkg'>
603 <title><filename>do_checkpkg</filename></title>
604
605 <para>
606 Provides information about the recipe including its upstream
607 version and status.
608 The upstream version and status reveals whether or not a version
609 of the recipe exists upstream and a status of not updated, updated,
610 or unknown.
611 </para>
612
613 <para>
614 To check the upstream version and status of a recipe, use the
615 following devtool commands:
616 <literallayout class='monospaced'>
617 $ devtool latest-version
618 $ devtool check-upgrade-status
619 </literallayout>
620 See the
621 "<link linkend='ref-devtool-reference'><filename>devtool</filename> Quick Reference</link>"
622 chapter for more information on <filename>devtool</filename>.
623 See the
624 "<ulink url='&YOCTO_DOCS_REF_URL;#devtool-checking-on-the-upgrade-status-of-a-recipe'>Checking on the Upgrade Status of a Recipe</ulink>"
625 section for information on checking the upgrade status of a recipe.
626 </para>
627
628 <para>
629 To build the <filename>checkpkg</filename> task, use the
630 <filename>bitbake</filename> command with the "-c" option and
631 task name:
632 <literallayout class='monospaced'>
633 $ bitbake core-image-minimal -c checkpkg
634 </literallayout>
635 By default, the results are stored in
636 <link linkend='var-LOG_DIR'><filename>$LOG_DIR</filename></link>
637 (e.g. <filename>$BUILD_DIR/tmp/log</filename>).
638 </para>
639 </section>
640
641 <section id='ref-tasks-checkuri'>
642 <title><filename>do_checkuri</filename></title>
643
644 <para>
645 Validates the
646 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
647 value.
648 </para>
649 </section>
650
651 <section id='ref-tasks-clean'>
652 <title><filename>do_clean</filename></title>
653
654 <para>
655 Removes all output files for a target from the
656 <link linkend='ref-tasks-unpack'><filename>do_unpack</filename></link>
657 task forward (i.e. <filename>do_unpack</filename>,
658 <link linkend='ref-tasks-configure'><filename>do_configure</filename></link>,
659 <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>,
660 <link linkend='ref-tasks-install'><filename>do_install</filename></link>,
661 and
662 <link linkend='ref-tasks-package'><filename>do_package</filename></link>).
663 </para>
664
665 <para>
666 You can run this task using BitBake as follows:
667 <literallayout class='monospaced'>
668 $ bitbake -c clean <replaceable>recipe</replaceable>
669 </literallayout>
670 </para>
671
672 <para>
673 Running this task does not remove the
674 <ulink url='&YOCTO_DOCS_OM_URL;#shared-state-cache'>sstate</ulink>
675 cache files.
676 Consequently, if no changes have been made and the recipe is
677 rebuilt after cleaning, output files are simply restored from the
678 sstate cache.
679 If you want to remove the sstate cache files for the recipe,
680 you need to use the
681 <link linkend='ref-tasks-cleansstate'><filename>do_cleansstate</filename></link>
682 task instead (i.e. <filename>bitbake -c cleansstate</filename> <replaceable>recipe</replaceable>).
683 </para>
684 </section>
685
686 <section id='ref-tasks-cleanall'>
687 <title><filename>do_cleanall</filename></title>
688
689 <para>
690 Removes all output files, shared state
691 (<ulink url='&YOCTO_DOCS_OM_URL;#shared-state-cache'>sstate</ulink>)
692 cache, and downloaded source files for a target (i.e. the contents
693 of
694 <link linkend='var-DL_DIR'><filename>DL_DIR</filename></link>).
695 Essentially, the <filename>do_cleanall</filename> task is
696 identical to the
697 <link linkend='ref-tasks-cleansstate'><filename>do_cleansstate</filename></link>
698 task with the added removal of downloaded source files.
699 </para>
700
701 <para>
702 You can run this task using BitBake as follows:
703 <literallayout class='monospaced'>
704 $ bitbake -c cleanall <replaceable>recipe</replaceable>
705 </literallayout>
706 </para>
707
708 <para>
709 Typically, you would not normally use the
710 <filename>cleanall</filename> task.
711 Do so only if you want to start fresh with the
712 <link linkend='ref-tasks-fetch'><filename>do_fetch</filename></link>
713 task.
714 </para>
715 </section>
716
717 <section id='ref-tasks-cleansstate'>
718 <title><filename>do_cleansstate</filename></title>
719
720 <para>
721 Removes all output files and shared state
722 (<ulink url='&YOCTO_DOCS_OM_URL;#shared-state-cache'>sstate</ulink>)
723 cache for a target.
724 Essentially, the <filename>do_cleansstate</filename> task is
725 identical to the
726 <link linkend='ref-tasks-clean'><filename>do_clean</filename></link>
727 task with the added removal of shared state
728 (<ulink url='&YOCTO_DOCS_OM_URL;#shared-state-cache'>sstate</ulink>)
729 cache.
730 </para>
731
732 <para>
733 You can run this task using BitBake as follows:
734 <literallayout class='monospaced'>
735 $ bitbake -c cleansstate <replaceable>recipe</replaceable>
736 </literallayout>
737 </para>
738
739 <para>
740 When you run the <filename>do_cleansstate</filename> task,
741 the OpenEmbedded build system no longer uses any
742 sstate.
743 Consequently, building the recipe from scratch is guaranteed.
744 <note>
745 The <filename>do_cleansstate</filename> task cannot remove
746 sstate from a remote sstate mirror.
747 If you need to build a target from scratch using remote
748 mirrors, use the "-f" option as follows:
749 <literallayout class='monospaced'>
750 $ bitbake -f -c do_cleansstate <replaceable>target</replaceable>
751 </literallayout>
752 </note>
753 </para>
754 </section>
755
756 <section id='ref-tasks-devpyshell'>
757 <title><filename>do_devpyshell</filename></title>
758
759 <para>
760 Starts a shell in which an interactive Python interpreter allows
761 you to interact with the BitBake build environment.
762 From within this shell, you can directly examine and set
763 bits from the data store and execute functions as if within
764 the BitBake environment.
765 See the
766 "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-appdev-devpyshell'>Using a Development Python Shell</ulink>"
767 section in the Yocto Project Development Tasks Manual for more
768 information about using <filename>devpyshell</filename>.
769 </para>
770 </section>
771
772 <section id='ref-tasks-devshell'>
773 <title><filename>do_devshell</filename></title>
774
775 <para>
776 Starts a shell whose environment is set up for
777 development, debugging, or both.
778 See the
779 "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-appdev-devshell'>Using a Development Shell</ulink>"
780 section in the Yocto Project Development Tasks Manual for more
781 information about using <filename>devshell</filename>.
782 </para>
783 </section>
784
785 <section id='ref-tasks-listtasks'>
786 <title><filename>do_listtasks</filename></title>
787
788 <para>
789 Lists all defined tasks for a target.
790 </para>
791 </section>
792
793 <section id='ref-tasks-package_index'>
794 <title><filename>do_package_index</filename></title>
795
796 <para>
797 Creates or updates the index in the
798 <ulink url='&YOCTO_DOCS_OM_URL;#package-feeds-dev-environment'>Package Feeds</ulink>
799 area.
800 <note>
801 This task is not triggered with the
802 <filename>bitbake -c</filename> command-line option as
803 are the other tasks in this section.
804 Because this task is specifically for the
805 <filename>package-index</filename> recipe,
806 you run it using
807 <filename>bitbake package-index</filename>.
808 </note>
809 </para>
810 </section>
811</section>
812
813<section id='image-related-tasks'>
814 <title>Image-Related Tasks</title>
815
816 <para>
817 The following tasks are applicable to image recipes.
818 </para>
819
820 <section id='ref-tasks-bootimg'>
821 <title><filename>do_bootimg</filename></title>
822
823 <para>
824 Creates a bootable live image.
825 See the
826 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
827 variable for additional information on live image types.
828 </para>
829 </section>
830
831 <section id='ref-tasks-bundle_initramfs'>
832 <title><filename>do_bundle_initramfs</filename></title>
833
834 <para>
835 Combines an initial RAM disk (initramfs) image and kernel
836 together to form a single image.
837 The
838 <link linkend='var-CONFIG_INITRAMFS_SOURCE'><filename>CONFIG_INITRAMFS_SOURCE</filename></link>
839 variable has some more information about these types of images.
840 </para>
841 </section>
842
843 <section id='ref-tasks-rootfs'>
844 <title><filename>do_rootfs</filename></title>
845
846 <para>
847 Creates the root filesystem (file and directory structure) for an
848 image.
849 See the
850 "<ulink url='&YOCTO_DOCS_OM_URL;#image-generation-dev-environment'>Image Generation</ulink>"
851 section in the Yocto Project Overview and Concepts Manual for more
852 information on how the root filesystem is created.
853 </para>
854 </section>
855
856 <section id='ref-tasks-testimage'>
857 <title><filename>do_testimage</filename></title>
858
859 <para>
860 Boots an image and performs runtime tests within the image.
861 For information on automatically testing images, see the
862 "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
863 section in the Yocto Project Development Tasks Manual.
864 </para>
865 </section>
866
867 <section id='ref-tasks-testimage_auto'>
868 <title><filename>do_testimage_auto</filename></title>
869
870 <para>
871 Boots an image and performs runtime tests within the image
872 immediately after it has been built.
873 This task is enabled when you set
874 <link linkend='var-TESTIMAGE_AUTO'><filename>TESTIMAGE_AUTO</filename></link>
875 equal to "1".
876 </para>
877
878 <para>
879 For information on automatically testing images, see the
880 "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
881 section in the Yocto Project Development Tasks Manual.
882 </para>
883 </section>
884</section>
885
886<section id='kernel-related-tasks'>
887 <title>Kernel-Related Tasks</title>
888
889 <para>
890 The following tasks are applicable to kernel recipes.
891 Some of these tasks (e.g. the
892 <link linkend='ref-tasks-menuconfig'><filename>do_menuconfig</filename></link>
893 task) are also applicable to recipes that use
894 Linux kernel style configuration such as the BusyBox recipe.
895 </para>
896
897 <section id='ref-tasks-compile_kernelmodules'>
898 <title><filename>do_compile_kernelmodules</filename></title>
899
900 <para>
901 Runs the step that builds the kernel modules (if needed).
902 Building a kernel consists of two steps: 1) the kernel
903 (<filename>vmlinux</filename>) is built, and 2) the modules
904 are built (i.e. <filename>make modules</filename>).
905 </para>
906 </section>
907
908 <section id='ref-tasks-diffconfig'>
909 <title><filename>do_diffconfig</filename></title>
910
911 <para>
912 When invoked by the user, this task creates a file containing the
913 differences between the original config as produced by
914 <link linkend='ref-tasks-kernel_configme'><filename>do_kernel_configme</filename></link>
915 task and the changes made by the user with other methods
916 (i.e. using
917 (<link linkend='ref-tasks-kernel_menuconfig'><filename>do_kernel_menuconfig</filename></link>).
918 Once the file of differences is created, it can be used to create
919 a config fragment that only contains the differences.
920 You can invoke this task from the command line as follows:
921 <literallayout class='monospaced'>
922 $ bitbake linux-yocto -c diffconfig
923 </literallayout>
924 For more information, see the
925 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#creating-config-fragments'>Creating Configuration Fragments</ulink>"
926 section in the Yocto Project Linux Kernel Development Manual.
927 </para>
928 </section>
929
930 <section id='ref-tasks-kernel_checkout'>
931 <title><filename>do_kernel_checkout</filename></title>
932
933 <para>
934 Converts the newly unpacked kernel source into a form with which
935 the OpenEmbedded build system can work.
936 Because the kernel source can be fetched in several different ways,
937 the <filename>do_kernel_checkout</filename> task makes sure that
938 subsequent tasks are given a clean working tree copy of the kernel
939 with the correct branches checked out.
940 </para>
941 </section>
942
943 <section id='ref-tasks-kernel_configcheck'>
944 <title><filename>do_kernel_configcheck</filename></title>
945
946 <para>
947 Validates the configuration produced by the
948 <link linkend='ref-tasks-kernel_menuconfig'><filename>do_kernel_menuconfig</filename></link>
949 task.
950 The <filename>do_kernel_configcheck</filename> task produces
951 warnings when a requested configuration does not appear in the
952 final <filename>.config</filename> file or when you override a
953 policy configuration in a hardware configuration fragment.
954 You can run this task explicitly and view the output by using
955 the following command:
956 <literallayout class='monospaced'>
957 $ bitbake linux-yocto -c kernel_configcheck -f
958 </literallayout>
959 For more information, see the
960 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#validating-configuration'>Validating Configuration</ulink>"
961 section in the Yocto Project Linux Kernel Development Manual.
962 </para>
963 </section>
964
965 <section id='ref-tasks-kernel_configme'>
966 <title><filename>do_kernel_configme</filename></title>
967
968 <para>
969 After the kernel is patched by the
970 <link linkend='ref-tasks-patch'><filename>do_patch</filename></link>
971 task, the <filename>do_kernel_configme</filename> task assembles
972 and merges all the kernel config fragments into a merged
973 configuration that can then be passed to the kernel configuration
974 phase proper.
975 This is also the time during which user-specified defconfigs
976 are applied if present, and where configuration modes such as
977 <filename>--allnoconfig</filename> are applied.
978 </para>
979 </section>
980
981 <section id='ref-tasks-kernel_menuconfig'>
982 <title><filename>do_kernel_menuconfig</filename></title>
983
984 <para>
985 Invoked by the user to manipulate the
986 <filename>.config</filename> file used to build a linux-yocto
987 recipe.
988 This task starts the Linux kernel configuration tool, which you
989 then use to modify the kernel configuration.
990 <note>
991 You can also invoke this tool from the command line as
992 follows:
993 <literallayout class='monospaced'>
994 $ bitbake linux-yocto -c menuconfig
995 </literallayout>
996 </note>
997 See the
998 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#using-menuconfig'>Using <filename>menuconfig</filename></ulink>"
999 section in the Yocto Project Linux Kernel Development Manual
1000 for more information on this configuration tool.
1001 </para>
1002 </section>
1003
1004 <section id='ref-tasks-kernel_metadata'>
1005 <title><filename>do_kernel_metadata</filename></title>
1006
1007 <para>
1008 Collects all the features required for a given kernel build,
1009 whether the features come from
1010 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
1011 or from Git repositories.
1012 After collection, the <filename>do_kernel_metadata</filename> task
1013 processes the features into a series of config fragments and
1014 patches, which can then be applied by subsequent tasks such as
1015 <link linkend='ref-tasks-patch'><filename>do_patch</filename></link>
1016 and
1017 <link linkend='ref-tasks-kernel_configme'><filename>do_kernel_configme</filename></link>.
1018 </para>
1019 </section>
1020
1021 <section id='ref-tasks-menuconfig'>
1022 <title><filename>do_menuconfig</filename></title>
1023
1024 <para>
1025 Runs <filename>make menuconfig</filename> for the kernel.
1026 For information on <filename>menuconfig</filename>, see the
1027 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#using-menuconfig'>Using&nbsp;&nbsp;<filename>menuconfig</filename></ulink>"
1028 section in the Yocto Project Linux Kernel Development Manual.
1029 </para>
1030 </section>
1031
1032 <section id='ref-tasks-savedefconfig'>
1033 <title><filename>do_savedefconfig</filename></title>
1034
1035 <para>
1036 When invoked by the user, creates a defconfig file that can be
1037 used instead of the default defconfig.
1038 The saved defconfig contains the differences between the default
1039 defconfig and the changes made by the user using other methods
1040 (i.e. the
1041 <link linkend='ref-tasks-kernel_menuconfig'><filename>do_kernel_menuconfig</filename></link>
1042 task.
1043 You can invoke the task using the following command:
1044 <literallayout class='monospaced'>
1045 $ bitbake linux-yocto -c savedefconfig
1046 </literallayout>
1047 </para>
1048 </section>
1049
1050 <section id='ref-tasks-shared_workdir'>
1051 <title><filename>do_shared_workdir</filename></title>
1052
1053 <para>
1054 After the kernel has been compiled but before the kernel modules
1055 have been compiled, this task copies files required for module
1056 builds and which are generated from the kernel build into the
1057 shared work directory.
1058 With these copies successfully copied, the
1059 <link linkend='ref-tasks-compile_kernelmodules'><filename>do_compile_kernelmodules</filename></link>
1060 task can successfully build the kernel modules in the next step
1061 of the build.
1062 </para>
1063 </section>
1064
1065 <section id='ref-tasks-sizecheck'>
1066 <title><filename>do_sizecheck</filename></title>
1067
1068 <para>
1069 After the kernel has been built, this task checks the size of the
1070 stripped kernel image against
1071 <link linkend='var-KERNEL_IMAGE_MAXSIZE'><filename>KERNEL_IMAGE_MAXSIZE</filename></link>.
1072 If that variable was set and the size of the stripped kernel
1073 exceeds that size, the kernel build produces a warning to that
1074 effect.
1075 </para>
1076 </section>
1077
1078 <section id='ref-tasks-strip'>
1079 <title><filename>do_strip</filename></title>
1080
1081 <para>
1082 If
1083 <filename>KERNEL_IMAGE_STRIP_EXTRA_SECTIONS</filename> is defined,
1084 this task strips the sections named in that variable from
1085 <filename>vmlinux</filename>.
1086 This stripping is typically used to remove nonessential sections
1087 such as <filename>.comment</filename> sections from a
1088 size-sensitive configuration.
1089 </para>
1090 </section>
1091
1092 <section id='ref-tasks-validate_branches'>
1093 <title><filename>do_validate_branches</filename></title>
1094
1095 <para>
1096 After the kernel is unpacked but before it is patched, this task
1097 makes sure that the machine and metadata branches as specified
1098 by the <link linkend='var-SRCREV'><filename>SRCREV</filename></link>
1099 variables actually exist on the specified branches.
1100 If these branches do not exist and
1101 <link linkend='var-AUTOREV'><filename>AUTOREV</filename></link>
1102 is not being used, the <filename>do_validate_branches</filename>
1103 task fails during the build.
1104 </para>
1105 </section>
1106</section>
1107
1108<section id='miscellaneous-tasks'>
1109 <title>Miscellaneous Tasks</title>
1110
1111 <para>
1112 The following sections describe miscellaneous tasks.
1113 </para>
1114
1115 <section id='ref-tasks-spdx'>
1116 <title><filename>do_spdx</filename></title>
1117
1118 <para>
1119 A build stage that takes the source code and scans it on a remote
1120 FOSSOLOGY server in order to produce an SPDX document.
1121 This task applies only to the
1122 <link linkend='ref-classes-spdx'><filename>spdx</filename></link>
1123 class.
1124 </para>
1125 </section>
1126</section>
1127
1128</chapter>
1129<!--
1130vim: expandtab tw=80 ts=4
1131-->
diff --git a/documentation/ref-manual/ref-terms.xml b/documentation/ref-manual/ref-terms.xml
deleted file mode 100644
index 2a0452bd78..0000000000
--- a/documentation/ref-manual/ref-terms.xml
+++ /dev/null
@@ -1,525 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='ref-terms'>
7<title>Yocto Project Terms</title>
8
9 <para>
10 Following is a list of terms and definitions users new to the Yocto
11 Project development environment might find helpful.
12 While some of these terms are universal, the list includes them
13 just in case:
14 <itemizedlist>
15 <listitem><para>
16 <emphasis>Append Files:</emphasis>
17 Files that append build information to a recipe file.
18 Append files are known as BitBake append files and
19 <filename>.bbappend</filename> files.
20 The OpenEmbedded build system expects every append file to have
21 a corresponding recipe (<filename>.bb</filename>) file.
22 Furthermore, the append file and corresponding recipe file
23 must use the same root filename.
24 The filenames can differ only in the file type suffix used
25 (e.g.
26 <filename>formfactor_0.0.bb</filename> and
27 <filename>formfactor_0.0.bbappend</filename>).</para>
28
29 <para>Information in append files extends or overrides the
30 information in the similarly-named recipe file.
31 For an example of an append file in use, see the
32 "<ulink url='&YOCTO_DOCS_DEV_URL;#using-bbappend-files'>Using .bbappend Files in Your Layer</ulink>"
33 section in the Yocto Project Development Tasks Manual.</para>
34
35 <para>When you name an append file, you can use the
36 "<filename>%</filename>" wildcard character to allow for
37 matching recipe names.
38 For example, suppose you have an append file named as follows:
39 <literallayout class='monospaced'>
40 busybox_1.21.%.bbappend
41 </literallayout>
42 That append file would match any
43 <filename>busybox_1.21.</filename><replaceable>x</replaceable><filename>.bb</filename>
44 version of the recipe.
45 So, the append file would match any of the following recipe names:
46 <literallayout class='monospaced'>
47 busybox_1.21.1.bb
48 busybox_1.21.2.bb
49 busybox_1.21.3.bb
50 busybox_1.21.10.bb
51 busybox_1.21.25.bb
52 </literallayout>
53 <note><title>Important</title>
54 The use of the "<filename>%</filename>" character
55 is limited in that it only works directly in front of the
56 <filename>.bbappend</filename> portion of the append file's
57 name.
58 You cannot use the wildcard character in any other
59 location of the name.
60 </note>
61 </para></listitem>
62 <listitem><para id='bitbake-term'>
63 <emphasis>BitBake:</emphasis>
64 The task executor and scheduler used by the OpenEmbedded build
65 system to build images.
66 For more information on BitBake, see the
67 <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>.
68 </para></listitem>
69 <listitem><para id='board-support-package-bsp-term'>
70 <emphasis>Board Support Package (BSP):</emphasis>
71 A group of drivers, definitions, and other components that
72 provide support for a specific hardware configuration.
73 For more information on BSPs, see the
74 <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>.
75 </para></listitem>
76 <listitem>
77 <para id='build-directory'>
78 <emphasis>Build Directory:</emphasis>
79 This term refers to the area used by the OpenEmbedded build
80 system for builds.
81 The area is created when you <filename>source</filename> the
82 setup environment script that is found in the Source Directory
83 (i.e. <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>).
84 The
85 <link linkend='var-TOPDIR'><filename>TOPDIR</filename></link>
86 variable points to the Build Directory.</para>
87
88 <para>You have a lot of flexibility when creating the Build
89 Directory.
90 Following are some examples that show how to create the
91 directory.
92 The examples assume your
93 <link linkend='source-directory'>Source Directory</link> is
94 named <filename>poky</filename>:
95 <itemizedlist>
96 <listitem><para>Create the Build Directory inside your
97 Source Directory and let the name of the Build
98 Directory default to <filename>build</filename>:
99 <literallayout class='monospaced'>
100 $ cd $HOME/poky
101 $ source &OE_INIT_FILE;
102 </literallayout>
103 </para></listitem>
104 <listitem><para>Create the Build Directory inside your
105 home directory and specifically name it
106 <filename>test-builds</filename>:
107 <literallayout class='monospaced'>
108 $ cd $HOME
109 $ source poky/&OE_INIT_FILE; test-builds
110 </literallayout>
111 </para></listitem>
112 <listitem><para>
113 Provide a directory path and specifically name the
114 Build Directory.
115 Any intermediate folders in the pathname must exist.
116 This next example creates a Build Directory named
117 <filename>YP-&POKYVERSION;</filename>
118 in your home directory within the existing
119 directory <filename>mybuilds</filename>:
120 <literallayout class='monospaced'>
121 $ cd $HOME
122 $ source $HOME/poky/&OE_INIT_FILE; $HOME/mybuilds/YP-&POKYVERSION;
123 </literallayout>
124 </para></listitem>
125 </itemizedlist>
126 <note>
127 By default, the Build Directory contains
128 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>,
129 which is a temporary directory the build system uses for
130 its work.
131 <filename>TMPDIR</filename> cannot be under NFS.
132 Thus, by default, the Build Directory cannot be under NFS.
133 However, if you need the Build Directory to be under NFS,
134 you can set this up by setting <filename>TMPDIR</filename>
135 in your <filename>local.conf</filename> file
136 to use a local drive.
137 Doing so effectively separates <filename>TMPDIR</filename>
138 from <filename>TOPDIR</filename>, which is the Build
139 Directory.
140 </note>
141 </para></listitem>
142 <listitem><para id='hardware-build-system-term'>
143 <emphasis>Build Host:</emphasis>
144 The system used to build images in a Yocto Project
145 Development environment.
146 The build system is sometimes referred to as the
147 <firstterm>development host</firstterm>.
148 </para></listitem>
149 <listitem><para>
150 <emphasis>Classes:</emphasis>
151 Files that provide for logic encapsulation and inheritance so
152 that commonly used patterns can be defined once and then
153 easily used in multiple recipes.
154 For reference information on the Yocto Project classes, see the
155 "<link linkend='ref-classes'>Classes</link>" chapter.
156 Class files end with the <filename>.bbclass</filename>
157 filename extension.
158 </para></listitem>
159 <listitem><para>
160 <emphasis>Configuration File:</emphasis>
161 Files that hold global definitions of variables,
162 user-defined variables, and hardware configuration
163 information.
164 These files tell the OpenEmbedded build system what to
165 build and what to put into the image to support a
166 particular platform.</para>
167
168 <para>Configuration files end with a <filename>.conf</filename>
169 filename extension.
170 The <filename>conf/local.conf</filename> configuration file in
171 the
172 <link linkend='build-directory'>Build Directory</link>
173 contains user-defined variables that affect every build.
174 The <filename>meta-poky/conf/distro/poky.conf</filename>
175 configuration file defines Yocto "distro" configuration
176 variables used only when building with this policy.
177 Machine configuration files, which
178 are located throughout the
179 <link linkend='source-directory'>Source Directory</link>, define
180 variables for specific hardware and are only used when building
181 for that target (e.g. the
182 <filename>machine/beaglebone.conf</filename> configuration
183 file defines variables for the Texas Instruments ARM Cortex-A8
184 development board).
185 </para></listitem>
186 <listitem><para id='term-container-layer'>
187 <emphasis>Container Layer:</emphasis>
188 Layers that hold other layers.
189 An example of a container layer is OpenEmbedded's
190 <ulink url='https://github.com/openembedded/meta-openembedded'><filename>meta-openembedded</filename></ulink>
191 layer.
192 The <filename>meta-openembedded</filename> layer contains
193 many <filename>meta-*</filename> layers.
194 </para></listitem>
195 <listitem><para id='cross-development-toolchain'>
196 <emphasis>Cross-Development Toolchain:</emphasis>
197 In general, a cross-development toolchain is a collection of
198 software development tools and utilities that run on one
199 architecture and allow you to develop software for a
200 different, or targeted, architecture.
201 These toolchains contain cross-compilers, linkers, and
202 debuggers that are specific to the target architecture.</para>
203
204 <para>The Yocto Project supports two different cross-development
205 toolchains:
206 <itemizedlist>
207 <listitem><para>
208 A toolchain only used by and within
209 BitBake when building an image for a target
210 architecture.
211 </para></listitem>
212 <listitem><para>A relocatable toolchain used outside of
213 BitBake by developers when developing applications
214 that will run on a targeted device.
215 </para></listitem>
216 </itemizedlist></para>
217
218 <para>Creation of these toolchains is simple and automated.
219 For information on toolchain concepts as they apply to the
220 Yocto Project, see the
221 "<ulink url='&YOCTO_DOCS_OM_URL;#cross-development-toolchain-generation'>Cross-Development Toolchain Generation</ulink>"
222 section in the Yocto Project Overview and Concepts Manual.
223 You can also find more information on using the
224 relocatable toolchain in the
225 <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
226 manual.
227 </para></listitem>
228 <listitem><para>
229 <emphasis>Extensible Software Development Kit (eSDK):</emphasis>
230 A custom SDK for application developers.
231 This eSDK allows developers to incorporate their library
232 and programming changes back into the image to make
233 their code available to other application developers.</para>
234
235 <para>For information on the eSDK, see the
236 <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
237 manual.
238 </para></listitem>
239 <listitem><para>
240 <emphasis>Image:</emphasis>
241 An image is an artifact of the BitBake build process given
242 a collection of recipes and related Metadata.
243 Images are the binary output that run on specific hardware or
244 QEMU and are used for specific use-cases.
245 For a list of the supported image types that the Yocto Project
246 provides, see the
247 "<link linkend='ref-images'>Images</link>"
248 chapter.
249 </para></listitem>
250 <listitem><para>
251 <emphasis>Layer:</emphasis>
252 A collection of related recipes.
253 Layers allow you to consolidate related metadata to
254 customize your build.
255 Layers also isolate information used when building
256 for multiple architectures.
257 Layers are hierarchical in their ability to override
258 previous specifications.
259 You can include any number of available layers from the
260 Yocto Project and customize the build by adding your
261 layers after them.
262 You can search the Layer Index for layers used within
263 Yocto Project.</para>
264
265 <para>For introductory information on layers, see the
266 "<ulink url='&YOCTO_DOCS_OM_URL;#the-yocto-project-layer-model'>The Yocto Project Layer Model</ulink>"
267 section in the Yocto Project Overview and Concepts Manual.
268 For more detailed information on layers, see the
269 "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
270 section in the Yocto Project Development Tasks Manual.
271 For a discussion specifically on BSP Layers, see the
272 "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>"
273 section in the Yocto Project Board Support Packages (BSP)
274 Developer's Guide.
275 </para></listitem>
276 <listitem><para id='metadata'>
277 <emphasis>Metadata:</emphasis>
278 A key element of the Yocto Project is the Metadata that
279 is used to construct a Linux distribution and is contained
280 in the files that the
281 <link linkend='build-system-term'>OpenEmbedded build system</link>
282 parses when building an image.
283 In general, Metadata includes recipes, configuration
284 files, and other information that refers to the build
285 instructions themselves, as well as the data used to
286 control what things get built and the effects of the
287 build.
288 Metadata also includes commands and data used to
289 indicate what versions of software are used, from
290 where they are obtained, and changes or additions to the
291 software itself (patches or auxiliary files) that
292 are used to fix bugs or customize the software for use
293 in a particular situation.
294 OpenEmbedded-Core is an important set of validated
295 metadata.</para>
296
297 <para>In the context of the kernel ("kernel Metadata"), the
298 term refers to the kernel config fragments and features
299 contained in the
300 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/yocto-kernel-cache'><filename>yocto-kernel-cache</filename></ulink>
301 Git repository.
302 </para></listitem>
303 <listitem><para id='oe-core'>
304 <emphasis>OpenEmbedded-Core (OE-Core):</emphasis>
305 OE-Core is metadata comprised of foundational recipes,
306 classes, and associated files that are meant to be
307 common among many different OpenEmbedded-derived systems,
308 including the Yocto Project.
309 OE-Core is a curated subset of an original repository
310 developed by the OpenEmbedded community that has been
311 pared down into a smaller, core set of continuously
312 validated recipes.
313 The result is a tightly controlled and an quality-assured
314 core set of recipes.</para>
315
316 <para>You can see the Metadata in the
317 <filename>meta</filename> directory of the Yocto Project
318 <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi'>Source Repositories</ulink>.
319 </para></listitem>
320 <listitem><para id='build-system-term'>
321 <emphasis>OpenEmbedded Build System:</emphasis>
322 The build system specific to the Yocto Project.
323 The OpenEmbedded build system is based on another project known
324 as "Poky", which uses
325 <link linkend='bitbake-term'>BitBake</link> as the task
326 executor.
327 Throughout the Yocto Project documentation set, the
328 OpenEmbedded build system is sometimes referred to simply
329 as "the build system".
330 If other build systems, such as a host or target build system
331 are referenced, the documentation clearly states the
332 difference.
333 <note>
334 For some historical information about Poky, see the
335 <link linkend='poky'>Poky</link> term.
336 </note>
337 </para></listitem>
338 <listitem><para>
339 <emphasis>Package:</emphasis>
340 In the context of the Yocto Project, this term refers to a
341 recipe's packaged output produced by BitBake (i.e. a
342 "baked recipe").
343 A package is generally the compiled binaries produced from the
344 recipe's sources.
345 You "bake" something by running it through BitBake.</para>
346
347 <para>It is worth noting that the term "package" can,
348 in general, have subtle meanings.
349 For example, the packages referred to in the
350 "<link linkend='required-packages-for-the-build-host'>Required Packages for the Build Host</link>"
351 section are compiled binaries that, when installed, add
352 functionality to your Linux distribution.</para>
353
354 <para>Another point worth noting is that historically within
355 the Yocto Project, recipes were referred to as packages - thus,
356 the existence of several BitBake variables that are seemingly
357 mis-named,
358 (e.g. <link linkend='var-PR'><filename>PR</filename></link>,
359 <link linkend='var-PV'><filename>PV</filename></link>, and
360 <link linkend='var-PE'><filename>PE</filename></link>).
361 </para></listitem>
362 <listitem><para>
363 <emphasis>Package Groups:</emphasis>
364 Arbitrary groups of software Recipes.
365 You use package groups to hold recipes that, when built,
366 usually accomplish a single task.
367 For example, a package group could contain the recipes for a
368 company's proprietary or value-add software.
369 Or, the package group could contain the recipes that enable
370 graphics.
371 A package group is really just another recipe.
372 Because package group files are recipes, they end with the
373 <filename>.bb</filename> filename extension.
374 </para></listitem>
375 <listitem><para id='poky'>
376 <emphasis>Poky:</emphasis>
377 Poky, which is pronounced <emphasis>Pock</emphasis>-ee,
378 is a reference embedded distribution and a reference
379 test configuration.
380 Poky provides the following:
381 <itemizedlist>
382 <listitem><para>
383 A base-level functional distro used to illustrate
384 how to customize a distribution.
385 </para></listitem>
386 <listitem><para>
387 A means by which to test the Yocto Project
388 components (i.e. Poky is used to validate
389 the Yocto Project).
390 </para></listitem>
391 <listitem><para>
392 A vehicle through which you can download
393 the Yocto Project.
394 </para></listitem>
395 </itemizedlist>
396 Poky is not a product level distro.
397 Rather, it is a good starting point for customization.
398 <note>
399 Poky began as an open-source
400 project initially developed by OpenedHand.
401 OpenedHand developed Poky from the existing
402 OpenEmbedded build system to create a commercially
403 supportable build system for embedded Linux.
404 After Intel Corporation acquired OpenedHand, the
405 poky project became the basis for the Yocto Project's
406 build system.
407 </note>
408 </para></listitem>
409 <listitem><para>
410 <emphasis>Recipe:</emphasis>
411 A set of instructions for building packages.
412 A recipe describes where you get source code, which patches
413 to apply, how to configure the source, how to compile it and so on.
414 Recipes also describe dependencies for libraries or for other
415 recipes.
416 Recipes represent the logical unit of execution, the software
417 to build, the images to build, and use the
418 <filename>.bb</filename> file extension.
419 </para></listitem>
420 <listitem><para id='reference-kit-term'>
421 <emphasis>Reference Kit:</emphasis>
422 A working example of a system, which includes a
423 <link linkend='board-support-package-bsp-term'>BSP</link>
424 as well as a
425 <link linkend='hardware-build-system-term'>build host</link>
426 and other components, that can work on specific hardware.
427 </para></listitem>
428 <listitem>
429 <para id='source-directory'>
430 <emphasis>Source Directory:</emphasis>
431 This term refers to the directory structure created as a result
432 of creating a local copy of the <filename>poky</filename> Git
433 repository <filename>git://git.yoctoproject.org/poky</filename>
434 or expanding a released <filename>poky</filename> tarball.
435 <note>
436 Creating a local copy of the <filename>poky</filename>
437 Git repository is the recommended method for setting up
438 your Source Directory.
439 </note>
440 Sometimes you might hear the term "poky directory" used to refer
441 to this directory structure.
442 <note>
443 The OpenEmbedded build system does not support file or
444 directory names that contain spaces.
445 Be sure that the Source Directory you use does not contain
446 these types of names.
447 </note></para>
448
449 <para>The Source Directory contains BitBake, Documentation,
450 Metadata and other files that all support the Yocto Project.
451 Consequently, you must have the Source Directory in place on
452 your development system in order to do any development using
453 the Yocto Project.</para>
454
455 <para>When you create a local copy of the Git repository, you
456 can name the repository anything you like.
457 Throughout much of the documentation, "poky"
458 is used as the name of the top-level folder of the local copy of
459 the poky Git repository.
460 So, for example, cloning the <filename>poky</filename> Git
461 repository results in a local Git repository whose top-level
462 folder is also named "poky".</para>
463
464 <para>While it is not recommended that you use tarball expansion
465 to set up the Source Directory, if you do, the top-level
466 directory name of the Source Directory is derived from the
467 Yocto Project release tarball.
468 For example, downloading and unpacking
469 <filename>&YOCTO_POKY_TARBALL;</filename> results in a
470 Source Directory whose root folder is named
471 <filename>&YOCTO_POKY;</filename>.</para>
472
473 <para>It is important to understand the differences between the
474 Source Directory created by unpacking a released tarball as
475 compared to cloning
476 <filename>git://git.yoctoproject.org/poky</filename>.
477 When you unpack a tarball, you have an exact copy of the files
478 based on the time of release - a fixed release point.
479 Any changes you make to your local files in the Source Directory
480 are on top of the release and will remain local only.
481 On the other hand, when you clone the <filename>poky</filename>
482 Git repository, you have an active development repository with
483 access to the upstream repository's branches and tags.
484 In this case, any local changes you make to the local
485 Source Directory can be later applied to active development
486 branches of the upstream <filename>poky</filename> Git
487 repository.</para>
488
489 <para>For more information on concepts related to Git
490 repositories, branches, and tags, see the
491 "<ulink url='&YOCTO_DOCS_OM_URL;#repositories-tags-and-branches'>Repositories, Tags, and Branches</ulink>"
492 section in the Yocto Project Overview and Concepts Manual.
493 </para></listitem>
494 <listitem><para><emphasis>Task:</emphasis>
495 A unit of execution for BitBake (e.g.
496 <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>,
497 <link linkend='ref-tasks-fetch'><filename>do_fetch</filename></link>,
498 <link linkend='ref-tasks-patch'><filename>do_patch</filename></link>,
499 and so forth).
500 </para></listitem>
501 <listitem><para id='toaster-term'><emphasis>Toaster:</emphasis>
502 A web interface to the Yocto Project's
503 <link linkend='build-system-term'>OpenEmbedded Build System</link>.
504 The interface enables you to configure and run your builds.
505 Information about builds is collected and stored in a database.
506 For information on Toaster, see the
507 <ulink url='&YOCTO_DOCS_TOAST_URL;'>Toaster User Manual</ulink>.
508 </para></listitem>
509 <listitem><para>
510 <emphasis>Upstream:</emphasis>
511 A reference to source code or repositories
512 that are not local to the development system but located in a
513 master area that is controlled by the maintainer of the source
514 code.
515 For example, in order for a developer to work on a particular
516 piece of code, they need to first get a copy of it from an
517 "upstream" source.
518 </para></listitem>
519 </itemizedlist>
520 </para>
521
522</chapter>
523<!--
524vim: expandtab tw=80 ts=4
525-->
diff --git a/documentation/ref-manual/ref-variables.xml b/documentation/ref-manual/ref-variables.xml
deleted file mode 100644
index a5064807e5..0000000000
--- a/documentation/ref-manual/ref-variables.xml
+++ /dev/null
@@ -1,16877 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<!-- Dummy chapter -->
7<chapter id='ref-variables-glos'>
8
9<title>Variables Glossary</title>
10
11<para>
12 This chapter lists common variables used in the OpenEmbedded build system and gives an overview
13 of their function and contents.
14</para>
15
16<glossary id='ref-variables-glossary'>
17
18
19 <para>
20 <link linkend='var-ABIEXTENSION'>A</link>
21 <link linkend='var-B'>B</link>
22 <link linkend='var-CACHE'>C</link>
23 <link linkend='var-D'>D</link>
24 <link linkend='var-EFI_PROVIDER'>E</link>
25 <link linkend='var-FEATURE_PACKAGES'>F</link>
26 <link linkend='var-GCCPIE'>G</link>
27 <link linkend='var-HOMEPAGE'>H</link>
28 <link linkend='var-ICECC_DISABLED'>I</link>
29<!-- <link linkend='var-glossary-j'>J</link> -->
30 <link linkend='var-KARCH'>K</link>
31 <link linkend='var-LABELS'>L</link>
32 <link linkend='var-MACHINE'>M</link>
33 <link linkend='var-NATIVELSBSTRING'>N</link>
34 <link linkend='var-OBJCOPY'>O</link>
35 <link linkend='var-P'>P</link>
36<!-- <link linkend='var-glossary-q'>Q</link> -->
37 <link linkend='var-RANLIB'>R</link>
38 <link linkend='var-S'>S</link>
39 <link linkend='var-T'>T</link>
40 <link linkend='var-UBOOT_CONFIG'>U</link>
41 <link linkend='var-VOLATILE_LOG_DIR'>V</link>
42 <link linkend='var-WARN_QA'>W</link>
43 <link linkend='var-XSERVER'>X</link>
44<!-- <link linkend='var-glossary-y'>Y</link> -->
45<!-- <link linkend='var-glossary-z'>Z</link>-->
46 </para>
47
48 <glossdiv id='var-glossary-a'><title>A</title>
49
50 <glossentry id='var-ABIEXTENSION'><glossterm>ABIEXTENSION</glossterm>
51 <info>
52 ABIEXTENSION[doc] = "Extension to the Application Binary Interface (ABI) field of the GNU canonical architecture name (e.g. "eabi")."
53 </info>
54 <glossdef>
55 <para role="glossdeffirst">
56 Extension to the Application Binary Interface (ABI)
57 field of the GNU canonical architecture name
58 (e.g. "eabi").
59 </para>
60
61 <para>
62 ABI extensions are set in the machine include files.
63 For example, the
64 <filename>meta/conf/machine/include/arm/arch-arm.inc</filename>
65 file sets the following extension:
66 <literallayout class='monospaced'>
67 ABIEXTENSION = "eabi"
68 </literallayout>
69 </para>
70 </glossdef>
71 </glossentry>
72
73 <glossentry id='var-ALLOW_EMPTY'><glossterm>ALLOW_EMPTY</glossterm>
74 <info>
75 ALLOW_EMPTY[doc] = "Specifies whether to produce an output package even if it is empty."
76 </info>
77 <glossdef>
78 <para role="glossdeffirst">
79 Specifies whether to produce an output package even if it is
80 empty.
81 By default, BitBake does not produce empty packages.
82 This default behavior can cause issues when there is an
83 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link> or
84 some other hard runtime requirement on the existence of the package.
85 </para>
86
87 <para>
88 Like all package-controlling variables, you must always use them in
89 conjunction with a package name override, as in:
90 <literallayout class='monospaced'>
91 ALLOW_EMPTY_${PN} = "1"
92 ALLOW_EMPTY_${PN}-dev = "1"
93 ALLOW_EMPTY_${PN}-staticdev = "1"
94 </literallayout>
95 </para>
96 </glossdef>
97 </glossentry>
98
99 <glossentry id='var-ALTERNATIVE'><glossterm>ALTERNATIVE</glossterm>
100 <info>
101 ALTERNATIVE[doc] = "Lists commands in a package that need an alternative binary naming scheme."
102 </info>
103 <glossdef>
104 <para role="glossdeffirst">
105 Lists commands in a package that need an alternative
106 binary naming scheme.
107 Sometimes the same command is provided in multiple packages.
108 When this occurs, the OpenEmbedded build system needs to
109 use the alternatives system to create a different binary
110 naming scheme so the commands can co-exist.
111 </para>
112
113 <para>
114 To use the variable, list out the package's commands
115 that also exist as part of another package.
116 For example, if the <filename>busybox</filename> package
117 has four commands that also exist as part of another
118 package, you identify them as follows:
119 <literallayout class='monospaced'>
120 ALTERNATIVE_busybox = "sh sed test bracket"
121 </literallayout>
122 For more information on the alternatives system, see the
123 "<link linkend='ref-classes-update-alternatives'><filename>update-alternatives.bbclass</filename></link>"
124 section.
125 </para>
126 </glossdef>
127 </glossentry>
128
129 <glossentry id='var-ALTERNATIVE_LINK_NAME'><glossterm>ALTERNATIVE_LINK_NAME</glossterm>
130 <info>
131 ALTERNATIVE_LINK_NAME[doc] = "Used by the alternatives system to map duplicated commands to actual locations."
132 </info>
133 <glossdef>
134 <para role="glossdeffirst">
135 Used by the alternatives system to map duplicated commands
136 to actual locations.
137 For example, if the <filename>bracket</filename> command
138 provided by the <filename>busybox</filename> package is
139 duplicated through another package, you must use the
140 <filename>ALTERNATIVE_LINK_NAME</filename> variable to
141 specify the actual location:
142 <literallayout class='monospaced'>
143 ALTERNATIVE_LINK_NAME[bracket] = "/usr/bin/["
144 </literallayout>
145 </para>
146
147 <para>
148 In this example, the binary for the
149 <filename>bracket</filename> command (i.e.
150 <filename>[</filename>) from the
151 <filename>busybox</filename> package resides in
152 <filename>/usr/bin/</filename>.
153 <note>
154 If <filename>ALTERNATIVE_LINK_NAME</filename> is not
155 defined, it defaults to
156 <filename>${bindir}/<replaceable>name</replaceable></filename>.
157 </note>
158 </para>
159
160 <para>
161 For more information on the alternatives system, see the
162 "<link linkend='ref-classes-update-alternatives'><filename>update-alternatives.bbclass</filename></link>"
163 section.
164 </para>
165 </glossdef>
166 </glossentry>
167
168 <glossentry id='var-ALTERNATIVE_PRIORITY'><glossterm>ALTERNATIVE_PRIORITY</glossterm>
169 <info>
170 ALTERNATIVE_PRIORITY[doc] = "Used by the alternatives system to create default priorities for duplicated commands."
171 </info>
172 <glossdef>
173 <para role="glossdeffirst">
174 Used by the alternatives system to create default
175 priorities for duplicated commands.
176 You can use the variable to create a single default
177 regardless of the command name or package, a default for
178 specific duplicated commands regardless of the package, or
179 a default for specific commands tied to particular packages.
180 Here are the available syntax forms:
181 <literallayout class='monospaced'>
182 ALTERNATIVE_PRIORITY = "<replaceable>priority</replaceable>"
183 ALTERNATIVE_PRIORITY[<replaceable>name</replaceable>] = "<replaceable>priority</replaceable>"
184 ALTERNATIVE_PRIORITY_<replaceable>pkg</replaceable>[<replaceable>name</replaceable>] = "<replaceable>priority</replaceable>"
185 </literallayout>
186 </para>
187
188 <para>
189 For more information on the alternatives system, see the
190 "<link linkend='ref-classes-update-alternatives'><filename>update-alternatives.bbclass</filename></link>"
191 section.
192 </para>
193 </glossdef>
194 </glossentry>
195
196 <glossentry id='var-ALTERNATIVE_TARGET'><glossterm>ALTERNATIVE_TARGET</glossterm>
197 <info>
198 ALTERNATIVE_TARGET[doc] = "Used by the alternatives system to create default link locations for duplicated commands."
199 </info>
200 <glossdef>
201 <para role="glossdeffirst">
202 Used by the alternatives system to create default link
203 locations for duplicated commands.
204 You can use the variable to create a single default
205 location for all duplicated commands regardless of the
206 command name or package, a default for
207 specific duplicated commands regardless of the package, or
208 a default for specific commands tied to particular packages.
209 Here are the available syntax forms:
210 <literallayout class='monospaced'>
211 ALTERNATIVE_TARGET = "<replaceable>target</replaceable>"
212 ALTERNATIVE_TARGET[<replaceable>name</replaceable>] = "<replaceable>target</replaceable>"
213 ALTERNATIVE_TARGET_<replaceable>pkg</replaceable>[<replaceable>name</replaceable>] = "<replaceable>target</replaceable>"
214 </literallayout>
215 <note>
216 <para>
217 If <filename>ALTERNATIVE_TARGET</filename> is not
218 defined, it inherits the value from the
219 <link linkend='var-ALTERNATIVE_LINK_NAME'><filename>ALTERNATIVE_LINK_NAME</filename></link>
220 variable.
221 </para>
222
223 <para>
224 If <filename>ALTERNATIVE_LINK_NAME</filename> and
225 <filename>ALTERNATIVE_TARGET</filename> are the
226 same, the target for
227 <filename>ALTERNATIVE_TARGET</filename>
228 has "<filename>.{BPN}</filename>" appended to it.
229 </para>
230
231 <para>
232 Finally, if the file referenced has not been
233 renamed, the alternatives system will rename it to
234 avoid the need to rename alternative files in the
235 <link linkend='ref-tasks-install'><filename>do_install</filename></link>
236 task while
237 retaining support for the command if necessary.
238 </para>
239 </note>
240 </para>
241
242 <para>
243 For more information on the alternatives system, see the
244 "<link linkend='ref-classes-update-alternatives'><filename>update-alternatives.bbclass</filename></link>"
245 section.
246 </para>
247 </glossdef>
248 </glossentry>
249
250 <glossentry id='var-APPEND'><glossterm>APPEND</glossterm>
251 <info>
252 APPEND[doc] = "An override list of append strings for target specified using LABELS."
253 </info>
254 <glossdef>
255 <para role="glossdeffirst">
256 An override list of append strings for each target
257 specified with
258 <link linkend='var-LABELS'><filename>LABELS</filename></link>.
259 </para>
260
261 <para>
262 See the
263 <link linkend='ref-classes-grub-efi'><filename>grub-efi</filename></link>
264 class for more information on how this variable is used.
265 </para>
266 </glossdef>
267 </glossentry>
268
269 <glossentry id='var-AR'><glossterm>AR</glossterm>
270 <info>
271 AR[doc] = "Minimal command and arguments to run 'ar'."
272 </info>
273 <glossdef>
274 <para role="glossdeffirst">
275 The minimal command and arguments used to run
276 <filename>ar</filename>.
277 </para>
278 </glossdef>
279 </glossentry>
280
281 <glossentry id='var-ARCHIVER_MODE'><glossterm>ARCHIVER_MODE</glossterm>
282 <info>
283 ARCHIVER_MODE[doc] = "Controls archive creation used when releasing source files."
284 </info>
285 <glossdef>
286 <para role="glossdeffirst">
287 When used with the
288 <link linkend='ref-classes-archiver'><filename>archiver</filename></link>
289 class, determines the type of information used to create
290 a released archive.
291 You can use this variable to create archives of patched
292 source, original source, configured source, and so forth
293 by employing the following variable flags (varflags):
294 <literallayout class='monospaced'>
295 ARCHIVER_MODE[src] = "original" # Uses original (unpacked) source
296 # files.
297
298 ARCHIVER_MODE[src] = "patched" # Uses patched source files. This is
299 # the default.
300
301 ARCHIVER_MODE[src] = "configured" # Uses configured source files.
302
303 ARCHIVER_MODE[diff] = "1" # Uses patches between do_unpack and
304 # do_patch.
305
306 ARCHIVER_MODE[diff-exclude] ?= "<replaceable>file</replaceable> <replaceable>file</replaceable> ..." # Lists files and directories to
307 # exclude from diff.
308
309 ARCHIVER_MODE[dumpdata] = "1" # Uses environment data.
310
311 ARCHIVER_MODE[recipe] = "1" # Uses recipe and include files.
312
313 ARCHIVER_MODE[srpm] = "1" # Uses RPM package files.
314 </literallayout>
315 For information on how the variable works, see the
316 <filename>meta/classes/archiver.bbclass</filename> file
317 in the
318 <link linkend='source-directory'>Source Directory</link>.
319 </para>
320 </glossdef>
321 </glossentry>
322
323 <glossentry id='var-AS'><glossterm>AS</glossterm>
324 <info>
325 AS[doc] = "Minimal command and arguments to run the assembler."
326 </info>
327 <glossdef>
328 <para role="glossdeffirst">
329 Minimal command and arguments needed to run the
330 assembler.
331 </para>
332 </glossdef>
333 </glossentry>
334
335 <glossentry id='var-ASSUME_PROVIDED'><glossterm>ASSUME_PROVIDED</glossterm>
336 <info>
337 ASSUME_PROVIDED[doc] = "Lists recipe names (PN values) BitBake does not attempt to build."
338 </info>
339 <glossdef>
340 <para role="glossdeffirst">
341 Lists recipe names
342 (<link linkend='var-PN'><filename>PN</filename></link>
343 values) BitBake does not attempt to build.
344 Instead, BitBake assumes these recipes have already been
345 built.
346 </para>
347
348 <para>
349 In OpenEmbedded-Core, <filename>ASSUME_PROVIDED</filename>
350 mostly specifies native tools that should not be built.
351 An example is <filename>git-native</filename>, which when
352 specified, allows for the Git binary from the host to be
353 used rather than building <filename>git-native</filename>.
354 </para>
355 </glossdef>
356 </glossentry>
357
358 <glossentry id='var-ASSUME_SHLIBS'><glossterm>ASSUME_SHLIBS</glossterm>
359 <info>
360 ASSUME_SHLIBS[doc] = "Provides additional shlibs provider mapping information, which adds to or overwrites the information provided automatically by the system."
361 </info>
362 <glossdef>
363 <para role="glossdeffirst">
364 Provides additional <filename>shlibs</filename> provider
365 mapping information, which adds to or overwrites the
366 information provided automatically by the system.
367 Separate multiple entries using spaces.
368 </para>
369
370 <para>
371 As an example, use the following form to add an
372 <filename>shlib</filename> provider of
373 <replaceable>shlibname</replaceable> in
374 <replaceable>packagename</replaceable> with the optional
375 <replaceable>version</replaceable>:
376 <literallayout class='monospaced'>
377 <replaceable>shlibname:packagename</replaceable>[_<replaceable>version</replaceable>]
378 </literallayout>
379 </para>
380
381 <para>
382 Here is an example that adds a shared library named
383 <filename>libEGL.so.1</filename> as being provided by
384 the <filename>libegl-implementation</filename> package:
385 <literallayout class='monospaced'>
386 ASSUME_SHLIBS = "libEGL.so.1:libegl-implementation"
387 </literallayout>
388 </para>
389 </glossdef>
390 </glossentry>
391
392 <glossentry id='var-AUTHOR'><glossterm>AUTHOR</glossterm>
393 <info>
394 AUTHOR[doc] = "Email address used to contact the original author or authors in order to send patches and forward bugs."
395 </info>
396 <glossdef>
397 <para role="glossdeffirst">
398 The email address used to contact the original author
399 or authors in order to send patches and forward bugs.
400 </para>
401 </glossdef>
402 </glossentry>
403
404 <glossentry id='var-AUTO_LIBNAME_PKGS'><glossterm>AUTO_LIBNAME_PKGS</glossterm>
405 <info>
406 AUTO_LIBNAME_PKGS[doc] = "Specifies which packages should be checked for libraries and renamed according to Debian library package naming."
407 </info>
408 <glossdef>
409 <para role="glossdeffirst">
410 When the
411 <link linkend='ref-classes-debian'><filename>debian</filename></link>
412 class is inherited, which is the default behavior,
413 <filename>AUTO_LIBNAME_PKGS</filename> specifies which
414 packages should be checked for libraries and renamed
415 according to Debian library package naming.
416 </para>
417
418 <para>
419 The default value is "${PACKAGES}", which causes the
420 debian class to act on all packages that are
421 explicitly generated by the recipe.
422 </para>
423 </glossdef>
424 </glossentry>
425
426 <glossentry id='var-AUTO_SYSLINUXMENU'><glossterm>AUTO_SYSLINUXMENU</glossterm>
427 <info>
428 AUTO_SYSLINUXMENU[doc] = "Enables creating an automatic menu for the syslinux bootloader."
429 </info>
430 <glossdef>
431 <para role="glossdeffirst">
432 Enables creating an automatic menu for the syslinux
433 bootloader.
434 You must set this variable in your recipe.
435 The
436 <link linkend='ref-classes-syslinux'><filename>syslinux</filename></link>
437 class checks this variable.
438 </para>
439 </glossdef>
440 </glossentry>
441
442 <glossentry id='var-AUTOREV'><glossterm>AUTOREV</glossterm>
443 <info>
444 AUTOREV[doc] = "When SRCREV is set to the value of this variable, it specifies to use the latest source revision in the repository."
445 </info>
446 <glossdef>
447 <para role="glossdeffirst">
448 When
449 <filename><link linkend='var-SRCREV'>SRCREV</link></filename>
450 is set to the value of this variable, it specifies to use
451 the latest source revision in the repository.
452 Here is an example:
453 <literallayout class='monospaced'>
454 SRCREV = "${AUTOREV}"
455 </literallayout>
456 </para>
457
458 <para>
459 If you use the previous statement to retrieve the latest
460 version of software, you need to be sure
461 <link linkend='var-PV'><filename>PV</filename></link>
462 contains
463 <filename>${</filename><link linkend='var-SRCPV'><filename>SRCPV</filename></link><filename>}</filename>.
464 For example, suppose you have a kernel recipe that
465 inherits the
466 <link linkend='ref-classes-kernel'>kernel</link> class
467 and you use the previous statement.
468 In this example, <filename>${SRCPV}</filename> does not
469 automatically get into <filename>PV</filename>.
470 Consequently, you need to change <filename>PV</filename>
471 in your recipe so that it does contain
472 <filename>${SRCPV}</filename>.
473 </para>
474
475 <para>
476 For more information see the
477 "<ulink url='&YOCTO_DOCS_DEV_URL;#automatically-incrementing-a-binary-package-revision-number'>Automatically Incrementing a Binary Package Revision Number</ulink>"
478 section in the Yocto Project Development Tasks Manual.
479 </para>
480 </glossdef>
481 </glossentry>
482
483 <glossentry id='var-AVAILABLE_LICENSES'><glossterm>AVAILABLE_LICENSES</glossterm>
484 <info>
485 AVAILABLE_LICENSES[doc] = "List of licenses found in the directories specified by COMMON_LICENSE_DIR and LICENSE_PATH."
486 </info>
487 <glossdef>
488 <para role="glossdeffirst">
489
490 List of licenses found in the directories specified
491 by <link linkend='var-COMMON_LICENSE_DIR'><filename>COMMON_LICENSE_DIR</filename></link>
492 and <link linkend='var-LICENSE_PATH'><filename>LICENSE_PATH</filename></link>.
493
494 <note>
495 It is assumed that all changes
496 to <filename>COMMON_LICENSE_DIR</filename>
497 and <filename>LICENSE_PATH</filename> have been done
498 before <filename>AVAILABLE_LICENSES</filename> is
499 defined
500 (in <link linkend='ref-classes-license'>license.bbclass</link>).
501 </note>
502 </para>
503 </glossdef>
504 </glossentry>
505
506 <glossentry id='var-AVAILTUNES'><glossterm>AVAILTUNES</glossterm>
507 <info>
508 AVAILTUNES[doc] = "The list of defined CPU and Application Binary Interface (ABI) tunings (i.e. "tunes") available for use by the OpenEmbedded build system."
509 </info>
510 <glossdef>
511 <para role="glossdeffirst">
512 The list of defined CPU and Application Binary Interface
513 (ABI) tunings (i.e. "tunes") available for use by the
514 OpenEmbedded build system.
515 </para>
516
517 <para>
518 The list simply presents the tunes that are available.
519 Not all tunes may be compatible with a particular
520 machine configuration, or with each other in a
521 <ulink url='&YOCTO_DOCS_DEV_URL;#combining-multiple-versions-library-files-into-one-image'>Multilib</ulink>
522 configuration.
523 </para>
524
525 <para>
526 To add a tune to the list, be sure to append it with
527 spaces using the "+=" BitBake operator.
528 Do not simply replace the list by using the "=" operator.
529 See the
530 "<ulink url='&YOCTO_DOCS_BB_URL;#basic-syntax'>Basic Syntax</ulink>"
531 section in the BitBake User Manual for more information.
532 </para>
533 </glossdef>
534 </glossentry>
535
536 </glossdiv>
537
538 <glossdiv id='var-glossary-b'><title>B</title>
539
540 <glossentry id='var-B'><glossterm>B</glossterm>
541 <info>
542 B[doc] = "The Build Directory. The OpenEmbedded build system places generated objects into the Build Directory during a recipe's build process."
543 </info>
544 <glossdef>
545 <para role="glossdeffirst">
546 The directory within the
547 <link linkend='build-directory'>Build Directory</link>
548 in which the OpenEmbedded build system places generated
549 objects during a recipe's build process.
550 By default, this directory is the same as the <link linkend='var-S'><filename>S</filename></link>
551 directory, which is defined as:
552 <literallayout class='monospaced'>
553 S = "${WORKDIR}/${BP}"
554 </literallayout>
555 </para>
556
557 <para>
558 You can separate the (<filename>S</filename>) directory
559 and the directory pointed to by the <filename>B</filename>
560 variable.
561 Most Autotools-based recipes support separating these
562 directories.
563 The build system defaults to using separate directories for
564 <filename>gcc</filename> and some kernel recipes.
565 </para>
566 </glossdef>
567 </glossentry>
568
569 <glossentry id='var-BAD_RECOMMENDATIONS'><glossterm>BAD_RECOMMENDATIONS</glossterm>
570 <info>
571 BAD_RECOMMENDATIONS[doc] = "A list of packages not to install despite being recommended by a recipe. Support for this variable exists only when using the IPK packaging backend."
572 </info>
573 <glossdef>
574 <para role="glossdeffirst">
575 Lists "recommended-only" packages to not install.
576 Recommended-only packages are packages installed only
577 through the
578 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>
579 variable.
580 You can prevent any of these "recommended" packages from
581 being installed by listing them with the
582 <filename>BAD_RECOMMENDATIONS</filename> variable:
583 <literallayout class='monospaced'>
584 BAD_RECOMMENDATIONS = "<replaceable>package_name</replaceable> <replaceable>package_name</replaceable> <replaceable>package_name</replaceable> ..."
585 </literallayout>
586 </para>
587
588 <para>
589 You can set this variable globally in your
590 <filename>local.conf</filename> file or you can attach it to
591 a specific image recipe by using the recipe name override:
592 <literallayout class='monospaced'>
593 BAD_RECOMMENDATIONS_pn-<replaceable>target_image</replaceable> = "<replaceable>package_name</replaceable>"
594 </literallayout>
595 </para>
596
597 <para>
598 It is important to realize that if you choose to not install
599 packages using this variable and some other packages are
600 dependent on them (i.e. listed in a recipe's
601 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>
602 variable), the OpenEmbedded build system ignores your
603 request and will install the packages to avoid dependency
604 errors.
605 </para>
606
607 <para>
608 Support for this variable exists only when using the
609 IPK and RPM packaging backend.
610 Support does not exist for DEB.
611 </para>
612
613 <para>
614 See the
615 <link linkend='var-NO_RECOMMENDATIONS'><filename>NO_RECOMMENDATIONS</filename></link>
616 and the
617 <link linkend='var-PACKAGE_EXCLUDE'><filename>PACKAGE_EXCLUDE</filename></link>
618 variables for related information.
619 </para>
620 </glossdef>
621 </glossentry>
622
623 <glossentry id='var-BASE_LIB'><glossterm>BASE_LIB</glossterm>
624 <info>
625 BASE_LIB[doc] = "The library directory name for the CPU or Application Binary Interface (ABI) tune."
626 </info>
627 <glossdef>
628 <para role="glossdeffirst">
629 The library directory name for the CPU or Application
630 Binary Interface (ABI) tune.
631 The <filename>BASE_LIB</filename> applies only in the
632 Multilib context.
633 See the
634 "<ulink url='&YOCTO_DOCS_DEV_URL;#combining-multiple-versions-library-files-into-one-image'>Combining Multiple Versions of Library Files into One Image</ulink>"
635 section in the Yocto Project Development Tasks Manual for
636 information on Multilib.
637 </para>
638
639 <para>
640 The <filename>BASE_LIB</filename> variable is defined in
641 the machine include files in the
642 <link linkend='source-directory'>Source Directory</link>.
643 If Multilib is not being used, the value defaults to "lib".
644 </para>
645 </glossdef>
646 </glossentry>
647
648 <glossentry id='var-BASE_WORKDIR'><glossterm>BASE_WORKDIR</glossterm>
649 <info>
650 BASE_WORKDIR[doc] = "Points to the base of the work directory for all recipes."
651 </info>
652 <glossdef>
653 <para role="glossdeffirst">
654 Points to the base of the work directory for all recipes.
655 The default value is "${TMPDIR}/work".
656 </para>
657 </glossdef>
658 </glossentry>
659
660 <glossentry id='var-BB_ALLOWED_NETWORKS'><glossterm>BB_ALLOWED_NETWORKS</glossterm>
661 <info>
662 BB_ALLOWED_NETWORKS[doc] = "A list of hosts that the fetcher is allowed to use to obtain the required source code."
663 </info>
664 <glossdef>
665 <para>
666 Specifies a space-delimited list of hosts that the fetcher
667 is allowed to use to obtain the required source code.
668 Following are considerations surrounding this variable:
669 <itemizedlist>
670 <listitem><para>
671 This host list is only used if
672 <filename>BB_NO_NETWORK</filename> is either not
673 set or set to "0".
674 </para></listitem>
675 <listitem><para>
676 Limited support for wildcard matching against the
677 beginning of host names exists.
678 For example, the following setting matches
679 <filename>git.gnu.org</filename>,
680 <filename>ftp.gnu.org</filename>, and
681 <filename>foo.git.gnu.org</filename>.
682 <literallayout class='monospaced'>
683 BB_ALLOWED_NETWORKS = "*.gnu.org"
684 </literallayout>
685 <note><title>Important</title>
686 <para>The use of the "<filename>*</filename>"
687 character only works at the beginning of
688 a host name and it must be isolated from
689 the remainder of the host name.
690 You cannot use the wildcard character in any
691 other location of the name or combined with
692 the front part of the name.</para>
693
694 <para>For example,
695 <filename>*.foo.bar</filename> is supported,
696 while <filename>*aa.foo.bar</filename> is not.
697 </para>
698 </note>
699 </para></listitem>
700 <listitem><para>
701 Mirrors not in the host list are skipped and
702 logged in debug.
703 </para></listitem>
704 <listitem><para>
705 Attempts to access networks not in the host list
706 cause a failure.
707 </para></listitem>
708 </itemizedlist>
709 Using <filename>BB_ALLOWED_NETWORKS</filename> in
710 conjunction with
711 <link linkend='var-PREMIRRORS'><filename>PREMIRRORS</filename></link>
712 is very useful.
713 Adding the host you want to use to
714 <filename>PREMIRRORS</filename> results in the source code
715 being fetched from an allowed location and avoids raising
716 an error when a host that is not allowed is in a
717 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
718 statement.
719 This is because the fetcher does not attempt to use the
720 host listed in <filename>SRC_URI</filename> after a
721 successful fetch from the
722 <filename>PREMIRRORS</filename> occurs.
723 </para>
724 </glossdef>
725 </glossentry>
726
727 <glossentry id='var-BB_DANGLINGAPPENDS_WARNONLY'><glossterm>BB_DANGLINGAPPENDS_WARNONLY</glossterm>
728 <info>
729 BB_DANGLINGAPPENDS_WARNONLY[doc] = "Defines how BitBake handles situations where an append file (.bbappend) has no corresponding recipe file (.bb)."
730 </info>
731 <glossdef>
732 <para role="glossdeffirst">
733 Defines how BitBake handles situations where an append
734 file (<filename>.bbappend</filename>) has no
735 corresponding recipe file (<filename>.bb</filename>).
736 This condition often occurs when layers get out of sync
737 (e.g. <filename>oe-core</filename> bumps a
738 recipe version and the old recipe no longer exists and the
739 other layer has not been updated to the new version
740 of the recipe yet).
741 </para>
742
743 <para>
744 The default fatal behavior is safest because it is
745 the sane reaction given something is out of sync.
746 It is important to realize when your changes are no longer
747 being applied.
748 </para>
749
750 <para>
751 You can change the default behavior by setting this
752 variable to "1", "yes", or "true"
753 in your <filename>local.conf</filename> file, which is
754 located in the
755 <link linkend='build-directory'>Build Directory</link>:
756 Here is an example:
757 <literallayout class='monospaced'>
758 BB_DANGLINGAPPENDS_WARNONLY = "1"
759 </literallayout>
760 </para>
761 </glossdef>
762 </glossentry>
763
764 <glossentry id='var-BB_DISKMON_DIRS'><glossterm>BB_DISKMON_DIRS</glossterm>
765 <info>
766 BB_DISKMON_DIRS[doc] = "Monitors disk space and available inodes during the build and allows you to control the build based on these parameters."
767 </info>
768 <glossdef>
769 <para role="glossdeffirst">
770 Monitors disk space and available inodes during the build
771 and allows you to control the build based on these
772 parameters.
773 </para>
774
775 <para>
776 Disk space monitoring is disabled by default.
777 To enable monitoring, add the <filename>BB_DISKMON_DIRS</filename>
778 variable to your <filename>conf/local.conf</filename> file found in the
779 <link linkend='build-directory'>Build Directory</link>.
780 Use the following form:
781 <literallayout class='monospaced'>
782 BB_DISKMON_DIRS = "<replaceable>action</replaceable>,<replaceable>dir</replaceable>,<replaceable>threshold</replaceable> [...]"
783
784 where:
785
786 <replaceable>action</replaceable> is:
787 ABORT: Immediately abort the build when
788 a threshold is broken.
789 STOPTASKS: Stop the build after the currently
790 executing tasks have finished when
791 a threshold is broken.
792 WARN: Issue a warning but continue the
793 build when a threshold is broken.
794 Subsequent warnings are issued as
795 defined by the BB_DISKMON_WARNINTERVAL
796 variable, which must be defined in
797 the conf/local.conf file.
798
799 <replaceable>dir</replaceable> is:
800 Any directory you choose. You can specify one or
801 more directories to monitor by separating the
802 groupings with a space. If two directories are
803 on the same device, only the first directory
804 is monitored.
805
806 <replaceable>threshold</replaceable> is:
807 Either the minimum available disk space,
808 the minimum number of free inodes, or
809 both. You must specify at least one. To
810 omit one or the other, simply omit the value.
811 Specify the threshold using G, M, K for Gbytes,
812 Mbytes, and Kbytes, respectively. If you do
813 not specify G, M, or K, Kbytes is assumed by
814 default. Do not use GB, MB, or KB.
815 </literallayout>
816 </para>
817
818 <para>
819 Here are some examples:
820 <literallayout class='monospaced'>
821 BB_DISKMON_DIRS = "ABORT,${TMPDIR},1G,100K WARN,${SSTATE_DIR},1G,100K"
822 BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},1G"
823 BB_DISKMON_DIRS = "ABORT,${TMPDIR},,100K"
824 </literallayout>
825 The first example works only if you also provide
826 the <link linkend='var-BB_DISKMON_WARNINTERVAL'><filename>BB_DISKMON_WARNINTERVAL</filename></link> variable
827 in the <filename>conf/local.conf</filename>.
828 This example causes the build system to immediately
829 abort when either the disk space in <filename>${TMPDIR}</filename> drops
830 below 1 Gbyte or the available free inodes drops below
831 100 Kbytes.
832 Because two directories are provided with the variable, the
833 build system also issue a
834 warning when the disk space in the
835 <filename>${SSTATE_DIR}</filename> directory drops
836 below 1 Gbyte or the number of free inodes drops
837 below 100 Kbytes.
838 Subsequent warnings are issued during intervals as
839 defined by the <filename>BB_DISKMON_WARNINTERVAL</filename>
840 variable.
841 </para>
842
843 <para>
844 The second example stops the build after all currently
845 executing tasks complete when the minimum disk space
846 in the <filename>${<link linkend='var-TMPDIR'>TMPDIR</link>}</filename>
847 directory drops below 1 Gbyte.
848 No disk monitoring occurs for the free inodes in this case.
849 </para>
850
851 <para>
852 The final example immediately aborts the build when the
853 number of free inodes in the <filename>${TMPDIR}</filename> directory
854 drops below 100 Kbytes.
855 No disk space monitoring for the directory itself occurs
856 in this case.
857 </para>
858 </glossdef>
859 </glossentry>
860
861 <glossentry id='var-BB_DISKMON_WARNINTERVAL'><glossterm>BB_DISKMON_WARNINTERVAL</glossterm>
862 <info>
863 BB_DISKMON_WARNINTERVAL[doc] = "Defines the disk space and free inode warning intervals. To set these intervals, define the variable in the conf/local.conf file in the Build Directory."
864 </info>
865 <glossdef>
866 <para role="glossdeffirst">
867 Defines the disk space and free inode warning intervals.
868 To set these intervals, define the variable in your
869 <filename>conf/local.conf</filename> file in the
870 <link linkend='build-directory'>Build Directory</link>.
871 </para>
872
873 <para>
874 If you are going to use the
875 <filename>BB_DISKMON_WARNINTERVAL</filename> variable, you must
876 also use the
877 <link linkend='var-BB_DISKMON_DIRS'><filename>BB_DISKMON_DIRS</filename></link> variable
878 and define its action as "WARN".
879 During the build, subsequent warnings are issued each time
880 disk space or number of free inodes further reduces by
881 the respective interval.
882 </para>
883
884 <para>
885 If you do not provide a <filename>BB_DISKMON_WARNINTERVAL</filename>
886 variable and you do use <filename>BB_DISKMON_DIRS</filename> with
887 the "WARN" action, the disk monitoring interval defaults to
888 the following:
889 <literallayout class='monospaced'>
890 BB_DISKMON_WARNINTERVAL = "50M,5K"
891 </literallayout>
892 </para>
893
894 <para>
895 When specifying the variable in your configuration file,
896 use the following form:
897 <literallayout class='monospaced'>
898 BB_DISKMON_WARNINTERVAL = "<replaceable>disk_space_interval</replaceable>,<replaceable>disk_inode_interval</replaceable>"
899
900 where:
901
902 <replaceable>disk_space_interval</replaceable> is:
903 An interval of memory expressed in either
904 G, M, or K for Gbytes, Mbytes, or Kbytes,
905 respectively. You cannot use GB, MB, or KB.
906
907 <replaceable>disk_inode_interval</replaceable> is:
908 An interval of free inodes expressed in either
909 G, M, or K for Gbytes, Mbytes, or Kbytes,
910 respectively. You cannot use GB, MB, or KB.
911 </literallayout>
912 </para>
913
914 <para>
915 Here is an example:
916 <literallayout class='monospaced'>
917 BB_DISKMON_DIRS = "WARN,${SSTATE_DIR},1G,100K"
918 BB_DISKMON_WARNINTERVAL = "50M,5K"
919 </literallayout>
920 These variables cause the OpenEmbedded build system to
921 issue subsequent warnings each time the available
922 disk space further reduces by 50 Mbytes or the number
923 of free inodes further reduces by 5 Kbytes in the
924 <filename>${SSTATE_DIR}</filename> directory.
925 Subsequent warnings based on the interval occur each time
926 a respective interval is reached beyond the initial warning
927 (i.e. 1 Gbytes and 100 Kbytes).
928 </para>
929 </glossdef>
930 </glossentry>
931
932 <glossentry id='var-BB_GENERATE_MIRROR_TARBALLS'><glossterm>BB_GENERATE_MIRROR_TARBALLS</glossterm>
933 <info>
934 BB_GENERATE_MIRROR_TARBALLS[doc] = "Causes tarballs of the source control repositories to be placed in the DL_DIR directory."
935 </info>
936 <glossdef>
937 <para role="glossdeffirst">
938 Causes tarballs of the source control repositories
939 (e.g. Git repositories), including metadata, to be placed
940 in the
941 <link linkend='var-DL_DIR'><filename>DL_DIR</filename></link>
942 directory.
943 </para>
944
945 <para>
946 For performance reasons, creating and placing tarballs of
947 these repositories is not the default action by the
948 OpenEmbedded build system.
949 <literallayout class='monospaced'>
950 BB_GENERATE_MIRROR_TARBALLS = "1"
951 </literallayout>
952 Set this variable in your <filename>local.conf</filename>
953 file in the
954 <link linkend='build-directory'>Build Directory</link>.
955 </para>
956
957 <para>
958 Once you have the tarballs containing your source files,
959 you can clean up your <filename>DL_DIR</filename>
960 directory by deleting any Git or other source control
961 work directories.
962 </para>
963 </glossdef>
964 </glossentry>
965
966 <glossentry id='var-BB_NUMBER_THREADS'><glossterm>BB_NUMBER_THREADS</glossterm>
967 <info>
968 BB_NUMBER_THREADS[doc] = "The maximum number of tasks BitBake should run in parallel at any one time. This variable is automatically configured to be equal to the number of build system cores."
969 </info>
970 <glossdef>
971 <para role="glossdeffirst">
972 The maximum number of tasks BitBake should run in parallel
973 at any one time.
974 The OpenEmbedded build system automatically configures
975 this variable to be equal to the number of cores on the
976 build system.
977 For example, a system with a dual core processor that
978 also uses hyper-threading causes the
979 <filename>BB_NUMBER_THREADS</filename> variable to default
980 to "4".
981 </para>
982
983 <para>
984 For single socket systems (i.e. one CPU), you should not
985 have to override this variable to gain optimal parallelism
986 during builds.
987 However, if you have very large systems that employ
988 multiple physical CPUs, you might want to make sure the
989 <filename>BB_NUMBER_THREADS</filename> variable is not
990 set higher than "20".
991 </para>
992
993 <para>
994 For more information on speeding up builds, see the
995 "<ulink url='&YOCTO_DOCS_DEV_URL;#speeding-up-a-build'>Speeding Up a Build</ulink>"
996 section in the Yocto Project Development Tasks Manual.
997 </para>
998 </glossdef>
999 </glossentry>
1000
1001 <glossentry id='var-BB_SERVER_TIMEOUT'><glossterm>BB_SERVER_TIMEOUT</glossterm>
1002 <info>
1003 BB_SERVER_TIMEOUT [doc] = "Specifies the time (in seconds) after which to unload the BitBake server due to inactivity."
1004 </info>
1005 <glossdef>
1006 <para role="glossdeffirst">
1007 Specifies the time (in seconds) after which to unload the
1008 BitBake server due to inactivity.
1009 Set <filename>BB_SERVER_TIMEOUT</filename> to determine how
1010 long the BitBake server stays resident between invocations.
1011 </para>
1012
1013 <para>
1014 For example, the following statement in your
1015 <filename>local.conf</filename> file instructs the server
1016 to be unloaded after 20 seconds of inactivity:
1017 <literallayout class='monospaced'>
1018 BB_SERVER_TIMEOUT = "20"
1019 </literallayout>
1020 If you want the server to never be unloaded, set
1021 <filename>BB_SERVER_TIMEOUT</filename> to "-1".
1022 </para>
1023 </glossdef>
1024 </glossentry>
1025
1026 <glossentry id='var-BBCLASSEXTEND'><glossterm>BBCLASSEXTEND</glossterm>
1027 <info>
1028 BBCLASSEXTEND[doc] = "Allows you to extend a recipe so that it builds variants of the software. Common variants for recipes are 'native', 'cross', 'nativesdk', and multilibs."
1029 </info>
1030 <glossdef>
1031 <para role="glossdeffirst">
1032 Allows you to extend a recipe so that it builds variants of the software.
1033 Common variants for recipes exist such as "natives" like <filename>quilt-native</filename>,
1034 which is a copy of Quilt built to run on the build system;
1035 "crosses" such as <filename>gcc-cross</filename>,
1036 which is a compiler built to run on the build machine but produces binaries
1037 that run on the target <link linkend='var-MACHINE'><filename>MACHINE</filename></link>;
1038 "nativesdk", which targets the SDK machine instead of <filename>MACHINE</filename>;
1039 and "mulitlibs" in the form "<filename>multilib:</filename><replaceable>multilib_name</replaceable>".
1040 </para>
1041
1042 <para>
1043 To build a different variant of the recipe with a minimal amount of code, it usually
1044 is as simple as adding the following to your recipe:
1045 <literallayout class='monospaced'>
1046 BBCLASSEXTEND =+ "native nativesdk"
1047 BBCLASSEXTEND =+ "multilib:<replaceable>multilib_name</replaceable>"
1048 </literallayout>
1049 <note>
1050 <para>
1051 Internally, the <filename>BBCLASSEXTEND</filename>
1052 mechanism generates recipe variants by rewriting
1053 variable values and applying overrides such as
1054 <filename>_class-native</filename>.
1055 For example, to generate a native version of a recipe,
1056 a
1057 <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>
1058 on "foo" is rewritten to a <filename>DEPENDS</filename>
1059 on "foo-native".
1060 </para>
1061
1062 <para>
1063 Even when using <filename>BBCLASSEXTEND</filename>, the
1064 recipe is only parsed once.
1065 Parsing once adds some limitations.
1066 For example, it is not possible to
1067 include a different file depending on the variant,
1068 since <filename>include</filename> statements are
1069 processed when the recipe is parsed.
1070 </para>
1071 </note>
1072 </para>
1073 </glossdef>
1074 </glossentry>
1075
1076 <glossentry id='var-BBFILE_COLLECTIONS'><glossterm>BBFILE_COLLECTIONS</glossterm>
1077 <info>
1078 BBFILE_COLLECTIONS[doc] = "Lists the names of configured layers. These names are used to find the other BBFILE_* variables."
1079 </info>
1080 <glossdef>
1081 <para role="glossdeffirst">
1082 Lists the names of configured layers.
1083 These names are used to find the other <filename>BBFILE_*</filename>
1084 variables.
1085 Typically, each layer will append its name to this variable in its
1086 <filename>conf/layer.conf</filename> file.
1087 </para>
1088 </glossdef>
1089 </glossentry>
1090
1091 <glossentry id='var-BBFILE_PATTERN'><glossterm>BBFILE_PATTERN</glossterm>
1092 <info>
1093 BBFILE_PATTERN[doc] = "Variable that expands to match files from BBFILES in a particular layer. This variable is used in the layer.conf file and must be suffixed with the name of a layer."
1094 </info>
1095 <glossdef>
1096 <para role="glossdeffirst">
1097 Variable that expands to match files from
1098 <link linkend='var-BBFILES'><filename>BBFILES</filename></link>
1099 in a particular layer.
1100 This variable is used in the <filename>conf/layer.conf</filename> file and must
1101 be suffixed with the name of the specific layer (e.g.
1102 <filename>BBFILE_PATTERN_emenlow</filename>).
1103 </para>
1104 </glossdef>
1105 </glossentry>
1106
1107 <glossentry id='var-BBFILE_PRIORITY'><glossterm>BBFILE_PRIORITY</glossterm>
1108 <info>
1109 BBFILE_PRIORITY[doc] = "Assigns the priority for recipe files in each layer. Setting this variable allows you to prioritize a layer against other layers that contain the same recipe."
1110 </info>
1111 <glossdef>
1112 <para role="glossdeffirst">
1113 Assigns the priority for recipe files in each layer.
1114 </para>
1115
1116 <para>
1117 This variable is useful in situations where the same recipe appears in
1118 more than one layer.
1119 Setting this variable allows you to prioritize a
1120 layer against other layers that contain the same recipe - effectively
1121 letting you control the precedence for the multiple layers.
1122 The precedence established through this variable stands regardless of a
1123 recipe's version
1124 (<link linkend='var-PV'><filename>PV</filename></link> variable).
1125 For example, a layer that has a recipe with a higher <filename>PV</filename> value but for
1126 which the <filename>BBFILE_PRIORITY</filename> is set to have a lower precedence still has a
1127 lower precedence.
1128 </para>
1129
1130 <para>
1131 A larger value for the <filename>BBFILE_PRIORITY</filename> variable results in a higher
1132 precedence.
1133 For example, the value 6 has a higher precedence than the value 5.
1134 If not specified, the <filename>BBFILE_PRIORITY</filename> variable is set based on layer
1135 dependencies (see the
1136 <filename><link linkend='var-LAYERDEPENDS'>LAYERDEPENDS</link></filename> variable for
1137 more information.
1138 The default priority, if unspecified
1139 for a layer with no dependencies, is the lowest defined priority + 1
1140 (or 1 if no priorities are defined).
1141 </para>
1142 <tip>
1143 You can use the command <filename>bitbake-layers show-layers</filename> to list
1144 all configured layers along with their priorities.
1145 </tip>
1146 </glossdef>
1147 </glossentry>
1148
1149 <glossentry id='var-BBFILES'><glossterm>BBFILES</glossterm>
1150 <info>
1151 BBFILES[doc] = "A space-separated list of recipe files BitBake uses to build software."
1152 </info>
1153 <glossdef>
1154 <para role="glossdeffirst">
1155 A space-separated list of recipe files BitBake uses to
1156 build software.
1157 </para>
1158
1159 <para>
1160 When specifying recipe files, you can pattern match using
1161 Python's
1162 <ulink url='https://docs.python.org/3/library/glob.html'><filename>glob</filename></ulink>
1163 syntax.
1164 For details on the syntax, see the documentation by
1165 following the previous link.
1166 </para>
1167 </glossdef>
1168 </glossentry>
1169
1170 <glossentry id='var-BBFILES_DYNAMIC'><glossterm>BBFILES_DYNAMIC</glossterm>
1171 <info>
1172 BBFILES_DYNAMIC[doc] = "Activates content when identified layers are present."
1173 </info>
1174 <glossdef>
1175 <para role="glossdeffirst">
1176 Activates content when identified layers are present.
1177 You identify the layers by the collections that the layers
1178 define.
1179 </para>
1180
1181 <para>
1182 Use the <filename>BBFILES_DYNAMIC</filename> variable to
1183 avoid <filename>.bbappend</filename> files whose
1184 corresponding <filename>.bb</filename> file is in a layer
1185 that attempts to modify other layers through
1186 <filename>.bbappend</filename> but does not want to
1187 introduce a hard dependency on those other layers.
1188 </para>
1189
1190 <para>
1191 Use the following form for
1192 <filename>BBFILES_DYNAMIC</filename>:
1193 <literallayout class='monospaced'>
1194 <replaceable>collection_name</replaceable>:<replaceable>filename_pattern</replaceable>
1195 </literallayout>
1196 The following example identifies two collection names and
1197 two filename patterns:
1198 <literallayout class='monospaced'>
1199 BBFILES_DYNAMIC += " \
1200 clang-layer:${LAYERDIR}/bbappends/meta-clang/*/*/*.bbappend \
1201 core:${LAYERDIR}/bbappends/openembedded-core/meta/*/*/*.bbappend \
1202 "
1203 </literallayout>
1204 This next example shows an error message that occurs
1205 because invalid entries are found, which cause parsing to
1206 abort:
1207 <literallayout class='monospaced'>
1208 ERROR: BBFILES_DYNAMIC entries must be of the form &lt;collection name&gt;:&lt;filename pattern&gt;, not:
1209 /work/my-layer/bbappends/meta-security-isafw/*/*/*.bbappend
1210 /work/my-layer/bbappends/openembedded-core/meta/*/*/*.bbappend
1211 </literallayout>
1212 </para>
1213 </glossdef>
1214 </glossentry>
1215
1216 <glossentry id='var-BBINCLUDELOGS'><glossterm>BBINCLUDELOGS</glossterm>
1217 <info>
1218 BBINCLUDELOGS[doc] = "Variable that controls how BitBake displays logs on build failure."
1219 </info>
1220 <glossdef>
1221 <para role="glossdeffirst">
1222 Variable that controls how BitBake displays logs on build failure.
1223 </para>
1224 </glossdef>
1225 </glossentry>
1226
1227 <glossentry id='var-BBINCLUDELOGS_LINES'><glossterm>BBINCLUDELOGS_LINES</glossterm>
1228 <info>
1229 BBINCLUDELOGS_LINES[doc] = "Amount of log lines printed on failure."
1230 </info>
1231 <glossdef>
1232 <para role="glossdeffirst">
1233 If
1234 <link linkend='var-BBINCLUDELOGS'><filename>BBINCLUDELOGS</filename></link>
1235 is set, specifies the maximum number of lines from the
1236 task log file to print when reporting a failed task.
1237 If you do not set <filename>BBINCLUDELOGS_LINES</filename>,
1238 the entire log is printed.
1239 </para>
1240 </glossdef>
1241 </glossentry>
1242
1243 <glossentry id='var-BBLAYERS'><glossterm>BBLAYERS</glossterm>
1244 <info>
1245 BBLAYERS[doc] = "Lists the layers to enable during the build. This variable is defined in the bblayers.conf configuration file."
1246 </info>
1247 <glossdef>
1248 <para role="glossdeffirst">
1249 Lists the layers to enable during the build.
1250 This variable is defined in the <filename>bblayers.conf</filename> configuration
1251 file in the
1252 <link linkend='build-directory'>Build Directory</link>.
1253 Here is an example:
1254 <literallayout class='monospaced'>
1255 BBLAYERS = " \
1256 /home/scottrif/poky/meta \
1257 /home/scottrif/poky/meta-poky \
1258 /home/scottrif/poky/meta-yocto-bsp \
1259 /home/scottrif/poky/meta-mykernel \
1260 "
1261 </literallayout>
1262 </para>
1263
1264 <para>
1265 This example enables four layers, one of which is a custom, user-defined layer
1266 named <filename>meta-mykernel</filename>.
1267 </para>
1268 </glossdef>
1269 </glossentry>
1270
1271 <glossentry id='var-BBMASK'><glossterm>BBMASK</glossterm>
1272 <info>
1273 BBMASK[doc] = "Prevents BitBake from processing specific recipes or recipe append files."
1274 </info>
1275 <glossdef>
1276 <para role="glossdeffirst">
1277 Prevents BitBake from processing recipes and recipe
1278 append files.
1279 </para>
1280
1281 <para>
1282 You can use the <filename>BBMASK</filename> variable
1283 to "hide" these <filename>.bb</filename> and
1284 <filename>.bbappend</filename> files.
1285 BitBake ignores any recipe or recipe append files that
1286 match any of the expressions.
1287 It is as if BitBake does not see them at all.
1288 Consequently, matching files are not parsed or otherwise
1289 used by BitBake.
1290 </para>
1291
1292 <para>
1293 The values you provide are passed to Python's regular
1294 expression compiler.
1295 Consequently, the syntax follows Python's Regular
1296 Expression (re) syntax.
1297 The expressions are compared against the full paths to
1298 the files.
1299 For complete syntax information, see Python's
1300 documentation at
1301 <ulink url='http://docs.python.org/3/library/re.html#re'></ulink>.
1302 </para>
1303
1304 <para>
1305 The following example uses a complete regular expression
1306 to tell BitBake to ignore all recipe and recipe append
1307 files in the <filename>meta-ti/recipes-misc/</filename>
1308 directory:
1309 <literallayout class='monospaced'>
1310 BBMASK = "meta-ti/recipes-misc/"
1311 </literallayout>
1312 If you want to mask out multiple directories or recipes,
1313 you can specify multiple regular expression fragments.
1314 This next example masks out multiple directories and
1315 individual recipes:
1316 <literallayout class='monospaced'>
1317 BBMASK += "/meta-ti/recipes-misc/ meta-ti/recipes-ti/packagegroup/"
1318 BBMASK += "/meta-oe/recipes-support/"
1319 BBMASK += "/meta-foo/.*/openldap"
1320 BBMASK += "opencv.*\.bbappend"
1321 BBMASK += "lzma"
1322 </literallayout>
1323 <note>
1324 When specifying a directory name, use the trailing
1325 slash character to ensure you match just that directory
1326 name.
1327 </note>
1328 </para>
1329 </glossdef>
1330 </glossentry>
1331
1332 <glossentry id='var-BBMULTICONFIG'><glossterm>BBMULTICONFIG</glossterm>
1333 <info>
1334 BBMULTICONFIG[doc] = "Specifies each additional separate configuration when you are building targets with multiple configurations."
1335 </info>
1336 <glossdef>
1337 <para role="glossdeffirst">
1338 Specifies each additional separate configuration when you
1339 are building targets with multiple configurations.
1340 Use this variable in your
1341 <filename>conf/local.conf</filename> configuration file.
1342 Specify a <replaceable>multiconfigname</replaceable> for
1343 each configuration file you are using.
1344 For example, the following line specifies three
1345 configuration files:
1346 <literallayout class='monospaced'>
1347 BBMULTICONFIG = "configA configB configC"
1348 </literallayout>
1349 Each configuration file you use must reside in the
1350 <link linkend='build-directory'>Build Directory</link>
1351 <filename>conf/multiconfig</filename> directory
1352 (e.g.
1353 <replaceable>build_directory</replaceable><filename>/conf/multiconfig/configA.conf</filename>).
1354 </para>
1355
1356 <para>
1357 For information on how to use
1358 <filename>BBMULTICONFIG</filename> in an environment that
1359 supports building targets with multiple configurations,
1360 see the
1361 "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-building-images-for-multiple-targets-using-multiple-configurations'>Building Images for Multiple Targets Using Multiple Configurations</ulink>"
1362 section in the Yocto Project Development Tasks Manual.
1363 </para>
1364 </glossdef>
1365 </glossentry>
1366
1367 <glossentry id='var-BBPATH'><glossterm>BBPATH</glossterm>
1368 <info>
1369 BBPATH[doc] = "Used by BitBake to locate .bbclass and configuration files. This variable is analogous to the PATH variable."
1370 </info>
1371 <glossdef>
1372 <para role="glossdeffirst">
1373 Used by BitBake to locate
1374 <filename>.bbclass</filename> and configuration files.
1375 This variable is analogous to the
1376 <filename>PATH</filename> variable.
1377 <note>
1378 If you run BitBake from a directory outside of the
1379 <link linkend='build-directory'>Build Directory</link>,
1380 you must be sure to set
1381 <filename>BBPATH</filename> to point to the
1382 Build Directory.
1383 Set the variable as you would any environment variable
1384 and then run BitBake:
1385 <literallayout class='monospaced'>
1386 $ BBPATH = "<replaceable>build_directory</replaceable>"
1387 $ export BBPATH
1388 $ bitbake <replaceable>target</replaceable>
1389 </literallayout>
1390 </note>
1391 </para>
1392 </glossdef>
1393 </glossentry>
1394
1395 <glossentry id='var-BBSERVER'><glossterm>BBSERVER</glossterm>
1396 <info>
1397 BBSERVER[doc] = "Points to the BitBake remote server."
1398 </info>
1399 <glossdef>
1400 <para role="glossdeffirst">
1401 If defined in the BitBake environment,
1402 <filename>BBSERVER</filename> points to the BitBake
1403 remote server.
1404 </para>
1405
1406 <para>
1407 Use the following format to export the variable to the
1408 BitBake environment:
1409 <literallayout class='monospaced'>
1410 export BBSERVER=localhost:$port
1411 </literallayout>
1412 </para>
1413
1414 <para>
1415 By default, <filename>BBSERVER</filename> also appears in
1416 <ulink url='&YOCTO_DOCS_BB_URL;#var-BB_HASHBASE_WHITELIST'><filename>BB_HASHBASE_WHITELIST</filename></ulink>.
1417 Consequently, <filename>BBSERVER</filename> is excluded
1418 from checksum and dependency data.
1419 </para>
1420 </glossdef>
1421 </glossentry>
1422
1423 <glossentry id='var-BINCONFIG'><glossterm>BINCONFIG</glossterm>
1424 <info>
1425 BINCONFIG[doc] = "When inheriting the binconfig-disabled class, this variable specifies binary configuration scripts to disable in favor of using pkg-config to query the information."
1426 </info>
1427 <glossdef>
1428 <para role="glossdeffirst">
1429 When inheriting the
1430 <link linkend='ref-classes-binconfig-disabled'><filename>binconfig-disabled</filename></link>
1431 class, this variable specifies binary configuration
1432 scripts to disable in favor of using
1433 <filename>pkg-config</filename> to query the information.
1434 The <filename>binconfig-disabled</filename> class will
1435 modify the specified scripts to return an error so that
1436 calls to them can be easily found and replaced.
1437 </para>
1438
1439 <para>
1440 To add multiple scripts, separate them by spaces.
1441 Here is an example from the <filename>libpng</filename>
1442 recipe:
1443 <literallayout class='monospaced'>
1444 BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config"
1445 </literallayout>
1446 </para>
1447 </glossdef>
1448 </glossentry>
1449
1450 <glossentry id='var-BINCONFIG_GLOB'><glossterm>BINCONFIG_GLOB</glossterm>
1451 <info>
1452 BINCONFIG_GLOB[doc] = "When inheriting binconfig.bbclass from a recipe, this variable specifies a wildcard for configuration scripts that need editing."
1453 </info>
1454 <glossdef>
1455 <para role="glossdeffirst">
1456 When inheriting the
1457 <link linkend='ref-classes-binconfig'><filename>binconfig</filename></link>
1458 class, this variable specifies a wildcard for
1459 configuration scripts that need editing.
1460 The scripts are edited to correct any paths that have been
1461 set up during compilation so that they are correct for
1462 use when installed into the sysroot and called by the
1463 build processes of other recipes.
1464 <note>
1465 The <filename>BINCONFIG_GLOB</filename> variable
1466 uses
1467 <ulink url='http://tldp.org/LDP/abs/html/globbingref.html'>shell globbing</ulink>,
1468 which is recognition and expansion of wildcards during
1469 pattern matching.
1470 Shell globbing is very similar to
1471 <ulink url='https://docs.python.org/2/library/fnmatch.html#module-fnmatch'><filename>fnmatch</filename></ulink>
1472 and
1473 <ulink url='https://docs.python.org/2/library/glob.html'><filename>glob</filename></ulink>.
1474 </note>
1475 </para>
1476
1477 <para>
1478 For more information on how this variable works, see
1479 <filename>meta/classes/binconfig.bbclass</filename> in the
1480 <link linkend='source-directory'>Source Directory</link>.
1481 You can also find general information on the class in the
1482 "<link linkend='ref-classes-binconfig'><filename>binconfig.bbclass</filename></link>"
1483 section.
1484 </para>
1485 </glossdef>
1486 </glossentry>
1487
1488 <glossentry id='var-BP'><glossterm>BP</glossterm>
1489 <info>
1490 BP[doc] = "The base recipe name and version but without any special recipe name suffix (i.e. -native, lib64-, and so forth). BP is comprised of ${BPN}-${PV}"
1491 </info>
1492 <glossdef>
1493 <para role="glossdeffirst">
1494 The base recipe name and version but without any special
1495 recipe name suffix (i.e. <filename>-native</filename>, <filename>lib64-</filename>,
1496 and so forth).
1497 <filename>BP</filename> is comprised of the following:
1498 <literallayout class="monospaced">
1499 ${BPN}-${PV}
1500 </literallayout>
1501 </para>
1502 </glossdef>
1503 </glossentry>
1504
1505 <glossentry id='var-BPN'><glossterm>BPN</glossterm>
1506 <info>
1507 BPN[doc] = "This variable is a version of the PN variable but removes common suffixes and prefixes."
1508 </info>
1509 <glossdef>
1510 <para role="glossdeffirst">
1511 This variable is a version of the
1512 <link linkend='var-PN'><filename>PN</filename></link>
1513 variable with common prefixes and suffixes
1514 removed, such as <filename>nativesdk-</filename>,
1515 <filename>-cross</filename>,
1516 <filename>-native</filename>, and multilib's
1517 <filename>lib64-</filename> and
1518 <filename>lib32-</filename>.
1519 The exact lists of prefixes and suffixes removed are
1520 specified by the
1521 <link linkend='var-MLPREFIX'><filename>MLPREFIX</filename></link>
1522 and
1523 <link linkend='var-SPECIAL_PKGSUFFIX'><filename>SPECIAL_PKGSUFFIX</filename></link>
1524 variables, respectively.
1525 </para>
1526 </glossdef>
1527 </glossentry>
1528
1529 <glossentry id='var-BUGTRACKER'><glossterm>BUGTRACKER</glossterm>
1530 <info>
1531 BUGTRACKER[doc] = "Specifies a URL for an upstream bug tracking website for a recipe."
1532 </info>
1533 <glossdef>
1534 <para role="glossdeffirst">
1535 Specifies a URL for an upstream bug tracking website for
1536 a recipe.
1537 The OpenEmbedded build system does not use this variable.
1538 Rather, the variable is a useful pointer in case a bug
1539 in the software being built needs to be manually reported.
1540 </para>
1541 </glossdef>
1542 </glossentry>
1543
1544 <glossentry id='var-BUILD_ARCH'><glossterm>BUILD_ARCH</glossterm>
1545 <info>
1546 BUILD_ARCH[doc] = "The name of the building architecture (e.g. i686)."
1547 </info>
1548 <glossdef>
1549 <para role="glossdeffirst">
1550 Specifies the architecture of the build host
1551 (e.g. <filename>i686</filename>).
1552 The OpenEmbedded build system sets the value of
1553 <filename>BUILD_ARCH</filename> from the machine name
1554 reported by the <filename>uname</filename> command.
1555 </para>
1556 </glossdef>
1557 </glossentry>
1558
1559 <glossentry id='var-BUILD_AS_ARCH'><glossterm>BUILD_AS_ARCH</glossterm>
1560 <info>
1561 BUILD_AS_ARCH[doc] = "Specifies the architecture-specific assembler flags for the build host."
1562 </info>
1563 <glossdef>
1564 <para role="glossdeffirst">
1565 Specifies the architecture-specific assembler flags for
1566 the build host. By default, the value of
1567 <filename>BUILD_AS_ARCH</filename> is empty.
1568 </para>
1569 </glossdef>
1570 </glossentry>
1571
1572 <glossentry id='var-BUILD_CC_ARCH'><glossterm>BUILD_CC_ARCH</glossterm>
1573 <info>
1574 BUILD_CC_ARCH[doc] = "Specifies the architecture-specific C compiler flags for the build host."
1575 </info>
1576 <glossdef>
1577 <para role="glossdeffirst">
1578 Specifies the architecture-specific C compiler flags for
1579 the build host. By default, the value of
1580 <filename>BUILD_CC_ARCH</filename> is empty.
1581 </para>
1582 </glossdef>
1583 </glossentry>
1584
1585 <glossentry id='var-BUILD_CCLD'><glossterm>BUILD_CCLD</glossterm>
1586 <info>
1587 BUILD_CCLD[doc] = "Specifies the linker command to be used for the build host when the C compiler is being used as the linker."
1588 </info>
1589 <glossdef>
1590 <para role="glossdeffirst">
1591 Specifies the linker command to be used for the build host
1592 when the C compiler is being used as the linker. By default,
1593 <filename>BUILD_CCLD</filename> points to GCC and passes as
1594 arguments the value of
1595 <link linkend='var-BUILD_CC_ARCH'><filename>BUILD_CC_ARCH</filename></link>,
1596 assuming <filename>BUILD_CC_ARCH</filename> is set.
1597 </para>
1598 </glossdef>
1599 </glossentry>
1600
1601 <glossentry id='var-BUILD_CFLAGS'><glossterm>BUILD_CFLAGS</glossterm>
1602 <info>
1603 BUILD_CFLAGS[doc] = "Specifies the flags to pass to the C compiler when building for the build host."
1604 </info>
1605 <glossdef>
1606 <para role="glossdeffirst">
1607 Specifies the flags to pass to the C compiler when building
1608 for the build host.
1609 When building in the <filename>-native</filename> context,
1610 <link linkend='var-CFLAGS'><filename>CFLAGS</filename></link>
1611 is set to the value of this variable by default.
1612 </para>
1613 </glossdef>
1614 </glossentry>
1615
1616 <glossentry id='var-BUILD_CPPFLAGS'><glossterm>BUILD_CPPFLAGS</glossterm>
1617 <info>
1618 BUILD_CPPFLAGS[doc] = "Specifies the flags to pass to the C preprocessor (i.e. to both the C and the C++ compilers) when building for the build host."
1619 </info>
1620 <glossdef>
1621 <para role="glossdeffirst">
1622 Specifies the flags to pass to the C preprocessor
1623 (i.e. to both the C and the C++ compilers) when building
1624 for the build host.
1625 When building in the <filename>-native</filename> context,
1626 <link linkend='var-CPPFLAGS'><filename>CPPFLAGS</filename></link>
1627 is set to the value of this variable by default.
1628 </para>
1629 </glossdef>
1630 </glossentry>
1631
1632 <glossentry id='var-BUILD_CXXFLAGS'><glossterm>BUILD_CXXFLAGS</glossterm>
1633 <info>
1634 BUILD_CXXFLAGS[doc] = "Specifies the flags to pass to the C++ compiler when building for the build host."
1635 </info>
1636 <glossdef>
1637 <para role="glossdeffirst">
1638 Specifies the flags to pass to the C++ compiler when
1639 building for the build host.
1640 When building in the <filename>-native</filename> context,
1641 <link linkend='var-CXXFLAGS'><filename>CXXFLAGS</filename></link>
1642 is set to the value of this variable by default.
1643 </para>
1644 </glossdef>
1645 </glossentry>
1646
1647 <glossentry id='var-BUILD_FC'><glossterm>BUILD_FC</glossterm>
1648 <info>
1649 BUILD_FC[doc] = "Specifies the Fortran compiler command for the build host."
1650 </info>
1651 <glossdef>
1652 <para role="glossdeffirst">
1653 Specifies the Fortran compiler command for the build host.
1654 By default, <filename>BUILD_FC</filename> points to
1655 Gfortran and passes as arguments the value of
1656 <link linkend='var-BUILD_CC_ARCH'><filename>BUILD_CC_ARCH</filename></link>,
1657 assuming <filename>BUILD_CC_ARCH</filename> is set.
1658 </para>
1659 </glossdef>
1660 </glossentry>
1661
1662 <glossentry id='var-BUILD_LD'><glossterm>BUILD_LD</glossterm>
1663 <info>
1664 BUILD_LD[doc] = "Specifies the linker command for the build host."
1665 </info>
1666 <glossdef>
1667 <para role="glossdeffirst">
1668 Specifies the linker command for the build host. By default,
1669 <filename>BUILD_LD</filename> points to the GNU linker (ld)
1670 and passes as arguments the value of
1671 <link linkend='var-BUILD_LD_ARCH'><filename>BUILD_LD_ARCH</filename></link>,
1672 assuming <filename>BUILD_LD_ARCH</filename> is set.
1673 </para>
1674 </glossdef>
1675 </glossentry>
1676
1677 <glossentry id='var-BUILD_LD_ARCH'><glossterm>BUILD_LD_ARCH</glossterm>
1678 <info>
1679 BUILD_LD_ARCH[doc] = "Specifies architecture-specific linker flags for the build."
1680 </info>
1681 <glossdef>
1682 <para role="glossdeffirst">
1683 Specifies architecture-specific linker flags for the build
1684 host. By default, the value of
1685 <filename>BUILD_LD_ARCH</filename> is empty.
1686 </para>
1687 </glossdef>
1688 </glossentry>
1689
1690 <glossentry id='var-BUILD_LDFLAGS'><glossterm>BUILD_LDFLAGS</glossterm>
1691 <info>
1692 BUILD_LDFLAGS[doc] = "Specifies the flags to pass to the linker when building for the build host."
1693 </info>
1694 <glossdef>
1695 <para role="glossdeffirst">
1696 Specifies the flags to pass to the linker when building
1697 for the build host.
1698 When building in the <filename>-native</filename> context,
1699 <link linkend='var-LDFLAGS'><filename>LDFLAGS</filename></link>
1700 is set to the value of this variable by default.
1701 </para>
1702 </glossdef>
1703 </glossentry>
1704
1705 <glossentry id='var-BUILD_OPTIMIZATION'><glossterm>BUILD_OPTIMIZATION</glossterm>
1706 <info>
1707 BUILD_OPTIMIZATION[doc] = "Specifies the optimization flags passed to the C compiler when building for the build host or the SDK."
1708 </info>
1709 <glossdef>
1710 <para role="glossdeffirst">
1711 Specifies the optimization flags passed to the C compiler
1712 when building for the build host or the SDK.
1713 The flags are passed through the
1714 <link linkend='var-BUILD_CFLAGS'><filename>BUILD_CFLAGS</filename></link>
1715 and
1716 <link linkend='var-BUILDSDK_CFLAGS'><filename>BUILDSDK_CFLAGS</filename></link>
1717 default values.
1718 </para>
1719
1720 <para>
1721 The default value of the
1722 <filename>BUILD_OPTIMIZATION</filename> variable is
1723 "-O2 -pipe".
1724 </para>
1725 </glossdef>
1726 </glossentry>
1727
1728 <glossentry id='var-BUILD_OS'><glossterm>BUILD_OS</glossterm>
1729 <info>
1730 BUILD_OS[doc] = "The operating system (in lower case) of the building architecture (e.g. Linux)."
1731 </info>
1732 <glossdef>
1733 <para role="glossdeffirst">
1734 Specifies the operating system in use on the build
1735 host (e.g. "linux").
1736 The OpenEmbedded build system sets the value of
1737 <filename>BUILD_OS</filename> from the OS reported by
1738 the <filename>uname</filename> command - the first word,
1739 converted to lower-case characters.
1740 </para>
1741 </glossdef>
1742 </glossentry>
1743
1744 <glossentry id='var-BUILD_PREFIX'><glossterm>BUILD_PREFIX</glossterm>
1745 <info>
1746 BUILD_PREFIX[doc] = "The toolchain binary prefix used for native recipes."
1747 </info>
1748 <glossdef>
1749 <para role="glossdeffirst">
1750 The toolchain binary prefix used for native recipes.
1751 The OpenEmbedded build system uses the
1752 <filename>BUILD_PREFIX</filename> value to set the
1753 <link linkend='var-TARGET_PREFIX'><filename>TARGET_PREFIX</filename></link>
1754 when building for <filename>native</filename> recipes.
1755 </para>
1756 </glossdef>
1757 </glossentry>
1758
1759 <glossentry id='var-BUILD_STRIP'><glossterm>BUILD_STRIP</glossterm>
1760 <info>
1761 BUILD_STRIP[doc] = "Specifies the command to be used to strip debugging symbols from binaries produced for the build host."
1762 </info>
1763 <glossdef>
1764 <para role="glossdeffirst">
1765 Specifies the command to be used to strip debugging symbols
1766 from binaries produced for the build host. By default,
1767 <filename>BUILD_STRIP</filename> points to
1768 <filename>${</filename><link linkend='var-BUILD_PREFIX'><filename>BUILD_PREFIX</filename></link><filename>}strip</filename>.
1769 </para>
1770 </glossdef>
1771 </glossentry>
1772
1773 <glossentry id='var-BUILD_SYS'><glossterm>BUILD_SYS</glossterm>
1774 <info>
1775 BUILD_SYS[doc] = "The toolchain binary prefix used for native recipes."
1776 </info>
1777 <glossdef>
1778 <para role="glossdeffirst">
1779 Specifies the system, including the architecture and
1780 the operating system, to use when building for the build
1781 host (i.e. when building <filename>native</filename>
1782 recipes).
1783 </para>
1784
1785 <para>
1786 The OpenEmbedded build system automatically sets this
1787 variable based on
1788 <link linkend='var-BUILD_ARCH'><filename>BUILD_ARCH</filename></link>,
1789 <link linkend='var-BUILD_VENDOR'><filename>BUILD_VENDOR</filename></link>,
1790 and
1791 <link linkend='var-BUILD_OS'><filename>BUILD_OS</filename></link>.
1792 You do not need to set the <filename>BUILD_SYS</filename>
1793 variable yourself.
1794 </para>
1795 </glossdef>
1796 </glossentry>
1797
1798 <glossentry id='var-BUILD_VENDOR'><glossterm>BUILD_VENDOR</glossterm>
1799 <info>
1800 BUILD_VENDOR[doc] = "The vendor name to use when building for the build host."
1801 </info>
1802 <glossdef>
1803 <para role="glossdeffirst">
1804 Specifies the vendor name to use when building for the
1805 build host.
1806 The default value is an empty string ("").
1807 </para>
1808 </glossdef>
1809 </glossentry>
1810
1811 <glossentry id='var-BUILDDIR'><glossterm>BUILDDIR</glossterm>
1812 <info>
1813 BUILDDIR[doc] = "Points to the location of the Build Directory."
1814 </info>
1815 <glossdef>
1816 <para role="glossdeffirst">
1817 Points to the location of the
1818 <link linkend='build-directory'>Build Directory</link>.
1819 You can define this directory indirectly through the
1820 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
1821 script by passing in a Build Directory path when you run
1822 the script.
1823 If you run the script and do not provide a Build Directory
1824 path, the <filename>BUILDDIR</filename> defaults to
1825 <filename>build</filename> in the current directory.
1826 </para>
1827 </glossdef>
1828 </glossentry>
1829
1830 <glossentry id='var-BUILDHISTORY_COMMIT'><glossterm>BUILDHISTORY_COMMIT</glossterm>
1831 <info>
1832 BUILDHISTORY_COMMIT[doc] = "When inheriting the buildhistory class, this variable specifies whether or not to commit the build history output in a local Git repository."
1833 </info>
1834 <glossdef>
1835 <para role="glossdeffirst">
1836 When inheriting the
1837 <link linkend='ref-classes-buildhistory'><filename>buildhistory</filename></link>
1838 class, this variable specifies whether or not to commit the
1839 build history output in a local Git repository.
1840 If set to "1", this local repository will be maintained
1841 automatically by the
1842 <filename>buildhistory</filename>
1843 class and a commit will be created on every
1844 build for changes to each top-level subdirectory of the
1845 build history output (images, packages, and sdk).
1846 If you want to track changes to build history over
1847 time, you should set this value to "1".
1848 </para>
1849
1850 <para>
1851 By default, the <filename>buildhistory</filename> class
1852 does not commit the build history output in a local
1853 Git repository:
1854 <literallayout class='monospaced'>
1855 BUILDHISTORY_COMMIT ?= "0"
1856 </literallayout>
1857 </para>
1858 </glossdef>
1859 </glossentry>
1860
1861 <glossentry id='var-BUILDHISTORY_COMMIT_AUTHOR'><glossterm>BUILDHISTORY_COMMIT_AUTHOR</glossterm>
1862 <info>
1863 BUILDHISTORY_COMMIT_AUTHOR[doc] = "When inheriting the buildhistory class, this variable specifies the author to use for each Git commit."
1864 </info>
1865 <glossdef>
1866 <para role="glossdeffirst">
1867 When inheriting the
1868 <link linkend='ref-classes-buildhistory'><filename>buildhistory</filename></link>
1869 class, this variable specifies the author to use for each
1870 Git commit.
1871 In order for the <filename>BUILDHISTORY_COMMIT_AUTHOR</filename>
1872 variable to work, the
1873 <link linkend='var-BUILDHISTORY_COMMIT'><filename>BUILDHISTORY_COMMIT</filename></link>
1874 variable must be set to "1".
1875 </para>
1876
1877 <para>
1878 Git requires that the value you provide for the
1879 <filename>BUILDHISTORY_COMMIT_AUTHOR</filename> variable
1880 takes the form of "name <replaceable>email@host</replaceable>".
1881 Providing an email address or host that is not valid does
1882 not produce an error.
1883 </para>
1884
1885 <para>
1886 By default, the <filename>buildhistory</filename> class
1887 sets the variable as follows:
1888 <literallayout class='monospaced'>
1889 BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory &lt;buildhistory@${DISTRO}&gt;"
1890 </literallayout>
1891 </para>
1892 </glossdef>
1893 </glossentry>
1894
1895 <glossentry id='var-BUILDHISTORY_DIR'><glossterm>BUILDHISTORY_DIR</glossterm>
1896 <info>
1897 BUILDHISTORY_DIR[doc] = "When inheriting the buildhistory class, this variable specifies the directory in which build history information is kept."
1898 </info>
1899 <glossdef>
1900 <para role="glossdeffirst">
1901 When inheriting the
1902 <link linkend='ref-classes-buildhistory'><filename>buildhistory</filename></link>
1903 class, this variable specifies the directory in which
1904 build history information is kept.
1905 For more information on how the variable works, see the
1906 <filename>buildhistory.class</filename>.
1907 </para>
1908
1909 <para>
1910 By default, the <filename>buildhistory</filename> class
1911 sets the directory as follows:
1912 <literallayout class='monospaced'>
1913 BUILDHISTORY_DIR ?= "${TOPDIR}/buildhistory"
1914 </literallayout>
1915 </para>
1916 </glossdef>
1917 </glossentry>
1918
1919 <glossentry id='var-BUILDHISTORY_FEATURES'><glossterm>BUILDHISTORY_FEATURES</glossterm>
1920 <info>
1921 BUILDHISTORY_FEATURES[doc] = "When inheriting the buildhistory class, this variable specifies the build history features to be enabled."
1922 </info>
1923 <glossdef>
1924 <para role="glossdeffirst">
1925 When inheriting the
1926 <link linkend='ref-classes-buildhistory'><filename>buildhistory</filename></link>
1927 class, this variable specifies the build history features
1928 to be enabled.
1929 For more information on how build history works, see the
1930 "<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-build-output-quality'>Maintaining Build Output Quality</ulink>"
1931 section in the Yocto Project Development Tasks Manual.
1932 </para>
1933
1934 <para>
1935 You can specify these features in the form of a
1936 space-separated list:
1937 <itemizedlist>
1938 <listitem><para><emphasis>image:</emphasis>
1939 Analysis of the contents of images, which
1940 includes the list of installed packages among other
1941 things.
1942 </para></listitem>
1943 <listitem><para><emphasis>package:</emphasis>
1944 Analysis of the contents of individual packages.
1945 </para></listitem>
1946 <listitem><para><emphasis>sdk:</emphasis>
1947 Analysis of the contents of the software
1948 development kit (SDK).
1949 </para></listitem>
1950 <listitem><para><emphasis>task:</emphasis>
1951 Save output file signatures for
1952 <ulink url='&YOCTO_DOCS_OM_URL;#shared-state-cache'>shared state</ulink>
1953 (sstate) tasks.
1954 This saves one file per task and lists the SHA-256
1955 checksums for each file staged (i.e. the output of
1956 the task).
1957 </para></listitem>
1958 </itemizedlist>
1959 </para>
1960
1961 <para>
1962 By default, the <filename>buildhistory</filename> class
1963 enables the following features:
1964 <literallayout class='monospaced'>
1965 BUILDHISTORY_FEATURES ?= "image package sdk"
1966 </literallayout>
1967 </para>
1968 </glossdef>
1969 </glossentry>
1970
1971 <glossentry id='var-BUILDHISTORY_IMAGE_FILES'><glossterm>BUILDHISTORY_IMAGE_FILES</glossterm>
1972 <info>
1973 BUILDHISTORY_IMAGE_FILES[doc] = "When inheriting the buildhistory class, this variable specifies a list of paths to files copied from the image contents into the build history directory under an "image-files" directory in the directory for the image, so that you can track the contents of each file."
1974 </info>
1975 <glossdef>
1976 <para role="glossdeffirst">
1977 When inheriting the
1978 <link linkend='ref-classes-buildhistory'><filename>buildhistory</filename></link>
1979 class, this variable specifies a list of paths to files
1980 copied from the
1981 image contents into the build history directory under
1982 an "image-files" directory in the directory for
1983 the image, so that you can track the contents of each file.
1984 The default is to copy <filename>/etc/passwd</filename>
1985 and <filename>/etc/group</filename>, which allows you to
1986 monitor for changes in user and group entries.
1987 You can modify the list to include any file.
1988 Specifying an invalid path does not produce an error.
1989 Consequently, you can include files that might
1990 not always be present.
1991 </para>
1992
1993 <para>
1994 By default, the <filename>buildhistory</filename> class
1995 provides paths to the following files:
1996 <literallayout class='monospaced'>
1997 BUILDHISTORY_IMAGE_FILES ?= "/etc/passwd /etc/group"
1998 </literallayout>
1999 </para>
2000 </glossdef>
2001 </glossentry>
2002
2003 <glossentry id='var-BUILDHISTORY_PUSH_REPO'><glossterm>BUILDHISTORY_PUSH_REPO</glossterm>
2004 <info>
2005 BUILDHISTORY_PUSH_REPO[doc] = "When inheriting the buildhistory class, this variable optionally specifies a remote repository to which build history pushes Git changes."
2006 </info>
2007 <glossdef>
2008 <para role="glossdeffirst">
2009 When inheriting the
2010 <link linkend='ref-classes-buildhistory'><filename>buildhistory</filename></link>
2011 class, this variable optionally specifies a remote
2012 repository to which build history pushes Git changes.
2013 In order for <filename>BUILDHISTORY_PUSH_REPO</filename>
2014 to work,
2015 <link linkend='var-BUILDHISTORY_COMMIT'><filename>BUILDHISTORY_COMMIT</filename></link>
2016 must be set to "1".
2017 </para>
2018
2019 <para>
2020 The repository should correspond to a remote
2021 address that specifies a repository as understood by
2022 Git, or alternatively to a remote name that you have
2023 set up manually using <filename>git remote</filename>
2024 within the local repository.
2025 </para>
2026
2027 <para>
2028 By default, the <filename>buildhistory</filename> class
2029 sets the variable as follows:
2030 <literallayout class='monospaced'>
2031 BUILDHISTORY_PUSH_REPO ?= ""
2032 </literallayout>
2033 </para>
2034 </glossdef>
2035 </glossentry>
2036
2037 <glossentry id='var-BUILDSDK_CFLAGS'><glossterm>BUILDSDK_CFLAGS</glossterm>
2038 <info>
2039 BUILDSDK_CFLAGS[doc] = "Specifies the flags to pass to the C compiler when building for the SDK."
2040 </info>
2041 <glossdef>
2042 <para role="glossdeffirst">
2043 Specifies the flags to pass to the C compiler when building
2044 for the SDK.
2045 When building in the <filename>nativesdk-</filename>
2046 context,
2047 <link linkend='var-CFLAGS'><filename>CFLAGS</filename></link>
2048 is set to the value of this variable by default.
2049 </para>
2050 </glossdef>
2051 </glossentry>
2052
2053 <glossentry id='var-BUILDSDK_CPPFLAGS'><glossterm>BUILDSDK_CPPFLAGS</glossterm>
2054 <info>
2055 BUILDSDK_CPPFLAGS[doc] = "Specifies the flags to pass to the C pre-processor (i.e. to both the C and the C++ compilers) when building for the SDK."
2056 </info>
2057 <glossdef>
2058 <para role="glossdeffirst">
2059 Specifies the flags to pass to the C pre-processor
2060 (i.e. to both the C and the C++ compilers) when building
2061 for the SDK.
2062 When building in the <filename>nativesdk-</filename>
2063 context,
2064 <link linkend='var-CPPFLAGS'><filename>CPPFLAGS</filename></link>
2065 is set to the value of this variable by default.
2066 </para>
2067 </glossdef>
2068 </glossentry>
2069
2070 <glossentry id='var-BUILDSDK_CXXFLAGS'><glossterm>BUILDSDK_CXXFLAGS</glossterm>
2071 <info>
2072 BUILDSDK_CXXFLAGS[doc] = "Specifies the flags to pass to the C++ compiler when building for the SDK."
2073 </info>
2074 <glossdef>
2075 <para role="glossdeffirst">
2076 Specifies the flags to pass to the C++ compiler when
2077 building for the SDK.
2078 When building in the <filename>nativesdk-</filename>
2079 context,
2080 <link linkend='var-CXXFLAGS'><filename>CXXFLAGS</filename></link>
2081 is set to the value of this variable by default.
2082 </para>
2083 </glossdef>
2084 </glossentry>
2085
2086 <glossentry id='var-BUILDSDK_LDFLAGS'><glossterm>BUILDSDK_LDFLAGS</glossterm>
2087 <info>
2088 BUILDSDK_LDFLAGS[doc] = "Specifies the flags to pass to the linker when building for the SDK."
2089 </info>
2090 <glossdef>
2091 <para role="glossdeffirst">
2092 Specifies the flags to pass to the linker when building
2093 for the SDK.
2094 When building in the <filename>nativesdk-</filename>
2095 context,
2096 <link linkend='var-LDFLAGS'><filename>LDFLAGS</filename></link>
2097 is set to the value of this variable by default.
2098 </para>
2099 </glossdef>
2100 </glossentry>
2101
2102 <glossentry id='var-BUILDSTATS_BASE'><glossterm>BUILDSTATS_BASE</glossterm>
2103 <info>
2104 BUILDSTATS_BASE[doc] = "Points to the location of the directory that holds build statistics when you use and enable the buildstats class."
2105 </info>
2106 <glossdef>
2107 <para role="glossdeffirst">
2108 Points to the location of the directory that holds build
2109 statistics when you use and enable the
2110 <link linkend='ref-classes-buildstats'><filename>buildstats</filename></link>
2111 class.
2112 The <filename>BUILDSTATS_BASE</filename> directory defaults
2113 to
2114 <filename>${</filename><link linkend='var-TMPDIR'><filename>TMPDIR</filename></link><filename>}/buildstats/</filename>.
2115 </para>
2116 </glossdef>
2117 </glossentry>
2118
2119 <glossentry id='var-BUSYBOX_SPLIT_SUID'><glossterm>BUSYBOX_SPLIT_SUID</glossterm>
2120 <info>
2121 BUSYBOX_SPLIT_SUID[doc] = "For the BusyBox recipe, specifies whether to split the output executable file into two parts: one for features that require setuid root, and one for the remaining features."
2122 </info>
2123 <glossdef>
2124 <para role="glossdeffirst">
2125 For the BusyBox recipe, specifies whether to split the
2126 output executable file into two parts: one for features
2127 that require <filename>setuid root</filename>, and one for
2128 the remaining features (i.e. those that do not require
2129 <filename>setuid root</filename>).
2130 </para>
2131
2132 <para>
2133 The <filename>BUSYBOX_SPLIT_SUID</filename> variable
2134 defaults to "1", which results in splitting the output
2135 executable file.
2136 Set the variable to "0" to get a single output executable
2137 file.
2138 </para>
2139 </glossdef>
2140 </glossentry>
2141
2142 </glossdiv>
2143
2144 <glossdiv id='var-glossary-c'><title>C</title>
2145
2146 <glossentry id='var-CACHE'><glossterm>CACHE</glossterm>
2147 <info>
2148 CACHE[doc] = "The directory BitBake uses to store a cache of the metadata."
2149 </info>
2150 <glossdef>
2151 <para role="glossdeffirst">
2152 Specifies the directory BitBake uses to store a cache
2153 of the
2154 <link linkend='metadata'>Metadata</link>
2155 so it does not need to be parsed every time BitBake is
2156 started.
2157 </para>
2158 </glossdef>
2159 </glossentry>
2160
2161 <glossentry id='var-CC'><glossterm>CC</glossterm>
2162 <info>
2163 CC[doc] = "Minimum command and arguments to run the C compiler."
2164 </info>
2165 <glossdef>
2166 <para role="glossdeffirst">
2167 The minimal command and arguments used to run the C
2168 compiler.
2169 </para>
2170 </glossdef>
2171 </glossentry>
2172
2173 <glossentry id='var-CFLAGS'><glossterm>CFLAGS</glossterm>
2174 <info>
2175 CFLAGS[doc] = "Flags passed to the C compiler for the target system. This variable evaluates to the same as TARGET_CFLAGS."
2176 </info>
2177 <glossdef>
2178 <para role="glossdeffirst">
2179 Specifies the flags to pass to the C compiler.
2180 This variable is exported to an environment
2181 variable and thus made visible to the software being
2182 built during the compilation step.
2183 </para>
2184
2185 <para>
2186 Default initialization for <filename>CFLAGS</filename>
2187 varies depending on what is being built:
2188 <itemizedlist>
2189 <listitem><para>
2190 <link linkend='var-TARGET_CFLAGS'><filename>TARGET_CFLAGS</filename></link>
2191 when building for the target
2192 </para></listitem>
2193 <listitem><para>
2194 <link linkend='var-BUILD_CFLAGS'><filename>BUILD_CFLAGS</filename></link>
2195 when building for the build host (i.e.
2196 <filename>-native</filename>)
2197 </para></listitem>
2198 <listitem><para>
2199 <link linkend='var-BUILDSDK_CFLAGS'><filename>BUILDSDK_CFLAGS</filename></link>
2200 when building for an SDK (i.e.
2201 <filename>nativesdk-</filename>)
2202 </para></listitem>
2203 </itemizedlist>
2204 </para>
2205 </glossdef>
2206 </glossentry>
2207
2208 <glossentry id='var-CLASSOVERRIDE'><glossterm>CLASSOVERRIDE</glossterm>
2209 <info>
2210 CLASSOVERRIDE[doc] = "An internal variable specifying the special class override that should currently apply (e.g. "class-target", "class-native", and so forth)."
2211 </info>
2212 <glossdef>
2213 <para role="glossdeffirst">
2214 An internal variable specifying the special class override
2215 that should currently apply (e.g. "class-target",
2216 "class-native", and so forth).
2217 The classes that use this variable (e.g.
2218 <link linkend='ref-classes-native'><filename>native</filename></link>,
2219 <link linkend='ref-classes-nativesdk'><filename>nativesdk</filename></link>,
2220 and so forth) set the variable to appropriate values.
2221 <note>
2222 <filename>CLASSOVERRIDE</filename> gets its default
2223 "class-target" value from the
2224 <filename>bitbake.conf</filename> file.
2225 </note>
2226 </para>
2227
2228 <para>
2229 As an example, the following override allows you to install
2230 extra files, but only when building for the target:
2231 <literallayout class='monospaced'>
2232 do_install_append_class-target() {
2233 install my-extra-file ${D}${sysconfdir}
2234 }
2235 </literallayout>
2236 Here is an example where <filename>FOO</filename>
2237 is set to "native" when building for the build host, and
2238 to "other" when not building for the build host:
2239 <literallayout class='monospaced'>
2240 FOO_class-native = "native"
2241 FOO = "other"
2242 </literallayout>
2243 The underlying mechanism behind
2244 <filename>CLASSOVERRIDE</filename> is simply that it is
2245 included in the default value of
2246 <link linkend='var-OVERRIDES'><filename>OVERRIDES</filename></link>.
2247 </para>
2248 </glossdef>
2249 </glossentry>
2250
2251 <glossentry id='var-CLEANBROKEN'><glossterm>CLEANBROKEN</glossterm>
2252 <info>
2253 CLEANBROKEN[doc] = "Prevents the build system from running 'make clean' during the do_configure task."
2254 </info>
2255 <glossdef>
2256 <para role="glossdeffirst">
2257 If set to "1" within a recipe,
2258 <filename>CLEANBROKEN</filename> specifies that
2259 the <filename>make clean</filename> command does
2260 not work for the software being built.
2261 Consequently, the OpenEmbedded build system will not try
2262 to run <filename>make clean</filename> during the
2263 <link linkend='ref-tasks-configure'><filename>do_configure</filename></link>
2264 task, which is the default behavior.
2265 </para>
2266 </glossdef>
2267 </glossentry>
2268
2269 <glossentry id='var-COMBINED_FEATURES'><glossterm>COMBINED_FEATURES</glossterm>
2270 <info>
2271 COMBINED_FEATURES[doc] = "A set of features common between MACHINE_FEATURES and DISTRO_FEATURES."
2272 </info>
2273 <glossdef>
2274 <para role="glossdeffirst">
2275 Provides a list of hardware features that are enabled in
2276 both
2277 <link linkend='var-MACHINE_FEATURES'><filename>MACHINE_FEATURES</filename></link>
2278 and
2279 <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>.
2280 This select list of features contains features that make
2281 sense to be controlled both at the machine and distribution
2282 configuration level.
2283 For example, the "bluetooth" feature requires hardware
2284 support but should also be optional at the distribution
2285 level, in case the hardware supports Bluetooth but you
2286 do not ever intend to use it.
2287 </para>
2288 </glossdef>
2289 </glossentry>
2290
2291 <glossentry id='var-COMMON_LICENSE_DIR'><glossterm>COMMON_LICENSE_DIR</glossterm>
2292 <info>
2293 COMMON_LICENSE_DIR[doc] = "Points to meta/files/common-licenses in the Source Directory, which is where generic license files reside."
2294 </info>
2295 <glossdef>
2296 <para role="glossdeffirst">
2297 Points to <filename>meta/files/common-licenses</filename>
2298 in the
2299 <link linkend='source-directory'>Source Directory</link>,
2300 which is where generic license files reside.
2301 </para>
2302 </glossdef>
2303 </glossentry>
2304
2305 <glossentry id='var-COMPATIBLE_HOST'><glossterm>COMPATIBLE_HOST</glossterm>
2306 <info>
2307 COMPATIBLE_HOST[doc] = "A regular expression that resolves to one or more hosts (when the recipe is native) or one or more targets (when the recipe is non-native) with which a recipe is compatible."
2308 </info>
2309 <glossdef>
2310 <para role="glossdeffirst">
2311 A regular expression that resolves to one or more hosts
2312 (when the recipe is native) or one or more targets (when
2313 the recipe is non-native) with which a recipe is compatible.
2314 The regular expression is matched against
2315 <link linkend="var-HOST_SYS"><filename>HOST_SYS</filename></link>.
2316 You can use the variable to stop recipes from being built
2317 for classes of systems with which the recipes are not
2318 compatible.
2319 Stopping these builds is particularly useful with kernels.
2320 The variable also helps to increase parsing speed
2321 since the build system skips parsing recipes not
2322 compatible with the current system.
2323 </para>
2324 </glossdef>
2325 </glossentry>
2326
2327 <glossentry id='var-COMPATIBLE_MACHINE'><glossterm>COMPATIBLE_MACHINE</glossterm>
2328 <info>
2329 COMPATIBLE_MACHINE[doc] = "A regular expression that resolves to one or more target machines with which a recipe is compatible."
2330 </info>
2331 <glossdef>
2332 <para role="glossdeffirst">
2333 A regular expression that resolves to one or more
2334 target machines with which a recipe is compatible.
2335 The regular expression is matched against
2336 <link linkend="var-MACHINEOVERRIDES"><filename>MACHINEOVERRIDES</filename></link>.
2337 You can use the variable to stop recipes from being built
2338 for machines with which the recipes are not compatible.
2339 Stopping these builds is particularly useful with kernels.
2340 The variable also helps to increase parsing speed
2341 since the build system skips parsing recipes not
2342 compatible with the current machine.
2343 </para>
2344 </glossdef>
2345 </glossentry>
2346
2347 <glossentry id='var-COMPLEMENTARY_GLOB'><glossterm>COMPLEMENTARY_GLOB</glossterm>
2348 <info>
2349 COMPLEMENTARY_GLOB[doc] = "Defines wildcards to match when installing a list of complementary packages for all the packages installed in an image."
2350 </info>
2351 <glossdef>
2352 <para role="glossdeffirst">
2353 Defines wildcards to match when installing a list of
2354 complementary packages for all the packages explicitly
2355 (or implicitly) installed in an image.
2356 <note>
2357 The <filename>COMPLEMENTARY_GLOB</filename> variable
2358 uses Unix filename pattern matching
2359 (<ulink url='https://docs.python.org/2/library/fnmatch.html#module-fnmatch'><filename>fnmatch</filename></ulink>),
2360 which is similar to the Unix style pathname pattern
2361 expansion
2362 (<ulink url='https://docs.python.org/2/library/glob.html'><filename>glob</filename></ulink>).
2363 </note>
2364 The resulting list of complementary packages is associated
2365 with an item that can be added to
2366 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>.
2367 An example usage of this is the "dev-pkgs" item that when
2368 added to <filename>IMAGE_FEATURES</filename> will
2369 install -dev packages (containing headers and other
2370 development files) for every package in the image.
2371 </para>
2372
2373 <para>
2374 To add a new feature item pointing to a wildcard, use a
2375 variable flag to specify the feature item name and
2376 use the value to specify the wildcard.
2377 Here is an example:
2378 <literallayout class='monospaced'>
2379 COMPLEMENTARY_GLOB[dev-pkgs] = '*-dev'
2380 </literallayout>
2381 </para>
2382 </glossdef>
2383 </glossentry>
2384
2385 <glossentry id='var-COMPONENTS_DIR'><glossterm>COMPONENTS_DIR</glossterm>
2386 <info>
2387 COMPONENTS_DIR[doc] = "Stores sysroot components for each recipe."
2388 </info>
2389 <glossdef>
2390 <para role="glossdeffirst">
2391 Stores sysroot components for each recipe.
2392 The OpenEmbedded build system uses
2393 <filename>COMPONENTS_DIR</filename> when constructing
2394 recipe-specific sysroots for other recipes.
2395 </para>
2396
2397 <para>
2398 The default is
2399 "<filename>${</filename><link linkend='var-STAGING_DIR'><filename>STAGING_DIR</filename></link><filename>}-components</filename>."
2400 (i.e. "<filename>${</filename><link linkend='var-TMPDIR'><filename>TMPDIR</filename></link><filename>}/sysroots-components</filename>").
2401 </para>
2402 </glossdef>
2403 </glossentry>
2404
2405 <glossentry id='var-CONF_VERSION'><glossterm>CONF_VERSION</glossterm>
2406 <info>
2407 CONF_VERSION[doc] = "Tracks the version of local.conf. Increased each time build/conf/ changes incompatibly."
2408 </info>
2409 <glossdef>
2410 <para role="glossdeffirst">
2411 Tracks the version of the local configuration file
2412 (i.e. <filename>local.conf</filename>).
2413 The value for <filename>CONF_VERSION</filename>
2414 increments each time <filename>build/conf/</filename>
2415 compatibility changes.
2416 </para>
2417 </glossdef>
2418 </glossentry>
2419
2420 <glossentry id='var-CONFFILES'><glossterm>CONFFILES</glossterm>
2421 <info>
2422 CONFFILES[doc] = "Identifies editable or configurable files that are part of a package."
2423 </info>
2424 <glossdef>
2425 <para role="glossdeffirst">
2426 Identifies editable or configurable files that are part of a package.
2427 If the Package Management System (PMS) is being used to update
2428 packages on the target system, it is possible that
2429 configuration files you have changed after the original installation
2430 and that you now want to remain unchanged are overwritten.
2431 In other words, editable files might exist in the package that you do not
2432 want reset as part of the package update process.
2433 You can use the <filename>CONFFILES</filename> variable to list the files in the
2434 package that you wish to prevent the PMS from overwriting during this update process.
2435 </para>
2436
2437 <para>
2438 To use the <filename>CONFFILES</filename> variable, provide a package name
2439 override that identifies the resulting package.
2440 Then, provide a space-separated list of files.
2441 Here is an example:
2442 <literallayout class='monospaced'>
2443 CONFFILES_${PN} += "${sysconfdir}/file1 \
2444 ${sysconfdir}/file2 ${sysconfdir}/file3"
2445 </literallayout>
2446 </para>
2447
2448 <para>
2449 A relationship exists between the <filename>CONFFILES</filename> and
2450 <filename><link linkend='var-FILES'>FILES</link></filename> variables.
2451 The files listed within <filename>CONFFILES</filename> must be a subset of
2452 the files listed within <filename>FILES</filename>.
2453 Because the configuration files you provide with <filename>CONFFILES</filename>
2454 are simply being identified so that the PMS will not overwrite them,
2455 it makes sense that
2456 the files must already be included as part of the package through the
2457 <filename>FILES</filename> variable.
2458 </para>
2459
2460 <note>
2461 When specifying paths as part of the <filename>CONFFILES</filename> variable,
2462 it is good practice to use appropriate path variables.
2463 For example, <filename>${sysconfdir}</filename> rather than
2464 <filename>/etc</filename> or <filename>${bindir}</filename> rather
2465 than <filename>/usr/bin</filename>.
2466 You can find a list of these variables at the top of the
2467 <filename>meta/conf/bitbake.conf</filename> file in the
2468 <link linkend='source-directory'>Source Directory</link>.
2469 </note>
2470 </glossdef>
2471 </glossentry>
2472
2473 <glossentry id='var-CONFIG_INITRAMFS_SOURCE'><glossterm>CONFIG_INITRAMFS_SOURCE</glossterm>
2474 <info>
2475 CONFIG_INITRAMFS_SOURCE[doc] = "Identifies the initial RAM filesystem (initramfs) source files. The OpenEmbedded build system receives and uses this kernel Kconfig variable as an environment variable."
2476 </info>
2477 <glossdef>
2478 <para role="glossdeffirst">
2479 Identifies the initial RAM filesystem (initramfs) source
2480 files.
2481 The OpenEmbedded build system receives and uses
2482 this kernel Kconfig variable as an environment variable.
2483 By default, the variable is set to null ("").
2484 </para>
2485
2486 <para>
2487 The <filename>CONFIG_INITRAMFS_SOURCE</filename> can be
2488 either a single cpio archive with a
2489 <filename>.cpio</filename> suffix or a
2490 space-separated list of directories and files for building
2491 the initramfs image.
2492 A cpio archive should contain a filesystem archive
2493 to be used as an initramfs image.
2494 Directories should contain a filesystem layout to be
2495 included in the initramfs image.
2496 Files should contain entries according to the format
2497 described by the
2498 <filename>usr/gen_init_cpio</filename> program in the
2499 kernel tree.
2500 </para>
2501
2502 <para>
2503 If you specify multiple directories and files, the
2504 initramfs image will be the aggregate of all of them.
2505 </para>
2506
2507 <para>
2508 For information on creating an initramfs, see the
2509 "<ulink url='&YOCTO_DOCS_DEV_URL;#building-an-initramfs-image'>Building an Initial RAM Filesystem (initramfs) Image</ulink>"
2510 section in the Yocto Project Development Tasks Manual.
2511 </para>
2512 </glossdef>
2513 </glossentry>
2514
2515 <glossentry id='var-CONFIG_SITE'><glossterm>CONFIG_SITE</glossterm>
2516 <info>
2517 CONFIG_SITE[doc] = "A list of files that contains autoconf test results relevant to the current build. This variable is used by the Autotools utilities when running configure."
2518 </info>
2519 <glossdef>
2520 <para role="glossdeffirst">
2521 A list of files that contains <filename>autoconf</filename> test results relevant
2522 to the current build.
2523 This variable is used by the Autotools utilities when running
2524 <filename>configure</filename>.
2525 </para>
2526 </glossdef>
2527 </glossentry>
2528
2529 <glossentry id='var-CONFIGURE_FLAGS'><glossterm>CONFIGURE_FLAGS</glossterm>
2530 <info>
2531 CONFIGURE_FLAGS[doc] = "The minimal arguments for GNU configure."
2532 </info>
2533 <glossdef>
2534 <para role="glossdeffirst">
2535 The minimal arguments for GNU configure.
2536 </para>
2537 </glossdef>
2538 </glossentry>
2539
2540 <glossentry id='var-CONFLICT_DISTRO_FEATURES'><glossterm>CONFLICT_DISTRO_FEATURES</glossterm>
2541 <info>
2542 CONFLICT_DISTRO_FEATURES[doc] = "When a recipe inherits the distro_features_check class, this variable identifies distribution features that would be in conflict should the recipe be built."
2543 </info>
2544 <glossdef>
2545 <para role="glossdeffirst">
2546 When inheriting the
2547 <link linkend='ref-classes-distro_features_check'><filename>distro_features_check</filename></link>
2548 class, this
2549 variable identifies distribution features that would
2550 be in conflict should the recipe
2551 be built.
2552 In other words, if the
2553 <filename>CONFLICT_DISTRO_FEATURES</filename> variable
2554 lists a feature that also appears in
2555 <filename>DISTRO_FEATURES</filename> within the
2556 current configuration, an error occurs and the
2557 build stops.
2558 </para>
2559 </glossdef>
2560 </glossentry>
2561
2562 <glossentry id='var-COPYLEFT_LICENSE_EXCLUDE'><glossterm>COPYLEFT_LICENSE_EXCLUDE</glossterm>
2563 <info>
2564 COPYLEFT_LICENSE_EXCLUDE[doc] = "Licenses to exclude in the source archived by the archiver class."
2565 </info>
2566 <glossdef>
2567 <para role="glossdeffirst">
2568 A space-separated list of licenses to exclude from the
2569 source archived by the
2570 <link linkend='ref-classes-archiver'><filename>archiver</filename></link>
2571 class.
2572 In other words, if a license in a recipe's
2573 <link linkend='var-LICENSE'><filename>LICENSE</filename></link>
2574 value is in the value of
2575 <filename>COPYLEFT_LICENSE_EXCLUDE</filename>, then its
2576 source is not archived by the class.
2577 <note>
2578 The <filename>COPYLEFT_LICENSE_EXCLUDE</filename>
2579 variable takes precedence over the
2580 <link linkend='var-COPYLEFT_LICENSE_INCLUDE'><filename>COPYLEFT_LICENSE_INCLUDE</filename></link>
2581 variable.
2582 </note>
2583 The default value, which is "CLOSED Proprietary", for
2584 <filename>COPYLEFT_LICENSE_EXCLUDE</filename> is set
2585 by the
2586 <link linkend='ref-classes-copyleft_filter'><filename>copyleft_filter</filename></link>
2587 class, which is inherited by the
2588 <filename>archiver</filename> class.
2589 </para>
2590 </glossdef>
2591 </glossentry>
2592
2593 <glossentry id='var-COPYLEFT_LICENSE_INCLUDE'><glossterm>COPYLEFT_LICENSE_INCLUDE</glossterm>
2594 <info>
2595 COPYLEFT_LICENSE_INCLUDE[doc] = "Licenses to include in the source archived by the archiver class."
2596 </info>
2597 <glossdef>
2598 <para role="glossdeffirst">
2599 A space-separated list of licenses to include in the
2600 source archived by the
2601 <link linkend='ref-classes-archiver'><filename>archiver</filename></link>
2602 class.
2603 In other words, if a license in a recipe's
2604 <link linkend='var-LICENSE'><filename>LICENSE</filename></link>
2605 value is in the value of
2606 <filename>COPYLEFT_LICENSE_INCLUDE</filename>, then its
2607 source is archived by the class.
2608 </para>
2609
2610 <para>
2611 The default value is set by the
2612 <link linkend='ref-classes-copyleft_filter'><filename>copyleft_filter</filename></link>
2613 class, which is inherited by the
2614 <filename>archiver</filename> class.
2615 The default value includes "GPL*", "LGPL*", and "AGPL*".
2616 </para>
2617 </glossdef>
2618 </glossentry>
2619
2620 <glossentry id='var-COPYLEFT_PN_EXCLUDE'><glossterm>COPYLEFT_PN_EXCLUDE</glossterm>
2621 <info>
2622 COPYLEFT_PN_EXCLUDE[doc] = "Recipes to exclude in the source archived by the archiver class."
2623 </info>
2624 <glossdef>
2625 <para role="glossdeffirst">
2626 A list of recipes to exclude in the source archived
2627 by the
2628 <link linkend='ref-classes-archiver'><filename>archiver</filename></link>
2629 class.
2630 The <filename>COPYLEFT_PN_EXCLUDE</filename> variable
2631 overrides the license inclusion and exclusion caused
2632 through the
2633 <link linkend='var-COPYLEFT_LICENSE_INCLUDE'><filename>COPYLEFT_LICENSE_INCLUDE</filename></link>
2634 and
2635 <link linkend='var-COPYLEFT_LICENSE_EXCLUDE'><filename>COPYLEFT_LICENSE_EXCLUDE</filename></link>
2636 variables, respectively.
2637 </para>
2638
2639 <para>
2640 The default value, which is "" indicating to not explicitly
2641 exclude any recipes by name, for
2642 <filename>COPYLEFT_PN_EXCLUDE</filename> is set
2643 by the
2644 <link linkend='ref-classes-copyleft_filter'><filename>copyleft_filter</filename></link>
2645 class, which is inherited by the
2646 <filename>archiver</filename> class.
2647 </para>
2648 </glossdef>
2649 </glossentry>
2650
2651 <glossentry id='var-COPYLEFT_PN_INCLUDE'><glossterm>COPYLEFT_PN_INCLUDE</glossterm>
2652 <info>
2653 COPYLEFT_PN_INCLUDE[doc] = "Recipes to include in the source archived by the archiver class."
2654 </info>
2655 <glossdef>
2656 <para role="glossdeffirst">
2657 A list of recipes to include in the source archived
2658 by the
2659 <link linkend='ref-classes-archiver'><filename>archiver</filename></link>
2660 class.
2661 The <filename>COPYLEFT_PN_INCLUDE</filename> variable
2662 overrides the license inclusion and exclusion caused
2663 through the
2664 <link linkend='var-COPYLEFT_LICENSE_INCLUDE'><filename>COPYLEFT_LICENSE_INCLUDE</filename></link>
2665 and
2666 <link linkend='var-COPYLEFT_LICENSE_EXCLUDE'><filename>COPYLEFT_LICENSE_EXCLUDE</filename></link>
2667 variables, respectively.
2668 </para>
2669
2670 <para>
2671 The default value, which is "" indicating to not explicitly
2672 include any recipes by name, for
2673 <filename>COPYLEFT_PN_INCLUDE</filename> is set
2674 by the
2675 <link linkend='ref-classes-copyleft_filter'><filename>copyleft_filter</filename></link>
2676 class, which is inherited by the
2677 <filename>archiver</filename> class.
2678 </para>
2679 </glossdef>
2680 </glossentry>
2681
2682 <glossentry id='var-COPYLEFT_RECIPE_TYPES'><glossterm>COPYLEFT_RECIPE_TYPES</glossterm>
2683 <info>
2684 COPYLEFT_RECIPE_TYPES[doc] = "Recipe types to include in the source archived by the archiver class."
2685 </info>
2686 <glossdef>
2687 <para role="glossdeffirst">
2688 A space-separated list of recipe types to include
2689 in the source archived by the
2690 <link linkend='ref-classes-archiver'><filename>archiver</filename></link>
2691 class.
2692 Recipe types are <filename>target</filename>,
2693 <filename>native</filename>,
2694 <filename>nativesdk</filename>,
2695 <filename>cross</filename>,
2696 <filename>crosssdk</filename>, and
2697 <filename>cross-canadian</filename>.
2698 </para>
2699
2700 <para>
2701 The default value, which is "target*", for
2702 <filename>COPYLEFT_RECIPE_TYPES</filename> is set
2703 by the
2704 <link linkend='ref-classes-copyleft_filter'><filename>copyleft_filter</filename></link>
2705 class, which is inherited by the
2706 <filename>archiver</filename> class.
2707 </para>
2708 </glossdef>
2709 </glossentry>
2710
2711 <glossentry id='var-COPY_LIC_DIRS'><glossterm>COPY_LIC_DIRS</glossterm>
2712 <info>
2713 COPY_LIC_DIRS[doc] = "If set to "1" along with the COPY_LIC_MANIFEST variable, the OpenEmbedded build system copies into the image the license files, which are located in /usr/share/common-licenses, for each package."
2714 </info>
2715 <glossdef>
2716 <para role="glossdeffirst">
2717 If set to "1" along with the
2718 <link linkend='var-COPY_LIC_MANIFEST'><filename>COPY_LIC_MANIFEST</filename></link>
2719 variable, the OpenEmbedded build system copies
2720 into the image the license files, which are located in
2721 <filename>/usr/share/common-licenses</filename>,
2722 for each package.
2723 The license files are placed
2724 in directories within the image itself during build time.
2725 <note>
2726 The <filename>COPY_LIC_DIRS</filename> does not
2727 offer a path for adding licenses for newly installed
2728 packages to an image, which might be most suitable
2729 for read-only filesystems that cannot be upgraded.
2730 See the
2731 <link linkend='var-LICENSE_CREATE_PACKAGE'><filename>LICENSE_CREATE_PACKAGE</filename></link>
2732 variable for additional information.
2733 You can also reference the
2734 "<ulink url='&YOCTO_DOCS_DEV_URL;#providing-license-text'>Providing License Text</ulink>"
2735 section in the Yocto Project Development Tasks Manual
2736 for information on providing license text.
2737 </note>
2738 </para>
2739 </glossdef>
2740 </glossentry>
2741
2742 <glossentry id='var-COPY_LIC_MANIFEST'><glossterm>COPY_LIC_MANIFEST</glossterm>
2743 <info>
2744 COPY_LIC_MANIFEST[doc] = "If set to "1", the OpenEmbedded build system copies the license manifest for the image to /usr/share/common-licenses/license.manifest within the image itself."
2745 </info>
2746 <glossdef>
2747 <para role="glossdeffirst">
2748 If set to "1", the OpenEmbedded build system copies
2749 the license manifest for the image to
2750 <filename>/usr/share/common-licenses/license.manifest</filename>
2751 within the image itself during build time.
2752 <note>
2753 The <filename>COPY_LIC_MANIFEST</filename> does not
2754 offer a path for adding licenses for newly installed
2755 packages to an image, which might be most suitable
2756 for read-only filesystems that cannot be upgraded.
2757 See the
2758 <link linkend='var-LICENSE_CREATE_PACKAGE'><filename>LICENSE_CREATE_PACKAGE</filename></link>
2759 variable for additional information.
2760 You can also reference the
2761 "<ulink url='&YOCTO_DOCS_DEV_URL;#providing-license-text'>Providing License Text</ulink>"
2762 section in the Yocto Project Development Tasks Manual
2763 for information on providing license text.
2764 </note>
2765 </para>
2766 </glossdef>
2767 </glossentry>
2768
2769 <glossentry id='var-CORE_IMAGE_EXTRA_INSTALL'><glossterm>CORE_IMAGE_EXTRA_INSTALL</glossterm>
2770 <info>
2771 CORE_IMAGE_EXTRA_INSTALL[doc] = "Specifies the list of packages to be added to the image. You should only set this variable in the conf/local.conf file in the Build Directory."
2772 </info>
2773 <glossdef>
2774 <para role="glossdeffirst">
2775 Specifies the list of packages to be added to the image.
2776 You should only set this variable in the
2777 <filename>local.conf</filename> configuration file found
2778 in the
2779 <link linkend='build-directory'>Build Directory</link>.
2780 </para>
2781
2782 <para>
2783 This variable replaces <filename>POKY_EXTRA_INSTALL</filename>, which is no longer supported.
2784 </para>
2785 </glossdef>
2786 </glossentry>
2787
2788 <glossentry id='var-COREBASE'><glossterm>COREBASE</glossterm>
2789 <info>
2790 COREBASE[doc] = "Specifies the parent directory of the OpenEmbedded-Core Metadata layer (i.e. meta)."
2791 </info>
2792 <glossdef>
2793 <para role="glossdeffirst">
2794 Specifies the parent directory of the OpenEmbedded-Core
2795 Metadata layer (i.e. <filename>meta</filename>).
2796 </para>
2797
2798 <para>
2799 It is an important distinction that
2800 <filename>COREBASE</filename> points to the parent of this
2801 layer and not the layer itself.
2802 Consider an example where you have cloned the Poky Git
2803 repository and retained the <filename>poky</filename>
2804 name for your local copy of the repository.
2805 In this case, <filename>COREBASE</filename> points to
2806 the <filename>poky</filename> folder because it is the
2807 parent directory of the <filename>poky/meta</filename>
2808 layer.
2809 </para>
2810 </glossdef>
2811 </glossentry>
2812
2813 <glossentry id='var-COREBASE_FILES'><glossterm>COREBASE_FILES</glossterm>
2814 <info>
2815 COREBASE_FILES[doc] = "Lists files from the COREBASE directory that should be copied other than the layers listed in the bblayers.conf file."
2816 </info>
2817 <glossdef>
2818 <para role="glossdeffirst">
2819 Lists files from the
2820 <link linkend='var-COREBASE'><filename>COREBASE</filename></link>
2821 directory that should be copied other than the layers
2822 listed in the <filename>bblayers.conf</filename> file.
2823 The <filename>COREBASE_FILES</filename> variable exists
2824 for the purpose of copying metadata from the
2825 OpenEmbedded build system into the extensible
2826 SDK.
2827 </para>
2828
2829 <para>
2830 Explicitly listing files in <filename>COREBASE</filename>
2831 is needed because it typically contains build
2832 directories and other files that should not normally
2833 be copied into the extensible SDK.
2834 Consequently, the value of
2835 <filename>COREBASE_FILES</filename> is used in order to
2836 only copy the files that are actually needed.
2837 </para>
2838 </glossdef>
2839 </glossentry>
2840
2841 <glossentry id='var-CPP'><glossterm>CPP</glossterm>
2842 <info>
2843 CPP[doc] = "Minimum command and arguments to run the C preprocessor."
2844 </info>
2845 <glossdef>
2846 <para role="glossdeffirst">
2847 The minimal command and arguments used to run the C
2848 preprocessor.
2849 </para>
2850 </glossdef>
2851 </glossentry>
2852
2853 <glossentry id='var-CPPFLAGS'><glossterm>CPPFLAGS</glossterm>
2854 <info>
2855 CPPFLAGS[doc] = "Specifies the flags to pass to the C pre-processor (i.e. to both the C and the C++ compilers)."
2856 </info>
2857 <glossdef>
2858 <para role="glossdeffirst">
2859 Specifies the flags to pass to the C pre-processor
2860 (i.e. to both the C and the C++ compilers).
2861 This variable is exported to an environment
2862 variable and thus made visible to the software being
2863 built during the compilation step.
2864 </para>
2865
2866 <para>
2867 Default initialization for <filename>CPPFLAGS</filename>
2868 varies depending on what is being built:
2869 <itemizedlist>
2870 <listitem><para>
2871 <link linkend='var-TARGET_CPPFLAGS'><filename>TARGET_CPPFLAGS</filename></link>
2872 when building for the target
2873 </para></listitem>
2874 <listitem><para>
2875 <link linkend='var-BUILD_CPPFLAGS'><filename>BUILD_CPPFLAGS</filename></link>
2876 when building for the build host (i.e.
2877 <filename>-native</filename>)
2878 </para></listitem>
2879 <listitem><para>
2880 <link linkend='var-BUILDSDK_CPPFLAGS'><filename>BUILDSDK_CPPFLAGS</filename></link>
2881 when building for an SDK (i.e.
2882 <filename>nativesdk-</filename>)
2883 </para></listitem>
2884 </itemizedlist>
2885 </para>
2886 </glossdef>
2887 </glossentry>
2888
2889 <glossentry id='var-CROSS_COMPILE'><glossterm>CROSS_COMPILE</glossterm>
2890 <info>
2891 CROSS_COMPILE[doc] = "The toolchain binary prefix for the target tools."
2892 </info>
2893 <glossdef>
2894 <para role="glossdeffirst">
2895 The toolchain binary prefix for the target tools.
2896 The <filename>CROSS_COMPILE</filename> variable is the
2897 same as the
2898 <link linkend='var-TARGET_PREFIX'><filename>TARGET_PREFIX</filename></link>
2899 variable.
2900 <note>
2901 The OpenEmbedded build system sets the
2902 <filename>CROSS_COMPILE</filename> variable only in
2903 certain contexts (e.g. when building for kernel
2904 and kernel module recipes).
2905 </note>
2906 </para>
2907 </glossdef>
2908 </glossentry>
2909
2910 <glossentry id='var-CVSDIR'><glossterm>CVSDIR</glossterm>
2911 <info>
2912 CVSDIR[doc] = "The directory where cvs checkouts will be stored in."
2913 </info>
2914 <glossdef>
2915 <para role="glossdeffirst">
2916 The directory in which files checked out under the
2917 CVS system are stored.
2918 </para>
2919 </glossdef>
2920 </glossentry>
2921
2922 <glossentry id='var-CXX'><glossterm>CXX</glossterm>
2923 <info>
2924 CXX[doc] = "Minimum command and arguments to run the C++ compiler."
2925 </info>
2926 <glossdef>
2927 <para role="glossdeffirst">
2928 The minimal command and arguments used to run the C++
2929 compiler.
2930 </para>
2931 </glossdef>
2932 </glossentry>
2933
2934 <glossentry id='var-CXXFLAGS'><glossterm>CXXFLAGS</glossterm>
2935 <info>
2936 CXXFLAGS[doc] = "Specifies the flags to pass to the C++ compiler."
2937 </info>
2938 <glossdef>
2939 <para role="glossdeffirst">
2940 Specifies the flags to pass to the C++ compiler.
2941 This variable is exported to an environment
2942 variable and thus made visible to the software being
2943 built during the compilation step.
2944 </para>
2945
2946 <para>
2947 Default initialization for <filename>CXXFLAGS</filename>
2948 varies depending on what is being built:
2949 <itemizedlist>
2950 <listitem><para>
2951 <link linkend='var-TARGET_CXXFLAGS'><filename>TARGET_CXXFLAGS</filename></link>
2952 when building for the target
2953 </para></listitem>
2954 <listitem><para>
2955 <link linkend='var-BUILD_CXXFLAGS'><filename>BUILD_CXXFLAGS</filename></link>
2956 when building for the build host (i.e.
2957 <filename>-native</filename>)
2958 </para></listitem>
2959 <listitem><para>
2960 <link linkend='var-BUILDSDK_CXXFLAGS'><filename>BUILDSDK_CXXFLAGS</filename></link>
2961 when building for an SDK (i.e.
2962 <filename>nativesdk-</filename>)
2963 </para></listitem>
2964 </itemizedlist>
2965 </para>
2966 </glossdef>
2967 </glossentry>
2968
2969 </glossdiv>
2970
2971 <glossdiv id='var-glossary-d'><title>D</title>
2972
2973 <glossentry id='var-D'><glossterm>D</glossterm>
2974 <info>
2975 D[doc] = "The destination directory."
2976 </info>
2977 <glossdef>
2978 <para role="glossdeffirst">
2979 The destination directory.
2980 The location in the
2981 <link linkend='build-directory'>Build Directory</link>
2982 where components are installed by the
2983 <link linkend='ref-tasks-install'><filename>do_install</filename></link>
2984 task.
2985 This location defaults to:
2986 <literallayout class='monospaced'>
2987 ${WORKDIR}/image
2988 </literallayout>
2989 <note><title>Caution</title>
2990 Tasks that read from or write to this directory should
2991 run under
2992 <ulink url='&YOCTO_DOCS_OM_URL;#fakeroot-and-pseudo'>fakeroot</ulink>.
2993 </note>
2994 </para>
2995 </glossdef>
2996 </glossentry>
2997
2998 <glossentry id='var-DATE'><glossterm>DATE</glossterm>
2999 <info>
3000 DATE[doc] = "The date the build was started using YMD format."
3001 </info>
3002 <glossdef>
3003 <para role="glossdeffirst">
3004 The date the build was started.
3005 Dates appear using the year, month, and day (YMD) format
3006 (e.g. "20150209" for February 9th, 2015).
3007 </para>
3008 </glossdef>
3009 </glossentry>
3010
3011 <glossentry id='var-DATETIME'><glossterm>DATETIME</glossterm>
3012 <info>
3013 DATETIME[doc] = "The date and time the build was started."
3014 </info>
3015 <glossdef>
3016 <para role="glossdeffirst">
3017 The date and time on which the current build started.
3018 The format is suitable for timestamps.
3019 </para>
3020 </glossdef>
3021 </glossentry>
3022
3023 <glossentry id='var-DEBIAN_NOAUTONAME'><glossterm>DEBIAN_NOAUTONAME</glossterm>
3024 <info>
3025 DEBIAN_NOAUTONAME[doc] = "Prevents a particular package from being renamed according to Debian package naming."
3026 </info>
3027 <glossdef>
3028 <para role="glossdeffirst">
3029 When the
3030 <link linkend='ref-classes-debian'><filename>debian</filename></link>
3031 class is inherited, which is the default behavior,
3032 <filename>DEBIAN_NOAUTONAME</filename> specifies a
3033 particular package should not be renamed according to
3034 Debian library package naming.
3035 You must use the package name as an override when you
3036 set this variable.
3037 Here is an example from the <filename>fontconfig</filename>
3038 recipe:
3039 <literallayout class='monospaced'>
3040 DEBIAN_NOAUTONAME_fontconfig-utils = "1"
3041 </literallayout>
3042 </para>
3043 </glossdef>
3044 </glossentry>
3045
3046 <glossentry id='var-DEBIANNAME'><glossterm>DEBIANNAME</glossterm>
3047 <info>
3048 DEBIANNAME[doc] = "Allows you to override the library name for an individual package for Debian library package renaming."
3049 </info>
3050 <glossdef>
3051 <para role="glossdeffirst">
3052 When the
3053 <link linkend='ref-classes-debian'><filename>debian</filename></link>
3054 class is inherited, which is the default behavior,
3055 <filename>DEBIANNAME</filename> allows you to override the
3056 library name for an individual package.
3057 Overriding the library name in these cases is rare.
3058 You must use the package name as an override when you
3059 set this variable.
3060 Here is an example from the <filename>dbus</filename>
3061 recipe:
3062 <literallayout class='monospaced'>
3063 DEBIANNAME_${PN} = "dbus-1"
3064 </literallayout>
3065 </para>
3066 </glossdef>
3067 </glossentry>
3068
3069 <glossentry id='var-DEBUG_BUILD'><glossterm>DEBUG_BUILD</glossterm>
3070 <info>
3071 DEBUG_BUILD[doc] = "Specifies to build packages with debugging information. This influences the value of the SELECTED_OPTIMIZATION variable."
3072 </info>
3073 <glossdef>
3074 <para role="glossdeffirst">
3075 Specifies to build packages with debugging information.
3076 This influences the value of the
3077 <filename><link linkend='var-SELECTED_OPTIMIZATION'>SELECTED_OPTIMIZATION</link></filename>
3078 variable.
3079 </para>
3080 </glossdef>
3081 </glossentry>
3082
3083 <glossentry id='var-DEBUG_OPTIMIZATION'><glossterm>DEBUG_OPTIMIZATION</glossterm>
3084 <info>
3085 DEBUG_OPTIMIZATION[doc] = "The options to pass in TARGET_CFLAGS and CFLAGS when compiling a system for debugging. This variable defaults to '-O -fno-omit-frame-pointer -g'."
3086 </info>
3087 <glossdef>
3088 <para role="glossdeffirst">
3089 The options to pass in
3090 <filename><link linkend='var-TARGET_CFLAGS'>TARGET_CFLAGS</link></filename>
3091 and <filename><link linkend='var-CFLAGS'>CFLAGS</link></filename> when compiling
3092 a system for debugging.
3093 This variable defaults to "-O -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe".
3094 </para>
3095 </glossdef>
3096 </glossentry>
3097
3098 <glossentry id='var-DEFAULT_PREFERENCE'><glossterm>DEFAULT_PREFERENCE</glossterm>
3099 <info>
3100 DEFAULT_PREFERENCE[doc] = "Specifies a weak bias for recipe selection priority."
3101 </info>
3102 <glossdef>
3103 <para role="glossdeffirst">
3104 Specifies a weak bias for recipe selection priority.
3105 </para>
3106
3107 <para>
3108 The most common usage of this is variable is to set
3109 it to "-1" within a recipe for a development version of a
3110 piece of software.
3111 Using the variable in this way causes the stable version
3112 of the recipe to build by default in the absence of
3113 <filename><link linkend='var-PREFERRED_VERSION'>PREFERRED_VERSION</link></filename>
3114 being used to build the development version.
3115 </para>
3116
3117 <note>
3118 The bias provided by <filename>DEFAULT_PREFERENCE</filename>
3119 is weak and is overridden by
3120 <filename><link linkend='var-BBFILE_PRIORITY'>BBFILE_PRIORITY</link></filename>
3121 if that variable is different between two layers
3122 that contain different versions of the same recipe.
3123 </note>
3124 </glossdef>
3125 </glossentry>
3126
3127 <glossentry id='var-DEFAULTTUNE'><glossterm>DEFAULTTUNE</glossterm>
3128 <info>
3129 DEFAULTTUNE[doc] = "The default CPU and Application Binary Interface (ABI) tunings (i.e. the "tune") used by the OpenEmbedded build system."
3130 </info>
3131 <glossdef>
3132 <para role="glossdeffirst">
3133 The default CPU and Application Binary Interface (ABI)
3134 tunings (i.e. the "tune") used by the OpenEmbedded build
3135 system.
3136 The <filename>DEFAULTTUNE</filename> helps define
3137 <link linkend='var-TUNE_FEATURES'><filename>TUNE_FEATURES</filename></link>.
3138 </para>
3139
3140 <para>
3141 The default tune is either implicitly or explicitly set
3142 by the machine
3143 (<link linkend='var-MACHINE'><filename>MACHINE</filename></link>).
3144 However, you can override the setting using available tunes
3145 as defined with
3146 <link linkend='var-AVAILTUNES'><filename>AVAILTUNES</filename></link>.
3147 </para>
3148 </glossdef>
3149 </glossentry>
3150
3151 <glossentry id='var-DEPENDS'><glossterm>DEPENDS</glossterm>
3152 <info>
3153 DEPENDS[doc] = "Lists a recipe's build-time dependencies (i.e. other recipe files)."
3154 </info>
3155 <glossdef>
3156 <para role="glossdeffirst">
3157 Lists a recipe's build-time dependencies.
3158 These are dependencies on other recipes whose
3159 contents (e.g. headers and shared libraries) are needed
3160 by the recipe at build time.
3161 </para>
3162
3163 <para>
3164 As an example, consider a recipe <filename>foo</filename>
3165 that contains the following assignment:
3166 <literallayout class='monospaced'>
3167 DEPENDS = "bar"
3168 </literallayout>
3169 The practical effect of the previous assignment is that
3170 all files installed by bar will be available in the
3171 appropriate staging sysroot, given by the
3172 <link linkend='var-STAGING_DIR'><filename>STAGING_DIR*</filename></link>
3173 variables, by the time the
3174 <link linkend='ref-tasks-configure'><filename>do_configure</filename></link>
3175 task for <filename>foo</filename> runs.
3176 This mechanism is implemented by having
3177 <filename>do_configure</filename> depend on the
3178 <link linkend='ref-tasks-populate_sysroot'><filename>do_populate_sysroot</filename></link>
3179 task of each recipe listed in <filename>DEPENDS</filename>,
3180 through a
3181 <filename>[</filename><ulink url='&YOCTO_DOCS_BB_URL;#variable-flags'><filename>deptask</filename></ulink><filename>]</filename>
3182 declaration in the
3183 <link linkend='ref-classes-base'><filename>base</filename></link>
3184 class.
3185 <note>
3186 It seldom is necessary to reference, for example,
3187 <filename>STAGING_DIR_HOST</filename> explicitly.
3188 The standard classes and build-related variables are
3189 configured to automatically use the appropriate staging
3190 sysroots.
3191 </note>
3192 As another example, <filename>DEPENDS</filename> can also
3193 be used to add utilities that run on the build machine
3194 during the build.
3195 For example, a recipe that makes use of a code generator
3196 built by the recipe <filename>codegen</filename> might have
3197 the following:
3198 <literallayout class='monospaced'>
3199 DEPENDS = "codegen-native"
3200 </literallayout>
3201 For more information, see the
3202 <link linkend='ref-classes-native'><filename>native</filename></link>
3203 class and the
3204 <link linkend='var-EXTRANATIVEPATH'><filename>EXTRANATIVEPATH</filename></link>
3205 variable.
3206 <note>
3207 <title>Notes</title>
3208 <itemizedlist>
3209 <listitem><para>
3210 <filename>DEPENDS</filename> is a list of
3211 recipe names.
3212 Or, to be more precise, it is a list of
3213 <link linkend='var-PROVIDES'><filename>PROVIDES</filename></link>
3214 names, which usually match recipe names.
3215 Putting a package name such as "foo-dev" in
3216 <filename>DEPENDS</filename> does not make
3217 sense.
3218 Use "foo" instead, as this will put files
3219 from all the packages that make up
3220 <filename>foo</filename>, which includes
3221 those from <filename>foo-dev</filename>, into
3222 the sysroot.
3223 </para></listitem>
3224 <listitem><para>
3225 One recipe having another recipe in
3226 <filename>DEPENDS</filename> does not by itself
3227 add any runtime dependencies between the
3228 packages produced by the two recipes.
3229 However, as explained in the
3230 "<ulink url='&YOCTO_DOCS_OM_URL;#automatically-added-runtime-dependencies'>Automatically Added Runtime Dependencies</ulink>"
3231 section in the Yocto Project Overview and
3232 Concepts Manual, runtime dependencies will
3233 often be added automatically, meaning
3234 <filename>DEPENDS</filename> alone is
3235 sufficient for most recipes.
3236 </para></listitem>
3237 <listitem><para>
3238 Counterintuitively,
3239 <filename>DEPENDS</filename> is often necessary
3240 even for recipes that install precompiled
3241 components.
3242 For example, if <filename>libfoo</filename>
3243 is a precompiled library that links against
3244 <filename>libbar</filename>, then
3245 linking against <filename>libfoo</filename>
3246 requires both <filename>libfoo</filename>
3247 and <filename>libbar</filename> to be available
3248 in the sysroot.
3249 Without a <filename>DEPENDS</filename> from the
3250 recipe that installs <filename>libfoo</filename>
3251 to the recipe that installs
3252 <filename>libbar</filename>, other recipes might
3253 fail to link against
3254 <filename>libfoo</filename>.
3255 </para></listitem>
3256 </itemizedlist>
3257 </note>
3258 </para>
3259
3260 <para>
3261 For information on runtime dependencies, see the
3262 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>
3263 variable.
3264 You can also see the
3265 "<ulink url='&YOCTO_DOCS_BB_URL;#tasks'>Tasks</ulink>" and
3266 "<ulink url='&YOCTO_DOCS_BB_URL;#dependencies'>Dependencies</ulink>"
3267 sections in the BitBake User Manual for additional
3268 information on tasks and dependencies.
3269 </para>
3270 </glossdef>
3271 </glossentry>
3272
3273 <glossentry id='var-DEPLOY_DIR'><glossterm>DEPLOY_DIR</glossterm>
3274 <info>
3275 DEPLOY_DIR[doc] = "Points to the general area that the OpenEmbedded build system uses to place images, packages, SDKs, and other output files that are ready to be used outside of the build system."
3276 </info>
3277 <glossdef>
3278 <para role="glossdeffirst">
3279 Points to the general area that the OpenEmbedded build
3280 system uses to place images, packages, SDKs, and other output
3281 files that are ready to be used outside of the build system.
3282 By default, this directory resides within the
3283 <link linkend='build-directory'>Build Directory</link>
3284 as <filename>${TMPDIR}/deploy</filename>.
3285 </para>
3286
3287 <para>
3288 For more information on the structure of the Build
3289 Directory, see
3290 "<link linkend='structure-build'>The Build Directory - <filename>build/</filename></link>"
3291 section.
3292 For more detail on the contents of the
3293 <filename>deploy</filename> directory, see the
3294 "<ulink url='&YOCTO_DOCS_OM_URL;#images-dev-environment'>Images</ulink>",
3295 "<ulink url='&YOCTO_DOCS_OM_URL;#package-feeds-dev-environment'>Package Feeds</ulink>",
3296 and
3297 "<ulink url='&YOCTO_DOCS_OM_URL;#sdk-dev-environment'>Application Development SDK</ulink>"
3298 sections all in the Yocto Project Overview and Concepts
3299 Manual.
3300 </para>
3301 </glossdef>
3302 </glossentry>
3303
3304 <glossentry id='var-DEPLOY_DIR_DEB'><glossterm>DEPLOY_DIR_DEB</glossterm>
3305 <info>
3306 DEPLOY_DIR_DEB[doc] = "Points to a Debian-specific area that the OpenEmbedded build system uses to place images, packages, SDKs, and other output files that are ready to be used outside of the build system."
3307 </info>
3308 <glossdef>
3309 <para role="glossdeffirst">
3310 Points to the area that the OpenEmbedded build system uses
3311 to place Debian packages that are ready to be used outside
3312 of the build system.
3313 This variable applies only when
3314 <link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>
3315 contains "package_deb".
3316 </para>
3317
3318 <para>
3319 The BitBake configuration file initially defines the
3320 <filename>DEPLOY_DIR_DEB</filename> variable as a
3321 sub-folder of
3322 <link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link>:
3323 <literallayout class='monospaced'>
3324 DEPLOY_DIR_DEB = "${DEPLOY_DIR}/deb"
3325 </literallayout>
3326 </para>
3327
3328 <para>
3329 The
3330 <link linkend='ref-classes-package_deb'><filename>package_deb</filename></link>
3331 class uses the
3332 <filename>DEPLOY_DIR_DEB</filename> variable to make sure
3333 the
3334 <link linkend='ref-tasks-package_write_deb'><filename>do_package_write_deb</filename></link>
3335 task writes Debian packages into the appropriate folder.
3336 For more information on how packaging works, see the
3337 "<ulink url='&YOCTO_DOCS_OM_URL;#package-feeds-dev-environment'>Package Feeds</ulink>"
3338 section in the Yocto Project Overview and Concepts Manual.
3339 </para>
3340 </glossdef>
3341 </glossentry>
3342
3343 <glossentry id='var-DEPLOY_DIR_IMAGE'><glossterm>DEPLOY_DIR_IMAGE</glossterm>
3344 <info>
3345 DEPLOY_DIR_IMAGE[doc] = "Points to the area that the OpenEmbedded build system uses to place images and other associated output files that are ready to be deployed onto the target machine."
3346 </info>
3347 <glossdef>
3348 <para role="glossdeffirst">
3349 Points to the area that the OpenEmbedded build system uses
3350 to place images and other associated output files that are
3351 ready to be deployed onto the target machine.
3352 The directory is machine-specific as it contains the
3353 <filename>${MACHINE}</filename> name.
3354 By default, this directory resides within the
3355 <link linkend='build-directory'>Build Directory</link>
3356 as <filename>${DEPLOY_DIR}/images/${MACHINE}/</filename>.
3357 </para>
3358
3359 <para>
3360 For more information on the structure of the Build
3361 Directory, see
3362 "<link linkend='structure-build'>The Build Directory - <filename>build/</filename></link>"
3363 section.
3364 For more detail on the contents of the
3365 <filename>deploy</filename> directory, see the
3366 "<ulink url='&YOCTO_DOCS_OM_URL;#images-dev-environment'>Images</ulink>"
3367 and
3368 "<ulink url='&YOCTO_DOCS_OM_URL;#sdk-dev-environment'>Application Development SDK</ulink>"
3369 sections both in the Yocto Project Overview and Concepts
3370 Manual.
3371 </para>
3372 </glossdef>
3373 </glossentry>
3374
3375 <glossentry id='var-DEPLOY_DIR_IPK'><glossterm>DEPLOY_DIR_IPK</glossterm>
3376 <info>
3377 DEPLOY_DIR_IPK[doc] = "Points to a IPK-specific area that the OpenEmbedded build system uses to place images, packages, SDKs, and other output files that are ready to be used outside of the build system."
3378 </info>
3379 <glossdef>
3380 <para role="glossdeffirst">
3381 Points to the area that the OpenEmbedded build system uses
3382 to place IPK packages that are ready to be used outside of
3383 the build system.
3384 This variable applies only when
3385 <link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>
3386 contains "package_ipk".
3387 </para>
3388
3389 <para>
3390 The BitBake configuration file initially defines this
3391 variable as a sub-folder of
3392 <link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link>:
3393 <literallayout class='monospaced'>
3394 DEPLOY_DIR_IPK = "${DEPLOY_DIR}/ipk"
3395 </literallayout>
3396 </para>
3397
3398 <para>
3399 The
3400 <link linkend='ref-classes-package_ipk'><filename>package_ipk</filename></link>
3401 class uses the
3402 <filename>DEPLOY_DIR_IPK</filename> variable to make sure
3403 the
3404 <link linkend='ref-tasks-package_write_ipk'><filename>do_package_write_ipk</filename></link>
3405 task writes IPK packages into the appropriate folder.
3406 For more information on how packaging works, see the
3407 "<ulink url='&YOCTO_DOCS_OM_URL;#package-feeds-dev-environment'>Package Feeds</ulink>"
3408 section in the Yocto Project Overview and Concepts Manual.
3409 </para>
3410 </glossdef>
3411 </glossentry>
3412
3413 <glossentry id='var-DEPLOY_DIR_RPM'><glossterm>DEPLOY_DIR_RPM</glossterm>
3414 <info>
3415 DEPLOY_DIR_RPM[doc] = "Points to a RPM-specific area that the OpenEmbedded build system uses to place images, packages, SDKs, and other output files that are ready to be used outside of the build system."
3416 </info>
3417 <glossdef>
3418 <para role="glossdeffirst">
3419 Points to the area that the OpenEmbedded build system uses
3420 to place RPM packages that are ready to be used outside
3421 of the build system.
3422 This variable applies only when
3423 <link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>
3424 contains "package_rpm".
3425 </para>
3426
3427 <para>
3428 The BitBake configuration file initially defines this
3429 variable as a sub-folder of
3430 <link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link>:
3431 <literallayout class='monospaced'>
3432 DEPLOY_DIR_RPM = "${DEPLOY_DIR}/rpm"
3433 </literallayout>
3434 </para>
3435
3436 <para>
3437 The
3438 <link linkend='ref-classes-package_rpm'><filename>package_rpm</filename></link>
3439 class uses the
3440 <filename>DEPLOY_DIR_RPM</filename> variable to make sure
3441 the
3442 <link linkend='ref-tasks-package_write_rpm'><filename>do_package_write_rpm</filename></link>
3443 task writes RPM packages into the appropriate folder.
3444 For more information on how packaging works, see the
3445 "<ulink url='&YOCTO_DOCS_OM_URL;#package-feeds-dev-environment'>Package Feeds</ulink>"
3446 section in the Yocto Project Overview and Concepts Manual.
3447 </para>
3448 </glossdef>
3449 </glossentry>
3450
3451 <glossentry id='var-DEPLOY_DIR_TAR'><glossterm>DEPLOY_DIR_TAR</glossterm>
3452 <info>
3453 DEPLOY_DIR_TAR[doc] = "Points to a tarball area that the OpenEmbedded build system uses to place images, packages, SDKs, and other output files that are ready to be used outside of the build system."
3454 </info>
3455 <glossdef>
3456 <para role="glossdeffirst">
3457 Points to the area that the OpenEmbedded build system uses
3458 to place tarballs that are ready to be used outside of
3459 the build system.
3460 This variable applies only when
3461 <link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>
3462 contains "package_tar".
3463 </para>
3464
3465 <para>
3466 The BitBake configuration file initially defines this
3467 variable as a sub-folder of
3468 <link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link>:
3469 <literallayout class='monospaced'>
3470 DEPLOY_DIR_TAR = "${DEPLOY_DIR}/tar"
3471 </literallayout>
3472 </para>
3473
3474 <para>
3475 The
3476 <link linkend='ref-classes-package_tar'><filename>package_tar</filename></link>
3477 class uses the
3478 <filename>DEPLOY_DIR_TAR</filename> variable to make sure
3479 the
3480 <link linkend='ref-tasks-package_write_tar'><filename>do_package_write_tar</filename></link>
3481 task writes TAR packages into the appropriate folder.
3482 For more information on how packaging works, see the
3483 "<ulink url='&YOCTO_DOCS_OM_URL;#package-feeds-dev-environment'>Package Feeds</ulink>"
3484 section in the Yocto Project Overview and Concepts Manual.
3485 </para>
3486 </glossdef>
3487 </glossentry>
3488
3489 <glossentry id='var-DEPLOYDIR'><glossterm>DEPLOYDIR</glossterm>
3490 <info>
3491 DEPLOYDIR[doc] = "For recipes that inherit the deploy class, the DEPLOYDIR points to a temporary work area for deployed files."
3492 </info>
3493 <glossdef>
3494 <para role="glossdeffirst">
3495 When inheriting the
3496 <link linkend='ref-classes-deploy'><filename>deploy</filename></link>
3497 class, the <filename>DEPLOYDIR</filename> points to a
3498 temporary work area for deployed files that is set in the
3499 <filename>deploy</filename> class as follows:
3500 <literallayout class='monospaced'>
3501 DEPLOYDIR = "${WORKDIR}/deploy-${<link linkend='var-PN'><filename>PN</filename></link>}"
3502 </literallayout>
3503 </para>
3504
3505 <para>
3506 Recipes inheriting the <filename>deploy</filename> class
3507 should copy files to be deployed into
3508 <filename>DEPLOYDIR</filename>, and the class will take
3509 care of copying them into
3510 <link linkend='var-DEPLOY_DIR_IMAGE'><filename>DEPLOY_DIR_IMAGE</filename></link>
3511 afterwards.
3512 </para>
3513 </glossdef>
3514 </glossentry>
3515
3516 <glossentry id='var-DESCRIPTION'><glossterm>DESCRIPTION</glossterm>
3517 <info>
3518 DESCRIPTION[doc] = "The package description used by package managers. If not set, DESCRIPTION takes the value of the SUMMARY variable."
3519 </info>
3520 <glossdef>
3521 <para role="glossdeffirst">
3522 The package description used by package managers.
3523 If not set, <filename>DESCRIPTION</filename> takes
3524 the value of the
3525 <link linkend='var-SUMMARY'><filename>SUMMARY</filename></link>
3526 variable.
3527 </para>
3528 </glossdef>
3529 </glossentry>
3530
3531 <glossentry id='var-DISTRO'><glossterm>DISTRO</glossterm>
3532 <info>
3533 DISTRO[doc] = "The short name of the distribution. If the variable is blank, meta/conf/distro/defaultsetup.conf will be used."
3534 </info>
3535 <glossdef>
3536 <para role="glossdeffirst">
3537 The short name of the distribution.
3538 For information on the long name of the distribution, see
3539 the
3540 <link linkend='var-DISTRO_NAME'><filename>DISTRO_NAME</filename></link>
3541 variable.
3542 </para>
3543
3544 <para>
3545 The <filename>DISTRO</filename> variable corresponds to a
3546 distribution configuration file whose root name is the
3547 same as the variable's argument and whose filename
3548 extension is <filename>.conf</filename>.
3549 For example, the distribution configuration file for the
3550 Poky distribution is named <filename>poky.conf</filename>
3551 and resides in the
3552 <filename>meta-poky/conf/distro</filename> directory of
3553 the
3554 <link linkend='source-directory'>Source Directory</link>.
3555 </para>
3556
3557 <para>
3558 Within that <filename>poky.conf</filename> file, the
3559 <filename>DISTRO</filename> variable is set as follows:
3560 <literallayout class='monospaced'>
3561 DISTRO = "poky"
3562 </literallayout>
3563 </para>
3564
3565 <para>
3566 Distribution configuration files are located in a
3567 <filename>conf/distro</filename> directory within the
3568 <link linkend='metadata'>Metadata</link>
3569 that contains the distribution configuration.
3570 The value for <filename>DISTRO</filename> must not contain
3571 spaces, and is typically all lower-case.
3572 <note>
3573 If the <filename>DISTRO</filename> variable is blank,
3574 a set of default configurations are used, which are
3575 specified within
3576 <filename>meta/conf/distro/defaultsetup.conf</filename>
3577 also in the Source Directory.
3578 </note>
3579 </para>
3580 </glossdef>
3581 </glossentry>
3582
3583 <glossentry id='var-DISTRO_CODENAME'><glossterm>DISTRO_CODENAME</glossterm>
3584 <info>
3585 DISTRO_CODENAME[doc] = "Specifies a codename for the distribution being built."
3586 </info>
3587 <glossdef>
3588 <para role="glossdeffirst">
3589 Specifies a codename for the distribution being built.
3590 </para>
3591 </glossdef>
3592 </glossentry>
3593
3594 <glossentry id='var-DISTRO_EXTRA_RDEPENDS'><glossterm>DISTRO_EXTRA_RDEPENDS</glossterm>
3595 <info>
3596 DISTRO_EXTRA_RDEPENDS[doc] = "Specifies a list of distro-specific packages to add to all images. The variable only applies to the images that include packagegroup-base."
3597 </info>
3598 <glossdef>
3599 <para role="glossdeffirst">
3600 Specifies a list of distro-specific packages to add to all images.
3601 This variable takes affect through
3602 <filename>packagegroup-base</filename> so the
3603 variable only really applies to the more full-featured
3604 images that include <filename>packagegroup-base</filename>.
3605 You can use this variable to keep distro policy out of
3606 generic images.
3607 As with all other distro variables, you set this variable
3608 in the distro <filename>.conf</filename> file.
3609 </para>
3610 </glossdef>
3611 </glossentry>
3612
3613 <glossentry id='var-DISTRO_EXTRA_RRECOMMENDS'><glossterm>DISTRO_EXTRA_RRECOMMENDS</glossterm>
3614 <info>
3615 DISTRO_EXTRA_RRECOMMENDS[doc] = "Specifies a list of distro-specific packages to add to all images if the packages exist. The list of packages are automatically installed but you can remove them."
3616 </info>
3617 <glossdef>
3618 <para role="glossdeffirst">
3619 Specifies a list of distro-specific packages to add to all images
3620 if the packages exist.
3621 The packages might not exist or be empty (e.g. kernel modules).
3622 The list of packages are automatically installed but you can
3623 remove them.
3624 </para>
3625 </glossdef>
3626 </glossentry>
3627
3628 <glossentry id='var-DISTRO_FEATURES'><glossterm>DISTRO_FEATURES</glossterm>
3629 <info>
3630 DISTRO_FEATURES[doc] = "The features enabled for the distribution."
3631 </info>
3632 <glossdef>
3633 <para role="glossdeffirst">
3634 The software support you want in your distribution for
3635 various features.
3636 You define your distribution features in the distribution
3637 configuration file.
3638 </para>
3639
3640 <para>
3641 In most cases, the presence or absence of a feature in
3642 <filename>DISTRO_FEATURES</filename> is translated to the
3643 appropriate option supplied to the configure script
3644 during the
3645 <link linkend='ref-tasks-configure'><filename>do_configure</filename></link>
3646 task for recipes that optionally support the feature.
3647 For example, specifying "x11" in
3648 <filename>DISTRO_FEATURES</filename>, causes
3649 every piece of software built for the target that can
3650 optionally support X11 to have its X11 support enabled.
3651 </para>
3652
3653 <para>
3654 Two more examples are Bluetooth and NFS support.
3655 For a more complete list of features that ships with the
3656 Yocto Project and that you can provide with this variable,
3657 see the
3658 "<link linkend='ref-features-distro'>Distro Features</link>"
3659 section.
3660 </para>
3661 </glossdef>
3662 </glossentry>
3663
3664 <glossentry id='var-DISTRO_FEATURES_BACKFILL'><glossterm>DISTRO_FEATURES_BACKFILL</glossterm>
3665 <info>
3666 DISTRO_FEATURES_BACKFILL[doc] = "Features to be added to DISTRO_FEATURES if not also present in DISTRO_FEATURES_BACKFILL_CONSIDERED. This variable is set in the meta/conf/bitbake.conf file and it is not intended to be user-configurable."
3667 </info>
3668 <glossdef>
3669 <para role="glossdeffirst">
3670 Features to be added to
3671 <filename><link linkend='var-DISTRO_FEATURES'>DISTRO_FEATURES</link></filename>
3672 if not also present in
3673 <filename><link linkend='var-DISTRO_FEATURES_BACKFILL_CONSIDERED'>DISTRO_FEATURES_BACKFILL_CONSIDERED</link></filename>.
3674 </para>
3675
3676 <para>
3677 This variable is set in the <filename>meta/conf/bitbake.conf</filename> file.
3678 It is not intended to be user-configurable.
3679 It is best to just reference the variable to see which distro features are
3680 being backfilled for all distro configurations.
3681 See the "<link linkend='ref-features-backfill'>Feature Backfilling</link>" section for
3682 more information.
3683 </para>
3684 </glossdef>
3685 </glossentry>
3686
3687 <glossentry id='var-DISTRO_FEATURES_BACKFILL_CONSIDERED'><glossterm>DISTRO_FEATURES_BACKFILL_CONSIDERED</glossterm>
3688 <info>
3689 DISTRO_FEATURES_BACKFILL_CONSIDERED[doc] = "Features from DISTRO_FEATURES_BACKFILL that should not be backfilled (i.e. added to DISTRO_FEATURES) during the build."
3690 </info>
3691 <glossdef>
3692 <para role="glossdeffirst">
3693 Features from
3694 <filename><link linkend='var-DISTRO_FEATURES_BACKFILL'>DISTRO_FEATURES_BACKFILL</link></filename>
3695 that should not be backfilled (i.e. added to
3696 <filename><link linkend='var-DISTRO_FEATURES'>DISTRO_FEATURES</link></filename>)
3697 during the build.
3698 See the "<link linkend='ref-features-backfill'>Feature Backfilling</link>" section for
3699 more information.
3700 </para>
3701 </glossdef>
3702 </glossentry>
3703
3704 <glossentry id='var-DISTRO_FEATURES_DEFAULT'><glossterm>DISTRO_FEATURES_DEFAULT</glossterm>
3705 <info>
3706 DISTRO_FEATURES_DEFAULT[doc] = "Provides the default list of distro features with the exception of any libc-specific features."
3707 </info>
3708 <glossdef>
3709 <para role="glossdeffirst">
3710 A convenience variable that gives you the default
3711 list of distro features with the exception of any
3712 features specific to the C library
3713 (<filename>libc</filename>).
3714 </para>
3715
3716 <para>
3717 When creating a custom distribution, you might find it
3718 useful to be able to reuse the default
3719 <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>
3720 options without the need to write out the full set.
3721 Here is an example that uses
3722 <filename>DISTRO_FEATURES_DEFAULT</filename> from a
3723 custom distro configuration file:
3724 <literallayout class='monospaced'>
3725 DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} myfeature"
3726 </literallayout>
3727 </para>
3728 </glossdef>
3729 </glossentry>
3730
3731 <glossentry id='var-DISTRO_FEATURES_FILTER_NATIVE'><glossterm>DISTRO_FEATURES_FILTER_NATIVE</glossterm>
3732 <info>
3733 DISTRO_FEATURES_FILTER_NATIVE[doc] = "Specifies a list of features that if present in the target DISTRO_FEATURES value should be included in DISTRO_FEATURES when building native recipes."
3734 </info>
3735 <glossdef>
3736 <para role="glossdeffirst">
3737 Specifies a list of features that if present in
3738 the target
3739 <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>
3740 value should be included in
3741 <filename>DISTRO_FEATURES</filename> when building native
3742 recipes.
3743 This variable is used in addition to the features
3744 filtered using the
3745 <link linkend='var-DISTRO_FEATURES_NATIVE'><filename>DISTRO_FEATURES_NATIVE</filename></link>
3746 variable.
3747 </para>
3748 </glossdef>
3749 </glossentry>
3750
3751 <glossentry id='var-DISTRO_FEATURES_FILTER_NATIVESDK'><glossterm>DISTRO_FEATURES_FILTER_NATIVESDK</glossterm>
3752 <info>
3753 DISTRO_FEATURES_FILTER_NATIVESDK[doc] = "Specifies a list of features that if present in the target DISTRO_FEATURES value should be included in DISTRO_FEATURES when building nativesdk recipes."
3754 </info>
3755 <glossdef>
3756 <para role="glossdeffirst">
3757 Specifies a list of features that if present in the target
3758 <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>
3759 value should be included in
3760 <filename>DISTRO_FEATURES</filename> when building
3761 nativesdk recipes.
3762 This variable is used in addition to the features
3763 filtered using the
3764 <link linkend='var-DISTRO_FEATURES_NATIVESDK'><filename>DISTRO_FEATURES_NATIVESDK</filename></link>
3765 variable.
3766 </para>
3767 </glossdef>
3768 </glossentry>
3769
3770<!--
3771 <glossentry id='var-DISTRO_FEATURES_LIBC'><glossterm>DISTRO_FEATURES_LIBC</glossterm>
3772 <info>
3773 DISTRO_FEATURES_LIBC[doc] = "Specifies the list of distro features that are specific to the C library (libc)."
3774 </info>
3775 <glossdef>
3776 <para role="glossdeffirst">
3777 A convenience variable that specifies the list of distro
3778 features that are specific to the C library
3779 (<filename>libc</filename>).
3780 Typically, these features are prefixed with "libc-" and
3781 control which features are enabled at during the build
3782 within the C library itself.
3783 </para>
3784 </glossdef>
3785 </glossentry>
3786-->
3787
3788 <glossentry id='var-DISTRO_FEATURES_NATIVE'><glossterm>DISTRO_FEATURES_NATIVE</glossterm>
3789 <info>
3790 DISTRO_FEATURES_NATIVE[doc] = "Specifies a list of features that should be included in DISTRO_FEATURES when building native recipes."
3791 </info>
3792 <glossdef>
3793 <para role="glossdeffirst">
3794 Specifies a list of features that should be included in
3795 <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>
3796 when building native recipes.
3797 This variable is used in addition to the features
3798 filtered using the
3799 <link linkend='var-DISTRO_FEATURES_FILTER_NATIVE'><filename>DISTRO_FEATURES_FILTER_NATIVE</filename></link>
3800 variable.
3801 </para>
3802 </glossdef>
3803 </glossentry>
3804
3805 <glossentry id='var-DISTRO_FEATURES_NATIVESDK'><glossterm>DISTRO_FEATURES_NATIVESDK</glossterm>
3806 <info>
3807 DISTRO_FEATURES_NATIVESDK[doc] = "Specifies a list of features that should be included in DISTRO_FEATURES when building nativesdk recipes."
3808 </info>
3809 <glossdef>
3810 <para role="glossdeffirst">
3811 Specifies a list of features that should be included in
3812 <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>
3813 when building nativesdk recipes.
3814 This variable is used in addition to the features
3815 filtered using the
3816 <link linkend='var-DISTRO_FEATURES_FILTER_NATIVESDK'><filename>DISTRO_FEATURES_FILTER_NATIVESDK</filename></link>
3817 variable.
3818 </para>
3819 </glossdef>
3820 </glossentry>
3821
3822 <glossentry id='var-DISTRO_NAME'><glossterm>DISTRO_NAME</glossterm>
3823 <info>
3824 DISTRO_NAME[doc] = "The long name of the distribution."
3825 </info>
3826 <glossdef>
3827 <para role="glossdeffirst">
3828 The long name of the distribution.
3829 For information on the short name of the distribution, see
3830 the
3831 <link linkend='var-DISTRO'><filename>DISTRO</filename></link>
3832 variable.
3833 </para>
3834
3835 <para>
3836 The <filename>DISTRO_NAME</filename> variable corresponds
3837 to a distribution configuration file whose root name is the
3838 same as the variable's argument and whose filename
3839 extension is <filename>.conf</filename>.
3840 For example, the distribution configuration file for the
3841 Poky distribution is named <filename>poky.conf</filename>
3842 and resides in the
3843 <filename>meta-poky/conf/distro</filename> directory of
3844 the
3845 <link linkend='source-directory'>Source Directory</link>.
3846 </para>
3847
3848 <para>
3849 Within that <filename>poky.conf</filename> file, the
3850 <filename>DISTRO_NAME</filename> variable is set as
3851 follows:
3852 <literallayout class='monospaced'>
3853 DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
3854 </literallayout>
3855 </para>
3856
3857 <para>
3858 Distribution configuration files are located in a
3859 <filename>conf/distro</filename> directory within the
3860 <link linkend='metadata'>Metadata</link>
3861 that contains the distribution configuration.
3862 <note>
3863 If the <filename>DISTRO_NAME</filename> variable is
3864 blank, a set of default configurations are used, which
3865 are specified within
3866 <filename>meta/conf/distro/defaultsetup.conf</filename>
3867 also in the Source Directory.
3868 </note>
3869 </para>
3870 </glossdef>
3871 </glossentry>
3872
3873 <glossentry id='var-DISTRO_VERSION'><glossterm>DISTRO_VERSION</glossterm>
3874 <info>
3875 DISTRO_VERSION[doc] = "The version of the distribution."
3876 </info>
3877 <glossdef>
3878 <para role="glossdeffirst">
3879 The version of the distribution.
3880 </para>
3881 </glossdef>
3882 </glossentry>
3883
3884 <glossentry id='var-DISTROOVERRIDES'><glossterm>DISTROOVERRIDES</glossterm>
3885 <info>
3886 DISTROOVERRIDES[doc] = "A colon-separated list of overrides specific to the current distribution."
3887 </info>
3888 <glossdef>
3889 <para role="glossdeffirst">
3890 A colon-separated list of overrides specific to the
3891 current distribution.
3892 By default, this list includes the value of
3893 <link linkend='var-DISTRO'><filename>DISTRO</filename></link>.
3894 </para>
3895
3896 <para>
3897 You can extend <filename>DISTROOVERRIDES</filename>
3898 to add extra overrides that should apply to
3899 the distribution.
3900 </para>
3901
3902 <para>
3903 The underlying mechanism behind
3904 <filename>DISTROOVERRIDES</filename> is simply that it
3905 is included in the default value of
3906 <link linkend='var-OVERRIDES'><filename>OVERRIDES</filename></link>.
3907 </para>
3908 </glossdef>
3909 </glossentry>
3910
3911 <glossentry id='var-DL_DIR'><glossterm>DL_DIR</glossterm>
3912 <info>
3913 DL_DIR[doc] = "The central download directory used by the build process to store downloads. By default, the directory is 'downloads' in the Build Directory."
3914 </info>
3915 <glossdef>
3916 <para role="glossdeffirst">
3917 The central download directory used by the build process to
3918 store downloads.
3919 By default, <filename>DL_DIR</filename> gets files
3920 suitable for mirroring for everything except Git
3921 repositories.
3922 If you want tarballs of Git repositories, use the
3923 <link linkend='var-BB_GENERATE_MIRROR_TARBALLS'><filename>BB_GENERATE_MIRROR_TARBALLS</filename></link>
3924 variable.
3925 </para>
3926
3927 <para>
3928 You can set this directory by defining the
3929 <filename>DL_DIR</filename> variable in the
3930 <filename>conf/local.conf</filename> file.
3931 This directory is self-maintaining and you should not have
3932 to touch it.
3933 By default, the directory is <filename>downloads</filename>
3934 in the
3935 <link linkend='build-directory'>Build Directory</link>.
3936 <literallayout class='monospaced'>
3937 #DL_DIR ?= "${TOPDIR}/downloads"
3938 </literallayout>
3939 To specify a different download directory, simply remove
3940 the comment from the line and provide your directory.
3941 </para>
3942
3943 <para>
3944 During a first build, the system downloads many different
3945 source code tarballs from various upstream projects.
3946 Downloading can take a while, particularly if your network
3947 connection is slow.
3948 Tarballs are all stored in the directory defined by
3949 <filename>DL_DIR</filename> and the build system looks there
3950 first to find source tarballs.
3951 <note>
3952 When wiping and rebuilding, you can preserve this
3953 directory to speed up this part of subsequent
3954 builds.
3955 </note>
3956 </para>
3957
3958 <para>
3959 You can safely share this directory between multiple builds
3960 on the same development machine.
3961 For additional information on how the build process gets
3962 source files when working behind a firewall or proxy server,
3963 see this specific question in the
3964 "<link linkend='how-does-the-yocto-project-obtain-source-code-and-will-it-work-behind-my-firewall-or-proxy-server'>FAQ</link>"
3965 chapter.
3966 You can also refer to the
3967 "<ulink url='&YOCTO_WIKI_URL;/wiki/Working_Behind_a_Network_Proxy'>Working Behind a Network Proxy</ulink>"
3968 Wiki page.
3969 </para>
3970 </glossdef>
3971 </glossentry>
3972
3973 <glossentry id='var-DOC_COMPRESS'><glossterm>DOC_COMPRESS</glossterm>
3974 <info>
3975 DOC_COMPRESS[doc] = "When inheriting the compress_doc class, this variable sets the compression policy used when the OpenEmbedded build system compresses man pages and info pages."
3976 </info>
3977 <glossdef>
3978 <para role="glossdeffirst">
3979 When inheriting the
3980 <link linkend='ref-classes-compress_doc'><filename>compress_doc</filename></link>
3981 class, this variable sets the compression policy used when
3982 the OpenEmbedded build system compresses man pages and info
3983 pages.
3984 By default, the compression method used is gz (gzip).
3985 Other policies available are xz and bz2.
3986 </para>
3987
3988 <para>
3989 For information on policies and on how to use this
3990 variable, see the comments in the
3991 <filename>meta/classes/compress_doc.bbclass</filename> file.
3992 </para>
3993 </glossdef>
3994 </glossentry>
3995
3996 </glossdiv>
3997
3998 <glossdiv id='var-glossary-e'><title>E</title>
3999
4000 <glossentry id='var-EFI_PROVIDER'><glossterm>EFI_PROVIDER</glossterm>
4001 <info>
4002 EFI_PROVIDER[doc] = "When building bootable images (i.e. where hddimg, iso, or wic.vmdk is in IMAGE_FSTYPES), the EFI_PROVIDER variable specifies the EFI bootloader to use."
4003 </info>
4004 <glossdef>
4005 <para role="glossdeffirst">
4006 When building bootable images (i.e. where
4007 <filename>hddimg</filename>, <filename>iso</filename>,
4008 or <filename>wic.vmdk</filename> is in
4009 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>),
4010 the <filename>EFI_PROVIDER</filename> variable specifies
4011 the EFI bootloader to use.
4012 The default is "grub-efi", but "systemd-boot" can be used
4013 instead.
4014 </para>
4015
4016 <para>
4017 See the
4018 <link linkend='ref-classes-systemd-boot'><filename>systemd-boot</filename></link>
4019 and
4020 <link linkend='ref-classes-image-live'><filename>image-live</filename></link>
4021 classes for more information.
4022 </para>
4023 </glossdef>
4024 </glossentry>
4025
4026 <glossentry id='var-ENABLE_BINARY_LOCALE_GENERATION'><glossterm>ENABLE_BINARY_LOCALE_GENERATION</glossterm>
4027 <info>
4028 ENABLE_BINARY_LOCALE_GENERATION[doc] = "Controls which locales for glibc are generated during the build. The variable is useful if the target device has 64Mbytes of RAM or less."
4029 </info>
4030 <glossdef>
4031 <para role="glossdeffirst">
4032 Variable that controls which locales for
4033 <filename>glibc</filename> are generated during the
4034 build (useful if the target device has 64Mbytes
4035 of RAM or less).
4036 </para>
4037 </glossdef>
4038 </glossentry>
4039
4040 <glossentry id='var-ERR_REPORT_DIR'><glossterm>ERR_REPORT_DIR</glossterm>
4041 <info>
4042 ERR_REPORT_DIR[doc] = "When used with the report-error class, specifies the path used for storing the debug files created by the error reporting tool, which allows you to submit build errors you encounter to a central database."
4043 </info>
4044 <glossdef>
4045 <para role="glossdeffirst">
4046 When used with the
4047 <link linkend='ref-classes-report-error'><filename>report-error</filename></link>
4048 class, specifies the path used for storing the debug files
4049 created by the
4050 <ulink url='&YOCTO_DOCS_DEV_URL;#using-the-error-reporting-tool'>error reporting tool</ulink>,
4051 which allows you to submit build errors you encounter to a
4052 central database.
4053 By default, the value of this variable is
4054 <filename>${</filename><link linkend='var-LOG_DIR'><filename>LOG_DIR</filename></link><filename>}/error-report</filename>.
4055 </para>
4056
4057 <para>
4058 You can set <filename>ERR_REPORT_DIR</filename> to the path
4059 you want the error reporting tool to store the debug files
4060 as follows in your <filename>local.conf</filename> file:
4061 <literallayout class='monospaced'>
4062 ERR_REPORT_DIR = "<replaceable>path</replaceable>"
4063 </literallayout>
4064 </para>
4065 </glossdef>
4066 </glossentry>
4067
4068 <glossentry id='var-ERROR_QA'><glossterm>ERROR_QA</glossterm>
4069 <info>
4070 ERROR_QA[doc] = "Specifies the quality assurance checks whose failures are reported as errors by the OpenEmbedded build system."
4071 </info>
4072 <glossdef>
4073 <para role="glossdeffirst">
4074 Specifies the quality assurance checks whose failures are
4075 reported as errors by the OpenEmbedded build system.
4076 You set this variable in your distribution configuration
4077 file.
4078 For a list of the checks you can control with this variable,
4079 see the
4080 "<link linkend='ref-classes-insane'><filename>insane.bbclass</filename></link>"
4081 section.
4082 </para>
4083 </glossdef>
4084 </glossentry>
4085
4086 <glossentry id='var-EXCLUDE_FROM_SHLIBS'><glossterm>EXCLUDE_FROM_SHLIBS</glossterm>
4087 <info>
4088 EXCLUDE_FROM_SHLIBS[doc] = "Causes the OpenEmbedded build system's shared libraries resolver to exclude an entire package when scanning for shared libraries."
4089 </info>
4090 <glossdef>
4091 <para role="glossdeffirst">
4092 Triggers the OpenEmbedded build system's shared libraries
4093 resolver to exclude an entire package when scanning for
4094 shared libraries.
4095 <note>
4096 The shared libraries resolver's functionality results
4097 in part from the internal function
4098 <filename>package_do_shlibs</filename>, which is part of
4099 the
4100 <link linkend='ref-tasks-package'><filename>do_package</filename></link>
4101 task.
4102 You should be aware that the shared libraries resolver
4103 might implicitly define some dependencies between
4104 packages.
4105 </note>
4106 The <filename>EXCLUDE_FROM_SHLIBS</filename> variable is
4107 similar to the
4108 <link linkend='var-PRIVATE_LIBS'><filename>PRIVATE_LIBS</filename></link>
4109 variable, which excludes a package's particular libraries
4110 only and not the whole package.
4111 </para>
4112
4113 <para>
4114 Use the
4115 <filename>EXCLUDE_FROM_SHLIBS</filename> variable by
4116 setting it to "1" for a particular package:
4117 <literallayout class='monospaced'>
4118 EXCLUDE_FROM_SHLIBS = "1"
4119 </literallayout>
4120 </para>
4121 </glossdef>
4122 </glossentry>
4123
4124 <glossentry id='var-EXCLUDE_FROM_WORLD'><glossterm>EXCLUDE_FROM_WORLD</glossterm>
4125 <info>
4126 EXCLUDE_FROM_WORLD[doc] = "Directs BitBake to exclude a recipe from world builds (i.e. bitbake world)."
4127 </info>
4128 <glossdef>
4129 <para role="glossdeffirst">
4130 Directs BitBake to exclude a recipe from world builds (i.e.
4131 <filename>bitbake world</filename>).
4132 During world builds, BitBake locates, parses and builds all
4133 recipes found in every layer exposed in the
4134 <filename>bblayers.conf</filename> configuration file.
4135 </para>
4136
4137 <para>
4138 To exclude a recipe from a world build using this variable,
4139 set the variable to "1" in the recipe.
4140 </para>
4141
4142 <note>
4143 Recipes added to <filename>EXCLUDE_FROM_WORLD</filename>
4144 may still be built during a world build in order to satisfy
4145 dependencies of other recipes.
4146 Adding a recipe to <filename>EXCLUDE_FROM_WORLD</filename>
4147 only ensures that the recipe is not explicitly added
4148 to the list of build targets in a world build.
4149 </note>
4150 </glossdef>
4151 </glossentry>
4152
4153 <glossentry id='var-EXTENDPE'><glossterm>EXTENDPE</glossterm>
4154 <info>
4155 EXTENDPE[doc] = "Used with file and pathnames to create a prefix for a recipe's version based on the recipe's PE value. If PE is set and greater than zero for a recipe, EXTENDPE becomes that value."
4156 </info>
4157 <glossdef>
4158 <para role="glossdeffirst">
4159 Used with file and pathnames to create a prefix for a recipe's
4160 version based on the recipe's
4161 <link linkend='var-PE'><filename>PE</filename></link> value.
4162 If <filename>PE</filename> is set and greater than zero for a recipe,
4163 <filename>EXTENDPE</filename> becomes that value (e.g if
4164 <filename>PE</filename> is equal to "1" then <filename>EXTENDPE</filename>
4165 becomes "1_").
4166 If a recipe's <filename>PE</filename> is not set (the default) or is equal to
4167 zero, <filename>EXTENDPE</filename> becomes "".</para>
4168 <para>See the <link linkend='var-STAMP'><filename>STAMP</filename></link>
4169 variable for an example.
4170 </para>
4171 </glossdef>
4172 </glossentry>
4173
4174 <glossentry id='var-EXTENDPKGV'><glossterm>EXTENDPKGV</glossterm>
4175 <info>
4176 EXTENDPKGV[doc] = "The full package version specification as it appears on the final packages produced by a recipe."
4177 </info>
4178 <glossdef>
4179 <para role="glossdeffirst">
4180 The full package version specification as it appears on the
4181 final packages produced by a recipe.
4182 The variable's value is normally used to fix a runtime
4183 dependency to the exact same version of another package
4184 in the same recipe:
4185 <literallayout class='monospaced'>
4186 RDEPENDS_${PN}-additional-module = "${PN} (= ${EXTENDPKGV})"
4187 </literallayout>
4188 </para>
4189
4190 <para>
4191 The dependency relationships are intended to force the
4192 package manager to upgrade these types of packages in
4193 lock-step.
4194 </para>
4195 </glossdef>
4196 </glossentry>
4197
4198 <glossentry id='var-EXTERNAL_KERNEL_TOOLS'><glossterm>EXTERNAL_KERNEL_TOOLS</glossterm>
4199 <info>
4200 EXTERNAL_KERNEL_TOOLS[doc] = "Indicates kernel tools are external to the source tree."
4201 </info>
4202 <glossdef>
4203 <para role="glossdeffirst">
4204 When set, the <filename>EXTERNAL_KERNEL_TOOLS</filename>
4205 variable indicates that these tools are not in the
4206 source tree.
4207 </para>
4208
4209 <para>
4210 When kernel tools are available in the tree, they are
4211 preferred over any externally installed tools.
4212 Setting the <filename>EXTERNAL_KERNEL_TOOLS</filename>
4213 variable tells the OpenEmbedded build system to prefer
4214 the installed external tools.
4215 See the
4216 <link linkend='ref-classes-kernel-yocto'><filename>kernel-yocto</filename></link>
4217 class in <filename>meta/classes</filename> to see how
4218 the variable is used.
4219 </para>
4220 </glossdef>
4221 </glossentry>
4222
4223 <glossentry id='var-EXTERNALSRC'><glossterm>EXTERNALSRC</glossterm>
4224 <info>
4225 EXTERNALSRC[doc] = "If externalsrc.bbclass is inherited, this variable points to the source tree, which is outside of the OpenEmbedded build system."
4226 </info>
4227 <glossdef>
4228 <para role="glossdeffirst">
4229 When inheriting the
4230 <link linkend='ref-classes-externalsrc'><filename>externalsrc</filename></link>
4231 class, this variable points to the source tree, which is
4232 outside of the OpenEmbedded build system.
4233 When set, this variable sets the
4234 <link linkend='var-S'><filename>S</filename></link>
4235 variable, which is what the OpenEmbedded build system uses
4236 to locate unpacked recipe source code.
4237 </para>
4238
4239 <para>
4240 For more information on
4241 <filename>externalsrc.bbclass</filename>, see the
4242 "<link linkend='ref-classes-externalsrc'><filename>externalsrc.bbclass</filename></link>"
4243 section.
4244 You can also find information on how to use this variable
4245 in the
4246 "<ulink url='&YOCTO_DOCS_DEV_URL;#building-software-from-an-external-source'>Building Software from an External Source</ulink>"
4247 section in the Yocto Project Development Tasks Manual.
4248 </para>
4249 </glossdef>
4250 </glossentry>
4251
4252 <glossentry id='var-EXTERNALSRC_BUILD'><glossterm>EXTERNALSRC_BUILD</glossterm>
4253 <info>
4254 EXTERNALSRC_BUILD[doc] = "If externalsrc.bbclass is inherited, this variable points to the directory in which the recipe's source code is built, which is outside of the OpenEmbedded build system."
4255 </info>
4256 <glossdef>
4257 <para role="glossdeffirst">
4258 When inheriting the
4259 <link linkend='ref-classes-externalsrc'><filename>externalsrc</filename></link>
4260 class, this variable points to the directory in which the
4261 recipe's source code is built, which is outside of the
4262 OpenEmbedded build system.
4263 When set, this variable sets the
4264 <link linkend='var-B'><filename>B</filename></link>
4265 variable, which is what the OpenEmbedded build system uses
4266 to locate the Build Directory.
4267 </para>
4268
4269 <para>
4270 For more information on
4271 <filename>externalsrc.bbclass</filename>, see the
4272 "<link linkend='ref-classes-externalsrc'><filename>externalsrc.bbclass</filename></link>"
4273 section.
4274 You can also find information on how to use this variable
4275 in the
4276 "<ulink url='&YOCTO_DOCS_DEV_URL;#building-software-from-an-external-source'>Building Software from an External Source</ulink>"
4277 section in the Yocto Project Development Tasks Manual.
4278 </para>
4279 </glossdef>
4280 </glossentry>
4281
4282 <glossentry id='var-EXTRA_AUTORECONF'><glossterm>EXTRA_AUTORECONF</glossterm>
4283 <info>
4284 EXTRA_AUTORECONF[doc] = "Extra options passed to the autoreconf command, which is executed during do_configure."
4285 </info>
4286 <glossdef>
4287 <para role="glossdeffirst">
4288 For recipes inheriting the
4289 <link linkend='ref-classes-autotools'><filename>autotools</filename></link>
4290 class, you can use <filename>EXTRA_AUTORECONF</filename> to
4291 specify extra options to pass to the
4292 <filename>autoreconf</filename> command that is
4293 executed during the
4294 <link linkend='ref-tasks-configure'><filename>do_configure</filename></link>
4295 task.
4296 </para>
4297
4298 <para>
4299 The default value is "--exclude=autopoint".
4300 </para>
4301 </glossdef>
4302 </glossentry>
4303
4304 <glossentry id='var-EXTRA_IMAGE_FEATURES'><glossterm>EXTRA_IMAGE_FEATURES</glossterm>
4305 <info>
4306 EXTRA_IMAGE_FEATURES[doc] = "The list of additional features to include in an image. Configure this variable in the conf/local.conf file in the Build Directory."
4307 </info>
4308 <glossdef>
4309 <para role="glossdeffirst">
4310 A list of additional features to include in an image.
4311 When listing more than one feature, separate them with
4312 a space.
4313 </para>
4314
4315 <para>
4316 Typically, you configure this variable in your
4317 <filename>local.conf</filename> file, which is found in the
4318 <link linkend='build-directory'>Build Directory</link>.
4319 Although you can use this variable from within a recipe,
4320 best practices dictate that you do not.
4321 <note>
4322 To enable primary features from within the image
4323 recipe, use the
4324 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>
4325 variable.
4326 </note>
4327 </para>
4328
4329 <para>
4330 Here are some examples of features you can add:
4331 <literallayout class='monospaced'>
4332"dbg-pkgs" - Adds -dbg packages for all installed packages
4333 including symbol information for debugging and
4334 profiling.
4335
4336"debug-tweaks" - Makes an image suitable for debugging.
4337 For example, allows root logins without
4338 passwords and enables post-installation
4339 logging. See the 'allow-empty-password'
4340 and 'post-install-logging' features in
4341 the "<link linkend='ref-features-image'>Image Features</link>" section for
4342 more information.
4343
4344"dev-pkgs" - Adds -dev packages for all installed packages.
4345 This is useful if you want to develop against
4346 the libraries in the image.
4347
4348"read-only-rootfs" - Creates an image whose root
4349 filesystem is read-only. See the
4350 "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-read-only-root-filesystem'>Creating a Read-Only Root Filesystem</ulink>"
4351 section in the Yocto Project
4352 Development Tasks Manual for
4353 more information
4354
4355"tools-debug" - Adds debugging tools such as gdb and
4356 strace.
4357
4358"tools-sdk" - Adds development tools such as gcc, make,
4359 pkgconfig and so forth.
4360
4361"tools-testapps" - Adds useful testing tools such as
4362 ts_print, aplay, arecord and so
4363 forth.
4364
4365 </literallayout>
4366 </para>
4367
4368 <para>
4369 For a complete list of image features that ships with the
4370 Yocto Project, see the
4371 "<link linkend="ref-features-image">Image Features</link>"
4372 section.
4373 </para>
4374
4375 <para>
4376 For an example that shows how to customize your image by
4377 using this variable, see the
4378 "<ulink url='&YOCTO_DOCS_DEV_URL;#usingpoky-extend-customimage-imagefeatures'>Customizing Images Using Custom <filename>IMAGE_FEATURES</filename> and <filename>EXTRA_IMAGE_FEATURES</filename></ulink>"
4379 section in the Yocto Project Development Tasks Manual.
4380 </para>
4381 </glossdef>
4382 </glossentry>
4383
4384 <glossentry id='var-EXTRA_IMAGECMD'><glossterm>EXTRA_IMAGECMD</glossterm>
4385 <info>
4386 EXTRA_IMAGECMD[doc] = "Specifies additional options for the image creation command that has been specified in IMAGE_CMD. When setting this variable, you should use an override for the associated image type."
4387 </info>
4388 <glossdef>
4389 <para role="glossdeffirst">
4390 Specifies additional options for the image
4391 creation command that has been specified in
4392 <link linkend='var-IMAGE_CMD'><filename>IMAGE_CMD</filename></link>.
4393 When setting this variable, use an override for the
4394 associated image type.
4395 Here is an example:
4396 <literallayout class='monospaced'>
4397 EXTRA_IMAGECMD_ext3 ?= "-i 4096"
4398 </literallayout>
4399 </para>
4400 </glossdef>
4401 </glossentry>
4402
4403 <glossentry id='var-EXTRA_IMAGEDEPENDS'><glossterm>EXTRA_IMAGEDEPENDS</glossterm>
4404 <info>
4405 EXTRA_IMAGEDEPENDS[doc] = "A list of recipes to build that do not provide packages for installing into the root filesystem. Use this variable to list recipes that are required to build the final image, but not needed in the root filesystem."
4406 </info>
4407 <glossdef>
4408 <para role="glossdeffirst">
4409 A list of recipes to build that do not provide packages
4410 for installing into the root filesystem.
4411 </para>
4412
4413 <para>
4414 Sometimes a recipe is required to build the final image but is not
4415 needed in the root filesystem.
4416 You can use the <filename>EXTRA_IMAGEDEPENDS</filename> variable to
4417 list these recipes and thus specify the dependencies.
4418 A typical example is a required bootloader in a machine configuration.
4419 </para>
4420
4421 <note>
4422 To add packages to the root filesystem, see the various
4423 <filename>*<link linkend='var-RDEPENDS'>RDEPENDS</link></filename>
4424 and <filename>*<link linkend='var-RRECOMMENDS'>RRECOMMENDS</link></filename>
4425 variables.
4426 </note>
4427 </glossdef>
4428 </glossentry>
4429
4430 <glossentry id='var-EXTRANATIVEPATH'><glossterm>EXTRANATIVEPATH</glossterm>
4431 <info>
4432 EXTRANATIVEPATH[doc] = "A list of subdirectories of ${STAGING_BINDIR_NATIVE} added to the beginning of the environment variable PATH."
4433 </info>
4434 <glossdef>
4435 <para role="glossdeffirst">
4436 A list of subdirectories of
4437 <filename>${</filename><link linkend='var-STAGING_BINDIR_NATIVE'><filename>STAGING_BINDIR_NATIVE</filename></link><filename>}</filename>
4438 added to the beginning of the environment variable
4439 <filename>PATH</filename>.
4440 As an example, the following prepends
4441 "${STAGING_BINDIR_NATIVE}/foo:${STAGING_BINDIR_NATIVE}/bar:"
4442 to <filename>PATH</filename>:
4443 <literallayout class='monospaced'>
4444 EXTRANATIVEPATH = "foo bar"
4445 </literallayout>
4446 </para>
4447 </glossdef>
4448 </glossentry>
4449
4450 <glossentry id='var-EXTRA_OECMAKE'><glossterm>EXTRA_OECMAKE</glossterm>
4451 <info>
4452 EXTRA_OECMAKE[doc] = "Additional cmake options."
4453 </info>
4454 <glossdef>
4455 <para role="glossdeffirst">
4456 Additional
4457 <ulink url='https://cmake.org/overview/'>CMake</ulink>
4458 options.
4459 See the
4460 <link linkend='ref-classes-cmake'><filename>cmake</filename></link>
4461 class for additional information.
4462 </para>
4463 </glossdef>
4464 </glossentry>
4465
4466 <glossentry id='var-EXTRA_OECONF'><glossterm>EXTRA_OECONF</glossterm>
4467 <info>
4468 EXTRA_OECONF[doc] = "Additional configure script options."
4469 </info>
4470 <glossdef>
4471 <para role="glossdeffirst">
4472 Additional <filename>configure</filename> script options.
4473 See
4474 <link linkend='var-PACKAGECONFIG_CONFARGS'><filename>PACKAGECONFIG_CONFARGS</filename></link>
4475 for additional information on passing configure script
4476 options.
4477 </para>
4478 </glossdef>
4479 </glossentry>
4480
4481 <glossentry id='var-EXTRA_OEMAKE'><glossterm>EXTRA_OEMAKE</glossterm>
4482 <info>
4483 EXTRA_OEMAKE[doc] = "Additional GNU make options."
4484 </info>
4485 <glossdef>
4486 <para role="glossdeffirst">
4487 Additional GNU <filename>make</filename> options.
4488 </para>
4489
4490 <para>
4491 Because the <filename>EXTRA_OEMAKE</filename> defaults to
4492 "", you need to set the variable to specify any required
4493 GNU options.
4494 </para>
4495
4496 <para>
4497 <link linkend='var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></link>
4498 and
4499 <link linkend='var-PARALLEL_MAKEINST'><filename>PARALLEL_MAKEINST</filename></link>
4500 also make use of
4501 <filename>EXTRA_OEMAKE</filename> to pass the required
4502 flags.
4503 </para>
4504 </glossdef>
4505 </glossentry>
4506
4507 <glossentry id='var-EXTRA_OESCONS'><glossterm>EXTRA_OESCONS</glossterm>
4508 <info>
4509 EXTRA_OESCONS[doc] = "When a recipe inherits the scons class, this variable specifies additional configuration options you want to pass to the scons command line."
4510 </info>
4511 <glossdef>
4512 <para role="glossdeffirst">
4513 When inheriting the
4514 <link linkend='ref-classes-scons'><filename>scons</filename></link>
4515 class, this variable specifies additional configuration
4516 options you want to pass to the
4517 <filename>scons</filename> command line.
4518 </para>
4519 </glossdef>
4520 </glossentry>
4521
4522 <glossentry id='var-EXTRA_USERS_PARAMS'><glossterm>EXTRA_USERS_PARAMS</glossterm>
4523 <info>
4524 EXTRA_USERS_PARAMS[doc] = "When a recipe inherits the extrausers class, this variable provides image level user and group operations."
4525 </info>
4526 <glossdef>
4527 <para role="glossdeffirst">
4528 When inheriting the
4529 <link linkend='ref-classes-extrausers'><filename>extrausers</filename></link>
4530 class, this variable provides image level user and group
4531 operations.
4532 This is a more global method of providing user and group
4533 configuration as compared to using the
4534 <link linkend='ref-classes-useradd'><filename>useradd</filename></link>
4535 class, which ties user and group configurations to a
4536 specific recipe.
4537 </para>
4538
4539 <para>
4540 The set list of commands you can configure using the
4541 <filename>EXTRA_USERS_PARAMS</filename> is shown in the
4542 <filename>extrausers</filename> class.
4543 These commands map to the normal Unix commands of the same
4544 names:
4545 <literallayout class='monospaced'>
4546 # EXTRA_USERS_PARAMS = "\
4547 # useradd -p '' tester; \
4548 # groupadd developers; \
4549 # userdel nobody; \
4550 # groupdel -g video; \
4551 # groupmod -g 1020 developers; \
4552 # usermod -s /bin/sh tester; \
4553 # "
4554 </literallayout>
4555 </para>
4556 </glossdef>
4557 </glossentry>
4558
4559 </glossdiv>
4560
4561 <glossdiv id='var-glossary-f'><title>F</title>
4562
4563 <glossentry id='var-FEATURE_PACKAGES'><glossterm>FEATURE_PACKAGES</glossterm>
4564 <info>
4565 FEATURE_PACKAGES[doc] = "Defines one or more packages to include in an image when a specific item is included in IMAGE_FEATURES. When setting the value, FEATURE_PACKAGES should have the name of the feature item as an override."
4566 </info>
4567 <glossdef>
4568 <para role="glossdeffirst">
4569 Defines one or more packages to include in an image when
4570 a specific item is included in
4571 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>.
4572 When setting the value, <filename>FEATURE_PACKAGES</filename>
4573 should have the name of the feature item as an override.
4574 Here is an example:
4575 <literallayout class='monospaced'>
4576 FEATURE_PACKAGES_widget = "<replaceable>package1</replaceable> <replaceable>package2</replaceable>"
4577 </literallayout>
4578 </para>
4579
4580 <para>
4581 In this example, if "widget" were added to
4582 <filename>IMAGE_FEATURES</filename>, <replaceable>package1</replaceable> and
4583 <replaceable>package2</replaceable> would be included in the image.
4584 <note>
4585 Packages installed by features defined through
4586 <filename>FEATURE_PACKAGES</filename> are often package
4587 groups.
4588 While similarly named, you should not confuse the
4589 <filename>FEATURE_PACKAGES</filename> variable with
4590 package groups, which are discussed elsewhere in the
4591 documentation.
4592 </note>
4593 </para>
4594 </glossdef>
4595 </glossentry>
4596
4597 <glossentry id='var-FEED_DEPLOYDIR_BASE_URI'><glossterm>FEED_DEPLOYDIR_BASE_URI</glossterm>
4598 <info>
4599 FEED_DEPLOYDIR_BASE_URI[doc] = "Allow to serve ipk deploy directory as an ad hoc feed (bogofeed). Set to base URL of the directory as exported by HTTP. Set of ad hoc feed configs will be generated in the image."
4600 </info>
4601 <glossdef>
4602 <para role="glossdeffirst">
4603 Points to the base URL of the server and location within
4604 the document-root that provides the metadata and
4605 packages required by OPKG to support runtime package
4606 management of IPK packages.
4607 You set this variable in your
4608 <filename>local.conf</filename> file.
4609 </para>
4610
4611 <para>
4612 Consider the following example:
4613 <literallayout class='monospaced'>
4614 FEED_DEPLOYDIR_BASE_URI = "http://192.168.7.1/BOARD-dir"
4615 </literallayout>
4616 This example assumes you are serving your packages over
4617 HTTP and your databases are located in a directory
4618 named <filename>BOARD-dir</filename>, which is underneath
4619 your HTTP server's document-root.
4620 In this case, the OpenEmbedded build system generates a set
4621 of configuration files for you in your target that work
4622 with the feed.
4623 </para>
4624 </glossdef>
4625 </glossentry>
4626
4627 <glossentry id='var-FILES'><glossterm>FILES</glossterm>
4628 <info>
4629 FILES[doc] = "The list of directories or files that are placed in a package."
4630 </info>
4631 <glossdef>
4632 <para role="glossdeffirst">
4633 The list of files and directories that are placed in a
4634 package.
4635 The
4636 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>
4637 variable lists the packages generated by a recipe.
4638 </para>
4639
4640 <para>
4641 To use the <filename>FILES</filename> variable, provide a
4642 package name override that identifies the resulting package.
4643 Then, provide a space-separated list of files or paths
4644 that identify the files you want included as part of the
4645 resulting package.
4646 Here is an example:
4647 <literallayout class='monospaced'>
4648 FILES_${PN} += "${bindir}/mydir1 ${bindir}/mydir2/myfile"
4649 </literallayout>
4650 <note><title>Notes</title>
4651 <itemizedlist>
4652 <listitem><para>
4653 When specifying files or paths, you can pattern
4654 match using Python's
4655 <ulink url='https://docs.python.org/2/library/glob.html'><filename>glob</filename></ulink>
4656 syntax.
4657 For details on the syntax, see the
4658 documentation by following the previous link.
4659 </para></listitem>
4660 <listitem><para>
4661 When specifying paths as part of the
4662 <filename>FILES</filename> variable, it is
4663 good practice to use appropriate path
4664 variables.
4665 For example, use <filename>${sysconfdir}</filename>
4666 rather than <filename>/etc</filename>, or
4667 <filename>${bindir}</filename> rather than
4668 <filename>/usr/bin</filename>.
4669 You can find a list of these variables at the
4670 top of the
4671 <filename>meta/conf/bitbake.conf</filename>
4672 file in the
4673 <link linkend='source-directory'>Source Directory</link>.
4674 You will also find the default values of the
4675 various <filename>FILES_*</filename> variables
4676 in this file.
4677 </para></listitem>
4678 </itemizedlist>
4679 </note>
4680 </para>
4681
4682 <para>
4683 If some of the files you provide with the
4684 <filename>FILES</filename> variable are editable and you
4685 know they should not be overwritten during the package
4686 update process by the Package Management System (PMS), you
4687 can identify these files so that the PMS will not
4688 overwrite them.
4689 See the
4690 <link linkend='var-CONFFILES'><filename>CONFFILES</filename></link>
4691 variable for information on how to identify these files to
4692 the PMS.
4693 </para>
4694 </glossdef>
4695 </glossentry>
4696
4697 <glossentry id='var-FILES_SOLIBSDEV'><glossterm>FILES_SOLIBSDEV</glossterm>
4698 <info>
4699 FILES_SOLIBSDEV[doc] = "Defines the full path name of the development symbolic link (symlink) for shared libraries on the target platform."
4700 </info>
4701 <glossdef>
4702 <para role="glossdeffirst">
4703 Defines the file specification to match
4704 <link linkend='var-SOLIBSDEV'><filename>SOLIBSDEV</filename></link>.
4705 In other words, <filename>FILES_SOLIBSDEV</filename>
4706 defines the full path name of the development symbolic link
4707 (symlink) for shared libraries on the target platform.
4708 </para>
4709
4710 <para>
4711 The following statement from the
4712 <filename>bitbake.conf</filename> shows how it is set:
4713 <literallayout class='monospaced'>
4714 FILES_SOLIBSDEV ?= "${base_libdir}/lib*${SOLIBSDEV} ${libdir}/lib*${SOLIBSDEV}"
4715 </literallayout>
4716 </para>
4717 </glossdef>
4718 </glossentry>
4719
4720 <glossentry id='var-FILESEXTRAPATHS'><glossterm>FILESEXTRAPATHS</glossterm>
4721 <info>
4722 FILESEXTRAPATHS[doc] = "Extends the search path the OpenEmbedded build system uses when looking for files and patches as it processes recipes and append files."
4723 </info>
4724 <glossdef>
4725 <para role="glossdeffirst">
4726 Extends the search path the OpenEmbedded build system uses
4727 when looking for files and patches as it processes recipes
4728 and append files.
4729 The default directories BitBake uses when it processes
4730 recipes are initially defined by the
4731 <link linkend='var-FILESPATH'><filename>FILESPATH</filename></link>
4732 variable.
4733 You can extend <filename>FILESPATH</filename> variable
4734 by using <filename>FILESEXTRAPATHS</filename>.
4735 </para>
4736
4737 <para>
4738 Best practices dictate that you accomplish this by using
4739 <filename>FILESEXTRAPATHS</filename> from within a
4740 <filename>.bbappend</filename> file and that you prepend
4741 paths as follows:
4742 <literallayout class='monospaced'>
4743 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
4744 </literallayout>
4745 In the above example, the build system first looks for files
4746 in a directory that has the same name as the corresponding
4747 append file.
4748 <note>
4749 <para>When extending
4750 <filename>FILESEXTRAPATHS</filename>,
4751 be sure to use the immediate expansion
4752 (<filename>:=</filename>) operator.
4753 Immediate expansion makes sure that BitBake evaluates
4754 <link linkend='var-THISDIR'><filename>THISDIR</filename></link>
4755 at the time the directive is encountered rather than at
4756 some later time when expansion might result in a
4757 directory that does not contain the files you need.
4758 </para>
4759
4760 <para>Also, include the trailing separating colon
4761 character if you are prepending.
4762 The trailing colon character is necessary because you
4763 are directing BitBake to extend the path by prepending
4764 directories to the search path.</para>
4765 </note>
4766 Here is another common use:
4767 <literallayout class='monospaced'>
4768 FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
4769 </literallayout>
4770 In this example, the build system extends the
4771 <filename>FILESPATH</filename> variable to include a
4772 directory named <filename>files</filename> that is in the
4773 same directory as the corresponding append file.
4774 </para>
4775
4776 <para>
4777 This next example specifically adds three paths:
4778 <literallayout class='monospaced'>
4779 FILESEXTRAPATHS_prepend := "path_1:path_2:path_3:"
4780 </literallayout>
4781 </para>
4782
4783 <para>
4784 A final example shows how you can extend the search path
4785 and include a
4786 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>-specific
4787 override, which is useful in a BSP layer:
4788 <literallayout class='monospaced'>
4789 FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:"
4790 </literallayout>
4791 The previous statement appears in the
4792 <filename>linux-yocto-dev.bbappend</filename> file, which
4793 is found in the Yocto Project
4794 <ulink url='&YOCTO_DOCS_OM_URL;#source-repositories'>Source Repositories</ulink>
4795 in
4796 <filename>meta-intel/common/recipes-kernel/linux</filename>.
4797 Here, the machine override is a special
4798 <link linkend='var-PACKAGE_ARCH'><filename>PACKAGE_ARCH</filename></link>
4799 definition for multiple <filename>meta-intel</filename>
4800 machines.
4801 <note>
4802 For a layer that supports a single BSP, the override
4803 could just be the value of <filename>MACHINE</filename>.
4804 </note>
4805 </para>
4806
4807 <para>
4808 By prepending paths in <filename>.bbappend</filename>
4809 files, you allow multiple append files that reside in
4810 different layers but are used for the same recipe to
4811 correctly extend the path.
4812 </para>
4813 </glossdef>
4814 </glossentry>
4815
4816 <glossentry id='var-FILESOVERRIDES'><glossterm>FILESOVERRIDES</glossterm>
4817 <info>
4818 FILESOVERRIDES[doc] = "A subset of OVERRIDES used by the OpenEmbedded build system for creating FILESPATH."
4819 </info>
4820 <glossdef>
4821 <para role="glossdeffirst">
4822 A subset of <link linkend='var-OVERRIDES'><filename>OVERRIDES</filename></link>
4823 used by the OpenEmbedded build system for creating
4824 <link linkend='var-FILESPATH'><filename>FILESPATH</filename></link>.
4825 The <filename>FILESOVERRIDES</filename> variable uses
4826 overrides to automatically extend the
4827 <link linkend='var-FILESPATH'><filename>FILESPATH</filename></link>
4828 variable.
4829 For an example of how that works, see the
4830 <link linkend='var-FILESPATH'><filename>FILESPATH</filename></link>
4831 variable description.
4832 Additionally, you find more information on how overrides
4833 are handled in the
4834 "<ulink url='&YOCTO_DOCS_BB_URL;#conditional-syntax-overrides'>Conditional Syntax (Overrides)</ulink>"
4835 section of the BitBake User Manual.
4836 </para>
4837
4838 <para>
4839 By default, the <filename>FILESOVERRIDES</filename>
4840 variable is defined as:
4841 <literallayout class='monospaced'>
4842 FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}"
4843 </literallayout>
4844
4845 <note>
4846 Do not hand-edit the <filename>FILESOVERRIDES</filename>
4847 variable.
4848 The values match up with expected overrides and are
4849 used in an expected manner by the build system.
4850 </note>
4851 </para>
4852 </glossdef>
4853 </glossentry>
4854
4855 <glossentry id='var-FILESPATH'><glossterm>FILESPATH</glossterm>
4856 <info>
4857 FILESPATH[doc] = "The default set of directories the OpenEmbedded build system uses when searching for patches and files. It is defined in the base.bbclass class found in meta/classes in the Source Directory. Do not hand-edit the FILESPATH variable."
4858 </info>
4859 <glossdef>
4860 <para role="glossdeffirst">
4861 The default set of directories the OpenEmbedded build
4862 system uses when searching for patches and files.
4863 </para>
4864
4865 <para>
4866 During the build process, BitBake searches each directory
4867 in <filename>FILESPATH</filename> in the specified order
4868 when looking for files and patches specified by each
4869 <filename>file://</filename> URI in a recipe's
4870 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
4871 statements.
4872 </para>
4873
4874 <para>
4875 The default value for the <filename>FILESPATH</filename>
4876 variable is defined in the <filename>base.bbclass</filename>
4877 class found in <filename>meta/classes</filename> in the
4878 <link linkend='source-directory'>Source Directory</link>:
4879 <literallayout class='monospaced'>
4880 FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${BP}", \
4881 "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files"], d)}"
4882 </literallayout>
4883 The <filename>FILESPATH</filename> variable is automatically
4884 extended using the overrides from the
4885 <link linkend='var-FILESOVERRIDES'><filename>FILESOVERRIDES</filename></link>
4886 variable.
4887 <note><title>Notes</title>
4888 <itemizedlist>
4889 <listitem><para>
4890 Do not hand-edit the
4891 <filename>FILESPATH</filename> variable.
4892 If you want the build system to look in
4893 directories other than the defaults, extend the
4894 <filename>FILESPATH</filename> variable by
4895 using the
4896 <link linkend='var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></link>
4897 variable.
4898 </para></listitem>
4899 <listitem><para>
4900 Be aware that the default
4901 <filename>FILESPATH</filename> directories do
4902 not map to directories in custom layers
4903 where append files
4904 (<filename>.bbappend</filename>) are used.
4905 If you want the build system to find patches
4906 or files that reside with your append files,
4907 you need to extend the
4908 <filename>FILESPATH</filename> variable by
4909 using the <filename>FILESEXTRAPATHS</filename>
4910 variable.
4911 </para></listitem>
4912 </itemizedlist>
4913 </note>
4914 </para>
4915
4916 <para>
4917 You can take advantage of this searching behavior in
4918 useful ways.
4919 For example, consider a case where the following
4920 directory structure exists for general and machine-specific
4921 configurations:
4922 <literallayout class='monospaced'>
4923 files/defconfig
4924 files/MACHINEA/defconfig
4925 files/MACHINEB/defconfig
4926 </literallayout>
4927 Also in the example, the <filename>SRC_URI</filename>
4928 statement contains "file://defconfig".
4929 Given this scenario, you can set
4930 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>
4931 to "MACHINEA" and cause the build system to use files
4932 from <filename>files/MACHINEA</filename>.
4933 Set <filename>MACHINE</filename> to "MACHINEB" and the
4934 build system uses files from
4935 <filename>files/MACHINEB</filename>.
4936 Finally, for any machine other than "MACHINEA" and
4937 "MACHINEB", the build system uses files from
4938 <filename>files/defconfig</filename>.
4939 </para>
4940
4941 <para>
4942 You can find out more about the patching process in the
4943 "<ulink url='&YOCTO_DOCS_OM_URL;#patching-dev-environment'>Patching</ulink>"
4944 section in the Yocto Project Overview and Concepts Manual
4945 and the
4946 "<ulink url='&YOCTO_DOCS_DEV_URL;#new-recipe-patching-code'>Patching Code</ulink>"
4947 section in the Yocto Project Development Tasks Manual.
4948 See the
4949 <link linkend='ref-tasks-patch'><filename>do_patch</filename></link>
4950 task as well.
4951 </para>
4952 </glossdef>
4953 </glossentry>
4954
4955 <glossentry id='var-FILESYSTEM_PERMS_TABLES'><glossterm>FILESYSTEM_PERMS_TABLES</glossterm>
4956 <info>
4957 FILESYSTEM_PERMS_TABLES[doc] = "Allows you to define your own file permissions settings table as part of your configuration for the packaging process."
4958 </info>
4959 <glossdef>
4960 <para role="glossdeffirst">
4961 Allows you to define your own file permissions settings table as part of
4962 your configuration for the packaging process.
4963 For example, suppose you need a consistent set of custom permissions for
4964 a set of groups and users across an entire work project.
4965 It is best to do this in the packages themselves but this is not always
4966 possible.
4967 </para>
4968
4969 <para>
4970 By default, the OpenEmbedded build system uses the <filename>fs-perms.txt</filename>, which
4971 is located in the <filename>meta/files</filename> folder in the
4972 <link linkend='source-directory'>Source Directory</link>.
4973 If you create your own file permissions setting table, you should place it in your
4974 layer or the distro's layer.
4975 </para>
4976
4977 <para>
4978 You define the <filename>FILESYSTEM_PERMS_TABLES</filename> variable in the
4979 <filename>conf/local.conf</filename> file, which is found in the
4980 <link linkend='build-directory'>Build Directory</link>, to
4981 point to your custom <filename>fs-perms.txt</filename>.
4982 You can specify more than a single file permissions setting table.
4983 The paths you specify to these files must be defined within the
4984 <link linkend='var-BBPATH'><filename>BBPATH</filename></link> variable.
4985 </para>
4986
4987 <para>
4988 For guidance on how to create your own file permissions settings table file,
4989 examine the existing <filename>fs-perms.txt</filename>.
4990 </para>
4991 </glossdef>
4992 </glossentry>
4993
4994 <glossentry id='var-FIT_HASH_ALG'><glossterm>FIT_HASH_ALG</glossterm>
4995 <info>
4996 FIT_HASH_ALG[doc] = "Specifies the hash algorithm used in creating the FIT Image."
4997 </info>
4998 <glossdef>
4999 <para role="glossdeffirst">
5000 Specifies the hash algorithm used in creating the FIT Image.
5001 For e.g. sha256.
5002 </para>
5003 </glossdef>
5004 </glossentry>
5005
5006 <glossentry id='var-FIT_SIGN_ALG'><glossterm>FIT_SIGN_ALG</glossterm>
5007 <info>
5008 FIT_SIGN_ALG[doc] = "Specifies the signature algorithm used in creating the FIT Image."
5009 </info>
5010 <glossdef>
5011 <para role="glossdeffirst">
5012 Specifies the signature algorithm used in creating the FIT Image.
5013 For e.g. rsa2048.
5014 </para>
5015 </glossdef>
5016 </glossentry>
5017
5018 <glossentry id='var-FONT_EXTRA_RDEPENDS'><glossterm>FONT_EXTRA_RDEPENDS</glossterm>
5019 <info>
5020 FONT_EXTRA_RDEPENDS[doc] = "When a recipe inherits the fontcache class, this variable specifies runtime dependencies for font packages. This variable defaults to 'fontconfig-utils'."
5021 </info>
5022 <glossdef>
5023 <para role="glossdeffirst">
5024 When inheriting the
5025 <link linkend='ref-classes-fontcache'><filename>fontcache</filename></link>
5026 class, this variable specifies the runtime dependencies
5027 for font packages.
5028 By default, the <filename>FONT_EXTRA_RDEPENDS</filename>
5029 is set to "fontconfig-utils".
5030 </para>
5031 </glossdef>
5032 </glossentry>
5033
5034 <glossentry id='var-FONT_PACKAGES'><glossterm>FONT_PACKAGES</glossterm>
5035 <info>
5036 FONT_PACKAGES[doc] = "When a recipe inherits the fontcache class, this variable identifies packages containing font files that need to be cached by Fontconfig."
5037 </info>
5038 <glossdef>
5039 <para role="glossdeffirst">
5040 When inheriting the
5041 <link linkend='ref-classes-fontcache'><filename>fontcache</filename></link>
5042 class, this variable identifies packages containing font
5043 files that need to be cached by Fontconfig.
5044 By default, the <filename>fontcache</filename> class assumes
5045 that fonts are in the recipe's main package
5046 (i.e. <filename>${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}</filename>).
5047 Use this variable if fonts you need are in a package
5048 other than that main package.
5049 </para>
5050 </glossdef>
5051 </glossentry>
5052
5053 <glossentry id='var-FORCE_RO_REMOVE'><glossterm>FORCE_RO_REMOVE</glossterm>
5054 <info>
5055 FORCE_RO_REMOVE[doc] = "Forces the removal of the packages listed in ROOTFS_RO_UNNEEDED during the generation of the root filesystem."
5056 </info>
5057 <glossdef>
5058 <para role="glossdeffirst">
5059 Forces the removal of the packages listed in
5060 <filename>ROOTFS_RO_UNNEEDED</filename> during the
5061 generation of the root filesystem.
5062 </para>
5063
5064 <para>
5065 Set the variable to "1" to force the removal of these
5066 packages.
5067 </para>
5068 </glossdef>
5069 </glossentry>
5070
5071 <glossentry id='var-FULL_OPTIMIZATION'><glossterm>FULL_OPTIMIZATION</glossterm>
5072 <info>
5073 FULL_OPTIMIZATION[doc]= "The options to pass in TARGET_CFLAGS and CFLAGS when compiling an optimized system. This variable defaults to '-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2'."
5074 </info>
5075 <glossdef>
5076 <para role="glossdeffirst">
5077 The options to pass in
5078 <filename><link linkend='var-TARGET_CFLAGS'>TARGET_CFLAGS</link></filename>
5079 and <filename><link linkend='var-CFLAGS'>CFLAGS</link></filename>
5080 when compiling an optimized system.
5081 This variable defaults to
5082 "-O2 -pipe ${DEBUG_FLAGS}".
5083 </para>
5084 </glossdef>
5085 </glossentry>
5086 </glossdiv>
5087
5088 <glossdiv id='var-glossary-g'><title>G</title>
5089
5090 <glossentry id='var-GCCPIE'><glossterm>GCCPIE</glossterm>
5091 <info>
5092 GCCPIE[doc] = "Enables Position Independent Executables (PIE) within the GNU C Compiler (GCC)."
5093 </info>
5094 <glossdef>
5095 <para role="glossdeffirst">
5096 Enables Position Independent Executables (PIE) within the
5097 GNU C Compiler (GCC).
5098 Enabling PIE in the GCC makes Return Oriented Programming
5099 (ROP) attacks much more difficult to
5100 execute.
5101 </para>
5102
5103 <para>
5104 By default the <filename>security_flags.inc</filename>
5105 file enables PIE by setting the variable as follows:
5106 <literallayout class='monospaced'>
5107 GCCPIE ?= "--enable-default-pie"
5108 </literallayout>
5109 </para>
5110 </glossdef>
5111 </glossentry>
5112
5113 <glossentry id='var-GCCVERSION'><glossterm>GCCVERSION</glossterm>
5114 <info>
5115 GCCVERSION[doc] = "Specifies the default version of the GNU C Compiler (GCC) to use."
5116 </info>
5117 <glossdef>
5118 <para role="glossdeffirst">
5119 Specifies the default version of the GNU C Compiler (GCC)
5120 used for compilation.
5121 By default, <filename>GCCVERSION</filename> is set to
5122 "8.x" in the
5123 <filename>meta/conf/distro/include/tcmode-default.inc</filename>
5124 include file:
5125 <literallayout class='monospaced'>
5126 GCCVERSION ?= "8.%"
5127 </literallayout>
5128 You can override this value by setting it in a configuration
5129 file such as the <filename>local.conf</filename>.
5130 </para>
5131 </glossdef>
5132 </glossentry>
5133
5134 <glossentry id='var-GDB'><glossterm>GDB</glossterm>
5135 <info>
5136 GDB[doc] = "The minimal command and arguments to run the GNU Debugger."
5137 </info>
5138 <glossdef>
5139 <para role="glossdeffirst">
5140 The minimal command and arguments to run the GNU Debugger.
5141 </para>
5142 </glossdef>
5143 </glossentry>
5144
5145 <glossentry id='var-GITDIR'><glossterm>GITDIR</glossterm>
5146 <info>
5147 GITDIR[doc] = "The directory where Git clones will be stored."
5148 </info>
5149 <glossdef>
5150 <para role="glossdeffirst">
5151 The directory in which a local copy of a Git repository
5152 is stored when it is cloned.
5153 </para>
5154 </glossdef>
5155 </glossentry>
5156
5157 <glossentry id='var-GLIBC_GENERATE_LOCALES'><glossterm>GLIBC_GENERATE_LOCALES</glossterm>
5158 <info>
5159 GLIBC_GENERATE_LOCALES[doc]= "Specifies the list of GLIBC locales to generate should you not wish to generate all LIBC locals, which can be time consuming."
5160 </info>
5161 <glossdef>
5162 <para role="glossdeffirst">
5163 Specifies the list of GLIBC locales to generate should you
5164 not wish to generate all LIBC locals, which can be time
5165 consuming.
5166 <note>
5167 If you specifically remove the locale
5168 <filename>en_US.UTF-8</filename>, you must set
5169 <link linkend='var-IMAGE_LINGUAS'><filename>IMAGE_LINGUAS</filename></link>
5170 appropriately.
5171 </note>
5172 </para>
5173
5174 <para>
5175 You can set <filename>GLIBC_GENERATE_LOCALES</filename>
5176 in your <filename>local.conf</filename> file.
5177 By default, all locales are generated.
5178 <literallayout class='monospaced'>
5179 GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 en_US.UTF-8"
5180 </literallayout>
5181 </para>
5182 </glossdef>
5183 </glossentry>
5184
5185 <glossentry id='var-GROUPADD_PARAM'><glossterm>GROUPADD_PARAM</glossterm>
5186 <info>
5187 GROUPADD_PARAM[doc] = "When a recipe inherits the useradd class, this variable specifies for a package what parameters should be passed to the groupadd command if you wish to add a group to the system when the package is installed."
5188 </info>
5189 <glossdef>
5190 <para role="glossdeffirst">
5191 When inheriting the
5192 <link linkend='ref-classes-useradd'><filename>useradd</filename></link>
5193 class, this variable
5194 specifies for a package what parameters should be passed
5195 to the <filename>groupadd</filename> command
5196 if you wish to add a group to the system when the package
5197 is installed.
5198 </para>
5199
5200 <para>
5201 Here is an example from the <filename>dbus</filename>
5202 recipe:
5203 <literallayout class='monospaced'>
5204 GROUPADD_PARAM_${PN} = "-r netdev"
5205 </literallayout>
5206 For information on the standard Linux shell command
5207 <filename>groupadd</filename>, see
5208 <ulink url='http://linux.die.net/man/8/groupadd'></ulink>.
5209 </para>
5210 </glossdef>
5211 </glossentry>
5212
5213 <glossentry id='var-GROUPMEMS_PARAM'><glossterm>GROUPMEMS_PARAM</glossterm>
5214 <info>
5215 GROUPMEMS_PARAM[doc] = "When a recipe inherits the useradd class, this variable specifies for a package what parameters should be passed to the groupmems command if you wish to modify the members of a group when the package is installed."
5216 </info>
5217 <glossdef>
5218 <para role="glossdeffirst">
5219 When inheriting the
5220 <link linkend='ref-classes-useradd'><filename>useradd</filename></link>
5221 class, this variable
5222 specifies for a package what parameters should be passed
5223 to the <filename>groupmems</filename> command
5224 if you wish to modify the members of a group when the
5225 package is installed.
5226 </para>
5227
5228 <para>
5229 For information on the standard Linux shell command
5230 <filename>groupmems</filename>, see
5231 <ulink url='http://linux.die.net/man/8/groupmems'></ulink>.
5232 </para>
5233 </glossdef>
5234 </glossentry>
5235
5236 <glossentry id='var-GRUB_GFXSERIAL'><glossterm>GRUB_GFXSERIAL</glossterm>
5237 <info>
5238 GRUB_GFXSERIAL[doc] = "Configures the GNU GRand Unified Bootloader (GRUB) to have graphics and serial in the boot menu."
5239 </info>
5240 <glossdef>
5241 <para role="glossdeffirst">
5242 Configures the GNU GRand Unified Bootloader (GRUB) to have
5243 graphics and serial in the boot menu.
5244 Set this variable to "1" in your
5245 <filename>local.conf</filename> or distribution
5246 configuration file to enable graphics and serial
5247 in the menu.
5248 </para>
5249
5250 <para>
5251 See the
5252 <link linkend='ref-classes-grub-efi'><filename>grub-efi</filename></link>
5253 class for more information on how this variable is used.
5254 </para>
5255 </glossdef>
5256 </glossentry>
5257
5258 <glossentry id='var-GRUB_OPTS'><glossterm>GRUB_OPTS</glossterm>
5259 <info>
5260 GRUB_OPTS[doc] = "Additional options to add to the GNU GRand Unified Bootloader (GRUB) configuration."
5261 </info>
5262 <glossdef>
5263 <para role="glossdeffirst">
5264 Additional options to add to the GNU GRand Unified
5265 Bootloader (GRUB) configuration.
5266 Use a semi-colon character (<filename>;</filename>) to
5267 separate multiple options.
5268 </para>
5269
5270 <para>
5271 The <filename>GRUB_OPTS</filename> variable is optional.
5272 See the
5273 <link linkend='ref-classes-grub-efi'><filename>grub-efi</filename></link>
5274 class for more information on how this variable is used.
5275 </para>
5276 </glossdef>
5277 </glossentry>
5278
5279 <glossentry id='var-GRUB_TIMEOUT'><glossterm>GRUB_TIMEOUT</glossterm>
5280 <info>
5281 GRUB_TIMEOUT[doc] = "Specifies the timeout before executing the default LABEL in the GNU GRand Unified Bootloader (GRUB)."
5282 </info>
5283 <glossdef>
5284 <para role="glossdeffirst">
5285 Specifies the timeout before executing the default
5286 <filename>LABEL</filename> in the GNU GRand Unified
5287 Bootloader (GRUB).
5288 </para>
5289
5290 <para>
5291 The <filename>GRUB_TIMEOUT</filename> variable is optional.
5292 See the
5293 <link linkend='ref-classes-grub-efi'><filename>grub-efi</filename></link>
5294 class for more information on how this variable is used.
5295 </para>
5296 </glossdef>
5297 </glossentry>
5298
5299 <glossentry id='var-GTKIMMODULES_PACKAGES'><glossterm>GTKIMMODULES_PACKAGES</glossterm>
5300 <info>
5301 GTKIMMODULES_PACKAGES[doc] = "For recipes that inherit the gtk-immodules-cache class, this variable specifies the packages that contain the GTK+ input method modules being installed when the modules are in packages other than the main package."
5302 </info>
5303 <glossdef>
5304 <para role="glossdeffirst">
5305 When inheriting the
5306 <link linkend='ref-classes-gtk-immodules-cache'><filename>gtk-immodules-cache</filename></link>
5307 class, this variable specifies the packages that contain the
5308 GTK+ input method modules being installed when the modules
5309 are in packages other than the main package.
5310 </para>
5311 </glossdef>
5312 </glossentry>
5313
5314 </glossdiv>
5315
5316 <glossdiv id='var-glossary-h'><title>H</title>
5317
5318 <glossentry id='var-HOMEPAGE'><glossterm>HOMEPAGE</glossterm>
5319 <info>
5320 HOMEPAGE[doc] = "Website where more information about the software the recipe is building can be found."
5321 </info>
5322 <glossdef>
5323 <para role="glossdeffirst">
5324 Website where more information about the software the recipe is building
5325 can be found.
5326 </para>
5327 </glossdef>
5328 </glossentry>
5329
5330 <glossentry id='var-HOST_ARCH'><glossterm>HOST_ARCH</glossterm>
5331 <info>
5332 HOST_ARCH[doc] = "The name of the target architecture. Normally same as the TARGET_ARCH."
5333
5334 </info>
5335 <glossdef>
5336 <para role="glossdeffirst">
5337 The name of the target architecture, which is normally
5338 the same as
5339 <link linkend='var-TARGET_ARCH'><filename>TARGET_ARCH</filename></link>.
5340 The OpenEmbedded build system supports many
5341 architectures.
5342 Here is an example list of architectures supported.
5343 This list is by no means complete as the architecture
5344 is configurable:
5345 <literallayout class='monospaced'>
5346 arm
5347 i586
5348 x86_64
5349 powerpc
5350 powerpc64
5351 mips
5352 mipsel
5353 </literallayout>
5354 </para>
5355 </glossdef>
5356 </glossentry>
5357
5358 <glossentry id='var-HOST_CC_ARCH'><glossterm>HOST_CC_ARCH</glossterm>
5359 <info>
5360 HOST_CC_ARCH[doc] = "The name of the host architecture. Normally same as the TARGET_CC_ARCH."
5361 </info>
5362 <glossdef>
5363 <para role="glossdeffirst">
5364 Specifies architecture-specific compiler flags that are
5365 passed to the C compiler.
5366 </para>
5367
5368 <para>
5369 Default initialization for <filename>HOST_CC_ARCH</filename>
5370 varies depending on what is being built:
5371 <itemizedlist>
5372 <listitem><para>
5373 <link linkend='var-TARGET_CC_ARCH'><filename>TARGET_CC_ARCH</filename></link>
5374 when building for the target
5375 </para></listitem>
5376 <listitem><para>
5377 <filename>BUILD_CC_ARCH</filename>
5378 when building for the build host (i.e.
5379 <filename>-native</filename>)
5380 </para></listitem>
5381 <listitem><para>
5382 <filename>BUILDSDK_CC_ARCH</filename>
5383 when building for an SDK (i.e.
5384 <filename>nativesdk-</filename>)
5385 </para></listitem>
5386 </itemizedlist>
5387 </para>
5388 </glossdef>
5389 </glossentry>
5390
5391 <glossentry id='var-HOST_OS'><glossterm>HOST_OS</glossterm>
5392 <info>
5393 HOST_OS[doc] = "The name of the target operating system. Normally the same as the TARGET_OS."
5394 </info>
5395 <glossdef>
5396 <para role="glossdeffirst">
5397 Specifies the name of the target operating system, which
5398 is normally the same as the
5399 <link linkend='var-TARGET_OS'><filename>TARGET_OS</filename></link>.
5400 The variable can be set to "linux" for <filename>glibc</filename>-based systems and
5401 to "linux-musl" for <filename>musl</filename>.
5402 For ARM/EABI targets, there are also "linux-gnueabi" and
5403 "linux-musleabi" values possible.
5404 </para>
5405 </glossdef>
5406 </glossentry>
5407
5408 <glossentry id='var-HOST_PREFIX'><glossterm>HOST_PREFIX</glossterm>
5409 <info>
5410 HOST_PREFIX[doc] = "The prefix for the cross compile toolchain. Normally same as the TARGET_PREFIX."
5411 </info>
5412 <glossdef>
5413 <para role="glossdeffirst">
5414 Specifies the prefix for the cross-compile toolchain.
5415 <filename>HOST_PREFIX</filename> is normally the same as
5416 <link linkend='var-TARGET_PREFIX'><filename>TARGET_PREFIX</filename></link>.
5417 </para>
5418 </glossdef>
5419 </glossentry>
5420
5421 <glossentry id='var-HOST_SYS'><glossterm>HOST_SYS</glossterm>
5422 <info>
5423 HOST_SYS[doc] = "Specifies the system, including the architecture and the operating system, for which the build is occurring in the context of the current recipe."
5424 </info>
5425 <glossdef>
5426 <para role="glossdeffirst">
5427 Specifies the system, including the architecture and the
5428 operating system, for which the build is occurring
5429 in the context of the current recipe.
5430 </para>
5431
5432 <para>
5433 The OpenEmbedded build system automatically sets this
5434 variable based on
5435 <link linkend='var-HOST_ARCH'><filename>HOST_ARCH</filename></link>,
5436 <link linkend='var-HOST_VENDOR'><filename>HOST_VENDOR</filename></link>,
5437 and
5438 <link linkend='var-HOST_OS'><filename>HOST_OS</filename></link>
5439 variables.
5440 <note>
5441 You do not need to set the variable yourself.
5442 </note>
5443 </para>
5444
5445 <para>
5446 Consider these two examples:
5447 <itemizedlist>
5448 <listitem><para>Given a native recipe on a 32-bit
5449 x86 machine running Linux, the value is
5450 "i686-linux".
5451 </para></listitem>
5452 <listitem><para>Given a recipe being built for a
5453 little-endian MIPS target running Linux,
5454 the value might be "mipsel-linux".
5455 </para></listitem>
5456 </itemizedlist>
5457 </para>
5458 </glossdef>
5459 </glossentry>
5460
5461 <glossentry id='var-HOSTTOOLS'><glossterm>HOSTTOOLS</glossterm>
5462 <info>
5463 HOSTTOOLS[doc] = "A space-separated list (filter) of tools on the build host that should be allowed to be called from within build tasks."
5464 </info>
5465 <glossdef>
5466 <para role="glossdeffirst">
5467 A space-separated list (filter) of tools on the build host
5468 that should be allowed to be called from within build tasks.
5469 Using this filter helps reduce the possibility of host
5470 contamination.
5471 If a tool specified in the value of
5472 <filename>HOSTTOOLS</filename> is not found on the
5473 build host, the OpenEmbedded build system produces
5474 an error and the build is not started.
5475 </para>
5476
5477 <para>
5478 For additional information, see
5479 <link linkend='var-HOSTTOOLS_NONFATAL'><filename>HOSTTOOLS_NONFATAL</filename></link>.
5480 </para>
5481 </glossdef>
5482 </glossentry>
5483
5484 <glossentry id='var-HOSTTOOLS_NONFATAL'><glossterm>HOSTTOOLS_NONFATAL</glossterm>
5485 <info>
5486 HOSTTOOLS_NONFATAL[doc] = "A space-separated list (filter) of tools on the build host that should be allowed to be called from within build tasks."
5487 </info>
5488 <glossdef>
5489 <para role="glossdeffirst">
5490 A space-separated list (filter) of tools on the build host
5491 that should be allowed to be called from within build tasks.
5492 Using this filter helps reduce the possibility of host
5493 contamination.
5494 Unlike
5495 <link linkend='var-HOSTTOOLS'><filename>HOSTTOOLS</filename></link>,
5496 the OpenEmbedded build system does not produce an error
5497 if a tool specified in the value of
5498 <filename>HOSTTOOLS_NONFATAL</filename> is not found on the
5499 build host.
5500 Thus, you can use <filename>HOSTTOOLS_NONFATAL</filename>
5501 to filter optional host tools.
5502 </para>
5503 </glossdef>
5504 </glossentry>
5505
5506 <glossentry id='var-HOST_VENDOR'><glossterm>HOST_VENDOR</glossterm>
5507 <info>
5508 HOST_VENDOR[doc] = "The name of the vendor. Normally same as the TARGET_VENDOR."
5509 </info>
5510 <glossdef>
5511 <para role="glossdeffirst">
5512 Specifies the name of the vendor.
5513 <filename>HOST_VENDOR</filename> is normally the same as
5514 <link linkend='var-TARGET_VENDOR'><filename>TARGET_VENDOR</filename></link>.
5515 </para>
5516 </glossdef>
5517 </glossentry>
5518
5519 </glossdiv>
5520
5521 <glossdiv id='var-glossary-i'><title>I</title>
5522
5523 <glossentry id='var-ICECC_DISABLED'><glossterm>ICECC_DISABLED</glossterm>
5524 <info>
5525 ICECC_DISABLED[doc] = "Disables or enables the icecc (Icecream) function."
5526 </info>
5527 <glossdef>
5528 <para role="glossdeffirst">
5529 Disables or enables the <filename>icecc</filename>
5530 (Icecream) function.
5531 For more information on this function and best practices
5532 for using this variable, see the
5533 "<link linkend='ref-classes-icecc'><filename>icecc.bbclass</filename></link>"
5534 section.
5535 </para>
5536
5537 <para>
5538 Setting this variable to "1" in your
5539 <filename>local.conf</filename> disables the function:
5540 <literallayout class='monospaced'>
5541 ICECC_DISABLED ??= "1"
5542 </literallayout>
5543 To enable the function, set the variable as follows:
5544 <literallayout class='monospaced'>
5545 ICECC_DISABLED = ""
5546 </literallayout>
5547 </para>
5548 </glossdef>
5549 </glossentry>
5550
5551 <glossentry id='var-ICECC_ENV_EXEC'><glossterm>ICECC_ENV_EXEC</glossterm>
5552 <info>
5553 ICECC_ENV_EXEC[doc] = "Points to the icecc-create-env script that you provide."
5554 </info>
5555 <glossdef>
5556 <para role="glossdeffirst">
5557 Points to the <filename>icecc-create-env</filename> script
5558 that you provide.
5559 This variable is used by the
5560 <link linkend='ref-classes-icecc'><filename>icecc</filename></link>
5561 class.
5562 You set this variable in your
5563 <filename>local.conf</filename> file.
5564 </para>
5565
5566 <para>
5567 If you do not point to a script that you provide, the
5568 OpenEmbedded build system uses the default script provided
5569 by the <filename>icecc-create-env.bb</filename> recipe,
5570 which is a modified version and not the one that comes with
5571 <filename>icecc</filename>.
5572 </para>
5573 </glossdef>
5574 </glossentry>
5575
5576 <glossentry id='var-ICECC_PARALLEL_MAKE'><glossterm>ICECC_PARALLEL_MAKE</glossterm>
5577 <info>
5578 ICECC_PARALLEL_MAKE[doc] = "Extra options passed to the make command during the do_compile task that specify parallel compilation."
5579 </info>
5580 <glossdef>
5581 <para role="glossdeffirst">
5582 Extra options passed to the <filename>make</filename>
5583 command during the
5584 <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>
5585 task that specify parallel compilation.
5586 This variable usually takes the form of
5587 "-j <replaceable>x</replaceable>", where
5588 <replaceable>x</replaceable> represents the maximum
5589 number of parallel threads <filename>make</filename> can
5590 run.
5591 <note>
5592 The options passed affect builds on all enabled
5593 machines on the network, which are machines running the
5594 <filename>iceccd</filename> daemon.
5595 </note>
5596 </para>
5597
5598 <para>
5599 If your enabled machines support multiple cores,
5600 coming up with the maximum number of parallel threads
5601 that gives you the best performance could take some
5602 experimentation since machine speed, network lag,
5603 available memory, and existing machine loads can all
5604 affect build time.
5605 Consequently, unlike the
5606 <link linkend='var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></link>
5607 variable, there is no rule-of-thumb for setting
5608 <filename>ICECC_PARALLEL_MAKE</filename> to achieve
5609 optimal performance.
5610 </para>
5611
5612 <para>
5613 If you do not set <filename>ICECC_PARALLEL_MAKE</filename>,
5614 the build system does not use it (i.e. the system does
5615 not detect and assign the number of cores as is done with
5616 <filename>PARALLEL_MAKE</filename>).
5617 </para>
5618 </glossdef>
5619 </glossentry>
5620
5621 <glossentry id='var-ICECC_PATH'><glossterm>ICECC_PATH</glossterm>
5622 <info>
5623 ICECC_PATH[doc] = "The location of the icecc binary."
5624 </info>
5625 <glossdef>
5626 <para role="glossdeffirst">
5627 The location of the <filename>icecc</filename> binary.
5628 You can set this variable in your
5629 <filename>local.conf</filename> file.
5630 If your <filename>local.conf</filename> file does not define
5631 this variable, the
5632 <link linkend='ref-classes-icecc'><filename>icecc</filename></link>
5633 class attempts to define it by locating
5634 <filename>icecc</filename> using <filename>which</filename>.
5635 </para>
5636 </glossdef>
5637 </glossentry>
5638
5639 <glossentry id='var-ICECC_USER_CLASS_BL'><glossterm>ICECC_USER_CLASS_BL</glossterm>
5640 <info>
5641 ICECC_USER_CLASS_BL[doc] = "Identifies user classes that you do not want the Icecream distributed compile support to consider."
5642 </info>
5643 <glossdef>
5644 <para role="glossdeffirst">
5645 Identifies user classes that you do not want the
5646 Icecream distributed compile support to consider.
5647 This variable is used by the
5648 <link linkend='ref-classes-icecc'><filename>icecc</filename></link>
5649 class.
5650 You set this variable in your
5651 <filename>local.conf</filename> file.
5652 </para>
5653
5654 <para>
5655 When you list classes using this variable, you are
5656 "blacklisting" them from distributed compilation across
5657 remote hosts.
5658 Any classes you list will be distributed and compiled
5659 locally.
5660 </para>
5661 </glossdef>
5662 </glossentry>
5663
5664 <glossentry id='var-ICECC_USER_PACKAGE_BL'><glossterm>ICECC_USER_PACKAGE_BL</glossterm>
5665 <info>
5666 ICECC_USER_PACKAGE_BL[doc] = "Identifies user recipes that you do not want the Icecream distributed compile support to consider."
5667 </info>
5668 <glossdef>
5669 <para role="glossdeffirst">
5670 Identifies user recipes that you do not want the
5671 Icecream distributed compile support to consider.
5672 This variable is used by the
5673 <link linkend='ref-classes-icecc'><filename>icecc</filename></link>
5674 class.
5675 You set this variable in your
5676 <filename>local.conf</filename> file.
5677 </para>
5678
5679 <para>
5680 When you list packages using this variable, you are
5681 "blacklisting" them from distributed compilation across
5682 remote hosts.
5683 Any packages you list will be distributed and compiled
5684 locally.
5685 </para>
5686 </glossdef>
5687 </glossentry>
5688
5689 <glossentry id='var-ICECC_USER_PACKAGE_WL'><glossterm>ICECC_USER_PACKAGE_WL</glossterm>
5690 <info>
5691 ICECC_USER_PACKAGE_WL[doc] = "Identifies user recipes that use an empty PARALLEL_MAKE variable that you want to force remote distributed compilation on using the Icecream distributed compile support."
5692 </info>
5693 <glossdef>
5694 <para role="glossdeffirst">
5695 Identifies user recipes that use an empty
5696 <link linkend='var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></link>
5697 variable that you want to force remote distributed
5698 compilation on using the Icecream distributed compile
5699 support.
5700 This variable is used by the
5701 <link linkend='ref-classes-icecc'><filename>icecc</filename></link>
5702 class.
5703 You set this variable in your
5704 <filename>local.conf</filename> file.
5705 </para>
5706 </glossdef>
5707 </glossentry>
5708
5709 <glossentry id='var-IMAGE_BASENAME'><glossterm>IMAGE_BASENAME</glossterm>
5710 <info>
5711 IMAGE_BASENAME[doc] = "The base name of image output files."
5712 </info>
5713 <glossdef>
5714 <para role="glossdeffirst">
5715 The base name of image output files.
5716 This variable defaults to the recipe name
5717 (<filename>${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}</filename>).
5718 </para>
5719 </glossdef>
5720 </glossentry>
5721
5722 <glossentry id='var-IMAGE_BOOT_FILES'><glossterm>IMAGE_BOOT_FILES</glossterm>
5723 <info>
5724 IMAGE_BOOT_FILES[doc] = "A space-separated list of files from ${DEPLOY_DIR_IMAGE} to place in boot partition."
5725 </info>
5726 <glossdef>
5727 <para role="glossdeffirst">
5728 A space-separated list of files installed into the
5729 boot partition when preparing an image using the Wic tool
5730 with the <filename>bootimg-partition</filename> or <filename>bootimg-efi</filename> source
5731 plugin.
5732 By default, the files are installed under the same name as
5733 the source files.
5734 To change the installed name, separate it from the
5735 original name with a semi-colon (;).
5736 Source files need to be located in
5737 <link linkend='var-DEPLOY_DIR_IMAGE'><filename>DEPLOY_DIR_IMAGE</filename></link>.
5738 Here are two examples:
5739
5740 <literallayout class="monospaced">
5741 IMAGE_BOOT_FILES = "u-boot.img uImage;kernel"
5742 IMAGE_BOOT_FILES = "u-boot.${UBOOT_SUFFIX} ${KERNEL_IMAGETYPE}"
5743 </literallayout>
5744 </para>
5745
5746 <para>
5747 Alternatively, source files can be picked up using
5748 a glob pattern.
5749 In this case, the destination file must have the same name
5750 as the base name of the source file path.
5751 To install files into a directory within the
5752 target location, pass its name after a semi-colon
5753 (;).
5754 Here are two examples:
5755 <literallayout class="monospaced">
5756 IMAGE_BOOT_FILES = "bcm2835-bootfiles/*"
5757 IMAGE_BOOT_FILES = "bcm2835-bootfiles/*;boot/"
5758 </literallayout>
5759 The first example installs all files from
5760 <filename>${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles</filename>
5761 into the root of the target partition.
5762 The second example installs the same files into a
5763 <filename>boot</filename> directory within the
5764 target partition.
5765 </para>
5766
5767 <para>
5768 You can find information on how to use the Wic tool in the
5769 "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-partitioned-images-using-wic'>Creating Partitioned Images Using Wic</ulink>"
5770 section of the Yocto Project Development Tasks Manual.
5771 Reference material for Wic is located in the
5772 "<ulink url='&YOCTO_DOCS_REF_URL;#ref-kickstart'>OpenEmbedded Kickstart (.wks) Reference</ulink>"
5773 chapter.
5774 </para>
5775 </glossdef>
5776 </glossentry>
5777
5778 <glossentry id='var-IMAGE_CLASSES'><glossterm>IMAGE_CLASSES</glossterm>
5779 <info>
5780 IMAGE_CLASSES[doc] = "A list of classes that all images should inherit."
5781 </info>
5782 <glossdef>
5783 <para role="glossdeffirst">
5784 A list of classes that all images should inherit.
5785 You typically use this variable to specify the list of
5786 classes that register the different types of images
5787 the OpenEmbedded build system creates.
5788 </para>
5789
5790 <para>
5791 The default value for <filename>IMAGE_CLASSES</filename> is
5792 <filename>image_types</filename>.
5793 You can set this variable in your
5794 <filename>local.conf</filename> or in a distribution
5795 configuration file.
5796 </para>
5797
5798 <para>
5799 For more information, see
5800 <filename>meta/classes/image_types.bbclass</filename> in the
5801 <link linkend='source-directory'>Source Directory</link>.
5802 </para>
5803 </glossdef>
5804 </glossentry>
5805
5806 <glossentry id='var-IMAGE_CMD'><glossterm>IMAGE_CMD</glossterm>
5807 <info>
5808 IMAGE_CMD[doc] = "Specifies the command to create the image file for a specific image type, which corresponds to the value set set in IMAGE_FSTYPES, (e.g. ext3, btrfs, and so forth)."
5809 </info>
5810 <glossdef>
5811 <para role="glossdeffirst">
5812 Specifies the command to create the image file for a
5813 specific image type, which corresponds to the value set
5814 set in
5815 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>,
5816 (e.g. <filename>ext3</filename>,
5817 <filename>btrfs</filename>, and so forth).
5818 When setting this variable, you should use
5819 an override for the associated type.
5820 Here is an example:
5821 <literallayout class='monospaced'>
5822 IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} \
5823 --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 \
5824 ${EXTRA_IMAGECMD}"
5825 </literallayout>
5826 </para>
5827
5828 <para>
5829 You typically do not need to set this variable unless
5830 you are adding support for a new image type.
5831 For more examples on how to set this variable, see the
5832 <link linkend='ref-classes-image_types'><filename>image_types</filename></link>
5833 class file, which is
5834 <filename>meta/classes/image_types.bbclass</filename>.
5835 </para>
5836 </glossdef>
5837 </glossentry>
5838
5839 <glossentry id='var-IMAGE_DEVICE_TABLES'><glossterm>IMAGE_DEVICE_TABLES</glossterm>
5840 <info>
5841 IMAGE_DEVICE_TABLES[doc] = "Specifies one or more files that contain custom device tables that are passed to the makedevs command as part of creating an image."
5842 </info>
5843 <glossdef>
5844 <para role="glossdeffirst">
5845 Specifies one or more files that contain custom device
5846 tables that are passed to the
5847 <filename>makedevs</filename> command as part of creating
5848 an image.
5849 These files list basic device nodes that should be
5850 created under <filename>/dev</filename> within the image.
5851 If <filename>IMAGE_DEVICE_TABLES</filename> is not set,
5852 <filename>files/device_table-minimal.txt</filename> is
5853 used, which is located by
5854 <link linkend='var-BBPATH'><filename>BBPATH</filename></link>.
5855 For details on how you should write device table files,
5856 see <filename>meta/files/device_table-minimal.txt</filename>
5857 as an example.
5858 </para>
5859 </glossdef>
5860 </glossentry>
5861
5862 <glossentry id='var-IMAGE_FEATURES'><glossterm>IMAGE_FEATURES</glossterm>
5863 <info>
5864 IMAGE_FEATURES[doc] = "The primary list of features to include in an image. Configure this variable in an image recipe."
5865 </info>
5866 <glossdef>
5867 <para role="glossdeffirst">
5868 The primary list of features to include in an image.
5869 Typically, you configure this variable in an image recipe.
5870 Although you can use this variable from your
5871 <filename>local.conf</filename> file, which is found in the
5872 <link linkend='build-directory'>Build Directory</link>,
5873 best practices dictate that you do not.
5874 <note>
5875 To enable extra features from outside the image recipe,
5876 use the
5877 <filename><link linkend='var-EXTRA_IMAGE_FEATURES'>EXTRA_IMAGE_FEATURES</link></filename> variable.
5878 </note>
5879 </para>
5880
5881 <para>
5882 For a list of image features that ships with the Yocto
5883 Project, see the
5884 "<link linkend="ref-features-image">Image Features</link>"
5885 section.
5886 </para>
5887
5888 <para>
5889 For an example that shows how to customize your image by
5890 using this variable, see the
5891 "<ulink url='&YOCTO_DOCS_DEV_URL;#usingpoky-extend-customimage-imagefeatures'>Customizing Images Using Custom <filename>IMAGE_FEATURES</filename> and <filename>EXTRA_IMAGE_FEATURES</filename></ulink>"
5892 section in the Yocto Project Development Tasks Manual.
5893 </para>
5894 </glossdef>
5895 </glossentry>
5896
5897 <glossentry id='var-IMAGE_FSTYPES'><glossterm>IMAGE_FSTYPES</glossterm>
5898 <info>
5899 IMAGE_FSTYPES[doc] = "Formats of root filesystem images that you want to have created."
5900 </info>
5901 <glossdef>
5902 <para role="glossdeffirst">
5903 Specifies the formats the OpenEmbedded build system uses
5904 during the build when creating the root filesystem.
5905 For example, setting <filename>IMAGE_FSTYPES</filename>
5906 as follows causes the build system to create root
5907 filesystems using two formats: <filename>.ext3</filename>
5908 and <filename>.tar.bz2</filename>:
5909 <literallayout class='monospaced'>
5910 IMAGE_FSTYPES = "ext3 tar.bz2"
5911 </literallayout>
5912 </para>
5913
5914 <para>
5915 For the complete list of supported image formats from which
5916 you can choose, see
5917 <link linkend='var-IMAGE_TYPES'><filename>IMAGE_TYPES</filename></link>.
5918 </para>
5919
5920 <note><title>Notes</title>
5921 <itemizedlist>
5922 <listitem><para>
5923 If an image recipe uses the "inherit image" line
5924 and you are setting
5925 <filename>IMAGE_FSTYPES</filename> inside the
5926 recipe, you must set
5927 <filename>IMAGE_FSTYPES</filename> prior to
5928 using the "inherit image" line.
5929 </para></listitem>
5930 <listitem><para>
5931 Due to the way the OpenEmbedded build system
5932 processes this variable, you cannot update its
5933 contents by using <filename>_append</filename> or
5934 <filename>_prepend</filename>.
5935 You must use the <filename>+=</filename>
5936 operator to add one or more options to the
5937 <filename>IMAGE_FSTYPES</filename> variable.
5938 </para></listitem>
5939 </itemizedlist>
5940 </note>
5941 </glossdef>
5942 </glossentry>
5943
5944 <glossentry id='var-IMAGE_INSTALL'><glossterm>IMAGE_INSTALL</glossterm>
5945 <info>
5946 IMAGE_INSTALL[doc] = "Used by recipes to specify the packages to install into an image through image.bbclass."
5947 </info>
5948 <glossdef>
5949 <para role="glossdeffirst">
5950 Used by recipes to specify the packages to install into an
5951 image through the
5952 <link linkend='ref-classes-image'><filename>image</filename></link>
5953 class.
5954 Use the <filename>IMAGE_INSTALL</filename> variable with
5955 care to avoid ordering issues.
5956 </para>
5957
5958 <para>
5959 Image recipes set <filename>IMAGE_INSTALL</filename>
5960 to specify the packages to install into an image through
5961 <filename>image.bbclass</filename>.
5962 Additionally, "helper" classes such as the
5963 <link linkend='ref-classes-core-image'><filename>core-image</filename></link>
5964 class exist that can take lists used with
5965 <filename><link linkend='var-IMAGE_FEATURES'>IMAGE_FEATURES</link></filename>
5966 and turn them into auto-generated entries in
5967 <filename>IMAGE_INSTALL</filename> in addition to its
5968 default contents.
5969 </para>
5970
5971 <para>
5972 When you use this variable, it is best to use it as follows:
5973 <literallayout class='monospaced'>
5974 IMAGE_INSTALL_append = " <replaceable>package-name</replaceable>"
5975 </literallayout>
5976 Be sure to include the space between the quotation character
5977 and the start of the package name or names.
5978 <note><title>Caution</title>
5979 <itemizedlist>
5980 <listitem><para>
5981 When working with a
5982 <link linkend='images-core-image-minimal-initramfs'><filename>core-image-minimal-initramfs</filename></link>
5983 image, do not use the
5984 <filename>IMAGE_INSTALL</filename> variable to
5985 specify packages for installation.
5986 Instead, use the
5987 <link linkend='var-PACKAGE_INSTALL'><filename>PACKAGE_INSTALL</filename></link>
5988 variable, which allows the initial RAM
5989 filesystem (initramfs) recipe to use a fixed
5990 set of packages and not be affected by
5991 <filename>IMAGE_INSTALL</filename>.
5992 For information on creating an initramfs, see
5993 the
5994 "<ulink url='&YOCTO_DOCS_DEV_URL;#building-an-initramfs-image'>Building an Initial RAM Filesystem (initramfs) Image</ulink>"
5995 section in the Yocto Project Development Tasks
5996 Manual.
5997 </para></listitem>
5998 <listitem><para>
5999 Using <filename>IMAGE_INSTALL</filename> with
6000 the
6001 <ulink url='&YOCTO_DOCS_BB_URL;#appending-and-prepending'><filename>+=</filename></ulink>
6002 BitBake operator within the
6003 <filename>/conf/local.conf</filename> file or
6004 from within an image recipe is not recommended.
6005 Use of this operator in these ways can cause
6006 ordering issues.
6007 Since <filename>core-image.bbclass</filename>
6008 sets <filename>IMAGE_INSTALL</filename> to a
6009 default value using the
6010 <ulink url='&YOCTO_DOCS_BB_URL;#setting-a-default-value'><filename>?=</filename></ulink>
6011 operator, using a <filename>+=</filename>
6012 operation against
6013 <filename>IMAGE_INSTALL</filename> results in
6014 unexpected behavior when used within
6015 <filename>conf/local.conf</filename>.
6016 Furthermore, the same operation from within
6017 an image recipe may or may not succeed
6018 depending on the specific situation.
6019 In both these cases, the behavior is contrary
6020 to how most users expect the
6021 <filename>+=</filename> operator to work.
6022 </para></listitem>
6023 </itemizedlist>
6024 </note>
6025 </para>
6026 </glossdef>
6027 </glossentry>
6028
6029 <glossentry id='var-IMAGE_LINGUAS'><glossterm>IMAGE_LINGUAS</glossterm>
6030 <info>
6031 IMAGE_LINGUAS[doc] = "Specifies the list of locales to install into the image during the root filesystem construction process."
6032 </info>
6033 <glossdef>
6034 <para role="glossdeffirst">
6035 Specifies the list of locales to install into the image
6036 during the root filesystem construction process.
6037 The OpenEmbedded build system automatically splits locale
6038 files, which are used for localization, into separate
6039 packages.
6040 Setting the <filename>IMAGE_LINGUAS</filename> variable
6041 ensures that any locale packages that correspond to packages
6042 already selected for installation into the image are also
6043 installed.
6044 Here is an example:
6045 <literallayout class='monospaced'>
6046 IMAGE_LINGUAS = "pt-br de-de"
6047 </literallayout>
6048 </para>
6049
6050 <para>
6051 In this example, the build system ensures any Brazilian
6052 Portuguese and German locale files that correspond to
6053 packages in the image are installed (i.e.
6054 <filename>*-locale-pt-br</filename>
6055 and <filename>*-locale-de-de</filename> as well as
6056 <filename>*-locale-pt</filename>
6057 and <filename>*-locale-de</filename>, since some software
6058 packages only provide locale files by language and not by
6059 country-specific language).
6060 </para>
6061
6062 <para>
6063 See the
6064 <link linkend='var-GLIBC_GENERATE_LOCALES'><filename>GLIBC_GENERATE_LOCALES</filename></link>
6065 variable for information on generating GLIBC locales.
6066 </para>
6067 </glossdef>
6068 </glossentry>
6069
6070 <glossentry id='var-IMAGE_MANIFEST'><glossterm>IMAGE_MANIFEST</glossterm>
6071 <info>
6072 IMAGE_MANIFEST[doc] = "The manifest file for the image. This file lists all the installed packages that make up the image."
6073 </info>
6074 <glossdef>
6075 <para role="glossdeffirst">
6076 The manifest file for the image.
6077 This file lists all the installed packages that make up
6078 the image.
6079 The file contains package information on a line-per-package
6080 basis as follows:
6081 <literallayout class='monospaced'>
6082 <replaceable>packagename</replaceable> <replaceable>packagearch</replaceable> <replaceable>version</replaceable>
6083 </literallayout>
6084 </para>
6085
6086 <para>
6087 The
6088 <link linkend='ref-classes-image'><filename>image</filename></link>
6089 class defines the manifest file as follows:
6090 <literallayout class='monospaced'>
6091 IMAGE_MANIFEST = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.manifest"
6092 </literallayout>
6093 The location is derived using the
6094 <link linkend='var-DEPLOY_DIR_IMAGE'><filename>DEPLOY_DIR_IMAGE</filename></link>
6095 and
6096 <link linkend='var-IMAGE_NAME'><filename>IMAGE_NAME</filename></link>
6097 variables.
6098 You can find information on how the image
6099 is created in the
6100 "<ulink url='&YOCTO_DOCS_OM_URL;#image-generation-dev-environment'>Image Generation</ulink>"
6101 section in the Yocto Project Overview and Concepts Manual.
6102 </para>
6103 </glossdef>
6104 </glossentry>
6105
6106 <glossentry id='var-IMAGE_NAME'><glossterm>IMAGE_NAME</glossterm>
6107 <info>
6108 IMAGE_NAME[doc] = "The name of the output image files minus the extension."
6109 </info>
6110 <glossdef>
6111 <para role="glossdeffirst">
6112 The name of the output image files minus the extension.
6113 This variable is derived using the
6114 <link linkend='var-IMAGE_BASENAME'><filename>IMAGE_BASENAME</filename></link>,
6115 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>,
6116 and
6117 <link linkend='var-DATETIME'><filename>DATETIME</filename></link>
6118 variables:
6119 <literallayout class='monospaced'>
6120 IMAGE_NAME = "${IMAGE_BASENAME}-${MACHINE}-${DATETIME}"
6121 </literallayout>
6122 </para>
6123 </glossdef>
6124 </glossentry>
6125
6126 <glossentry id='var-IMAGE_OVERHEAD_FACTOR'><glossterm>IMAGE_OVERHEAD_FACTOR</glossterm>
6127 <info>
6128 IMAGE_OVERHEAD_FACTOR[doc] = "Defines a multiplier that the build system applies to the initial image size for cases when the multiplier times the returned disk usage value for the image is greater than the sum of IMAGE_ROOTFS_SIZE and IMAGE_ROOTFS_EXTRA_SPACE."
6129 </info>
6130 <glossdef>
6131 <para role="glossdeffirst">
6132 Defines a multiplier that the build system applies to the initial image
6133 size for cases when the multiplier times the returned disk usage value
6134 for the image is greater than the sum of
6135 <filename><link linkend='var-IMAGE_ROOTFS_SIZE'>IMAGE_ROOTFS_SIZE</link></filename>
6136 and
6137 <filename><link linkend='var-IMAGE_ROOTFS_EXTRA_SPACE'>IMAGE_ROOTFS_EXTRA_SPACE</link></filename>.
6138 The result of the multiplier applied to the initial image size creates
6139 free disk space in the image as overhead.
6140 By default, the build process uses a multiplier of 1.3 for this variable.
6141 This default value results in 30% free disk space added to the image when this
6142 method is used to determine the final generated image size.
6143 You should be aware that post install scripts and the package management
6144 system uses disk space inside this overhead area.
6145 Consequently, the multiplier does not produce an image with
6146 all the theoretical free disk space.
6147 See <filename><link linkend='var-IMAGE_ROOTFS_SIZE'>IMAGE_ROOTFS_SIZE</link></filename>
6148 for information on how the build system determines the overall image size.
6149 </para>
6150
6151 <para>
6152 The default 30% free disk space typically gives the image enough room to boot
6153 and allows for basic post installs while still leaving a small amount of
6154 free disk space.
6155 If 30% free space is inadequate, you can increase the default value.
6156 For example, the following setting gives you 50% free space added to the image:
6157 <literallayout class='monospaced'>
6158 IMAGE_OVERHEAD_FACTOR = "1.5"
6159 </literallayout>
6160 </para>
6161
6162 <para>
6163 Alternatively, you can ensure a specific amount of free disk space is added
6164 to the image by using the
6165 <filename><link linkend='var-IMAGE_ROOTFS_EXTRA_SPACE'>IMAGE_ROOTFS_EXTRA_SPACE</link></filename>
6166 variable.
6167 </para>
6168 </glossdef>
6169 </glossentry>
6170
6171 <glossentry id='var-IMAGE_PKGTYPE'><glossterm>IMAGE_PKGTYPE</glossterm>
6172 <info>
6173 IMAGE_PKGTYPE[doc] = "Defines the package type (i.e. DEB, RPM, IPK, or TAR) used by the OpenEmbedded build system."
6174 </info>
6175 <glossdef>
6176 <para role="glossdeffirst">
6177 Defines the package type (i.e. DEB, RPM, IPK, or TAR) used
6178 by the OpenEmbedded build system.
6179 The variable is defined appropriately by the
6180 <link linkend='ref-classes-package_deb'><filename>package_deb</filename></link>,
6181 <link linkend='ref-classes-package_rpm'><filename>package_rpm</filename></link>,
6182 <link linkend='ref-classes-package_ipk'><filename>package_ipk</filename></link>,
6183 or
6184 <link linkend='ref-classes-package_tar'><filename>package_tar</filename></link>
6185 class.
6186 <note><title>Warning</title>
6187 The <filename>package_tar</filename> class is broken
6188 and is not supported.
6189 It is recommended that you do not use it.
6190 </note>
6191 </para>
6192
6193 <para>
6194 The
6195 <link linkend='ref-classes-populate-sdk-*'><filename>populate_sdk_*</filename></link>
6196 and
6197 <link linkend='ref-classes-image'><filename>image</filename></link>
6198 classes use the <filename>IMAGE_PKGTYPE</filename> for
6199 packaging up images and SDKs.
6200 </para>
6201
6202 <para>
6203 You should not set the <filename>IMAGE_PKGTYPE</filename>
6204 manually.
6205 Rather, the variable is set indirectly through the
6206 appropriate
6207 <link linkend='ref-classes-package'><filename>package_*</filename></link>
6208 class using the
6209 <link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>
6210 variable.
6211 The OpenEmbedded build system uses the first package type
6212 (e.g. DEB, RPM, or IPK) that appears with the variable
6213 <note>
6214 Files using the <filename>.tar</filename> format are
6215 never used as a substitute packaging format for DEB,
6216 RPM, and IPK formatted files for your image or SDK.
6217 </note>
6218 </para>
6219 </glossdef>
6220 </glossentry>
6221
6222 <glossentry id='var-IMAGE_POSTPROCESS_COMMAND'><glossterm>IMAGE_POSTPROCESS_COMMAND</glossterm>
6223 <info>
6224 IMAGE_POSTPROCESS_COMMAND[doc] = "Specifies a list of functions to call once the OpenEmbedded build system creates the final image output files."
6225 </info>
6226 <glossdef>
6227 <para role="glossdeffirst">
6228 Specifies a list of functions to call once the
6229 OpenEmbedded build system creates the final image
6230 output files.
6231 You can specify functions separated by semicolons:
6232 <literallayout class='monospaced'>
6233 IMAGE_POSTPROCESS_COMMAND += "<replaceable>function</replaceable>; ... "
6234 </literallayout>
6235 </para>
6236
6237 <para>
6238 If you need to pass the root filesystem path to a command
6239 within the function, you can use
6240 <filename>${IMAGE_ROOTFS}</filename>, which points to
6241 the directory that becomes the root filesystem image.
6242 See the
6243 <link linkend='var-IMAGE_ROOTFS'><filename>IMAGE_ROOTFS</filename></link>
6244 variable for more information.
6245 </para>
6246 </glossdef>
6247 </glossentry>
6248
6249 <glossentry id='var-IMAGE_PREPROCESS_COMMAND'><glossterm>IMAGE_PREPROCESS_COMMAND</glossterm>
6250 <info>
6251 IMAGE_PREPROCESS_COMMAND[doc] = "Specifies a list of functions to call before the OpenEmbedded build system creates the final image output files."
6252 </info>
6253 <glossdef>
6254 <para role="glossdeffirst">
6255 Specifies a list of functions to call before the
6256 OpenEmbedded build system creates the final image
6257 output files.
6258 You can specify functions separated by semicolons:
6259 <literallayout class='monospaced'>
6260 IMAGE_PREPROCESS_COMMAND += "<replaceable>function</replaceable>; ... "
6261 </literallayout>
6262 </para>
6263
6264 <para>
6265 If you need to pass the root filesystem path to a command
6266 within the function, you can use
6267 <filename>${IMAGE_ROOTFS}</filename>, which points to
6268 the directory that becomes the root filesystem image.
6269 See the
6270 <link linkend='var-IMAGE_ROOTFS'><filename>IMAGE_ROOTFS</filename></link>
6271 variable for more information.
6272 </para>
6273 </glossdef>
6274 </glossentry>
6275
6276 <glossentry id='var-IMAGE_ROOTFS'><glossterm>IMAGE_ROOTFS</glossterm>
6277 <info>
6278 IMAGE_ROOTFS[doc] = "The location of the root filesystem while it is under construction (i.e. during do_rootfs)."
6279 </info>
6280 <glossdef>
6281 <para role="glossdeffirst">
6282 The location of the root filesystem while it is under
6283 construction (i.e. during the
6284 <link linkend='ref-tasks-rootfs'><filename>do_rootfs</filename></link>
6285 task).
6286 This variable is not configurable.
6287 Do not change it.
6288 </para>
6289 </glossdef>
6290 </glossentry>
6291
6292 <glossentry id='var-IMAGE_ROOTFS_ALIGNMENT'><glossterm>IMAGE_ROOTFS_ALIGNMENT</glossterm>
6293 <info>
6294 IMAGE_ROOTFS_ALIGNMENT[doc] = "Specifies the alignment for the output image file in Kbytes."
6295 </info>
6296 <glossdef>
6297 <para role="glossdeffirst">
6298 Specifies the alignment for the output image file in
6299 Kbytes.
6300 If the size of the image is not a multiple of
6301 this value, then the size is rounded up to the nearest
6302 multiple of the value.
6303 The default value is "1".
6304 See
6305 <link linkend='var-IMAGE_ROOTFS_SIZE'><filename>IMAGE_ROOTFS_SIZE</filename></link>
6306 for additional information.
6307 </para>
6308 </glossdef>
6309 </glossentry>
6310
6311 <glossentry id='var-IMAGE_ROOTFS_EXTRA_SPACE'><glossterm>IMAGE_ROOTFS_EXTRA_SPACE</glossterm>
6312 <info>
6313 IMAGE_ROOTFS_EXTRA_SPACE[doc] = "Defines additional free disk space created in the image in Kbytes. By default, this variable is set to '0'."
6314 </info>
6315 <glossdef>
6316 <para role="glossdeffirst">
6317 Defines additional free disk space created in the image in Kbytes.
6318 By default, this variable is set to "0".
6319 This free disk space is added to the image after the build system determines
6320 the image size as described in
6321 <filename><link linkend='var-IMAGE_ROOTFS_SIZE'>IMAGE_ROOTFS_SIZE</link></filename>.
6322 </para>
6323
6324 <para>
6325 This variable is particularly useful when you want to ensure that a
6326 specific amount of free disk space is available on a device after an image
6327 is installed and running.
6328 For example, to be sure 5 Gbytes of free disk space is available, set the
6329 variable as follows:
6330 <literallayout class='monospaced'>
6331 IMAGE_ROOTFS_EXTRA_SPACE = "5242880"
6332 </literallayout>
6333 </para>
6334
6335 <para>
6336 For example, the Yocto Project Build Appliance specifically requests 40 Gbytes
6337 of extra space with the line:
6338 <literallayout class='monospaced'>
6339 IMAGE_ROOTFS_EXTRA_SPACE = "41943040"
6340 </literallayout>
6341 </para>
6342 </glossdef>
6343 </glossentry>
6344
6345 <glossentry id='var-IMAGE_ROOTFS_SIZE'><glossterm>IMAGE_ROOTFS_SIZE</glossterm>
6346 <info>
6347 IMAGE_ROOTFS_SIZE[doc] = "Defines the size in Kbytes for the generated image."
6348 </info>
6349 <glossdef>
6350 <para role="glossdeffirst">
6351 Defines the size in Kbytes for the generated image.
6352 The OpenEmbedded build system determines the final size for the generated
6353 image using an algorithm that takes into account the initial disk space used
6354 for the generated image, a requested size for the image, and requested
6355 additional free disk space to be added to the image.
6356 Programatically, the build system determines the final size of the
6357 generated image as follows:
6358 <literallayout class='monospaced'>
6359 if (image-du * overhead) &lt; rootfs-size:
6360 internal-rootfs-size = rootfs-size + xspace
6361 else:
6362 internal-rootfs-size = (image-du * overhead) + xspace
6363
6364 where:
6365
6366 image-du = Returned value of the du command on
6367 the image.
6368
6369 overhead = IMAGE_OVERHEAD_FACTOR
6370
6371 rootfs-size = IMAGE_ROOTFS_SIZE
6372
6373 internal-rootfs-size = Initial root filesystem
6374 size before any modifications.
6375
6376 xspace = IMAGE_ROOTFS_EXTRA_SPACE
6377 </literallayout>
6378 </para>
6379
6380 <para>
6381 See the <link linkend='var-IMAGE_OVERHEAD_FACTOR'><filename>IMAGE_OVERHEAD_FACTOR</filename></link>
6382 and <link linkend='var-IMAGE_ROOTFS_EXTRA_SPACE'><filename>IMAGE_ROOTFS_EXTRA_SPACE</filename></link>
6383 variables for related information.
6384<!-- In the above example, <filename>overhead</filename> is defined by the
6385 <filename><link linkend='var-IMAGE_OVERHEAD_FACTOR'>IMAGE_OVERHEAD_FACTOR</link></filename>
6386 variable, <filename>xspace</filename> is defined by the
6387 <filename><link linkend='var-IMAGE_ROOTFS_EXTRA_SPACE'>IMAGE_ROOTFS_EXTRA_SPACE</link></filename>
6388 variable, and <filename>du</filename> is the results of the disk usage command
6389 on the initially generated image. -->
6390 </para>
6391 </glossdef>
6392 </glossentry>
6393
6394 <glossentry id='var-IMAGE_TYPEDEP'><glossterm>IMAGE_TYPEDEP</glossterm>
6395 <info>
6396 IMAGE_TYPEDEP[doc] = "Specifies a dependency from one image type on another."
6397 </info>
6398 <glossdef>
6399 <para role="glossdeffirst">
6400 Specifies a dependency from one image type on another.
6401 Here is an example from the
6402 <link linkend='ref-classes-image-live'><filename>image-live</filename></link>
6403 class:
6404 <literallayout class='monospaced'>
6405 IMAGE_TYPEDEP_live = "ext3"
6406 </literallayout>
6407 </para>
6408
6409 <para>
6410 In the previous example, the variable ensures that when
6411 "live" is listed with the
6412 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
6413 variable, the OpenEmbedded build system produces an
6414 <filename>ext3</filename> image first since one of the
6415 components of the live
6416 image is an <filename>ext3</filename>
6417 formatted partition containing the root
6418 filesystem.
6419 </para>
6420 </glossdef>
6421 </glossentry>
6422
6423 <glossentry id='var-IMAGE_TYPES'><glossterm>IMAGE_TYPES</glossterm>
6424 <info>
6425 IMAGE_TYPES[doc] = "Specifies the complete list of supported image types by default."
6426 </info>
6427 <glossdef>
6428 <para role="glossdeffirst">
6429 Specifies the complete list of supported image types
6430 by default:
6431 <literallayout class='monospaced'>
6432 btrfs
6433 container
6434 cpio
6435 cpio.gz
6436 cpio.lz4
6437 cpio.lzma
6438 cpio.xz
6439 cramfs
6440 ext2
6441 ext2.bz2
6442 ext2.gz
6443 ext2.lzma
6444 ext3
6445 ext3.gz
6446 ext4
6447 ext4.gz
6448 f2fs
6449 hddimg
6450 iso
6451 jffs2
6452 jffs2.sum
6453 multiubi
6454 squashfs
6455 squashfs-lz4
6456 squashfs-lzo
6457 squashfs-xz
6458 tar
6459 tar.bz2
6460 tar.gz
6461 tar.lz4
6462 tar.xz
6463 tar.zst
6464 ubi
6465 ubifs
6466 wic
6467 wic.bz2
6468 wic.gz
6469 wic.lzma
6470 </literallayout>
6471 </para>
6472
6473 <para>
6474 For more information about these types of images, see
6475 <filename>meta/classes/image_types*.bbclass</filename>
6476 in the
6477 <link linkend='source-directory'>Source Directory</link>.
6478 </para>
6479 </glossdef>
6480 </glossentry>
6481
6482 <glossentry id='var-INC_PR'><glossterm>INC_PR</glossterm>
6483 <info>
6484 INC_PR[doc] = "Helps define the recipe revision for recipes that share a common include file."
6485 </info>
6486 <glossdef>
6487 <para role="glossdeffirst">
6488 Helps define the recipe revision for recipes that share
6489 a common <filename>include</filename> file.
6490 You can think of this variable as part of the recipe revision
6491 as set from within an include file.
6492 </para>
6493
6494 <para>
6495 Suppose, for example, you have a set of recipes that
6496 are used across several projects.
6497 And, within each of those recipes the revision
6498 (its <link linkend='var-PR'><filename>PR</filename></link>
6499 value) is set accordingly.
6500 In this case, when the revision of those recipes changes,
6501 the burden is on you to find all those recipes and
6502 be sure that they get changed to reflect the updated
6503 version of the recipe.
6504 In this scenario, it can get complicated when recipes
6505 that are used in many places and provide common functionality
6506 are upgraded to a new revision.
6507 </para>
6508
6509 <para>
6510 A more efficient way of dealing with this situation is
6511 to set the <filename>INC_PR</filename> variable inside
6512 the <filename>include</filename> files that the recipes
6513 share and then expand the <filename>INC_PR</filename>
6514 variable within the recipes to help
6515 define the recipe revision.
6516 </para>
6517
6518 <para>
6519 The following provides an example that shows how to use
6520 the <filename>INC_PR</filename> variable
6521 given a common <filename>include</filename> file that
6522 defines the variable.
6523 Once the variable is defined in the
6524 <filename>include</filename> file, you can use the
6525 variable to set the <filename>PR</filename> values in
6526 each recipe.
6527 You will notice that when you set a recipe's
6528 <filename>PR</filename> you can provide more granular
6529 revisioning by appending values to the
6530 <filename>INC_PR</filename> variable:
6531 <literallayout class='monospaced'>
6532 recipes-graphics/xorg-font/xorg-font-common.inc:INC_PR = "r2"
6533 recipes-graphics/xorg-font/encodings_1.0.4.bb:PR = "${INC_PR}.1"
6534 recipes-graphics/xorg-font/font-util_1.3.0.bb:PR = "${INC_PR}.0"
6535 recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
6536 </literallayout>
6537 The first line of the example establishes the baseline
6538 revision to be used for all recipes that use the
6539 <filename>include</filename> file.
6540 The remaining lines in the example are from individual
6541 recipes and show how the <filename>PR</filename> value
6542 is set.
6543 </para>
6544 </glossdef>
6545 </glossentry>
6546
6547 <glossentry id='var-INCOMPATIBLE_LICENSE'><glossterm>INCOMPATIBLE_LICENSE</glossterm>
6548 <info>
6549 INCOMPATIBLE_LICENSE[doc] = "Specifies a space-separated list of license names (as they would appear in LICENSE) that should be excluded from the build."
6550 </info>
6551 <glossdef>
6552 <para role="glossdeffirst">
6553 Specifies a space-separated list of license names
6554 (as they would appear in
6555 <link linkend='var-LICENSE'><filename>LICENSE</filename></link>)
6556 that should be excluded from the build.
6557 Recipes that provide no alternatives to listed incompatible
6558 licenses are not built.
6559 Packages that are individually licensed with the specified
6560 incompatible licenses will be deleted.
6561 </para>
6562
6563 <note>
6564 This functionality is only regularly tested using
6565 the following setting:
6566 <literallayout class='monospaced'>
6567 INCOMPATIBLE_LICENSE = "GPL-3.0 LGPL-3.0 AGPL-3.0"
6568 </literallayout>
6569 Although you can use other settings, you might be required
6570 to remove dependencies on or provide alternatives to
6571 components that are required to produce a functional system
6572 image.
6573 </note>
6574
6575 <note><title>Tips</title>
6576 It is possible to define a list of licenses that are allowed
6577 to be used instead of the licenses that are excluded. To do
6578 this, define a
6579 variable <filename>COMPATIBLE_LICENSES</filename> with the
6580 names of the licences that are allowed. Then
6581 define <filename>INCOMPATIBLE_LICENSE</filename> as:
6582 <literallayout class='monospaced'>
6583 INCOMPATIBLE_LICENSE = "${@' '.join(sorted(set(d.getVar('AVAILABLE_LICENSES').split()) - set(d.getVar('COMPATIBLE_LICENSES').split())))}"
6584 </literallayout>
6585 This will result
6586 in <filename>INCOMPATIBLE_LICENSE</filename> containing the
6587 names of all licences
6588 from <link linkend='var-AVAILABLE_LICENSES'><filename>AVAILABLE_LICENSES</filename></link>
6589 except the ones specified
6590 in <filename>COMPATIBLE_LICENSES</filename>, thus only
6591 allowing the latter licences to be used.
6592 </note>
6593 </glossdef>
6594 </glossentry>
6595
6596 <glossentry id='var-INHERIT'><glossterm>INHERIT</glossterm>
6597 <info>
6598 INHERIT[doc] = "Causes the named class or classes to be inherited globally."
6599 </info>
6600 <glossdef>
6601 <para role="glossdeffirst">
6602 Causes the named class or classes to be inherited globally.
6603 Anonymous functions in the class or classes
6604 are not executed for the
6605 base configuration and in each individual recipe.
6606 The OpenEmbedded build system ignores changes to
6607 <filename>INHERIT</filename> in individual recipes.
6608 </para>
6609
6610 <para>
6611 For more information on <filename>INHERIT</filename>, see
6612 the
6613 "<ulink url="&YOCTO_DOCS_BB_URL;#inherit-configuration-directive"><filename>INHERIT</filename> Configuration Directive</ulink>"
6614 section in the Bitbake User Manual.
6615 </para>
6616 </glossdef>
6617 </glossentry>
6618
6619 <glossentry id='var-INHERIT_DISTRO'><glossterm>INHERIT_DISTRO</glossterm>
6620 <info>
6621 INHERIT_DISTRO[doc] = "Lists classes that will be inherited at the distribution level. It is unlikely that you want to edit this variable."
6622 </info>
6623 <glossdef>
6624 <para role="glossdeffirst">
6625 Lists classes that will be inherited at the
6626 distribution level.
6627 It is unlikely that you want to edit this variable.
6628 </para>
6629
6630 <para>
6631 The default value of the variable is set as follows in the
6632 <filename>meta/conf/distro/defaultsetup.conf</filename>
6633 file:
6634 <literallayout class='monospaced'>
6635 INHERIT_DISTRO ?= "debian devshell sstate license"
6636 </literallayout>
6637 </para>
6638 </glossdef>
6639 </glossentry>
6640
6641 <glossentry id='var-INHIBIT_DEFAULT_DEPS'><glossterm>INHIBIT_DEFAULT_DEPS</glossterm>
6642 <info>
6643 INHIBIT_DEFAULT_DEPS[doc] = "Prevents the default dependencies, namely the C compiler and standard C library (libc), from being added to DEPENDS."
6644 </info>
6645 <glossdef>
6646 <para role="glossdeffirst">
6647 Prevents the default dependencies, namely the C compiler
6648 and standard C library (libc), from being added to
6649 <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>.
6650 This variable is usually used within recipes that do not
6651 require any compilation using the C compiler.
6652 </para>
6653
6654 <para>
6655 Set the variable to "1" to prevent the default dependencies
6656 from being added.
6657 </para>
6658 </glossdef>
6659 </glossentry>
6660
6661 <glossentry id='var-INHIBIT_PACKAGE_DEBUG_SPLIT'><glossterm>INHIBIT_PACKAGE_DEBUG_SPLIT</glossterm>
6662 <info>
6663 INHIBIT_PACKAGE_DEBUG_SPLIT[doc] = "If set to "1", prevents the OpenEmbedded build system from splitting out debug information during packaging"
6664 </info>
6665 <glossdef>
6666 <para role="glossdeffirst">
6667 Prevents the OpenEmbedded build system from splitting
6668 out debug information during packaging.
6669 By default, the build system splits out debugging
6670 information during the
6671 <link linkend='ref-tasks-package'><filename>do_package</filename></link>
6672 task.
6673 For more information on how debug information is split out,
6674 see the
6675 <link linkend='var-PACKAGE_DEBUG_SPLIT_STYLE'><filename>PACKAGE_DEBUG_SPLIT_STYLE</filename></link>
6676 variable.
6677 </para>
6678
6679 <para>
6680 To prevent the build system from splitting out
6681 debug information during packaging, set the
6682 <filename>INHIBIT_PACKAGE_DEBUG_SPLIT</filename> variable
6683 as follows:
6684 <literallayout class='monospaced'>
6685 INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
6686 </literallayout>
6687 </para>
6688 </glossdef>
6689 </glossentry>
6690
6691 <glossentry id='var-INHIBIT_PACKAGE_STRIP'><glossterm>INHIBIT_PACKAGE_STRIP</glossterm>
6692 <info>
6693 INHIBIT_PACKAGE_STRIP[doc] = "If set to "1", causes the build to not strip binaries in resulting packages."
6694 </info>
6695 <glossdef>
6696 <para role="glossdeffirst">
6697 If set to "1", causes the build to not strip binaries in
6698 resulting packages and prevents the
6699 <filename>-dbg</filename> package from containing the
6700 source files.
6701 </para>
6702
6703 <para>
6704 By default, the OpenEmbedded build system strips
6705 binaries and puts the debugging symbols into
6706 <filename>${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}-dbg</filename>.
6707 Consequently, you should not set
6708 <filename>INHIBIT_PACKAGE_STRIP</filename> when you plan
6709 to debug in general.
6710 </para>
6711 </glossdef>
6712 </glossentry>
6713
6714 <glossentry id='var-INHIBIT_SYSROOT_STRIP'><glossterm>INHIBIT_SYSROOT_STRIP</glossterm>
6715 <info>
6716 INHIBIT_SYSROOT_STRIP[doc] = "If set to "1", causes the build to not strip binaries in the resulting sysroot."
6717 </info>
6718 <glossdef>
6719 <para role="glossdeffirst">
6720 If set to "1", causes the build to not strip binaries in
6721 the resulting sysroot.
6722 </para>
6723
6724 <para>
6725 By default, the OpenEmbedded build system strips
6726 binaries in the resulting sysroot.
6727 When you specifically set the
6728 <filename>INHIBIT_SYSROOT_STRIP</filename> variable to
6729 "1" in your recipe, you inhibit this stripping.
6730 </para>
6731
6732 <para>
6733 If you want to use this variable, include the
6734 <link linkend='ref-classes-staging'><filename>staging</filename></link>
6735 class.
6736 This class uses a <filename>sys_strip()</filename>
6737 function to test for the variable and acts accordingly.
6738 <note>
6739 Use of the <filename>INHIBIT_SYSROOT_STRIP</filename>
6740 variable occurs in rare and special circumstances.
6741 For example, suppose you are building bare-metal
6742 firmware by using an external GCC toolchain.
6743 Furthermore, even if the toolchain's binaries are
6744 strippable, other files exist that are needed for the
6745 build that are not strippable.
6746 </note>
6747 </para>
6748 </glossdef>
6749 </glossentry>
6750
6751 <glossentry id='var-INITRAMFS_FSTYPES'><glossterm>INITRAMFS_FSTYPES</glossterm>
6752 <info>
6753 INITRAMFS_FSTYPES[doc] = "Defines the format for the output image of an initial RAM filesystem (initramfs), which is used during boot."
6754 </info>
6755 <glossdef>
6756 <para role="glossdeffirst">
6757 Defines the format for the output image of an initial
6758 RAM filesystem (initramfs), which is used during boot.
6759 Supported formats are the same as those supported by the
6760 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
6761 variable.
6762 </para>
6763
6764 <para>
6765 The default value of this variable, which is set in the
6766 <filename>meta/conf/bitbake.conf</filename> configuration
6767 file in the
6768 <link linkend='source-directory'>Source Directory</link>,
6769 is "cpio.gz".
6770 The Linux kernel's initramfs mechanism, as opposed to the
6771 initial RAM filesystem
6772 <ulink url='https://en.wikipedia.org/wiki/Initrd'>initrd</ulink>
6773 mechanism, expects an optionally compressed cpio
6774 archive.
6775 </para>
6776 </glossdef>
6777 </glossentry>
6778
6779 <glossentry id='var-INITRAMFS_IMAGE'><glossterm>INITRAMFS_IMAGE</glossterm>
6780 <info>
6781 INITRAMFS_IMAGE[doc] = "Specifies the PROVIDES name of an image recipe that is used to build an initial RAM filesystem (initramfs) image."
6782 </info>
6783 <glossdef>
6784 <para role="glossdeffirst">
6785 Specifies the
6786 <link linkend='var-PROVIDES'><filename>PROVIDES</filename></link>
6787 name of an image recipe that is used to build an initial
6788 RAM filesystem (initramfs) image.
6789 In other words, the <filename>INITRAMFS_IMAGE</filename>
6790 variable causes an additional recipe to be built as
6791 a dependency to whatever root filesystem recipe you
6792 might be using (e.g. <filename>core-image-sato</filename>).
6793 The initramfs image recipe you provide should set
6794 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
6795 to
6796 <link linkend='var-INITRAMFS_FSTYPES'><filename>INITRAMFS_FSTYPES</filename></link>.
6797 </para>
6798
6799 <para>
6800 An initramfs image provides a temporary root filesystem
6801 used for early system initialization (e.g. loading of
6802 modules needed to locate and mount the "real" root
6803 filesystem).
6804 <note>
6805 See the <filename>meta/recipes-core/images/core-image-minimal-initramfs.bb</filename>
6806 recipe in the
6807 <link linkend='source-directory'>Source Directory</link>
6808 for an example initramfs recipe.
6809 To select this sample recipe as the one built
6810 to provide the initramfs image,
6811 set <filename>INITRAMFS_IMAGE</filename> to
6812 "core-image-minimal-initramfs".
6813 </note>
6814 </para>
6815
6816 <para>
6817 You can also find more information by referencing the
6818 <filename>meta-poky/conf/local.conf.sample.extended</filename>
6819 configuration file in the Source Directory,
6820 the
6821 <link linkend='ref-classes-image'><filename>image</filename></link>
6822 class, and the
6823 <link linkend='ref-classes-kernel'><filename>kernel</filename></link>
6824 class to see how to use the
6825 <filename>INITRAMFS_IMAGE</filename> variable.
6826 </para>
6827
6828 <para>
6829 If <filename>INITRAMFS_IMAGE</filename> is empty, which is
6830 the default, then no initramfs image is built.
6831 </para>
6832
6833 <para>
6834 For more information, you can also see the
6835 <link linkend='var-INITRAMFS_IMAGE_BUNDLE'><filename>INITRAMFS_IMAGE_BUNDLE</filename></link>
6836 variable, which allows the generated image to be bundled
6837 inside the kernel image.
6838 Additionally, for information on creating an initramfs
6839 image, see the
6840 "<ulink url='&YOCTO_DOCS_DEV_URL;#building-an-initramfs-image'>Building an Initial RAM Filesystem (initramfs) Image</ulink>"
6841 section in the Yocto Project Development Tasks Manual.
6842 </para>
6843 </glossdef>
6844 </glossentry>
6845
6846 <glossentry id='var-INITRAMFS_IMAGE_BUNDLE'><glossterm>INITRAMFS_IMAGE_BUNDLE</glossterm>
6847 <info>
6848 INITRAMFS_IMAGE_BUNDLE[doc] = "Controls whether or not the image recipe specified by INITRAMFS_IMAGE is run through an extra pass (do_bundle_initramfs) during kernel compilation in order to build a single binary that contains both the kernel image and the initial RAM filesystem (initramfs)."
6849 </info>
6850 <glossdef>
6851 <para role="glossdeffirst">
6852 Controls whether or not the image recipe specified by
6853 <link linkend='var-INITRAMFS_IMAGE'><filename>INITRAMFS_IMAGE</filename></link>
6854 is run through an extra pass
6855 (<link linkend='ref-tasks-bundle_initramfs'><filename>do_bundle_initramfs</filename></link>)
6856 during kernel compilation in order to build a single binary
6857 that contains both the kernel image and the initial RAM
6858 filesystem (initramfs) image.
6859 This makes use of the
6860 <link linkend='var-CONFIG_INITRAMFS_SOURCE'><filename>CONFIG_INITRAMFS_SOURCE</filename></link>
6861 kernel feature.
6862 <note>
6863 Using an extra compilation pass to bundle the initramfs
6864 avoids a circular dependency between the kernel recipe and
6865 the initramfs recipe should the initramfs include kernel
6866 modules.
6867 Should that be the case, the initramfs recipe depends on
6868 the kernel for the kernel modules, and the kernel depends
6869 on the initramfs recipe since the initramfs is bundled
6870 inside the kernel image.
6871 </note>
6872 </para>
6873
6874 <para>
6875 The combined binary is deposited into the
6876 <filename>tmp/deploy</filename> directory, which is part
6877 of the
6878 <link linkend='build-directory'>Build Directory</link>.
6879 </para>
6880
6881 <para>
6882 Setting the variable to "1" in a configuration file causes the
6883 OpenEmbedded build system to generate a kernel image with the
6884 initramfs specified in <filename>INITRAMFS_IMAGE</filename>
6885 bundled within:
6886 <literallayout class='monospaced'>
6887 INITRAMFS_IMAGE_BUNDLE = "1"
6888 </literallayout>
6889 By default, the
6890 <link linkend='ref-classes-kernel'><filename>kernel</filename></link>
6891 class sets this variable to a null string as follows:
6892 <literallayout class='monospaced'>
6893 INITRAMFS_IMAGE_BUNDLE ?= ""
6894 </literallayout>
6895 <note>
6896 You must set the
6897 <filename>INITRAMFS_IMAGE_BUNDLE</filename> variable in
6898 a configuration file.
6899 You cannot set the variable in a recipe file.
6900 </note>
6901 See the
6902 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta-poky/conf/local.conf.sample.extended'><filename>local.conf.sample.extended</filename></ulink>
6903 file for additional information.
6904 Also, for information on creating an initramfs, see the
6905 "<ulink url='&YOCTO_DOCS_DEV_URL;#building-an-initramfs-image'>Building an Initial RAM Filesystem (initramfs) Image</ulink>"
6906 section in the Yocto Project Development Tasks Manual.
6907 </para>
6908 </glossdef>
6909 </glossentry>
6910
6911 <glossentry id='var-INITRAMFS_LINK_NAME'><glossterm>INITRAMFS_LINK_NAME</glossterm>
6912 <info>
6913 INITRAMFS_LINK_NAME[doc] = "The link name of the initial RAM filesystem image."
6914 </info>
6915 <glossdef>
6916 <para role="glossdeffirst">
6917 The link name of the initial RAM filesystem image.
6918 This variable is set in the
6919 <filename>meta/classes/kernel-artifact-names.bbclass</filename>
6920 file as follows:
6921 <literallayout class='monospaced'>
6922 INITRAMFS_LINK_NAME ?= "initramfs-${KERNEL_ARTIFACT_LINK_NAME}"
6923 </literallayout>
6924 The value of the <filename>KERNEL_ARTIFACT_LINK_NAME</filename>
6925 variable, which is set in the same file, has the following
6926 value:
6927 <literallayout class='monospaced'>
6928 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
6929 </literallayout>
6930 </para>
6931
6932 <para>
6933 See the
6934 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>
6935 variable for additional information.
6936 </para>
6937 </glossdef>
6938 </glossentry>
6939
6940 <glossentry id='var-INITRAMFS_NAME'><glossterm>INITRAMFS_NAME</glossterm>
6941 <info>
6942 INITRAMFS_NAME[doc] = "The base name of the initial RAM filesystem image."
6943 </info>
6944 <glossdef>
6945 <para role="glossdeffirst">
6946 The base name of the initial RAM filesystem image.
6947 This variable is set in the
6948 <filename>meta/classes/kernel-artifact-names.bbclass</filename>
6949 file as follows:
6950 <literallayout class='monospaced'>
6951 INITRAMFS_NAME ?= "initramfs-${KERNEL_ARTIFACT_NAME}"
6952 </literallayout>
6953 The value of the
6954 <link linkend='var-KERNEL_ARTIFACT_NAME'><filename>KERNEL_ARTIFACT_NAME</filename></link>
6955 variable, which is set in the same file, has the following
6956 value:
6957 <literallayout class='monospaced'>
6958 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
6959 </literallayout>
6960 </para>
6961 </glossdef>
6962 </glossentry>
6963
6964 <glossentry id='var-INITRD'><glossterm>INITRD</glossterm>
6965 <info>
6966 INITRD[doc] = "Indicates a list of filesystem images to concatenate and use as an initial RAM disk (initrd)."
6967 </info>
6968 <glossdef>
6969 <para role="glossdeffirst">
6970 Indicates list of filesystem images to concatenate and use
6971 as an initial RAM disk (<filename>initrd</filename>).
6972 </para>
6973
6974 <para>
6975 The <filename>INITRD</filename> variable is an optional
6976 variable used with the
6977 <link linkend='ref-classes-image-live'><filename>image-live</filename></link>
6978 class.
6979 </para>
6980 </glossdef>
6981 </glossentry>
6982
6983 <glossentry id='var-INITRD_IMAGE'><glossterm>INITRD_IMAGE</glossterm>
6984 <info>
6985 INITRD_IMAGE[doc] = "When building a "live" bootable image (i.e. when IMAGE_FSTYPES contains "live"), INITRD_IMAGE specifies the image recipe that should be built to provide the initial RAM disk image."
6986 </info>
6987 <glossdef>
6988 <para role="glossdeffirst">
6989 When building a "live" bootable image (i.e. when
6990 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
6991 contains "live"), <filename>INITRD_IMAGE</filename>
6992 specifies the image recipe that should be built
6993 to provide the initial RAM disk image.
6994 The default value is "core-image-minimal-initramfs".
6995 </para>
6996
6997 <para>
6998 See the
6999 <link linkend='ref-classes-image-live'><filename>image-live</filename></link>
7000 class for more information.
7001 </para>
7002 </glossdef>
7003 </glossentry>
7004
7005 <glossentry id='var-INITSCRIPT_NAME'><glossterm>INITSCRIPT_NAME</glossterm>
7006 <info>
7007 INITSCRIPT_NAME[doc] = "The filename of the initialization script as installed to ${sysconfdir}/init.d."
7008 </info>
7009 <glossdef>
7010 <para role="glossdeffirst">
7011 The filename of the initialization script as installed to
7012 <filename>${sysconfdir}/init.d</filename>.
7013 </para>
7014
7015 <para>
7016 This variable is used in recipes when using <filename>update-rc.d.bbclass</filename>.
7017 The variable is mandatory.
7018 </para>
7019 </glossdef>
7020 </glossentry>
7021
7022 <glossentry id='var-INITSCRIPT_PACKAGES'><glossterm>INITSCRIPT_PACKAGES</glossterm>
7023 <info>
7024 INITSCRIPT_PACKAGES[doc] = "A list of the packages that contain initscripts. This variable is used in recipes when using update-rc.d.bbclass. The variable is optional and defaults to the PN variable."
7025 </info>
7026 <glossdef>
7027 <para role="glossdeffirst">
7028 A list of the packages that contain initscripts.
7029 If multiple packages are specified, you need to append the package name
7030 to the other <filename>INITSCRIPT_*</filename> as an override.
7031 </para>
7032
7033 <para>
7034 This variable is used in recipes when using <filename>update-rc.d.bbclass</filename>.
7035 The variable is optional and defaults to the
7036 <link linkend='var-PN'><filename>PN</filename></link> variable.
7037 </para>
7038 </glossdef>
7039 </glossentry>
7040
7041 <glossentry id='var-INITSCRIPT_PARAMS'><glossterm>INITSCRIPT_PARAMS</glossterm>
7042 <info>
7043 INITSCRIPT_PARAMS[doc] = "Specifies the options to pass to update-rc.d. The variable is mandatory and is used in recipes when using update-rc.d.bbclass."
7044 </info>
7045 <glossdef>
7046 <para role="glossdeffirst">
7047 Specifies the options to pass to <filename>update-rc.d</filename>.
7048 Here is an example:
7049 <literallayout class='monospaced'>
7050 INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ."
7051 </literallayout>
7052 </para>
7053
7054 <para>
7055 In this example, the script has a runlevel of 99,
7056 starts the script in initlevels 2 and 5, and
7057 stops the script in levels 0, 1 and 6.
7058 </para>
7059
7060 <para>
7061 The variable's default value is "defaults", which is
7062 set in the
7063 <link linkend='ref-classes-update-rc.d'><filename>update-rc.d</filename></link>
7064 class.
7065 </para>
7066
7067 <para>
7068 The value in
7069 <filename>INITSCRIPT_PARAMS</filename> is passed through
7070 to the <filename>update-rc.d</filename> command.
7071 For more information on valid parameters, please see the
7072 <filename>update-rc.d</filename> manual page at
7073 <ulink url='http://www.tin.org/bin/man.cgi?section=8&amp;topic=update-rc.d'></ulink>.
7074 </para>
7075 </glossdef>
7076 </glossentry>
7077
7078 <glossentry id='var-INSANE_SKIP'><glossterm>INSANE_SKIP</glossterm>
7079 <info>
7080 INSANE_SKIP[doc] = "Specifies the QA checks to skip for a specific package within a recipe."
7081 </info>
7082 <glossdef>
7083 <para role="glossdeffirst">
7084 Specifies the QA checks to skip for a specific package
7085 within a recipe.
7086 For example, to skip the check for symbolic link
7087 <filename>.so</filename> files in the main package of a
7088 recipe, add the following to the recipe.
7089 The package name override must be used, which in this
7090 example is <filename>${PN}</filename>:
7091 <literallayout class='monospaced'>
7092 INSANE_SKIP_${PN} += "dev-so"
7093 </literallayout>
7094 </para>
7095
7096 <para>
7097 See the "<link linkend='ref-classes-insane'><filename>insane.bbclass</filename></link>"
7098 section for a list of the valid QA checks you can
7099 specify using this variable.
7100 </para>
7101 </glossdef>
7102 </glossentry>
7103
7104 <glossentry id='var-INSTALL_TIMEZONE_FILE'><glossterm>INSTALL_TIMEZONE_FILE</glossterm>
7105 <info>
7106 INSTALL_TIMEZONE_FILE[doc] = "Enables installation of the /etc/timezone file."
7107 </info>
7108 <glossdef>
7109 <para role="glossdeffirst">
7110 By default, the <filename>tzdata</filename> recipe packages
7111 an <filename>/etc/timezone</filename> file.
7112 Set the <filename>INSTALL_TIMEZONE_FILE</filename>
7113 variable to "0" at the configuration level to disable this
7114 behavior.
7115 </para>
7116 </glossdef>
7117 </glossentry>
7118
7119 <glossentry id='var-IPK_FEED_URIS'><glossterm>IPK_FEED_URIS</glossterm>
7120 <info>
7121 IPK_FEED_URIS[doc] = "List of ipkg feed records to put into generated image."
7122 </info>
7123 <glossdef>
7124 <para role="glossdeffirst">
7125 When the IPK backend is in use and package management
7126 is enabled on the target, you can use this variable to
7127 set up <filename>opkg</filename> in the target image
7128 to point to package feeds on a nominated server.
7129 Once the feed is established, you can perform
7130 installations or upgrades using the package manager
7131 at runtime.
7132 </para>
7133 </glossdef>
7134 </glossentry>
7135
7136<!--
7137 <glossentry id='var-INTERCEPT_DIR'><glossterm>INTERCEPT_DIR</glossterm>
7138 <glossdef>
7139 <para>
7140 An environment variable that defines the directory where
7141 post installation hooks are installed for the
7142 post install environment.
7143 This variable is fixed as follows:
7144 <literallayout class='monospaced'>
7145 ${WORKDIR}/intercept_scripts
7146 </literallayout>
7147 </para>
7148
7149 <para>
7150 After installation of a target's root filesystem,
7151 post installation scripts, which are essentially bash scripts,
7152 are all executed just a single time.
7153 Limiting execution of these scripts minimizes installation
7154 time that would be lengthened due to certain packages
7155 triggering redundant operations.
7156 For example, consider the installation of font packages
7157 as a common example.
7158 Without limiting the execution of post installation scripts,
7159 all font directories would be rescanned to create the
7160 cache after each individual font package was installed.
7161 </para>
7162
7163 <para>
7164 Do not edit the <filename>INTERCEPT_DIR</filename>
7165 variable.
7166 </para>
7167 </glossdef>
7168 </glossentry>
7169-->
7170
7171 </glossdiv>
7172
7173<!-- <glossdiv id='var-glossary-j'><title>J</title>-->
7174<!-- </glossdiv>-->
7175
7176 <glossdiv id='var-glossary-k'><title>K</title>
7177
7178 <glossentry id='var-KARCH'><glossterm>KARCH</glossterm>
7179 <info>
7180 KARCH[doc] = "Defines the kernel architecture used when assembling the configuration. You define the KARCH variable in the BSP Descriptions."
7181 </info>
7182 <glossdef>
7183 <para role="glossdeffirst">
7184 Defines the kernel architecture used when assembling
7185 the configuration.
7186 Architectures supported for this release are:
7187 <literallayout class='monospaced'>
7188 powerpc
7189 i386
7190 x86_64
7191 arm
7192 qemu
7193 mips
7194 </literallayout>
7195 </para>
7196
7197 <para>
7198 You define the <filename>KARCH</filename> variable in the
7199 <ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#bsp-descriptions'>BSP Descriptions</ulink>.
7200 </para>
7201 </glossdef>
7202 </glossentry>
7203
7204 <glossentry id='var-KBRANCH'><glossterm>KBRANCH</glossterm>
7205 <info>
7206 KBRANCH[doc] = "A regular expression used by the build process to explicitly identify the kernel branch that is validated, patched, and configured during a build."
7207 </info>
7208 <glossdef>
7209 <para role="glossdeffirst">
7210 A regular expression used by the build process to explicitly
7211 identify the kernel branch that is validated, patched,
7212 and configured during a build.
7213 You must set this variable to ensure the exact kernel
7214 branch you want is being used by the build process.
7215 </para>
7216
7217 <para>
7218 Values for this variable are set in the kernel's recipe
7219 file and the kernel's append file.
7220 For example, if you are using the
7221 <filename>linux-yocto_4.12</filename> kernel, the kernel
7222 recipe file is the
7223 <filename>meta/recipes-kernel/linux/linux-yocto_4.12.bb</filename>
7224 file.
7225 <filename>KBRANCH</filename> is set as follows in that
7226 kernel recipe file:
7227 <literallayout class='monospaced'>
7228 KBRANCH ?= "standard/base"
7229 </literallayout>
7230 </para>
7231
7232 <para>
7233 This variable is also used from the kernel's append file
7234 to identify the kernel branch specific to a particular
7235 machine or target hardware.
7236 Continuing with the previous kernel example, the kernel's
7237 append file (i.e.
7238 <filename>linux-yocto_4.12.bbappend</filename>) is located
7239 in the BSP layer for a given machine.
7240 For example, the append file for the Beaglebone,
7241 EdgeRouter, and generic versions of both 32 and 64-bit IA
7242 machines (<filename>meta-yocto-bsp</filename>) is named
7243 <filename>meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.12.bbappend</filename>.
7244 Here are the related statements from that append file:
7245 <literallayout class='monospaced'>
7246 KBRANCH_genericx86 = "standard/base"
7247 KBRANCH_genericx86-64 = "standard/base"
7248 KBRANCH_edgerouter = "standard/edgerouter"
7249 KBRANCH_beaglebone = "standard/beaglebone"
7250 </literallayout>
7251 The <filename>KBRANCH</filename> statements identify
7252 the kernel branch to use when building for each
7253 supported BSP.
7254 </para>
7255 </glossdef>
7256 </glossentry>
7257
7258 <glossentry id='var-KBUILD_DEFCONFIG'><glossterm>KBUILD_DEFCONFIG</glossterm>
7259 <info>
7260 KBUILD_DEFCONFIG[doc] = "Specifies an "in-tree" kernel configuration file for use during a kernel build."
7261 </info>
7262 <glossdef>
7263 <para role="glossdeffirst">
7264 When used with the
7265 <link linkend='ref-classes-kernel-yocto'><filename>kernel-yocto</filename></link>
7266 class, specifies an "in-tree" kernel configuration file
7267 for use during a kernel build.
7268 </para>
7269
7270 <para>
7271 Typically, when using a <filename>defconfig</filename> to
7272 configure a kernel during a build, you place the
7273 file in your layer in the same manner as you would
7274 place patch files and configuration fragment files (i.e.
7275 "out-of-tree").
7276 However, if you want to use a <filename>defconfig</filename>
7277 file that is part of the kernel tree (i.e. "in-tree"),
7278 you can use the
7279 <filename>KBUILD_DEFCONFIG</filename> variable and append
7280 the
7281 <link linkend='var-KMACHINE'><filename>KMACHINE</filename></link>
7282 variable to point to the <filename>defconfig</filename>
7283 file.
7284 </para>
7285
7286 <para>
7287 To use the variable, set it in the append file for your
7288 kernel recipe using the following form:
7289 <literallayout class='monospaced'>
7290 KBUILD_DEFCONFIG_<replaceable>KMACHINE</replaceable> ?= <replaceable>defconfig_file</replaceable>
7291 </literallayout>
7292 Here is an example from a "raspberrypi2"
7293 <filename>KMACHINE</filename> build that uses a
7294 <filename>defconfig</filename> file named
7295 "bcm2709_defconfig":
7296 <literallayout class='monospaced'>
7297 KBUILD_DEFCONFIG_raspberrypi2 = "bcm2709_defconfig"
7298 </literallayout>
7299 As an alternative, you can use the following within your
7300 append file:
7301 <literallayout class='monospaced'>
7302 KBUILD_DEFCONFIG_pn-linux-yocto ?= <replaceable>defconfig_file</replaceable>
7303 </literallayout>
7304 For more information on how to use the
7305 <filename>KBUILD_DEFCONFIG</filename> variable, see the
7306 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#using-an-in-tree-defconfig-file'>Using an "In-Tree" <filename>defconfig</filename> File</ulink>"
7307 section in the Yocto Project Linux Kernel Development
7308 Manual.
7309 </para>
7310 </glossdef>
7311 </glossentry>
7312
7313 <glossentry id='var-KERNEL_ALT_IMAGETYPE'><glossterm>KERNEL_ALT_IMAGETYPE</glossterm>
7314 <info>
7315 KERNEL_ALT_IMAGETYPE[doc] = "Specifies an alternate kernel image type for creation."
7316 </info>
7317 <glossdef>
7318 <para role="glossdeffirst">
7319 Specifies an alternate kernel image type for creation in
7320 addition to the kernel image type specified using the
7321 <link linkend='var-KERNEL_IMAGETYPE'><filename>KERNEL_IMAGETYPE</filename></link>
7322 variable.
7323 </para>
7324 </glossdef>
7325 </glossentry>
7326
7327 <glossentry id='var-KERNEL_ARTIFACT_NAME'><glossterm>KERNEL_ARTIFACT_NAME</glossterm>
7328 <info>
7329 KERNEL_ARTIFACT_NAME[doc] = "Specifies the name of all of the build artifacts."
7330 </info>
7331 <glossdef>
7332 <para role="glossdeffirst">
7333 Specifies the name of all of the build artifacts.
7334 You can change the name of the artifacts by changing the
7335 <filename>KERNEL_ARTIFACT_NAME</filename> variable.
7336 </para>
7337
7338 <para>
7339 The value of <filename>KERNEL_ARTIFACT_NAME</filename>,
7340 which is set in the
7341 <filename> meta/classes/kernel-artifact-names.bbclass</filename>
7342 file, has the following default value:
7343 <literallayout class='monospaced'>
7344 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
7345 </literallayout>
7346 </para>
7347
7348 <para>
7349 See the
7350 <link linkend='var-PKGE'><filename>PKGE</filename></link>,
7351 <link linkend='var-PKGV'><filename>PKGV</filename></link>,
7352 <link linkend='var-PKGR'><filename>PKGR</filename></link>,
7353 and
7354 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>
7355 variables for additional information.
7356 <note>
7357 The <filename>IMAGE_VERSION_SUFFIX</filename> variable
7358 is set to
7359 <link linkend='var-DATETIME'><filename>DATETIME</filename></link>.
7360 </note>
7361 </para>
7362 </glossdef>
7363 </glossentry>
7364
7365 <glossentry id='var-KERNEL_CLASSES'><glossterm>KERNEL_CLASSES</glossterm>
7366 <info>
7367 KERNEL_CLASSES[doc] = "A list of classes defining kernel image types that kernel class should inherit."
7368 </info>
7369 <glossdef>
7370 <para role="glossdeffirst">
7371 A list of classes defining kernel image types that the
7372 <link linkend='ref-classes-kernel'><filename>kernel</filename></link>
7373 class should inherit.
7374 You typically append this variable to enable extended image
7375 types.
7376 An example is the "kernel-fitimage", which enables
7377 fitImage support and resides in
7378 <filename>meta/classes/kernel-fitimage.bbclass</filename>.
7379 You can register custom kernel image types with the
7380 <filename>kernel</filename> class using this variable.
7381 </para>
7382 </glossdef>
7383 </glossentry>
7384
7385 <glossentry id='var-KERNEL_DEVICETREE'><glossterm>KERNEL_DEVICETREE</glossterm>
7386 <info>
7387 KERNEL_DEVICETREE[doc] = "Specifies the name of the generated Linux kernel device tree (i.e. the .dtb) file."
7388 </info>
7389 <glossdef>
7390 <para role="glossdeffirst">
7391 Specifies the name of the generated Linux kernel device tree
7392 (i.e. the <filename>.dtb</filename>) file.
7393 <note>
7394 Legacy support exists for specifying the full path
7395 to the device tree.
7396 However, providing just the <filename>.dtb</filename>
7397 file is preferred.
7398 </note>
7399 In order to use this variable, the
7400 <link linkend='ref-classes-kernel-devicetree'><filename>kernel-devicetree</filename></link>
7401 class must be inherited.
7402 </para>
7403 </glossdef>
7404 </glossentry>
7405
7406 <glossentry id='var-KERNEL_DTB_LINK_NAME'><glossterm>KERNEL_DTB_LINK_NAME</glossterm>
7407 <info>
7408 KERNEL_DTB_LINK_NAME[doc] = "The link name of the kernel device tree binary (DTB)."
7409 </info>
7410 <glossdef>
7411 <para role="glossdeffirst">
7412 The link name of the kernel device tree binary (DTB).
7413 This variable is set in the
7414 <filename>meta/classes/kernel-artifact-names.bbclass</filename>
7415 file as follows:
7416 <literallayout class='monospaced'>
7417 KERNEL_DTB_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
7418 </literallayout>
7419 The value of the <filename>KERNEL_ARTIFACT_LINK_NAME</filename>
7420 variable, which is set in the same file, has the following
7421 value:
7422 <literallayout class='monospaced'>
7423 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
7424 </literallayout>
7425 </para>
7426
7427 <para>
7428 See the
7429 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>
7430 variable for additional information.
7431 </para>
7432 </glossdef>
7433 </glossentry>
7434
7435 <glossentry id='var-KERNEL_DTB_NAME'><glossterm>KERNEL_DTB_NAME</glossterm>
7436 <info>
7437 KERNEL_DTB_NAME[doc] = "The base name of the kernel device tree binary (DTB)."
7438 </info>
7439 <glossdef>
7440 <para role="glossdeffirst">
7441 The base name of the kernel device tree binary (DTB).
7442 This variable is set in the
7443 <filename>meta/classes/kernel-artifact-names.bbclass</filename>
7444 file as follows:
7445 <literallayout class='monospaced'>
7446 KERNEL_DTB_NAME ?= "${KERNEL_ARTIFACT_NAME}"
7447 </literallayout>
7448 The value of the
7449 <link linkend='var-KERNEL_ARTIFACT_NAME'><filename>KERNEL_ARTIFACT_NAME</filename></link>
7450 variable, which is set in the same file, has the following
7451 value:
7452 <literallayout class='monospaced'>
7453 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
7454 </literallayout>
7455 </para>
7456 </glossdef>
7457 </glossentry>
7458
7459 <glossentry id='var-KERNEL_EXTRA_ARGS'><glossterm>KERNEL_EXTRA_ARGS</glossterm>
7460 <info>
7461 KERNEL_EXTRA_ARGS[doc] = "Specifies additional make command-line arguments the OpenEmbedded build system passes on when compiling the kernel."
7462 </info>
7463 <glossdef>
7464 <para role="glossdeffirst">
7465 Specifies additional <filename>make</filename>
7466 command-line arguments the OpenEmbedded build system
7467 passes on when compiling the kernel.
7468 </para>
7469 </glossdef>
7470 </glossentry>
7471
7472 <glossentry id='var-KERNEL_FEATURES'><glossterm>KERNEL_FEATURES</glossterm>
7473 <info>
7474 KERNEL_FEATURES[doc] = "Includes additional kernel metadata. The metadata you add through this variable includes config fragments and features descriptions."
7475 </info>
7476 <glossdef>
7477 <para role="glossdeffirst">
7478 Includes additional kernel metadata.
7479 In the OpenEmbedded build system, the default Board Support
7480 Packages (BSPs)
7481 <link linkend='metadata'>Metadata</link>
7482 is provided through
7483 the <link linkend='var-KMACHINE'><filename>KMACHINE</filename></link>
7484 and
7485 <link linkend='var-KBRANCH'><filename>KBRANCH</filename></link>
7486 variables.
7487 You can use the <filename>KERNEL_FEATURES</filename>
7488 variable from within the kernel recipe or kernel append
7489 file to further add metadata for all BSPs or specific
7490 BSPs.
7491 </para>
7492
7493 <para>
7494 The metadata you add through this variable includes config
7495 fragments and features descriptions,
7496 which usually includes patches as well as config fragments.
7497 You typically override the
7498 <filename>KERNEL_FEATURES</filename> variable for a
7499 specific machine.
7500 In this way, you can provide validated, but optional,
7501 sets of kernel configurations and features.
7502 </para>
7503
7504 <para>
7505 For example, the following example from the
7506 <filename>linux-yocto-rt_4.12</filename> kernel recipe
7507 adds "netfilter" and "taskstats" features to all BSPs
7508 as well as "virtio" configurations to all QEMU machines.
7509 The last two statements add specific configurations to
7510 targeted machine types:
7511 <literallayout class='monospaced'>
7512 KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
7513 KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
7514 KERNEL_FEATURES_append_qemuall = " cfg/virtio.scc"
7515 KERNEL_FEATURES_append_qemux86 = " cfg/sound.scc cfg/paravirt_kvm.scc"
7516 KERNEL_FEATURES_append_qemux86-64 = " cfg/sound.scc" </literallayout></para>
7517 </glossdef>
7518 </glossentry>
7519
7520 <glossentry id='var-KERNEL_FIT_LINK_NAME'><glossterm>KERNEL_FIT_LINK_NAME</glossterm>
7521 <info>
7522 KERNEL_FIT_LINK_NAME[doc] = "The link name of the kernel flattened image tree (FIT) image."
7523 </info>
7524 <glossdef>
7525 <para role="glossdeffirst">
7526 The link name of the kernel flattened image tree (FIT) image.
7527 This variable is set in the
7528 <filename>meta/classes/kernel-artifact-names.bbclass</filename>
7529 file as follows:
7530 <literallayout class='monospaced'>
7531 KERNEL_FIT_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
7532 </literallayout>
7533 The value of the <filename>KERNEL_ARTIFACT_LINK_NAME</filename>
7534 variable, which is set in the same file, has the following
7535 value:
7536 <literallayout class='monospaced'>
7537 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
7538 </literallayout>
7539 </para>
7540
7541 <para>
7542 See the
7543 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>
7544 variable for additional information.
7545 </para>
7546 </glossdef>
7547 </glossentry>
7548
7549 <glossentry id='var-KERNEL_FIT_NAME'><glossterm>KERNEL_FIT_NAME</glossterm>
7550 <info>
7551 KERNEL_FIT_NAME[doc] = "The base name of the kernel flattened image tree (FIT) image."
7552 </info>
7553 <glossdef>
7554 <para role="glossdeffirst">
7555 The base name of the kernel flattened image tree (FIT) image.
7556 This variable is set in the
7557 <filename>meta/classes/kernel-artifact-names.bbclass</filename>
7558 file as follows:
7559 <literallayout class='monospaced'>
7560 KERNEL_FIT_NAME ?= "${KERNEL_ARTIFACT_NAME}"
7561 </literallayout>
7562 The value of the
7563 <link linkend='var-KERNEL_ARTIFACT_NAME'><filename>KERNEL_ARTIFACT_NAME</filename></link>
7564 variable, which is set in the same file, has the following
7565 value:
7566 <literallayout class='monospaced'>
7567 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
7568 </literallayout>
7569 </para>
7570 </glossdef>
7571 </glossentry>
7572
7573 <glossentry id='var-KERNEL_IMAGE_LINK_NAME'><glossterm>KERNEL_IMAGE_LINK_NAME</glossterm>
7574 <info>
7575 KERNEL_IMAGE_LINK_NAME[doc] = "The link name for the kernel image."
7576 </info>
7577 <glossdef>
7578 <para role="glossdeffirst">
7579 The link name for the kernel image.
7580 This variable is set in the
7581 <filename>meta/classes/kernel-artifact-names.bbclass</filename>
7582 file as follows:
7583 <literallayout class='monospaced'>
7584 KERNEL_IMAGE_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
7585 </literallayout>
7586 The value of the <filename>KERNEL_ARTIFACT_LINK_NAME</filename>
7587 variable, which is set in the same file, has the following
7588 value:
7589 <literallayout class='monospaced'>
7590 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
7591 </literallayout>
7592 </para>
7593
7594 <para>
7595 See the
7596 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>
7597 variable for additional information.
7598 </para>
7599 </glossdef>
7600 </glossentry>
7601
7602 <glossentry id='var-KERNEL_IMAGE_MAXSIZE'><glossterm>KERNEL_IMAGE_MAXSIZE</glossterm>
7603 <info>
7604 KERNEL_IMAGE_MAXSIZE[doc] = "The maximum allowable size in kilobytes of the kernel image file."
7605 </info>
7606 <glossdef>
7607 <para role="glossdeffirst">
7608 Specifies the maximum size of the kernel image file in
7609 kilobytes.
7610 If <filename>KERNEL_IMAGE_MAXSIZE</filename> is set,
7611 the size of the kernel image file is checked against
7612 the set value during the
7613 <link linkend='ref-tasks-sizecheck'><filename>do_sizecheck</filename></link>
7614 task.
7615 The task fails if the kernel image file is larger than
7616 the setting.
7617 </para>
7618
7619 <para>
7620 <filename>KERNEL_IMAGE_MAXSIZE</filename> is useful for
7621 target devices that have a limited amount of space in
7622 which the kernel image must be stored.
7623 </para>
7624
7625 <para>
7626 By default, this variable is not set, which means the
7627 size of the kernel image is not checked.
7628 </para>
7629 </glossdef>
7630 </glossentry>
7631
7632 <glossentry id='var-KERNEL_IMAGE_NAME'><glossterm>KERNEL_IMAGE_NAME</glossterm>
7633 <info>
7634 KERNEL_IMAGE_NAME[doc] = "The base name of the kernel image."
7635 </info>
7636 <glossdef>
7637 <para role="glossdeffirst">
7638 The base name of the kernel image.
7639 This variable is set in the
7640 <filename>meta/classes/kernel-artifact-names.bbclass</filename>
7641 file as follows:
7642 <literallayout class='monospaced'>
7643 KERNEL_IMAGE_NAME ?= "${KERNEL_ARTIFACT_NAME}"
7644 </literallayout>
7645 The value of the
7646 <link linkend='var-KERNEL_ARTIFACT_NAME'><filename>KERNEL_ARTIFACT_NAME</filename></link>
7647 variable, which is set in the same file, has the following
7648 value:
7649 <literallayout class='monospaced'>
7650 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
7651 </literallayout>
7652 </para>
7653 </glossdef>
7654 </glossentry>
7655
7656 <glossentry id='var-KERNEL_IMAGETYPE'><glossterm>KERNEL_IMAGETYPE</glossterm>
7657 <info>
7658 KERNEL_IMAGETYPE[doc] = "The type of kernel to build for a device, usually set by the machine configuration files and defaults to 'zImage'."
7659 </info>
7660 <glossdef>
7661 <para role="glossdeffirst">
7662 The type of kernel to build for a device, usually set by the
7663 machine configuration files and defaults to "zImage".
7664 This variable is used
7665 when building the kernel and is passed to <filename>make</filename> as the target to
7666 build.
7667 </para>
7668
7669 <para>
7670 If you want to build an alternate kernel image type, use the
7671 <link linkend='var-KERNEL_ALT_IMAGETYPE'><filename>KERNEL_ALT_IMAGETYPE</filename></link>
7672 variable.
7673 </para>
7674 </glossdef>
7675 </glossentry>
7676
7677 <glossentry id='var-KERNEL_MODULE_AUTOLOAD'><glossterm>KERNEL_MODULE_AUTOLOAD</glossterm>
7678 <info>
7679 KERNEL_MODULE_AUTOLOAD[doc] = "Lists kernel modules that need to be auto-loaded during boot"
7680 </info>
7681 <glossdef>
7682 <para role="glossdeffirst">
7683 Lists kernel modules that need to be auto-loaded during
7684 boot.
7685 <note>
7686 This variable replaces the deprecated
7687 <link linkend='var-module_autoload'><filename>module_autoload</filename></link>
7688 variable.
7689 </note>
7690 </para>
7691
7692 <para>
7693 You can use the <filename>KERNEL_MODULE_AUTOLOAD</filename>
7694 variable anywhere that it can be
7695 recognized by the kernel recipe or by an out-of-tree kernel
7696 module recipe (e.g. a machine configuration file, a
7697 distribution configuration file, an append file for the
7698 recipe, or the recipe itself).
7699 </para>
7700
7701 <para>
7702 Specify it as follows:
7703 <literallayout class='monospaced'>
7704 KERNEL_MODULE_AUTOLOAD += "<replaceable>module_name1</replaceable> <replaceable>module_name2</replaceable> <replaceable>module_name3</replaceable>"
7705 </literallayout>
7706 </para>
7707
7708 <para>
7709 Including <filename>KERNEL_MODULE_AUTOLOAD</filename> causes
7710 the OpenEmbedded build system to populate the
7711 <filename>/etc/modules-load.d/modname.conf</filename>
7712 file with the list of modules to be auto-loaded on boot.
7713 The modules appear one-per-line in the file.
7714 Here is an example of the most common use case:
7715 <literallayout class='monospaced'>
7716 KERNEL_MODULE_AUTOLOAD += "<replaceable>module_name</replaceable>"
7717 </literallayout>
7718 </para>
7719
7720 <para>
7721 For information on how to populate the
7722 <filename>modname.conf</filename> file with
7723 <filename>modprobe.d</filename> syntax lines, see the
7724 <link linkend='var-KERNEL_MODULE_PROBECONF'><filename>KERNEL_MODULE_PROBECONF</filename></link>
7725 variable.
7726 </para>
7727 </glossdef>
7728 </glossentry>
7729
7730 <glossentry id='var-KERNEL_MODULE_PROBECONF'><glossterm>KERNEL_MODULE_PROBECONF</glossterm>
7731 <info>
7732 KERNEL_MODULE_PROBECONF[doc] = "Lists kernel modules for which the build system expects to find module_conf_* values that specify configuration for each of the modules."
7733 </info>
7734 <glossdef>
7735 <para role="glossdeffirst">
7736 Provides a list of modules for which the OpenEmbedded
7737 build system expects to find
7738 <filename>module_conf_</filename><replaceable>modname</replaceable>
7739 values that specify configuration for each of the modules.
7740 For information on how to provide those module
7741 configurations, see the
7742 <link linkend='var-module_conf'><filename>module_conf_*</filename></link>
7743 variable.
7744 </para>
7745 </glossdef>
7746 </glossentry>
7747
7748 <glossentry id='var-KERNEL_PATH'><glossterm>KERNEL_PATH</glossterm>
7749 <info>
7750 KERNEL_PATH[doc] = "The location of the kernel sources. This variable is set to the value of the STAGING_KERNEL_DIR within the module class (module.bbclass)."
7751 </info>
7752 <glossdef>
7753 <para role="glossdeffirst">
7754 The location of the kernel sources.
7755 This variable is set to the value of the
7756 <link linkend='var-STAGING_KERNEL_DIR'><filename>STAGING_KERNEL_DIR</filename></link>
7757 within the
7758 <link linkend='ref-classes-module'><filename>module</filename></link>
7759 class.
7760 For information on how this variable is used, see the
7761 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#incorporating-out-of-tree-modules'>Incorporating Out-of-Tree Modules</ulink>"
7762 section in the Yocto Project Linux Kernel Development
7763 Manual.
7764 </para>
7765
7766 <para>
7767 To help maximize compatibility with out-of-tree drivers
7768 used to build modules, the OpenEmbedded build system also
7769 recognizes and uses the
7770 <link linkend='var-KERNEL_SRC'><filename>KERNEL_SRC</filename></link>
7771 variable, which is identical to the
7772 <filename>KERNEL_PATH</filename> variable.
7773 Both variables are common variables used by external
7774 Makefiles to point to the kernel source directory.
7775 </para>
7776 </glossdef>
7777 </glossentry>
7778
7779 <glossentry id='var-KERNEL_SRC'><glossterm>KERNEL_SRC</glossterm>
7780 <info>
7781 KERNEL_SRC[doc] = "The location of the kernel sources. This variable is set to the value of the STAGING_KERNEL_DIR within the module class (module.bbclass)."
7782 </info>
7783 <glossdef>
7784 <para role="glossdeffirst">
7785 The location of the kernel sources.
7786 This variable is set to the value of the
7787 <link linkend='var-STAGING_KERNEL_DIR'><filename>STAGING_KERNEL_DIR</filename></link>
7788 within the
7789 <link linkend='ref-classes-module'><filename>module</filename></link>
7790 class.
7791 For information on how this variable is used, see the
7792 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#incorporating-out-of-tree-modules'>Incorporating Out-of-Tree Modules</ulink>"
7793 section in the Yocto Project Linux Kernel Development
7794 Manual.
7795 </para>
7796
7797 <para>
7798 To help maximize compatibility with out-of-tree drivers
7799 used to build modules, the OpenEmbedded build system also
7800 recognizes and uses the
7801 <link linkend='var-KERNEL_PATH'><filename>KERNEL_PATH</filename></link>
7802 variable, which is identical to the
7803 <filename>KERNEL_SRC</filename> variable.
7804 Both variables are common variables used by external
7805 Makefiles to point to the kernel source directory.
7806 </para>
7807 </glossdef>
7808 </glossentry>
7809
7810 <glossentry id='var-KERNEL_VERSION'><glossterm>KERNEL_VERSION</glossterm>
7811 <info>
7812 KERNEL_VERSION[doc] = "Specifies the version of the kernel as extracted from version.h or utsrelease.h within the kernel sources."
7813 </info>
7814 <glossdef>
7815 <para role="glossdeffirst">
7816 Specifies the version of the kernel as extracted from
7817 <filename>version.h</filename> or
7818 <filename>utsrelease.h</filename> within the kernel sources.
7819 Effects of setting this variable do not take affect until
7820 the kernel has been configured.
7821 Consequently, attempting to refer to this variable in
7822 contexts prior to configuration will not work.
7823 </para>
7824 </glossdef>
7825 </glossentry>
7826
7827 <glossentry id='var-KERNELDEPMODDEPEND'><glossterm>KERNELDEPMODDEPEND</glossterm>
7828 <info>
7829 KERNELDEPMODDEPEND[doc] = "Specifies whether or not to use the data referenced through the PKGDATA_DIR directory."
7830 </info>
7831 <glossdef>
7832 <para role="glossdeffirst">
7833 Specifies whether the data referenced through
7834 <link linkend='var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></link>
7835 is needed or not.
7836 The <filename>KERNELDEPMODDEPEND</filename> does not
7837 control whether or not that data exists,
7838 but simply whether or not it is used.
7839 If you do not need to use the data, set the
7840 <filename>KERNELDEPMODDEPEND</filename> variable in your
7841 <filename>initramfs</filename> recipe.
7842 Setting the variable there when the data is not needed
7843 avoids a potential dependency loop.
7844 </para>
7845 </glossdef>
7846 </glossentry>
7847
7848 <glossentry id='var-KFEATURE_DESCRIPTION'><glossterm>KFEATURE_DESCRIPTION</glossterm>
7849 <info>
7850 KFEATURE_DESCRIPTION[doc] = "Provides a short description of a configuration fragment. You use this variable in the .scc file that describes a configuration fragment file."
7851 </info>
7852 <glossdef>
7853 <para role="glossdeffirst">
7854 Provides a short description of a configuration fragment.
7855 You use this variable in the <filename>.scc</filename>
7856 file that describes a configuration fragment file.
7857 Here is the variable used in a file named
7858 <filename>smp.scc</filename> to describe SMP being
7859 enabled:
7860 <literallayout class='monospaced'>
7861 define KFEATURE_DESCRIPTION "Enable SMP"
7862 </literallayout>
7863 </para>
7864 </glossdef>
7865 </glossentry>
7866
7867 <glossentry id='var-KMACHINE'><glossterm>KMACHINE</glossterm>
7868 <info>
7869 KMACHINE[doc] = "The machine as known by the kernel."
7870 </info>
7871 <glossdef>
7872 <para role="glossdeffirst">
7873 The machine as known by the kernel.
7874 Sometimes the machine name used by the kernel does not
7875 match the machine name used by the OpenEmbedded build
7876 system.
7877 For example, the machine name that the OpenEmbedded build
7878 system understands as
7879 <filename>core2-32-intel-common</filename> goes by a
7880 different name in the Linux Yocto kernel.
7881 The kernel understands that machine as
7882 <filename>intel-core2-32</filename>.
7883 For cases like these, the <filename>KMACHINE</filename>
7884 variable maps the kernel machine name to the OpenEmbedded
7885 build system machine name.
7886 </para>
7887
7888 <para>
7889 These mappings between different names occur in the
7890 Yocto Linux Kernel's <filename>meta</filename> branch.
7891 As an example take a look in the
7892 <filename>common/recipes-kernel/linux/linux-yocto_3.19.bbappend</filename>
7893 file:
7894 <literallayout class='monospaced'>
7895 LINUX_VERSION_core2-32-intel-common = "3.19.0"
7896 COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}"
7897 SRCREV_meta_core2-32-intel-common = "8897ef68b30e7426bc1d39895e71fb155d694974"
7898 SRCREV_machine_core2-32-intel-common = "43b9eced9ba8a57add36af07736344dcc383f711"
7899 KMACHINE_core2-32-intel-common = "intel-core2-32"
7900 KBRANCH_core2-32-intel-common = "standard/base"
7901 KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}"
7902 </literallayout>
7903 The <filename>KMACHINE</filename> statement says that
7904 the kernel understands the machine name as
7905 "intel-core2-32".
7906 However, the OpenEmbedded build system understands the
7907 machine as "core2-32-intel-common".
7908 </para>
7909
7910 </glossdef>
7911 </glossentry>
7912
7913 <glossentry id='var-KTYPE'><glossterm>KTYPE</glossterm>
7914 <info>
7915 KTYPE[doc] = "Defines the kernel type to be used in assembling the configuration."
7916 </info>
7917 <glossdef>
7918 <para role="glossdeffirst">
7919 Defines the kernel type to be used in assembling the
7920 configuration.
7921 The linux-yocto recipes define "standard", "tiny",
7922 and "preempt-rt" kernel types.
7923 See the
7924 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#kernel-types'>Kernel Types</ulink>"
7925 section in the Yocto Project Linux Kernel Development
7926 Manual for more information on kernel types.
7927 </para>
7928
7929 <para>
7930 You define the <filename>KTYPE</filename> variable in the
7931 <ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#bsp-descriptions'>BSP Descriptions</ulink>.
7932 The value you use must match the value used for the
7933 <link linkend='var-LINUX_KERNEL_TYPE'><filename>LINUX_KERNEL_TYPE</filename></link>
7934 value used by the kernel recipe.
7935 </para>
7936 </glossdef>
7937 </glossentry>
7938 </glossdiv>
7939
7940 <glossdiv id='var-glossary-l'><title>L</title>
7941
7942 <glossentry id='var-LABELS'><glossterm>LABELS</glossterm>
7943 <info>
7944 LABELS[doc] = "Provides a list of targets for automatic configuration."
7945 </info>
7946 <glossdef>
7947 <para role="glossdeffirst">
7948 Provides a list of targets for automatic configuration.
7949 </para>
7950
7951 <para>
7952 See the
7953 <link linkend='ref-classes-grub-efi'><filename>grub-efi</filename></link>
7954 class for more information on how this variable is used.
7955 </para>
7956 </glossdef>
7957 </glossentry>
7958
7959 <glossentry id='var-LAYERDEPENDS'><glossterm>LAYERDEPENDS</glossterm>
7960 <info>
7961 LAYERDEPENDS[doc] = "Lists the layers, separated by spaces, on which this recipe depends. This variable is used in the conf/layer.conf file and must be suffixed with the name of the specific layer."
7962 </info>
7963 <glossdef>
7964 <para role="glossdeffirst">
7965 Lists the layers, separated by spaces, on which this
7966 recipe depends.
7967 Optionally, you can specify a specific layer version for a
7968 dependency by adding it to the end of the layer name.
7969 Here is an example:
7970 <literallayout class='monospaced'>
7971 LAYERDEPENDS_mylayer = "anotherlayer (=3)"
7972 </literallayout>
7973 In this previous example, version 3 of "anotherlayer"
7974 is compared against
7975 <link linkend='var-LAYERVERSION'><filename>LAYERVERSION</filename></link><filename>_anotherlayer</filename>.
7976 </para>
7977
7978 <para>
7979 An error is produced if any dependency is missing or
7980 the version numbers (if specified) do not match exactly.
7981 This variable is used in the
7982 <filename>conf/layer.conf</filename> file and must be
7983 suffixed with the name of the specific layer (e.g.
7984 <filename>LAYERDEPENDS_mylayer</filename>).
7985 </para>
7986 </glossdef>
7987 </glossentry>
7988
7989 <glossentry id='var-LAYERDIR'><glossterm>LAYERDIR</glossterm>
7990 <info>
7991 LAYERDIR[doc] = "When used inside the layer.conf configuration file, this variable provides the path of the current layer."
7992 </info>
7993 <glossdef>
7994 <para role="glossdeffirst">
7995 When used inside the <filename>layer.conf</filename> configuration
7996 file, this variable provides the path of the current layer.
7997 This variable is not available outside of <filename>layer.conf</filename>
7998 and references are expanded immediately when parsing of the file completes.
7999 </para>
8000 </glossdef>
8001 </glossentry>
8002
8003 <glossentry id='var-LAYERRECOMMENDS'><glossterm>LAYERRECOMMENDS</glossterm>
8004 <info>
8005 LAYERRECOMMENDS[doc] = "Lists the layers, separated by spaces, recommended for use with this layer."
8006 </info>
8007 <glossdef>
8008 <para role="glossdeffirst">
8009 Lists the layers, separated by spaces, recommended for
8010 use with this layer.
8011 </para>
8012
8013 <para>
8014 Optionally, you can specify a specific layer version for a
8015 recommendation by adding the version to the end of the
8016 layer name.
8017 Here is an example:
8018 <literallayout class='monospaced'>
8019 LAYERRECOMMENDS_mylayer = "anotherlayer (=3)"
8020 </literallayout>
8021 In this previous example, version 3 of "anotherlayer" is
8022 compared against
8023 <filename>LAYERVERSION_anotherlayer</filename>.
8024 </para>
8025
8026 <para>
8027 This variable is used in the
8028 <filename>conf/layer.conf</filename> file and must be
8029 suffixed with the name of the specific layer (e.g.
8030 <filename>LAYERRECOMMENDS_mylayer</filename>).
8031 </para>
8032 </glossdef>
8033 </glossentry>
8034
8035 <glossentry id='var-LAYERSERIES_COMPAT'><glossterm>LAYERSERIES_COMPAT</glossterm>
8036 <info>
8037 LAYERSERIES_COMPAT[doc] = "Lists the OpenEmbedded-Core versions for which a layer is compatible."
8038 </info>
8039 <glossdef>
8040 <para role="glossdeffirst">
8041 Lists the versions of the
8042 <link linkend='oe-core'>OpenEmbedded-Core</link> for which
8043 a layer is compatible.
8044 Using the <filename>LAYERSERIES_COMPAT</filename> variable
8045 allows the layer maintainer to indicate which combinations
8046 of the layer and OE-Core can be expected to work.
8047 The variable gives the system a way to detect when a layer
8048 has not been tested with new releases of OE-Core (e.g.
8049 the layer is not maintained).
8050 </para>
8051
8052 <para>
8053 To specify the OE-Core versions for which a layer is
8054 compatible, use this variable in your layer's
8055 <filename>conf/layer.conf</filename> configuration file.
8056 For the list, use the Yocto Project
8057 <ulink url='https://wiki.yoctoproject.org/wiki/Releases'>Release Name</ulink>
8058 (e.g. &DISTRO_NAME_NO_CAP;).
8059 To specify multiple OE-Core versions for the layer,
8060 use a space-separated list:
8061 <literallayout class='monospaced'>
8062 LAYERSERIES_COMPAT_<replaceable>layer_root_name</replaceable> = "&DISTRO_NAME_NO_CAP; &DISTRO_NAME_NO_CAP_MINUS_ONE;"
8063 </literallayout>
8064 <note>
8065 Setting <filename>LAYERSERIES_COMPAT</filename> is
8066 required by the Yocto Project Compatible version 2
8067 standard.
8068 The OpenEmbedded build system produces a warning if
8069 the variable is not set for any given layer.
8070 </note>
8071 </para>
8072
8073 <para>
8074 See the
8075 "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-your-own-layer'>Creating Your Own Layer</ulink>"
8076 section in the Yocto Project Development Tasks Manual.
8077 </para>
8078 </glossdef>
8079 </glossentry>
8080
8081 <glossentry id='var-LAYERVERSION'><glossterm>LAYERVERSION</glossterm>
8082 <info>
8083 LAYERVERSION[doc] = "Optionally specifies the version of a layer as a single number. This variable is used in the conf/layer.conf file and must be suffixed with the name of the specific layer."
8084 </info>
8085 <glossdef>
8086 <para role="glossdeffirst">
8087 Optionally specifies the version of a layer as a single number.
8088 You can use this within
8089 <link linkend='var-LAYERDEPENDS'><filename>LAYERDEPENDS</filename></link>
8090 for another layer in order to depend on a specific version
8091 of the layer.
8092 This variable is used in the <filename>conf/layer.conf</filename> file
8093 and must be suffixed with the name of the specific layer (e.g.
8094 <filename>LAYERVERSION_mylayer</filename>).
8095 </para>
8096 </glossdef>
8097 </glossentry>
8098
8099 <glossentry id='var-LD'><glossterm>LD</glossterm>
8100 <info>
8101 LD[doc] = "Minimal command and arguments to run the linker."
8102 </info>
8103 <glossdef>
8104 <para role="glossdeffirst">
8105 The minimal command and arguments used to run the
8106 linker.
8107 </para>
8108 </glossdef>
8109 </glossentry>
8110
8111 <glossentry id='var-LDFLAGS'><glossterm>LDFLAGS</glossterm>
8112 <info>
8113 LDFLAGS[doc] = "Specifies the flags to pass to the linker."
8114 </info>
8115 <glossdef>
8116 <para role="glossdeffirst">
8117 Specifies the flags to pass to the linker.
8118 This variable is exported to an environment
8119 variable and thus made visible to the software being
8120 built during the compilation step.
8121 </para>
8122
8123 <para>
8124 Default initialization for <filename>LDFLAGS</filename>
8125 varies depending on what is being built:
8126 <itemizedlist>
8127 <listitem><para>
8128 <link linkend='var-TARGET_LDFLAGS'><filename>TARGET_LDFLAGS</filename></link>
8129 when building for the target
8130 </para></listitem>
8131 <listitem><para>
8132 <link linkend='var-BUILD_LDFLAGS'><filename>BUILD_LDFLAGS</filename></link>
8133 when building for the build host (i.e.
8134 <filename>-native</filename>)
8135 </para></listitem>
8136 <listitem><para>
8137 <link linkend='var-BUILDSDK_LDFLAGS'><filename>BUILDSDK_LDFLAGS</filename></link>
8138 when building for an SDK (i.e.
8139 <filename>nativesdk-</filename>)
8140 </para></listitem>
8141 </itemizedlist>
8142 </para>
8143 </glossdef>
8144 </glossentry>
8145
8146 <glossentry id='var-LEAD_SONAME'><glossterm>LEAD_SONAME</glossterm>
8147 <info>
8148 LEAD_SONAME[doc] = "Specifies the lead (or primary) compiled library file (i.e. .so) that the debian class applies its naming policy to given a recipe that packages multiple libraries."
8149 </info>
8150 <glossdef>
8151 <para role="glossdeffirst">
8152 Specifies the lead (or primary) compiled library file
8153 (i.e. <filename>.so</filename>) that the
8154 <link linkend='ref-classes-debian'><filename>debian</filename></link>
8155 class applies its naming policy to given a recipe that
8156 packages multiple libraries.
8157 </para>
8158
8159 <para>
8160 This variable works in conjunction with the
8161 <filename>debian</filename> class.
8162 </para>
8163 </glossdef>
8164 </glossentry>
8165
8166 <glossentry id='var-LIC_FILES_CHKSUM'><glossterm>LIC_FILES_CHKSUM</glossterm>
8167 <info>
8168 LIC_FILES_CHKSUM[doc] = "Checksums of the license text in the recipe source code."
8169 </info>
8170 <glossdef>
8171 <para role="glossdeffirst">
8172 Checksums of the license text in the recipe source code.
8173 </para>
8174
8175 <para>
8176 This variable tracks changes in license text of the source
8177 code files.
8178 If the license text is changed, it will trigger a build
8179 failure, which gives the developer an opportunity to review any
8180 license change.
8181 </para>
8182
8183 <para>
8184 This variable must be defined for all recipes (unless
8185 <link linkend='var-LICENSE'><filename>LICENSE</filename></link>
8186 is set to "CLOSED").</para>
8187 <para>For more information, see the
8188 "<ulink url='&YOCTO_DOCS_DEV_URL;#usingpoky-configuring-LIC_FILES_CHKSUM'>Tracking License Changes</ulink>"
8189 section in the Yocto Project Development Tasks Manual.
8190 </para>
8191 </glossdef>
8192 </glossentry>
8193
8194 <glossentry id='var-LICENSE'><glossterm>LICENSE</glossterm>
8195 <info>
8196 LICENSE[doc] = "The list of source licenses for the recipe. The logical operators &amp;, '|', and parentheses can be used."
8197 </info>
8198 <glossdef>
8199 <para role="glossdeffirst">
8200 The list of source licenses for the recipe.
8201 Follow these rules:
8202 <itemizedlist>
8203 <listitem><para>Do not use spaces within individual
8204 license names.</para></listitem>
8205 <listitem><para>Separate license names using
8206 | (pipe) when there is a choice between licenses.
8207 </para></listitem>
8208 <listitem><para>Separate license names using
8209 &amp; (ampersand) when multiple licenses exist
8210 that cover different parts of the source.
8211 </para></listitem>
8212 <listitem><para>You can use spaces between license
8213 names.</para></listitem>
8214 <listitem><para>For standard licenses, use the names
8215 of the files in
8216 <filename>meta/files/common-licenses/</filename>
8217 or the
8218 <link linkend='var-SPDXLICENSEMAP'><filename>SPDXLICENSEMAP</filename></link>
8219 flag names defined in
8220 <filename>meta/conf/licenses.conf</filename>.
8221 </para></listitem>
8222 </itemizedlist>
8223 </para>
8224
8225 <para>
8226 Here are some examples:
8227 <literallayout class='monospaced'>
8228 LICENSE = "LGPLv2.1 | GPLv3"
8229 LICENSE = "MPL-1 &amp; LGPLv2.1"
8230 LICENSE = "GPLv2+"
8231 </literallayout>
8232 The first example is from the recipes for Qt, which the user
8233 may choose to distribute under either the LGPL version
8234 2.1 or GPL version 3.
8235 The second example is from Cairo where two licenses cover
8236 different parts of the source code.
8237 The final example is from <filename>sysstat</filename>,
8238 which presents a single license.
8239 </para>
8240
8241 <para>
8242 You can also specify licenses on a per-package basis to
8243 handle situations where components of the output have
8244 different licenses.
8245 For example, a piece of software whose code is
8246 licensed under GPLv2 but has accompanying documentation
8247 licensed under the GNU Free Documentation License 1.2 could
8248 be specified as follows:
8249 <literallayout class='monospaced'>
8250 LICENSE = "GFDL-1.2 &amp; GPLv2"
8251 LICENSE_${PN} = "GPLv2"
8252 LICENSE_${PN}-doc = "GFDL-1.2"
8253 </literallayout>
8254 </para>
8255 </glossdef>
8256 </glossentry>
8257
8258 <glossentry id='var-LICENSE_CREATE_PACKAGE'><glossterm>LICENSE_CREATE_PACKAGE</glossterm>
8259 <info>
8260 LICENSE_CREATE_PACKAGE[doc] = "Creates an extra package (i.e. ${PN}-lic) for each recipe and adds that package to the RRECOMMENDS+${PN}."
8261 </info>
8262 <glossdef>
8263 <para role="glossdeffirst">
8264 Setting <filename>LICENSE_CREATE_PACKAGE</filename>
8265 to "1" causes the OpenEmbedded build system to create
8266 an extra package (i.e.
8267 <filename>${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}-lic</filename>)
8268 for each recipe and to add those packages to the
8269 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link><filename>_${PN}</filename>.
8270 </para>
8271
8272 <para>
8273 The <filename>${PN}-lic</filename> package installs a
8274 directory in <filename>/usr/share/licenses</filename>
8275 named <filename>${PN}</filename>, which is the recipe's
8276 base name, and installs files in that directory that
8277 contain license and copyright information (i.e. copies of
8278 the appropriate license files from
8279 <filename>meta/common-licenses</filename> that match the
8280 licenses specified in the
8281 <link linkend='var-LICENSE'><filename>LICENSE</filename></link>
8282 variable of the recipe metadata and copies of files marked
8283 in
8284 <link linkend='var-LIC_FILES_CHKSUM'><filename>LIC_FILES_CHKSUM</filename></link>
8285 as containing license text).
8286 </para>
8287
8288 <para>
8289 For related information on providing license text, see the
8290 <link linkend='var-COPY_LIC_DIRS'><filename>COPY_LIC_DIRS</filename></link>
8291 variable, the
8292 <link linkend='var-COPY_LIC_MANIFEST'><filename>COPY_LIC_MANIFEST</filename></link>
8293 variable, and the
8294 "<ulink url='&YOCTO_DOCS_DEV_URL;#providing-license-text'>Providing License Text</ulink>"
8295 section in the Yocto Project Development Tasks Manual.
8296 </para>
8297 </glossdef>
8298 </glossentry>
8299
8300 <glossentry id='var-LICENSE_FLAGS'><glossterm>LICENSE_FLAGS</glossterm>
8301 <info>
8302 LICENSE_FLAGS[doc] = "Specifies additional flags for a recipe you must whitelist through LICENSE_FLAGS_WHITELIST in order to allow the recipe to be built."
8303 </info>
8304 <glossdef>
8305 <para role="glossdeffirst">
8306 Specifies additional flags for a recipe you must
8307 whitelist through
8308 <link linkend='var-LICENSE_FLAGS_WHITELIST'><filename>LICENSE_FLAGS_WHITELIST</filename></link>
8309 in order to allow the recipe to be built.
8310 When providing multiple flags, separate them with
8311 spaces.
8312 </para>
8313
8314 <para>
8315 This value is independent of
8316 <link linkend='var-LICENSE'><filename>LICENSE</filename></link>
8317 and is typically used to mark recipes that might
8318 require additional licenses in order to be used in a
8319 commercial product.
8320 For more information, see the
8321 "<ulink url='&YOCTO_DOCS_DEV_URL;#enabling-commercially-licensed-recipes'>Enabling Commercially Licensed Recipes</ulink>"
8322 section in the Yocto Project Development Tasks Manual.
8323 </para>
8324 </glossdef>
8325 </glossentry>
8326
8327 <glossentry id='var-LICENSE_FLAGS_WHITELIST'><glossterm>LICENSE_FLAGS_WHITELIST</glossterm>
8328 <info>
8329 LICENSE_FLAGS_WHITELIST[doc] = "Lists license flags that when specified in LICENSE_FLAGS within a recipe should not prevent that recipe from being built."
8330 </info>
8331 <glossdef>
8332 <para role="glossdeffirst">
8333 Lists license flags that when specified in
8334 <link linkend='var-LICENSE_FLAGS'><filename>LICENSE_FLAGS</filename></link>
8335 within a recipe should not prevent that recipe from being
8336 built.
8337 This practice is otherwise known as "whitelisting"
8338 license flags.
8339 For more information, see the
8340 "<ulink url='&YOCTO_DOCS_DEV_URL;#enabling-commercially-licensed-recipes'>Enabling Commercially Licensed Recipes</ulink>"
8341 section in the Yocto Project Development Tasks Manual.
8342 </para>
8343 </glossdef>
8344 </glossentry>
8345
8346 <glossentry id='var-LICENSE_PATH'><glossterm>LICENSE_PATH</glossterm>
8347 <info>
8348 LICENSE_PATH[doc] = "Path to additional licenses used during the build."
8349 </info>
8350 <glossdef>
8351 <para role="glossdeffirst">
8352 Path to additional licenses used during the build.
8353 By default, the OpenEmbedded build system uses <filename>COMMON_LICENSE_DIR</filename>
8354 to define the directory that holds common license text used during the build.
8355 The <filename>LICENSE_PATH</filename> variable allows you to extend that
8356 location to other areas that have additional licenses:
8357 <literallayout class='monospaced'>
8358 LICENSE_PATH += "<replaceable>path-to-additional-common-licenses</replaceable>"
8359 </literallayout>
8360 </para>
8361 </glossdef>
8362 </glossentry>
8363
8364 <glossentry id='var-LINUX_KERNEL_TYPE'><glossterm>LINUX_KERNEL_TYPE</glossterm>
8365 <info>
8366 LINUX_KERNEL_TYPE[doc] = "Defines the kernel type to be used in assembling the configuration."
8367 </info>
8368 <glossdef>
8369 <para role="glossdeffirst">
8370 Defines the kernel type to be used in assembling the
8371 configuration.
8372 The linux-yocto recipes define "standard", "tiny", and
8373 "preempt-rt" kernel types.
8374 See the
8375 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#kernel-types'>Kernel Types</ulink>"
8376 section in the Yocto Project Linux Kernel Development
8377 Manual for more information on kernel types.
8378 </para>
8379
8380 <para>
8381 If you do not specify a
8382 <filename>LINUX_KERNEL_TYPE</filename>, it defaults to
8383 "standard".
8384 Together with
8385 <link linkend='var-KMACHINE'><filename>KMACHINE</filename></link>,
8386 the <filename>LINUX_KERNEL_TYPE</filename> variable
8387 defines the search
8388 arguments used by the kernel tools to find the appropriate
8389 description within the kernel
8390 <link linkend='metadata'>Metadata</link>
8391 with which to build out the sources and configuration.
8392 </para>
8393 </glossdef>
8394 </glossentry>
8395
8396 <glossentry id='var-LINUX_VERSION'><glossterm>LINUX_VERSION</glossterm>
8397 <info>
8398 LINUX_VERSION[doc] = "The Linux version from kernel.org on which the Linux kernel image being built using the OpenEmbedded build system is based. You define this variable in the kernel recipe."
8399 </info>
8400 <glossdef>
8401 <para role="glossdeffirst">
8402 The Linux version from <filename>kernel.org</filename>
8403 on which the Linux kernel image being built using the
8404 OpenEmbedded build system is based.
8405 You define this variable in the kernel recipe.
8406 For example, the <filename>linux-yocto-3.4.bb</filename>
8407 kernel recipe found in
8408 <filename>meta/recipes-kernel/linux</filename>
8409 defines the variables as follows:
8410 <literallayout class='monospaced'>
8411 LINUX_VERSION ?= "3.4.24"
8412 </literallayout>
8413 </para>
8414
8415 <para>
8416 The <filename>LINUX_VERSION</filename> variable is used to
8417 define <link linkend='var-PV'><filename>PV</filename></link>
8418 for the recipe:
8419 <literallayout class='monospaced'>
8420 PV = "${LINUX_VERSION}+git${SRCPV}"
8421 </literallayout>
8422 </para>
8423 </glossdef>
8424 </glossentry>
8425
8426 <glossentry id='var-LINUX_VERSION_EXTENSION'><glossterm>LINUX_VERSION_EXTENSION</glossterm>
8427 <info>
8428 LINUX_VERSION_EXTENSION[doc] = "A string extension compiled into the version string of the Linux kernel built with the OpenEmbedded build system. You define this variable in the kernel recipe."
8429 </info>
8430 <glossdef>
8431 <para role="glossdeffirst">
8432 A string extension compiled into the version
8433 string of the Linux kernel built with the OpenEmbedded
8434 build system.
8435 You define this variable in the kernel recipe.
8436 For example, the linux-yocto kernel recipes all define
8437 the variable as follows:
8438 <literallayout class='monospaced'>
8439 LINUX_VERSION_EXTENSION ?= "-yocto-${<link linkend='var-LINUX_KERNEL_TYPE'>LINUX_KERNEL_TYPE</link>}"
8440 </literallayout>
8441 </para>
8442
8443 <para>
8444 Defining this variable essentially sets the
8445 Linux kernel configuration item
8446 <filename>CONFIG_LOCALVERSION</filename>, which is visible
8447 through the <filename>uname</filename> command.
8448 Here is an example that shows the extension assuming it
8449 was set as previously shown:
8450 <literallayout class='monospaced'>
8451 $ uname -r
8452 3.7.0-rc8-custom
8453 </literallayout>
8454 </para>
8455 </glossdef>
8456 </glossentry>
8457
8458 <glossentry id='var-LOG_DIR'><glossterm>LOG_DIR</glossterm>
8459 <info>
8460 LOG_DIR[doc] = "Specifies the directory to which the OpenEmbedded build system writes overall log files. The default directory is ${TMPDIR}/log"
8461 </info>
8462 <glossdef>
8463 <para role="glossdeffirst">
8464 Specifies the directory to which the OpenEmbedded build
8465 system writes overall log files.
8466 The default directory is <filename>${TMPDIR}/log</filename>.
8467 </para>
8468
8469 <para>
8470 For the directory containing logs specific to each task,
8471 see the <link linkend='var-T'><filename>T</filename></link>
8472 variable.
8473 </para>
8474 </glossdef>
8475 </glossentry>
8476
8477 </glossdiv>
8478
8479 <glossdiv id='var-glossary-m'><title>M</title>
8480
8481 <glossentry id='var-MACHINE'><glossterm>MACHINE</glossterm>
8482 <info>
8483 MACHINE[doc] = "Specifies the target device for which the image is built. You define MACHINE in the conf/local.conf file in the Build Directory."
8484 </info>
8485 <glossdef>
8486 <para role="glossdeffirst">
8487 Specifies the target device for which the image is built.
8488 You define <filename>MACHINE</filename> in the
8489 <filename>local.conf</filename> file found in the
8490 <link linkend='build-directory'>Build Directory</link>.
8491 By default, <filename>MACHINE</filename> is set to
8492 "qemux86", which is an x86-based architecture machine to
8493 be emulated using QEMU:
8494 <literallayout class='monospaced'>
8495 MACHINE ?= "qemux86"
8496 </literallayout>
8497 </para>
8498
8499 <para>
8500 The variable corresponds to a machine configuration file of the
8501 same name, through which machine-specific configurations are set.
8502 Thus, when <filename>MACHINE</filename> is set to "qemux86" there
8503 exists the corresponding <filename>qemux86.conf</filename> machine
8504 configuration file, which can be found in the
8505 <link linkend='source-directory'>Source Directory</link>
8506 in <filename>meta/conf/machine</filename>.
8507 </para>
8508
8509 <para>
8510 The list of machines supported by the Yocto Project as
8511 shipped include the following:
8512 <literallayout class='monospaced'>
8513 MACHINE ?= "qemuarm"
8514 MACHINE ?= "qemuarm64"
8515 MACHINE ?= "qemumips"
8516 MACHINE ?= "qemumips64"
8517 MACHINE ?= "qemuppc"
8518 MACHINE ?= "qemux86"
8519 MACHINE ?= "qemux86-64"
8520 MACHINE ?= "genericx86"
8521 MACHINE ?= "genericx86-64"
8522 MACHINE ?= "beaglebone"
8523 MACHINE ?= "edgerouter"
8524 </literallayout>
8525 The last five are Yocto Project reference hardware boards, which
8526 are provided in the <filename>meta-yocto-bsp</filename> layer.
8527 <note>Adding additional Board Support Package (BSP) layers
8528 to your configuration adds new possible settings for
8529 <filename>MACHINE</filename>.
8530 </note>
8531 </para>
8532 </glossdef>
8533 </glossentry>
8534
8535 <glossentry id='var-MACHINE_ARCH'><glossterm>MACHINE_ARCH</glossterm>
8536 <info>
8537 MACHINE_ARCH[doc] = "Specifies the name of the machine-specific architecture. This variable is set automatically from MACHINE or TUNE_PKGARCH."
8538 </info>
8539 <glossdef>
8540 <para role="glossdeffirst">
8541 Specifies the name of the machine-specific architecture.
8542 This variable is set automatically from
8543 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>
8544 or
8545 <link linkend='var-TUNE_PKGARCH'><filename>TUNE_PKGARCH</filename></link>.
8546 You should not hand-edit the
8547 <filename>MACHINE_ARCH</filename> variable.
8548 </para>
8549 </glossdef>
8550 </glossentry>
8551
8552 <glossentry id='var-MACHINE_ESSENTIAL_EXTRA_RDEPENDS'><glossterm>MACHINE_ESSENTIAL_EXTRA_RDEPENDS</glossterm>
8553 <info>
8554 MACHINE_ESSENTIAL_EXTRA_RDEPENDS[doc] = "A list of required machine-specific packages to install as part of the image being built. Because this is a 'machine-essential' variable, the list of packages are essential for the machine to boot."
8555 </info>
8556 <glossdef>
8557 <para role="glossdeffirst">
8558 A list of required machine-specific packages to install as part of
8559 the image being built.
8560 The build process depends on these packages being present.
8561 Furthermore, because this is a "machine-essential" variable, the list of
8562 packages are essential for the machine to boot.
8563 The impact of this variable affects images based on
8564 <filename>packagegroup-core-boot</filename>,
8565 including the <filename>core-image-minimal</filename> image.
8566 </para>
8567
8568 <para>
8569 This variable is similar to the
8570 <filename><link linkend='var-MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS'>MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS</link></filename>
8571 variable with the exception that the image being built has a build
8572 dependency on the variable's list of packages.
8573 In other words, the image will not build if a file in this list is not found.
8574 </para>
8575
8576 <para>
8577 As an example, suppose the machine for which you are building requires
8578 <filename>example-init</filename> to be run during boot to initialize the hardware.
8579 In this case, you would use the following in the machine's
8580 <filename>.conf</filename> configuration file:
8581 <literallayout class='monospaced'>
8582 MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "example-init"
8583 </literallayout>
8584 </para>
8585 </glossdef>
8586 </glossentry>
8587
8588 <glossentry id='var-MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS'><glossterm>MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS</glossterm>
8589 <info>
8590 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS[doc] = "A list of recommended machine-specific packages to install as part of the image being built. Because this is a 'machine-essential' variable, the list of packages are essential for the machine to boot."
8591 </info>
8592 <glossdef>
8593 <para role="glossdeffirst">
8594 A list of recommended machine-specific packages to install as part of
8595 the image being built.
8596 The build process does not depend on these packages being present.
8597 However, because this is a "machine-essential" variable, the list of
8598 packages are essential for the machine to boot.
8599 The impact of this variable affects images based on
8600 <filename>packagegroup-core-boot</filename>,
8601 including the <filename>core-image-minimal</filename> image.
8602 </para>
8603
8604 <para>
8605 This variable is similar to the
8606 <filename><link linkend='var-MACHINE_ESSENTIAL_EXTRA_RDEPENDS'>MACHINE_ESSENTIAL_EXTRA_RDEPENDS</link></filename>
8607 variable with the exception that the image being built does not have a build
8608 dependency on the variable's list of packages.
8609 In other words, the image will still build if a package in this list is not found.
8610 Typically, this variable is used to handle essential kernel modules, whose
8611 functionality may be selected to be built into the kernel rather than as a module,
8612 in which case a package will not be produced.
8613 </para>
8614
8615 <para>
8616 Consider an example where you have a custom kernel where a specific touchscreen
8617 driver is required for the machine to be usable.
8618 However, the driver can be built as a module or
8619 into the kernel depending on the kernel configuration.
8620 If the driver is built as a module, you want it to be installed.
8621 But, when the driver is built into the kernel, you still want the
8622 build to succeed.
8623 This variable sets up a "recommends" relationship so that in the latter case,
8624 the build will not fail due to the missing package.
8625 To accomplish this, assuming the package for the module was called
8626 <filename>kernel-module-ab123</filename>, you would use the
8627 following in the machine's <filename>.conf</filename> configuration
8628 file:
8629 <literallayout class='monospaced'>
8630 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-module-ab123"
8631 </literallayout>
8632 <note>
8633 In this example, the
8634 <filename>kernel-module-ab123</filename> recipe
8635 needs to explicitly set its
8636 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>
8637 variable to ensure that BitBake does not use the
8638 kernel recipe's
8639 <link linkend='var-PACKAGES_DYNAMIC'><filename>PACKAGES_DYNAMIC</filename></link>
8640 variable to satisfy the dependency.
8641 </note>
8642 </para>
8643
8644 <para>
8645 Some examples of these machine essentials are flash, screen, keyboard, mouse,
8646 or touchscreen drivers (depending on the machine).
8647 </para>
8648 </glossdef>
8649 </glossentry>
8650
8651 <glossentry id='var-MACHINE_EXTRA_RDEPENDS'><glossterm>MACHINE_EXTRA_RDEPENDS</glossterm>
8652 <info>
8653 MACHINE_EXTRA_RDEPENDS[doc] = "A list of machine-specific packages to install as part of the image being built that are not essential for the machine to boot. However, the build process for more fully-featured images depends on the packages being present."
8654 </info>
8655 <glossdef>
8656 <para role="glossdeffirst">
8657 A list of machine-specific packages to install as part of the
8658 image being built that are not essential for the machine to boot.
8659 However, the build process for more fully-featured images
8660 depends on the packages being present.
8661 </para>
8662
8663 <para>
8664 This variable affects all images based on
8665 <filename>packagegroup-base</filename>, which does not include the
8666 <filename>core-image-minimal</filename> or <filename>core-image-full-cmdline</filename>
8667 images.
8668 </para>
8669
8670 <para>
8671 The variable is similar to the
8672 <filename><link linkend='var-MACHINE_EXTRA_RRECOMMENDS'>MACHINE_EXTRA_RRECOMMENDS</link></filename>
8673 variable with the exception that the image being built has a build
8674 dependency on the variable's list of packages.
8675 In other words, the image will not build if a file in this list is not found.
8676 </para>
8677
8678 <para>
8679 An example is a machine that has WiFi capability but is not
8680 essential for the machine to boot the image.
8681 However, if you are building a more fully-featured image, you want to enable
8682 the WiFi.
8683 The package containing the firmware for the WiFi hardware is always
8684 expected to exist, so it is acceptable for the build process to depend upon
8685 finding the package.
8686 In this case, assuming the package for the firmware was called
8687 <filename>wifidriver-firmware</filename>, you would use the following in the
8688 <filename>.conf</filename> file for the machine:
8689 <literallayout class='monospaced'>
8690 MACHINE_EXTRA_RDEPENDS += "wifidriver-firmware"
8691 </literallayout>
8692 </para>
8693 </glossdef>
8694 </glossentry>
8695
8696 <glossentry id='var-MACHINE_EXTRA_RRECOMMENDS'><glossterm>MACHINE_EXTRA_RRECOMMENDS</glossterm>
8697 <info>
8698 MACHINE_EXTRA_RRECOMMENDS[doc] = "A list of machine-specific packages to install as part of the image being built that are not essential for booting the machine. The image being built has no build dependencies on the packages in this list."
8699 </info>
8700 <glossdef>
8701 <para role="glossdeffirst">
8702 A list of machine-specific packages to install as part of the
8703 image being built that are not essential for booting the machine.
8704 The image being built has no build dependency on this list of packages.
8705 </para>
8706
8707 <para>
8708 This variable affects only images based on
8709 <filename>packagegroup-base</filename>, which does not include the
8710 <filename>core-image-minimal</filename> or <filename>core-image-full-cmdline</filename>
8711 images.
8712 </para>
8713
8714 <para>
8715 This variable is similar to the
8716 <filename><link linkend='var-MACHINE_EXTRA_RDEPENDS'>MACHINE_EXTRA_RDEPENDS</link></filename>
8717 variable with the exception that the image being built does not have a build
8718 dependency on the variable's list of packages.
8719 In other words, the image will build if a file in this list is not found.
8720 </para>
8721
8722 <para>
8723 An example is a machine that has WiFi capability but is not essential
8724 For the machine to boot the image.
8725 However, if you are building a more fully-featured image, you want to enable
8726 WiFi.
8727 In this case, the package containing the WiFi kernel module will not be produced
8728 if the WiFi driver is built into the kernel, in which case you still want the
8729 build to succeed instead of failing as a result of the package not being found.
8730 To accomplish this, assuming the package for the module was called
8731 <filename>kernel-module-examplewifi</filename>, you would use the
8732 following in the <filename>.conf</filename> file for the machine:
8733 <literallayout class='monospaced'>
8734 MACHINE_EXTRA_RRECOMMENDS += "kernel-module-examplewifi"
8735 </literallayout>
8736 </para>
8737 </glossdef>
8738 </glossentry>
8739
8740 <glossentry id='var-MACHINE_FEATURES'><glossterm>MACHINE_FEATURES</glossterm>
8741 <info>
8742 MACHINE_FEATURES[doc] = "Specifies the list of hardware features the MACHINE supports."
8743 </info>
8744 <glossdef>
8745 <para role="glossdeffirst">
8746 Specifies the list of hardware features the
8747 <link linkend='var-MACHINE'><filename>MACHINE</filename></link> is capable
8748 of supporting.
8749 For related information on enabling features, see the
8750 <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>,
8751 <link linkend='var-COMBINED_FEATURES'><filename>COMBINED_FEATURES</filename></link>,
8752 and
8753 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>
8754 variables.
8755 </para>
8756
8757 <para>
8758 For a list of hardware features supported by the Yocto
8759 Project as shipped, see the
8760 "<link linkend='ref-features-machine'>Machine Features</link>"
8761 section.
8762 </para>
8763 </glossdef>
8764 </glossentry>
8765
8766 <glossentry id='var-MACHINE_FEATURES_BACKFILL'><glossterm>MACHINE_FEATURES_BACKFILL</glossterm>
8767 <info>
8768 MACHINE_FEATURES_BACKFILL[doc] = "Features to be added to MACHINE_FEATURES if not also present in MACHINE_FEATURES_BACKFILL_CONSIDERED. This variable is set in the meta/conf/bitbake.conf file and is not intended to be user-configurable."
8769 </info>
8770 <glossdef>
8771 <para role="glossdeffirst">
8772 Features to be added to
8773 <filename><link linkend='var-MACHINE_FEATURES'>MACHINE_FEATURES</link></filename>
8774 if not also present in
8775 <filename><link linkend='var-MACHINE_FEATURES_BACKFILL_CONSIDERED'>MACHINE_FEATURES_BACKFILL_CONSIDERED</link></filename>.
8776 </para>
8777
8778 <para>
8779 This variable is set in the <filename>meta/conf/bitbake.conf</filename> file.
8780 It is not intended to be user-configurable.
8781 It is best to just reference the variable to see which machine features are
8782 being backfilled for all machine configurations.
8783 See the "<link linkend='ref-features-backfill'>Feature Backfilling</link>" section for
8784 more information.
8785 </para>
8786 </glossdef>
8787 </glossentry>
8788
8789 <glossentry id='var-MACHINE_FEATURES_BACKFILL_CONSIDERED'><glossterm>MACHINE_FEATURES_BACKFILL_CONSIDERED</glossterm>
8790 <info>
8791 MACHINE_FEATURES_BACKFILL_CONSIDERED[doc] = "Features from MACHINE_FEATURES_BACKFILL that should not be backfilled (i.e. added to MACHINE_FEATURES) during the build."
8792 </info>
8793 <glossdef>
8794 <para role="glossdeffirst">
8795 Features from
8796 <filename><link linkend='var-MACHINE_FEATURES_BACKFILL'>MACHINE_FEATURES_BACKFILL</link></filename>
8797 that should not be backfilled (i.e. added to
8798 <filename><link linkend='var-MACHINE_FEATURES'>MACHINE_FEATURES</link></filename>)
8799 during the build.
8800 See the "<link linkend='ref-features-backfill'>Feature Backfilling</link>" section for
8801 more information.
8802 </para>
8803 </glossdef>
8804 </glossentry>
8805
8806 <glossentry id='var-MACHINEOVERRIDES'><glossterm>MACHINEOVERRIDES</glossterm>
8807 <info>
8808 MACHINEOVERRIDES[doc] = "A colon-separated list of overrides that apply to the current machine."
8809 </info>
8810 <glossdef>
8811 <para role="glossdeffirst">
8812 A colon-separated list of overrides that apply to the
8813 current machine.
8814 By default, this list includes the value of
8815 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>.
8816 </para>
8817
8818 <para>
8819 You can extend <filename>MACHINEOVERRIDES</filename>
8820 to add extra overrides that should apply to a machine.
8821 For example, all machines emulated in QEMU (e.g.
8822 <filename>qemuarm</filename>, <filename>qemux86</filename>,
8823 and so forth) include a file named
8824 <filename>meta/conf/machine/include/qemu.inc</filename>
8825 that prepends the following override to
8826 <filename>MACHINEOVERRIDES</filename>:
8827 <literallayout class='monospaced'>
8828 MACHINEOVERRIDES =. "qemuall:"
8829 </literallayout>
8830 This override allows variables to be overriden for all
8831 machines emulated in QEMU, like in the following example
8832 from the <filename>connman-conf</filename> recipe:
8833 <literallayout class='monospaced'>
8834 SRC_URI_append_qemuall = "file://wired.config \
8835 file://wired-setup \
8836 "
8837 </literallayout>
8838 The underlying mechanism behind
8839 <filename>MACHINEOVERRIDES</filename> is simply that it is
8840 included in the default value of
8841 <link linkend='var-OVERRIDES'><filename>OVERRIDES</filename></link>.
8842 </para>
8843 </glossdef>
8844 </glossentry>
8845
8846 <glossentry id='var-MAINTAINER'><glossterm>MAINTAINER</glossterm>
8847 <info>
8848 MAINTAINER[doc] = "The email address of the distribution maintainer."
8849 </info>
8850 <glossdef>
8851 <para role="glossdeffirst">
8852 The email address of the distribution maintainer.
8853 </para>
8854 </glossdef>
8855 </glossentry>
8856
8857 <glossentry id='var-MIRRORS'><glossterm>MIRRORS</glossterm>
8858 <info>
8859 MIRRORS[doc] = "Specifies additional paths from which the OpenEmbedded build system gets source code."
8860 </info>
8861 <glossdef>
8862 <para role="glossdeffirst">
8863 Specifies additional paths from which the OpenEmbedded
8864 build system gets source code.
8865 When the build system searches for source code, it first
8866 tries the local download directory.
8867 If that location fails, the build system tries locations
8868 defined by
8869 <link linkend='var-PREMIRRORS'><filename>PREMIRRORS</filename></link>,
8870 the upstream source, and then locations specified by
8871 <filename>MIRRORS</filename> in that order.
8872 </para>
8873
8874 <para>
8875 Assuming your distribution
8876 (<link linkend='var-DISTRO'><filename>DISTRO</filename></link>)
8877 is "poky", the default value for
8878 <filename>MIRRORS</filename> is defined in the
8879 <filename>conf/distro/poky.conf</filename> file in the
8880 <filename>meta-poky</filename> Git repository.
8881 </para>
8882 </glossdef>
8883 </glossentry>
8884
8885 <glossentry id='var-MLPREFIX'><glossterm>MLPREFIX</glossterm>
8886 <info>
8887 MLPREFIX[doc] = "Specifies a prefix has been added to PN to create a special version of a recipe or package (i.e. a Multilib version)."
8888 </info>
8889 <glossdef>
8890 <para role="glossdeffirst">
8891 Specifies a prefix has been added to
8892 <link linkend='var-PN'><filename>PN</filename></link> to create a special version
8893 of a recipe or package (i.e. a Multilib version).
8894 The variable is used in places where the prefix needs to be
8895 added to or removed from a the name (e.g. the
8896 <link linkend='var-BPN'><filename>BPN</filename></link> variable).
8897 <filename>MLPREFIX</filename> gets set when a prefix has been
8898 added to <filename>PN</filename>.
8899 <note>
8900 The "ML" in <filename>MLPREFIX</filename> stands for
8901 "MultiLib".
8902 This representation is historical and comes from
8903 a time when <filename>nativesdk</filename> was a suffix
8904 rather than a prefix on the recipe name.
8905 When <filename>nativesdk</filename> was turned into a
8906 prefix, it made sense to set
8907 <filename>MLPREFIX</filename> for it as well.
8908 </note>
8909 </para>
8910
8911 <para>
8912 To help understand when <filename>MLPREFIX</filename>
8913 might be needed, consider when
8914 <link linkend='var-BBCLASSEXTEND'><filename>BBCLASSEXTEND</filename></link>
8915 is used to provide a <filename>nativesdk</filename> version
8916 of a recipe in addition to the target version.
8917 If that recipe declares build-time dependencies on tasks in
8918 other recipes by using
8919 <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>,
8920 then a dependency on "foo" will automatically get rewritten
8921 to a dependency on "nativesdk-foo".
8922 However, dependencies like the following will not get
8923 rewritten automatically:
8924 <literallayout class='monospaced'>
8925 do_foo[depends] += "<replaceable>recipe</replaceable>:do_foo"
8926 </literallayout>
8927 If you want such a dependency to also get transformed,
8928 you can do the following:
8929 <literallayout class='monospaced'>
8930 do_foo[depends] += "${MLPREFIX}<replaceable>recipe</replaceable>:do_foo"
8931 </literallayout>
8932 </para>
8933 </glossdef>
8934 </glossentry>
8935
8936 <glossentry id='var-module_autoload'><glossterm>module_autoload</glossterm>
8937 <info>
8938 module_autoload[doc] = "This variable has been replaced by the KERNEL_MODULE_AUTOLOAD variable. You should replace all occurrences of module_autoload with additions to KERNEL_MODULE_AUTOLOAD."
8939 </info>
8940 <glossdef>
8941 <para role="glossdeffirst">
8942 This variable has been replaced by the
8943 <filename>KERNEL_MODULE_AUTOLOAD</filename> variable.
8944 You should replace all occurrences of
8945 <filename>module_autoload</filename> with additions to
8946 <filename>KERNEL_MODULE_AUTOLOAD</filename>, for example:
8947 <literallayout class='monospaced'>
8948 module_autoload_rfcomm = "rfcomm"
8949 </literallayout>
8950 </para>
8951
8952 <para>
8953 should now be replaced with:
8954 <literallayout class='monospaced'>
8955 KERNEL_MODULE_AUTOLOAD += "rfcomm"
8956 </literallayout>
8957 See the
8958 <link linkend='var-KERNEL_MODULE_AUTOLOAD'><filename>KERNEL_MODULE_AUTOLOAD</filename></link>
8959 variable for more information.
8960 </para>
8961 </glossdef>
8962 </glossentry>
8963
8964 <glossentry id='var-module_conf'><glossterm>module_conf</glossterm>
8965 <info>
8966 module_conf[doc] = "Specifies modprobe.d syntax lines for inclusion in the /etc/modprobe.d/modname.conf file."
8967 </info>
8968 <glossdef>
8969 <para role="glossdeffirst">
8970 Specifies
8971 <ulink url='http://linux.die.net/man/5/modprobe.d'><filename>modprobe.d</filename></ulink>
8972 syntax lines for inclusion in the
8973 <filename>/etc/modprobe.d/modname.conf</filename> file.
8974 </para>
8975
8976 <para>
8977 You can use this variable anywhere that it can be
8978 recognized by the kernel recipe or out-of-tree kernel
8979 module recipe (e.g. a machine configuration file, a
8980 distribution configuration file, an append file for the
8981 recipe, or the recipe itself).
8982 If you use this variable, you must also be sure to list
8983 the module name in the
8984 <link linkend='var-KERNEL_MODULE_AUTOLOAD'><filename>KERNEL_MODULE_AUTOLOAD</filename></link>
8985 variable.
8986 </para>
8987
8988 <para>
8989 Here is the general syntax:
8990 <literallayout class='monospaced'>
8991 module_conf_<replaceable>module_name</replaceable> = "<replaceable>modprobe.d-syntax</replaceable>"
8992 </literallayout>
8993 You must use the kernel module name override.
8994 </para>
8995
8996 <para>
8997 Run <filename>man modprobe.d</filename> in the shell to
8998 find out more information on the exact syntax
8999 you want to provide with <filename>module_conf</filename>.
9000 </para>
9001
9002 <para>
9003 Including <filename>module_conf</filename> causes the
9004 OpenEmbedded build system to populate the
9005 <filename>/etc/modprobe.d/modname.conf</filename>
9006 file with <filename>modprobe.d</filename> syntax lines.
9007 Here is an example that adds the options
9008 <filename>arg1</filename> and <filename>arg2</filename>
9009 to a module named <filename>mymodule</filename>:
9010 <literallayout class='monospaced'>
9011 module_conf_mymodule = "options mymodule arg1=val1 arg2=val2"
9012 </literallayout>
9013 </para>
9014
9015 <para>
9016 For information on how to specify kernel modules to
9017 auto-load on boot, see the
9018 <link linkend='var-KERNEL_MODULE_AUTOLOAD'><filename>KERNEL_MODULE_AUTOLOAD</filename></link>
9019 variable.
9020 </para>
9021 </glossdef>
9022 </glossentry>
9023
9024 <glossentry id='var-MODULE_TARBALL_DEPLOY'><glossterm>MODULE_TARBALL_DEPLOY</glossterm>
9025 <info>
9026 MODULE_TARBALL_DEPLOY[doc] = "Controls creation of the modules-*.tgz file. Set this variable to "0" to disable creation of this file, which contains all of the kernel modules resulting from a kernel build."
9027 </info>
9028 <glossdef>
9029 <para role="glossdeffirst">
9030 Controls creation of the <filename>modules-*.tgz</filename>
9031 file.
9032 Set this variable to "0" to disable creation of this
9033 file, which contains all of the kernel modules resulting
9034 from a kernel build.
9035 </para>
9036 </glossdef>
9037 </glossentry>
9038
9039 <glossentry id='var-MODULE_TARBALL_LINK_NAME'><glossterm>MODULE_TARBALL_LINK_NAME</glossterm>
9040 <info>
9041 MODULE_TARBALL_LINK_NAME[doc] = "The link name of the kernel module tarball."
9042 </info>
9043 <glossdef>
9044 <para role="glossdeffirst">
9045 The link name of the kernel module tarball.
9046 This variable is set in the
9047 <filename>meta/classes/kernel-artifact-names.bbclass</filename>
9048 file as follows:
9049 <literallayout class='monospaced'>
9050 MODULE_TARBALL_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}"
9051 </literallayout>
9052 The value of the <filename>KERNEL_ARTIFACT_LINK_NAME</filename>
9053 variable, which is set in the same file, has the following
9054 value:
9055 <literallayout class='monospaced'>
9056 KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}"
9057 </literallayout>
9058 </para>
9059
9060 <para>
9061 See the
9062 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>
9063 variable for additional information.
9064 </para>
9065 </glossdef>
9066 </glossentry>
9067
9068 <glossentry id='var-MODULE_TARBALL_NAME'><glossterm>MODULE_TARBALL_NAME</glossterm>
9069 <info>
9070 MODULE_TARBALL_NAME[doc] = "The base name of the kernel module tarball."
9071 </info>
9072 <glossdef>
9073 <para role="glossdeffirst">
9074 The base name of the kernel module tarball.
9075 This variable is set in the
9076 <filename>meta/classes/kernel-artifact-names.bbclass</filename>
9077 file as follows:
9078 <literallayout class='monospaced'>
9079 MODULE_TARBALL_NAME ?= "${KERNEL_ARTIFACT_NAME}"
9080 </literallayout>
9081 The value of the
9082 <link linkend='var-KERNEL_ARTIFACT_NAME'><filename>KERNEL_ARTIFACT_NAME</filename></link>
9083 variable, which is set in the same file, has the following
9084 value:
9085 <literallayout class='monospaced'>
9086 KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
9087 </literallayout>
9088 </para>
9089 </glossdef>
9090 </glossentry>
9091
9092<!--
9093 <glossentry id='var-MULTIMACH_HOST_SYS'><glossterm>MULTIMACH_HOST_SYS</glossterm>
9094 <info>
9095 MULTIMACH_HOST_SYS[doc] = "Separates files for different machines such that you can build for multiple host machines using the same output directories."
9096 </info>
9097 <glossdef>
9098 <para role="glossdeffirst">
9099-->
9100<!--
9101 Serves the same purpose as
9102 <link linkend='var-MULTIMACH_TARGET_SYS'><filename>MULTIMACH_TARGET_SYS</filename></link>,
9103 but for the "HOST" system, in situations that involve a
9104 "HOST" and a "TARGET" system.
9105 See the
9106 <link linkend='var-STAGING_DIR_TARGET'><filename>STAGING_DIR_TARGET</filename></link>
9107 variable for more information.
9108 </para>
9109
9110 <para>
9111 The default value of this variable is:
9112 <literallayout class='monospaced'>
9113 ${PACKAGE_ARCH}${HOST_VENDOR}-${HOST_OS}
9114 </literallayout>
9115 </para>
9116 </glossdef>
9117 </glossentry>
9118-->
9119
9120 <glossentry id='var-MULTIMACH_TARGET_SYS'><glossterm>MULTIMACH_TARGET_SYS</glossterm>
9121 <info>
9122 MULTIMACH_TARGET_SYS[doc] = "Separates files for different machines such that you can build for multiple target machines using the same output directories."
9123 </info>
9124 <glossdef>
9125 <para role="glossdeffirst">
9126 Uniquely identifies the type of the target system for
9127 which packages are being built.
9128 This variable allows output for different types of target
9129 systems to be put into different subdirectories of the same
9130 output directory.
9131 </para>
9132
9133 <para>
9134 The default value of this variable is:
9135 <literallayout class='monospaced'>
9136 ${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}
9137 </literallayout>
9138 Some classes (e.g.
9139 <link linkend='ref-classes-cross-canadian'><filename>cross-canadian</filename></link>)
9140 modify the <filename>MULTIMACH_TARGET_SYS</filename> value.
9141 </para>
9142
9143 <para>
9144 See the
9145 <link linkend='var-STAMP'><filename>STAMP</filename></link>
9146 variable for an example.
9147 See the
9148 <link linkend='var-STAGING_DIR_TARGET'><filename>STAGING_DIR_TARGET</filename></link>
9149 variable for more information.
9150 </para>
9151 </glossdef>
9152 </glossentry>
9153
9154 </glossdiv>
9155
9156 <glossdiv id='var-glossary-n'><title>N</title>
9157
9158 <glossentry id='var-NATIVELSBSTRING'><glossterm>NATIVELSBSTRING</glossterm>
9159 <info>
9160 NATIVELSBSTRING[doc] = "A string identifying the host distribution."
9161 </info>
9162 <glossdef>
9163 <para role="glossdeffirst">
9164 A string identifying the host distribution.
9165 Strings consist of the host distributor ID
9166 followed by the release, as reported by the
9167 <filename>lsb_release</filename> tool
9168 or as read from <filename>/etc/lsb-release</filename>.
9169 For example, when running a build on Ubuntu 12.10, the value
9170 is "Ubuntu-12.10".
9171 If this information is unable to be determined, the value
9172 resolves to "Unknown".
9173 </para>
9174
9175 <para>
9176 This variable is used by default to isolate native shared
9177 state packages for different distributions (e.g. to avoid
9178 problems with <filename>glibc</filename> version
9179 incompatibilities).
9180 Additionally, the variable is checked against
9181 <link linkend='var-SANITY_TESTED_DISTROS'><filename>SANITY_TESTED_DISTROS</filename></link>
9182 if that variable is set.
9183 </para>
9184 </glossdef>
9185 </glossentry>
9186
9187 <glossentry id='var-NM'><glossterm>NM</glossterm>
9188 <info>
9189 NM[doc] = "Minimal command and arguments to run 'nm'."
9190 </info>
9191 <glossdef>
9192 <para role="glossdeffirst">
9193 The minimal command and arguments to run
9194 <filename>nm</filename>.
9195 </para>
9196 </glossdef>
9197 </glossentry>
9198
9199 <glossentry id='var-NO_GENERIC_LICENSE'><glossterm>NO_GENERIC_LICENSE</glossterm>
9200 <info>
9201 NO_GENERIC_LICENSE[doc] = "Used to allow copying a license that does not exist in common licenses."
9202 </info>
9203 <glossdef>
9204 <para role="glossdeffirst">
9205 Avoids QA errors when you use a non-common, non-CLOSED
9206 license in a recipe.
9207 Packages exist, such as the linux-firmware package, with
9208 many licenses that are not in any way common.
9209 Also, new licenses are added occasionally to avoid
9210 introducing a lot of common license files, which are only
9211 applicable to a specific package.
9212 <filename>NO_GENERIC_LICENSE</filename> is used to allow
9213 copying a license that does not exist in common licenses.
9214 </para>
9215
9216 <para>
9217 The following example shows how to add
9218 <filename>NO_GENERIC_LICENSE</filename> to a recipe:
9219 <literallayout class='monospaced'>
9220 NO_GENERIC_LICENSE[<replaceable>license_name</replaceable>] = "<replaceable>license_file_in_fetched_source</replaceable>"
9221 </literallayout>
9222 The following is an example that uses the
9223 <filename>LICENSE.Abilis.txt</filename> file as the license
9224 from the fetched source:
9225 <literallayout class='monospaced'>
9226 NO_GENERIC_LICENSE[Firmware-Abilis] = "LICENSE.Abilis.txt"
9227 </literallayout>
9228 </para>
9229 </glossdef>
9230 </glossentry>
9231
9232 <glossentry id='var-NO_RECOMMENDATIONS'><glossterm>NO_RECOMMENDATIONS</glossterm>
9233 <info>
9234 NO_RECOMMENDATIONS[doc] = "When set to '1', no recommended packages will be installed. Some recommended packages might be required for certain system functionality, such as kernel-modules. It is up to the user to add packages to IMAGE_INSTALL as needed."
9235 </info>
9236 <glossdef>
9237 <para role="glossdeffirst">
9238 Prevents installation of all "recommended-only" packages.
9239 Recommended-only packages are packages installed only
9240 through the
9241 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>
9242 variable).
9243 Setting the <filename>NO_RECOMMENDATIONS</filename> variable
9244 to "1" turns this feature on:
9245 <literallayout class='monospaced'>
9246 NO_RECOMMENDATIONS = "1"
9247 </literallayout>
9248 </para>
9249
9250 <para>
9251 You can set this variable globally in your
9252 <filename>local.conf</filename> file or you can attach it to
9253 a specific image recipe by using the recipe name override:
9254 <literallayout class='monospaced'>
9255 NO_RECOMMENDATIONS_pn-<replaceable>target_image</replaceable> = "1"
9256 </literallayout>
9257 </para>
9258
9259 <para>
9260 It is important to realize that if you choose to not install
9261 packages using this variable and some other packages are
9262 dependent on them (i.e. listed in a recipe's
9263 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>
9264 variable), the OpenEmbedded build system ignores your
9265 request and will install the packages to avoid dependency
9266 errors.
9267 <note>
9268 Some recommended packages might be required for certain
9269 system functionality, such as kernel modules.
9270 It is up to you to add packages with the
9271 <link linkend='var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></link>
9272 variable.
9273 </note>
9274 </para>
9275
9276 <para>
9277 Support for this variable exists only when using the
9278 IPK and RPM packaging backend.
9279 Support does not exist for DEB.
9280 </para>
9281
9282 <para>
9283 See the
9284 <link linkend='var-BAD_RECOMMENDATIONS'><filename>BAD_RECOMMENDATIONS</filename></link>
9285 and the
9286 <link linkend='var-PACKAGE_EXCLUDE'><filename>PACKAGE_EXCLUDE</filename></link>
9287 variables for related information.
9288 </para>
9289 </glossdef>
9290 </glossentry>
9291
9292 <glossentry id='var-NOAUTOPACKAGEDEBUG'><glossterm>NOAUTOPACKAGEDEBUG</glossterm>
9293 <info>
9294 NOAUTOPACKAGEDEBUG[doc] = "Disables auto package from splitting .debug files."
9295 </info>
9296 <glossdef>
9297 <para role="glossdeffirst">
9298 Disables auto package from splitting
9299 <filename>.debug</filename> files. If a recipe requires
9300 <filename>FILES_${PN}-dbg</filename> to be set manually,
9301 the <filename>NOAUTOPACKAGEDEBUG</filename> can be defined
9302 allowing you to define the content of the debug package.
9303 For example:
9304 <literallayout class='monospaced'>
9305 NOAUTOPACKAGEDEBUG = "1"
9306 FILES_${PN}-dev = "${includedir}/${QT_DIR_NAME}/Qt/*"
9307 FILES_${PN}-dbg = "/usr/src/debug/"
9308 FILES_${QT_BASE_NAME}-demos-doc = "${docdir}/${QT_DIR_NAME}/qch/qt.qch"
9309 </literallayout>
9310 </para>
9311 </glossdef>
9312 </glossentry>
9313 </glossdiv>
9314
9315 <glossdiv id='var-glossary-o'><title>O</title>
9316
9317 <glossentry id='var-OBJCOPY'><glossterm>OBJCOPY</glossterm>
9318 <info>
9319 OBJCOPY[doc] = "Minimal command and arguments to run 'objcopy'."
9320 </info>
9321 <glossdef>
9322 <para role="glossdeffirst">
9323 The minimal command and arguments to run
9324 <filename>objcopy</filename>.
9325 </para>
9326 </glossdef>
9327 </glossentry>
9328
9329 <glossentry id='var-OBJDUMP'><glossterm>OBJDUMP</glossterm>
9330 <info>
9331 OBJDUMP[doc] = "Minimal command and arguments to run 'objdump'."
9332 </info>
9333 <glossdef>
9334 <para role="glossdeffirst">
9335 The minimal command and arguments to run
9336 <filename>objdump</filename>.
9337 </para>
9338 </glossdef>
9339 </glossentry>
9340
9341 <glossentry id='var-OE_BINCONFIG_EXTRA_MANGLE'><glossterm>OE_BINCONFIG_EXTRA_MANGLE</glossterm>
9342 <info>
9343 OE_BINCONFIG_EXTRA_MANGLE[doc] = "When a recipe inherits the binconfig.bbclass class, this variable specifies additional arguments passed to the "sed" command."
9344 </info>
9345 <glossdef>
9346 <para role="glossdeffirst">
9347 When inheriting the
9348 <link linkend='ref-classes-binconfig'><filename>binconfig</filename></link>
9349 class, this variable
9350 specifies additional arguments passed to the "sed" command.
9351 The sed command alters any paths in configuration scripts
9352 that have been set up during compilation.
9353 Inheriting this class results in all paths in these scripts
9354 being changed to point into the
9355 <filename>sysroots/</filename> directory so that all builds
9356 that use the script will use the correct directories
9357 for the cross compiling layout.
9358 </para>
9359
9360 <para>
9361 See the <filename>meta/classes/binconfig.bbclass</filename>
9362 in the
9363 <link linkend='source-directory'>Source Directory</link>
9364 for details on how this class applies these additional
9365 sed command arguments.
9366 For general information on the
9367 <filename>binconfig</filename> class, see the
9368 "<link linkend='ref-classes-binconfig'><filename>binconfig.bbclass</filename></link>"
9369 section.
9370 </para>
9371 </glossdef>
9372 </glossentry>
9373
9374 <glossentry id='var-OE_IMPORTS'><glossterm>OE_IMPORTS</glossterm>
9375 <info>
9376 OE_IMPORTS[doc] = "An internal variable used to tell the OpenEmbedded build system what Python modules to import for every Python function run by the system."
9377 </info>
9378 <glossdef>
9379 <para role="glossdeffirst">
9380 An internal variable used to tell the OpenEmbedded build
9381 system what Python modules to import for every Python
9382 function run by the system.
9383 </para>
9384
9385 <note>
9386 Do not set this variable.
9387 It is for internal use only.
9388 </note>
9389 </glossdef>
9390 </glossentry>
9391
9392 <glossentry id='var-OE_INIT_ENV_SCRIPT'><glossterm>OE_INIT_ENV_SCRIPT</glossterm>
9393 <info>
9394 OE_INIT_ENV_SCRIPT[doc] = "The name of the build environment setup script for the purposes of setting up the environment within the extensible SDK."
9395 </info>
9396 <glossdef>
9397 <para role="glossdeffirst">
9398 The name of the build environment setup script for the
9399 purposes of setting up the environment within the
9400 extensible SDK.
9401 The default value is "oe-init-build-env".
9402 </para>
9403
9404 <para>
9405 If you use a custom script to set up your build
9406 environment, set the
9407 <filename>OE_INIT_ENV_SCRIPT</filename> variable to its
9408 name.
9409 </para>
9410 </glossdef>
9411 </glossentry>
9412
9413 <glossentry id='var-OE_TERMINAL'><glossterm>OE_TERMINAL</glossterm>
9414 <info>
9415 OE_TERMINAL[doc] = "Controls how the OpenEmbedded build system spawns interactive terminals on the host development system."
9416 </info>
9417 <glossdef>
9418 <para role="glossdeffirst">
9419 Controls how the OpenEmbedded build system spawns
9420 interactive terminals on the host development system
9421 (e.g. using the BitBake command with the
9422 <filename>-c devshell</filename> command-line option).
9423 For more information, see the
9424 "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-appdev-devshell'>Using a Development Shell</ulink>" section
9425 in the Yocto Project Development Tasks Manual.
9426 </para>
9427
9428 <para>
9429 You can use the following values for the
9430 <filename>OE_TERMINAL</filename> variable:
9431 <literallayout class='monospaced'>
9432 auto
9433 gnome
9434 xfce
9435 rxvt
9436 screen
9437 konsole
9438 none
9439 </literallayout>
9440 </para>
9441 </glossdef>
9442 </glossentry>
9443
9444 <glossentry id='var-OEROOT'><glossterm>OEROOT</glossterm>
9445 <info>
9446 OEROOT[doc] = "The directory from which the top-level build environment setup script is sourced."
9447 </info>
9448 <glossdef>
9449 <para role="glossdeffirst">
9450 The directory from which the top-level build environment
9451 setup script is sourced.
9452 The Yocto Project provides a top-level build environment
9453 setup script:
9454 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>.
9455 When you run this script, the
9456 <filename>OEROOT</filename> variable resolves to the
9457 directory that contains the script.
9458 </para>
9459
9460 <para>
9461 For additional information on how this variable is used,
9462 see the initialization script.
9463 </para>
9464 </glossdef>
9465 </glossentry>
9466
9467 <glossentry id='var-OLDEST_KERNEL'><glossterm>OLDEST_KERNEL</glossterm>
9468 <info>
9469 OLDEST_KERNEL[doc] = "Declares the oldest version of the Linux kernel that the produced binaries must support."
9470 </info>
9471 <glossdef>
9472 <para role="glossdeffirst">
9473 Declares the oldest version of the Linux kernel that the
9474 produced binaries must support.
9475 This variable is passed into the build of the Embedded
9476 GNU C Library (<filename>glibc</filename>).
9477 </para>
9478
9479 <para>
9480 The default for this variable comes from the
9481 <filename>meta/conf/bitbake.conf</filename> configuration
9482 file.
9483 You can override this default by setting the variable
9484 in a custom distribution configuration file.
9485 </para>
9486 </glossdef>
9487 </glossentry>
9488
9489 <glossentry id='var-OVERRIDES'><glossterm>OVERRIDES</glossterm>
9490 <info>
9491 OVERRIDES[doc] = "A colon-separated list of overrides that currently apply."
9492 </info>
9493 <glossdef>
9494 <para role="glossdeffirst">
9495 A colon-separated list of overrides that currently apply.
9496 Overrides are a BitBake mechanism that allows variables to
9497 be selectively overridden at the end of parsing.
9498 The set of overrides in <filename>OVERRIDES</filename>
9499 represents the "state" during building, which includes
9500 the current recipe being built, the machine for which
9501 it is being built, and so forth.
9502 </para>
9503
9504 <para>
9505 As an example, if the string "an-override" appears as an
9506 element in the colon-separated list in
9507 <filename>OVERRIDES</filename>, then the following
9508 assignment will override <filename>FOO</filename> with the
9509 value "overridden" at the end of parsing:
9510 <literallayout class='monospaced'>
9511 FOO_an-override = "overridden"
9512 </literallayout>
9513 See the
9514 "<ulink url='&YOCTO_DOCS_BB_URL;#conditional-syntax-overrides'>Conditional Syntax (Overrides)</ulink>"
9515 section in the BitBake User Manual for more information on
9516 the overrides mechanism.
9517 </para>
9518
9519 <para>
9520 The default value of <filename>OVERRIDES</filename>
9521 includes the values of the
9522 <link linkend='var-CLASSOVERRIDE'><filename>CLASSOVERRIDE</filename></link>,
9523 <link linkend='var-MACHINEOVERRIDES'><filename>MACHINEOVERRIDES</filename></link>,
9524 and
9525 <link linkend='var-DISTROOVERRIDES'><filename>DISTROOVERRIDES</filename></link>
9526 variables.
9527 Another important override included by default is
9528 <filename>pn-${PN}</filename>.
9529 This override allows variables to be set for a single
9530 recipe within configuration (<filename>.conf</filename>)
9531 files.
9532 Here is an example:
9533 <literallayout class='monospaced'>
9534 FOO_pn-myrecipe = "myrecipe-specific value"
9535 </literallayout>
9536 <note><title>Tip</title>
9537 An easy way to see what overrides apply is to search for
9538 <filename>OVERRIDES</filename> in the output of the
9539 <filename>bitbake -e</filename> command.
9540 See the
9541 "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-debugging-viewing-variable-values'>Viewing Variable Values</ulink>"
9542 section in the Yocto Project Development Tasks
9543 Manual for more information.
9544 </note>
9545 </para>
9546 </glossdef>
9547 </glossentry>
9548 </glossdiv>
9549
9550 <glossdiv id='var-glossary-p'><title>P</title>
9551
9552 <glossentry id='var-P'><glossterm>P</glossterm>
9553 <info>
9554 P[doc] = "The recipe name and version. P is comprised of ${PN}-${PV}."
9555 </info>
9556 <glossdef>
9557 <para role="glossdeffirst">
9558 The recipe name and version.
9559 <filename>P</filename> is comprised of the following:
9560 <literallayout class='monospaced'>
9561 ${PN}-${PV}
9562 </literallayout>
9563 </para>
9564 </glossdef>
9565 </glossentry>
9566
9567 <glossentry id='var-PACKAGE_ADD_METADATA'><glossterm>PACKAGE_ADD_METADATA</glossterm>
9568 <info>
9569 PACKAGE_ADD_METADATA[doc] = "This variable defines additional metadata to add to packages."
9570 </info>
9571 <glossdef>
9572 <para role="glossdeffirst">
9573<!-- <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
9574 This variable defines additional metdata to add to packages.
9575 </para>
9576
9577 <para>
9578 You may find you need to inject additional metadata into
9579 packages. This variable allows you to do that by setting
9580 the injected data as the value. Multiple fields can be
9581 added by splitting the content with the literal separator
9582 "\n".
9583 </para>
9584
9585 <para>
9586 The suffixes '_IPK', '_DEB', or '_RPM' can be applied to
9587 the variable to do package type specific settings. It can
9588 also be made package specific by using the package name as
9589 a suffix.
9590 </para>
9591
9592 <para>
9593 You can find out more about applying this variable in
9594 the
9595 "<ulink url='&YOCTO_DOCS_DEV_URL;#adding-custom-metadata-to-packages'>Adding custom metadata to packages</ulink>"
9596 section in the Yocto Project Development Tasks Manual.
9597 </para>
9598 </glossdef>
9599 </glossentry>
9600
9601 <glossentry id='var-PACKAGE_ARCH'><glossterm>PACKAGE_ARCH</glossterm>
9602 <info>
9603 PACKAGE_ARCH[doc] = "The architecture of the resulting package or packages."
9604 </info>
9605 <glossdef>
9606 <para role="glossdeffirst">
9607 The architecture of the resulting package or packages.
9608 </para>
9609
9610 <para>
9611 By default, the value of this variable is set to
9612 <link linkend='var-TUNE_PKGARCH'><filename>TUNE_PKGARCH</filename></link>
9613 when building for the target,
9614 <link linkend='var-BUILD_ARCH'><filename>BUILD_ARCH</filename></link>
9615 when building for the
9616 build host, and "${SDK_ARCH}-${SDKPKGSUFFIX}" when building
9617 for the SDK.
9618 <note>
9619 See
9620 <link linkend='var-SDK_ARCH'><filename>SDK_ARCH</filename></link>
9621 for more information.
9622 </note>
9623 However, if your recipe's output packages are built
9624 specific to the target machine rather than generally for
9625 the architecture of the machine, you should set
9626 <filename>PACKAGE_ARCH</filename> to the value of
9627 <link linkend='var-MACHINE_ARCH'><filename>MACHINE_ARCH</filename></link>
9628 in the recipe as follows:
9629 <literallayout class='monospaced'>
9630 PACKAGE_ARCH = "${MACHINE_ARCH}"
9631 </literallayout>
9632 </para>
9633 </glossdef>
9634 </glossentry>
9635
9636 <glossentry id='var-PACKAGE_ARCHS'><glossterm>PACKAGE_ARCHS</glossterm>
9637 <info>
9638 PACKAGE_ARCHS[doc] = "A list of architectures compatible with the given target in order of priority."
9639 </info>
9640 <glossdef>
9641 <para role="glossdeffirst">
9642 Specifies a list of architectures compatible with
9643 the target machine.
9644 This variable is set automatically and should not
9645 normally be hand-edited.
9646 Entries are separated using spaces and listed in order
9647 of priority.
9648 The default value for
9649 <filename>PACKAGE_ARCHS</filename> is "all any noarch
9650 ${PACKAGE_EXTRA_ARCHS} ${MACHINE_ARCH}".
9651 </para>
9652 </glossdef>
9653 </glossentry>
9654
9655 <glossentry id='var-PACKAGE_BEFORE_PN'><glossterm>PACKAGE_BEFORE_PN</glossterm>
9656 <info>
9657 PACKAGE_BEFORE_PN[doc] = "Enables easily adding packages to PACKAGES before ${PN} so that the packages can pick up files that would normally be included in the default package."
9658 </info>
9659 <glossdef>
9660 <para role="glossdeffirst">
9661 Enables easily adding packages to
9662 <filename><link linkend='var-PACKAGES'>PACKAGES</link></filename>
9663 before <filename>${<link linkend='var-PN'>PN</link>}</filename>
9664 so that those added packages can pick up files that would normally be
9665 included in the default package.
9666 </para>
9667 </glossdef>
9668 </glossentry>
9669
9670 <glossentry id='var-PACKAGE_CLASSES'><glossterm>PACKAGE_CLASSES</glossterm>
9671 <info>
9672 PACKAGE_CLASSES[doc] = "This variable specifies the package manager to use when packaging data. It is set in the conf/local.conf file in the Build Directory."
9673 </info>
9674 <glossdef>
9675 <para role="glossdeffirst">
9676 This variable, which is set in the
9677 <filename>local.conf</filename> configuration file found in
9678 the <filename>conf</filename> folder of the
9679 <link linkend='build-directory'>Build Directory</link>,
9680 specifies the package manager the OpenEmbedded build system
9681 uses when packaging data.
9682 </para>
9683
9684 <para>
9685 You can provide one or more of the following arguments for
9686 the variable:
9687 <literallayout class='monospaced'>
9688 PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk package_tar"
9689 </literallayout>
9690 <note><title>Warning</title>
9691 While it is a legal option, the
9692 <filename>package_tar</filename> class has limited
9693 functionality due to no support for package
9694 dependencies by that backend.
9695 Therefore, it is recommended that you do not use it.
9696 </note>
9697 The build system uses only the first argument in the list
9698 as the package manager when creating your image or SDK.
9699 However, packages will be created using any additional
9700 packaging classes you specify.
9701 For example, if you use the following in your
9702 <filename>local.conf</filename> file:
9703 <literallayout class='monospaced'>
9704 PACKAGE_CLASSES ?= "package_ipk"
9705 </literallayout>
9706 The OpenEmbedded build system uses the IPK package manager
9707 to create your image or SDK.
9708 </para>
9709
9710 <para>
9711 For information on packaging and build performance effects
9712 as a result of the package manager in use, see the
9713 "<link linkend='ref-classes-package'><filename>package.bbclass</filename></link>"
9714 section.
9715 </para>
9716 </glossdef>
9717 </glossentry>
9718
9719 <glossentry id='var-PACKAGE_DEBUG_SPLIT_STYLE'><glossterm>PACKAGE_DEBUG_SPLIT_STYLE</glossterm>
9720 <info>
9721 PACKAGE_DEBUG_SPLIT_STYLE[doc] = "Determines how to split up the binary and debug information when creating *-dbg packages to be used with the GNU Project Debugger (GDB)."
9722 </info>
9723 <glossdef>
9724 <para role="glossdeffirst">
9725 Determines how to split up the binary and debug information
9726 when creating <filename>*-dbg</filename> packages to be
9727 used with the GNU Project Debugger (GDB).
9728 </para>
9729
9730 <para>
9731 With the
9732 <filename>PACKAGE_DEBUG_SPLIT_STYLE</filename> variable,
9733 you can control where debug information, which can include
9734 or exclude source files, is stored:
9735 <itemizedlist>
9736 <listitem><para>
9737 ".debug": Debug symbol files are placed next
9738 to the binary in a <filename>.debug</filename>
9739 directory on the target.
9740 For example, if a binary is installed into
9741 <filename>/bin</filename>, the corresponding debug
9742 symbol files are installed in
9743 <filename>/bin/.debug</filename>.
9744 Source files are placed in
9745 <filename>/usr/src/debug</filename>.
9746 </para></listitem>
9747 <listitem><para>
9748 "debug-file-directory": Debug symbol files are
9749 placed under <filename>/usr/lib/debug</filename>
9750 on the target, and separated by the path from where
9751 the binary is installed.
9752 For example, if a binary is installed in
9753 <filename>/bin</filename>, the corresponding debug
9754 symbols are installed in
9755 <filename>/usr/lib/debug/bin</filename>.
9756 Source files are placed in
9757 <filename>/usr/src/debug</filename>.
9758 </para></listitem>
9759 <listitem><para>
9760 "debug-without-src": The same behavior as
9761 ".debug" previously described with the exception
9762 that no source files are installed.
9763 </para></listitem>.
9764 <listitem><para>
9765 "debug-with-srcpkg": The same behavior as
9766 ".debug" previously described with the exception
9767 that all source files are placed in a separate
9768 <filename>*-src</filename> pkg.
9769 This is the default behavior.
9770 </para></listitem>
9771 </itemizedlist>
9772 </para>
9773
9774 <para>
9775 You can find out more about debugging using GDB by reading
9776 the
9777 "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-gdb-remotedebug'>Debugging With the GNU Project Debugger (GDB) Remotely</ulink>"
9778 section in the Yocto Project Development Tasks Manual.
9779 </para>
9780 </glossdef>
9781 </glossentry>
9782
9783 <glossentry id='var-PACKAGE_EXCLUDE_COMPLEMENTARY'><glossterm>PACKAGE_EXCLUDE_COMPLEMENTARY</glossterm>
9784 <info>
9785 PACKAGE_EXCLUDE_COMPLEMENTARY[doc] = "Prevents specific packages from being installed when you are installing complementary packages."
9786 </info>
9787 <glossdef>
9788 <para role="glossdeffirst">
9789 Prevents specific packages from being installed when
9790 you are installing complementary packages.
9791 </para>
9792
9793 <para>
9794 You might find that you want to prevent installing certain
9795 packages when you are installing complementary packages.
9796 For example, if you are using
9797 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>
9798 to install <filename>dev-pkgs</filename>, you might not want
9799 to install all packages from a particular multilib.
9800 If you find yourself in this situation, you can use the
9801 <filename>PACKAGE_EXCLUDE_COMPLEMENTARY</filename> variable
9802 to specify regular expressions to match the packages you
9803 want to exclude.
9804 </para>
9805 </glossdef>
9806 </glossentry>
9807
9808 <glossentry id='var-PACKAGE_EXCLUDE'><glossterm>PACKAGE_EXCLUDE</glossterm>
9809 <info>
9810 PACKAGE_EXCLUDE[doc] = "Packages to exclude from the installation. If a listed package is required, an error is generated."
9811 </info>
9812 <glossdef>
9813 <para role="glossdeffirst">
9814 Lists packages that should not be installed into an image.
9815 For example:
9816 <literallayout class='monospaced'>
9817 PACKAGE_EXCLUDE = "<replaceable>package_name</replaceable> <replaceable>package_name</replaceable> <replaceable>package_name</replaceable> ..."
9818 </literallayout>
9819 </para>
9820
9821 <para>
9822 You can set this variable globally in your
9823 <filename>local.conf</filename> file or you can attach it to
9824 a specific image recipe by using the recipe name override:
9825 <literallayout class='monospaced'>
9826 PACKAGE_EXCLUDE_pn-<replaceable>target_image</replaceable> = "<replaceable>package_name</replaceable>"
9827 </literallayout>
9828 </para>
9829
9830 <para>
9831 If you choose to not install
9832 a package using this variable and some other package is
9833 dependent on it (i.e. listed in a recipe's
9834 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>
9835 variable), the OpenEmbedded build system generates a fatal
9836 installation error.
9837 Because the build system halts the process with a fatal
9838 error, you can use the variable with an iterative
9839 development process to remove specific components from a
9840 system.
9841 </para>
9842
9843 <para>
9844 Support for this variable exists only when using the
9845 IPK and RPM packaging backend.
9846 Support does not exist for DEB.
9847 </para>
9848
9849 <para>
9850 See the
9851 <link linkend='var-NO_RECOMMENDATIONS'><filename>NO_RECOMMENDATIONS</filename></link>
9852 and the
9853 <link linkend='var-BAD_RECOMMENDATIONS'><filename>BAD_RECOMMENDATIONS</filename></link>
9854 variables for related information.
9855 </para>
9856 </glossdef>
9857 </glossentry>
9858
9859 <glossentry id='var-PACKAGE_EXTRA_ARCHS'><glossterm>PACKAGE_EXTRA_ARCHS</glossterm>
9860 <info>
9861 PACKAGE_EXTRA_ARCHS[doc] = "Specifies the list of architectures compatible with the device CPU. This variable is useful when you build for several different devices that use miscellaneous processors."
9862 </info>
9863 <glossdef>
9864 <para role="glossdeffirst">
9865 Specifies the list of architectures compatible with the device CPU.
9866 This variable is useful when you build for several different devices that use
9867 miscellaneous processors such as XScale and ARM926-EJS.
9868 </para>
9869 </glossdef>
9870 </glossentry>
9871
9872 <glossentry id='var-PACKAGE_FEED_ARCHS'><glossterm>PACKAGE_FEED_ARCHS</glossterm>
9873 <info>
9874 PACKAGE_FEED_ARCHS[doc] = "Optionally specifies user-defined package architectures when constructing package feed URIs."
9875 </info>
9876 <glossdef>
9877 <para role="glossdeffirst">
9878 Optionally specifies the package architectures used as
9879 part of the package feed URIs during the build.
9880 When used, the <filename>PACKAGE_FEED_ARCHS</filename>
9881 variable is appended to the final package feed URI, which
9882 is constructed using the
9883 <link linkend='var-PACKAGE_FEED_URIS'><filename>PACKAGE_FEED_URIS</filename></link>
9884 and
9885 <link linkend='var-PACKAGE_FEED_BASE_PATHS'><filename>PACKAGE_FEED_BASE_PATHS</filename></link>
9886 variables.
9887 <note><title>Tip</title>
9888 You can use the <filename>PACKAGE_FEEDS_ARCHS</filename>
9889 variable to whitelist specific package architectures.
9890 If you do not need to whitelist specific architectures,
9891 which is a common case, you can omit this variable.
9892 Omitting the variable results in all available
9893 architectures for the current machine being included
9894 into remote package feeds.
9895 </note>
9896 </para>
9897
9898 <para>
9899 Consider the following example where the
9900 <filename>PACKAGE_FEED_URIS</filename>,
9901 <filename>PACKAGE_FEED_BASE_PATHS</filename>, and
9902 <filename>PACKAGE_FEED_ARCHS</filename> variables are
9903 defined in your <filename>local.conf</filename> file:
9904 <literallayout class='monospaced'>
9905 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
9906 https://example.com/packagerepos/updates"
9907 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
9908 PACKAGE_FEED_ARCHS = "all core2-64"
9909 </literallayout>
9910 Given these settings, the resulting package feeds are
9911 as follows:
9912 <literallayout class='monospaced'>
9913 https://example.com/packagerepos/release/rpm/all
9914 https://example.com/packagerepos/release/rpm/core2-64
9915 https://example.com/packagerepos/release/rpm-dev/all
9916 https://example.com/packagerepos/release/rpm-dev/core2-64
9917 https://example.com/packagerepos/updates/rpm/all
9918 https://example.com/packagerepos/updates/rpm/core2-64
9919 https://example.com/packagerepos/updates/rpm-dev/all
9920 https://example.com/packagerepos/updates/rpm-dev/core2-64
9921 </literallayout>
9922 </para>
9923 </glossdef>
9924 </glossentry>
9925
9926 <glossentry id='var-PACKAGE_FEED_BASE_PATHS'><glossterm>PACKAGE_FEED_BASE_PATHS</glossterm>
9927 <info>
9928 PACKAGE_FEED_BASE_PATHS[doc] = "Specifies base path used when constructing package feed URIs."
9929 </info>
9930 <glossdef>
9931 <para role="glossdeffirst">
9932 Specifies the base path used when constructing package feed
9933 URIs.
9934 The <filename>PACKAGE_FEED_BASE_PATHS</filename> variable
9935 makes up the middle portion of a package feed URI used
9936 by the OpenEmbedded build system.
9937 The base path lies between the
9938 <link linkend='var-PACKAGE_FEED_URIS'><filename>PACKAGE_FEED_URIS</filename></link>
9939 and
9940 <link linkend='var-PACKAGE_FEED_ARCHS'><filename>PACKAGE_FEED_ARCHS</filename></link>
9941 variables.
9942 </para>
9943
9944 <para>
9945 Consider the following example where the
9946 <filename>PACKAGE_FEED_URIS</filename>,
9947 <filename>PACKAGE_FEED_BASE_PATHS</filename>, and
9948 <filename>PACKAGE_FEED_ARCHS</filename> variables are
9949 defined in your <filename>local.conf</filename> file:
9950 <literallayout class='monospaced'>
9951 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
9952 https://example.com/packagerepos/updates"
9953 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
9954 PACKAGE_FEED_ARCHS = "all core2-64"
9955 </literallayout>
9956 Given these settings, the resulting package feeds are
9957 as follows:
9958 <literallayout class='monospaced'>
9959 https://example.com/packagerepos/release/rpm/all
9960 https://example.com/packagerepos/release/rpm/core2-64
9961 https://example.com/packagerepos/release/rpm-dev/all
9962 https://example.com/packagerepos/release/rpm-dev/core2-64
9963 https://example.com/packagerepos/updates/rpm/all
9964 https://example.com/packagerepos/updates/rpm/core2-64
9965 https://example.com/packagerepos/updates/rpm-dev/all
9966 https://example.com/packagerepos/updates/rpm-dev/core2-64
9967 </literallayout>
9968 </para>
9969 </glossdef>
9970 </glossentry>
9971
9972 <glossentry id='var-PACKAGE_FEED_URIS'><glossterm>PACKAGE_FEED_URIS</glossterm>
9973 <info>
9974 PACKAGE_FEED_URIS[doc] = "Specifies the front portion of the package feed URI used by the OpenEmbedded build system."
9975 </info>
9976 <glossdef>
9977 <para role="glossdeffirst">
9978 Specifies the front portion of the package feed URI
9979 used by the OpenEmbedded build system.
9980 Each final package feed URI is comprised of
9981 <filename>PACKAGE_FEED_URIS</filename>,
9982 <link linkend='var-PACKAGE_FEED_BASE_PATHS'><filename>PACKAGE_FEED_BASE_PATHS</filename></link>,
9983 and
9984 <link linkend='var-PACKAGE_FEED_ARCHS'><filename>PACKAGE_FEED_ARCHS</filename></link>
9985 variables.
9986 </para>
9987
9988 <para>
9989 Consider the following example where the
9990 <filename>PACKAGE_FEED_URIS</filename>,
9991 <filename>PACKAGE_FEED_BASE_PATHS</filename>, and
9992 <filename>PACKAGE_FEED_ARCHS</filename> variables are
9993 defined in your <filename>local.conf</filename> file:
9994 <literallayout class='monospaced'>
9995 PACKAGE_FEED_URIS = "https://example.com/packagerepos/release \
9996 https://example.com/packagerepos/updates"
9997 PACKAGE_FEED_BASE_PATHS = "rpm rpm-dev"
9998 PACKAGE_FEED_ARCHS = "all core2-64"
9999 </literallayout>
10000 Given these settings, the resulting package feeds are
10001 as follows:
10002 <literallayout class='monospaced'>
10003 https://example.com/packagerepos/release/rpm/all
10004 https://example.com/packagerepos/release/rpm/core2-64
10005 https://example.com/packagerepos/release/rpm-dev/all
10006 https://example.com/packagerepos/release/rpm-dev/core2-64
10007 https://example.com/packagerepos/updates/rpm/all
10008 https://example.com/packagerepos/updates/rpm/core2-64
10009 https://example.com/packagerepos/updates/rpm-dev/all
10010 https://example.com/packagerepos/updates/rpm-dev/core2-64
10011 </literallayout>
10012 </para>
10013 </glossdef>
10014 </glossentry>
10015
10016 <glossentry id='var-PACKAGE_INSTALL'><glossterm>PACKAGE_INSTALL</glossterm>
10017 <info>
10018 PACKAGE_INSTALL[doc] = "List of the packages to be installed into the image. The variable is generally not user-defined and uses IMAGE_INSTALL as part of the list."
10019 </info>
10020 <glossdef>
10021 <para role="glossdeffirst">
10022 The final list of packages passed to the package manager
10023 for installation into the image.
10024 </para>
10025
10026 <para>
10027 Because the package manager controls actual installation
10028 of all packages, the list of packages passed using
10029 <filename>PACKAGE_INSTALL</filename> is not the final list
10030 of packages that are actually installed.
10031 This variable is internal to the image construction
10032 code.
10033 Consequently, in general, you should use the
10034 <link linkend='var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></link>
10035 variable to specify packages for installation.
10036 The exception to this is when working with
10037 the
10038 <link linkend='images-core-image-minimal-initramfs'><filename>core-image-minimal-initramfs</filename></link>
10039 image.
10040 When working with an initial RAM filesystem (initramfs)
10041 image, use the <filename>PACKAGE_INSTALL</filename>
10042 variable.
10043 For information on creating an initramfs, see the
10044 "<ulink url='&YOCTO_DOCS_DEV_URL;#building-an-initramfs-image'>Building an Initial RAM Filesystem (initramfs) Image</ulink>"
10045 section in the Yocto Project Development Tasks Manual.
10046 </para>
10047 </glossdef>
10048 </glossentry>
10049
10050 <glossentry id='var-PACKAGE_INSTALL_ATTEMPTONLY'><glossterm>PACKAGE_INSTALL_ATTEMPTONLY</glossterm>
10051 <info>
10052 PACKAGE_INSTALL_ATTEMPTONLY[doc] = "List of packages attempted to be installed when creating an image. If a listed package fails to install, the build system does not generate an error. This variable is generally not user-defined."
10053 </info>
10054 <glossdef>
10055 <para role="glossdeffirst">
10056 Specifies a list of packages the OpenEmbedded build
10057 system attempts to install when creating an image.
10058 If a listed package fails to install, the build system
10059 does not generate an error.
10060 This variable is generally not user-defined.
10061 </para>
10062 </glossdef>
10063 </glossentry>
10064
10065 <glossentry id='var-PACKAGE_PREPROCESS_FUNCS'><glossterm>PACKAGE_PREPROCESS_FUNCS</glossterm>
10066 <info>
10067 PACKAGE_PREPROCESS_FUNCS[doc] = "Specifies a list of functions run to pre-process the PKGD directory prior to splitting the files out to individual packages."
10068 </info>
10069 <glossdef>
10070 <para role="glossdeffirst">
10071 Specifies a list of functions run to pre-process the
10072 <link linkend='var-PKGD'><filename>PKGD</filename></link>
10073 directory prior to splitting the files out to individual
10074 packages.
10075 </para>
10076 </glossdef>
10077 </glossentry>
10078
10079 <glossentry id='var-PACKAGE_WRITE_DEPS'><glossterm>PACKAGE_WRITE_DEPS</glossterm>
10080 <info>
10081 PACKAGE_WRITE_DEPS[doc] = "Specifies post-installation and pre-installation script dependencies on native/cross tools."
10082 </info>
10083 <glossdef>
10084 <para role="glossdeffirst">
10085 Specifies a list of dependencies for post-installation and
10086 pre-installation scripts on native/cross tools.
10087 If your post-installation or pre-installation script can
10088 execute at rootfs creation time rather than on the
10089 target but depends on a native tool in order to execute,
10090 you need to list the tools in
10091 <filename>PACKAGE_WRITE_DEPS</filename>.
10092 </para>
10093
10094 <para>
10095 For information on running post-installation scripts, see
10096 the
10097 "<ulink url='&YOCTO_DOCS_DEV_URL;#new-recipe-post-installation-scripts'>Post-Installation Scripts</ulink>"
10098 section in the Yocto Project Development Tasks Manual.
10099 </para>
10100 </glossdef>
10101 </glossentry>
10102
10103 <glossentry id='var-PACKAGECONFIG'><glossterm>PACKAGECONFIG</glossterm>
10104 <info>
10105 PACKAGECONFIG[doc] = "This variable provides a means of enabling or disabling features of a recipe on a per-recipe basis."
10106 </info>
10107 <glossdef>
10108 <para role="glossdeffirst">
10109 This variable provides a means of enabling or disabling
10110 features of a recipe on a per-recipe basis.
10111 <filename>PACKAGECONFIG</filename> blocks are defined
10112 in recipes when you specify features and then arguments
10113 that define feature behaviors.
10114 Here is the basic block structure (broken over multiple
10115 lines for readability):
10116 <literallayout class='monospaced'>
10117 PACKAGECONFIG ??= "f1 f2 f3 ..."
10118 PACKAGECONFIG[f1] = "\
10119 --with-f1, \
10120 --without-f1, \
10121 build-deps-for-f1, \
10122 runtime-deps-for-f1, \
10123 runtime-recommends-for-f1, \
10124 packageconfig-conflicts-for-f1 \
10125 "
10126 PACKAGECONFIG[f2] = "\
10127 ... and so on and so on ...
10128 </literallayout>
10129 </para>
10130
10131 <para>
10132 The <filename>PACKAGECONFIG</filename>
10133 variable itself specifies a space-separated list of the
10134 features to enable.
10135 Following the features, you can determine the behavior of
10136 each feature by providing up to six order-dependent
10137 arguments, which are separated by commas.
10138 You can omit any argument you like but must retain the
10139 separating commas.
10140 The order is important and specifies the following:
10141 <orderedlist>
10142 <listitem><para>Extra arguments
10143 that should be added to the configure script
10144 argument list
10145 (<link linkend='var-EXTRA_OECONF'><filename>EXTRA_OECONF</filename></link>
10146 or
10147 <link linkend='var-PACKAGECONFIG_CONFARGS'><filename>PACKAGECONFIG_CONFARGS</filename></link>)
10148 if the feature is enabled.</para></listitem>
10149 <listitem><para>Extra arguments
10150 that should be added to <filename>EXTRA_OECONF</filename>
10151 or <filename>PACKAGECONFIG_CONFARGS</filename>
10152 if the feature is disabled.
10153 </para></listitem>
10154 <listitem><para>Additional build dependencies
10155 (<link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>)
10156 that should be added if the feature is enabled.
10157 </para></listitem>
10158 <listitem><para>Additional runtime dependencies
10159 (<link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>)
10160 that should be added if the feature is enabled.
10161 </para></listitem>
10162 <listitem><para>Additional runtime recommendations
10163 (<link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>)
10164 that should be added if the feature is enabled.
10165 </para></listitem>
10166 <listitem><para>Any conflicting (that is, mutually
10167 exclusive) <filename>PACKAGECONFIG</filename>
10168 settings for this feature.
10169 </para></listitem>
10170 </orderedlist>
10171 </para>
10172
10173 <para>
10174 Consider the following
10175 <filename>PACKAGECONFIG</filename> block taken from the
10176 <filename>librsvg</filename> recipe.
10177 In this example the feature is <filename>gtk</filename>,
10178 which has three arguments that determine the feature's
10179 behavior.
10180 <literallayout class='monospaced'>
10181 PACKAGECONFIG[gtk] = "--with-gtk3,--without-gtk3,gtk+3"
10182 </literallayout>
10183 The <filename>--with-gtk3</filename> and
10184 <filename>gtk+3</filename> arguments apply only if
10185 the feature is enabled.
10186 In this case, <filename>--with-gtk3</filename> is
10187 added to the configure script argument list and
10188 <filename>gtk+3</filename> is added to
10189 <filename>DEPENDS</filename>.
10190 On the other hand, if the feature is disabled say through
10191 a <filename>.bbappend</filename> file in another layer, then
10192 the second argument <filename>--without-gtk3</filename> is
10193 added to the configure script instead.
10194 </para>
10195
10196 <para>
10197 The basic <filename>PACKAGECONFIG</filename> structure
10198 previously described holds true regardless of whether you
10199 are creating a block or changing a block.
10200 When creating a block, use the structure inside your
10201 recipe.
10202 </para>
10203
10204 <para>
10205 If you want to change an existing
10206 <filename>PACKAGECONFIG</filename> block, you can do so
10207 one of two ways:
10208 <itemizedlist>
10209 <listitem><para><emphasis>Append file:</emphasis>
10210 Create an append file named
10211 <replaceable>recipename</replaceable><filename>.bbappend</filename>
10212 in your layer and override the value of
10213 <filename>PACKAGECONFIG</filename>.
10214 You can either completely override the variable:
10215 <literallayout class='monospaced'>
10216 PACKAGECONFIG = "f4 f5"
10217 </literallayout>
10218 Or, you can just append the variable:
10219 <literallayout class='monospaced'>
10220 PACKAGECONFIG_append = " f4"
10221 </literallayout></para></listitem>
10222 <listitem><para><emphasis>Configuration file:</emphasis>
10223 This method is identical to changing the block
10224 through an append file except you edit your
10225 <filename>local.conf</filename> or
10226 <filename><replaceable>mydistro</replaceable>.conf</filename> file.
10227 As with append files previously described,
10228 you can either completely override the variable:
10229 <literallayout class='monospaced'>
10230 PACKAGECONFIG_pn-<replaceable>recipename</replaceable> = "f4 f5"
10231 </literallayout>
10232 Or, you can just amend the variable:
10233 <literallayout class='monospaced'>
10234 PACKAGECONFIG_append_pn-<replaceable>recipename</replaceable> = " f4"
10235 </literallayout></para></listitem>
10236 </itemizedlist>
10237 </para>
10238 </glossdef>
10239 </glossentry>
10240
10241 <glossentry id='var-PACKAGECONFIG_CONFARGS'><glossterm>PACKAGECONFIG_CONFARGS</glossterm>
10242 <info>
10243 PACKAGECONFIG_CONFARGS[doc] = "A space-separated list of configuration options generated from the PACKAGECONFIG setting."
10244 </info>
10245 <glossdef>
10246 <para role="glossdeffirst">
10247 A space-separated list of configuration options generated
10248 from the
10249 <link linkend='var-PACKAGECONFIG'><filename>PACKAGECONFIG</filename></link>
10250 setting.
10251 </para>
10252
10253 <para>
10254 Classes such as
10255 <link linkend='ref-classes-autotools'><filename>autotools</filename></link>
10256 and
10257 <link linkend='ref-classes-cmake'><filename>cmake</filename></link>
10258 use <filename>PACKAGECONFIG_CONFARGS</filename> to pass
10259 <filename>PACKAGECONFIG</filename> options to
10260 <filename>configure</filename> and
10261 <filename>cmake</filename>, respectively.
10262 If you are using
10263 <filename>PACKAGECONFIG</filename> but not a class that
10264 handles the <filename>do_configure</filename> task, then
10265 you need to use
10266 <filename>PACKAGECONFIG_CONFARGS</filename> appropriately.
10267 </para>
10268 </glossdef>
10269 </glossentry>
10270
10271 <glossentry id='var-PACKAGEGROUP_DISABLE_COMPLEMENTARY'><glossterm>PACKAGEGROUP_DISABLE_COMPLEMENTARY</glossterm>
10272 <info>
10273 PACKAGEGROUP_DISABLE_COMPLEMENTARY[doc] = "Prevents automatic creation of the normal complementary packages such as -dev and -dbg in a packagegroup recipe."
10274 </info>
10275 <glossdef>
10276 <para role="glossdeffirst">
10277 For recipes inheriting the
10278 <link linkend='ref-classes-packagegroup'><filename>packagegroup</filename></link>
10279 class, setting
10280 <filename>PACKAGEGROUP_DISABLE_COMPLEMENTARY</filename> to
10281 "1" specifies that the normal complementary packages
10282 (i.e. <filename>-dev</filename>,
10283 <filename>-dbg</filename>, and so forth) should not be
10284 automatically created by the
10285 <filename>packagegroup</filename> recipe, which is the
10286 default behavior.
10287 </para>
10288 </glossdef>
10289 </glossentry>
10290
10291 <glossentry id='var-PACKAGES'><glossterm>PACKAGES</glossterm>
10292 <info>
10293 PACKAGES[doc] = "The list of packages the recipe creates."
10294 </info>
10295 <glossdef>
10296 <para role="glossdeffirst">
10297 The list of packages the recipe creates.
10298 The default value is the following:
10299 <literallayout class='monospaced'>
10300 ${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}
10301 </literallayout>
10302 </para>
10303
10304 <para>
10305 During packaging, the
10306 <link linkend='ref-tasks-package'><filename>do_package</filename></link>
10307 task goes through <filename>PACKAGES</filename> and uses
10308 the
10309 <link linkend='var-FILES'><filename>FILES</filename></link>
10310 variable corresponding to each package to assign files to
10311 the package.
10312 If a file matches the <filename>FILES</filename> variable
10313 for more than one package in <filename>PACKAGES</filename>,
10314 it will be assigned to the earliest (leftmost) package.
10315 </para>
10316
10317 <para>
10318 Packages in the variable's list that are empty (i.e. where
10319 none of the patterns in
10320 <filename>FILES_</filename><replaceable>pkg</replaceable>
10321 match any files installed by the
10322 <link linkend='ref-tasks-install'><filename>do_install</filename></link>
10323 task) are not generated, unless generation is forced through
10324 the
10325 <link linkend='var-ALLOW_EMPTY'><filename>ALLOW_EMPTY</filename></link>
10326 variable.
10327 </para>
10328 </glossdef>
10329 </glossentry>
10330
10331 <glossentry id='var-PACKAGES_DYNAMIC'><glossterm>PACKAGES_DYNAMIC</glossterm>
10332 <info>
10333 PACKAGES_DYNAMIC[doc] = "A promise that your recipe satisfies runtime dependencies for optional modules that are found in other recipes."
10334 </info>
10335 <glossdef>
10336 <para role="glossdeffirst">
10337 A promise that your recipe satisfies runtime dependencies
10338 for optional modules that are found in other recipes.
10339 <filename>PACKAGES_DYNAMIC</filename>
10340 does not actually satisfy the dependencies, it only states that
10341 they should be satisfied.
10342 For example, if a hard, runtime dependency
10343 (<link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>)
10344 of another package is satisfied
10345 at build time through the <filename>PACKAGES_DYNAMIC</filename>
10346 variable, but a package with the module name is never actually
10347 produced, then the other package will be broken.
10348 Thus, if you attempt to include that package in an image,
10349 you will get a dependency failure from the packaging system
10350 during the
10351 <link linkend='ref-tasks-rootfs'><filename>do_rootfs</filename></link>
10352 task.
10353 </para>
10354
10355 <para>
10356 Typically, if there is a chance that such a situation can
10357 occur and the package that is not created is valid
10358 without the dependency being satisfied, then you should use
10359 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>
10360 (a soft runtime dependency) instead of
10361 <filename>RDEPENDS</filename>.
10362 </para>
10363
10364 <para>
10365 For an example of how to use the <filename>PACKAGES_DYNAMIC</filename>
10366 variable when you are splitting packages, see the
10367 "<ulink url='&YOCTO_DOCS_DEV_URL;#handling-optional-module-packaging'>Handling Optional Module Packaging</ulink>" section
10368 in the Yocto Project Development Tasks Manual.
10369 </para>
10370 </glossdef>
10371 </glossentry>
10372
10373 <glossentry id='var-PACKAGESPLITFUNCS'><glossterm>PACKAGESPLITFUNCS</glossterm>
10374 <info>
10375 PACKAGESPLITFUNCS[doc] = "Specifies a list of functions run to perform additional splitting of files into individual packages."
10376 </info>
10377 <glossdef>
10378 <para role="glossdeffirst">
10379 Specifies a list of functions run to perform additional
10380 splitting of files into individual packages.
10381 Recipes can either prepend to this variable or prepend
10382 to the <filename>populate_packages</filename> function
10383 in order to perform additional package splitting.
10384 In either case, the function should set
10385 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>,
10386 <link linkend='var-FILES'><filename>FILES</filename></link>,
10387 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>
10388 and other packaging variables appropriately in order to
10389 perform the desired splitting.
10390 </para>
10391 </glossdef>
10392 </glossentry>
10393
10394 <glossentry id='var-PARALLEL_MAKE'><glossterm>PARALLEL_MAKE</glossterm>
10395 <info>
10396 PARALLEL_MAKE[doc] = "Specifies extra options that are passed to the make command during the compile tasks. This variable is usually in the form -j x, where x represents the maximum number of parallel threads make can run."
10397 </info>
10398 <glossdef>
10399 <para role="glossdeffirst">
10400 Extra options passed to the <filename>make</filename>
10401 command during the
10402 <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>
10403 task in order to specify parallel compilation on the local
10404 build host.
10405 This variable is usually in the form "-j <replaceable>x</replaceable>",
10406 where <replaceable>x</replaceable> represents the maximum
10407 number of parallel threads <filename>make</filename> can
10408 run.
10409 <note><title>Caution</title>
10410 In order for <filename>PARALLEL_MAKE</filename> to be
10411 effective, <filename>make</filename> must be called
10412 with
10413 <filename>${</filename><link linkend='var-EXTRA_OEMAKE'><filename>EXTRA_OEMAKE</filename></link><filename>}</filename>.
10414 An easy way to ensure this is to use the
10415 <filename>oe_runmake</filename> function.
10416 </note>
10417 </para>
10418
10419 <para>
10420 By default, the OpenEmbedded build system automatically
10421 sets this variable to be equal to the number of cores the
10422 build system uses.
10423 <note>
10424 If the software being built experiences dependency
10425 issues during the <filename>do_compile</filename>
10426 task that result in race conditions, you can clear
10427 the <filename>PARALLEL_MAKE</filename> variable within
10428 the recipe as a workaround.
10429 For information on addressing race conditions, see the
10430 "<ulink url='&YOCTO_DOCS_DEV_URL;#debugging-parallel-make-races'>Debugging Parallel Make Races</ulink>"
10431 section in the Yocto Project Development Tasks Manual.
10432 </note>
10433 For single socket systems (i.e. one CPU), you should not
10434 have to override this variable to gain optimal parallelism
10435 during builds.
10436 However, if you have very large systems that employ
10437 multiple physical CPUs, you might want to make sure the
10438 <filename>PARALLEL_MAKE</filename> variable is not
10439 set higher than "-j 20".
10440 </para>
10441
10442 <para>
10443 For more information on speeding up builds, see the
10444 "<ulink url='&YOCTO_DOCS_DEV_URL;#speeding-up-a-build'>Speeding Up a Build</ulink>"
10445 section in the Yocto Project Development Tasks Manual.
10446 </para>
10447 </glossdef>
10448 </glossentry>
10449
10450 <glossentry id='var-PARALLEL_MAKEINST'><glossterm>PARALLEL_MAKEINST</glossterm>
10451 <info>
10452 PARALLEL_MAKEINST[doc] = "Extra options passed to the make install command during the do_install task in order to specify parallel installation."
10453 </info>
10454 <glossdef>
10455 <para role="glossdeffirst">
10456 Extra options passed to the
10457 <filename>make install</filename> command during the
10458 <link linkend='ref-tasks-install'><filename>do_install</filename></link>
10459 task in order to specify parallel installation.
10460 This variable defaults to the value of
10461 <link linkend='var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></link>.
10462 <note><title>Notes and Cautions</title>
10463 <para>In order for <filename>PARALLEL_MAKEINST</filename>
10464 to be
10465 effective, <filename>make</filename> must be called
10466 with
10467 <filename>${</filename><link linkend='var-EXTRA_OEMAKE'><filename>EXTRA_OEMAKE</filename></link><filename>}</filename>.
10468 An easy way to ensure this is to use the
10469 <filename>oe_runmake</filename> function.</para>
10470
10471 <para>If the software being built experiences
10472 dependency issues during the
10473 <filename>do_install</filename> task that result in
10474 race conditions, you can clear the
10475 <filename>PARALLEL_MAKEINST</filename> variable within
10476 the recipe as a workaround.
10477 For information on addressing race conditions, see the
10478 "<ulink url='&YOCTO_DOCS_DEV_URL;#debugging-parallel-make-races'>Debugging Parallel Make Races</ulink>"
10479 section in the Yocto Project Development Tasks Manual.
10480 </para>
10481 </note>
10482 </para>
10483 </glossdef>
10484 </glossentry>
10485
10486 <glossentry id='var-PATCHRESOLVE'><glossterm>PATCHRESOLVE</glossterm>
10487 <info>
10488 PATCHRESOLVE[doc] = "Enable or disable interactive patch resolution."
10489 </info>
10490 <glossdef>
10491 <para role="glossdeffirst">
10492 Determines the action to take when a patch fails.
10493 You can set this variable to one of two values: "noop" and
10494 "user".
10495 </para>
10496
10497 <para>
10498 The default value of "noop" causes the build to simply fail
10499 when the OpenEmbedded build system cannot successfully
10500 apply a patch.
10501 Setting the value to "user" causes the build system to
10502 launch a shell and places you in the right location so that
10503 you can manually resolve the conflicts.
10504 </para>
10505
10506 <para>
10507 Set this variable in your
10508 <filename>local.conf</filename> file.
10509 </para>
10510 </glossdef>
10511 </glossentry>
10512
10513 <glossentry id='var-PATCHTOOL'><glossterm>PATCHTOOL</glossterm>
10514 <info>
10515 PATCHTOOL[doc] = "Specifies the utility used to apply patches for a recipe during do_patch."
10516 </info>
10517 <glossdef>
10518 <para role="glossdeffirst">
10519 Specifies the utility used to apply patches for a recipe
10520 during the
10521 <link linkend='ref-tasks-patch'><filename>do_patch</filename></link>
10522 task.
10523 You can specify one of three utilities: "patch", "quilt", or
10524 "git".
10525 The default utility used is "quilt" except for the
10526 quilt-native recipe itself.
10527 Because the quilt tool is not available at the
10528 time quilt-native is being patched, it uses "patch".
10529 </para>
10530
10531 <para>
10532 If you wish to use an alternative patching tool, set the
10533 variable in the recipe using one of the following:
10534 <literallayout class='monospaced'>
10535 PATCHTOOL = "patch"
10536 PATCHTOOL = "quilt"
10537 PATCHTOOL = "git"
10538 </literallayout>
10539 </para>
10540 </glossdef>
10541 </glossentry>
10542
10543 <glossentry id='var-PE'><glossterm>PE</glossterm>
10544 <info>
10545 PE[doc] = "The epoch of the recipe. The default value is '0'. The field is used to make upgrades possible when the versioning scheme changes in some backwards incompatible way."
10546 </info>
10547 <glossdef>
10548 <para role="glossdeffirst">
10549 The epoch of the recipe.
10550 By default, this variable is unset.
10551 The variable is used to make upgrades possible when the
10552 versioning scheme changes in some backwards incompatible
10553 way.
10554 </para>
10555
10556 <para>
10557 <filename>PE</filename> is the default value of the
10558 <link linkend='var-PKGE'><filename>PKGE</filename></link>
10559 variable.
10560 </para>
10561 </glossdef>
10562 </glossentry>
10563
10564 <glossentry id='var-PF'><glossterm>PF</glossterm>
10565 <info>
10566 PF[doc] = "Specifies the recipe or package name and includes all version and revision numbers. This variable is comprised of ${PN}-${EXTENDPE}${PV}-${PR}."
10567 </info>
10568 <glossdef>
10569 <para role="glossdeffirst">
10570 Specifies the recipe or package name and includes all version and revision
10571 numbers (i.e. <filename>glibc-2.13-r20+svnr15508/</filename> and
10572 <filename>bash-4.2-r1/</filename>).
10573 This variable is comprised of the following:
10574 <literallayout class='monospaced'>
10575 ${<link linkend='var-PN'>PN</link>}-${<link linkend='var-EXTENDPE'>EXTENDPE</link>}${<link linkend='var-PV'>PV</link>}-${<link linkend='var-PR'>PR</link>}
10576 </literallayout>
10577 </para>
10578 </glossdef>
10579 </glossentry>
10580
10581 <glossentry id='var-PIXBUF_PACKAGES'><glossterm>PIXBUF_PACKAGES</glossterm>
10582 <info>
10583 PIXBUF_PACKAGES[doc] = "When a recipe inherits the pixbufcache class, this variable identifies packages that contain the pixbuf loaders used with gdk-pixbuf."
10584 </info>
10585 <glossdef>
10586 <para role="glossdeffirst">
10587 When inheriting the
10588 <link linkend='ref-classes-pixbufcache'><filename>pixbufcache</filename></link>
10589 class, this variable identifies packages that contain
10590 the pixbuf loaders used with
10591 <filename>gdk-pixbuf</filename>.
10592 By default, the <filename>pixbufcache</filename> class
10593 assumes that the loaders are in the recipe's main package
10594 (i.e. <filename>${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}</filename>).
10595 Use this variable if the loaders you need are in a package
10596 other than that main package.
10597 </para>
10598 </glossdef>
10599 </glossentry>
10600
10601 <glossentry id='var-PKG'><glossterm>PKG</glossterm>
10602 <info>
10603 PKG[doc] = "The name of the resulting package created by the OpenEmbedded build system. When you use this variable, you must use a package name override."
10604 </info>
10605 <glossdef>
10606 <para role="glossdeffirst">
10607 The name of the resulting package created by the
10608 OpenEmbedded build system.
10609 <note>
10610 When using the <filename>PKG</filename> variable, you
10611 must use a package name override.
10612 </note>
10613 </para>
10614
10615 <para>
10616 For example, when the
10617 <link linkend='ref-classes-debian'><filename>debian</filename></link>
10618 class renames the output package, it does so by setting
10619 <filename>PKG_<replaceable>packagename</replaceable></filename>.
10620 </para>
10621 </glossdef>
10622 </glossentry>
10623
10624 <glossentry id='var-PKG_CONFIG_PATH'><glossterm>PKG_CONFIG_PATH</glossterm>
10625 <info>
10626 PKG_CONFIG_PATH[doc] = "Path to pkg-config files for the current build context."
10627 </info>
10628 <glossdef>
10629 <para role="glossdeffirst">
10630 The path to <filename>pkg-config</filename> files for the
10631 current build context.
10632 <filename>pkg-config</filename> reads this variable
10633 from the environment.
10634 </para>
10635 </glossdef>
10636 </glossentry>
10637
10638 <glossentry id='var-PKGD'><glossterm>PKGD</glossterm>
10639 <info>
10640 PKGD[doc] = "Points to the destination directory for files to be packaged before they are split into individual packages."
10641 </info>
10642 <glossdef>
10643 <para role="glossdeffirst">
10644 Points to the destination directory for files to be
10645 packaged before they are split into individual packages.
10646 This directory defaults to the following:
10647 <literallayout class='monospaced'>
10648 ${WORKDIR}/package
10649 </literallayout>
10650 </para>
10651
10652 <para>
10653 Do not change this default.
10654 </para>
10655 </glossdef>
10656 </glossentry>
10657
10658 <glossentry id='var-PKGDATA_DIR'><glossterm>PKGDATA_DIR</glossterm>
10659 <info>
10660 PKGDATA_DIR[doc] = "Points to a shared, global-state directory that holds data generated during the packaging process."
10661 </info>
10662 <glossdef>
10663 <para role="glossdeffirst">
10664 Points to a shared, global-state directory that holds data
10665 generated during the packaging process.
10666 During the packaging process, the
10667 <link linkend='ref-tasks-packagedata'><filename>do_packagedata</filename></link>
10668 task packages data for each recipe and installs it into
10669 this temporary, shared area.
10670 This directory defaults to the following, which you should
10671 not change:
10672 <literallayout class='monospaced'>
10673 ${STAGING_DIR_HOST}/pkgdata
10674 </literallayout>
10675 For examples of how this data is used, see the
10676 "<ulink url='&YOCTO_DOCS_OM_URL;#automatically-added-runtime-dependencies'>Automatically Added Runtime Dependencies</ulink>"
10677 section in the Yocto Project Overview and Concepts Manual
10678 and the
10679 "<ulink url='&YOCTO_DOCS_DEV_URL;#viewing-package-information-with-oe-pkgdata-util'>Viewing Package Information with <filename>oe-pkgdata-util</filename></ulink>"
10680 section in the Yocto Project Development Tasks Manual.
10681 For more information on the shared, global-state directory,
10682 see
10683 <link linkend='var-STAGING_DIR_HOST'><filename>STAGING_DIR_HOST</filename></link>.
10684 </para>
10685 </glossdef>
10686 </glossentry>
10687
10688 <glossentry id='var-PKGDEST'><glossterm>PKGDEST</glossterm>
10689 <info>
10690 PKGDEST[doc] = "Points to the parent directory for files to be packaged after they have been split into individual packages."
10691 </info>
10692 <glossdef>
10693 <para role="glossdeffirst">
10694 Points to the parent directory for files to be packaged
10695 after they have been split into individual packages.
10696 This directory defaults to the following:
10697 <literallayout class='monospaced'>
10698 ${WORKDIR}/packages-split
10699 </literallayout>
10700 </para>
10701
10702 <para>
10703 Under this directory, the build system creates
10704 directories for each package specified in
10705 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>.
10706 Do not change this default.
10707 </para>
10708 </glossdef>
10709 </glossentry>
10710
10711 <glossentry id='var-PKGDESTWORK'><glossterm>PKGDESTWORK</glossterm>
10712 <info>
10713 PKGDESTWORK[doc] = "Points to a temporary work area where the do_package task saves package metadata."
10714 </info>
10715 <glossdef>
10716 <para role="glossdeffirst">
10717 Points to a temporary work area where the
10718 <link linkend='ref-tasks-package'><filename>do_package</filename></link>
10719 task saves package metadata.
10720 The <filename>PKGDESTWORK</filename> location defaults to
10721 the following:
10722 <literallayout class='monospaced'>
10723 ${WORKDIR}/pkgdata
10724 </literallayout>
10725 Do not change this default.
10726 </para>
10727
10728 <para>
10729 The
10730 <link linkend='ref-tasks-packagedata'><filename>do_packagedata</filename></link>
10731 task copies the package metadata from
10732 <filename>PKGDESTWORK</filename> to
10733 <link linkend='var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></link>
10734 to make it available globally.
10735 </para>
10736 </glossdef>
10737 </glossentry>
10738
10739 <glossentry id='var-PKGE'><glossterm>PKGE</glossterm>
10740 <info>
10741 PKGE[doc] = "The epoch of the package(s) built by the recipe."
10742 </info>
10743 <glossdef>
10744 <para role="glossdeffirst">
10745 The epoch of the package(s) built by the recipe.
10746 By default, <filename>PKGE</filename> is set to
10747 <link linkend='var-PE'><filename>PE</filename></link>.
10748 </para>
10749 </glossdef>
10750 </glossentry>
10751
10752 <glossentry id='var-PKGR'><glossterm>PKGR</glossterm>
10753 <info>
10754 PKGR[doc] = "The revision of the package(s) built by the recipe."
10755 </info>
10756 <glossdef>
10757 <para role="glossdeffirst">
10758 The revision of the package(s) built by the recipe.
10759 By default, <filename>PKGR</filename> is set to
10760 <link linkend='var-PR'><filename>PR</filename></link>.
10761 </para>
10762 </glossdef>
10763 </glossentry>
10764
10765 <glossentry id='var-PKGV'><glossterm>PKGV</glossterm>
10766 <info>
10767 PKGV[doc] = "The version of the package(s) built by the recipe."
10768 </info>
10769 <glossdef>
10770 <para role="glossdeffirst">
10771 The version of the package(s) built by the
10772 recipe.
10773 By default, <filename>PKGV</filename> is set to
10774 <link linkend='var-PV'><filename>PV</filename></link>.
10775 </para>
10776 </glossdef>
10777 </glossentry>
10778
10779 <glossentry id='var-PN'><glossterm>PN</glossterm>
10780 <info>
10781 PN[doc] = "PN refers to a recipe name in the context of a file used by the OpenEmbedded build system as input to create a package."
10782 </info>
10783 <glossdef>
10784 <para role="glossdeffirst">
10785 This variable can have two separate functions depending on the context: a recipe
10786 name or a resulting package name.
10787 </para>
10788
10789 <para>
10790 <filename>PN</filename> refers to a recipe name in the context of a file used
10791 by the OpenEmbedded build system as input to create a package.
10792 The name is normally extracted from the recipe file name.
10793 For example, if the recipe is named
10794 <filename>expat_2.0.1.bb</filename>, then the default value of <filename>PN</filename>
10795 will be "expat".
10796 </para>
10797
10798 <para>
10799 The variable refers to a package name in the context of a file created or produced by the
10800 OpenEmbedded build system.
10801 </para>
10802
10803 <para>
10804 If applicable, the <filename>PN</filename> variable also contains any special
10805 suffix or prefix.
10806 For example, using <filename>bash</filename> to build packages for the native
10807 machine, <filename>PN</filename> is <filename>bash-native</filename>.
10808 Using <filename>bash</filename> to build packages for the target and for Multilib,
10809 <filename>PN</filename> would be <filename>bash</filename> and
10810 <filename>lib64-bash</filename>, respectively.
10811 </para>
10812 </glossdef>
10813 </glossentry>
10814
10815 <glossentry id='var-PNBLACKLIST'><glossterm>PNBLACKLIST</glossterm>
10816 <info>
10817 PNBLACKLIST[doc] = "Lists recipes you do not want the OpenEmbedded build system to build."
10818 </info>
10819 <glossdef>
10820 <para role="glossdeffirst">
10821 Lists recipes you do not want the OpenEmbedded build system
10822 to build.
10823 This variable works in conjunction with the
10824 <link linkend='ref-classes-blacklist'><filename>blacklist</filename></link>
10825 class, which is inherited globally.
10826 </para>
10827
10828 <para>
10829 To prevent a recipe from being built, use the
10830 <filename>PNBLACKLIST</filename> variable in your
10831 <filename>local.conf</filename> file.
10832 Here is an example that prevents
10833 <filename>myrecipe</filename> from being built:
10834 <literallayout class='monospaced'>
10835 PNBLACKLIST[myrecipe] = "Not supported by our organization."
10836 </literallayout>
10837 </para>
10838 </glossdef>
10839 </glossentry>
10840
10841 <glossentry id='var-POPULATE_SDK_POST_HOST_COMMAND'><glossterm>POPULATE_SDK_POST_HOST_COMMAND</glossterm>
10842 <info>
10843 POPULATE_SDK_POST_HOST_COMMAND[doc] = "Specifies a list of functions to call once the OpenEmbedded build system has created host part of the SDK."
10844 </info>
10845 <glossdef>
10846 <para role="glossdeffirst">
10847 Specifies a list of functions to call once the
10848 OpenEmbedded build system has created the host part of
10849 the SDK.
10850 You can specify functions separated by semicolons:
10851 <literallayout class='monospaced'>
10852 POPULATE_SDK_POST_HOST_COMMAND += "<replaceable>function</replaceable>; ... "
10853 </literallayout>
10854 </para>
10855
10856 <para>
10857 If you need to pass the SDK path to a command
10858 within a function, you can use
10859 <filename>${SDK_DIR}</filename>, which points to
10860 the parent directory used by the OpenEmbedded build
10861 system when creating SDK output.
10862 See the
10863 <link linkend='var-SDK_DIR'><filename>SDK_DIR</filename></link>
10864 variable for more information.
10865 </para>
10866 </glossdef>
10867 </glossentry>
10868
10869 <glossentry id='var-POPULATE_SDK_POST_TARGET_COMMAND'><glossterm>POPULATE_SDK_POST_TARGET_COMMAND</glossterm>
10870 <info>
10871 POPULATE_SDK_POST_TARGET_COMMAND[doc] = "Specifies a list of functions to call once the OpenEmbedded build system has created target part of the SDK."
10872 </info>
10873 <glossdef>
10874 <para role="glossdeffirst">
10875 Specifies a list of functions to call once the
10876 OpenEmbedded build system has created the target part of
10877 the SDK.
10878 You can specify functions separated by semicolons:
10879 <literallayout class='monospaced'>
10880 POPULATE_SDK_POST_TARGET_COMMAND += "<replaceable>function</replaceable>; ... "
10881 </literallayout>
10882 </para>
10883
10884 <para>
10885 If you need to pass the SDK path to a command
10886 within a function, you can use
10887 <filename>${SDK_DIR}</filename>, which points to
10888 the parent directory used by the OpenEmbedded build
10889 system when creating SDK output.
10890 See the
10891 <link linkend='var-SDK_DIR'><filename>SDK_DIR</filename></link>
10892 variable for more information.
10893 </para>
10894 </glossdef>
10895 </glossentry>
10896
10897 <glossentry id='var-PR'><glossterm>PR</glossterm>
10898 <info>
10899 PR[doc] = "The revision of the recipe. The default value for this variable is 'r0'."
10900 </info>
10901 <glossdef>
10902 <para role="glossdeffirst">
10903 The revision of the recipe. The default value for this
10904 variable is "r0".
10905 Subsequent revisions of the recipe conventionally have the
10906 values "r1", "r2", and so forth.
10907 When
10908 <link linkend='var-PV'><filename>PV</filename></link>
10909 increases, <filename>PR</filename> is conventionally reset
10910 to "r0".
10911 <note>
10912 The OpenEmbedded build system does not need the aid of
10913 <filename>PR</filename> to know when to rebuild a
10914 recipe.
10915 The build system uses the task
10916 <ulink url='&YOCTO_DOCS_OM_URL;#overview-checksums'>input checksums</ulink>
10917 along with the
10918 <link linkend='structure-build-tmp-stamps'>stamp</link>
10919 and
10920 <ulink url='&YOCTO_DOCS_OM_URL;#shared-state-cache'>shared state cache</ulink>
10921 mechanisms.
10922 </note>
10923 The <filename>PR</filename> variable primarily becomes
10924 significant when a package manager dynamically installs
10925 packages on an already built image.
10926 In this case, <filename>PR</filename>, which is the default
10927 value of
10928 <link linkend='var-PKGR'><filename>PKGR</filename></link>,
10929 helps the package manager distinguish which package is the
10930 most recent one in cases where many packages have the same
10931 <filename>PV</filename> (i.e. <filename>PKGV</filename>).
10932 A component having many packages with the same
10933 <filename>PV</filename> usually means that the packages all
10934 install the same upstream version, but with later
10935 (<filename>PR</filename>) version packages including
10936 packaging fixes.
10937 <note>
10938 <filename>PR</filename> does not need to be increased
10939 for changes that do not change the package contents or
10940 metadata.
10941 </note>
10942 Because manually managing <filename>PR</filename> can be
10943 cumbersome and error-prone, an automated solution exists.
10944 See the
10945 "<ulink url='&YOCTO_DOCS_DEV_URL;#working-with-a-pr-service'>Working With a PR Service</ulink>"
10946 section in the Yocto Project Development Tasks Manual
10947 for more information.
10948 </para>
10949 </glossdef>
10950 </glossentry>
10951
10952 <glossentry id='var-PREFERRED_PROVIDER'><glossterm>PREFERRED_PROVIDER</glossterm>
10953 <info>
10954 PREFERRED_PROVIDER[doc] = "If multiple recipes provide an item, this variable determines which recipe should be given preference."
10955 </info>
10956 <glossdef>
10957 <para role="glossdeffirst">
10958 If multiple recipes provide the same item, this variable
10959 determines which recipe is preferred and thus provides
10960 the item (i.e. the preferred provider).
10961 You should always suffix this variable with the name of the
10962 provided item.
10963 And, you should define the variable using the preferred
10964 recipe's name
10965 (<link linkend='var-PN'><filename>PN</filename></link>).
10966 Here is a common example:
10967 <literallayout class='monospaced'>
10968 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
10969 </literallayout>
10970 In the previous example, multiple recipes are providing
10971 "virtual/kernel".
10972 The <filename>PREFERRED_PROVIDER</filename> variable is
10973 set with the name (<filename>PN</filename>) of the recipe
10974 you prefer to provide "virtual/kernel".
10975 </para>
10976
10977 <para>
10978 Following are more examples:
10979 <literallayout class='monospaced'>
10980 PREFERRED_PROVIDER_virtual/xserver = "xserver-xf86"
10981 PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
10982 </literallayout>
10983 For more information, see the
10984 "<ulink url='&YOCTO_DOCS_DEV_URL;#metadata-virtual-providers'>Using Virtual Providers</ulink>"
10985 section in the Yocto Project Development Tasks Manual.
10986 <note>
10987 If you use a <filename>virtual/*</filename> item
10988 with <filename>PREFERRED_PROVIDER</filename>, then any
10989 recipe that
10990 <link linkend='var-PROVIDES'><filename>PROVIDES</filename></link>
10991 that item but is not selected (defined) by
10992 <filename>PREFERRED_PROVIDER</filename> is prevented
10993 from building, which is usually desirable since this
10994 mechanism is designed to select between mutually
10995 exclusive alternative providers.
10996 </note>
10997 </para>
10998 </glossdef>
10999 </glossentry>
11000
11001 <glossentry id='var-PREFERRED_VERSION'><glossterm>PREFERRED_VERSION</glossterm>
11002 <info>
11003 PREFERRED_VERSION[doc] = "If there are multiple versions of recipes available, this variable determines which recipe should be given preference."
11004 </info>
11005 <glossdef>
11006 <para role="glossdeffirst">
11007 If multiple versions of recipes exist, this
11008 variable determines which version is given preference.
11009 You must always suffix the variable with the
11010 <link linkend='var-PN'><filename>PN</filename></link>
11011 you want to select, and you should set the
11012 <link linkend='var-PV'><filename>PV</filename></link>
11013 accordingly for precedence.
11014 </para>
11015
11016 <para>
11017 The <filename>PREFERRED_VERSION</filename> variable
11018 supports limited wildcard use through the
11019 "<filename>%</filename>" character.
11020 You can use the character to match any number of
11021 characters, which can be useful when specifying versions
11022 that contain long revision numbers that potentially change.
11023 Here are two examples:
11024 <literallayout class='monospaced'>
11025 PREFERRED_VERSION_python = "3.4.0"
11026 PREFERRED_VERSION_linux-yocto = "5.0%"
11027 </literallayout>
11028 <note><title>Important</title>
11029 The use of the "<filename>%</filename>" character
11030 is limited in that it only works at the end of the
11031 string.
11032 You cannot use the wildcard character in any other
11033 location of the string.
11034 </note>
11035 </para>
11036
11037 <para>
11038 The specified version is matched against
11039 <link linkend='var-PV'><filename>PV</filename></link>,
11040 which does not necessarily match the version part of
11041 the recipe's filename.
11042 For example, consider two recipes
11043 <filename>foo_1.2.bb</filename> and
11044 <filename>foo_git.bb</filename> where
11045 <filename>foo_git.bb</filename> contains the following
11046 assignment:
11047 <literallayout class='monospaced'>
11048 PV = "1.1+git${SRCPV}"
11049 </literallayout>
11050 In this case, the correct way to select
11051 <filename>foo_git.bb</filename> is by using an
11052 assignment such as the following:
11053 <literallayout class='monospaced'>
11054 PREFERRED_VERSION_foo = "1.1+git%"
11055 </literallayout>
11056 Compare that previous example against the following
11057 incorrect example, which does not work:
11058 <literallayout class='monospaced'>
11059 PREFERRED_VERSION_foo = "git"
11060 </literallayout>
11061 </para>
11062
11063 <para>
11064 Sometimes the <filename>PREFERRED_VERSION</filename>
11065 variable can be set by configuration files in a way that
11066 is hard to change.
11067 You can use
11068 <link linkend='var-OVERRIDES'><filename>OVERRIDES</filename></link>
11069 to set a machine-specific override.
11070 Here is an example:
11071 <literallayout class='monospaced'>
11072 PREFERRED_VERSION_linux-yocto_qemux86 = "5.0%"
11073 </literallayout>
11074 Although not recommended, worst case, you can also use the
11075 "forcevariable" override, which is the strongest override
11076 possible.
11077 Here is an example:
11078 <literallayout class='monospaced'>
11079 PREFERRED_VERSION_linux-yocto_forcevariable = "5.0%"
11080 </literallayout>
11081 <note>
11082 The <filename>_forcevariable</filename> override is
11083 not handled specially.
11084 This override only works because the default value of
11085 <filename>OVERRIDES</filename> includes
11086 "forcevariable".
11087 </note>
11088 </para>
11089 </glossdef>
11090 </glossentry>
11091
11092 <glossentry id='var-PREMIRRORS'><glossterm>PREMIRRORS</glossterm>
11093 <info>
11094 PREMIRRORS[doc] = "Specifies additional paths from which the OpenEmbedded build system gets source code."
11095 </info>
11096 <glossdef>
11097 <para role="glossdeffirst">
11098 Specifies additional paths from which the OpenEmbedded
11099 build system gets source code.
11100 When the build system searches for source code, it first
11101 tries the local download directory.
11102 If that location fails, the build system tries locations
11103 defined by <filename>PREMIRRORS</filename>, the upstream
11104 source, and then locations specified by
11105 <link linkend='var-MIRRORS'><filename>MIRRORS</filename></link>
11106 in that order.
11107 </para>
11108
11109 <para>
11110 Assuming your distribution
11111 (<link linkend='var-DISTRO'><filename>DISTRO</filename></link>)
11112 is "poky", the default value for
11113 <filename>PREMIRRORS</filename> is defined in the
11114 <filename>conf/distro/poky.conf</filename> file in the
11115 <filename>meta-poky</filename> Git repository.
11116 </para>
11117
11118 <para>
11119 Typically, you could add a specific server for the
11120 build system to attempt before any others by adding
11121 something like the following to the
11122 <filename>local.conf</filename> configuration file in the
11123 <link linkend='build-directory'>Build Directory</link>:
11124 <literallayout class='monospaced'>
11125 PREMIRRORS_prepend = "\
11126 git://.*/.* http://www.yoctoproject.org/sources/ \n \
11127 ftp://.*/.* http://www.yoctoproject.org/sources/ \n \
11128 http://.*/.* http://www.yoctoproject.org/sources/ \n \
11129 https://.*/.* http://www.yoctoproject.org/sources/ \n"
11130 </literallayout>
11131 These changes cause the build system to intercept
11132 Git, FTP, HTTP, and HTTPS requests and direct them to
11133 the <filename>http://</filename> sources mirror.
11134 You can use <filename>file://</filename> URLs to point
11135 to local directories or network shares as well.
11136 </para>
11137 </glossdef>
11138 </glossentry>
11139
11140 <glossentry id='var-PRIORITY'><glossterm>PRIORITY</glossterm>
11141 <info>
11142 PRIORITY[doc] = "Indicates the importance of a package. The default value is 'optional'. Other standard values are 'required', 'standard', and 'extra'."
11143 </info>
11144 <glossdef>
11145 <para role="glossdeffirst">
11146 Indicates the importance of a package.
11147 </para>
11148
11149 <para>
11150 <filename>PRIORITY</filename> is considered to be part of
11151 the distribution policy because the importance of any given
11152 recipe depends on the purpose for which the distribution
11153 is being produced.
11154 Thus, <filename>PRIORITY</filename> is not normally set
11155 within recipes.
11156 </para>
11157
11158 <para>
11159 You can set <filename>PRIORITY</filename> to "required",
11160 "standard", "extra", and "optional", which is the default.
11161 </para>
11162 </glossdef>
11163 </glossentry>
11164
11165 <glossentry id='var-PRIVATE_LIBS'><glossterm>PRIVATE_LIBS</glossterm>
11166 <info>
11167 PRIVATE_LIBS[doc] = "Specifies libraries installed within a recipe that should be ignored by the OpenEmbedded build system's shared library resolver."
11168 </info>
11169 <glossdef>
11170 <para role="glossdeffirst">
11171 Specifies libraries installed within a recipe that
11172 should be ignored by the OpenEmbedded build system's
11173 shared library resolver.
11174 This variable is typically used when software being
11175 built by a recipe has its own private versions of a
11176 library normally provided by another recipe.
11177 In this case, you would not want the package containing
11178 the private libraries to be set as a dependency on other
11179 unrelated packages that should instead depend on the
11180 package providing the standard version of the library.
11181 </para>
11182
11183 <para>
11184 Libraries specified in this variable should be specified
11185 by their file name.
11186 For example, from the Firefox recipe in meta-browser:
11187 <literallayout class='monospaced'>
11188 PRIVATE_LIBS = "libmozjs.so \
11189 libxpcom.so \
11190 libnspr4.so \
11191 libxul.so \
11192 libmozalloc.so \
11193 libplc4.so \
11194 libplds4.so"
11195 </literallayout>
11196 </para>
11197
11198 <para>
11199 For more information, see the
11200 "<ulink url='&YOCTO_DOCS_OM_URL;#automatically-added-runtime-dependencies'>Automatically Added Runtime Dependencies</ulink>"
11201 section in the Yocto Project Overview and Concepts Manual.
11202 </para>
11203 </glossdef>
11204 </glossentry>
11205
11206 <glossentry id='var-PROVIDES'><glossterm>PROVIDES</glossterm>
11207 <info>
11208 PROVIDES[doc] = "A list of aliases that a recipe also provides. These aliases are useful for satisfying dependencies of other recipes during the build as specified by DEPENDS."
11209 </info>
11210 <glossdef>
11211 <para role="glossdeffirst">
11212 A list of aliases by which a particular recipe can be
11213 known.
11214 By default, a recipe's own
11215 <filename><link linkend='var-PN'>PN</link></filename>
11216 is implicitly already in its <filename>PROVIDES</filename>
11217 list and therefore does not need to mention that it provides itself.
11218 If a recipe uses <filename>PROVIDES</filename>, the
11219 additional aliases are synonyms for the recipe and can
11220 be useful for satisfying dependencies of other recipes during
11221 the build as specified by
11222 <filename><link linkend='var-DEPENDS'>DEPENDS</link></filename>.
11223 </para>
11224
11225 <para>
11226 Consider the following example
11227 <filename>PROVIDES</filename> statement from the recipe
11228 file <filename>eudev_3.2.9.bb</filename>:
11229 <literallayout class='monospaced'>
11230 PROVIDES = "udev"
11231 </literallayout>
11232 The <filename>PROVIDES</filename> statement results in
11233 the "eudev" recipe also being available as simply "udev".
11234
11235 <note>
11236 Given that a recipe's own recipe name is already
11237 implicitly in its own <filename>PROVIDES</filename> list,
11238 it is unnecessary to add aliases with the "+=" operator;
11239 using a simple assignment will be sufficient. In other
11240 words, while you could write:
11241 <literallayout class='monospaced'>
11242 PROVIDES += "udev"
11243 </literallayout>
11244 in the above, the "+=" is overkill and unnecessary.
11245 </note>
11246 </para>
11247
11248 <para>
11249 In addition to providing recipes under alternate names,
11250 the <filename>PROVIDES</filename> mechanism is also used
11251 to implement virtual targets.
11252 A virtual target is a name that corresponds to some
11253 particular functionality (e.g. a Linux kernel).
11254 Recipes that provide the functionality in question list the
11255 virtual target in <filename>PROVIDES</filename>.
11256 Recipes that depend on the functionality in question can
11257 include the virtual target in <filename>DEPENDS</filename>
11258 to leave the choice of provider open.
11259 </para>
11260
11261 <para>
11262 Conventionally, virtual targets have names on the form
11263 "virtual/function" (e.g. "virtual/kernel").
11264 The slash is simply part of the name and has no
11265 syntactical significance.
11266 </para>
11267
11268 <para>
11269 The
11270 <link linkend='var-PREFERRED_PROVIDER'><filename>PREFERRED_PROVIDER</filename></link>
11271 variable is used to select which particular recipe
11272 provides a virtual target.
11273 <note>
11274 <para>A corresponding mechanism for virtual runtime
11275 dependencies (packages) exists.
11276 However, the mechanism does not depend on any special
11277 functionality beyond ordinary variable assignments.
11278 For example,
11279 <filename>VIRTUAL-RUNTIME_dev_manager</filename>
11280 refers to the package of the component that manages
11281 the <filename>/dev</filename> directory.</para>
11282
11283 <para>Setting the "preferred provider" for runtime
11284 dependencies is as simple as using the following
11285 assignment in a configuration file:</para>
11286 <literallayout class='monospaced'>
11287 VIRTUAL-RUNTIME_dev_manager = "udev"
11288 </literallayout>
11289 </note>
11290 </para>
11291 </glossdef>
11292 </glossentry>
11293
11294 <glossentry id='var-PRSERV_HOST'><glossterm>PRSERV_HOST</glossterm>
11295 <info>
11296 PRSERV_HOST[doc] = "The network based PR service host and port."
11297 </info>
11298 <glossdef>
11299 <para role="glossdeffirst">
11300 The network based
11301 <link linkend='var-PR'><filename>PR</filename></link>
11302 service host and port.
11303 </para>
11304
11305 <para>
11306 The <filename>conf/local.conf.sample.extended</filename>
11307 configuration file in the
11308 <link linkend='source-directory'>Source Directory</link>
11309 shows how the <filename>PRSERV_HOST</filename> variable is
11310 set:
11311 <literallayout class='monospaced'>
11312 PRSERV_HOST = "localhost:0"
11313 </literallayout>
11314 You must set the variable if you want to automatically
11315 start a local
11316 <ulink url='&YOCTO_DOCS_DEV_URL;#working-with-a-pr-service'>PR service</ulink>.
11317 You can set <filename>PRSERV_HOST</filename> to other
11318 values to use a remote PR service.
11319 </para>
11320 </glossdef>
11321 </glossentry>
11322
11323 <glossentry id='var-PTEST_ENABLED'><glossterm>PTEST_ENABLED</glossterm>
11324 <info>
11325 PRSERV_HOST[doc] = "Specifies whether or not Package Test (ptest) functionality is enabled when building a recipe."
11326 </info>
11327 <glossdef>
11328 <para role="glossdeffirst">
11329 Specifies whether or not
11330 <ulink url='&YOCTO_DOCS_DEV_URL;#testing-packages-with-ptest'>Package Test</ulink>
11331 (ptest) functionality is enabled when building a recipe.
11332 You should not set this variable directly.
11333 Enabling and disabling building Package Tests
11334 at build time should be done by adding "ptest" to (or
11335 removing it from)
11336 <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>.
11337 </para>
11338 </glossdef>
11339 </glossentry>
11340
11341 <glossentry id='var-PV'><glossterm>PV</glossterm>
11342 <info>
11343 PV[doc] = "The version of the recipe. The version is normally extracted from the recipe filename."
11344 </info>
11345 <glossdef>
11346 <para role="glossdeffirst">
11347 The version of the recipe.
11348 The version is normally extracted from the recipe filename.
11349 For example, if the recipe is named
11350 <filename>expat_2.0.1.bb</filename>, then the default value
11351 of <filename>PV</filename> will be "2.0.1".
11352 <filename>PV</filename> is generally not overridden within
11353 a recipe unless it is building an unstable (i.e.
11354 development) version from a source code repository
11355 (e.g. Git or Subversion).
11356 </para>
11357
11358 <para>
11359 <filename>PV</filename> is the default value of the
11360 <link linkend='var-PKGV'><filename>PKGV</filename></link>
11361 variable.
11362 </para>
11363 </glossdef>
11364 </glossentry>
11365
11366 <glossentry id='var-PYTHON_ABI'><glossterm>PYTHON_ABI</glossterm>
11367 <info>
11368 PYTHON_ABI[doc] = "When used by recipes that inherit the distutils3, setuptools3, distutils, or setuptools classes, denotes the Application Binary Interface (ABI) currently in use for Python."
11369 </info>
11370 <glossdef>
11371 <para role="glossdeffirst">
11372 When used by recipes that inherit the
11373 <link linkend='ref-classes-distutils3'><filename>distutils3</filename></link>,
11374 <link linkend='ref-classes-setuptools3'><filename>setuptools3</filename></link>,
11375 <link linkend='ref-classes-distutils'><filename>distutils</filename></link>,
11376 or
11377 <link linkend='ref-classes-setuptools'><filename>setuptools</filename></link>
11378 classes, denotes the Application Binary Interface (ABI)
11379 currently in use for Python.
11380 By default, the ABI is "m".
11381 You do not have to set this variable as the OpenEmbedded
11382 build system sets it for you.
11383 </para>
11384
11385 <para>
11386 The OpenEmbedded build system uses the ABI to construct
11387 directory names used when installing the Python headers
11388 and libraries in sysroot
11389 (e.g. <filename>.../python3.3m/...</filename>).
11390 </para>
11391
11392 <para>
11393 Recipes that inherit the <filename>distutils</filename>
11394 class during cross-builds also use this variable to
11395 locate the headers and libraries of the appropriate Python
11396 that the extension is targeting.
11397 </para>
11398 </glossdef>
11399 </glossentry>
11400
11401 <glossentry id='var-PYTHON_PN'><glossterm>PYTHON_PN</glossterm>
11402 <info>
11403 PYTHON_PN[doc] = "When used by recipes that inherit the distutils3, setuptools3, distutils, or setuptools classes, specifies the major Python version being built."
11404 </info>
11405 <glossdef>
11406 <para role="glossdeffirst">
11407 When used by recipes that inherit the
11408 <link linkend='ref-classes-distutils3'><filename>distutils3</filename></link>,
11409 <link linkend='ref-classes-setuptools3'><filename>setuptools3</filename></link>,
11410 <link linkend='ref-classes-distutils'><filename>distutils</filename></link>,
11411 or
11412 <link linkend='ref-classes-setuptools'><filename>setuptools</filename></link>
11413 classes, specifies the major Python version being built.
11414 For Python 3.x, <filename>PYTHON_PN</filename> would be
11415 "python3".
11416 You do not have to set this variable as the
11417 OpenEmbedded build system automatically sets it for you.
11418 </para>
11419
11420 <para>
11421 The variable allows recipes to use common infrastructure
11422 such as the following:
11423 <literallayout class='monospaced'>
11424 DEPENDS += "${PYTHON_PN}-native"
11425 </literallayout>
11426 In the previous example, the version of the dependency
11427 is <filename>PYTHON_PN</filename>.
11428 </para>
11429 </glossdef>
11430 </glossentry>
11431
11432 </glossdiv>
11433
11434 <glossdiv id='var-glossary-r'><title>R</title>
11435
11436 <glossentry id='var-RANLIB'><glossterm>RANLIB</glossterm>
11437 <info>
11438 RANLIB[doc] = "Minimal command and arguments to run 'ranlib'."
11439 </info>
11440 <glossdef>
11441 <para role="glossdeffirst">
11442 The minimal command and arguments to run
11443 <filename>ranlib</filename>.
11444 </para>
11445 </glossdef>
11446 </glossentry>
11447
11448 <glossentry id='var-RCONFLICTS'><glossterm>RCONFLICTS</glossterm>
11449 <info>
11450 RCONFLICTS[doc] = "The list of packages that conflict with another package. Note that the package will not be installed if the conflicting packages are not first removed."
11451 </info>
11452 <glossdef>
11453 <para role="glossdeffirst">
11454 The list of packages that conflict with packages.
11455 Note that packages will not be installed if conflicting
11456 packages are not first removed.
11457 </para>
11458
11459 <para>
11460 Like all package-controlling variables, you must always use
11461 them in conjunction with a package name override.
11462 Here is an example:
11463 <literallayout class='monospaced'>
11464 RCONFLICTS_${PN} = "<replaceable>another_conflicting_package_name</replaceable>"
11465 </literallayout>
11466 </para>
11467
11468 <para>
11469 BitBake, which the OpenEmbedded build system uses, supports
11470 specifying versioned dependencies.
11471 Although the syntax varies depending on the packaging
11472 format, BitBake hides these differences from you.
11473 Here is the general syntax to specify versions with
11474 the <filename>RCONFLICTS</filename> variable:
11475 <literallayout class='monospaced'>
11476 RCONFLICTS_${PN} = "<replaceable>package</replaceable> (<replaceable>operator</replaceable> <replaceable>version</replaceable>)"
11477 </literallayout>
11478 For <filename>operator</filename>, you can specify the
11479 following:
11480 <literallayout class='monospaced'>
11481 =
11482 &lt;
11483 &gt;
11484 &lt;=
11485 &gt;=
11486 </literallayout>
11487 For example, the following sets up a dependency on version
11488 1.2 or greater of the package <filename>foo</filename>:
11489 <literallayout class='monospaced'>
11490 RCONFLICTS_${PN} = "foo (>= 1.2)"
11491 </literallayout>
11492 </para>
11493 </glossdef>
11494 </glossentry>
11495
11496 <glossentry id='var-RDEPENDS'><glossterm>RDEPENDS</glossterm>
11497 <info>
11498 RDEPENDS[doc] = "Lists runtime dependencies of a package."
11499 </info>
11500 <glossdef>
11501 <para role="glossdeffirst">
11502 Lists runtime dependencies of a package.
11503 These dependencies are other packages that must be
11504 installed in order for the package to function correctly.
11505 As an example, the following assignment declares that the
11506 package <filename>foo</filename> needs the packages
11507 <filename>bar</filename> and <filename>baz</filename> to
11508 be installed:
11509 <literallayout class='monospaced'>
11510 RDEPENDS_foo = "bar baz"
11511 </literallayout>
11512 The most common types of package runtime dependencies are
11513 automatically detected and added.
11514 Therefore, most recipes do not need to set
11515 <filename>RDEPENDS</filename>.
11516 For more information, see the
11517 "<ulink url='&YOCTO_DOCS_OM_URL;#automatically-added-runtime-dependencies'>Automatically Added Runtime Dependencies</ulink>"
11518 section in the Yocto Project Overview and Concepts Manual.
11519 </para>
11520
11521 <para>
11522 The practical effect of the above
11523 <filename>RDEPENDS</filename> assignment is that
11524 <filename>bar</filename> and <filename>baz</filename>
11525 will be declared as dependencies inside the package
11526 <filename>foo</filename> when it is written out by one of
11527 the
11528 <link linkend='ref-tasks-package_write_deb'><filename>do_package_write_*</filename></link>
11529 tasks.
11530 Exactly how this is done depends on which package format
11531 is used, which is determined by
11532 <link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>.
11533 When the corresponding package manager installs the
11534 package, it will know to also install the packages on
11535 which it depends.
11536 </para>
11537
11538 <para>
11539 To ensure that the packages <filename>bar</filename> and
11540 <filename>baz</filename> get built, the previous
11541 <filename>RDEPENDS</filename> assignment also causes a task
11542 dependency to be added.
11543 This dependency is from the recipe's
11544 <link linkend='ref-tasks-build'><filename>do_build</filename></link>
11545 (not to be confused with
11546 <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>)
11547 task to the <filename>do_package_write_*</filename>
11548 task of the recipes that build <filename>bar</filename> and
11549 <filename>baz</filename>.
11550 </para>
11551
11552 <para>
11553 The names of the packages you list within
11554 <filename>RDEPENDS</filename> must be the names of other
11555 packages - they cannot be recipe names.
11556 Although package names and recipe names usually match,
11557 the important point here is that you are
11558 providing package names within the
11559 <filename>RDEPENDS</filename> variable.
11560 For an example of the default list of packages created from
11561 a recipe, see the
11562 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>
11563 variable.
11564 </para>
11565
11566 <para>
11567 Because the <filename>RDEPENDS</filename> variable applies
11568 to packages being built, you should always use the variable
11569 in a form with an attached package name (remember that a
11570 single recipe can build multiple packages).
11571 For example, suppose you are building a development package
11572 that depends on the <filename>perl</filename> package.
11573 In this case, you would use the following
11574 <filename>RDEPENDS</filename> statement:
11575 <literallayout class='monospaced'>
11576 RDEPENDS_${PN}-dev += "perl"
11577 </literallayout>
11578 In the example, the development package depends on
11579 the <filename>perl</filename> package.
11580 Thus, the <filename>RDEPENDS</filename> variable has the
11581 <filename>${PN}-dev</filename> package name as part of the
11582 variable.
11583 <note>
11584 <title>Caution</title>
11585 <filename>RDEPENDS_${PN}-dev</filename> includes
11586 <filename>${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}</filename>
11587 by default.
11588 This default is set in the BitBake configuration file
11589 (<filename>meta/conf/bitbake.conf</filename>).
11590 Be careful not to accidentally remove
11591 <filename>${PN}</filename> when modifying
11592 <filename>RDEPENDS_${PN}-dev</filename>.
11593 Use the "+=" operator rather than the "=" operator.
11594 </note>
11595 </para>
11596
11597 <para>
11598 The package names you use with
11599 <filename>RDEPENDS</filename> must appear as they would in
11600 the <filename>PACKAGES</filename> variable.
11601 The
11602 <link linkend='var-PKG'><filename>PKG</filename></link>
11603 variable allows a different name to be used for
11604 the final package (e.g. the
11605 <link linkend='ref-classes-debian'><filename>debian</filename></link>
11606 class uses this to rename packages), but this final package
11607 name cannot be used with <filename>RDEPENDS</filename>,
11608 which makes sense as <filename>RDEPENDS</filename> is meant
11609 to be independent of the package format used.
11610 </para>
11611
11612 <para>
11613 BitBake, which the OpenEmbedded build system uses, supports
11614 specifying versioned dependencies.
11615 Although the syntax varies depending on the packaging
11616 format, BitBake hides these differences from you.
11617 Here is the general syntax to specify versions with
11618 the <filename>RDEPENDS</filename> variable:
11619 <literallayout class='monospaced'>
11620 RDEPENDS_${PN} = "<replaceable>package</replaceable> (<replaceable>operator</replaceable> <replaceable>version</replaceable>)"
11621 </literallayout>
11622 For <replaceable>operator</replaceable>, you can specify the
11623 following:
11624 <literallayout class='monospaced'>
11625 =
11626 &lt;
11627 &gt;
11628 &lt;=
11629 &gt;=
11630 </literallayout>
11631 For <replaceable>version</replaceable>, provide the version
11632 number.
11633 <note><title>Tip</title>
11634 You can use
11635 <link linkend='var-EXTENDPKGV'><filename>EXTENDPKGV</filename></link>
11636 to provide a full package version specification.
11637 </note>
11638 For example, the following sets up a dependency on version
11639 1.2 or greater of the package <filename>foo</filename>:
11640 <literallayout class='monospaced'>
11641 RDEPENDS_${PN} = "foo (>= 1.2)"
11642 </literallayout>
11643 </para>
11644
11645 <para>
11646 For information on build-time dependencies, see the
11647 <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>
11648 variable.
11649 You can also see the
11650 "<ulink url='&YOCTO_DOCS_BB_URL;#tasks'>Tasks</ulink>" and
11651 "<ulink url='&YOCTO_DOCS_BB_URL;#dependencies'>Dependencies</ulink>"
11652 sections in the BitBake User Manual for additional
11653 information on tasks and dependencies.
11654 </para>
11655 </glossdef>
11656 </glossentry>
11657
11658 <glossentry id='var-REQUIRED_DISTRO_FEATURES'><glossterm>REQUIRED_DISTRO_FEATURES</glossterm>
11659 <info>
11660 REQUIRED_DISTRO_FEATURES[doc] = "When a recipe inherits the distro_features_check class, this variable identifies distribution features that must exist in the current configuration in order for the OpenEmbedded build system to build the recipe."
11661 </info>
11662 <glossdef>
11663 <para role="glossdeffirst">
11664 When inheriting the
11665 <link linkend='ref-classes-distro_features_check'><filename>distro_features_check</filename></link>
11666 class, this
11667 variable identifies distribution features that must
11668 exist in the current configuration in order for the
11669 OpenEmbedded build system to build the recipe.
11670 In other words, if the
11671 <filename>REQUIRED_DISTRO_FEATURES</filename> variable
11672 lists a feature that does not appear in
11673 <filename>DISTRO_FEATURES</filename> within the
11674 current configuration, an error occurs and the
11675 build stops.
11676 </para>
11677 </glossdef>
11678 </glossentry>
11679
11680 <glossentry id='var-RM_WORK_EXCLUDE'><glossterm>RM_WORK_EXCLUDE</glossterm>
11681 <info>
11682 RM_WORK_EXCLUDE[doc] = "With rm_work enabled, this variable specifies a list of packages whose work directories should not be removed."
11683 </info>
11684 <glossdef>
11685 <para role="glossdeffirst">
11686 With <filename>rm_work</filename> enabled, this
11687 variable specifies a list of recipes whose work directories
11688 should not be removed.
11689 See the "<link linkend='ref-classes-rm-work'><filename>rm_work.bbclass</filename></link>"
11690 section for more details.
11691 </para>
11692 </glossdef>
11693 </glossentry>
11694
11695 <glossentry id='var-ROOT_HOME'><glossterm>ROOT_HOME</glossterm>
11696 <info>
11697 ROOT_HOME[doc] = "Defines the root home directory."
11698 </info>
11699 <glossdef>
11700 <para role="glossdeffirst">
11701 Defines the root home directory.
11702 By default, this directory is set as follows in the
11703 BitBake configuration file:
11704 <literallayout class='monospaced'>
11705 ROOT_HOME ??= "/home/root"
11706 </literallayout>
11707 <note>
11708 This default value is likely used because some
11709 embedded solutions prefer to have a read-only root
11710 filesystem and prefer to keep writeable data in one
11711 place.
11712 </note>
11713 </para>
11714
11715 <para>
11716 You can override the default by setting the variable
11717 in any layer or in the <filename>local.conf</filename> file.
11718 Because the default is set using a "weak" assignment
11719 (i.e. "??="), you can use either of the following forms
11720 to define your override:
11721 <literallayout class='monospaced'>
11722 ROOT_HOME = "/root"
11723 ROOT_HOME ?= "/root"
11724 </literallayout>
11725 These override examples use <filename>/root</filename>,
11726 which is probably the most commonly used override.
11727 </para>
11728 </glossdef>
11729 </glossentry>
11730
11731 <glossentry id='var-ROOTFS'><glossterm>ROOTFS</glossterm>
11732 <info>
11733 ROOTFS[doc] = "Indicates a filesystem image to include as the root filesystem."
11734 </info>
11735 <glossdef>
11736 <para role="glossdeffirst">
11737 Indicates a filesystem image to include as the root
11738 filesystem.
11739 </para>
11740
11741 <para>
11742 The <filename>ROOTFS</filename> variable is an optional
11743 variable used with the
11744 <link linkend='ref-classes-image-live'><filename>image-live</filename></link>
11745 class.
11746 </para>
11747 </glossdef>
11748 </glossentry>
11749
11750 <glossentry id='var-ROOTFS_POSTINSTALL_COMMAND'><glossterm>ROOTFS_POSTINSTALL_COMMAND</glossterm>
11751 <info>
11752 ROOTFS_POSTINSTALL_COMMAND[doc] = "Specifies a list of functions to call after installing packages."
11753 </info>
11754 <glossdef>
11755 <para role="glossdeffirst">
11756 Specifies a list of functions to call after the
11757 OpenEmbedded build system has installed packages.
11758 You can specify functions separated by semicolons:
11759 <literallayout class='monospaced'>
11760 ROOTFS_POSTINSTALL_COMMAND += "<replaceable>function</replaceable>; ... "
11761 </literallayout>
11762 </para>
11763
11764 <para>
11765 If you need to pass the root filesystem path to a command
11766 within a function, you can use
11767 <filename>${IMAGE_ROOTFS}</filename>, which points to
11768 the directory that becomes the root filesystem image.
11769 See the
11770 <link linkend='var-IMAGE_ROOTFS'><filename>IMAGE_ROOTFS</filename></link>
11771 variable for more information.
11772 </para>
11773 </glossdef>
11774 </glossentry>
11775
11776 <glossentry id='var-ROOTFS_POSTPROCESS_COMMAND'><glossterm>ROOTFS_POSTPROCESS_COMMAND</glossterm>
11777 <info>
11778 ROOTFS_POSTPROCESS_COMMAND[doc] = "Specifies a list of functions to call once the OpenEmbedded build system has created the root filesystem."
11779 </info>
11780 <glossdef>
11781 <para role="glossdeffirst">
11782 Specifies a list of functions to call once the
11783 OpenEmbedded build system has created the root filesystem.
11784 You can specify functions separated by semicolons:
11785 <literallayout class='monospaced'>
11786 ROOTFS_POSTPROCESS_COMMAND += "<replaceable>function</replaceable>; ... "
11787 </literallayout>
11788 </para>
11789
11790 <para>
11791 If you need to pass the root filesystem path to a command
11792 within a function, you can use
11793 <filename>${IMAGE_ROOTFS}</filename>, which points to
11794 the directory that becomes the root filesystem image.
11795 See the
11796 <link linkend='var-IMAGE_ROOTFS'><filename>IMAGE_ROOTFS</filename></link>
11797 variable for more information.
11798 </para>
11799 </glossdef>
11800 </glossentry>
11801
11802 <glossentry id='var-ROOTFS_POSTUNINSTALL_COMMAND'><glossterm>ROOTFS_POSTUNINSTALL_COMMAND</glossterm>
11803 <info>
11804 ROOTFS_POSTUNINSTALL_COMMAND[doc] = "Specifies a list of functions to call after removal of unneeded packages."
11805 </info>
11806 <glossdef>
11807 <para role="glossdeffirst">
11808 Specifies a list of functions to call after the
11809 OpenEmbedded build system has removed unnecessary
11810 packages.
11811 When runtime package management is disabled in the
11812 image, several packages are removed including
11813 <filename>base-passwd</filename>,
11814 <filename>shadow</filename>, and
11815 <filename>update-alternatives</filename>.
11816 You can specify functions separated by semicolons:
11817 <literallayout class='monospaced'>
11818 ROOTFS_POSTUNINSTALL_COMMAND += "<replaceable>function</replaceable>; ... "
11819 </literallayout>
11820 </para>
11821
11822 <para>
11823 If you need to pass the root filesystem path to a command
11824 within a function, you can use
11825 <filename>${IMAGE_ROOTFS}</filename>, which points to
11826 the directory that becomes the root filesystem image.
11827 See the
11828 <link linkend='var-IMAGE_ROOTFS'><filename>IMAGE_ROOTFS</filename></link>
11829 variable for more information.
11830 </para>
11831 </glossdef>
11832 </glossentry>
11833
11834 <glossentry id='var-ROOTFS_PREPROCESS_COMMAND'><glossterm>ROOTFS_PREPROCESS_COMMAND</glossterm>
11835 <info>
11836 ROOTFS_PREPROCESS_COMMAND[doc] = "Specifies a list of functions to call before the OpenEmbedded build system has created the root filesystem."
11837 </info>
11838 <glossdef>
11839 <para role="glossdeffirst">
11840 Specifies a list of functions to call before the
11841 OpenEmbedded build system has created the root filesystem.
11842 You can specify functions separated by semicolons:
11843 <literallayout class='monospaced'>
11844 ROOTFS_PREPROCESS_COMMAND += "<replaceable>function</replaceable>; ... "
11845 </literallayout>
11846 </para>
11847
11848 <para>
11849 If you need to pass the root filesystem path to a command
11850 within a function, you can use
11851 <filename>${IMAGE_ROOTFS}</filename>, which points to
11852 the directory that becomes the root filesystem image.
11853 See the
11854 <link linkend='var-IMAGE_ROOTFS'><filename>IMAGE_ROOTFS</filename></link>
11855 variable for more information.
11856 </para>
11857 </glossdef>
11858 </glossentry>
11859
11860 <glossentry id='var-RPROVIDES'><glossterm>RPROVIDES</glossterm>
11861 <info>
11862 RPROVIDES[doc] = "A list of package name aliases that a package also provides. These aliases are useful for satisfying runtime dependencies of other packages both during the build and on the target."
11863 </info>
11864 <glossdef>
11865 <para role="glossdeffirst">
11866 A list of package name aliases that a package also provides.
11867 These aliases are useful for satisfying runtime dependencies
11868 of other packages both during the build and on the target
11869 (as specified by
11870 <filename><link linkend='var-RDEPENDS'>RDEPENDS</link></filename>).
11871 <note>
11872 A package's own name is implicitly already in its
11873 <filename>RPROVIDES</filename> list.
11874 </note>
11875 </para>
11876
11877 <para>
11878 As with all package-controlling variables, you must always
11879 use the variable in conjunction with a package name override.
11880 Here is an example:
11881 <literallayout class='monospaced'>
11882 RPROVIDES_${PN} = "widget-abi-2"
11883 </literallayout>
11884 </para>
11885 </glossdef>
11886 </glossentry>
11887
11888 <glossentry id='var-RRECOMMENDS'><glossterm>RRECOMMENDS</glossterm>
11889 <info>
11890 RRECOMMENDS[doc] = "A list of packages that extends the usability of a package being built. The package being built does not depend on this list of packages in order to successfully build, but needs them for the extended usability."
11891 </info>
11892 <glossdef>
11893 <para role="glossdeffirst">
11894 A list of packages that extends the usability of a package
11895 being built.
11896 The package being built does not depend on this list of
11897 packages in order to successfully build, but rather
11898 uses them for extended usability.
11899 To specify runtime dependencies for packages, see the
11900 <filename><link linkend='var-RDEPENDS'>RDEPENDS</link></filename>
11901 variable.
11902 </para>
11903
11904 <para>
11905 The package manager will automatically install the
11906 <filename>RRECOMMENDS</filename> list of packages when
11907 installing the built package.
11908 However, you can prevent listed packages from being
11909 installed by using the
11910 <link linkend='var-BAD_RECOMMENDATIONS'><filename>BAD_RECOMMENDATIONS</filename></link>,
11911 <link linkend='var-NO_RECOMMENDATIONS'><filename>NO_RECOMMENDATIONS</filename></link>,
11912 and
11913 <link linkend='var-PACKAGE_EXCLUDE'><filename>PACKAGE_EXCLUDE</filename></link>
11914 variables.
11915 </para>
11916
11917 <para>
11918 Packages specified in
11919 <filename>RRECOMMENDS</filename> need not actually be
11920 produced.
11921 However, a recipe must exist that provides each package,
11922 either through the
11923 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>
11924 or
11925 <link linkend='var-PACKAGES_DYNAMIC'><filename>PACKAGES_DYNAMIC</filename></link>
11926 variables or the
11927 <link linkend='var-RPROVIDES'><filename>RPROVIDES</filename></link>
11928 variable, or an error will occur during the build.
11929 If such a recipe does exist and the package is not produced,
11930 the build continues without error.
11931 </para>
11932
11933 <para>
11934 Because the <filename>RRECOMMENDS</filename> variable
11935 applies to packages being built, you should always attach
11936 an override to the variable to specify the particular
11937 package whose usability is being extended.
11938 For example, suppose you are building a development package
11939 that is extended to support wireless functionality.
11940 In this case, you would use the following:
11941 <literallayout class='monospaced'>
11942 RRECOMMENDS_${PN}-dev += "<replaceable>wireless_package_name</replaceable>"
11943 </literallayout>
11944 In the example, the package name
11945 (<filename>${<link linkend='var-PN'>PN</link>}-dev</filename>)
11946 must appear as it would in the
11947 <filename>PACKAGES</filename> namespace before any renaming
11948 of the output package by classes such as
11949 <filename>debian.bbclass</filename>.
11950 </para>
11951
11952 <para>
11953 BitBake, which the OpenEmbedded build system uses, supports
11954 specifying versioned recommends.
11955 Although the syntax varies depending on the packaging
11956 format, BitBake hides these differences from you.
11957 Here is the general syntax to specify versions with
11958 the <filename>RRECOMMENDS</filename> variable:
11959 <literallayout class='monospaced'>
11960 RRECOMMENDS_${PN} = "<replaceable>package</replaceable> (<replaceable>operator</replaceable> <replaceable>version</replaceable>)"
11961 </literallayout>
11962 For <filename>operator</filename>, you can specify the
11963 following:
11964 <literallayout class='monospaced'>
11965 =
11966 &lt;
11967 &gt;
11968 &lt;=
11969 &gt;=
11970 </literallayout>
11971 For example, the following sets up a recommend on version
11972 1.2 or greater of the package <filename>foo</filename>:
11973 <literallayout class='monospaced'>
11974 RRECOMMENDS_${PN} = "foo (>= 1.2)"
11975 </literallayout>
11976 </para>
11977 </glossdef>
11978 </glossentry>
11979
11980 <glossentry id='var-RREPLACES'><glossterm>RREPLACES</glossterm>
11981 <info>
11982 RREPLACES[doc] = "A list of packages replaced by a package. The package manager uses this variable to determine which package should be installed to replace other package(s) during an upgrade."
11983 </info>
11984 <glossdef>
11985 <para role="glossdeffirst">
11986 A list of packages replaced by a package.
11987 The package manager uses this variable to determine which
11988 package should be installed to replace other package(s)
11989 during an upgrade.
11990 In order to also have the other package(s) removed at the
11991 same time, you must add the name of the other
11992 package to the
11993 <filename><link linkend='var-RCONFLICTS'>RCONFLICTS</link></filename> variable.
11994 </para>
11995
11996 <para>
11997 As with all package-controlling variables, you must use
11998 this variable in conjunction with a package name
11999 override.
12000 Here is an example:
12001 <literallayout class='monospaced'>
12002 RREPLACES_${PN} = "<replaceable>other_package_being_replaced</replaceable>"
12003 </literallayout>
12004 </para>
12005
12006 <para>
12007 BitBake, which the OpenEmbedded build system uses, supports
12008 specifying versioned replacements.
12009 Although the syntax varies depending on the packaging
12010 format, BitBake hides these differences from you.
12011 Here is the general syntax to specify versions with
12012 the <filename>RREPLACES</filename> variable:
12013 <literallayout class='monospaced'>
12014 RREPLACES_${PN} = "<replaceable>package</replaceable> (<replaceable>operator</replaceable> <replaceable>version</replaceable>)"
12015 </literallayout>
12016 For <filename>operator</filename>, you can specify the
12017 following:
12018 <literallayout class='monospaced'>
12019 =
12020 &lt;
12021 &gt;
12022 &lt;=
12023 &gt;=
12024 </literallayout>
12025 For example, the following sets up a replacement using
12026 version 1.2 or greater of the package
12027 <filename>foo</filename>:
12028 <literallayout class='monospaced'>
12029 RREPLACES_${PN} = "foo (>= 1.2)"
12030 </literallayout>
12031 </para>
12032 </glossdef>
12033 </glossentry>
12034
12035 <glossentry id='var-RSUGGESTS'><glossterm>RSUGGESTS</glossterm>
12036 <info>
12037 RSUGGESTS[doc] = "A list of additional packages that you can suggest for installation by the package manager at the time a package is installed. Not all package managers support this functionality."
12038 </info>
12039 <glossdef>
12040 <para role="glossdeffirst">
12041 A list of additional packages that you can suggest for
12042 installation by the package manager at the time a package
12043 is installed.
12044 Not all package managers support this functionality.
12045 </para>
12046
12047 <para>
12048 As with all package-controlling variables, you must always
12049 use this variable in conjunction with a package name
12050 override.
12051 Here is an example:
12052 <literallayout class='monospaced'>
12053 RSUGGESTS_${PN} = "<replaceable>useful_package</replaceable> <replaceable>another_package</replaceable>"
12054 </literallayout>
12055 </para>
12056 </glossdef>
12057 </glossentry>
12058
12059 </glossdiv>
12060
12061 <glossdiv id='var-glossary-s'><title>S</title>
12062
12063 <glossentry id='var-S'><glossterm>S</glossterm>
12064 <info>
12065 S[doc] = "The location in the Build Directory where unpacked package source code resides."
12066 </info>
12067 <glossdef>
12068 <para role="glossdeffirst">
12069 The location in the
12070 <link linkend='build-directory'>Build Directory</link>
12071 where unpacked recipe source code resides.
12072 By default, this directory is
12073 <filename>${</filename><link linkend='var-WORKDIR'><filename>WORKDIR</filename></link><filename>}/${</filename><link linkend='var-BPN'><filename>BPN</filename></link><filename>}-${</filename><link linkend='var-PV'><filename>PV</filename></link><filename>}</filename>,
12074 where <filename>${BPN}</filename> is the base recipe name
12075 and <filename>${PV}</filename> is the recipe version.
12076 If the source tarball extracts the code to a directory
12077 named anything other than <filename>${BPN}-${PV}</filename>,
12078 or if the source code is fetched from an SCM such as
12079 Git or Subversion, then you must set <filename>S</filename>
12080 in the recipe so that the OpenEmbedded build system
12081 knows where to find the unpacked source.
12082 </para>
12083
12084 <para>
12085 As an example, assume a
12086 <link linkend='source-directory'>Source Directory</link>
12087 top-level folder named <filename>poky</filename> and a
12088 default Build Directory at <filename>poky/build</filename>.
12089 In this case, the work directory the build system uses
12090 to keep the unpacked recipe for <filename>db</filename>
12091 is the following:
12092 <literallayout class='monospaced'>
12093 poky/build/tmp/work/qemux86-poky-linux/db/5.1.19-r3/db-5.1.19
12094 </literallayout>
12095 The unpacked source code resides in the
12096 <filename>db-5.1.19</filename> folder.
12097 </para>
12098
12099 <para>
12100 This next example assumes a Git repository.
12101 By default, Git repositories are cloned to
12102 <filename>${WORKDIR}/git</filename> during
12103 <link linkend='ref-tasks-fetch'><filename>do_fetch</filename></link>.
12104 Since this path is different from the default value of
12105 <filename>S</filename>, you must set it specifically
12106 so the source can be located:
12107 <literallayout class='monospaced'>
12108 SRC_URI = "git://path/to/repo.git"
12109 S = "${WORKDIR}/git"
12110 </literallayout>
12111 </para>
12112 </glossdef>
12113 </glossentry>
12114
12115 <glossentry id='var-SANITY_REQUIRED_UTILITIES'><glossterm>SANITY_REQUIRED_UTILITIES</glossterm>
12116 <info>
12117 SANITY_REQUIRED_UTILITIES[doc] = "Specifies a list of command-line utilities that should be checked for during the initial sanity checking process when running BitBake."
12118 </info>
12119 <glossdef>
12120 <para role="glossdeffirst">
12121 Specifies a list of command-line utilities that should be
12122 checked for during the initial sanity checking process when
12123 running BitBake.
12124 If any of the utilities are not installed on the build host,
12125 then BitBake immediately exits with an error.
12126 </para>
12127 </glossdef>
12128 </glossentry>
12129
12130 <glossentry id='var-SANITY_TESTED_DISTROS'><glossterm>SANITY_TESTED_DISTROS</glossterm>
12131 <info>
12132 SANITY_TESTED_DISTROS[doc] = "A list of the host distribution identifiers that the build system has been tested against."
12133 </info>
12134 <glossdef>
12135 <para role="glossdeffirst">
12136 A list of the host distribution identifiers that the
12137 build system has been tested against.
12138 Identifiers consist of the host distributor ID
12139 followed by the release,
12140 as reported by the <filename>lsb_release</filename> tool
12141 or as read from <filename>/etc/lsb-release</filename>.
12142 Separate the list items with explicit newline
12143 characters (<filename>\n</filename>).
12144 If <filename>SANITY_TESTED_DISTROS</filename> is not empty
12145 and the current value of
12146 <link linkend='var-NATIVELSBSTRING'><filename>NATIVELSBSTRING</filename></link>
12147 does not appear in the list, then the build system reports
12148 a warning that indicates the current host distribution has
12149 not been tested as a build host.
12150 </para>
12151 </glossdef>
12152 </glossentry>
12153
12154 <glossentry id='var-SDK_ARCH'><glossterm>SDK_ARCH</glossterm>
12155 <info>
12156 SDK_ARCH[doc] = "The target architecture for the SDK."
12157 </info>
12158 <glossdef>
12159 <para role="glossdeffirst">
12160 The target architecture for the SDK.
12161 Typically, you do not directly set this variable.
12162 Instead, use
12163 <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>.
12164 </para>
12165 </glossdef>
12166 </glossentry>
12167
12168 <glossentry id='var-SDK_DEPLOY'><glossterm>SDK_DEPLOY</glossterm>
12169 <info>
12170 SDK_DEPLOY[doc] = "The directory set up and used by the populate_sdk_base to which the SDK is deployed."
12171 </info>
12172 <glossdef>
12173 <para role="glossdeffirst">
12174 The directory set up and used by the
12175 <link linkend='ref-classes-populate-sdk'><filename>populate_sdk_base</filename></link>
12176 class to which the SDK is deployed.
12177 The <filename>populate_sdk_base</filename> class defines
12178 <filename>SDK_DEPLOY</filename> as follows:
12179 <literallayout class='monospaced'>
12180 SDK_DEPLOY = "${TMPDIR}/deploy/sdk"
12181 </literallayout>
12182 </para>
12183 </glossdef>
12184 </glossentry>
12185
12186 <glossentry id='var-SDK_DIR'><glossterm>SDK_DIR</glossterm>
12187 <info>
12188 SDK_DIR[doc] = "The parent directory used by the OpenEmbedded build system when creating SDK output."
12189 </info>
12190 <glossdef>
12191 <para role="glossdeffirst">
12192 The parent directory used by the OpenEmbedded build system
12193 when creating SDK output.
12194 The
12195 <link linkend='ref-classes-populate-sdk-*'><filename>populate_sdk_base</filename></link>
12196 class defines the variable as follows:
12197 <literallayout class='monospaced'>
12198 SDK_DIR = "${WORKDIR}/sdk"
12199 </literallayout>
12200 <note>
12201 The <filename>SDK_DIR</filename> directory is a
12202 temporary directory as it is part of
12203 <filename>WORKDIR</filename>.
12204 The final output directory is
12205 <link linkend='var-SDK_DEPLOY'><filename>SDK_DEPLOY</filename></link>.
12206 </note>
12207 </para>
12208 </glossdef>
12209 </glossentry>
12210
12211 <glossentry id='var-SDK_EXT_TYPE'><glossterm>SDK_EXT_TYPE</glossterm>
12212 <info>
12213 SDK_EXT_TYPE[doc] = "Controls whether or not shared state artifacts are copied into the extensible SDK."
12214 </info>
12215 <glossdef>
12216 <para role="glossdeffirst">
12217 Controls whether or not shared state artifacts are copied
12218 into the extensible SDK.
12219 The default value of "full" copies all of the required
12220 shared state artifacts into the extensible SDK.
12221 The value "minimal" leaves these artifacts out of the
12222 SDK.
12223 <note>
12224 If you set the variable to "minimal", you need to
12225 ensure
12226 <link linkend='var-SSTATE_MIRRORS'><filename>SSTATE_MIRRORS</filename></link>
12227 is set in the SDK's configuration to enable the
12228 artifacts to be fetched as needed.
12229 </note>
12230 </para>
12231 </glossdef>
12232 </glossentry>
12233
12234 <glossentry id='var-SDK_HOST_MANIFEST'><glossterm>SDK_HOST_MANIFEST</glossterm>
12235 <info>
12236 SDK_HOST_MANIFEST[doc] = "The manifest file for the host part of the SDK. This file lists all the installed packages that make up the host part of the SDK."
12237 </info>
12238 <glossdef>
12239 <para role="glossdeffirst">
12240 The manifest file for the host part of the SDK.
12241 This file lists all the installed packages that make up
12242 the host part of the SDK.
12243 The file contains package information on a line-per-package
12244 basis as follows:
12245 <literallayout class='monospaced'>
12246 <replaceable>packagename</replaceable> <replaceable>packagearch</replaceable> <replaceable>version</replaceable>
12247 </literallayout>
12248 </para>
12249
12250 <para>
12251 The
12252 <link linkend='ref-classes-populate-sdk-*'><filename>populate_sdk_base</filename></link>
12253 class defines the manifest file as follows:
12254 <literallayout class='monospaced'>
12255 SDK_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest"
12256 </literallayout>
12257 The location is derived using the
12258 <link linkend='var-SDK_DEPLOY'><filename>SDK_DEPLOY</filename></link>
12259 and
12260 <link linkend='var-TOOLCHAIN_OUTPUTNAME'><filename>TOOLCHAIN_OUTPUTNAME</filename></link>
12261 variables.
12262 </para>
12263 </glossdef>
12264 </glossentry>
12265
12266 <glossentry id='var-SDK_INCLUDE_PKGDATA'><glossterm>SDK_INCLUDE_PKGDATA</glossterm>
12267 <info>
12268 SDK_INCLUDE_PKGDATA[doc] = "When set to "1", specifies to include the packagedata for all recipes in the "world" target in the extensible SDK."
12269 </info>
12270 <glossdef>
12271 <para role="glossdeffirst">
12272 When set to "1", specifies to include the packagedata for
12273 all recipes in the "world" target in the extensible SDK.
12274 Including this data allows the
12275 <filename>devtool search</filename> command to find these
12276 recipes in search results, as well as allows the
12277 <filename>devtool add</filename> command to map
12278 dependencies more effectively.
12279 <note>
12280 Enabling the <filename>SDK_INCLUDE_PKGDATA</filename>
12281 variable significantly increases build time because
12282 all of world needs to be built.
12283 Enabling the variable also slightly increases the size
12284 of the extensible SDK.
12285 </note>
12286 </para>
12287 </glossdef>
12288 </glossentry>
12289
12290 <glossentry id='var-SDK_INCLUDE_TOOLCHAIN'><glossterm>SDK_INCLUDE_TOOLCHAIN</glossterm>
12291 <info>
12292 SDK_INCLUDE_TOOLCHAIN[doc] = "When set to "1", specifies to include the toolchain in the extensible SDK."
12293 </info>
12294 <glossdef>
12295 <para role="glossdeffirst">
12296 When set to "1", specifies to include the toolchain in the
12297 extensible SDK.
12298 Including the toolchain is useful particularly when
12299 <link linkend='var-SDK_EXT_TYPE'><filename>SDK_EXT_TYPE</filename></link>
12300 is set to "minimal" to keep the SDK reasonably small
12301 but you still want to provide a usable toolchain.
12302 For example, suppose you want to use the toolchain from an
12303 IDE or from other tools and you do not
12304 want to perform additional steps to install the toolchain.
12305 </para>
12306
12307 <para>
12308 The <filename>SDK_INCLUDE_TOOLCHAIN</filename> variable
12309 defaults to "0" if <filename>SDK_EXT_TYPE</filename>
12310 is set to "minimal", and defaults to "1" if
12311 <filename>SDK_EXT_TYPE</filename> is set to "full".
12312 </para>
12313 </glossdef>
12314 </glossentry>
12315
12316 <glossentry id='var-SDK_INHERIT_BLACKLIST'><glossterm>SDK_INHERIT_BLACKLIST</glossterm>
12317 <info>
12318 SDK_INHERIT_BLACKLIST[doc] = "A list of classes to remove from the INHERIT value globally within the extensible SDK configuration."
12319 </info>
12320 <glossdef>
12321 <para role="glossdeffirst">
12322 A list of classes to remove from the
12323 <link linkend='var-INHERIT'><filename>INHERIT</filename></link>
12324 value globally within the extensible SDK configuration.
12325 The
12326 <link linkend='ref-classes-populate-sdk-*'><filename>populate-sdk-ext</filename></link>
12327 class sets the default value:
12328 <literallayout class='monospaced'>
12329 SDK_INHERIT_BLACKLIST ?= "buildhistory icecc"
12330 </literallayout>
12331 </para>
12332
12333 <para>
12334 Some classes are not generally applicable within
12335 the extensible SDK context.
12336 You can use this variable to disable those classes.
12337 </para>
12338
12339 <para>
12340 For additional information on how to customize the
12341 extensible SDK's configuration, see the
12342 "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-configuring-the-extensible-sdk'>Configuring the Extensible SDK</ulink>"
12343 section in the Yocto Project Application Development and
12344 the Extensible Software Development Kit (eSDK) manual.
12345 </para>
12346 </glossdef>
12347 </glossentry>
12348
12349 <glossentry id='var-SDK_LOCAL_CONF_BLACKLIST'><glossterm>SDK_LOCAL_CONF_BLACKLIST</glossterm>
12350 <info>
12351 SDK_LOCAL_CONF_BLACKLIST[doc] = "A list of variables not allowed through from the build system configuration into the extensible SDK configuration."
12352 </info>
12353 <glossdef>
12354 <para role="glossdeffirst">
12355 A list of variables not allowed through from the
12356 OpenEmbedded build system configuration into the extensible
12357 SDK configuration.
12358 Usually, these are variables that are specific to the
12359 machine on which the build system is running and thus
12360 would be potentially problematic within the extensible SDK.
12361 </para>
12362
12363 <para>By default,
12364 <filename>SDK_LOCAL_CONF_BLACKLIST</filename> is set in the
12365 <link linkend='ref-classes-populate-sdk-*'><filename>populate-sdk-ext</filename></link>
12366 class and excludes the following variables:
12367 <literallayout class='monospaced'>
12368 <link linkend='var-CONF_VERSION'>CONF_VERSION</link>
12369 <link linkend='var-BB_NUMBER_THREADS'>BB_NUMBER_THREADS</link>
12370 <ulink url='&YOCTO_DOCS_BB_URL;#var-BB_NUMBER_PARSE_THREADS'>BB_NUMBER_PARSE_THREADS</ulink>
12371 <link linkend='var-PARALLEL_MAKE'>PARALLEL_MAKE</link>
12372 <link linkend='var-PRSERV_HOST'>PRSERV_HOST</link>
12373 <link linkend='var-SSTATE_MIRRORS'>SSTATE_MIRRORS</link>
12374 <link linkend='var-DL_DIR'>DL_DIR</link>
12375 <link linkend='var-SSTATE_DIR'>SSTATE_DIR</link>
12376 <link linkend='var-TMPDIR'>TMPDIR</link>
12377 <link linkend='var-BB_SERVER_TIMEOUT'>BB_SERVER_TIMEOUT</link>
12378 </literallayout>
12379 </para>
12380
12381 <para>
12382 For additional information on how to customize the
12383 extensible SDK's configuration, see the
12384 "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-configuring-the-extensible-sdk'>Configuring the Extensible SDK</ulink>"
12385 section in the Yocto Project Application Development and
12386 the Extensible Software Development Kit (eSDK) manual.
12387 </para>
12388
12389 </glossdef>
12390 </glossentry>
12391
12392 <glossentry id='var-SDK_LOCAL_CONF_WHITELIST'><glossterm>SDK_LOCAL_CONF_WHITELIST</glossterm>
12393 <info>
12394 SDK_LOCAL_CONF_WHITELIST[doc] = "A list of variables allowed through from the build system configuration into the extensible SDK configuration."
12395 </info>
12396 <glossdef>
12397 <para role="glossdeffirst">
12398 A list of variables allowed through from the OpenEmbedded
12399 build system configuration into the extensible SDK
12400 configuration.
12401 By default, the list of variables is empty and is set in
12402 the
12403 <link linkend='ref-classes-populate-sdk-*'><filename>populate-sdk-ext</filename></link>
12404 class.
12405 </para>
12406
12407 <para>
12408 This list overrides the variables specified using the
12409 <link linkend='var-SDK_LOCAL_CONF_BLACKLIST'><filename>SDK_LOCAL_CONF_BLACKLIST</filename></link>
12410 variable as well as any variables identified by automatic
12411 blacklisting due to the "/" character being found at the
12412 start of the value, which is usually indicative of being a
12413 path and thus might not be valid on the system where the
12414 SDK is installed.
12415 </para>
12416
12417 <para>
12418 For additional information on how to customize the
12419 extensible SDK's configuration, see the
12420 "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-configuring-the-extensible-sdk'>Configuring the Extensible SDK</ulink>"
12421 section in the Yocto Project Application Development and
12422 the Extensible Software Development Kit (eSDK) manual.
12423 </para>
12424 </glossdef>
12425 </glossentry>
12426
12427 <glossentry id='var-SDK_NAME'><glossterm>SDK_NAME</glossterm>
12428 <info>
12429 SDK_NAME[doc] = "The base name for SDK output files."
12430 </info>
12431 <glossdef>
12432 <para role="glossdeffirst">
12433 The base name for SDK output files.
12434 The name is derived from the
12435 <link linkend='var-DISTRO'><filename>DISTRO</filename></link>,
12436 <link linkend='var-TCLIBC'><filename>TCLIBC</filename></link>,
12437 <link linkend='var-SDK_ARCH'><filename>SDK_ARCH</filename></link>,
12438 <link linkend='var-IMAGE_BASENAME'><filename>IMAGE_BASENAME</filename></link>,
12439 and
12440 <link linkend='var-TUNE_PKGARCH'><filename>TUNE_PKGARCH</filename></link>
12441 variables:
12442 <literallayout class='monospaced'>
12443 SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}"
12444 </literallayout>
12445 </para>
12446 </glossdef>
12447 </glossentry>
12448
12449 <glossentry id='var-SDK_OS'><glossterm>SDK_OS</glossterm>
12450 <info>
12451 SDK_OS[doc] = "The operating system for which the SDK will be built."
12452 </info>
12453 <glossdef>
12454 <para role="glossdeffirst">
12455 Specifies the operating system for which the SDK
12456 will be built.
12457 The default value is the value of
12458 <link linkend='var-BUILD_OS'><filename>BUILD_OS</filename></link>.
12459 </para>
12460 </glossdef>
12461 </glossentry>
12462
12463 <glossentry id='var-SDK_OUTPUT'><glossterm>SDK_OUTPUT</glossterm>
12464 <info>
12465 SDK_OUTPUT[doc] = "The location used by the OpenEmbedded build system when creating SDK output."
12466 </info>
12467 <glossdef>
12468 <para role="glossdeffirst">
12469 The location used by the OpenEmbedded build system when
12470 creating SDK output.
12471 The
12472 <link linkend='ref-classes-populate-sdk-*'><filename>populate_sdk_base</filename></link>
12473 class defines the variable as follows:
12474 <literallayout class='monospaced'>
12475 SDK_DIR = "${WORKDIR}/sdk"
12476 SDK_OUTPUT = "${SDK_DIR}/image"
12477 SDK_DEPLOY = "${DEPLOY_DIR}/sdk"
12478 </literallayout>
12479 <note>
12480 The <filename>SDK_OUTPUT</filename> directory is a
12481 temporary directory as it is part of
12482 <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>
12483 by way of
12484 <link linkend='var-SDK_DIR'><filename>SDK_DIR</filename></link>.
12485 The final output directory is
12486 <link linkend='var-SDK_DEPLOY'><filename>SDK_DEPLOY</filename></link>.
12487 </note>
12488 </para>
12489 </glossdef>
12490 </glossentry>
12491
12492 <glossentry id='var-SDK_PACKAGE_ARCHS'><glossterm>SDK_PACKAGE_ARCHS</glossterm>
12493 <info>
12494 SDK_PACKAGE_ARCHS[doc] = "Specifies a list of architectures compatible with the SDK machine. This variable is set automatically and should not normally be hand-edited."
12495 </info>
12496 <glossdef>
12497 <para role="glossdeffirst">
12498 Specifies a list of architectures compatible with
12499 the SDK machine.
12500 This variable is set automatically and should not
12501 normally be hand-edited.
12502 Entries are separated using spaces and listed in order
12503 of priority.
12504 The default value for
12505 <filename>SDK_PACKAGE_ARCHS</filename> is "all any noarch
12506 ${SDK_ARCH}-${SDKPKGSUFFIX}".
12507 </para>
12508 </glossdef>
12509 </glossentry>
12510
12511 <glossentry id='var-SDK_POSTPROCESS_COMMAND'><glossterm>SDK_POSTPROCESS_COMMAND</glossterm>
12512 <info>
12513 SDK_POSTPROCESS_COMMAND[doc] = "Specifies a list of functions to call once the OpenEmbedded build system creates the SDK."
12514 </info>
12515 <glossdef>
12516 <para role="glossdeffirst">
12517 Specifies a list of functions to call once the
12518 OpenEmbedded build system creates the SDK.
12519 You can specify functions separated by semicolons:
12520 <literallayout class='monospaced'>
12521 SDK_POSTPROCESS_COMMAND += "<replaceable>function</replaceable>; ... "
12522 </literallayout>
12523 </para>
12524
12525 <para>
12526 If you need to pass an SDK path to a command within a
12527 function, you can use
12528 <filename>${SDK_DIR}</filename>, which points to
12529 the parent directory used by the OpenEmbedded build system
12530 when creating SDK output.
12531 See the
12532 <link linkend='var-SDK_DIR'><filename>SDK_DIR</filename></link>
12533 variable for more information.
12534 </para>
12535 </glossdef>
12536 </glossentry>
12537
12538 <glossentry id='var-SDK_PREFIX'><glossterm>SDK_PREFIX</glossterm>
12539 <info>
12540 SDK_PREFIX[doc] = "The toolchain binary prefix used for nativesdk recipes."
12541 </info>
12542 <glossdef>
12543 <para role="glossdeffirst">
12544 The toolchain binary prefix used for
12545 <filename>nativesdk</filename> recipes.
12546 The OpenEmbedded build system uses the
12547 <filename>SDK_PREFIX</filename> value to set the
12548 <link linkend='var-TARGET_PREFIX'><filename>TARGET_PREFIX</filename></link>
12549 when building <filename>nativesdk</filename> recipes.
12550 The default value is "${SDK_SYS}-".
12551 </para>
12552 </glossdef>
12553 </glossentry>
12554
12555 <glossentry id='var-SDK_RECRDEP_TASKS'><glossterm>SDK_RECRDEP_TASKS</glossterm>
12556 <info>
12557 SDK_RECRDEP_TASKS[doc] = "A list of shared state tasks added to the extensible SDK."
12558 </info>
12559 <glossdef>
12560 <para role="glossdeffirst">
12561 A list of shared state tasks added to the extensible SDK.
12562 By default, the following tasks are added:
12563 <literallayout class='monospaced'>
12564 do_populate_lic
12565 do_package_qa
12566 do_populate_sysroot
12567 do_deploy
12568 </literallayout>
12569 Despite the default value of "" for the
12570 <filename>SDK_RECRDEP_TASKS</filename> variable, the
12571 above four tasks are always added to the SDK.
12572 To specify tasks beyond these four, you need to use
12573 the <filename>SDK_RECRDEP_TASKS</filename> variable (e.g.
12574 you are defining additional tasks that are needed in
12575 order to build
12576 <link linkend='var-SDK_TARGETS'><filename>SDK_TARGETS</filename></link>).
12577 </para>
12578 </glossdef>
12579 </glossentry>
12580
12581 <glossentry id='var-SDK_SYS'><glossterm>SDK_SYS</glossterm>
12582 <info>
12583 SDK_SYS[doc] = "Specifies the system, including the architecture and the operating system, for which the SDK will be built."
12584 </info>
12585 <glossdef>
12586 <para role="glossdeffirst">
12587 Specifies the system, including the architecture and the
12588 operating system, for which the SDK will be built.
12589 </para>
12590
12591 <para>
12592 The OpenEmbedded build system automatically sets this
12593 variable based on
12594 <link linkend='var-SDK_ARCH'><filename>SDK_ARCH</filename></link>,
12595 <link linkend='var-SDK_VENDOR'><filename>SDK_VENDOR</filename></link>,
12596 and
12597 <link linkend='var-SDK_OS'><filename>SDK_OS</filename></link>.
12598 You do not need to set the <filename>SDK_SYS</filename>
12599 variable yourself.
12600 </para>
12601 </glossdef>
12602 </glossentry>
12603
12604 <glossentry id='var-SDK_TARGET_MANIFEST'><glossterm>SDK_TARGET_MANIFEST</glossterm>
12605 <info>
12606 SDK_TARGET_MANIFEST[doc] = "The manifest file for the target part of the SDK. This file lists all the installed packages that make up the target part of the SDK."
12607 </info>
12608 <glossdef>
12609 <para role="glossdeffirst">
12610 The manifest file for the target part of the SDK.
12611 This file lists all the installed packages that make up
12612 the target part of the SDK.
12613 The file contains package information on a line-per-package
12614 basis as follows:
12615 <literallayout class='monospaced'>
12616 <replaceable>packagename</replaceable> <replaceable>packagearch</replaceable> <replaceable>version</replaceable>
12617 </literallayout>
12618 </para>
12619
12620 <para>
12621 The
12622 <link linkend='ref-classes-populate-sdk-*'><filename>populate_sdk_base</filename></link>
12623 class defines the manifest file as follows:
12624 <literallayout class='monospaced'>
12625 SDK_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.target.manifest"
12626 </literallayout>
12627 The location is derived using the
12628 <link linkend='var-SDK_DEPLOY'><filename>SDK_DEPLOY</filename></link>
12629 and
12630 <link linkend='var-TOOLCHAIN_OUTPUTNAME'><filename>TOOLCHAIN_OUTPUTNAME</filename></link>
12631 variables.
12632 </para>
12633 </glossdef>
12634 </glossentry>
12635
12636 <glossentry id='var-SDK_TARGETS'><glossterm>SDK_TARGETS</glossterm>
12637 <info>
12638 SDK_TARGETS[doc] = "A list of targets to install from shared state as part of the standard or extensible SDK installation."
12639 </info>
12640 <glossdef>
12641 <para role="glossdeffirst">
12642 A list of targets to install from shared state as part of
12643 the standard or extensible SDK installation.
12644 The default value is "${PN}" (i.e. the image from which
12645 the SDK is built).
12646 </para>
12647
12648 <para>
12649 The <filename>SDK_TARGETS</filename> variable is an
12650 internal variable and typically would not be changed.
12651 </para>
12652 </glossdef>
12653 </glossentry>
12654
12655 <glossentry id='var-SDK_TITLE'><glossterm>SDK_TITLE</glossterm>
12656 <info>
12657 SDK_TITLE[doc] = "The title to be printed when running the SDK installer."
12658 </info>
12659 <glossdef>
12660 <para role="glossdeffirst">
12661 The title to be printed when running the SDK installer.
12662 By default, this title is based on the
12663 <link linkend='var-DISTRO_NAME'><filename>DISTRO_NAME</filename></link>
12664 or
12665 <link linkend='var-DISTRO'><filename>DISTRO</filename></link>
12666 variable and is set in the
12667 <link linkend='ref-classes-populate-sdk-*'><filename>populate_sdk_base</filename></link>
12668 class as follows:
12669 <literallayout class='monospaced'>
12670 SDK_TITLE ??= "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} SDK"
12671 </literallayout>
12672 For the default distribution "poky",
12673 <filename>SDK_TITLE</filename> is set to
12674 "Poky (Yocto Project Reference Distro)".
12675 </para>
12676
12677 <para>
12678 For information on how to change this default title,
12679 see the
12680 "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-changing-the-sdk-installer-title'>Changing the Extensible SDK Installer Title</ulink>"
12681 section in the Yocto Project Application Development and
12682 the Extensible Software Development Kit (eSDK) manual.
12683 </para>
12684 </glossdef>
12685 </glossentry>
12686
12687 <glossentry id='var-SDK_UPDATE_URL'><glossterm>SDK_UPDATE_URL</glossterm>
12688 <info>
12689 SDK_UPDATE_URL[doc] = "An optional URL for an update server for the extensible SDK."
12690 </info>
12691 <glossdef>
12692 <para role="glossdeffirst">
12693 An optional URL for an update server for the extensible
12694 SDK.
12695 If set, the value is used as the default update server when
12696 running <filename>devtool sdk-update</filename> within the
12697 extensible SDK.
12698 </para>
12699 </glossdef>
12700 </glossentry>
12701
12702 <glossentry id='var-SDK_VENDOR'><glossterm>SDK_VENDOR</glossterm>
12703 <info>
12704 SDK_VENDOR[doc] = "Specifies the name of the SDK vendor."
12705 </info>
12706 <glossdef>
12707 <para role="glossdeffirst">
12708 Specifies the name of the SDK vendor.
12709 </para>
12710 </glossdef>
12711 </glossentry>
12712
12713 <glossentry id='var-SDK_VERSION'><glossterm>SDK_VERSION</glossterm>
12714 <info>
12715 SDK_VERSION[doc] = "Specifies the version for the SDK."
12716 </info>
12717 <glossdef>
12718 <para role="glossdeffirst">
12719 Specifies the version of the SDK.
12720 The distribution configuration file (e.g.
12721 <filename>/meta-poky/conf/distro/poky.conf</filename>)
12722 defines the <filename>SDK_VERSION</filename> as follows:
12723 <literallayout class='monospaced'>
12724 SDK_VERSION = "${@d.getVar('DISTRO_VERSION').replace('snapshot-${DATE}','snapshot')}"
12725 </literallayout>
12726 </para>
12727
12728 <para>
12729 For additional information, see the
12730 <link linkend='var-DISTRO_VERSION'><filename>DISTRO_VERSION</filename></link>
12731 and
12732 <link linkend='var-DATE'><filename>DATE</filename></link>
12733 variables.
12734 </para>
12735 </glossdef>
12736 </glossentry>
12737
12738 <glossentry id='var-SDKEXTPATH'><glossterm>SDKEXTPATH</glossterm>
12739 <info>
12740 SDKEXTPATH[doc] = "The default installation directory for the extensible SDK."
12741 </info>
12742 <glossdef>
12743 <para role="glossdeffirst">
12744 The default installation directory for the Extensible SDK.
12745 By default, this directory is based on the
12746 <link linkend='var-DISTRO'><filename>DISTRO</filename></link>
12747 variable and is set in the
12748 <link linkend='ref-classes-populate-sdk-*'><filename>populate_sdk_base</filename></link>
12749 class as follows:
12750 <literallayout class='monospaced'>
12751 SDKEXTPATH ??= "~/${@d.getVar('DISTRO')}_sdk"
12752 </literallayout>
12753 For the default distribution "poky", the
12754 <filename>SDKEXTPATH</filename> is set to "poky_sdk".
12755 </para>
12756
12757 <para>
12758 For information on how to change this default directory,
12759 see the
12760 "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-changing-the-default-sdk-installation-directory'>Changing the Default SDK Installation Directory</ulink>"
12761 section in the Yocto Project Application Development and
12762 the Extensible Software Development Kit (eSDK) manual.
12763 </para>
12764 </glossdef>
12765 </glossentry>
12766
12767 <glossentry id='var-SDKIMAGE_FEATURES'><glossterm>SDKIMAGE_FEATURES</glossterm>
12768 <info>
12769 SDKIMAGE_FEATURES[doc] = "Equivalent to IMAGE_FEATURES. However, this variable applies to the SDK generated from an image using the command 'bitbake -c populate_sdk imagename'."
12770 </info>
12771 <glossdef>
12772 <para role="glossdeffirst">
12773 Equivalent to
12774 <filename><link linkend='var-IMAGE_FEATURES'>IMAGE_FEATURES</link></filename>.
12775 However, this variable applies to the SDK generated from an
12776 image using the following command:
12777 <literallayout class='monospaced'>
12778 $ bitbake -c populate_sdk <replaceable>imagename</replaceable>
12779 </literallayout>
12780 </para>
12781 </glossdef>
12782 </glossentry>
12783
12784 <glossentry id='var-SDKMACHINE'><glossterm>SDKMACHINE</glossterm>
12785 <info>
12786 SDKMACHINE[doc] = "Specifies the architecture (i.e. i686 or x86_64) for which to build SDK items."
12787 </info>
12788 <glossdef>
12789 <para role="glossdeffirst">
12790 The machine for which the SDK is built.
12791 In other words, the SDK is built such that it
12792 runs on the target you specify with the
12793 <filename>SDKMACHINE</filename> value.
12794 The value points to a corresponding
12795 <filename>.conf</filename> file under
12796 <filename>conf/machine-sdk/</filename>.
12797 </para>
12798
12799 <para>
12800 You can use "i686" and "x86_64" as possible values
12801 for this variable. The variable defaults to "i686"
12802 and is set in the local.conf file in the Build Directory.
12803 <literallayout class='monospaced'>
12804 SDKMACHINE ?= "i686"
12805 </literallayout>
12806 <note>
12807 You cannot set the <filename>SDKMACHINE</filename>
12808 variable in your distribution configuration file.
12809 If you do, the configuration will not take affect.
12810 </note>
12811 </para>
12812 </glossdef>
12813 </glossentry>
12814
12815 <glossentry id='var-SDKPATH'><glossterm>SDKPATH</glossterm>
12816 <info>
12817 SDKPATH[doc] = "Defines the path offered to the user for installation of the SDK that is generated by the OpenEmbedded build system."
12818 </info>
12819 <glossdef>
12820 <para role="glossdeffirst">
12821 Defines the path offered to the user for installation
12822 of the SDK that is generated by the OpenEmbedded build
12823 system.
12824 The path appears as the default location for installing
12825 the SDK when you run the SDK's installation script.
12826 You can override the offered path when you run the
12827 script.
12828 </para>
12829 </glossdef>
12830 </glossentry>
12831
12832 <glossentry id='var-SDKTARGETSYSROOT'><glossterm>SDKTARGETSYSROOT</glossterm>
12833 <info>
12834 SDKTARGETSYSROOT[doc] = "Full path to the sysroot used for cross-compilation within an SDK as it will be when installed into the default SDKPATH."
12835 </info>
12836 <glossdef>
12837 <para role="glossdeffirst">
12838 The full path to the sysroot used for cross-compilation
12839 within an SDK as it will be when installed into the
12840 default
12841 <link linkend='var-SDKPATH'><filename>SDKPATH</filename></link>.
12842 </para>
12843 </glossdef>
12844 </glossentry>
12845
12846 <glossentry id='var-SECTION'><glossterm>SECTION</glossterm>
12847 <info>
12848 SECTION[doc] = "The section in which packages should be categorized. Package management utilities can make use of this variable."
12849 </info>
12850 <glossdef>
12851 <para role="glossdeffirst">
12852 The section in which packages should be categorized.
12853 Package management utilities can make use of this variable.
12854 </para>
12855 </glossdef>
12856 </glossentry>
12857
12858 <glossentry id='var-SELECTED_OPTIMIZATION'><glossterm>SELECTED_OPTIMIZATION</glossterm>
12859 <info>
12860 SELECTED_OPTIMIZATION[doc] = "The variable takes the value of FULL_OPTIMIZATION unless DEBUG_BUILD = '1'. In this case, the value of DEBUG_OPTIMIZATION is used."
12861 </info>
12862 <glossdef>
12863 <para role="glossdeffirst">
12864 Specifies the optimization flags passed to the C compiler
12865 when building for the target.
12866 The flags are passed through the default value of the
12867 <link linkend='var-TARGET_CFLAGS'><filename>TARGET_CFLAGS</filename></link>
12868 variable.
12869 </para>
12870
12871 <para>
12872 The <filename>SELECTED_OPTIMIZATION</filename> variable
12873 takes the value of
12874 <filename><link linkend='var-FULL_OPTIMIZATION'>FULL_OPTIMIZATION</link></filename>
12875 unless <filename><link linkend='var-DEBUG_BUILD'>DEBUG_BUILD</link></filename> = "1".
12876 If that is the case, the value of
12877 <filename><link linkend='var-DEBUG_OPTIMIZATION'>DEBUG_OPTIMIZATION</link></filename> is used.
12878 </para>
12879 </glossdef>
12880 </glossentry>
12881
12882 <glossentry id='var-SERIAL_CONSOLE'><glossterm>SERIAL_CONSOLE</glossterm>
12883 <info>
12884 SERIAL_CONSOLE[doc] = "Defines the serial consoles (TTYs) to enable using getty."
12885 </info>
12886 <glossdef>
12887 <para role="glossdeffirst">
12888 Defines a serial console (TTY) to enable using
12889 <ulink url='https://en.wikipedia.org/wiki/Getty_(Unix)'>getty</ulink>.
12890 Provide a value that specifies the baud rate followed by
12891 the TTY device name separated by a space.
12892 You cannot specify more than one TTY device:
12893 <literallayout class='monospaced'>
12894 SERIAL_CONSOLE = "115200 ttyS0"
12895 </literallayout>
12896 <note>
12897 The <filename>SERIAL_CONSOLE</filename> variable
12898 is deprecated.
12899 Please use the
12900 <link linkend='var-SERIAL_CONSOLES'><filename>SERIAL_CONSOLES</filename></link>
12901 variable.
12902 </note>
12903 </para>
12904 </glossdef>
12905 </glossentry>
12906
12907 <glossentry id='var-SERIAL_CONSOLES'><glossterm>SERIAL_CONSOLES</glossterm>
12908 <info>
12909 SERIAL_CONSOLES[doc] = "Defines the serial consoles (TTYs) to enable using getty."
12910 </info>
12911 <glossdef>
12912 <para role="glossdeffirst">
12913 Defines a serial console (TTY) to enable using
12914 <ulink url='https://en.wikipedia.org/wiki/Getty_(Unix)'>getty</ulink>.
12915 Provide a value that specifies the baud rate followed by
12916 the TTY device name separated by a semicolon.
12917 Use spaces to separate multiple devices:
12918 <literallayout class='monospaced'>
12919 SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1"
12920 </literallayout>
12921 </para>
12922 </glossdef>
12923 </glossentry>
12924
12925 <glossentry id='var-SERIAL_CONSOLES_CHECK'><glossterm>SERIAL_CONSOLES_CHECK</glossterm>
12926 <info>
12927 SERIAL_CONSOLES_CHECK[doc] = "Selected SERIAL_CONSOLES to check against /proc/console before enabling using getty. Supported only by SysVinit."
12928 </info>
12929 <glossdef>
12930 <para role="glossdeffirst">
12931 Specifies serial consoles, which must be listed in
12932 <link linkend='var-SERIAL_CONSOLES'><filename>SERIAL_CONSOLES</filename></link>,
12933 to check against <filename>/proc/console</filename>
12934 before enabling them using getty.
12935 This variable allows aliasing in the format:
12936 &lt;device&gt;:&lt;alias&gt;.
12937 If a device was listed as "sclp_line0"
12938 in <filename>/dev/</filename> and "ttyS0" was listed
12939 in <filename>/proc/console</filename>, you would do the
12940 following:
12941 <literallayout class='monospaced'>
12942 SERIAL_CONSOLES_CHECK = "slcp_line0:ttyS0"
12943 </literallayout>
12944 This variable is currently only supported with SysVinit
12945 (i.e. not with systemd).
12946 </para>
12947 </glossdef>
12948 </glossentry>
12949
12950 <glossentry id='var-SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS'><glossterm>SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS</glossterm>
12951 <info>
12952 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS[doc] = "A list of recipe dependencies that should not be used to determine signatures of tasks from one recipe when they depend on tasks from another recipe."
12953 </info>
12954 <glossdef>
12955 <para role="glossdeffirst">
12956 A list of recipe dependencies that should not be used to
12957 determine signatures of tasks from one recipe when they
12958 depend on tasks from another recipe.
12959 For example:
12960 <literallayout class='monospaced'>
12961 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "intone->mplayer2"
12962 </literallayout>
12963 </para>
12964
12965 <para>
12966 In the previous example, <filename>intone</filename>
12967 depends on <filename>mplayer2</filename>.
12968 </para>
12969
12970 <para>
12971 You can use the special token <filename>"*"</filename> on
12972 the left-hand side of the dependency to match all
12973 recipes except the one on the right-hand side.
12974 Here is an example:
12975 <literallayout class='monospaced'>
12976 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "*->quilt-native"
12977 </literallayout>
12978 </para>
12979
12980 <para>
12981 In the previous example, all recipes except
12982 <filename>quilt-native</filename> ignore task
12983 signatures from the <filename>quilt-native</filename>
12984 recipe when determining their task signatures.
12985 </para>
12986
12987 <para>
12988 Use of this variable is one mechanism to remove dependencies
12989 that affect task signatures and thus force rebuilds when a
12990 recipe changes.
12991 <note><title>Caution</title>
12992 If you add an inappropriate dependency for a recipe
12993 relationship, the software might break during
12994 runtime if the interface of the second recipe was
12995 changed after the first recipe had been built.
12996 </note>
12997 </para>
12998 </glossdef>
12999 </glossentry>
13000
13001 <glossentry id='var-SIGGEN_EXCLUDERECIPES_ABISAFE'><glossterm>SIGGEN_EXCLUDERECIPES_ABISAFE</glossterm>
13002 <info>
13003 SIGGEN_EXCLUDERECIPES_ABISAFE[doc] = "A list of recipes that are completely stable and will never change."
13004 </info>
13005 <glossdef>
13006 <para role="glossdeffirst">
13007 A list of recipes that are completely stable and will
13008 never change.
13009 The ABI for the recipes in the list are presented by
13010 output from the tasks run to build the recipe.
13011 Use of this variable is one way to remove dependencies from
13012 one recipe on another that affect task signatures and
13013 thus force rebuilds when the recipe changes.
13014 <note><title>Caution</title>
13015 If you add an inappropriate variable to this list,
13016 the software might break at runtime if the
13017 interface of the recipe was changed after the other
13018 had been built.
13019 </note>
13020 </para>
13021 </glossdef>
13022 </glossentry>
13023
13024 <glossentry id='var-SITEINFO_BITS'><glossterm>SITEINFO_BITS</glossterm>
13025 <info>
13026 SITEINFO_BITS[doc] = "Specifies the number of bits for the target system CPU."
13027 </info>
13028 <glossdef>
13029 <para role="glossdeffirst">
13030 Specifies the number of bits for the target system CPU.
13031 The value should be either "32" or "64".
13032 </para>
13033 </glossdef>
13034 </glossentry>
13035
13036 <glossentry id='var-SITEINFO_ENDIANNESS'><glossterm>SITEINFO_ENDIANNESS</glossterm>
13037 <info>
13038 SITEINFO_ENDIANNESS[doc] = "Specifies the endian byte order of the target system. The value should be either 'le' for 'little-endian' or 'be' for 'big-endian'."
13039 </info>
13040 <glossdef>
13041 <para role="glossdeffirst">
13042 Specifies the endian byte order of the target system.
13043 The value should be either "le" for little-endian or "be" for big-endian.
13044 </para>
13045 </glossdef>
13046 </glossentry>
13047
13048 <glossentry id='var-SKIP_FILEDEPS'><glossterm>SKIP_FILEDEPS</glossterm>
13049 <info>
13050 SKIP_FILEDEPS[doc] = "Enables you to remove all files from the 'Provides' section of an RPM package."
13051 </info>
13052 <glossdef>
13053 <para role="glossdeffirst">
13054 Enables removal of all files from the "Provides" section of
13055 an RPM package.
13056 Removal of these files is required for packages containing
13057 prebuilt binaries and libraries such as
13058 <filename>libstdc++</filename> and
13059 <filename>glibc</filename>.
13060 </para>
13061
13062 <para>
13063 To enable file removal, set the variable to "1" in your
13064 <filename>conf/local.conf</filename> configuration file
13065 in your:
13066 <link linkend='build-directory'>Build Directory</link>.
13067 <literallayout class='monospaced'>
13068 SKIP_FILEDEPS = "1"
13069 </literallayout>
13070 </para>
13071 </glossdef>
13072 </glossentry>
13073
13074 <glossentry id='var-SOC_FAMILY'><glossterm>SOC_FAMILY</glossterm>
13075 <info>
13076 SOC_FAMILY[doc] = "Groups together machines based upon the same family of SOC (System On Chip). You typically set this variable in a common .inc file that you include in the configuration files of all the machines."
13077 </info>
13078 <glossdef>
13079 <para role="glossdeffirst">
13080 Groups together machines based upon the same family
13081 of SOC (System On Chip).
13082 You typically set this variable in a common
13083 <filename>.inc</filename> file that you include in the
13084 configuration files of all the machines.
13085 <note>
13086 You must include
13087 <filename>conf/machine/include/soc-family.inc</filename>
13088 for this variable to appear in
13089 <link linkend='var-MACHINEOVERRIDES'><filename>MACHINEOVERRIDES</filename></link>.
13090 </note>
13091 </para>
13092 </glossdef>
13093 </glossentry>
13094
13095 <glossentry id='var-SOLIBS'><glossterm>SOLIBS</glossterm>
13096 <info>
13097 SOLIBS[doc] = "Defines the suffix for shared libraries used on the target platform."
13098 </info>
13099 <glossdef>
13100 <para role="glossdeffirst">
13101 Defines the suffix for shared libraries used on the
13102 target platform.
13103 By default, this suffix is ".so.*" for all Linux-based
13104 systems and is defined in the
13105 <filename>meta/conf/bitbake.conf</filename> configuration
13106 file.
13107 </para>
13108
13109 <para>
13110 You will see this variable referenced in the default values
13111 of <filename>FILES_${PN}</filename>.
13112 </para>
13113 </glossdef>
13114 </glossentry>
13115
13116 <glossentry id='var-SOLIBSDEV'><glossterm>SOLIBSDEV</glossterm>
13117 <info>
13118 SOLIBSDEV[doc] = "Defines the suffix for the development symbolic link (symlink) for shared libraries on the target platform."
13119 </info>
13120 <glossdef>
13121 <para role="glossdeffirst">
13122 Defines the suffix for the development symbolic link
13123 (symlink) for shared libraries on the target platform.
13124 By default, this suffix is ".so" for Linux-based
13125 systems and is defined in the
13126 <filename>meta/conf/bitbake.conf</filename> configuration
13127 file.
13128 </para>
13129
13130 <para>
13131 You will see this variable referenced in the default values
13132 of <filename>FILES_${PN}-dev</filename>.
13133 </para>
13134 </glossdef>
13135 </glossentry>
13136
13137 <glossentry id='var-SOURCE_MIRROR_FETCH'><glossterm>SOURCE_MIRROR_FETCH</glossterm>
13138 <info>
13139 SOURCE_MIRROR_FETCH[doc] = "Set as part of a source mirror generation script to skip COMPATIBLE_MACHINE and COMPATIBLE_HOST checks."
13140 </info>
13141 <glossdef>
13142 <para role="glossdeffirst">
13143 When you are fetching files to create a mirror of sources
13144 (i.e. creating a source mirror), setting
13145 <filename>SOURCE_MIRROR_FETCH</filename> to "1" in your
13146 <filename>local.conf</filename> configuration file ensures
13147 the source for all recipes are fetched regardless of
13148 whether or not a recipe is compatible with the
13149 configuration.
13150 A recipe is considered incompatible with the currently
13151 configured machine when either or both the
13152 <link linkend='var-COMPATIBLE_MACHINE'><filename>COMPATIBLE_MACHINE</filename></link>
13153 variable and
13154 <link linkend='var-COMPATIBLE_HOST'><filename>COMPATIBLE_HOST</filename></link>
13155 variables specify compatibility with a machine other
13156 than that of the current machine or host.
13157 <note><title>Warning</title>
13158 Do not set the
13159 <filename>SOURCE_MIRROR_FETCH</filename> variable
13160 unless you are creating a source mirror.
13161 In other words, do not set the variable during a
13162 normal build.
13163 </note>
13164 </para>
13165 </glossdef>
13166 </glossentry>
13167
13168 <glossentry id='var-SOURCE_MIRROR_URL'><glossterm>SOURCE_MIRROR_URL</glossterm>
13169 <info>
13170 SOURCE_MIRROR_URL[doc] = "URL to source mirror that will be used before fetching from original SRC_URI."
13171 </info>
13172 <glossdef>
13173 <para role="glossdeffirst">
13174 Defines your own
13175 <link linkend='var-PREMIRRORS'><filename>PREMIRRORS</filename></link>
13176 from which to first fetch source before attempting to fetch
13177 from the upstream specified in
13178 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>.
13179 </para>
13180
13181 <para>
13182 To use this variable, you must globally inherit the
13183 <link linkend='ref-classes-own-mirrors'><filename>own-mirrors</filename></link>
13184 class and then provide the URL to your mirrors.
13185 Here is the general syntax:
13186 <literallayout class='monospaced'>
13187 INHERIT += "own-mirrors"
13188 SOURCE_MIRROR_URL = "http://<replaceable>example</replaceable>.com/<replaceable>my_source_mirror</replaceable>"
13189 </literallayout>
13190 <note>
13191 You can specify only a single URL in
13192 <filename>SOURCE_MIRROR_URL</filename>.
13193 </note>
13194 </para>
13195 </glossdef>
13196 </glossentry>
13197
13198 <glossentry id='var-SPDXLICENSEMAP'><glossterm>SPDXLICENSEMAP</glossterm>
13199 <info>
13200 SPDXLICENSEMAP[doc] = "Maps commonly used license names to their SPDX counterparts found in meta/files/common-licenses/."
13201 </info>
13202 <glossdef>
13203 <para role="glossdeffirst">
13204 Maps commonly used license names to their SPDX counterparts
13205 found in <filename>meta/files/common-licenses/</filename>.
13206 For the default <filename>SPDXLICENSEMAP</filename>
13207 mappings, see the
13208 <filename>meta/conf/licenses.conf</filename> file.
13209 </para>
13210
13211 <para>
13212 For additional information, see the
13213 <link linkend='var-LICENSE'><filename>LICENSE</filename></link>
13214 variable.
13215 </para>
13216 </glossdef>
13217 </glossentry>
13218
13219 <glossentry id='var-SPECIAL_PKGSUFFIX'><glossterm>SPECIAL_PKGSUFFIX</glossterm>
13220 <info>
13221 SPECIAL_PKGSUFFIX[doc] = "A list of prefixes for PN used by the OpenEmbedded build system to create variants of recipes or packages. The list specifies the prefixes to strip off during certain circumstances such as the generation of the BPN variable."
13222 </info>
13223 <glossdef>
13224 <para role="glossdeffirst">
13225 A list of prefixes for <link linkend='var-PN'><filename>PN</filename></link> used by the
13226 OpenEmbedded build system to create variants of recipes or packages.
13227 The list specifies the prefixes to strip off during certain circumstances
13228 such as the generation of the <link linkend='var-BPN'><filename>BPN</filename></link> variable.
13229 </para>
13230 </glossdef>
13231 </glossentry>
13232
13233 <glossentry id='var-SPL_BINARY'><glossterm>SPL_BINARY</glossterm>
13234 <info>
13235 SPL_BINARY[doc] = "The file type of the Secondary Program Loader (SPL)."
13236 </info>
13237 <glossdef>
13238 <para role="glossdeffirst">
13239 The file type for the Secondary Program Loader (SPL).
13240 Some devices use an SPL from which to boot (e.g. the
13241 BeagleBone development board).
13242 For such cases, you can declare the file type of the
13243 SPL binary in the <filename>u-boot.inc</filename> include
13244 file, which is used in the U-Boot recipe.
13245 </para>
13246
13247 <para>
13248 The SPL file type is set to "null" by default in the
13249 <filename>u-boot.inc</filename> file as follows:
13250 <literallayout class='monospaced'>
13251 # Some versions of u-boot build an SPL (Second Program Loader) image that
13252 # should be packaged along with the u-boot binary as well as placed in the
13253 # deploy directory. For those versions they can set the following variables
13254 # to allow packaging the SPL.
13255 SPL_BINARY ?= ""
13256 SPL_BINARYNAME ?= "${@os.path.basename(d.getVar("SPL_BINARY"))}"
13257 SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}"
13258 SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}"
13259 </literallayout>
13260 The <filename>SPL_BINARY</filename> variable helps form
13261 various <filename>SPL_*</filename> variables used by
13262 the OpenEmbedded build system.
13263 </para>
13264
13265 <para>
13266 See the BeagleBone machine configuration example in the
13267 "<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-bitbake-layers-script'>Creating a new BSP Layer Using the <filename>bitbake-layers</filename> Script</ulink>"
13268 section in the Yocto Project Board Support Package
13269 Developer's Guide for additional information.
13270 </para>
13271 </glossdef>
13272 </glossentry>
13273
13274 <glossentry id='var-SRC_URI'><glossterm>SRC_URI</glossterm>
13275 <info>
13276 SRC_URI[doc] = "The list of source files - local or remote. This variable tells the OpenEmbedded build system what bits to pull in for the build and how to pull them in."
13277 </info>
13278 <glossdef>
13279 <para role="glossdeffirst">
13280 The list of source files - local or remote.
13281 This variable tells the OpenEmbedded build system which bits
13282 to pull in for the build and how to pull them in.
13283 For example, if the recipe or append file only needs to
13284 fetch a tarball from the Internet, the recipe or
13285 append file uses a single <filename>SRC_URI</filename>
13286 entry.
13287 On the other hand, if the recipe or append file needs to
13288 fetch a tarball, apply two patches, and include a custom
13289 file, the recipe or append file would include four
13290 instances of the variable.
13291 </para>
13292
13293 <para>
13294 The following list explains the available URI protocols.
13295 URI protocols are highly dependent on particular BitBake
13296 Fetcher submodules.
13297 Depending on the fetcher BitBake uses, various URL
13298 parameters are employed.
13299 For specifics on the supported Fetchers, see the
13300 "<ulink url='&YOCTO_DOCS_BB_URL;#bb-fetchers'>Fetchers</ulink>"
13301 section in the BitBake User Manual.
13302 <itemizedlist>
13303 <listitem><para><emphasis><filename>file://</filename> -</emphasis>
13304 Fetches files, which are usually files shipped with
13305 the
13306 <link linkend='metadata'>Metadata</link>,
13307 from the local machine (e.g.
13308 <ulink url='&YOCTO_DOCS_OM_URL;#patching-dev-environment'>patch</ulink>
13309 files).
13310 The path is relative to the
13311 <link linkend='var-FILESPATH'><filename>FILESPATH</filename></link>
13312 variable.
13313 Thus, the build system searches, in order, from the
13314 following directories, which are assumed to be a
13315 subdirectories of the directory in which the
13316 recipe file (<filename>.bb</filename>) or
13317 append file (<filename>.bbappend</filename>)
13318 resides:
13319 <itemizedlist>
13320 <listitem><para><emphasis><filename>${BPN}</filename> -</emphasis>
13321 The base recipe name without any special
13322 suffix or version numbers.
13323 </para></listitem>
13324 <listitem><para><emphasis><filename>${BP}</filename> -</emphasis>
13325 <filename>${<link linkend='var-BPN'>BPN</link>}-${PV}</filename>.
13326 The base recipe name and version but without
13327 any special package name suffix.
13328 </para></listitem>
13329 <listitem><para><emphasis>files -</emphasis>
13330 Files within a directory, which is named
13331 <filename>files</filename> and is also
13332 alongside the recipe or append file.
13333 </para></listitem>
13334 </itemizedlist>
13335 <note>
13336 If you want the build system to pick up files
13337 specified through a
13338 <filename>SRC_URI</filename>
13339 statement from your append file, you need to be
13340 sure to extend the
13341 <filename>FILESPATH</filename>
13342 variable by also using the
13343 <link linkend='var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></link>
13344 variable from within your append file.
13345 </note>
13346 </para></listitem>
13347 <listitem><para><emphasis><filename>bzr://</filename> -</emphasis> Fetches files from a
13348 Bazaar revision control repository.</para></listitem>
13349 <listitem><para><emphasis><filename>git://</filename> -</emphasis> Fetches files from a
13350 Git revision control repository.</para></listitem>
13351 <listitem><para><emphasis><filename>osc://</filename> -</emphasis> Fetches files from
13352 an OSC (OpenSUSE Build service) revision control repository.</para></listitem>
13353 <listitem><para><emphasis><filename>repo://</filename> -</emphasis> Fetches files from
13354 a repo (Git) repository.</para></listitem>
13355 <listitem><para><emphasis><filename>ccrc://</filename> -</emphasis>
13356 Fetches files from a ClearCase repository.
13357 </para></listitem>
13358 <listitem><para><emphasis><filename>http://</filename> -</emphasis> Fetches files from
13359 the Internet using <filename>http</filename>.</para></listitem>
13360 <listitem><para><emphasis><filename>https://</filename> -</emphasis> Fetches files
13361 from the Internet using <filename>https</filename>.</para></listitem>
13362 <listitem><para><emphasis><filename>ftp://</filename> -</emphasis> Fetches files
13363 from the Internet using <filename>ftp</filename>.</para></listitem>
13364 <listitem><para><emphasis><filename>cvs://</filename> -</emphasis> Fetches files from
13365 a CVS revision control repository.</para></listitem>
13366 <listitem><para><emphasis><filename>hg://</filename> -</emphasis> Fetches files from
13367 a Mercurial (<filename>hg</filename>) revision control repository.</para></listitem>
13368 <listitem><para><emphasis><filename>p4://</filename> -</emphasis> Fetches files from
13369 a Perforce (<filename>p4</filename>) revision control repository.</para></listitem>
13370 <listitem><para><emphasis><filename>ssh://</filename> -</emphasis> Fetches files from
13371 a secure shell.</para></listitem>
13372 <listitem><para><emphasis><filename>svn://</filename> -</emphasis> Fetches files from
13373 a Subversion (<filename>svn</filename>) revision control repository.</para></listitem>
13374 <listitem><para><emphasis><filename>npm://</filename> -</emphasis> Fetches JavaScript
13375 modules from a registry.
13376 </para></listitem>
13377 </itemizedlist>
13378 </para>
13379
13380 <para>
13381 Standard and recipe-specific options for <filename>SRC_URI</filename> exist.
13382 Here are standard options:
13383 <itemizedlist>
13384 <listitem><para><emphasis><filename>apply</filename> -</emphasis> Whether to apply
13385 the patch or not.
13386 The default action is to apply the patch.</para></listitem>
13387 <listitem><para><emphasis><filename>striplevel</filename> -</emphasis> Which
13388 striplevel to use when applying the patch.
13389 The default level is 1.</para></listitem>
13390 <listitem><para><emphasis><filename>patchdir</filename> -</emphasis> Specifies
13391 the directory in which the patch should be applied.
13392 The default is <filename>${</filename><link linkend='var-S'><filename>S</filename></link><filename>}</filename>.
13393 </para></listitem>
13394 </itemizedlist>
13395 </para>
13396
13397 <para>
13398 Here are options specific to recipes building code from a revision control system:
13399 <itemizedlist>
13400 <listitem><para><emphasis><filename>mindate</filename> -</emphasis>
13401 Apply the patch only if
13402 <link linkend='var-SRCDATE'><filename>SRCDATE</filename></link>
13403 is equal to or greater than <filename>mindate</filename>.
13404 </para></listitem>
13405 <listitem><para><emphasis><filename>maxdate</filename> -</emphasis>
13406 Apply the patch only if <filename>SRCDATE</filename>
13407 is not later than <filename>maxdate</filename>.
13408 </para></listitem>
13409 <listitem><para><emphasis><filename>minrev</filename> -</emphasis>
13410 Apply the patch only if <filename>SRCREV</filename>
13411 is equal to or greater than <filename>minrev</filename>.
13412 </para></listitem>
13413 <listitem><para><emphasis><filename>maxrev</filename> -</emphasis>
13414 Apply the patch only if <filename>SRCREV</filename>
13415 is not later than <filename>maxrev</filename>.
13416 </para></listitem>
13417 <listitem><para><emphasis><filename>rev</filename> -</emphasis>
13418 Apply the patch only if <filename>SRCREV</filename>
13419 is equal to <filename>rev</filename>.
13420 </para></listitem>
13421 <listitem><para><emphasis><filename>notrev</filename> -</emphasis>
13422 Apply the patch only if <filename>SRCREV</filename>
13423 is not equal to <filename>rev</filename>.
13424 </para></listitem>
13425 </itemizedlist>
13426 </para>
13427
13428 <para>
13429 Here are some additional options worth mentioning:
13430 <itemizedlist>
13431 <listitem><para><emphasis><filename>unpack</filename> -</emphasis> Controls
13432 whether or not to unpack the file if it is an archive.
13433 The default action is to unpack the file.</para></listitem>
13434 <listitem><para><emphasis><filename>destsuffix</filename> -</emphasis> Places the file
13435 (or extracts its contents) into the specified
13436 subdirectory of <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>
13437 when the Git fetcher is used.
13438 </para></listitem>
13439 <listitem><para><emphasis><filename>subdir</filename> -</emphasis> Places the file
13440 (or extracts its contents) into the specified
13441 subdirectory of <filename>WORKDIR</filename>
13442 when the local (<filename>file://</filename>)
13443 fetcher is used.
13444 </para></listitem>
13445 <listitem><para><emphasis><filename>localdir</filename> -</emphasis> Places the file
13446 (or extracts its contents) into the specified
13447 subdirectory of <filename>WORKDIR</filename> when
13448 the CVS fetcher is used.
13449 </para></listitem>
13450 <listitem><para><emphasis><filename>subpath</filename> -</emphasis>
13451 Limits the checkout to a specific subpath of the
13452 tree when using the Git fetcher is used.
13453 </para></listitem>
13454 <listitem><para><emphasis><filename>name</filename> -</emphasis> Specifies a
13455 name to be used for association with <filename>SRC_URI</filename> checksums
13456 when you have more than one file specified in <filename>SRC_URI</filename>.
13457 </para></listitem>
13458 <listitem><para><emphasis><filename>downloadfilename</filename> -</emphasis> Specifies
13459 the filename used when storing the downloaded file.</para></listitem>
13460 </itemizedlist>
13461 </para>
13462 </glossdef>
13463 </glossentry>
13464
13465 <glossentry id='var-SRC_URI_OVERRIDES_PACKAGE_ARCH'><glossterm>SRC_URI_OVERRIDES_PACKAGE_ARCH</glossterm>
13466 <info>
13467 SRC_URI_OVERRIDES_PACKAGE_ARCH[doc] = "By default, the OpenEmbedded build system automatically detects whether SRC_URI contains files that are machine-specific. If so, the build system automatically changes PACKAGE_ARCH. Setting this variable to '0' disables this behavior."
13468 </info>
13469 <glossdef>
13470 <para role="glossdeffirst">
13471 By default, the OpenEmbedded build system automatically detects whether
13472 <filename><link linkend='var-SRC_URI'>SRC_URI</link></filename>
13473 contains files that are machine-specific.
13474 If so, the build system automatically changes
13475 <filename><link linkend='var-PACKAGE_ARCH'>PACKAGE_ARCH</link></filename>.
13476 Setting this variable to "0" disables this behavior.
13477 </para>
13478 </glossdef>
13479 </glossentry>
13480
13481 <glossentry id='var-SRCDATE'><glossterm>SRCDATE</glossterm>
13482 <info>
13483 SRCDATE[doc] = "The date of the source code used to build the package. This variable applies only if the source was fetched from a Source Code Manager (SCM)."
13484 </info>
13485 <glossdef>
13486 <para role="glossdeffirst">
13487 The date of the source code used to build the package.
13488 This variable applies only if the source was fetched from a Source Code Manager (SCM).
13489 </para>
13490 </glossdef>
13491 </glossentry>
13492
13493 <glossentry id='var-SRCPV'><glossterm>SRCPV</glossterm>
13494 <info>
13495 SRCPV[doc] = "Returns the version string of the current package. This string is used to help define the value of PV."
13496 </info>
13497 <glossdef>
13498 <para role="glossdeffirst">
13499 Returns the version string of the current package.
13500 This string is used to help define the value of
13501 <link linkend='var-PV'><filename>PV</filename></link>.
13502 </para>
13503
13504 <para>
13505 The <filename>SRCPV</filename> variable is defined in the
13506 <filename>meta/conf/bitbake.conf</filename> configuration
13507 file in the
13508 <link linkend='source-directory'>Source Directory</link>
13509 as follows:
13510 <literallayout class='monospaced'>
13511 SRCPV = "${@bb.fetch2.get_srcrev(d)}"
13512 </literallayout>
13513 </para>
13514
13515 <para>
13516 Recipes that need to define <filename>PV</filename> do so
13517 with the help of the <filename>SRCPV</filename>.
13518 For example, the <filename>ofono</filename> recipe
13519 (<filename>ofono_git.bb</filename>) located in
13520 <filename>meta/recipes-connectivity</filename> in the
13521 Source Directory defines <filename>PV</filename> as
13522 follows:
13523 <literallayout class='monospaced'>
13524 PV = "0.12-git${SRCPV}"
13525 </literallayout>
13526 </para>
13527 </glossdef>
13528 </glossentry>
13529
13530 <glossentry id='var-SRCREV'><glossterm>SRCREV</glossterm>
13531 <info>
13532 SRCREV[doc] = "The revision of the source code used to build the package. This variable applies to Subversion, Git, Mercurial, and Bazaar only."
13533 </info>
13534 <glossdef>
13535 <para role="glossdeffirst">
13536 The revision of the source code used to build the package.
13537 This variable applies to Subversion, Git, Mercurial, and
13538 Bazaar only.
13539 Note that if you want to build a fixed revision and you
13540 want to avoid performing a query on the remote repository
13541 every time BitBake parses your recipe, you should specify
13542 a <filename>SRCREV</filename> that is a
13543 full revision identifier and not just a tag.
13544 <note>
13545 For information on limitations when inheriting the
13546 latest revision of software using
13547 <filename>SRCREV</filename>, see the
13548 <link linkend='var-AUTOREV'><filename>AUTOREV</filename></link>
13549 variable description and the
13550 "<ulink url='&YOCTO_DOCS_DEV_URL;#automatically-incrementing-a-binary-package-revision-number'>Automatically Incrementing a Binary Package Revision Number</ulink>"
13551 section, which is in the Yocto Project Development
13552 Tasks Manual.
13553 </note>
13554 </para>
13555
13556 </glossdef>
13557 </glossentry>
13558
13559 <glossentry id='var-SSTATE_DIR'><glossterm>SSTATE_DIR</glossterm>
13560 <info>
13561 SSTATE_DIR[doc] = "The directory for the shared state cache."
13562 </info>
13563 <glossdef>
13564 <para role="glossdeffirst">
13565 The directory for the shared state cache.
13566 </para>
13567 </glossdef>
13568 </glossentry>
13569
13570 <glossentry id='var-SSTATE_MIRROR_ALLOW_NETWORK'><glossterm>SSTATE_MIRROR_ALLOW_NETWORK</glossterm>
13571 <info>
13572 SSTATE_MIRROR_ALLOW_NETWORK[doc] = "If set to "1", allows fetches from mirrors that are specified in SSTATE_MIRRORS to work even when fetching from the network is disabled by setting BB_NO_NETWORK to "1"."
13573 </info>
13574 <glossdef>
13575 <para role="glossdeffirst">
13576 If set to "1", allows fetches from
13577 mirrors that are specified in
13578 <link linkend='var-SSTATE_MIRRORS'><filename>SSTATE_MIRRORS</filename></link>
13579 to work even when fetching from the network is
13580 disabled by setting <filename>BB_NO_NETWORK</filename>
13581 to "1".
13582 Using the
13583 <filename>SSTATE_MIRROR_ALLOW_NETWORK</filename>
13584 variable is useful if you have set
13585 <filename>SSTATE_MIRRORS</filename> to point to an
13586 internal server for your shared state cache, but
13587 you want to disable any other fetching from the network.
13588 </para>
13589 </glossdef>
13590 </glossentry>
13591
13592 <glossentry id='var-SSTATE_MIRRORS'><glossterm>SSTATE_MIRRORS</glossterm>
13593 <info>
13594 SSTATE_MIRRORS[doc] = "Configures the OpenEmbedded build system to search other mirror locations for prebuilt cache data objects before building out the data. You can specify a filesystem directory or a remote URL such as HTTP or FTP."
13595 </info>
13596 <glossdef>
13597 <para role="glossdeffirst">
13598 Configures the OpenEmbedded build system to search other
13599 mirror locations for prebuilt cache data objects before
13600 building out the data.
13601 This variable works like fetcher
13602 <link linkend='var-MIRRORS'><filename>MIRRORS</filename></link>
13603 and <link linkend='var-PREMIRRORS'><filename>PREMIRRORS</filename></link>
13604 and points to the cache locations to check for the shared
13605 state (sstate) objects.
13606 </para>
13607
13608 <para>
13609 You can specify a filesystem directory or a remote URL such
13610 as HTTP or FTP.
13611 The locations you specify need to contain the shared state
13612 cache (sstate-cache) results from previous builds.
13613 The sstate-cache you point to can also be from builds on
13614 other machines.
13615 </para>
13616
13617 <para>
13618 When pointing to sstate build artifacts on another machine
13619 that uses a different GCC version for native builds,
13620 you must configure <filename>SSTATE_MIRRORS</filename>
13621 with a regular expression that maps local search paths
13622 to server paths.
13623 The paths need to take into account
13624 <link linkend='var-NATIVELSBSTRING'><filename>NATIVELSBSTRING</filename></link>
13625 set by the
13626 <link linkend='ref-classes-uninative'><filename>uninative</filename></link>
13627 class.
13628 For example, the following maps the local search path
13629 <filename>universal-4.9</filename> to the server-provided
13630 path <replaceable>server_url_sstate_path</replaceable>:
13631 <literallayout class='monospaced'>
13632 SSTATE_MIRRORS ?= file://universal-4.9/(.*) http://<replaceable>server_url_sstate_path</replaceable>/universal-4.8/\1 \n
13633 </literallayout>
13634 </para>
13635
13636 <para>
13637 If a mirror uses the same structure as
13638 <link linkend='var-SSTATE_DIR'><filename>SSTATE_DIR</filename></link>,
13639 you need to add
13640 "PATH" at the end as shown in the examples below.
13641 The build system substitutes the correct path within the
13642 directory structure.
13643 <literallayout class='monospaced'>
13644 SSTATE_MIRRORS ?= "\
13645 file://.* http://<replaceable>someserver</replaceable>.tld/share/sstate/PATH;downloadfilename=PATH \n \
13646 file://.* file:///<replaceable>some-local-dir</replaceable>/sstate/PATH"
13647 </literallayout>
13648 </para>
13649 </glossdef>
13650 </glossentry>
13651
13652 <glossentry id='var-SSTATE_SCAN_FILES'><glossterm>SSTATE_SCAN_FILES</glossterm>
13653 <info>
13654 SSTATE_SCAN_FILES[doc] = "Controls the list of files the OpenEmbedded build system scans for hardcoded installation paths."
13655 </info>
13656 <glossdef>
13657 <para role="glossdeffirst">
13658 Controls the list of files the OpenEmbedded build system
13659 scans for hardcoded installation paths. The variable uses a
13660 space-separated list of filenames (not paths) with standard
13661 wildcard characters allowed.
13662 </para>
13663
13664 <para>
13665 During a build, the OpenEmbedded build system creates a
13666 shared state (sstate) object during the first stage of
13667 preparing the sysroots. That object is scanned for
13668 hardcoded paths for original installation locations.
13669 The list of files that are scanned for paths is controlled
13670 by the <filename>SSTATE_SCAN_FILES</filename> variable.
13671 Typically, recipes add files they want to be scanned to the
13672 value of <filename>SSTATE_SCAN_FILES</filename> rather than
13673 the variable being comprehensively set. The
13674 <link linkend='ref-classes-sstate'><filename>sstate</filename></link>
13675 class specifies the default list of files.
13676 </para>
13677
13678 <para>
13679 For details on the process, see the
13680 <link linkend='ref-classes-staging'><filename>staging</filename></link>
13681 class.
13682 </para>
13683 </glossdef>
13684 </glossentry>
13685
13686 <glossentry id='var-STAGING_BASE_LIBDIR_NATIVE'><glossterm>STAGING_BASE_LIBDIR_NATIVE</glossterm>
13687 <info>
13688 STAGING_BASE_LIBDIR_NATIVE[doc] = "Specifies the path to the /lib subdirectory of the sysroot directory for the build host."
13689 </info>
13690 <glossdef>
13691 <para role="glossdeffirst">
13692 Specifies the path to the <filename>/lib</filename>
13693 subdirectory of the sysroot directory for the
13694 build host.
13695 </para>
13696 </glossdef>
13697 </glossentry>
13698
13699 <glossentry id='var-STAGING_BASELIBDIR'><glossterm>STAGING_BASELIBDIR</glossterm>
13700 <info>
13701 STAGING_BASELIBDIR[doc] = "Specifies the path to the /lib subdirectory of the sysroot directory for the target for which the current recipe is being built (STAGING_DIR_HOST)."
13702 </info>
13703 <glossdef>
13704 <para role="glossdeffirst">
13705 Specifies the path to the <filename>/lib</filename>
13706 subdirectory of the sysroot directory for the target
13707 for which the current recipe is being built
13708 (<link linkend='var-STAGING_DIR_HOST'><filename>STAGING_DIR_HOST</filename></link>).
13709 </para>
13710 </glossdef>
13711 </glossentry>
13712
13713 <glossentry id='var-STAGING_BINDIR'><glossterm>STAGING_BINDIR</glossterm>
13714 <info>
13715 STAGING_BINDIR[doc] = "Specifies the path to the /usr/bin subdirectory of the sysroot directory for the target for which the current recipe is being built (STAGING_DIR_HOST)."
13716 </info>
13717 <glossdef>
13718 <para role="glossdeffirst">
13719 Specifies the path to the
13720 <filename>/usr/bin</filename> subdirectory of the
13721 sysroot directory for the target for which the current
13722 recipe is being built
13723 (<link linkend='var-STAGING_DIR_HOST'><filename>STAGING_DIR_HOST</filename></link>).
13724 </para>
13725 </glossdef>
13726 </glossentry>
13727
13728 <glossentry id='var-STAGING_BINDIR_CROSS'><glossterm>STAGING_BINDIR_CROSS</glossterm>
13729 <info>
13730 STAGING_BINDIR_CROSS[doc] = "Specifies the path to the directory containing binary configuration scripts. These scripts provide configuration information for other software that wants to make use of libraries or include files provided by the software associated with the script."
13731 </info>
13732 <glossdef>
13733 <para role="glossdeffirst">
13734 Specifies the path to the directory containing binary
13735 configuration scripts.
13736 These scripts provide configuration information for
13737 other software that wants to make use of libraries or
13738 include files provided by the software associated with
13739 the script.
13740 <note>
13741 This style of build configuration has been largely
13742 replaced by <filename>pkg-config</filename>.
13743 Consequently, if <filename>pkg-config</filename>
13744 is supported by the library to which you are linking,
13745 it is recommended you use
13746 <filename>pkg-config</filename> instead of a
13747 provided configuration script.
13748 </note>
13749 </para>
13750 </glossdef>
13751 </glossentry>
13752
13753 <glossentry id='var-STAGING_BINDIR_NATIVE'><glossterm>STAGING_BINDIR_NATIVE</glossterm>
13754 <info>
13755 STAGING_BINDIR_NATIVE[doc] = "Specifies the path to the /usr/bin subdirectory of the sysroot directory for the build host."
13756 </info>
13757 <glossdef>
13758 <para role="glossdeffirst">
13759 Specifies the path to the
13760 <filename>/usr/bin</filename> subdirectory of the
13761 sysroot directory for the build host.
13762 </para>
13763 </glossdef>
13764 </glossentry>
13765
13766 <glossentry id='var-STAGING_DATADIR'><glossterm>STAGING_DATADIR</glossterm>
13767 <info>
13768 STAGING_DATADIR[doc] = "Specifies the path to the /usr/share subdirectory of the sysroot directory for the target for which the current recipe is being built (STAGING_DIR_HOST)."
13769 </info>
13770 <glossdef>
13771 <para role="glossdeffirst">
13772 Specifies the path to the <filename>/usr/share</filename>
13773 subdirectory of the sysroot directory for the target
13774 for which the current recipe is being built
13775 (<link linkend='var-STAGING_DIR_HOST'><filename>STAGING_DIR_HOST</filename></link>).
13776 </para>
13777 </glossdef>
13778 </glossentry>
13779
13780 <glossentry id='var-STAGING_DATADIR_NATIVE'><glossterm>STAGING_DATADIR_NATIVE</glossterm>
13781 <info>
13782 STAGING_DATADIR_NATIVE[doc] = "Specifies the path to the /usr/share subdirectory of the sysroot directory for the build host."
13783 </info>
13784 <glossdef>
13785 <para role="glossdeffirst">
13786 Specifies the path to the <filename>/usr/share</filename>
13787 subdirectory of the sysroot directory for the build host.
13788 </para>
13789 </glossdef>
13790 </glossentry>
13791
13792 <glossentry id='var-STAGING_DIR'><glossterm>STAGING_DIR</glossterm>
13793 <info>
13794 STAGING_DIR[doc] = "Helps construct the recipe-sysroots directory, which is used during packaging."
13795 </info>
13796 <glossdef>
13797 <para role="glossdeffirst">
13798 Helps construct the <filename>recipe-sysroots</filename>
13799 directory, which is used during packaging.
13800 </para>
13801
13802 <para>
13803 For information on how staging for recipe-specific
13804 sysroots occurs, see the
13805 <link linkend='ref-tasks-populate_sysroot'><filename>do_populate_sysroot</filename></link>
13806 task, the
13807 "<ulink url='&YOCTO_DOCS_DEV_URL;#new-sharing-files-between-recipes'>Sharing Files Between Recipes</ulink>"
13808 section in the Yocto Project Development Tasks Manual, the
13809 "<ulink url='&YOCTO_DOCS_OM_URL;#configuration-compilation-and-staging-dev-environment'>Configuration, Compilation, and Staging</ulink>"
13810 section in the Yocto Project Overview and Concepts Manual,
13811 and the
13812 <link linkend='var-SYSROOT_DIRS'><filename>SYSROOT_DIRS</filename></link>
13813 variable.
13814 <note>
13815 Recipes should never write files directly under
13816 the <filename>STAGING_DIR</filename> directory because
13817 the OpenEmbedded build system
13818 manages the directory automatically.
13819 Instead, files should be installed to
13820 <filename>${</filename><link linkend='var-D'><filename>D</filename></link><filename>}</filename>
13821 within your recipe's
13822 <link linkend='ref-tasks-install'><filename>do_install</filename></link>
13823 task and then the OpenEmbedded build system will
13824 stage a subset of those files into the sysroot.
13825 </note>
13826 </para>
13827 </glossdef>
13828 </glossentry>
13829
13830 <glossentry id='var-STAGING_DIR_HOST'><glossterm>STAGING_DIR_HOST</glossterm>
13831 <info>
13832 STAGING_DIR_HOST[doc] = "Specifies the path to the sysroot directory for the system that the component is built to run on."
13833 </info>
13834 <glossdef>
13835 <para role="glossdeffirst">
13836 Specifies the path to the sysroot directory for the system
13837 on which the component is built to run (the system that
13838 hosts the component).
13839 For most recipes, this sysroot is the one in which that
13840 recipe's
13841 <link linkend='ref-tasks-populate_sysroot'><filename>do_populate_sysroot</filename></link>
13842 task copies files.
13843 Exceptions include <filename>-native</filename> recipes,
13844 where the <filename>do_populate_sysroot</filename> task
13845 instead uses
13846 <link linkend='var-STAGING_DIR_NATIVE'><filename>STAGING_DIR_NATIVE</filename></link>.
13847 Depending on the type of recipe and the build target,
13848 <filename>STAGING_DIR_HOST</filename> can have the
13849 following values:
13850 <itemizedlist>
13851 <listitem><para>
13852 For recipes building for the target machine, the
13853 value is
13854 "${<link linkend='var-STAGING_DIR'>STAGING_DIR</link>}/${<link linkend='var-MACHINE'>MACHINE</link>}".
13855 </para></listitem>
13856 <listitem><para>
13857 For native recipes building for the build host, the
13858 value is empty given the assumption that when
13859 building for the build host, the build host's own
13860 directories should be used.
13861 <note>
13862 <para><filename>-native</filename> recipes are
13863 not installed into host paths like such as
13864 <filename>/usr</filename>.
13865 Rather, these recipes are installed into
13866 <filename>STAGING_DIR_NATIVE</filename>.
13867 When compiling <filename>-native</filename>
13868 recipes, standard build environment variables
13869 such as
13870 <link linkend='var-CPPFLAGS'><filename>CPPFLAGS</filename></link>
13871 and
13872 <link linkend='var-CFLAGS'><filename>CFLAGS</filename></link>
13873 are set up so that both host paths and
13874 <filename>STAGING_DIR_NATIVE</filename> are
13875 searched for libraries and headers using, for
13876 example, GCC's <filename>-isystem</filename>
13877 option.</para>
13878
13879 <para>Thus, the emphasis is that the
13880 <filename>STAGING_DIR*</filename> variables
13881 should be viewed as input variables by tasks
13882 such as
13883 <link linkend='ref-tasks-configure'><filename>do_configure</filename></link>,
13884 <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>,
13885 and
13886 <link linkend='ref-tasks-install'><filename>do_install</filename></link>.
13887 Having the real system root correspond to
13888 <filename>STAGING_DIR_HOST</filename> makes
13889 conceptual sense for
13890 <filename>-native</filename> recipes, as
13891 they make use of host headers and libraries.
13892 </para>
13893 </note>
13894 </para></listitem>
13895 </itemizedlist>
13896 </para>
13897 </glossdef>
13898 </glossentry>
13899
13900 <glossentry id='var-STAGING_DIR_NATIVE'><glossterm>STAGING_DIR_NATIVE</glossterm>
13901 <info>
13902 STAGING_DIR_NATIVE[doc] = "Specifies the path to the sysroot directory used when building components that run on the build host itself."
13903 </info>
13904 <glossdef>
13905 <para role="glossdeffirst">
13906 Specifies the path to the sysroot directory used when
13907 building components that run on the build host itself.
13908 </para>
13909 </glossdef>
13910 </glossentry>
13911
13912 <glossentry id='var-STAGING_DIR_TARGET'><glossterm>STAGING_DIR_TARGET</glossterm>
13913 <info>
13914 STAGING_DIR_TARGET[doc] = "Specifies the path to the sysroot used for the system for which the component generates code."
13915 </info>
13916 <glossdef>
13917 <para role="glossdeffirst">
13918 Specifies the path to the sysroot used for the system for
13919 which the component generates code.
13920 For components that do not generate code, which is the
13921 majority, <filename>STAGING_DIR_TARGET</filename> is set
13922 to match
13923 <link linkend='var-STAGING_DIR_HOST'><filename>STAGING_DIR_HOST</filename></link>.
13924 </para>
13925
13926 <para>
13927 Some recipes build binaries that can run on the target
13928 system but those binaries in turn generate code for
13929 another different system (e.g. cross-canadian recipes).
13930 Using terminology from GNU, the primary system is referred
13931 to as the "HOST" and the secondary, or different, system is
13932 referred to as the "TARGET".
13933 Thus, the binaries run on the "HOST" system
13934 and generate binaries for the "TARGET" system.
13935 The <filename>STAGING_DIR_HOST</filename> variable points
13936 to the sysroot used for the "HOST" system, while
13937 <filename>STAGING_DIR_TARGET</filename>
13938 points to the sysroot used for the "TARGET" system.
13939 </para>
13940 </glossdef>
13941 </glossentry>
13942
13943 <glossentry id='var-STAGING_ETCDIR_NATIVE'><glossterm>STAGING_ETCDIR_NATIVE</glossterm>
13944 <info>
13945 STAGING_ETCDIR_NATIVE[doc] = "Specifies the path to the /etc subdirectory of the sysroot directory for the build host."
13946 </info>
13947 <glossdef>
13948 <para role="glossdeffirst">
13949 Specifies the path to the <filename>/etc</filename>
13950 subdirectory of the sysroot directory for the
13951 build host.
13952 </para>
13953 </glossdef>
13954 </glossentry>
13955
13956 <glossentry id='var-STAGING_EXECPREFIXDIR'><glossterm>STAGING_EXECPREFIXDIR</glossterm>
13957 <info>
13958 STAGING_EXECPREFIXDIR[doc] = "Specifies the path to the /usr subdirectory of the sysroot directory for the target for which the current recipe is being built (STAGING_DIR_HOST)."
13959 </info>
13960 <glossdef>
13961 <para role="glossdeffirst">
13962 Specifies the path to the <filename>/usr</filename>
13963 subdirectory of the sysroot directory for the target
13964 for which the current recipe is being built
13965 (<link linkend='var-STAGING_DIR_HOST'><filename>STAGING_DIR_HOST</filename></link>).
13966 </para>
13967 </glossdef>
13968 </glossentry>
13969
13970 <glossentry id='var-STAGING_INCDIR'><glossterm>STAGING_INCDIR</glossterm>
13971 <info>
13972 STAGING_INCDIR[doc] = "Specifies the path to the /usr/include subdirectory of the sysroot directory for the target for which the current recipe being built (STAGING_DIR_HOST)."
13973 </info>
13974 <glossdef>
13975 <para role="glossdeffirst">
13976 Specifies the path to the
13977 <filename>/usr/include</filename> subdirectory of the
13978 sysroot directory for the target for which the current
13979 recipe being built
13980 (<link linkend='var-STAGING_DIR_HOST'><filename>STAGING_DIR_HOST</filename></link>).
13981 </para>
13982 </glossdef>
13983 </glossentry>
13984
13985 <glossentry id='var-STAGING_INCDIR_NATIVE'><glossterm>STAGING_INCDIR_NATIVE</glossterm>
13986 <info>
13987 STAGING_INCDIR_NATIVE[doc] = "Specifies the path to the /usr/include subdirectory of the sysroot directory for the build host."
13988 </info>
13989 <glossdef>
13990 <para role="glossdeffirst">
13991 Specifies the path to the <filename>/usr/include</filename>
13992 subdirectory of the sysroot directory for the build host.
13993 </para>
13994 </glossdef>
13995 </glossentry>
13996
13997 <glossentry id='var-STAGING_KERNEL_BUILDDIR'><glossterm>STAGING_KERNEL_BUILDDIR</glossterm>
13998 <info>
13999 STAGING_KERNEL_BUILDDIR[doc] = "Points to the directory containing the kernel build artifacts."
14000 </info>
14001 <glossdef>
14002 <para role="glossdeffirst">
14003 Points to the directory containing the kernel build
14004 artifacts.
14005 Recipes building software that needs to access kernel
14006 build artifacts
14007 (e.g. <filename>systemtap-uprobes</filename>) can look in
14008 the directory specified with the
14009 <filename>STAGING_KERNEL_BUILDDIR</filename> variable to
14010 find these artifacts after the kernel has been built.
14011 </para>
14012 </glossdef>
14013 </glossentry>
14014
14015 <glossentry id='var-STAGING_KERNEL_DIR'><glossterm>STAGING_KERNEL_DIR</glossterm>
14016 <info>
14017 STAGING_KERNEL_DIR[doc] = "The directory with kernel headers that are required to build out-of-tree modules."
14018 </info>
14019 <glossdef>
14020 <para role="glossdeffirst">
14021 The directory with kernel headers that are required to build out-of-tree
14022 modules.
14023 </para>
14024 </glossdef>
14025 </glossentry>
14026
14027 <glossentry id='var-STAGING_LIBDIR'><glossterm>STAGING_LIBDIR</glossterm>
14028 <info>
14029 STAGING_LIBDIR[doc] = "Specifies the path to the /usr/lib subdirectory of the sysroot directory for the target for which the current recipe is being built (STAGING_DIR_HOST)."
14030 </info>
14031 <glossdef>
14032 <para role="glossdeffirst">
14033 Specifies the path to the <filename>/usr/lib</filename>
14034 subdirectory of the sysroot directory for the target for
14035 which the current recipe is being built
14036 (<link linkend='var-STAGING_DIR_HOST'><filename>STAGING_DIR_HOST</filename></link>).
14037 </para>
14038 </glossdef>
14039 </glossentry>
14040
14041 <glossentry id='var-STAGING_LIBDIR_NATIVE'><glossterm>STAGING_LIBDIR_NATIVE</glossterm>
14042 <info>
14043 STAGING_LIBDIR_NATIVE[doc] = "Specifies the path to the /usr/lib subdirectory of the sysroot directory for the build host."
14044 </info>
14045 <glossdef>
14046 <para role="glossdeffirst">
14047 Specifies the path to the <filename>/usr/lib</filename>
14048 subdirectory of the sysroot directory for the build host.
14049 </para>
14050 </glossdef>
14051 </glossentry>
14052
14053 <glossentry id='var-STAMP'><glossterm>STAMP</glossterm>
14054 <info>
14055 STAMP[doc] = "Specifies the base path used to create recipe stamp files. The path to an actual stamp file is constructed by evaluating this string and then appending additional information."
14056 </info>
14057 <glossdef>
14058 <para role="glossdeffirst">
14059 Specifies the base path used to create recipe stamp files.
14060 The path to an actual stamp file is constructed by evaluating this
14061 string and then appending additional information.
14062 Currently, the default assignment for <filename>STAMP</filename>
14063 as set in the <filename>meta/conf/bitbake.conf</filename> file
14064 is:
14065 <literallayout class='monospaced'>
14066 STAMP = "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}"
14067 </literallayout>
14068 </para>
14069
14070 <para>
14071 For information on how BitBake uses stamp files to determine
14072 if a task should be rerun, see the
14073 "<ulink url='&YOCTO_DOCS_OM_URL;#stamp-files-and-the-rerunning-of-tasks'>Stamp Files and the Rerunning of Tasks</ulink>"
14074 section in the Yocto Project Overview and Concepts Manual.
14075 </para>
14076
14077 <para>
14078 See <link linkend='var-STAMPS_DIR'><filename>STAMPS_DIR</filename></link>,
14079 <link linkend='var-MULTIMACH_TARGET_SYS'><filename>MULTIMACH_TARGET_SYS</filename></link>,
14080 <link linkend='var-PN'><filename>PN</filename></link>,
14081 <link linkend='var-EXTENDPE'><filename>EXTENDPE</filename></link>,
14082 <link linkend='var-PV'><filename>PV</filename></link>, and
14083 <link linkend='var-PR'><filename>PR</filename></link> for related variable
14084 information.
14085 </para>
14086 </glossdef>
14087 </glossentry>
14088
14089 <glossentry id='var-STAMPS_DIR'><glossterm>STAMPS_DIR</glossterm>
14090 <info>
14091 STAMPS_DIR[doc] = "Specifies the base directory in which the OpenEmbedded build system places stamps."
14092 </info>
14093 <glossdef>
14094 <para role="glossdeffirst">
14095 Specifies the base directory in which the OpenEmbedded
14096 build system places stamps.
14097 The default directory is
14098 <filename>${TMPDIR}/stamps</filename>.
14099 </para>
14100 </glossdef>
14101 </glossentry>
14102
14103 <glossentry id='var-STRIP'><glossterm>STRIP</glossterm>
14104 <info>
14105 STRIP[doc] = "Minimal command and arguments to run 'strip' (strip symbols)."
14106 </info>
14107 <glossdef>
14108 <para role="glossdeffirst">
14109 The minimal command and arguments to run
14110 <filename>strip</filename>, which is used to strip
14111 symbols.
14112 </para>
14113 </glossdef>
14114 </glossentry>
14115
14116 <glossentry id='var-SUMMARY'><glossterm>SUMMARY</glossterm>
14117 <info>
14118 SUMMARY[doc] = "The short (80 characters or less) summary of the binary package for packaging systems such as opkg, rpm, or dpkg. By default, SUMMARY is used to define the DESCRIPTION variable if DESCRIPTION is not set in the recipe."
14119 </info>
14120 <glossdef>
14121 <para role="glossdeffirst">
14122 The short (72 characters or less) summary of the binary package for packaging
14123 systems such as <filename>opkg</filename>, <filename>rpm</filename>, or
14124 <filename>dpkg</filename>.
14125 By default, <filename>SUMMARY</filename> is used to define
14126 the <link linkend='var-DESCRIPTION'><filename>DESCRIPTION</filename></link>
14127 variable if <filename>DESCRIPTION</filename> is not set
14128 in the recipe.
14129 </para>
14130 </glossdef>
14131 </glossentry>
14132
14133 <glossentry id='var-SVNDIR'><glossterm>SVNDIR</glossterm>
14134 <info>
14135 SVNDIR[doc] = "The directory where Subversion checkouts are stored."
14136 </info>
14137 <glossdef>
14138 <para role="glossdeffirst">
14139 The directory in which files checked out of a Subversion
14140 system are stored.
14141 </para>
14142 </glossdef>
14143 </glossentry>
14144
14145 <glossentry id='var-SYSLINUX_DEFAULT_CONSOLE'><glossterm>SYSLINUX_DEFAULT_CONSOLE</glossterm>
14146 <info>
14147 SYSLINUX_DEFAULT_CONSOLE[doc] = "Specifies the kernel boot default console."
14148 </info>
14149 <glossdef>
14150 <para role="glossdeffirst">
14151 Specifies the kernel boot default console.
14152 If you want to use a console other than the default,
14153 set this variable in your recipe as follows where "X" is
14154 the console number you want to use:
14155 <literallayout class='monospaced'>
14156 SYSLINUX_DEFAULT_CONSOLE = "console=ttyX"
14157 </literallayout>
14158 </para>
14159
14160 <para>
14161 The
14162 <link linkend='ref-classes-syslinux'><filename>syslinux</filename></link>
14163 class initially sets this variable to null but then checks
14164 for a value later.
14165 </para>
14166 </glossdef>
14167 </glossentry>
14168
14169 <glossentry id='var-SYSLINUX_OPTS'><glossterm>SYSLINUX_OPTS</glossterm>
14170 <info>
14171 SYSLINUX_OPTS[doc] = "Lists additional options to add to the syslinux file."
14172 </info>
14173 <glossdef>
14174 <para role="glossdeffirst">
14175 Lists additional options to add to the syslinux file.
14176 You need to set this variable in your recipe.
14177 If you want to list multiple options, separate the options
14178 with a semicolon character (<filename>;</filename>).
14179 </para>
14180
14181 <para>
14182 The
14183 <link linkend='ref-classes-syslinux'><filename>syslinux</filename></link>
14184 class uses this variable to create a set of options.
14185 </para>
14186 </glossdef>
14187 </glossentry>
14188
14189 <glossentry id='var-SYSLINUX_SERIAL'><glossterm>SYSLINUX_SERIAL</glossterm>
14190 <info>
14191 SYSLINUX_SERIAL[doc] = "Specifies the alternate serial port or turns it off."
14192 </info>
14193 <glossdef>
14194 <para role="glossdeffirst">
14195 Specifies the alternate serial port or turns it off.
14196 To turn off serial, set this variable to an empty string
14197 in your recipe.
14198 The variable's default value is set in the
14199 <link linkend='ref-classes-syslinux'><filename>syslinux</filename></link>
14200 class as follows:
14201 <literallayout class='monospaced'>
14202 SYSLINUX_SERIAL ?= "0 115200"
14203 </literallayout>
14204 </para>
14205
14206 <para>
14207 The class checks for and uses the variable as needed.
14208 </para>
14209 </glossdef>
14210 </glossentry>
14211
14212 <glossentry id='var-SYSLINUX_SPLASH'><glossterm>SYSLINUX_SPLASH</glossterm>
14213 <info>
14214 SYSLINUX_SPLASH[doc] = "An .LSS file used as the background for the VGA boot menu when you use the boot menu."
14215 </info>
14216 <glossdef>
14217 <para role="glossdeffirst">
14218 An <filename>.LSS</filename> file used as the background
14219 for the VGA boot menu when you use the boot menu.
14220 You need to set this variable in your recipe.
14221 </para>
14222
14223 <para>
14224 The
14225 <link linkend='ref-classes-syslinux'><filename>syslinux</filename></link>
14226 class checks for this variable and if found, the
14227 OpenEmbedded build system installs the splash screen.
14228 </para>
14229 </glossdef>
14230 </glossentry>
14231
14232 <glossentry id='var-SYSLINUX_SERIAL_TTY'><glossterm>SYSLINUX_SERIAL_TTY</glossterm>
14233 <info>
14234 SYSLINUX_SERIAL_TTY[doc] = "Specifies the alternate console=tty... kernel boot argument."
14235 </info>
14236 <glossdef>
14237 <para role="glossdeffirst">
14238 Specifies the alternate console=tty... kernel boot argument.
14239 The variable's default value is set in the
14240 <link linkend='ref-classes-syslinux'><filename>syslinux</filename></link>
14241 class as follows:
14242 <literallayout class='monospaced'>
14243 SYSLINUX_SERIAL_TTY ?= "console=ttyS0,115200"
14244 </literallayout>
14245 </para>
14246
14247 <para>
14248 The class checks for and uses the variable as needed.
14249 </para>
14250 </glossdef>
14251 </glossentry>
14252
14253 <glossentry id='var-SYSROOT_DESTDIR'><glossterm>SYSROOT_DESTDIR</glossterm>
14254 <info>
14255 SYSROOT_DESTDIR[doc] = "Points to the temporary work directory (default ${WORKDIR}/sysroot-destdir) where the files populated into the sysroot are assembled during the do_populate_sysroot task."
14256 </info>
14257 <glossdef>
14258 <para role="glossdeffirst">
14259 Points to the temporary directory under the work directory
14260 (default
14261 "<filename>${</filename><link linkend='var-WORKDIR'><filename>WORKDIR</filename></link><filename>}/sysroot-destdir</filename>")
14262 where the files populated into the sysroot are assembled
14263 during the
14264 <link linkend='ref-tasks-populate_sysroot'><filename>do_populate_sysroot</filename></link>
14265 task.
14266 </para>
14267 </glossdef>
14268 </glossentry>
14269
14270 <glossentry id='var-SYSROOT_DIRS'><glossterm>SYSROOT_DIRS</glossterm>
14271 <info>
14272 SYSROOT_DIRS[doc] = "Directories that are staged into the sysroot by the do_populate_sysroot task."
14273 </info>
14274 <glossdef>
14275 <para role="glossdeffirst">
14276 Directories that are staged into the sysroot by the
14277 <link linkend='ref-tasks-populate_sysroot'><filename>do_populate_sysroot</filename></link>
14278 task.
14279 By default, the following directories are staged:
14280 <literallayout class='monospaced'>
14281 SYSROOT_DIRS = " \
14282 ${includedir} \
14283 ${libdir} \
14284 ${base_libdir} \
14285 ${nonarch_base_libdir} \
14286 ${datadir} \
14287 "
14288 </literallayout>
14289 </para>
14290 </glossdef>
14291 </glossentry>
14292
14293 <glossentry id='var-SYSROOT_DIRS_BLACKLIST'><glossterm>SYSROOT_DIRS_BLACKLIST</glossterm>
14294 <info>
14295 SYSROOT_DIRS_BLACKLIST[doc] = "Directories that are not staged into the sysroot by the do_populate_sysroot task."
14296 </info>
14297 <glossdef>
14298 <para role="glossdeffirst">
14299 Directories that are not staged into the sysroot by the
14300 <link linkend='ref-tasks-populate_sysroot'><filename>do_populate_sysroot</filename></link>
14301 task.
14302 You can use this variable to exclude certain subdirectories
14303 of directories listed in
14304 <link linkend='var-SYSROOT_DIRS'><filename>SYSROOT_DIRS</filename></link>
14305 from staging.
14306 By default, the following directories are not staged:
14307 <literallayout class='monospaced'>
14308 SYSROOT_DIRS_BLACKLIST = " \
14309 ${mandir} \
14310 ${docdir} \
14311 ${infodir} \
14312 ${datadir}/locale \
14313 ${datadir}/applications \
14314 ${datadir}/fonts \
14315 ${datadir}/pixmaps \
14316 "
14317 </literallayout>
14318 </para>
14319 </glossdef>
14320 </glossentry>
14321
14322 <glossentry id='var-SYSROOT_DIRS_NATIVE'><glossterm>SYSROOT_DIRS_NATIVE</glossterm>
14323 <info>
14324 SYSROOT_DIRS_NATIVE[doc] = "Extra directories staged into the sysroot by the do_populate_sysroot task for -native recipes, in addition to those specified in SYSROOT_DIRS."
14325 </info>
14326 <glossdef>
14327 <para role="glossdeffirst">
14328 Extra directories staged into the sysroot by the
14329 <link linkend='ref-tasks-populate_sysroot'><filename>do_populate_sysroot</filename></link>
14330 task for <filename>-native</filename> recipes, in addition
14331 to those specified in
14332 <link linkend='var-SYSROOT_DIRS'><filename>SYSROOT_DIRS</filename></link>.
14333 By default, the following extra directories are staged:
14334 <literallayout class='monospaced'>
14335 SYSROOT_DIRS_NATIVE = " \
14336 ${bindir} \
14337 ${sbindir} \
14338 ${base_bindir} \
14339 ${base_sbindir} \
14340 ${libexecdir} \
14341 ${sysconfdir} \
14342 ${localstatedir} \
14343 "
14344 </literallayout>
14345 <note>
14346 Programs built by <filename>-native</filename> recipes
14347 run directly from the sysroot
14348 (<link linkend='var-STAGING_DIR_NATIVE'><filename>STAGING_DIR_NATIVE</filename></link>),
14349 which is why additional directories containing program
14350 executables and supporting files need to be staged.
14351 </note>
14352 </para>
14353 </glossdef>
14354 </glossentry>
14355
14356 <glossentry id='var-SYSROOT_PREPROCESS_FUNCS'><glossterm>SYSROOT_PREPROCESS_FUNCS</glossterm>
14357 <info>
14358 SYSROOT_PREPROCESS_FUNCS[doc] = "A list of functions to execute after files are staged into the sysroot. These functions are usually used to apply additional processing on the staged files, or to stage additional files."
14359 </info>
14360 <glossdef>
14361 <para role="glossdeffirst">
14362 A list of functions to execute after files are staged into
14363 the sysroot.
14364 These functions are usually used to apply additional
14365 processing on the staged files, or to stage additional
14366 files.
14367 </para>
14368 </glossdef>
14369 </glossentry>
14370
14371 <glossentry id='var-SYSTEMD_AUTO_ENABLE'><glossterm>SYSTEMD_AUTO_ENABLE</glossterm>
14372 <info>
14373 SYSTEMD_AUTO_ENABLE[doc] = "For recipes that inherit the systemd class, this variable specifies whether the specified service in SYSTEMD_SERVICE should start automatically or not."
14374 </info>
14375 <glossdef>
14376 <para role="glossdeffirst">
14377 When inheriting the
14378 <link linkend='ref-classes-systemd'><filename>systemd</filename></link>
14379 class, this variable specifies whether the specified service
14380 in
14381 <link linkend='var-SYSTEMD_SERVICE'><filename>SYSTEMD_SERVICE</filename></link>
14382 should start automatically or not.
14383 By default, the service is enabled to automatically start
14384 at boot time.
14385 The default setting is in the
14386 <link linkend='ref-classes-systemd'><filename>systemd</filename></link>
14387 class as follows:
14388 <literallayout class='monospaced'>
14389 SYSTEMD_AUTO_ENABLE ??= "enable"
14390 </literallayout>
14391 </para>
14392
14393 <para>
14394 You can disable the service by setting the variable to
14395 "disable".
14396 </para>
14397 </glossdef>
14398 </glossentry>
14399
14400 <glossentry id='var-SYSTEMD_BOOT_CFG'><glossterm>SYSTEMD_BOOT_CFG</glossterm>
14401 <info>
14402 SYSTEMD_BOOT_CFG[doc] = "When EFI_PROVIDER is set to "systemd-boot", the SYSTEMD_BOOT_CFG variable specifies the configuration file that should be used."
14403 </info>
14404 <glossdef>
14405 <para role="glossdeffirst">
14406 When
14407 <link linkend='var-EFI_PROVIDER'><filename>EFI_PROVIDER</filename></link>
14408 is set to "systemd-boot", the
14409 <filename>SYSTEMD_BOOT_CFG</filename> variable specifies the
14410 configuration file that should be used.
14411 By default, the
14412 <link linkend='ref-classes-systemd-boot'><filename>systemd-boot</filename></link>
14413 class sets the <filename>SYSTEMD_BOOT_CFG</filename> as
14414 follows:
14415 <literallayout class='monospaced'>
14416 SYSTEMD_BOOT_CFG ?= "${<link linkend='var-S'>S</link>}/loader.conf"
14417 </literallayout>
14418 </para>
14419
14420 <para>
14421 For information on Systemd-boot, see the
14422 <ulink url='http://www.freedesktop.org/wiki/Software/systemd/systemd-boot/'>Systemd-boot documentation</ulink>.
14423 </para>
14424 </glossdef>
14425 </glossentry>
14426
14427 <glossentry id='var-SYSTEMD_BOOT_ENTRIES'><glossterm>SYSTEMD_BOOT_ENTRIES</glossterm>
14428 <info>
14429 SYSTEMD_BOOT_ENTRIES[doc] = "When EFI_PROVIDER is set to "systemd-boot", the SYSTEMD_BOOT_ENTRIES variable specifies a list of entry files (*.conf) to install that contain one boot entry per file."
14430 </info>
14431 <glossdef>
14432 <para role="glossdeffirst">
14433 When
14434 <link linkend='var-EFI_PROVIDER'><filename>EFI_PROVIDER</filename></link>
14435 is set to "systemd-boot", the
14436 <filename>SYSTEMD_BOOT_ENTRIES</filename> variable specifies
14437 a list of entry files
14438 (<filename>*.conf</filename>) to install that contain
14439 one boot entry per file.
14440 By default, the
14441 <link linkend='ref-classes-systemd-boot'><filename>systemd-boot</filename></link>
14442 class sets the <filename>SYSTEMD_BOOT_ENTRIES</filename> as
14443 follows:
14444 <literallayout class='monospaced'>
14445 SYSTEMD_BOOT_ENTRIES ?= ""
14446 </literallayout>
14447 </para>
14448
14449 <para>
14450 For information on Systemd-boot, see the
14451 <ulink url='http://www.freedesktop.org/wiki/Software/systemd/systemd-boot/'>Systemd-boot documentation</ulink>.
14452 </para>
14453 </glossdef>
14454 </glossentry>
14455
14456 <glossentry id='var-SYSTEMD_BOOT_TIMEOUT'><glossterm>SYSTEMD_BOOT_TIMEOUT</glossterm>
14457 <info>
14458 SYSTEMD_BOOT_TIMEOUT[doc] = "When EFI_PROVIDER is set to "systemd-boot", the SYSTEMD_BOOT_TIMEOUT variable specifies the boot menu timeout in seconds."
14459 </info>
14460 <glossdef>
14461 <para role="glossdeffirst">
14462 When
14463 <link linkend='var-EFI_PROVIDER'><filename>EFI_PROVIDER</filename></link>
14464 is set to "systemd-boot", the
14465 <filename>SYSTEMD_BOOT_TIMEOUT</filename> variable specifies
14466 the boot menu timeout in seconds.
14467 By default, the
14468 <link linkend='ref-classes-systemd-boot'><filename>systemd-boot</filename></link>
14469 class sets the <filename>SYSTEMD_BOOT_TIMEOUT</filename> as
14470 follows:
14471 <literallayout class='monospaced'>
14472 SYSTEMD_BOOT_TIMEOUT ?= "10"
14473 </literallayout>
14474 </para>
14475
14476 <para>
14477 For information on Systemd-boot, see the
14478 <ulink url='http://www.freedesktop.org/wiki/Software/systemd/systemd-boot/'>Systemd-boot documentation</ulink>.
14479 </para>
14480 </glossdef>
14481 </glossentry>
14482
14483 <glossentry id='var-SYSTEMD_PACKAGES'><glossterm>SYSTEMD_PACKAGES</glossterm>
14484 <info>
14485 SYSTEMD_PACKAGES[doc] = "For recipes that inherit the systemd class, this variable locates the systemd unit files when they are not found in the main recipe's package."
14486 </info>
14487 <glossdef>
14488 <para role="glossdeffirst">
14489 When inheriting the
14490 <link linkend='ref-classes-systemd'><filename>systemd</filename></link>
14491 class, this variable locates the systemd unit files when
14492 they are not found in the main recipe's package.
14493 By default, the
14494 <filename>SYSTEMD_PACKAGES</filename> variable is set
14495 such that the systemd unit files are assumed to reside in
14496 the recipes main package:
14497 <literallayout class='monospaced'>
14498 SYSTEMD_PACKAGES ?= "${PN}"
14499 </literallayout>
14500 </para>
14501
14502 <para>
14503 If these unit files are not in this recipe's main
14504 package, you need to use
14505 <filename>SYSTEMD_PACKAGES</filename> to list the package
14506 or packages in which the build system can find the systemd
14507 unit files.
14508 </para>
14509 </glossdef>
14510 </glossentry>
14511
14512 <glossentry id='var-SYSTEMD_SERVICE'><glossterm>SYSTEMD_SERVICE</glossterm>
14513 <info>
14514 SYSTEMD_SERVICE[doc] = "For recipes that inherit the systemd class, this variable specifies the systemd service name for a package."
14515 </info>
14516 <glossdef>
14517 <para role="glossdeffirst">
14518 When inheriting the
14519 <link linkend='ref-classes-systemd'><filename>systemd</filename></link>
14520 class, this variable specifies the systemd service name for
14521 a package.
14522 </para>
14523
14524 <para>
14525 When you specify this file in your recipe, use a package
14526 name override to indicate the package to which the value
14527 applies.
14528 Here is an example from the connman recipe:
14529 <literallayout class='monospaced'>
14530 SYSTEMD_SERVICE_${PN} = "connman.service"
14531 </literallayout>
14532 </para>
14533 </glossdef>
14534 </glossentry>
14535
14536 <glossentry id='var-SYSVINIT_ENABLED_GETTYS'><glossterm>SYSVINIT_ENABLED_GETTYS</glossterm>
14537 <info>
14538 SYSVINIT_ENABLED_GETTYS[doc] = "Specifies which virtual terminals should run a getty, the default is '1'."
14539 </info>
14540 <glossdef>
14541 <para role="glossdeffirst">
14542 When using
14543 <ulink url='&YOCTO_DOCS_DEV_URL;#new-recipe-enabling-system-services'>SysVinit</ulink>,
14544 specifies a space-separated list of the virtual terminals
14545 that should run a
14546 <ulink url='http://en.wikipedia.org/wiki/Getty_%28Unix%29'>getty</ulink>
14547 (allowing login), assuming
14548 <link linkend='var-USE_VT'><filename>USE_VT</filename></link>
14549 is not set to "0".
14550 </para>
14551
14552 <para>
14553 The default value for
14554 <filename>SYSVINIT_ENABLED_GETTYS</filename> is "1"
14555 (i.e. only run a getty on the first virtual terminal).
14556 </para>
14557 </glossdef>
14558 </glossentry>
14559
14560 </glossdiv>
14561
14562 <glossdiv id='var-glossary-t'><title>T</title>
14563
14564 <glossentry id='var-T'><glossterm>T</glossterm>
14565 <info>
14566 T[doc] = "This variable points to a directory were BitBake places temporary files, which consist mostly of task logs and scripts, when building a particular recipe."
14567 </info>
14568 <glossdef>
14569 <para role="glossdeffirst">
14570 This variable points to a directory were BitBake places
14571 temporary files, which consist mostly of task logs and
14572 scripts, when building a particular recipe.
14573 The variable is typically set as follows:
14574 <literallayout class='monospaced'>
14575 T = "${WORKDIR}/temp"
14576 </literallayout>
14577 </para>
14578
14579 <para>
14580 The <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>
14581 is the directory into which BitBake unpacks and builds the
14582 recipe.
14583 The default <filename>bitbake.conf</filename> file sets this variable.</para>
14584 <para>The <filename>T</filename> variable is not to be confused with
14585 the <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link> variable,
14586 which points to the root of the directory tree where BitBake
14587 places the output of an entire build.
14588 </para>
14589 </glossdef>
14590 </glossentry>
14591
14592 <glossentry id='var-TARGET_ARCH'><glossterm>TARGET_ARCH</glossterm>
14593 <info>
14594 TARGET_ARCH[doc] = "The architecture of the device being built. The OpenEmbedded build system supports the following architectures: arm, mips, ppc, x86, x86-64."
14595 </info>
14596 <glossdef>
14597 <para role="glossdeffirst">
14598 The target machine's architecture.
14599 The OpenEmbedded build system supports many
14600 architectures.
14601 Here is an example list of architectures supported.
14602 This list is by no means complete as the architecture
14603 is configurable:
14604 <literallayout class='monospaced'>
14605 arm
14606 i586
14607 x86_64
14608 powerpc
14609 powerpc64
14610 mips
14611 mipsel
14612 </literallayout>
14613 </para>
14614
14615 <para>
14616 For additional information on machine architectures, see
14617 the
14618 <link linkend='var-TUNE_ARCH'><filename>TUNE_ARCH</filename></link>
14619 variable.
14620 </para>
14621 </glossdef>
14622 </glossentry>
14623
14624 <glossentry id='var-TARGET_AS_ARCH'><glossterm>TARGET_AS_ARCH</glossterm>
14625 <info>
14626 TARGET_AS_ARCH[doc] = "Specifies architecture-specific assembler flags for the target system."
14627 </info>
14628 <glossdef>
14629 <para role="glossdeffirst">
14630 Specifies architecture-specific assembler flags for the
14631 target system.
14632 <filename>TARGET_AS_ARCH</filename> is initialized from
14633 <link linkend='var-TUNE_ASARGS'><filename>TUNE_ASARGS</filename></link>
14634 by default in the BitBake configuration file
14635 (<filename>meta/conf/bitbake.conf</filename>):
14636 <literallayout class='monospaced'>
14637 TARGET_AS_ARCH = "${TUNE_ASARGS}"
14638 </literallayout>
14639 </para>
14640 </glossdef>
14641 </glossentry>
14642
14643 <glossentry id='var-TARGET_CC_ARCH'><glossterm>TARGET_CC_ARCH</glossterm>
14644 <info>
14645 TARGET_CC_ARCH[doc] = "Specifies architecture-specific C compiler flags for the target system."
14646 </info>
14647 <glossdef>
14648 <para role="glossdeffirst">
14649 Specifies architecture-specific C compiler flags for the
14650 target system.
14651 <filename>TARGET_CC_ARCH</filename> is initialized from
14652 <link linkend='var-TUNE_CCARGS'><filename>TUNE_CCARGS</filename></link>
14653 by default.
14654 <note>
14655 It is a common workaround to append
14656 <link linkend='var-LDFLAGS'><filename>LDFLAGS</filename></link>
14657 to <filename>TARGET_CC_ARCH</filename>
14658 in recipes that build software for the target that
14659 would not otherwise respect the exported
14660 <filename>LDFLAGS</filename> variable.
14661 </note>
14662 </para>
14663 </glossdef>
14664 </glossentry>
14665
14666 <glossentry id='var-TARGET_CC_KERNEL_ARCH'><glossterm>TARGET_CC_KERNEL_ARCH</glossterm>
14667 <info>
14668 TARGET_CC_KERNEL_ARCH[doc] = "This is a specific kernel compiler flag for a CPU or Application Binary Interface (ABI) tune."
14669 </info>
14670 <glossdef>
14671 <para role="glossdeffirst">
14672 This is a specific kernel compiler flag for a CPU or
14673 Application Binary Interface (ABI) tune.
14674 The flag is used rarely and only for cases where a
14675 userspace
14676 <link linkend='var-TUNE_CCARGS'><filename>TUNE_CCARGS</filename></link>
14677 is not compatible with the kernel compilation.
14678 The <filename>TARGET_CC_KERNEL_ARCH</filename> variable
14679 allows the kernel (and associated modules) to use a
14680 different configuration.
14681 See the
14682 <filename>meta/conf/machine/include/arm/feature-arm-thumb.inc</filename>
14683 file in the
14684 <link linkend='source-directory'>Source Directory</link>
14685 for an example.
14686 </para>
14687 </glossdef>
14688 </glossentry>
14689
14690 <glossentry id='var-TARGET_CFLAGS'><glossterm>TARGET_CFLAGS</glossterm>
14691 <info>
14692 TARGET_CFLAGS[doc] = "Flags passed to the C compiler for the target system. This variable evaluates to the same as CFLAGS."
14693 </info>
14694 <glossdef>
14695 <para role="glossdeffirst">
14696 Specifies the flags to pass to the C compiler when building
14697 for the target.
14698 When building in the target context,
14699 <link linkend='var-CFLAGS'><filename>CFLAGS</filename></link>
14700 is set to the value of this variable by default.
14701 </para>
14702
14703 <para>
14704 Additionally, the SDK's environment setup script sets
14705 the <filename>CFLAGS</filename> variable in the environment
14706 to the <filename>TARGET_CFLAGS</filename> value so that
14707 executables built using the SDK also have the flags
14708 applied.
14709 </para>
14710 </glossdef>
14711 </glossentry>
14712
14713 <glossentry id='var-TARGET_CPPFLAGS'><glossterm>TARGET_CPPFLAGS</glossterm>
14714 <info>
14715 TARGET_CPPFLAGS[doc] = "Specifies the flags to pass to the C pre-processor (i.e. to both the C and the C++ compilers) when building for the target."
14716 </info>
14717 <glossdef>
14718 <para role="glossdeffirst">
14719 Specifies the flags to pass to the C pre-processor
14720 (i.e. to both the C and the C++ compilers) when building
14721 for the target.
14722 When building in the target context,
14723 <link linkend='var-CPPFLAGS'><filename>CPPFLAGS</filename></link>
14724 is set to the value of this variable by default.
14725 </para>
14726
14727 <para>
14728 Additionally, the SDK's environment setup script sets
14729 the <filename>CPPFLAGS</filename> variable in the
14730 environment to the <filename>TARGET_CPPFLAGS</filename>
14731 value so that executables built using the SDK also have
14732 the flags applied.
14733 </para>
14734 </glossdef>
14735 </glossentry>
14736
14737 <glossentry id='var-TARGET_CXXFLAGS'><glossterm>TARGET_CXXFLAGS</glossterm>
14738 <info>
14739 TARGET_CXXFLAGS[doc] = "Specifies the flags to pass to the C++ compiler when building for the target."
14740 </info>
14741 <glossdef>
14742 <para role="glossdeffirst">
14743 Specifies the flags to pass to the C++ compiler when
14744 building for the target.
14745 When building in the target context,
14746 <link linkend='var-CXXFLAGS'><filename>CXXFLAGS</filename></link>
14747 is set to the value of this variable by default.
14748 </para>
14749
14750 <para>
14751 Additionally, the SDK's environment setup script sets
14752 the <filename>CXXFLAGS</filename> variable in the
14753 environment to the <filename>TARGET_CXXFLAGS</filename>
14754 value so that executables built using the SDK also have
14755 the flags applied.
14756 </para>
14757 </glossdef>
14758 </glossentry>
14759
14760 <glossentry id='var-TARGET_FPU'><glossterm>TARGET_FPU</glossterm>
14761 <info>
14762 TARGET_FPU[doc] = "Specifies the method for handling FPU code. For FPU-less targets, which include most ARM CPUs, the variable must be set to 'soft'. If not, the kernel emulation gets used, which results in a performance penalty."
14763 </info>
14764 <glossdef>
14765 <para role="glossdeffirst">
14766 Specifies the method for handling FPU code.
14767 For FPU-less targets, which include most ARM CPUs, the variable must be
14768 set to "soft".
14769 If not, the kernel emulation gets used, which results in a performance penalty.
14770 </para>
14771 </glossdef>
14772 </glossentry>
14773
14774 <glossentry id='var-TARGET_LD_ARCH'><glossterm>TARGET_LD_ARCH</glossterm>
14775 <info>
14776 TARGET_LD_ARCH[doc] = "Specifies architecture-specific linker flags for the target system."
14777 </info>
14778 <glossdef>
14779 <para role="glossdeffirst">
14780 Specifies architecture-specific linker flags for the
14781 target system.
14782 <filename>TARGET_LD_ARCH</filename> is initialized from
14783 <link linkend='var-TUNE_LDARGS'><filename>TUNE_LDARGS</filename></link>
14784 by default in the BitBake configuration file
14785 (<filename>meta/conf/bitbake.conf</filename>):
14786 <literallayout class='monospaced'>
14787 TARGET_LD_ARCH = "${TUNE_LDARGS}"
14788 </literallayout>
14789 </para>
14790 </glossdef>
14791 </glossentry>
14792
14793 <glossentry id='var-TARGET_LDFLAGS'><glossterm>TARGET_LDFLAGS</glossterm>
14794 <info>
14795 TARGET_LDFLAGS[doc] = "Specifies the flags to pass to the linker when building for the target."
14796 </info>
14797 <glossdef>
14798 <para role="glossdeffirst">
14799 Specifies the flags to pass to the linker when building
14800 for the target.
14801 When building in the target context,
14802 <link linkend='var-LDFLAGS'><filename>LDFLAGS</filename></link>
14803 is set to the value of this variable by default.
14804 </para>
14805
14806 <para>
14807 Additionally, the SDK's environment setup script sets
14808 the
14809 <link linkend='var-LDFLAGS'><filename>LDFLAGS</filename></link>
14810 variable in the environment to the
14811 <filename>TARGET_LDFLAGS</filename> value so that
14812 executables built using the SDK also have the flags
14813 applied.
14814 </para>
14815 </glossdef>
14816 </glossentry>
14817
14818 <glossentry id='var-TARGET_OS'><glossterm>TARGET_OS</glossterm>
14819 <info>
14820 TARGET_OS[doc] = "Specifies the target's operating system."
14821 </info>
14822 <glossdef>
14823 <para role="glossdeffirst">
14824 Specifies the target's operating system.
14825 The variable can be set to "linux" for glibc-based systems
14826 (GNU C Library) and to "linux-musl" for musl libc.
14827 For ARM/EABI targets, "linux-gnueabi" and "linux-musleabi"
14828 possible values exist.
14829 </para>
14830 </glossdef>
14831 </glossentry>
14832
14833 <glossentry id='var-TARGET_PREFIX'><glossterm>TARGET_PREFIX</glossterm>
14834 <info>
14835 TARGET_PREFIX[doc] = "The prefix used for the toolchain binary target tools."
14836 </info>
14837 <glossdef>
14838 <para role="glossdeffirst">
14839 Specifies the prefix used for the toolchain binary target
14840 tools.
14841 </para>
14842
14843 <para>
14844 Depending on the type of recipe and the build target,
14845 <filename>TARGET_PREFIX</filename> is set as follows:
14846 <itemizedlist>
14847 <listitem><para>
14848 For recipes building for the target machine,
14849 the value is
14850 "${<link linkend='var-TARGET_SYS'>TARGET_SYS</link>}-".
14851 </para></listitem>
14852 <listitem><para>
14853 For native recipes, the build system sets the
14854 variable to the value of
14855 <filename>BUILD_PREFIX</filename>.
14856 </para></listitem>
14857 <listitem><para>
14858 For native SDK recipes
14859 (<filename>nativesdk</filename>), the
14860 build system sets the variable to the value of
14861 <filename>SDK_PREFIX</filename>.
14862 </para></listitem>
14863 </itemizedlist>
14864 </para>
14865 </glossdef>
14866 </glossentry>
14867
14868 <glossentry id='var-TARGET_SYS'><glossterm>TARGET_SYS</glossterm>
14869 <info>
14870 TARGET_SYS[doc] = "The target system is comprised of TARGET_ARCH,TARGET_VENDOR and TARGET_OS."
14871 </info>
14872 <glossdef>
14873 <para role="glossdeffirst">
14874 Specifies the system, including the architecture and the
14875 operating system, for which the build is occurring in
14876 the context of the current recipe.
14877 </para>
14878
14879 <para>
14880 The OpenEmbedded build system automatically sets this
14881 variable based on
14882 <link linkend='var-TARGET_ARCH'><filename>TARGET_ARCH</filename></link>,
14883 <link linkend='var-TARGET_VENDOR'><filename>TARGET_VENDOR</filename></link>,
14884 and
14885 <link linkend='var-TARGET_OS'><filename>TARGET_OS</filename></link>
14886 variables.
14887 <note>
14888 You do not need to set the
14889 <filename>TARGET_SYS</filename> variable yourself.
14890 </note>
14891 </para>
14892
14893 <para>
14894 Consider these two examples:
14895 <itemizedlist>
14896 <listitem><para>
14897 Given a native recipe on a 32-bit, x86 machine
14898 running Linux, the value is "i686-linux".
14899 </para></listitem>
14900 <listitem><para>
14901 Given a recipe being built for a little-endian,
14902 MIPS target running Linux, the value might be
14903 "mipsel-linux".
14904 </para></listitem>
14905 </itemizedlist>
14906 </para>
14907 </glossdef>
14908 </glossentry>
14909
14910 <glossentry id='var-TARGET_VENDOR'><glossterm>TARGET_VENDOR</glossterm>
14911 <info>
14912 TARGET_VENDOR[doc] = "The name of the target vendor."
14913 </info>
14914 <glossdef>
14915 <para role="glossdeffirst">
14916 Specifies the name of the target vendor.
14917 </para>
14918 </glossdef>
14919 </glossentry>
14920
14921 <glossentry id='var-TCLIBC'><glossterm>TCLIBC</glossterm>
14922 <info>
14923 TCLIBC[doc] = "Specifies GNU standard C library (libc) variant to use during the build process. You can select 'glibc', 'musl' or 'newlib'."
14924 </info>
14925 <glossdef>
14926 <para role="glossdeffirst">
14927 Specifies the GNU standard C library
14928 (<filename>libc</filename>) variant to use during the
14929 build process.
14930 This variable replaces <filename>POKYLIBC</filename>,
14931 which is no longer supported.
14932 </para>
14933
14934 <para>
14935 You can select "glibc", "musl", "newlib", or "baremetal"
14936 </para>
14937 </glossdef>
14938 </glossentry>
14939
14940 <glossentry id='var-TCLIBCAPPEND'><glossterm>TCLIBCAPPEND</glossterm>
14941 <info>
14942 TCLIBCAPPEND[doc] = "Specifies a suffix appended to TMPDIR that identifies the libc variant for the build."
14943 </info>
14944 <glossdef>
14945 <para role="glossdeffirst">
14946 Specifies a suffix to be appended onto the
14947 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
14948 value.
14949 The suffix identifies the <filename>libc</filename> variant
14950 for building.
14951 When you are building for multiple variants with the same
14952 <link linkend='build-directory'>Build Directory</link>,
14953 this mechanism ensures that output for different
14954 <filename>libc</filename> variants is kept separate to
14955 avoid potential conflicts.
14956 </para>
14957
14958 <para>
14959 In the <filename>defaultsetup.conf</filename> file, the
14960 default value of <filename>TCLIBCAPPEND</filename> is
14961 "-${TCLIBC}".
14962 However, distros such as poky, which normally only support
14963 one <filename>libc</filename> variant, set
14964 <filename>TCLIBCAPPEND</filename> to "" in their distro
14965 configuration file resulting in no suffix being applied.
14966 </para>
14967 </glossdef>
14968 </glossentry>
14969
14970 <glossentry id='var-TCMODE'><glossterm>TCMODE</glossterm>
14971 <info>
14972 TCMODE[doc] = "Enables an external toolchain (where provided by an additional layer) if set to a value other than 'default'."
14973 </info>
14974 <glossdef>
14975 <para role="glossdeffirst">
14976 Specifies the toolchain selector.
14977 <filename>TCMODE</filename> controls the characteristics
14978 of the generated packages and images by telling the
14979 OpenEmbedded build system which toolchain profile to use.
14980 By default, the OpenEmbedded build system builds its own
14981 internal toolchain.
14982 The variable's default value is "default", which uses
14983 that internal toolchain.
14984 <note>
14985 If <filename>TCMODE</filename> is set to a value
14986 other than "default", then it is your responsibility
14987 to ensure that the toolchain is compatible with the
14988 default toolchain.
14989 Using older or newer versions of these components
14990 might cause build problems.
14991 See the Release Notes for the Yocto Project release
14992 for the specific components with which the toolchain
14993 must be compatible.
14994 To access the Release Notes, go to the
14995 <ulink url='&YOCTO_HOME_URL;/software-overview/downloads/'>Downloads</ulink>
14996 page on the Yocto Project website and click on the
14997 "RELEASE INFORMATION" link for the appropriate
14998 release.
14999 </note>
15000 </para>
15001
15002 <para>
15003 The <filename>TCMODE</filename> variable is similar to
15004 <link linkend='var-TCLIBC'><filename>TCLIBC</filename></link>,
15005 which controls the variant of the GNU standard C library
15006 (<filename>libc</filename>) used during the build process:
15007 <filename>glibc</filename> or <filename>musl</filename>.
15008 </para>
15009
15010 <para>
15011 With additional layers, it is possible to use a pre-compiled
15012 external toolchain.
15013 One example is the Sourcery G++ Toolchain.
15014 The support for this toolchain resides in the separate
15015 <trademark class='registered'>Mentor Graphics</trademark>
15016 <filename>meta-sourcery</filename> layer at
15017 <ulink url='http://github.com/MentorEmbedded/meta-sourcery/'></ulink>.
15018 </para>
15019
15020 <para>
15021 The layer's <filename>README</filename> file contains
15022 information on how to use the Sourcery G++ Toolchain as
15023 an external toolchain.
15024 In summary, you must be sure to add the layer to your
15025 <filename>bblayers.conf</filename> file in front of the
15026 <filename>meta</filename> layer and then set the
15027 <filename>EXTERNAL_TOOLCHAIN</filename>
15028 variable in your <filename>local.conf</filename> file
15029 to the location in which you installed the toolchain.
15030 </para>
15031
15032 <para>
15033 The fundamentals used for this example apply to any
15034 external toolchain.
15035 You can use <filename>meta-sourcery</filename> as a
15036 template for adding support for other external toolchains.
15037 </para>
15038 </glossdef>
15039 </glossentry>
15040
15041 <glossentry id='var-TEST_EXPORT_DIR'><glossterm>TEST_EXPORT_DIR</glossterm>
15042 <info>
15043 TEST_EXPORT_DIR[doc] = "The location the OpenEmbedded build system uses to export tests when the TEST_EXPORT_ONLY variable is set to "1"."
15044 </info>
15045 <glossdef>
15046 <para role="glossdeffirst">
15047 The location the OpenEmbedded build system uses to export
15048 tests when the
15049 <link linkend='var-TEST_EXPORT_ONLY'><filename>TEST_EXPORT_ONLY</filename></link>
15050 variable is set to "1".
15051 </para>
15052
15053 <para>
15054 The <filename>TEST_EXPORT_DIR</filename> variable defaults
15055 to <filename>"${TMPDIR}/testimage/${PN}"</filename>.
15056 </para>
15057 </glossdef>
15058 </glossentry>
15059
15060 <glossentry id='var-TEST_EXPORT_ONLY'><glossterm>TEST_EXPORT_ONLY</glossterm>
15061 <info>
15062 TEST_EXPORT_ONLY[doc] = "Specifies to export the tests only. Set this variable to "1" if you do not want to run the tests but you want them to be exported in a manner that you to run them outside of the build system."
15063 </info>
15064 <glossdef>
15065 <para role="glossdeffirst">
15066 Specifies to export the tests only.
15067 Set this variable to "1" if you do not want to run the
15068 tests but you want them to be exported in a manner that
15069 you to run them outside of the build system.
15070 </para>
15071 </glossdef>
15072 </glossentry>
15073
15074 <glossentry id='var-TEST_LOG_DIR'><glossterm>TEST_LOG_DIR</glossterm>
15075 <info>
15076 TEST_LOG_DIR[doc] = "Holds the SSH log and the boot log for QEMU machines. The TEST_LOG_DIR variable defaults to "${WORKDIR}/testimage"."
15077 </info>
15078 <glossdef>
15079 <para role="glossdeffirst">
15080 Holds the SSH log and the boot log for QEMU machines.
15081 The <filename>TEST_LOG_DIR</filename> variable defaults
15082 to <filename>"${WORKDIR}/testimage"</filename>.
15083 <note>
15084 Actual test results reside in the task log
15085 (<filename>log.do_testimage</filename>), which is in
15086 the <filename>${WORKDIR}/temp/</filename> directory.
15087 </note>
15088 </para>
15089 </glossdef>
15090 </glossentry>
15091
15092 <glossentry id='var-TEST_POWERCONTROL_CMD'><glossterm>TEST_POWERCONTROL_CMD</glossterm>
15093 <info>
15094 TEST_POWERCONTROL_CMD[doc] = "For automated hardware testing, specifies the command to use to control the power of the target machine under test"
15095 </info>
15096 <glossdef>
15097 <para role="glossdeffirst">
15098 For automated hardware testing, specifies the command to
15099 use to control the power of the target machine under test.
15100 Typically, this command would point to a script that
15101 performs the appropriate action (e.g. interacting
15102 with a web-enabled power strip).
15103 The specified command should expect to receive as the last
15104 argument "off", "on" or "cycle" specifying to power off,
15105 on, or cycle (power off and then power on) the device,
15106 respectively.
15107 </para>
15108 </glossdef>
15109 </glossentry>
15110
15111 <glossentry id='var-TEST_POWERCONTROL_EXTRA_ARGS'><glossterm>TEST_POWERCONTROL_EXTRA_ARGS</glossterm>
15112 <info>
15113 TEST_POWERCONTROL_EXTRA_ARGS[doc] = "For automated hardware testing, specifies additional arguments to pass through to the command specified in TEST_POWERCONTROL_CMD"
15114 </info>
15115 <glossdef>
15116 <para role="glossdeffirst">
15117 For automated hardware testing, specifies additional
15118 arguments to pass through to the command specified in
15119 <link linkend='var-TEST_POWERCONTROL_CMD'><filename>TEST_POWERCONTROL_CMD</filename></link>.
15120 Setting <filename>TEST_POWERCONTROL_EXTRA_ARGS</filename>
15121 is optional.
15122 You can use it if you wish, for example, to separate the
15123 machine-specific and non-machine-specific parts of the
15124 arguments.
15125 </para>
15126 </glossdef>
15127 </glossentry>
15128
15129 <glossentry id='var-TEST_QEMUBOOT_TIMEOUT'><glossterm>TEST_QEMUBOOT_TIMEOUT</glossterm>
15130 <info>
15131 TEST_QEMUBOOT_TIMEOUT[doc] = "The time in seconds allowed for an image to boot before automated runtime tests begin to run against an image."
15132 </info>
15133 <glossdef>
15134 <para role="glossdeffirst">
15135 The time in seconds allowed for an image to boot before
15136 automated runtime tests begin to run against an
15137 image.
15138 The default timeout period to allow the boot process to
15139 reach the login prompt is 500 seconds.
15140 You can specify a different value in the
15141 <filename>local.conf</filename> file.
15142 </para>
15143
15144 <para>
15145 For more information on testing images, see the
15146 "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
15147 section in the Yocto Project Development Tasks Manual.
15148 </para>
15149 </glossdef>
15150 </glossentry>
15151
15152 <glossentry id='var-TEST_SERIALCONTROL_CMD'><glossterm>TEST_SERIALCONTROL_CMD</glossterm>
15153 <info>
15154 TEST_SERIALCONTROL_CMD[doc] = "For automated hardware testing, specifies the command to use to connect to the serial console of the target machine under test."
15155 </info>
15156 <glossdef>
15157 <para role="glossdeffirst">
15158 For automated hardware testing, specifies the command
15159 to use to connect to the serial console of the target
15160 machine under test.
15161 This command simply needs to connect to the serial console
15162 and forward that connection to standard input and output
15163 as any normal terminal program does.
15164 </para>
15165
15166 <para>
15167 For example, to use the Picocom terminal program on
15168 serial device <filename>/dev/ttyUSB0</filename> at
15169 115200bps, you would set the variable as follows:
15170 <literallayout class='monospaced'>
15171 TEST_SERIALCONTROL_CMD = "picocom /dev/ttyUSB0 -b 115200"
15172 </literallayout>
15173 </para>
15174 </glossdef>
15175 </glossentry>
15176
15177 <glossentry id='var-TEST_SERIALCONTROL_EXTRA_ARGS'><glossterm>TEST_SERIALCONTROL_EXTRA_ARGS</glossterm>
15178 <info>
15179 TEST_SERIALCONTROL_EXTRA_ARGS[doc] = "For automated hardware testing, specifies additional arguments to pass through to the command specified in TEST_SERIALCONTROL_CMD."
15180 </info>
15181 <glossdef>
15182 <para role="glossdeffirst">
15183 For automated hardware testing, specifies additional
15184 arguments to pass through to the command specified in
15185 <link linkend='var-TEST_SERIALCONTROL_CMD'><filename>TEST_SERIALCONTROL_CMD</filename></link>.
15186 Setting <filename>TEST_SERIALCONTROL_EXTRA_ARGS</filename>
15187 is optional.
15188 You can use it if you wish, for example, to separate the
15189 machine-specific and non-machine-specific parts of the
15190 command.
15191 </para>
15192 </glossdef>
15193 </glossentry>
15194
15195 <glossentry id='var-TEST_SERVER_IP'><glossterm>TEST_SERVER_IP</glossterm>
15196 <info>
15197 TEST_SERVER_IP[doc] = "The IP address of the build machine (host machine). This IP address is usually automatically detected."
15198 </info>
15199 <glossdef>
15200 <para role="glossdeffirst">
15201 The IP address of the build machine (host machine).
15202 This IP address is usually automatically detected.
15203 However, if detection fails, this variable needs to be set
15204 to the IP address of the build machine (i.e. where
15205 the build is taking place).
15206 <note>
15207 The <filename>TEST_SERVER_IP</filename> variable
15208 is only used for a small number of tests such as
15209 the "dnf" test suite, which needs to download
15210 packages from
15211 <filename>WORKDIR/oe-rootfs-repo</filename>.
15212 </note>
15213 </para>
15214 </glossdef>
15215 </glossentry>
15216
15217 <glossentry id='var-TEST_TARGET'><glossterm>TEST_TARGET</glossterm>
15218 <info>
15219 TEST_TARGET[doc] = "For automated runtime testing, specifies the method of deploying the image and running tests on the target machine."
15220 </info>
15221 <glossdef>
15222 <para role="glossdeffirst">
15223 Specifies the target controller to use when running tests
15224 against a test image.
15225 The default controller to use is "qemu":
15226 <literallayout class='monospaced'>
15227 TEST_TARGET = "qemu"
15228 </literallayout>
15229 </para>
15230
15231 <para>
15232 A target controller is a class that defines how an
15233 image gets deployed on a target and how a target is started.
15234 A layer can extend the controllers by adding a module
15235 in the layer's <filename>/lib/oeqa/controllers</filename>
15236 directory and by inheriting the
15237 <filename>BaseTarget</filename> class, which is an abstract
15238 class that cannot be used as a value of
15239 <filename>TEST_TARGET</filename>.
15240 </para>
15241
15242 <para>
15243 You can provide the following arguments with
15244 <filename>TEST_TARGET</filename>:
15245 <itemizedlist>
15246 <listitem><para><emphasis>"qemu":</emphasis>
15247 Boots a QEMU image and runs the tests.
15248 See the
15249 "<ulink url='&YOCTO_DOCS_DEV_URL;#qemu-image-enabling-tests'>Enabling Runtime Tests on QEMU</ulink>"
15250 section in the Yocto Project Development Tasks
15251 Manual for more information.
15252 </para></listitem>
15253 <listitem><para><emphasis>"simpleremote":</emphasis>
15254 Runs the tests on target hardware that is already
15255 up and running.
15256 The hardware can be on the network or it can be
15257 a device running an image on QEMU.
15258 You must also set
15259 <link linkend='var-TEST_TARGET_IP'><filename>TEST_TARGET_IP</filename></link>
15260 when you use "simpleremote".
15261 <note>
15262 This argument is defined in
15263 <filename>meta/lib/oeqa/controllers/simpleremote.py</filename>.
15264 </note>
15265 </para></listitem>
15266 </itemizedlist>
15267 </para>
15268
15269 <para>
15270 For information on running tests on hardware, see the
15271 "<ulink url='&YOCTO_DOCS_DEV_URL;#hardware-image-enabling-tests'>Enabling Runtime Tests on Hardware</ulink>"
15272 section in the Yocto Project Development Tasks Manual.
15273 </para>
15274 </glossdef>
15275 </glossentry>
15276
15277 <glossentry id='var-TEST_TARGET_IP'><glossterm>TEST_TARGET_IP</glossterm>
15278 <info>
15279 TEST_TARGET_IP[doc] = "The IP address of your hardware under test."
15280 </info>
15281 <glossdef>
15282 <para role="glossdeffirst">
15283 The IP address of your hardware under test.
15284 The <filename>TEST_TARGET_IP</filename> variable has no
15285 effect when
15286 <link linkend='var-TEST_TARGET'><filename>TEST_TARGET</filename></link>
15287 is set to "qemu".
15288 </para>
15289
15290 <para>
15291 When you specify the IP address, you can also include a
15292 port.
15293 Here is an example:
15294 <literallayout class='monospaced'>
15295 TEST_TARGET_IP = "192.168.1.4:2201"
15296 </literallayout>
15297 Specifying a port is useful when SSH is started on a
15298 non-standard port or in cases when your hardware under test
15299 is behind a firewall or network that is not directly
15300 accessible from your host and you need to do port address
15301 translation.
15302 </para>
15303 </glossdef>
15304 </glossentry>
15305
15306 <glossentry id='var-TEST_SUITES'><glossterm>TEST_SUITES</glossterm>
15307 <info>
15308 TEST_SUITES[doc] = "An ordered list of tests (modules) to run against an image when performing automated runtime testing."
15309 </info>
15310 <glossdef>
15311 <para role="glossdeffirst">
15312 An ordered list of tests (modules) to run against
15313 an image when performing automated runtime testing.
15314 </para>
15315
15316 <para>
15317 The OpenEmbedded build system provides a core set of tests
15318 that can be used against images.
15319 <note>
15320 Currently, there is only support for running these tests
15321 under QEMU.
15322 </note>
15323 Tests include <filename>ping</filename>,
15324 <filename>ssh</filename>, <filename>df</filename> among
15325 others.
15326 You can add your own tests to the list of tests by
15327 appending <filename>TEST_SUITES</filename> as follows:
15328 <literallayout class='monospaced'>
15329 TEST_SUITES_append = " <replaceable>mytest</replaceable>"
15330 </literallayout>
15331 Alternatively, you can provide the "auto" option to
15332 have all applicable tests run against the image.
15333 <literallayout class='monospaced'>
15334 TEST_SUITES_append = " auto"
15335 </literallayout>
15336 Using this option causes the build system to automatically
15337 run tests that are applicable to the image.
15338 Tests that are not applicable are skipped.
15339 </para>
15340
15341 <para>
15342 The order in which tests are run is important.
15343 Tests that depend on another test must appear later in the
15344 list than the test on which they depend.
15345 For example, if you append the list of tests with two
15346 tests (<filename>test_A</filename> and
15347 <filename>test_B</filename>) where
15348 <filename>test_B</filename> is dependent on
15349 <filename>test_A</filename>, then you must order the tests
15350 as follows:
15351 <literallayout class='monospaced'>
15352 TEST_SUITES = " test_A test_B"
15353 </literallayout>
15354 </para>
15355
15356 <para>
15357 For more information on testing images, see the
15358 "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
15359 section in the Yocto Project Development Tasks Manual.
15360 </para>
15361 </glossdef>
15362 </glossentry>
15363
15364 <glossentry id='var-TESTIMAGE_AUTO'><glossterm>TESTIMAGE_AUTO</glossterm>
15365 <info>
15366 TESTIMAGE_AUTO[doc] = "Enables automatic testing of an image once it is built."
15367 </info>
15368 <glossdef>
15369 <para role="glossdeffirst">
15370 Automatically runs the series of automated tests for
15371 images when an image is successfully built.
15372 Setting <filename>TESTIMAGE_AUTO</filename> to "1"
15373 causes any image that successfully builds to automatically
15374 boot under QEMU.
15375 Using the variable also adds in dependencies so that any
15376 SDK for which testing is requested is automatically built
15377 first.
15378 </para>
15379
15380 <para>
15381 These tests are written in Python making use of the
15382 <filename>unittest</filename> module, and the majority of
15383 them run commands on the target system over
15384 <filename>ssh</filename>.
15385 You can set this variable to "1" in your
15386 <filename>local.conf</filename> file in the
15387 <link linkend='build-directory'>Build Directory</link>
15388 to have the OpenEmbedded build system automatically run
15389 these tests after an image successfully builds:
15390 <literallayout class='monospaced'>
15391 TESTIMAGE_AUTO = "1"
15392 </literallayout>
15393 For more information on enabling, running, and writing
15394 these tests, see the
15395 "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
15396 section in the Yocto Project Development Tasks Manual and
15397 the
15398 "<link linkend='ref-classes-testimage*'><filename>testimage*.bbclass</filename></link>"
15399 section.
15400 </para>
15401 </glossdef>
15402 </glossentry>
15403
15404 <glossentry id='var-THISDIR'><glossterm>THISDIR</glossterm>
15405 <info>
15406 THISDIR[doc] = "The directory in which the file BitBake is currently parsing is located."
15407 </info>
15408 <glossdef>
15409 <para role="glossdeffirst">
15410 The directory in which the file BitBake is currently
15411 parsing is located.
15412 Do not manually set this variable.
15413 </para>
15414 </glossdef>
15415 </glossentry>
15416
15417 <glossentry id='var-TIME'><glossterm>TIME</glossterm>
15418 <info>
15419 TIME[doc] = "The time the build was started using HMS format."
15420 </info>
15421 <glossdef>
15422 <para role="glossdeffirst">
15423 The time the build was started.
15424 Times appear using the hour, minute, and second (HMS)
15425 format (e.g. "140159" for one minute and fifty-nine
15426 seconds past 1400 hours).
15427 </para>
15428 </glossdef>
15429 </glossentry>
15430
15431 <glossentry id='var-TMPDIR'><glossterm>TMPDIR</glossterm>
15432 <info>
15433 TMPDIR[doc] = "The temporary directory the OpenEmbedded build system uses when it does its work building images. By default, the TMPDIR variable is named tmp within the Build Directory."
15434 </info>
15435 <glossdef>
15436 <para role="glossdeffirst">
15437 This variable is the base directory the OpenEmbedded
15438 build system uses for all build output and intermediate
15439 files (other than the shared state cache).
15440 By default, the <filename>TMPDIR</filename> variable points
15441 to <filename>tmp</filename> within the
15442 <link linkend='build-directory'>Build Directory</link>.
15443 </para>
15444
15445 <para>
15446 If you want to establish this directory in a location other
15447 than the default, you can uncomment and edit the following
15448 statement in the
15449 <filename>conf/local.conf</filename> file in the
15450 <link linkend='source-directory'>Source Directory</link>:
15451 <literallayout class='monospaced'>
15452 #TMPDIR = "${TOPDIR}/tmp"
15453 </literallayout>
15454 An example use for this scenario is to set
15455 <filename>TMPDIR</filename> to a local disk, which does
15456 not use NFS, while having the Build Directory use NFS.
15457 </para>
15458
15459 <para>
15460 The filesystem used by <filename>TMPDIR</filename> must
15461 have standard filesystem semantics (i.e. mixed-case files
15462 are unique, POSIX file locking, and persistent inodes).
15463 Due to various issues with NFS and bugs in some
15464 implementations, NFS does not meet this minimum
15465 requirement.
15466 Consequently, <filename>TMPDIR</filename> cannot be on
15467 NFS.
15468 </para>
15469 </glossdef>
15470 </glossentry>
15471
15472 <glossentry id='var-TOOLCHAIN_HOST_TASK'><glossterm>TOOLCHAIN_HOST_TASK</glossterm>
15473 <info>
15474 TOOLCHAIN_HOST_TASK[doc] = "This variable lists packages the OpenEmbedded build system uses when building an SDK, which contains a cross-development environment."
15475 </info>
15476 <glossdef>
15477 <para role="glossdeffirst">
15478 This variable lists packages the OpenEmbedded build system
15479 uses when building an SDK, which contains a
15480 cross-development environment.
15481 The packages specified by this variable are part of the
15482 toolchain set that runs on the
15483 <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>,
15484 and each package should usually have the prefix
15485 <filename>nativesdk-</filename>.
15486 For example, consider the following command when
15487 building an SDK:
15488 <literallayout class='monospaced'>
15489 $ bitbake -c populate_sdk <replaceable>imagename</replaceable>
15490 </literallayout>
15491 In this case, a default list of packages is set in this
15492 variable, but you can add additional packages to the list.
15493 See the
15494 "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-adding-individual-packages'>Adding Individual Packages to the Standard SDK</ulink>"
15495 section in the Yocto Project Application Development and
15496 the Extensible Software Development Kit (eSDK) manual
15497 for more information.
15498 </para>
15499
15500 <para>
15501 For background information on cross-development toolchains
15502 in the Yocto Project development environment, see the
15503 "<ulink url='&YOCTO_DOCS_OM_URL;#cross-development-toolchain-generation'>Cross-Development Toolchain Generation</ulink>"
15504 section in the Yocto Project Overview and Concepts Manual.
15505 For information on setting up a cross-development
15506 environment, see the
15507 <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
15508 manual.
15509 </para>
15510 </glossdef>
15511 </glossentry>
15512
15513 <glossentry id='var-TOOLCHAIN_OUTPUTNAME'><glossterm>TOOLCHAIN_OUTPUTNAME</glossterm>
15514 <info>
15515 TOOLCHAIN_OUTPUTNAME[doc] = "Defines the name used for the toolchain output."
15516 </info>
15517 <glossdef>
15518 <para role="glossdeffirst">
15519 This variable defines the name used for the toolchain
15520 output.
15521 The
15522 <link linkend='ref-classes-populate-sdk-*'><filename>populate_sdk_base</filename></link>
15523 class sets the
15524 <filename>TOOLCHAIN_OUTPUTNAME</filename> variable as
15525 follows:
15526 <literallayout class='monospaced'>
15527 TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${SDK_VERSION}"
15528 </literallayout>
15529 See the
15530 <link linkend='var-SDK_NAME'><filename>SDK_NAME</filename></link>
15531 and
15532 <link linkend='var-SDK_VERSION'><filename>SDK_VERSION</filename></link>
15533 variables for additional information.
15534 </para>
15535 </glossdef>
15536 </glossentry>
15537
15538 <glossentry id='var-TOOLCHAIN_TARGET_TASK'><glossterm>TOOLCHAIN_TARGET_TASK</glossterm>
15539 <info>
15540 TOOLCHAIN_TARGET_TASK[doc] = "This variable lists packages the OpenEmbedded build system uses when it creates the target part of an SDK, which includes libraries and headers."
15541 </info>
15542 <glossdef>
15543 <para role="glossdeffirst">
15544 This variable lists packages the OpenEmbedded build system
15545 uses when it creates the target part of an SDK
15546 (i.e. the part built for the target hardware), which
15547 includes libraries and headers.
15548 Use this variable to add individual packages to the
15549 part of the SDK that runs on the target.
15550 See the
15551 "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-adding-individual-packages'>Adding Individual Packages to the Standard SDK</ulink>"
15552 section in the Yocto Project Application Development and
15553 the Extensible Software Development Kit (eSDK) manual for
15554 more information.
15555 </para>
15556
15557 <para>
15558 For background information on cross-development toolchains
15559 in the Yocto Project development environment, see the
15560 "<ulink url='&YOCTO_DOCS_OM_URL;#cross-development-toolchain-generation'>Cross-Development Toolchain Generation</ulink>"
15561 section in the Yocto Project Overview and Concepts Manual.
15562 For information on setting up a cross-development
15563 environment, see the
15564 <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
15565 manual.
15566 </para>
15567 </glossdef>
15568 </glossentry>
15569
15570 <glossentry id='var-TOPDIR'><glossterm>TOPDIR</glossterm>
15571 <info>
15572 TOPDIR[doc] = "The Build Directory. BitBake automatically sets this variable. The OpenEmbedded build system uses the Build Directory when building images."
15573 </info>
15574 <glossdef>
15575 <para role="glossdeffirst">
15576 The top-level
15577 <link linkend='build-directory'>Build Directory</link>.
15578 BitBake automatically sets this variable when you
15579 initialize your build environment using
15580 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>.
15581 </para>
15582 </glossdef>
15583 </glossentry>
15584
15585 <glossentry id='var-TRANSLATED_TARGET_ARCH'><glossterm>TRANSLATED_TARGET_ARCH</glossterm>
15586 <info>
15587 TRANSLATED_TARGET_ARCH[doc] = "A sanitized version of TARGET_ARCH. This variable is used where the architecture is needed in a value where underscores are not allowed."
15588 </info>
15589 <glossdef>
15590 <para role="glossdeffirst">
15591 A sanitized version of
15592 <link linkend='var-TARGET_ARCH'><filename>TARGET_ARCH</filename></link>.
15593 This variable is used where the architecture is needed in
15594 a value where underscores are not allowed, for example
15595 within package filenames.
15596 In this case, dash characters replace any underscore
15597 characters used in <filename>TARGET_ARCH</filename>.
15598 </para>
15599
15600 <para>
15601 Do not edit this variable.
15602 </para>
15603 </glossdef>
15604 </glossentry>
15605
15606 <glossentry id='var-TUNE_ARCH'><glossterm>TUNE_ARCH</glossterm>
15607 <info>
15608 TUNE_ARCH[doc] = "The GNU canonical architecture for a specific architecture (i.e. arm, armeb, mips, mips64, and so forth)."
15609 </info>
15610 <glossdef>
15611 <para role="glossdeffirst">
15612 The GNU canonical architecture for a specific architecture
15613 (i.e. <filename>arm</filename>,
15614 <filename>armeb</filename>,
15615 <filename>mips</filename>,
15616 <filename>mips64</filename>, and so forth).
15617 BitBake uses this value to setup configuration.
15618 </para>
15619
15620 <para>
15621 <filename>TUNE_ARCH</filename> definitions are specific to
15622 a given architecture.
15623 The definitions can be a single static definition, or
15624 can be dynamically adjusted.
15625 You can see details for a given CPU family by looking at
15626 the architecture's <filename>README</filename> file.
15627 For example, the
15628 <filename>meta/conf/machine/include/mips/README</filename>
15629 file in the
15630 <link linkend='source-directory'>Source Directory</link>
15631 provides information for <filename>TUNE_ARCH</filename>
15632 specific to the <filename>mips</filename> architecture.
15633 </para>
15634
15635 <para>
15636 <filename>TUNE_ARCH</filename> is tied closely to
15637 <link linkend='var-TARGET_ARCH'><filename>TARGET_ARCH</filename></link>,
15638 which defines the target machine's architecture.
15639 The BitBake configuration file
15640 (<filename>meta/conf/bitbake.conf</filename>) sets
15641 <filename>TARGET_ARCH</filename> as follows:
15642 <literallayout class='monospaced'>
15643 TARGET_ARCH = "${TUNE_ARCH}"
15644 </literallayout>
15645 </para>
15646
15647 <para>
15648 The following list, which is by no means complete since
15649 architectures are configurable, shows supported machine
15650 architectures:
15651 <literallayout class='monospaced'>
15652 arm
15653 i586
15654 x86_64
15655 powerpc
15656 powerpc64
15657 mips
15658 mipsel
15659 </literallayout>
15660 </para>
15661 </glossdef>
15662 </glossentry>
15663
15664 <glossentry id='var-TUNE_ASARGS'><glossterm>TUNE_ASARGS</glossterm>
15665 <info>
15666 TUNE_ASARGS[doc] = "Specifies architecture-specific assembler flags for the target system."
15667 </info>
15668 <glossdef>
15669 <para role="glossdeffirst">
15670 Specifies architecture-specific assembler flags for
15671 the target system.
15672 The set of flags is based on the selected tune features.
15673 <filename>TUNE_ASARGS</filename> is set using
15674 the tune include files, which are typically under
15675 <filename>meta/conf/machine/include/</filename> and are
15676 influenced through
15677 <link linkend='var-TUNE_FEATURES'><filename>TUNE_FEATURES</filename></link>.
15678 For example, the
15679 <filename>meta/conf/machine/include/x86/arch-x86.inc</filename>
15680 file defines the flags for the x86 architecture as follows:
15681 <literallayout class='monospaced'>
15682 TUNE_ASARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-x32", "", d)}"
15683 </literallayout>
15684 <note>
15685 Board Support Packages (BSPs) select the tune.
15686 The selected tune, in turn, affects the tune variables
15687 themselves (i.e. the tune can supply its own
15688 set of flags).
15689 </note>
15690 </para>
15691 </glossdef>
15692 </glossentry>
15693
15694 <glossentry id='var-TUNE_CCARGS'><glossterm>TUNE_CCARGS</glossterm>
15695 <info>
15696 TUNE_CCARGS[doc] = "Specifies architecture-specific C compiler flags for the target system."
15697 </info>
15698 <glossdef>
15699 <para role="glossdeffirst">
15700 Specifies architecture-specific C compiler flags for
15701 the target system.
15702 The set of flags is based on the selected tune features.
15703 <filename>TUNE_CCARGS</filename> is set using
15704 the tune include files, which are typically under
15705 <filename>meta/conf/machine/include/</filename> and are
15706 influenced through
15707 <link linkend='var-TUNE_FEATURES'><filename>TUNE_FEATURES</filename></link>.
15708 <note>
15709 Board Support Packages (BSPs) select the tune.
15710 The selected tune, in turn, affects the tune variables
15711 themselves (i.e. the tune can supply its own
15712 set of flags).
15713 </note>
15714 </para>
15715 </glossdef>
15716 </glossentry>
15717
15718 <glossentry id='var-TUNE_LDARGS'><glossterm>TUNE_LDARGS</glossterm>
15719 <info>
15720 TUNE_LDARGS[doc] = "Specifies architecture-specific linker flags for the target system."
15721 </info>
15722 <glossdef>
15723 <para role="glossdeffirst">
15724 Specifies architecture-specific linker flags for
15725 the target system.
15726 The set of flags is based on the selected tune features.
15727 <filename>TUNE_LDARGS</filename> is set using
15728 the tune include files, which are typically under
15729 <filename>meta/conf/machine/include/</filename> and are
15730 influenced through
15731 <link linkend='var-TUNE_FEATURES'><filename>TUNE_FEATURES</filename></link>.
15732 For example, the
15733 <filename>meta/conf/machine/include/x86/arch-x86.inc</filename>
15734 file defines the flags for the x86 architecture as follows:
15735 <literallayout class='monospaced'>
15736 TUNE_LDARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-m elf32_x86_64", "", d)}"
15737 </literallayout>
15738 <note>
15739 Board Support Packages (BSPs) select the tune.
15740 The selected tune, in turn, affects the tune variables
15741 themselves (i.e. the tune can supply its own
15742 set of flags).
15743 </note>
15744 </para>
15745 </glossdef>
15746 </glossentry>
15747
15748 <glossentry id='var-TUNE_FEATURES'><glossterm>TUNE_FEATURES</glossterm>
15749 <info>
15750 TUNE_FEATURES[doc] = "Features used to "tune" a compiler for optimal use given a specific processor."
15751 </info>
15752 <glossdef>
15753 <para role="glossdeffirst">
15754 Features used to "tune" a compiler for optimal use
15755 given a specific processor.
15756 The features are defined within the tune files and allow
15757 arguments (i.e. <filename>TUNE_*ARGS</filename>) to be
15758 dynamically generated based on the features.
15759 </para>
15760
15761 <para>
15762 The OpenEmbedded build system verifies the features
15763 to be sure they are not conflicting and that they are
15764 supported.
15765 </para>
15766
15767 <para>
15768 The BitBake configuration file
15769 (<filename>meta/conf/bitbake.conf</filename>) defines
15770 <filename>TUNE_FEATURES</filename> as follows:
15771 <literallayout class='monospaced'>
15772 TUNE_FEATURES ??= "${TUNE_FEATURES_tune-${DEFAULTTUNE}}"
15773 </literallayout>
15774 See the
15775 <link linkend='var-DEFAULTTUNE'><filename>DEFAULTTUNE</filename></link>
15776 variable for more information.
15777 </para>
15778 </glossdef>
15779 </glossentry>
15780
15781 <glossentry id='var-TUNE_PKGARCH'><glossterm>TUNE_PKGARCH</glossterm>
15782 <info>
15783 TUNE_PKGARCH[doc] = "The package architecture understood by the packaging system to define the architecture, ABI, and tuning of output packages."
15784 </info>
15785 <glossdef>
15786 <para role="glossdeffirst">
15787 The package architecture understood by the packaging
15788 system to define the architecture, ABI, and tuning of
15789 output packages.
15790 The specific tune is defined using the "_tune" override
15791 as follows:
15792 <literallayout class='monospaced'>
15793 TUNE_PKGARCH_tune-<replaceable>tune</replaceable> = "<replaceable>tune</replaceable>"
15794 </literallayout>
15795 </para>
15796
15797 <para>
15798 These tune-specific package architectures are defined in
15799 the machine include files.
15800 Here is an example of the "core2-32" tuning as used
15801 in the
15802 <filename>meta/conf/machine/include/tune-core2.inc</filename>
15803 file:
15804 <literallayout class='monospaced'>
15805 TUNE_PKGARCH_tune-core2-32 = "core2-32"
15806 </literallayout>
15807 </para>
15808 </glossdef>
15809 </glossentry>
15810
15811 <glossentry id='var-TUNEABI'><glossterm>TUNEABI</glossterm>
15812 <info>
15813 TUNEABI[doc] = "An underlying ABI used by a particular tuning in a given toolchain layer. This feature allows providers using prebuilt libraries to check compatibility of a tuning against their selection of libraries."
15814 </info>
15815 <glossdef>
15816 <para role="glossdeffirst">
15817 An underlying Application Binary Interface (ABI) used by
15818 a particular tuning in a given toolchain layer.
15819 Providers that use prebuilt libraries can use the
15820 <filename>TUNEABI</filename>,
15821 <link linkend='var-TUNEABI_OVERRIDE'><filename>TUNEABI_OVERRIDE</filename></link>,
15822 and
15823 <link linkend='var-TUNEABI_WHITELIST'><filename>TUNEABI_WHITELIST</filename></link>
15824 variables to check compatibility of tunings against their
15825 selection of libraries.
15826 </para>
15827
15828 <para>
15829 If <filename>TUNEABI</filename> is undefined, then every
15830 tuning is allowed.
15831 See the
15832 <link linkend='ref-classes-sanity'><filename>sanity</filename></link>
15833 class to see how the variable is used.
15834 </para>
15835 </glossdef>
15836 </glossentry>
15837
15838 <glossentry id='var-TUNEABI_OVERRIDE'><glossterm>TUNEABI_OVERRIDE</glossterm>
15839 <info>
15840 TUNEABI_OVERRIDE[doc] = "If set, ignores TUNEABI_WHITELIST."
15841 </info>
15842 <glossdef>
15843 <para role="glossdeffirst">
15844 If set, the OpenEmbedded system ignores the
15845 <link linkend='var-TUNEABI_WHITELIST'><filename>TUNEABI_WHITELIST</filename></link>
15846 variable.
15847 Providers that use prebuilt libraries can use the
15848 <filename>TUNEABI_OVERRIDE</filename>,
15849 <filename>TUNEABI_WHITELIST</filename>,
15850 and
15851 <link linkend='var-TUNEABI'><filename>TUNEABI</filename></link>
15852 variables to check compatibility of a tuning against their
15853 selection of libraries.
15854 </para>
15855
15856 <para>
15857 See the
15858 <link linkend='ref-classes-sanity'><filename>sanity</filename></link>
15859 class to see how the variable is used.
15860 </para>
15861 </glossdef>
15862 </glossentry>
15863
15864 <glossentry id='var-TUNEABI_WHITELIST'><glossterm>TUNEABI_WHITELIST</glossterm>
15865 <info>
15866 TUNEABI_WHITELIST[doc] = "A whitelist of permissible TUNEABI values. If the variable is not set, all values are allowed."
15867 </info>
15868 <glossdef>
15869 <para role="glossdeffirst">
15870 A whitelist of permissible
15871 <link linkend='var-TUNEABI'><filename>TUNEABI</filename></link>
15872 values.
15873 If <filename>TUNEABI_WHITELIST</filename> is not set,
15874 all tunes are allowed.
15875 Providers that use prebuilt libraries can use the
15876 <filename>TUNEABI_WHITELIST</filename>,
15877 <link linkend='var-TUNEABI_OVERRIDE'><filename>TUNEABI_OVERRIDE</filename></link>,
15878 and <filename>TUNEABI</filename> variables to check
15879 compatibility of a tuning against their selection of
15880 libraries.
15881 </para>
15882
15883 <para>
15884 See the
15885 <link linkend='ref-classes-sanity'><filename>sanity</filename></link>
15886 class to see how the variable is used.
15887 </para>
15888 </glossdef>
15889 </glossentry>
15890
15891 <glossentry id='var-TUNECONFLICTS'><glossterm>TUNECONFLICTS[<replaceable>feature</replaceable>]</glossterm>
15892 <info>
15893 TUNECONFLICTS[doc] = "Specifies CPU or Application Binary Interface (ABI) tuning features that conflict with specified feature."
15894 </info>
15895 <glossdef>
15896 <para role="glossdeffirst">
15897 Specifies CPU or Application Binary Interface (ABI)
15898 tuning features that conflict with <replaceable>feature</replaceable>.
15899 </para>
15900
15901 <para>
15902 Known tuning conflicts are specified in the machine include
15903 files in the
15904 <link linkend='source-directory'>Source Directory</link>.
15905 Here is an example from the
15906 <filename>meta/conf/machine/include/mips/arch-mips.inc</filename>
15907 include file that lists the "o32" and "n64" features as
15908 conflicting with the "n32" feature:
15909 <literallayout class='monospaced'>
15910 TUNECONFLICTS[n32] = "o32 n64"
15911 </literallayout>
15912 </para>
15913 </glossdef>
15914 </glossentry>
15915
15916 <glossentry id='var-TUNEVALID'><glossterm>TUNEVALID[<replaceable>feature</replaceable>]</glossterm>
15917 <info>
15918 TUNEVALID[doc] = "Descriptions, stored as flags, of valid tuning features."
15919 </info>
15920 <glossdef>
15921 <para role="glossdeffirst">
15922 Specifies a valid CPU or Application Binary Interface (ABI)
15923 tuning feature.
15924 The specified feature is stored as a flag.
15925 Valid features are specified in the machine include files
15926 (e.g. <filename>meta/conf/machine/include/arm/arch-arm.inc</filename>).
15927 Here is an example from that file:
15928 <literallayout class='monospaced'>
15929 TUNEVALID[bigendian] = "Enable big-endian mode."
15930 </literallayout>
15931 </para>
15932
15933 <para>
15934 See the machine include files in the
15935 <link linkend='source-directory'>Source Directory</link>
15936 for these features.
15937 </para>
15938 </glossdef>
15939 </glossentry>
15940
15941 </glossdiv>
15942
15943 <glossdiv id='var-glossary-u'><title>U</title>
15944
15945 <glossentry id='var-UBOOT_CONFIG'><glossterm>UBOOT_CONFIG</glossterm>
15946 <info>
15947 UBOOT_CONFIG[doc] = "Configures the UBOOT_MACHINE and can also define IMAGE_FSTYPES for individual cases."
15948 </info>
15949 <glossdef>
15950 <para role="glossdeffirst">
15951 Configures the
15952 <link linkend='var-UBOOT_MACHINE'><filename>UBOOT_MACHINE</filename></link>
15953 and can also define
15954 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
15955 for individual cases.
15956 </para>
15957
15958 <para>
15959 Following is an example from the
15960 <filename>meta-fsl-arm</filename> layer.
15961 <literallayout class='monospaced'>
15962 UBOOT_CONFIG ??= "sd"
15963 UBOOT_CONFIG[sd] = "mx6qsabreauto_config,sdcard"
15964 UBOOT_CONFIG[eimnor] = "mx6qsabreauto_eimnor_config"
15965 UBOOT_CONFIG[nand] = "mx6qsabreauto_nand_config,ubifs"
15966 UBOOT_CONFIG[spinor] = "mx6qsabreauto_spinor_config"
15967 </literallayout>
15968 In this example, "sd" is selected as the configuration
15969 of the possible four for the
15970 <filename>UBOOT_MACHINE</filename>.
15971 The "sd" configuration defines "mx6qsabreauto_config"
15972 as the value for <filename>UBOOT_MACHINE</filename>, while
15973 the "sdcard" specifies the
15974 <filename>IMAGE_FSTYPES</filename> to use for the U-boot
15975 image.
15976 </para>
15977
15978 <para>
15979 For more information on how the
15980 <filename>UBOOT_CONFIG</filename> is handled, see the
15981 <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/classes/uboot-config.bbclass'><filename>uboot-config</filename></ulink>
15982 class.
15983 </para>
15984 </glossdef>
15985 </glossentry>
15986
15987 <glossentry id='var-UBOOT_DTB_LOADADDRESS'><glossterm>UBOOT_DTB_LOADADDRESS</glossterm>
15988 <info>
15989 UBOOT_DTB_LOADADDRESS[doc] = "Specifies the load address for the dtb."
15990 </info>
15991 <glossdef>
15992 <para role="glossdeffirst">
15993 Specifies the load address for the dtb image used by U-boot.
15994 During FIT image creation, the
15995 <filename>UBOOT_DTB_LOADADDRESS</filename> variable is used
15996 in <filename>kernel-fitimage</filename> class to specify the
15997 load address to be used in creating the dtb sections of
15998 Image Tree Source for the FIT image.
15999 </para>
16000 </glossdef>
16001 </glossentry>
16002
16003 <glossentry id='var-UBOOT_DTBO_LOADADDRESS'><glossterm>UBOOT_DTBO_LOADADDRESS</glossterm>
16004 <info>
16005 UBOOT_DTBO_LOADADDRESS[doc] = "Specifies the load address for the dtbo."
16006 </info>
16007 <glossdef>
16008 <para role="glossdeffirst">
16009 Specifies the load address for the dtbo image used by U-boot.
16010 During FIT image creation, the
16011 <filename>UBOOT_DTBO_LOADADDRESS</filename> variable is used
16012 in <filename>kernel-fitimage</filename> class to specify the
16013 load address to be used in creating the dtbo sections of
16014 Image Tree Source for the FIT image.
16015 </para>
16016 </glossdef>
16017 </glossentry>
16018
16019 <glossentry id='var-UBOOT_ENTRYPOINT'><glossterm>UBOOT_ENTRYPOINT</glossterm>
16020 <info>
16021 UBOOT_ENTRYPOINT[doc] = "Specifies the entry point for the U-Boot image."
16022 </info>
16023 <glossdef>
16024 <para role="glossdeffirst">
16025 Specifies the entry point for the U-Boot image.
16026 During U-Boot image creation, the
16027 <filename>UBOOT_ENTRYPOINT</filename> variable is passed
16028 as a command-line parameter to the
16029 <filename>uboot-mkimage</filename> utility.
16030 </para>
16031 </glossdef>
16032 </glossentry>
16033
16034 <glossentry id='var-UBOOT_LOADADDRESS'><glossterm>UBOOT_LOADADDRESS</glossterm>
16035 <info>
16036 UBOOT_LOADADDRESS[doc] = "Specifies the load address for the U-Boot image."
16037 </info>
16038 <glossdef>
16039 <para role="glossdeffirst">
16040 Specifies the load address for the U-Boot image.
16041 During U-Boot image creation, the
16042 <filename>UBOOT_LOADADDRESS</filename> variable is passed
16043 as a command-line parameter to the
16044 <filename>uboot-mkimage</filename> utility.
16045 </para>
16046 </glossdef>
16047 </glossentry>
16048
16049 <glossentry id='var-UBOOT_LOCALVERSION'><glossterm>UBOOT_LOCALVERSION</glossterm>
16050 <info>
16051 UBOOT_LOCALVERSION[doc] = "Appends a string to the name of the local version of the U-Boot image."
16052 </info>
16053 <glossdef>
16054 <para role="glossdeffirst">
16055 Appends a string to the name of the local version of the
16056 U-Boot image.
16057 For example, assuming the version of the U-Boot image
16058 built was "2013.10", the full version string reported by
16059 U-Boot would be "2013.10-yocto" given the following
16060 statement:
16061 <literallayout class='monospaced'>
16062 UBOOT_LOCALVERSION = "-yocto"
16063 </literallayout>
16064 </para>
16065 </glossdef>
16066 </glossentry>
16067
16068 <glossentry id='var-UBOOT_MACHINE'><glossterm>UBOOT_MACHINE</glossterm>
16069 <info>
16070 UBOOT_MACHINE[doc] = "Specifies the value passed on the make command line when building a U-Boot image."
16071 </info>
16072 <glossdef>
16073 <para role="glossdeffirst">
16074 Specifies the value passed on the
16075 <filename>make</filename> command line when building
16076 a U-Boot image.
16077 The value indicates the target platform configuration.
16078 You typically set this variable from the machine
16079 configuration file (i.e.
16080 <filename>conf/machine/<replaceable>machine_name</replaceable>.conf</filename>).
16081 </para>
16082
16083 <para>
16084 Please see the "Selection of Processor Architecture and
16085 Board Type" section in the U-Boot README for valid values
16086 for this variable.
16087 </para>
16088 </glossdef>
16089 </glossentry>
16090
16091 <glossentry id='var-UBOOT_MAKE_TARGET'><glossterm>UBOOT_MAKE_TARGET</glossterm>
16092 <info>
16093 UBOOT_MAKE_TARGET[doc] = "Specifies the target called in the Makefile."
16094 </info>
16095 <glossdef>
16096 <para role="glossdeffirst">
16097 Specifies the target called in the
16098 <filename>Makefile</filename>.
16099 The default target is "all".
16100 </para>
16101 </glossdef>
16102 </glossentry>
16103
16104 <glossentry id='var-UBOOT_MKIMAGE_DTCOPTS'><glossterm>UBOOT_MKIMAGE_DTCOPTS</glossterm>
16105 <info>
16106 UBOOT_MKIMAGE_DTCOPTS[doc] = "Options for the device tree compiler passed to mkimage '-D' feature."
16107 </info>
16108 <glossdef>
16109 <para role="glossdeffirst">
16110 Options for the device tree compiler passed to mkimage '-D'
16111 feature while creating FIT image in
16112 <filename>kernel-fitimage</filename> class.
16113 </para>
16114 </glossdef>
16115 </glossentry>
16116
16117 <glossentry id='var-UBOOT_RD_LOADADDRESS'><glossterm>UBOOT_RD_LOADADDRESS</glossterm>
16118 <info>
16119 UBOOT_RD_LOADADDRESS[doc] = "Specifies the load address for the ramdisk image."
16120 </info>
16121 <glossdef>
16122 <para role="glossdeffirst">
16123 Specifies the load address for the RAM disk image.
16124 During FIT image creation, the
16125 <filename>UBOOT_RD_LOADADDRESS</filename> variable is used
16126 in <filename>kernel-fitimage</filename> class to specify the
16127 load address to be used in creating the Image Tree Source for
16128 the FIT image.
16129 </para>
16130 </glossdef>
16131 </glossentry>
16132
16133 <glossentry id='var-UBOOT_RD_ENTRYPOINT'><glossterm>UBOOT_RD_ENTRYPOINT</glossterm>
16134 <info>
16135 UBOOT_RD_ENTRYPOINT[doc] = "Specifies the entrypoint for the ramdisk image."
16136 </info>
16137 <glossdef>
16138 <para role="glossdeffirst">
16139 Specifies the entrypoint for the RAM disk image.
16140 During FIT image creation, the
16141 <filename>UBOOT_RD_ENTRYPOINT</filename> variable is used
16142 in <filename>kernel-fitimage</filename> class to specify the
16143 entrypoint to be used in creating the Image Tree Source for
16144 the FIT image.
16145 </para>
16146 </glossdef>
16147 </glossentry>
16148
16149 <glossentry id='var-UBOOT_SUFFIX'><glossterm>UBOOT_SUFFIX</glossterm>
16150 <info>
16151 UBOOT_SUFFIX[doc] = "Points to the generated U-Boot extension."
16152 </info>
16153 <glossdef>
16154 <para role="glossdeffirst">
16155 Points to the generated U-Boot extension.
16156 For example, <filename>u-boot.sb</filename> has a
16157 <filename>.sb</filename> extension.
16158 </para>
16159
16160 <para>
16161 The default U-Boot extension is
16162 <filename>.bin</filename>
16163 </para>
16164 </glossdef>
16165 </glossentry>
16166
16167 <glossentry id='var-UBOOT_SIGN_ENABLE'><glossterm>UBOOT_SIGN_ENABLE</glossterm>
16168 <info>
16169 UBOOT_SIGN_KEYDIR[doc] = "Enable signing of FIT image."
16170 </info>
16171 <glossdef>
16172 <para role="glossdeffirst">
16173 Enable signing of FIT image. The default value is "0".
16174 </para>
16175 </glossdef>
16176 </glossentry>
16177
16178 <glossentry id='var-UBOOT_SIGN_KEYDIR'><glossterm>UBOOT_SIGN_KEYDIR</glossterm>
16179 <info>
16180 UBOOT_SIGN_KEYDIR[doc] = "Location of the directory containing the RSA key and certificate used for signing FIT image."
16181 </info>
16182 <glossdef>
16183 <para role="glossdeffirst">
16184 Location of the directory containing the RSA key and
16185 certificate used for signing FIT image.
16186 </para>
16187 </glossdef>
16188 </glossentry>
16189
16190 <glossentry id='var-UBOOT_SIGN_KEYNAME'><glossterm>UBOOT_SIGN_KEYNAME</glossterm>
16191 <info>
16192 UBOOT_SIGN_KEYNAME[doc] = "The name of keys used for signing U-boot FIT image"
16193 </info>
16194 <glossdef>
16195 <para role="glossdeffirst">
16196 The name of keys used for signing U-boot FIT image stored in
16197 <filename><link linkend='var-UBOOT_SIGN_KEYDIR'>UBOOT_SIGN_KEYDIR</link></filename>
16198 directory. For e.g. dev.key key and dev.crt certificate
16199 stored in
16200 <filename><link linkend='var-UBOOT_SIGN_KEYDIR'>UBOOT_SIGN_KEYDIR</link></filename>
16201 directory will have
16202 <filename><link linkend='var-UBOOT_SIGN_KEYNAME'>UBOOT_SIGN_KEYNAME</link></filename>
16203 set to "dev".
16204 </para>
16205 </glossdef>
16206 </glossentry>
16207
16208 <glossentry id='var-UBOOT_TARGET'><glossterm>UBOOT_TARGET</glossterm>
16209 <info>
16210 UBOOT_TARGET[doc] = "Specifies the target used for building U-Boot."
16211 </info>
16212 <glossdef>
16213 <para role="glossdeffirst">
16214 Specifies the target used for building U-Boot.
16215 The target is passed directly as part of the "make" command
16216 (e.g. SPL and AIS).
16217 If you do not specifically set this variable, the
16218 OpenEmbedded build process passes and uses "all" for the
16219 target during the U-Boot building process.
16220 </para>
16221 </glossdef>
16222 </glossentry>
16223
16224 <glossentry id='var-UNKNOWN_CONFIGURE_WHITELIST'><glossterm>UNKNOWN_CONFIGURE_WHITELIST</glossterm>
16225 <info>
16226 UNKNOWN_CONFIGURE_WHITELIST[doc] = "Specifies a list of options that, if reported by the configure script as being invalid, should not generate a warning during the do_configure task."
16227 </info>
16228 <glossdef>
16229 <para role="glossdeffirst">
16230 Specifies a list of options that, if reported by the
16231 configure script as being invalid, should not generate a
16232 warning during the
16233 <link linkend='ref-tasks-configure'><filename>do_configure</filename></link>
16234 task.
16235 Normally, invalid configure options are simply not passed
16236 to the configure script (e.g. should be removed from
16237 <link linkend='var-EXTRA_OECONF'><filename>EXTRA_OECONF</filename></link>
16238 or
16239 <link linkend='var-PACKAGECONFIG_CONFARGS'><filename>PACKAGECONFIG_CONFARGS</filename></link>).
16240 However, common options, for example, exist that are passed
16241 to all configure scripts at a class level that might not
16242 be valid for some configure scripts.
16243 It follows that no benefit exists in seeing a warning about
16244 these options.
16245 For these cases, the options are added to
16246 <filename>UNKNOWN_CONFIGURE_WHITELIST</filename>.
16247 </para>
16248
16249 <para>
16250 The configure arguments check that uses
16251 <filename>UNKNOWN_CONFIGURE_WHITELIST</filename> is part
16252 of the
16253 <link linkend='ref-classes-insane'><filename>insane</filename></link>
16254 class and is only enabled if the recipe inherits the
16255 <link linkend='ref-classes-autotools'><filename>autotools</filename></link>
16256 class.
16257 </para>
16258 </glossdef>
16259 </glossentry>
16260
16261 <glossentry id='var-UPDATERCPN'><glossterm>UPDATERCPN</glossterm>
16262 <info>
16263 UPDATERCPN[doc] = "Specifies the package that contains the initscript that is enabled."
16264 </info>
16265 <glossdef>
16266 <para role="glossdeffirst">
16267 For recipes inheriting the
16268 <link linkend='ref-classes-update-rc.d'><filename>update-rc.d</filename></link>
16269 class, <filename>UPDATERCPN</filename> specifies
16270 the package that contains the initscript that is
16271 enabled.
16272 </para>
16273
16274 <para>
16275 The default value is "${PN}".
16276 Given that almost all recipes that install initscripts
16277 package them in the main package for the recipe, you
16278 rarely need to set this variable in individual recipes.
16279 </para>
16280 </glossdef>
16281 </glossentry>
16282
16283 <glossentry id='var-UPSTREAM_CHECK_GITTAGREGEX'><glossterm>UPSTREAM_CHECK_GITTAGREGEX</glossterm>
16284 <info>
16285 UPSTREAM_CHECK_GITTAGREGEX[doc] = "Filters relevant Git tags when fetching source from an upstream Git repository."
16286 </info>
16287 <glossdef>
16288 <para role="glossdeffirst">
16289 You can perform a per-recipe check for what the latest
16290 upstream source code version is by calling
16291 <filename>bitbake -c checkpkg</filename> <replaceable>recipe</replaceable>.
16292 If the recipe source code is provided from Git
16293 repositories, the OpenEmbedded build system determines the
16294 latest upstream version by picking the latest tag from the
16295 list of all repository tags.
16296 </para>
16297
16298 <para>
16299 You can use the
16300 <filename>UPSTREAM_CHECK_GITTAGREGEX</filename>
16301 variable to provide a regular expression to filter only the
16302 relevant tags should the default filter not work
16303 correctly.
16304 <literallayout class='monospaced'>
16305 UPSTREAM_CHECK_GITTAGREGEX = "git_tag_regex"
16306 </literallayout>
16307 </para>
16308 </glossdef>
16309 </glossentry>
16310
16311 <glossentry id='var-UPSTREAM_CHECK_REGEX'><glossterm>UPSTREAM_CHECK_REGEX</glossterm>
16312 <info>
16313 UPSTREAM_CHECK_REGEX[doc] = "The regular expression the package checking system uses to parse the page pointed to by UPSTREAM_CHECK_URI."
16314 </info>
16315 <glossdef>
16316 <para role="glossdeffirst">
16317 Use the <filename>UPSTREAM_CHECK_REGEX</filename> variable
16318 to specify a different regular expression instead of the
16319 default one when the package checking system is parsing
16320 the page found using
16321 <link linkend='var-UPSTREAM_CHECK_URI'><filename>UPSTREAM_CHECK_URI</filename></link>.
16322 <literallayout class='monospaced'>
16323 UPSTREAM_CHECK_REGEX = "package_regex"
16324 </literallayout>
16325 </para>
16326 </glossdef>
16327 </glossentry>
16328
16329 <glossentry id='var-UPSTREAM_CHECK_URI'><glossterm>UPSTREAM_CHECK_URI</glossterm>
16330 <info>
16331 UPSTREAM_CHECK_URI[doc] = "The URL used by the package checking system to get the latest version of the package when source files are fetched from an upstream Git repository."
16332 </info>
16333 <glossdef>
16334 <para role="glossdeffirst">
16335 You can perform a per-recipe check for what the latest
16336 upstream source code version is by calling
16337 <filename>bitbake -c checkpkg</filename> <replaceable>recipe</replaceable>.
16338 If the source code is provided from tarballs, the latest
16339 version is determined by fetching the directory listing
16340 where the tarball is and attempting to find a later tarball.
16341 When this approach does not work, you can use
16342 <filename>UPSTREAM_CHECK_URI</filename> to
16343 provide a different URI that contains the link to the
16344 latest tarball.
16345 <literallayout class='monospaced'>
16346 UPSTREAM_CHECK_URI = "recipe_url"
16347 </literallayout>
16348 </para>
16349 </glossdef>
16350 </glossentry>
16351
16352 <glossentry id='var-USE_DEVFS'><glossterm>USE_DEVFS</glossterm>
16353 <info>
16354 USE_DEVFS[doc] = "Determines if devtmpfs is used for /dev population."
16355 </info>
16356 <glossdef>
16357 <para role="glossdeffirst">
16358 Determines if <filename>devtmpfs</filename> is used for
16359 <filename>/dev</filename> population.
16360 The default value used for <filename>USE_DEVFS</filename>
16361 is "1" when no value is specifically set.
16362 Typically, you would set <filename>USE_DEVFS</filename>
16363 to "0" for a statically populated <filename>/dev</filename>
16364 directory.
16365 </para>
16366
16367 <para>
16368 See the
16369 "<ulink url='&YOCTO_DOCS_DEV_URL;#selecting-dev-manager'>Selecting a Device Manager</ulink>"
16370 section in the Yocto Project Development Tasks Manual for
16371 information on how to use this variable.
16372 </para>
16373 </glossdef>
16374 </glossentry>
16375
16376 <glossentry id='var-USE_VT'><glossterm>USE_VT</glossterm>
16377 <info>
16378 USE_VT[doc] = "When using SysVinit, determines whether or not to run a getty on any virtual terminals in order to enable logging in through those terminals."
16379 </info>
16380 <glossdef>
16381 <para role="glossdeffirst">
16382 When using
16383 <ulink url='&YOCTO_DOCS_DEV_URL;#new-recipe-enabling-system-services'>SysVinit</ulink>,
16384 determines whether or not to run a
16385 <ulink url='http://en.wikipedia.org/wiki/Getty_%28Unix%29'>getty</ulink>
16386 on any virtual terminals in order to enable logging in
16387 through those terminals.
16388 </para>
16389
16390 <para>
16391 The default value used for <filename>USE_VT</filename>
16392 is "1" when no default value is specifically set.
16393 Typically, you would set <filename>USE_VT</filename>
16394 to "0" in the machine configuration file for machines
16395 that do not have a graphical display attached and
16396 therefore do not need virtual terminal functionality.
16397 </para>
16398 </glossdef>
16399 </glossentry>
16400
16401 <glossentry id='var-USER_CLASSES'><glossterm>USER_CLASSES</glossterm>
16402 <info>
16403 USER_CLASSES[doc] = "List of additional classes to use when building images that enable extra features."
16404 </info>
16405 <glossdef>
16406 <para role="glossdeffirst">
16407 A list of classes to globally inherit.
16408 These classes are used by the OpenEmbedded build system
16409 to enable extra features (e.g.
16410 <filename>buildstats</filename>,
16411 <filename>image-mklibs</filename>, and so forth).
16412 </para>
16413
16414 <para>
16415 The default list is set in your
16416 <filename>local.conf</filename> file:
16417 <literallayout class='monospaced'>
16418 USER_CLASSES ?= "buildstats image-mklibs image-prelink"
16419 </literallayout>
16420 For more information, see
16421 <filename>meta-poky/conf/local.conf.sample</filename> in
16422 the
16423 <link linkend='source-directory'>Source Directory</link>.
16424 </para>
16425 </glossdef>
16426 </glossentry>
16427
16428 <glossentry id='var-USERADD_ERROR_DYNAMIC'><glossterm>USERADD_ERROR_DYNAMIC</glossterm>
16429 <info>
16430 USERADD_ERROR_DYNAMIC[doc] = "If set to 'error', forces the OpenEmbedded build system to produce an error if the user identification (uid) and group identification (gid) values are not defined in any of the files listed in USERADD_UID_TABLES and USERADD_GID_TABLES. If set to 'warn', a warning will be issued instead."
16431 </info>
16432 <glossdef>
16433 <para role="glossdeffirst">
16434
16435 If set to <filename>error</filename>, forces the
16436 OpenEmbedded build system to produce an error if the user
16437 identification (<filename>uid</filename>) and group
16438 identification (<filename>gid</filename>) values are not
16439 defined in any of the files listed
16440 in <link linkend='var-USERADD_UID_TABLES'><filename>USERADD_UID_TABLES</filename></link>
16441 and <link linkend='var-USERADD_GID_TABLES'><filename>USERADD_GID_TABLES</filename></link>. If
16442 set to <filename>warn</filename>, a warning will be issued
16443 instead.
16444 </para>
16445
16446 <para>
16447 The default behavior for the build system is to dynamically
16448 apply <filename>uid</filename> and
16449 <filename>gid</filename> values.
16450 Consequently, the <filename>USERADD_ERROR_DYNAMIC</filename>
16451 variable is by default not set.
16452 If you plan on using statically assigned
16453 <filename>gid</filename> and <filename>uid</filename>
16454 values, you should set
16455 the <filename>USERADD_ERROR_DYNAMIC</filename> variable in
16456 your <filename>local.conf</filename> file as
16457 follows:
16458 <literallayout class='monospaced'>
16459 USERADD_ERROR_DYNAMIC = "error"
16460 </literallayout>
16461 Overriding the default behavior implies you are going to
16462 also take steps to set static <filename>uid</filename> and
16463 <filename>gid</filename> values through use of the
16464 <link linkend='var-USERADDEXTENSION'><filename>USERADDEXTENSION</filename></link>,
16465 <link linkend='var-USERADD_UID_TABLES'><filename>USERADD_UID_TABLES</filename></link>,
16466 and
16467 <link linkend='var-USERADD_GID_TABLES'><filename>USERADD_GID_TABLES</filename></link>
16468 variables.
16469 </para>
16470
16471 <note>
16472 There is a difference in behavior between
16473 setting <filename>USERADD_ERROR_DYNAMIC</filename>
16474 to <filename>error</filename> and setting it
16475 to <filename>warn</filename>. When it is set
16476 to <filename>warn</filename>, the build system will report a
16477 warning for every undefined <filename>uid</filename> and
16478 <filename>gid</filename> in any recipe. But when it is set
16479 to <filename>error</filename>, it will only report errors
16480 for recipes that are actually built. This saves you from
16481 having to add static IDs for recipes that you know will
16482 never be built.
16483 </note>
16484 </glossdef>
16485 </glossentry>
16486
16487 <glossentry id='var-USERADD_GID_TABLES'><glossterm>USERADD_GID_TABLES</glossterm>
16488 <info>
16489 USERADD_GID_TABLES[doc] = "Specifies a password file to use for obtaining static group identification (gid) values when the OpenEmbedded build system adds a group to the system during package installation."
16490 </info>
16491 <glossdef>
16492 <para role="glossdeffirst">
16493 Specifies a password file to use for obtaining static
16494 group identification (<filename>gid</filename>) values
16495 when the OpenEmbedded build system adds a group to the
16496 system during package installation.
16497 </para>
16498
16499 <para>
16500 When applying static group identification
16501 (<filename>gid</filename>) values, the OpenEmbedded build
16502 system looks in
16503 <link linkend='var-BBPATH'><filename>BBPATH</filename></link>
16504 for a <filename>files/group</filename> file and then applies
16505 those <filename>uid</filename> values.
16506 Set the variable as follows in your
16507 <filename>local.conf</filename> file:
16508 <literallayout class='monospaced'>
16509 USERADD_GID_TABLES = "files/group"
16510 </literallayout>
16511 </para>
16512
16513 <note>
16514 Setting the
16515 <link linkend='var-USERADDEXTENSION'><filename>USERADDEXTENSION</filename></link>
16516 variable to "useradd-staticids" causes the build system
16517 to use static <filename>gid</filename> values.
16518 </note>
16519 </glossdef>
16520 </glossentry>
16521
16522 <glossentry id='var-USERADD_PACKAGES'><glossterm>USERADD_PACKAGES</glossterm>
16523 <info>
16524 USERADD_PACKAGES[doc] = "When a recipe inherits the useradd class, this variable specifies the individual packages within the recipe that require users and/or groups to be added."
16525 </info>
16526 <glossdef>
16527 <para role="glossdeffirst">
16528 When inheriting the
16529 <link linkend='ref-classes-useradd'><filename>useradd</filename></link>
16530 class, this variable
16531 specifies the individual packages within the recipe that
16532 require users and/or groups to be added.
16533 </para>
16534
16535 <para>
16536 You must set this variable if the recipe inherits the
16537 class.
16538 For example, the following enables adding a user for the
16539 main package in a recipe:
16540 <literallayout class='monospaced'>
16541 USERADD_PACKAGES = "${PN}"
16542 </literallayout>
16543 <note>
16544 It follows that if you are going to use the
16545 <filename>USERADD_PACKAGES</filename> variable,
16546 you need to set one or more of the
16547 <link linkend='var-USERADD_PARAM'><filename>USERADD_PARAM</filename></link>,
16548 <link linkend='var-GROUPADD_PARAM'><filename>GROUPADD_PARAM</filename></link>,
16549 or
16550 <link linkend='var-GROUPMEMS_PARAM'><filename>GROUPMEMS_PARAM</filename></link>
16551 variables.
16552 </note>
16553 </para>
16554
16555 </glossdef>
16556 </glossentry>
16557
16558 <glossentry id='var-USERADD_PARAM'><glossterm>USERADD_PARAM</glossterm>
16559 <info>
16560 USERADD_PARAM[doc] = "When a recipe inherits the useradd class, this variable specifies for a package what parameters should pass to the useradd command if you add a user to the system when the package is installed."
16561 </info>
16562 <glossdef>
16563 <para role="glossdeffirst">
16564 When inheriting the
16565 <link linkend='ref-classes-useradd'><filename>useradd</filename></link>
16566 class, this variable
16567 specifies for a package what parameters should pass
16568 to the <filename>useradd</filename> command
16569 if you add a user to the system when the package
16570 is installed.
16571 </para>
16572
16573 <para>
16574 Here is an example from the <filename>dbus</filename>
16575 recipe:
16576 <literallayout class='monospaced'>
16577 USERADD_PARAM_${PN} = "--system --home ${localstatedir}/lib/dbus \
16578 --no-create-home --shell /bin/false \
16579 --user-group messagebus"
16580 </literallayout>
16581 For information on the standard Linux shell command
16582 <filename>useradd</filename>, see
16583 <ulink url='http://linux.die.net/man/8/useradd'></ulink>.
16584 </para>
16585 </glossdef>
16586 </glossentry>
16587
16588 <glossentry id='var-USERADD_UID_TABLES'><glossterm>USERADD_UID_TABLES</glossterm>
16589 <info>
16590 USERADD_UID_TABLES[doc] = "Specifies a password file to use for obtaining static user identification (uid) values when the OpenEmbedded build system adds a user to the system during package installation."
16591 </info>
16592 <glossdef>
16593 <para role="glossdeffirst">
16594 Specifies a password file to use for obtaining static
16595 user identification (<filename>uid</filename>) values
16596 when the OpenEmbedded build system adds a user to the
16597 system during package installation.
16598 </para>
16599
16600 <para>
16601 When applying static user identification
16602 (<filename>uid</filename>) values, the OpenEmbedded build
16603 system looks in
16604 <link linkend='var-BBPATH'><filename>BBPATH</filename></link>
16605 for a <filename>files/passwd</filename> file and then applies
16606 those <filename>uid</filename> values.
16607 Set the variable as follows in your
16608 <filename>local.conf</filename> file:
16609 <literallayout class='monospaced'>
16610 USERADD_UID_TABLES = "files/passwd"
16611 </literallayout>
16612 </para>
16613
16614 <note>
16615 Setting the
16616 <link linkend='var-USERADDEXTENSION'><filename>USERADDEXTENSION</filename></link>
16617 variable to "useradd-staticids" causes the build system
16618 to use static <filename>uid</filename> values.
16619 </note>
16620 </glossdef>
16621 </glossentry>
16622
16623 <glossentry id='var-USERADDEXTENSION'><glossterm>USERADDEXTENSION</glossterm>
16624 <info>
16625 USERADDEXTENSION[doc] = "When set to 'useradd-staticids', causes the OpenEmbedded build system to base all user and group additions on a static passwd and group files found in BBPATH."
16626 </info>
16627 <glossdef>
16628 <para role="glossdeffirst">
16629 When set to "useradd-staticids", causes the
16630 OpenEmbedded build system to base all user and group
16631 additions on a static
16632 <filename>passwd</filename> and
16633 <filename>group</filename> files found in
16634 <link linkend='var-BBPATH'><filename>BBPATH</filename></link>.
16635 </para>
16636
16637 <para>
16638 To use static user identification (<filename>uid</filename>)
16639 and group identification (<filename>gid</filename>)
16640 values, set the variable
16641 as follows in your <filename>local.conf</filename> file:
16642 <literallayout class='monospaced'>
16643 USERADDEXTENSION = "useradd-staticids"
16644 </literallayout>
16645 <note>
16646 Setting this variable to use static
16647 <filename>uid</filename> and <filename>gid</filename>
16648 values causes the OpenEmbedded build system to employ
16649 the
16650 <link linkend='ref-classes-useradd'><filename>useradd-staticids</filename></link>
16651 class.
16652 </note>
16653 </para>
16654
16655 <para>
16656 If you use static <filename>uid</filename> and
16657 <filename>gid</filename> information, you must also
16658 specify the <filename>files/passwd</filename> and
16659 <filename>files/group</filename> files by setting the
16660 <link linkend='var-USERADD_UID_TABLES'><filename>USERADD_UID_TABLES</filename></link>
16661 and
16662 <link linkend='var-USERADD_GID_TABLES'><filename>USERADD_GID_TABLES</filename></link>
16663 variables.
16664 Additionally, you should also set the
16665 <link linkend='var-USERADD_ERROR_DYNAMIC'><filename>USERADD_ERROR_DYNAMIC</filename></link>
16666 variable.
16667 </para>
16668 </glossdef>
16669 </glossentry>
16670
16671 </glossdiv>
16672
16673 <glossdiv id='var-glossary-v'><title>V</title>
16674
16675 <glossentry id='var-VOLATILE_LOG_DIR'><glossterm>VOLATILE_LOG_DIR</glossterm>
16676 <info>
16677 VOLATILE_LOG_DIR[doc] = "Specifies the persistence of the target's /var/log directory, which is used to house postinstall target log files."
16678 </info>
16679 <glossdef>
16680 <para role="glossdeffirst">
16681 Specifies the persistence of the target's
16682 <filename>/var/log</filename> directory, which is used to
16683 house postinstall target log files.
16684 </para>
16685
16686 <para>
16687 By default, <filename>VOLATILE_LOG_DIR</filename> is set
16688 to "yes", which means the file is not persistent.
16689 You can override this setting by setting the
16690 variable to "no" to make the log directory persistent.
16691 </para>
16692 </glossdef>
16693 </glossentry>
16694
16695 </glossdiv>
16696
16697 <glossdiv id='var-glossary-w'><title>W</title>
16698
16699 <glossentry id='var-WARN_QA'><glossterm>WARN_QA</glossterm>
16700 <info>
16701 WARN_QA[doc] = "Specifies the quality assurance checks whose failures are reported as warnings by the OpenEmbedded build system."
16702 </info>
16703 <glossdef>
16704 <para role="glossdeffirst">
16705 Specifies the quality assurance checks whose failures are
16706 reported as warnings by the OpenEmbedded build system.
16707 You set this variable in your distribution configuration
16708 file.
16709 For a list of the checks you can control with this variable,
16710 see the
16711 "<link linkend='ref-classes-insane'><filename>insane.bbclass</filename></link>"
16712 section.
16713 </para>
16714 </glossdef>
16715 </glossentry>
16716
16717 <glossentry id='var-WKS_FILE_DEPENDS'><glossterm>WKS_FILE_DEPENDS</glossterm>
16718 <info>
16719 WKS_FILE_DEPENDS[doc] = "Lists a recipe's build-time dependencies specific to Wic."
16720 </info>
16721 <glossdef>
16722 <para role="glossdeffirst">
16723 When placed in the recipe that builds your image, this
16724 variable lists build-time dependencies.
16725 The <filename>WKS_FILE_DEPENDS</filename> variable is only
16726 applicable when Wic images are active (i.e. when
16727 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
16728 contains entries related to Wic).
16729 If your recipe does not create Wic images, the variable
16730 has no effect.
16731 </para>
16732
16733 <para>
16734 The <filename>WKS_FILE_DEPENDS</filename> variable is
16735 similar to the
16736 <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>
16737 variable.
16738 When you use the variable in your recipe that builds the
16739 Wic image, dependencies you list in the
16740 <filename>WIC_FILE_DEPENDS</filename> variable are added to
16741 the <filename>DEPENDS</filename> variable.
16742 </para>
16743
16744 <para>
16745 With the <filename>WKS_FILE_DEPENDS</filename> variable,
16746 you have the possibility to specify a list of additional
16747 dependencies (e.g. native tools, bootloaders, and so forth),
16748 that are required to build Wic images.
16749 Following is an example:
16750 <literallayout class='monospaced'>
16751 WKS_FILE_DEPENDS = "<replaceable>some-native-tool</replaceable>"
16752 </literallayout>
16753 In the previous example,
16754 <replaceable>some-native-tool</replaceable> would be
16755 replaced with an actual native tool on which the build
16756 would depend.
16757 </para>
16758 </glossdef>
16759 </glossentry>
16760
16761 <glossentry id='var-WKS_FILE'><glossterm>WKS_FILE</glossterm>
16762 <info>
16763 WKS_FILE[doc] = "Specifies the name of the wic kickstart file."
16764 </info>
16765 <glossdef>
16766 <para role="glossdeffirst">
16767 Specifies the location of the Wic
16768 kickstart file that is used by the OpenEmbedded build
16769 system to create a partitioned image
16770 (<replaceable>image</replaceable><filename>.wic</filename>).
16771 For information on how to create a partitioned image, see
16772 the
16773 "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-partitioned-images-using-wic'>Creating Partitioned Images Using Wic</ulink>"
16774 section in the Yocto Project Development Tasks Manual.
16775 For details on the kickstart file format, see the
16776 "<link linkend='ref-kickstart'>OpenEmbedded Kickstart (<filename>.wks</filename>) Reference</link>"
16777 Chapter.
16778 </para>
16779 </glossdef>
16780 </glossentry>
16781
16782 <glossentry id='var-WORKDIR'><glossterm>WORKDIR</glossterm>
16783 <info>
16784 WORKDIR[doc] = "The pathname of the working directory in which the OpenEmbedded build system builds a recipe. This directory is located within the TMPDIR directory structure and changes as different packages are built."
16785 </info>
16786 <glossdef>
16787 <para role="glossdeffirst">
16788 The pathname of the work directory in which the OpenEmbedded
16789 build system builds a recipe.
16790 This directory is located within the
16791 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
16792 directory structure and is specific to the recipe being
16793 built and the system for which it is being built.
16794 </para>
16795
16796 <para>
16797 The <filename>WORKDIR</filename> directory is defined as
16798 follows:
16799 <literallayout class='monospaced'>
16800 ${TMPDIR}/work/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}
16801 </literallayout>
16802 The actual directory depends on several things:
16803 <itemizedlist>
16804 <listitem><filename>TMPDIR</filename>:
16805 The top-level build output directory</listitem>
16806 <listitem><link linkend='var-MULTIMACH_TARGET_SYS'><filename>MULTIMACH_TARGET_SYS</filename></link>:
16807 The target system identifier</listitem>
16808 <listitem><link linkend='var-PN'><filename>PN</filename></link>:
16809 The recipe name</listitem>
16810 <listitem><link linkend='var-EXTENDPE'><filename>EXTENDPE</filename></link>:
16811 The epoch - (if
16812 <link linkend='var-PE'><filename>PE</filename></link>
16813 is not specified, which is usually the case for most
16814 recipes, then <filename>EXTENDPE</filename> is blank)</listitem>
16815 <listitem><link linkend='var-PV'><filename>PV</filename></link>:
16816 The recipe version</listitem>
16817 <listitem><link linkend='var-PR'><filename>PR</filename></link>:
16818 The recipe revision</listitem>
16819 </itemizedlist>
16820 </para>
16821
16822 <para>
16823 As an example, assume a Source Directory top-level folder
16824 name <filename>poky</filename>, a default Build Directory at
16825 <filename>poky/build</filename>, and a
16826 <filename>qemux86-poky-linux</filename> machine target
16827 system.
16828 Furthermore, suppose your recipe is named
16829 <filename>foo_1.3.0-r0.bb</filename>.
16830 In this case, the work directory the build system uses to
16831 build the package would be as follows:
16832 <literallayout class='monospaced'>
16833 poky/build/tmp/work/qemux86-poky-linux/foo/1.3.0-r0
16834 </literallayout>
16835 </para>
16836 </glossdef>
16837 </glossentry>
16838
16839 </glossdiv>
16840
16841 <glossdiv id='var-glossary-x'><title>X</title>
16842
16843 <glossentry id='var-XSERVER'><glossterm>XSERVER</glossterm>
16844 <info>
16845 XSERVER[doc] = "Specifies the packages that should be installed to provide an X server and drivers for the current machine."
16846 </info>
16847 <glossdef>
16848 <para role="glossdeffirst">
16849 Specifies the packages that should be installed to
16850 provide an X server and drivers for the current machine,
16851 assuming your image directly includes
16852 <filename>packagegroup-core-x11-xserver</filename> or,
16853 perhaps indirectly, includes "x11-base" in
16854 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>.
16855 </para>
16856
16857 <para>
16858 The default value of <filename>XSERVER</filename>, if not
16859 specified in the machine configuration, is
16860 "xserver-xorg xf86-video-fbdev xf86-input-evdev".
16861 </para>
16862 </glossdef>
16863 </glossentry>
16864
16865 </glossdiv>
16866
16867<!-- <glossdiv id='var-glossary-y'><title>Y</title>-->
16868<!-- </glossdiv>-->
16869
16870<!-- <glossdiv id='var-glossary-z'><title>Z</title>-->
16871<!-- </glossdiv>-->
16872
16873</glossary>
16874</chapter>
16875<!--
16876vim: expandtab tw=80 ts=4
16877-->
diff --git a/documentation/ref-manual/ref-varlocality.xml b/documentation/ref-manual/ref-varlocality.xml
deleted file mode 100644
index a2436fb310..0000000000
--- a/documentation/ref-manual/ref-varlocality.xml
+++ /dev/null
@@ -1,199 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='ref-varlocality'>
7 <title>Variable Context</title>
8
9 <para>
10 While you can use most variables in almost any context such as
11 <filename>.conf</filename>, <filename>.bbclass</filename>,
12 <filename>.inc</filename>, and <filename>.bb</filename> files,
13 some variables are often associated with a particular locality or context.
14 This chapter describes some common associations.
15 </para>
16
17 <section id='ref-varlocality-configuration'>
18 <title>Configuration</title>
19
20 <para>
21 The following subsections provide lists of variables whose context is
22 configuration: distribution, machine, and local.
23 </para>
24
25 <section id='ref-varlocality-config-distro'>
26 <title>Distribution (Distro)</title>
27
28 <para>
29 This section lists variables whose configuration context is the
30 distribution, or distro.
31 <itemizedlist>
32 <listitem><para><filename><link linkend='var-DISTRO'>DISTRO</link></filename></para></listitem>
33 <listitem><para><filename><link linkend='var-DISTRO_NAME'>DISTRO_NAME</link></filename>
34 </para></listitem>
35 <listitem><para><filename><link linkend='var-DISTRO_VERSION'>DISTRO_VERSION</link>
36 </filename></para></listitem>
37 <listitem><para><filename><link linkend='var-MAINTAINER'>MAINTAINER</link></filename>
38 </para></listitem>
39 <listitem><para><filename><link linkend='var-PACKAGE_CLASSES'>PACKAGE_CLASSES</link>
40 </filename></para></listitem>
41 <listitem><para><filename><link linkend='var-TARGET_OS'>TARGET_OS</link></filename>
42 </para></listitem>
43 <listitem><para><filename><link linkend='var-TARGET_FPU'>TARGET_FPU</link></filename>
44 </para></listitem>
45 <listitem><para><filename><link linkend='var-TCMODE'>TCMODE</link></filename>
46 </para></listitem>
47 <listitem><para><filename><link linkend='var-TCLIBC'>TCLIBC</link></filename>
48 </para></listitem>
49 </itemizedlist>
50 </para>
51 </section>
52
53 <section id='ref-varlocality-config-machine'>
54 <title>Machine</title>
55
56 <para>
57 This section lists variables whose configuration context is the
58 machine.
59 <itemizedlist>
60 <listitem><para><filename><link linkend='var-TARGET_ARCH'>TARGET_ARCH</link></filename>
61 </para></listitem>
62 <listitem><para><filename><link linkend='var-SERIAL_CONSOLES'>SERIAL_CONSOLES</link>
63 </filename></para></listitem>
64 <listitem><para><filename><link linkend='var-PACKAGE_EXTRA_ARCHS'>PACKAGE_EXTRA_ARCHS</link>
65 </filename></para></listitem>
66 <listitem><para><filename><link linkend='var-IMAGE_FSTYPES'>IMAGE_FSTYPES</link>
67 </filename></para></listitem>
68 <listitem><para><filename><link linkend='var-MACHINE_FEATURES'>MACHINE_FEATURES</link>
69 </filename></para></listitem>
70 <listitem><para><filename><link linkend='var-MACHINE_EXTRA_RDEPENDS'>MACHINE_EXTRA_RDEPENDS
71 </link></filename></para></listitem>
72 <listitem><para><filename><link linkend='var-MACHINE_EXTRA_RRECOMMENDS'>MACHINE_EXTRA_RRECOMMENDS
73 </link></filename></para></listitem>
74 <listitem><para><filename><link linkend='var-MACHINE_ESSENTIAL_EXTRA_RDEPENDS'>MACHINE_ESSENTIAL_EXTRA_RDEPENDS
75 </link></filename></para></listitem>
76 <listitem><para><filename><link linkend='var-MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS'>
77 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS</link></filename></para></listitem>
78 </itemizedlist>
79 </para>
80 </section>
81
82 <section id='ref-varlocality-config-local'>
83 <title>Local</title>
84
85 <para>
86 This section lists variables whose configuration context is the
87 local configuration through the <filename>local.conf</filename>
88 file.
89 <itemizedlist>
90 <listitem><para><filename><link linkend='var-DISTRO'>DISTRO</link></filename>
91 </para></listitem>
92 <listitem><para><filename><link linkend='var-MACHINE'>MACHINE</link></filename>
93 </para></listitem>
94 <listitem><para><filename><link linkend='var-DL_DIR'>DL_DIR</link></filename>
95 </para></listitem>
96 <listitem><para><filename><link linkend='var-BBFILES'>BBFILES</link></filename>
97 </para></listitem>
98 <listitem><para><filename><link linkend='var-EXTRA_IMAGE_FEATURES'>EXTRA_IMAGE_FEATURES
99 </link></filename></para></listitem>
100 <listitem><para><filename><link linkend='var-PACKAGE_CLASSES'>PACKAGE_CLASSES</link>
101 </filename></para></listitem>
102 <listitem><para><filename><link linkend='var-BB_NUMBER_THREADS'>BB_NUMBER_THREADS</link>
103 </filename></para></listitem>
104 <listitem><para><filename><link linkend='var-BBINCLUDELOGS'>BBINCLUDELOGS</link>
105 </filename></para></listitem>
106 <listitem><para><filename><link linkend='var-ENABLE_BINARY_LOCALE_GENERATION'>
107 ENABLE_BINARY_LOCALE_GENERATION</link></filename></para></listitem>
108 </itemizedlist>
109 </para>
110 </section>
111 </section>
112
113 <section id='ref-varlocality-recipes'>
114 <title>Recipes</title>
115
116 <para>
117 The following subsections provide lists of variables whose context is
118 recipes: required, dependencies, path, and extra build information.
119 </para>
120
121 <section id='ref-varlocality-recipe-required'>
122 <title>Required</title>
123
124 <para>
125 This section lists variables that are required for recipes.
126 <itemizedlist>
127 <listitem><para><filename><link linkend='var-LICENSE'>LICENSE</link>
128 </filename></para></listitem>
129 <listitem><para><filename><link linkend='var-LIC_FILES_CHKSUM'>LIC_FILES_CHKSUM</link>
130 </filename></para></listitem>
131 <listitem><para><filename><link linkend='var-SRC_URI'>SRC_URI</link></filename> - used
132 in recipes that fetch local or remote files.
133 </para></listitem>
134 </itemizedlist>
135 </para>
136 </section>
137
138 <section id='ref-varlocality-recipe-dependencies'>
139 <title>Dependencies</title>
140
141 <para>
142 This section lists variables that define recipe dependencies.
143 <itemizedlist>
144 <listitem><para><filename><link linkend='var-DEPENDS'>DEPENDS</link>
145 </filename></para></listitem>
146 <listitem><para><filename><link linkend='var-RDEPENDS'>RDEPENDS</link>
147 </filename></para></listitem>
148 <listitem><para><filename><link linkend='var-RRECOMMENDS'>RRECOMMENDS</link>
149 </filename></para></listitem>
150 <listitem><para><filename><link linkend='var-RCONFLICTS'>RCONFLICTS</link>
151 </filename></para></listitem>
152 <listitem><para><filename><link linkend='var-RREPLACES'>RREPLACES</link>
153 </filename></para></listitem>
154 </itemizedlist>
155 </para>
156 </section>
157
158 <section id='ref-varlocality-recipe-paths'>
159 <title>Paths</title>
160
161 <para>
162 This section lists variables that define recipe paths.
163 <itemizedlist>
164 <listitem><para><filename><link linkend='var-WORKDIR'>WORKDIR</link>
165 </filename></para></listitem>
166 <listitem><para><filename><link linkend='var-S'>S</link>
167 </filename></para></listitem>
168 <listitem><para><filename><link linkend='var-FILES'>FILES</link>
169 </filename></para></listitem>
170 </itemizedlist>
171 </para>
172 </section>
173
174 <section id='ref-varlocality-recipe-build'>
175 <title>Extra Build Information</title>
176
177 <para>
178 This section lists variables that define extra build information for recipes.
179 <itemizedlist>
180 <listitem><para><filename><link linkend='var-DEFAULT_PREFERENCE'>DEFAULT_PREFERENCE
181 </link></filename></para></listitem>
182 <listitem><para><filename><link linkend='var-EXTRA_OECMAKE'>EXTRA_OECMAKE</link>
183 </filename></para></listitem>
184 <listitem><para><filename><link linkend='var-EXTRA_OECONF'>EXTRA_OECONF</link>
185 </filename></para></listitem>
186 <listitem><para><filename><link linkend='var-EXTRA_OEMAKE'>EXTRA_OEMAKE</link>
187 </filename></para></listitem>
188 <listitem><para><filename><link linkend='var-PACKAGECONFIG_CONFARGS'>PACKAGECONFIG_CONFARGS</link>
189 </filename></para></listitem>
190 <listitem><para><filename><link linkend='var-PACKAGES'>PACKAGES</link></filename>
191 </para></listitem>
192 </itemizedlist>
193 </para>
194 </section>
195 </section>
196</chapter>
197<!--
198vim: expandtab tw=80 ts=4 spell spelllang=en_gb
199-->
diff --git a/documentation/ref-manual/resources.xml b/documentation/ref-manual/resources.xml
deleted file mode 100644
index 4899b2e599..0000000000
--- a/documentation/ref-manual/resources.xml
+++ /dev/null
@@ -1,298 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='resources'>
7<title>Contributions and Additional Information</title>
8
9<section id='resources-intro'>
10 <title>Introduction</title>
11 <para>
12 The Yocto Project team is happy for people to experiment with the
13 Yocto Project.
14 A number of places exist to find help if you run into difficulties
15 or find bugs.
16 This presents information about contributing and participating in
17 the Yocto Project.
18 </para>
19</section>
20
21<section id='resources-contributions'>
22 <title>Contributions</title>
23
24 <para>
25 The Yocto Project gladly accepts contributions.
26 You can submit changes to the project either by creating and sending
27 pull requests,
28 or by submitting patches through email.
29 For information on how to do both as well as information on how
30 to identify the maintainer for each area of code, see the
31 "<ulink url='&YOCTO_DOCS_DEV_URL;#how-to-submit-a-change'>Submitting a Change to the Yocto Project</ulink>"
32 section in the Yocto Project Development Tasks Manual.
33 </para>
34</section>
35
36<section id='resources-bugtracker'>
37 <title>Yocto Project Bugzilla</title>
38
39 <para>
40 The Yocto Project uses its own implementation of
41 <ulink url='&YOCTO_BUGZILLA_URL;'>Bugzilla</ulink> to
42 track defects (bugs).
43 Implementations of Bugzilla work well for group development because
44 they track bugs and code changes, can be used to communicate changes
45 and problems with developers, can be used to submit and review patches,
46 and can be used to manage quality assurance.
47 </para>
48
49 <para>
50 Sometimes it is helpful to submit, investigate, or track a bug against
51 the Yocto Project itself (e.g. when discovering an issue with some
52 component of the build system that acts contrary to the documentation
53 or your expectations).
54 </para>
55
56 <para>
57 A general procedure and guidelines exist for when you use Bugzilla to
58 submit a bug.
59 For information on how to use Bugzilla to submit a bug against the
60 Yocto Project, see the following:
61 <itemizedlist>
62 <listitem><para>
63 The
64 "<ulink url='&YOCTO_DOCS_DEV_URL;#submitting-a-defect-against-the-yocto-project'>Submitting a Defect Against the Yocto Project</ulink>"
65 section in the Yocto Project Development Tasks Manual.
66 </para></listitem>
67 <listitem><para>
68 The Yocto Project
69 <ulink url='&YOCTO_WIKI_URL;/wiki/Bugzilla_Configuration_and_Bug_Tracking'>Bugzilla wiki page</ulink>
70 </para></listitem>
71 </itemizedlist>
72 For information on Bugzilla in general, see
73 <ulink url='http://www.bugzilla.org/about/'></ulink>.
74 </para>
75</section>
76
77<section id='resources-mailinglist'>
78 <title>Mailing lists</title>
79
80 <para>
81 A number of mailing lists maintained by the Yocto Project exist
82 as well as related OpenEmbedded mailing lists for discussion,
83 patch submission and announcements.
84 To subscribe to one of the following mailing lists, click on the
85 appropriate URL in the following list and follow the instructions:
86 <itemizedlist>
87 <listitem><para><ulink url='&YOCTO_LISTS_URL;/listinfo/yocto'></ulink> -
88 General Yocto Project discussion mailing list. </para></listitem>
89 <listitem><para><ulink url='&OE_LISTS_URL;/listinfo/openembedded-core'></ulink> -
90 Discussion mailing list about OpenEmbedded-Core (the core metadata).</para></listitem>
91 <listitem><para><ulink url='&OE_LISTS_URL;/listinfo/openembedded-devel'></ulink> -
92 Discussion mailing list about OpenEmbedded.</para></listitem>
93 <listitem><para><ulink url='&OE_LISTS_URL;/listinfo/bitbake-devel'></ulink> -
94 Discussion mailing list about the
95 <link linkend='bitbake-term'>BitBake</link>
96 build tool.</para></listitem>
97 <listitem><para><ulink url='&YOCTO_LISTS_URL;/listinfo/poky'></ulink> -
98 Discussion mailing list about
99 <link linkend='poky'>Poky</link>.
100 </para></listitem>
101 <listitem><para><ulink url='&YOCTO_LISTS_URL;/listinfo/yocto-announce'></ulink> -
102 Mailing list to receive official Yocto Project release and milestone
103 announcements.</para></listitem>
104 </itemizedlist>
105 </para>
106 For more Yocto Project-related mailing lists, see the
107 <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink>.
108</section>
109
110<section id='resources-irc'>
111 <title>Internet Relay Chat (IRC)</title>
112
113 <para>
114 Two IRC channels on freenode are available for the Yocto Project and Poky discussions:
115 <itemizedlist>
116 <listitem><para><filename>#yocto</filename></para></listitem>
117 <listitem><para><filename>#poky</filename></para></listitem>
118 </itemizedlist>
119 </para>
120</section>
121
122<section id='resources-links-and-related-documentation'>
123 <title>Links and Related Documentation</title>
124
125 <para>
126 Here is a list of resources you might find helpful:
127 <itemizedlist>
128 <listitem><para>
129 <emphasis>
130 <ulink url='&YOCTO_HOME_URL;'>The Yocto Project website</ulink>:
131 </emphasis> The home site for the Yocto Project.
132 </para></listitem>
133 <listitem><para>
134 <emphasis>
135 <ulink url='&YOCTO_WIKI_URL;/wiki/Main_Page'>The Yocto Project Main Wiki Page</ulink>:
136 </emphasis>
137 The main wiki page for the Yocto Project.
138 This page contains information about project planning,
139 release engineering, QA &amp; automation, a reference
140 site map, and other resources related to the Yocto Project.
141 </para></listitem>
142 <listitem><para>
143 <emphasis>
144 <ulink url='&OE_HOME_URL;'>OpenEmbedded</ulink>:
145 </emphasis>
146 The build system used by the Yocto Project.
147 This project is the upstream, generic, embedded distribution
148 from which the Yocto Project derives its build system (Poky)
149 and to which it contributes.
150 </para></listitem>
151 <listitem><para>
152 <emphasis>
153 <ulink url='http://www.openembedded.org/wiki/BitBake'>
154 BitBake</ulink>:
155 </emphasis> The tool used to process metadata.
156 </para></listitem>
157 <listitem><para>
158 <emphasis>
159 <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>:
160 </emphasis>
161 A comprehensive guide to the BitBake tool.
162 If you want information on BitBake, see this manual.
163 </para></listitem>
164 <listitem><para>
165 <emphasis>
166 <ulink url='&YOCTO_DOCS_BRIEF_URL;'>Yocto Project Quick Build</ulink>:
167 </emphasis>
168 This short document lets you experience building an image using
169 the Yocto Project without having to understand any concepts or
170 details.
171 </para></listitem>
172 <listitem><para>
173 <emphasis>
174 <ulink url='&YOCTO_DOCS_OM_URL;'>Yocto Project Overview and Concepts Manual</ulink>:
175 </emphasis>
176 This manual provides overview and conceptual information
177 about the Yocto Project.
178 </para></listitem>
179 <listitem><para>
180 <emphasis>
181 <ulink url='&YOCTO_DOCS_DEV_URL;'>Yocto Project Development Tasks Manual</ulink>:
182 </emphasis>
183 This manual is a "how-to" guide that presents procedures
184 useful to both application and system developers who use the
185 Yocto Project.
186 </para></listitem>
187 <listitem><para>
188 <emphasis>
189 <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink>
190 manual:</emphasis>
191 This guide provides information that lets you get going
192 with the standard or extensible SDK.
193 An SDK, with its cross-development toolchains, allows you
194 to develop projects inside or outside of the Yocto Project
195 environment.
196 </para></listitem>
197 <listitem><para>
198 <emphasis>
199 <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>:
200 </emphasis>
201 This guide defines the structure for BSP components.
202 Having a commonly understood structure encourages
203 standardization.
204 </para></listitem>
205 <listitem><para>
206 <emphasis>
207 <ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;'>Yocto Project Linux Kernel Development Manual</ulink>:
208 </emphasis>
209 This manual describes how to work with Linux Yocto kernels as
210 well as provides a bit of conceptual information on the
211 construction of the Yocto Linux kernel tree.
212 </para></listitem>
213 <listitem><para>
214 <emphasis>
215 <ulink url='&YOCTO_DOCS_REF_URL;'>Yocto Project Reference Manual</ulink>:
216 </emphasis>
217 This manual provides reference material such as variable,
218 task, and class descriptions.
219 </para></listitem>
220 <listitem><para>
221 <emphasis>
222 <ulink url='&YOCTO_DOCS_MM_URL;'>Yocto Project Mega-Manual</ulink>:
223 </emphasis>
224 This manual is simply a single HTML file comprised of the
225 bulk of the Yocto Project manuals.
226 The Mega-Manual primarily exists as a vehicle by which you can
227 easily search for phrases and terms used in the Yocto Project
228 documentation set.
229 </para></listitem>
230 <listitem><para>
231 <emphasis>
232 <ulink url='&YOCTO_DOCS_PROF_URL;'>Yocto Project Profiling and Tracing Manual</ulink>:
233 </emphasis>
234 This manual presents a set of common and generally useful
235 tracing and profiling schemes along with their applications
236 (as appropriate) to each tool.
237 </para></listitem>
238 <listitem><para>
239 <emphasis>
240 <ulink url='&YOCTO_DOCS_TOAST_URL;'>Toaster User Manual</ulink>:
241 </emphasis>
242 This manual introduces and describes how to set up and use
243 Toaster.
244 Toaster is an Application Programming Interface (API) and
245 web-based interface to the
246 <link linkend='build-system-term'>OpenEmbedded Build System</link>,
247 which uses BitBake, that reports build information.
248 </para></listitem>
249 <listitem><para>
250 <emphasis>
251 <ulink url='&YOCTO_WIKI_URL;/wiki/FAQ'>FAQ</ulink>:
252 </emphasis>
253 A list of commonly asked questions and their answers.
254 </para></listitem>
255 <listitem><para>
256 <emphasis>Release Notes:</emphasis>
257 Features, updates and known issues for the current
258 release of the Yocto Project.
259 To access the Release Notes, go to the
260 <ulink url='&YOCTO_HOME_URL;/software-overview/downloads/'>Downloads</ulink>
261 page on the Yocto Project website and click on the
262 "RELEASE INFORMATION" link for the appropriate release.
263 </para></listitem>
264 <listitem><para>
265 <emphasis>
266 <ulink url='&YOCTO_BUGZILLA_URL;'>Bugzilla</ulink>:
267 </emphasis>
268 The bug tracking application the Yocto Project uses.
269 If you find problems with the Yocto Project, you should report
270 them using this application.
271 </para></listitem>
272 <listitem><para>
273 <emphasis>
274 <ulink url='&YOCTO_WIKI_URL;/wiki/Bugzilla_Configuration_and_Bug_Tracking'>Bugzilla Configuration and Bug Tracking Wiki Page</ulink>:
275 </emphasis>
276 Information on how to get set up and use the Yocto Project
277 implementation of Bugzilla for logging and tracking Yocto
278 Project defects.
279 </para></listitem>
280 <listitem><para>
281 <emphasis>Internet Relay Chat (IRC):</emphasis>
282 Two IRC channels on freenode are available
283 for Yocto Project and Poky discussions: <filename>#yocto</filename> and
284 <filename>#poky</filename>, respectively.
285 </para></listitem>
286 <listitem><para>
287 <emphasis>
288 <ulink url='http://wiki.qemu.org/Index.html'>Quick EMUlator (QEMU)</ulink>:
289 </emphasis>
290 An open-source machine emulator and virtualizer.
291 </para></listitem>
292 </itemizedlist>
293 </para>
294</section>
295</chapter>
296<!--
297vim: expandtab tw=80 ts=4
298-->
diff --git a/documentation/sdk-manual/sdk-appendix-customizing-standard.xml b/documentation/sdk-manual/sdk-appendix-customizing-standard.xml
deleted file mode 100644
index 3a6b4c8d82..0000000000
--- a/documentation/sdk-manual/sdk-appendix-customizing-standard.xml
+++ /dev/null
@@ -1,59 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<appendix id='sdk-appendix-customizing-standard'>
7
8<title>Customizing the Standard SDK</title>
9
10<para>
11 This appendix presents customizations you can apply to the standard SDK.
12</para>
13
14<section id='sdk-adding-individual-packages'>
15 <title>Adding Individual Packages to the Standard SDK</title>
16
17 <para>
18 When you build a standard SDK using the
19 <filename>bitbake -c populate_sdk</filename>, a default set of
20 packages is included in the resulting SDK.
21 The
22 <ulink url='&YOCTO_DOCS_REF_URL;#var-TOOLCHAIN_HOST_TASK'><filename>TOOLCHAIN_HOST_TASK</filename></ulink>
23 and
24 <ulink url='&YOCTO_DOCS_REF_URL;#var-TOOLCHAIN_TARGET_TASK'><filename>TOOLCHAIN_TARGET_TASK</filename></ulink>
25 variables control the set of packages adding to the SDK.
26 </para>
27
28 <para>
29 If you want to add individual packages to the toolchain that runs on
30 the host, simply add those packages to the
31 <filename>TOOLCHAIN_HOST_TASK</filename> variable.
32 Similarly, if you want to add packages to the default set that is
33 part of the toolchain that runs on the target, add the packages to the
34 <filename>TOOLCHAIN_TARGET_TASK</filename> variable.
35 </para>
36</section>
37
38<section id='adding-api-documentation-to-the-standard-sdk'>
39 <title>Adding API Documentation to the Standard SDK</title>
40
41 <para>
42 You can include API documentation as well as any other
43 documentation provided by recipes with the standard SDK by
44 adding "api-documentation" to the
45 <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></ulink>
46 variable:
47 <literallayout class='monospaced'>
48 DISTRO_FEATURES_append = " api-documentation"
49 </literallayout>
50 Setting this variable as shown here causes the OpenEmbedded build
51 system to build the documentation and then include it in the standard
52 SDK.
53 </para>
54</section>
55
56</appendix>
57<!--
58vim: expandtab tw=80 ts=4
59-->
diff --git a/documentation/sdk-manual/sdk-appendix-customizing.xml b/documentation/sdk-manual/sdk-appendix-customizing.xml
deleted file mode 100644
index 08054f8b79..0000000000
--- a/documentation/sdk-manual/sdk-appendix-customizing.xml
+++ /dev/null
@@ -1,515 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<appendix id='sdk-appendix-customizing'>
7
8<title>Customizing the Extensible SDK</title>
9
10<para>
11 This appendix describes customizations you can apply to the extensible SDK.
12</para>
13
14<section id='sdk-configuring-the-extensible-sdk'>
15 <title>Configuring the Extensible SDK</title>
16
17 <para>
18 The extensible SDK primarily consists of a pre-configured copy of
19 the OpenEmbedded build system from which it was produced.
20 Thus, the SDK's configuration is derived using that build system and
21 the filters shown in the following list.
22 When these filters are present, the OpenEmbedded build system applies
23 them against <filename>local.conf</filename> and
24 <filename>auto.conf</filename>:
25 <itemizedlist>
26 <listitem><para>
27 Variables whose values start with "/" are excluded since the
28 assumption is that those values are paths that are likely to
29 be specific to the
30 <ulink url='&YOCTO_DOCS_REF_URL;#hardware-build-system-term'>build host</ulink>.
31 </para></listitem>
32 <listitem><para>
33 Variables listed in
34 <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_LOCAL_CONF_BLACKLIST'><filename>SDK_LOCAL_CONF_BLACKLIST</filename></ulink>
35 are excluded.
36 These variables are not allowed through from the OpenEmbedded
37 build system configuration into the extensible SDK
38 configuration.
39 Typically, these variables are specific to the machine on
40 which the build system is running and could be problematic
41 as part of the extensible SDK configuration.</para>
42
43 <para>For a list of the variables excluded by default, see the
44 <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_LOCAL_CONF_BLACKLIST'><filename>SDK_LOCAL_CONF_BLACKLIST</filename></ulink>
45 in the glossary of the Yocto Project Reference Manual.
46 </para></listitem>
47 <listitem><para>
48 Variables listed in
49 <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_LOCAL_CONF_WHITELIST'><filename>SDK_LOCAL_CONF_WHITELIST</filename></ulink>
50 are included.
51 Including a variable in the value of
52 <filename>SDK_LOCAL_CONF_WHITELIST</filename> overrides either
53 of the previous two filters.
54 The default value is blank.
55 </para></listitem>
56 <listitem><para>
57 Classes inherited globally with
58 <ulink url='&YOCTO_DOCS_REF_URL;#var-INHERIT'><filename>INHERIT</filename></ulink>
59 that are listed in
60 <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_INHERIT_BLACKLIST'><filename>SDK_INHERIT_BLACKLIST</filename></ulink>
61 are disabled.
62 Using <filename>SDK_INHERIT_BLACKLIST</filename> to disable
63 these classes is the typical method to disable classes that
64 are problematic or unnecessary in the SDK context.
65 The default value blacklists the
66 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-buildhistory'><filename>buildhistory</filename></ulink>
67 and
68 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-icecc'><filename>icecc</filename></ulink>
69 classes.
70 </para></listitem>
71 </itemizedlist>
72 Additionally, the contents of <filename>conf/sdk-extra.conf</filename>,
73 when present, are appended to the end of
74 <filename>conf/local.conf</filename> within the produced SDK, without
75 any filtering.
76 The <filename>sdk-extra.conf</filename> file is particularly useful
77 if you want to set a variable value just for the SDK and not the
78 OpenEmbedded build system used to create the SDK.
79 </para>
80</section>
81
82<section id='adjusting-the-extensible-sdk-to-suit-your-build-hosts-setup'>
83 <title>Adjusting the Extensible SDK to Suit Your Build Host's Setup</title>
84
85 <para>
86 In most cases, the extensible SDK defaults should work with your
87 <ulink url='&YOCTO_DOCS_REF_URL;#hardware-build-system-term'>build host's</ulink>
88 setup.
89 However, some cases exist for which you might consider making
90 adjustments:
91 <itemizedlist>
92 <listitem><para>
93 If your SDK configuration inherits additional classes
94 using the
95 <ulink url='&YOCTO_DOCS_REF_URL;#var-INHERIT'><filename>INHERIT</filename></ulink>
96 variable and you do not need or want those classes enabled in
97 the SDK, you can blacklist them by adding them to the
98 <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_INHERIT_BLACKLIST'><filename>SDK_INHERIT_BLACKLIST</filename></ulink>
99 variable as described in the fourth bullet of the previous
100 section.
101 <note>
102 The default value of
103 <filename>SDK_INHERIT_BLACKLIST</filename> is set using
104 the "?=" operator.
105 Consequently, you will need to either define the entire
106 list by using the "=" operator, or you will need to append
107 a value using either "_append" or the "+=" operator.
108 You can learn more about these operators in the
109 "<ulink url='&YOCTO_DOCS_BB_URL;#basic-syntax'>Basic Syntax</ulink>"
110 section of the BitBake User Manual.
111 </note>.
112 </para></listitem>
113 <listitem><para>
114 If you have classes or recipes that add additional tasks to
115 the standard build flow (i.e. the tasks execute as the recipe
116 builds as opposed to being called explicitly), then you need
117 to do one of the following:
118 <itemizedlist>
119 <listitem><para>
120 After ensuring the tasks are
121 <ulink url='&YOCTO_DOCS_OM_URL;#shared-state-cache'>shared state</ulink>
122 tasks (i.e. the output of the task is saved to and
123 can be restored from the shared state cache) or
124 ensuring the tasks are able to be produced quickly from
125 a task that is a shared state task, add the task name
126 to the value of
127 <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_RECRDEP_TASKS'><filename>SDK_RECRDEP_TASKS</filename></ulink>.
128 </para></listitem>
129 <listitem><para>
130 Disable the tasks if they are added by a class and
131 you do not need the functionality the class provides
132 in the extensible SDK.
133 To disable the tasks, add the class to the
134 <filename>SDK_INHERIT_BLACKLIST</filename> variable
135 as described in the previous section.
136 </para></listitem>
137 </itemizedlist>
138 </para></listitem>
139 <listitem><para>
140 Generally, you want to have a shared state mirror set up so
141 users of the SDK can add additional items to the SDK after
142 installation without needing to build the items from source.
143 See the
144 "<link linkend='sdk-providing-additional-installable-extensible-sdk-content'>Providing Additional Installable Extensible SDK Content</link>"
145 section for information.
146 </para></listitem>
147 <listitem><para>
148 If you want users of the SDK to be able to easily update the
149 SDK, you need to set the
150 <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_UPDATE_URL'><filename>SDK_UPDATE_URL</filename></ulink>
151 variable.
152 For more information, see the
153 "<link linkend='sdk-providing-updates-to-the-extensible-sdk-after-installation'>Providing Updates to the Extensible SDK After Installation</link>"
154 section.
155 </para></listitem>
156 <listitem><para>
157 If you have adjusted the list of files and directories that
158 appear in
159 <ulink url='&YOCTO_DOCS_REF_URL;#var-COREBASE'><filename>COREBASE</filename></ulink>
160 (other than layers that are enabled through
161 <filename>bblayers.conf</filename>), then you must list these
162 files in
163 <ulink url='&YOCTO_DOCS_REF_URL;#var-COREBASE_FILES'><filename>COREBASE_FILES</filename></ulink>
164 so that the files are copied into the SDK.
165 </para></listitem>
166 <listitem><para>
167 If your OpenEmbedded build system setup uses a different
168 environment setup script other than
169 <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>,
170 then you must set
171 <ulink url='&YOCTO_DOCS_REF_URL;#var-OE_INIT_ENV_SCRIPT'><filename>OE_INIT_ENV_SCRIPT</filename></ulink>
172 to point to the environment setup script you use.
173 <note>
174 You must also reflect this change in the value used for the
175 <filename>COREBASE_FILES</filename> variable as previously
176 described.
177 </note>
178 </para></listitem>
179 </itemizedlist>
180 </para>
181</section>
182
183<section id='sdk-changing-the-sdk-installer-title'>
184 <title>Changing the Extensible SDK Installer Title</title>
185
186 <para>
187 You can change the displayed title for the SDK installer by setting
188 the
189 <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_TITLE'><filename>SDK_TITLE</filename></ulink>
190 variable and then rebuilding the the SDK installer.
191 For information on how to build an SDK installer, see the
192 "<link linkend='sdk-building-an-sdk-installer'>Building an SDK Installer</link>"
193 section.
194 </para>
195
196 <para>
197 By default, this title is derived from
198 <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO_NAME'><filename>DISTRO_NAME</filename></ulink>
199 when it is set.
200 If the <filename>DISTRO_NAME</filename> variable is not set, the title
201 is derived from the
202 <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO'><filename>DISTRO</filename></ulink>
203 variable.
204 </para>
205
206 <para>
207 The
208 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-populate-sdk-*'><filename>populate_sdk_base</filename></ulink>
209 class defines the default value of the <filename>SDK_TITLE</filename>
210 variable as follows:
211 <literallayout class='monospaced'>
212 SDK_TITLE ??= "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} SDK"
213 </literallayout>
214 </para>
215
216 <para>
217 While several ways exist to change this variable, an efficient method
218 is to set the variable in your distribution's configuration file.
219 Doing so creates an SDK installer title that applies across your
220 distribution.
221 As an example, assume you have your own layer for your distribution
222 named "meta-mydistro" and you are using the same type of file
223 hierarchy as does the default "poky" distribution.
224 If so, you could update the <filename>SDK_TITLE</filename> variable
225 in the
226 <filename>~/meta-mydistro/conf/distro/mydistro.conf</filename> file
227 using the following form:
228 <literallayout class='monospaced'>
229 SDK_TITLE = "<replaceable>your_title</replaceable>"
230 </literallayout>
231 </para>
232</section>
233
234<section id='sdk-providing-updates-to-the-extensible-sdk-after-installation'>
235 <title>Providing Updates to the Extensible SDK After Installation</title>
236
237 <para>
238 When you make changes to your configuration or to the metadata and
239 if you want those changes to be reflected in installed SDKs, you need
240 to perform additional steps.
241 These steps make it possible for anyone using the installed SDKs to
242 update the installed SDKs by using the
243 <filename>devtool sdk-update</filename> command:
244 <orderedlist>
245 <listitem><para>
246 Create a directory that can be shared over HTTP or HTTPS.
247 You can do this by setting up a web server such as an
248 <ulink url='https://en.wikipedia.org/wiki/Apache_HTTP_Server'>Apache HTTP Server</ulink>
249 or
250 <ulink url='https://en.wikipedia.org/wiki/Nginx'>Nginx</ulink>
251 server in the cloud to host the directory.
252 This directory must contain the published SDK.
253 </para></listitem>
254 <listitem><para>
255 Set the
256 <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_UPDATE_URL'><filename>SDK_UPDATE_URL</filename></ulink>
257 variable to point to the corresponding HTTP or HTTPS URL.
258 Setting this variable causes any SDK built to default to that
259 URL and thus, the user does not have to pass the URL to the
260 <filename>devtool sdk-update</filename> command as described
261 in the
262 "<link linkend='sdk-applying-updates-to-an-installed-extensible-sdk'>Applying Updates to an Installed Extensible SDK</link>"
263 section.
264 </para></listitem>
265 <listitem><para>
266 Build the extensible SDK normally (i.e., use the
267 <filename>bitbake -c populate_sdk_ext</filename> <replaceable>imagename</replaceable>
268 command).
269 </para></listitem>
270 <listitem><para>
271 Publish the SDK using the following command:
272 <literallayout class='monospaced'>
273 $ oe-publish-sdk <replaceable>some_path</replaceable>/sdk-installer.sh <replaceable>path_to_shared_http_directory</replaceable>
274 </literallayout>
275 You must repeat this step each time you rebuild the SDK
276 with changes that you want to make available through the
277 update mechanism.
278 </para></listitem>
279 </orderedlist>
280 </para>
281
282 <para>
283 Completing the above steps allows users of the existing installed
284 SDKs to simply run <filename>devtool sdk-update</filename> to
285 retrieve and apply the latest updates.
286 See the
287 "<link linkend='sdk-applying-updates-to-an-installed-extensible-sdk'>Applying Updates to an Installed Extensible SDK</link>"
288 section for further information.
289 </para>
290</section>
291
292<section id='sdk-changing-the-default-sdk-installation-directory'>
293 <title>Changing the Default SDK Installation Directory</title>
294
295 <para>
296 When you build the installer for the Extensible SDK, the default
297 installation directory for the SDK is based on the
298 <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO'><filename>DISTRO</filename></ulink>
299 and
300 <ulink url='&YOCTO_DOCS_REF_URL;#var-SDKEXTPATH'><filename>SDKEXTPATH</filename></ulink>
301 variables from within the
302 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-populate-sdk-*'><filename>populate_sdk_base</filename></ulink>
303 class as follows:
304 <literallayout class='monospaced'>
305 SDKEXTPATH ??= "~/${@d.getVar('DISTRO')}_sdk"
306 </literallayout>
307 You can change this default installation directory by specifically
308 setting the <filename>SDKEXTPATH</filename> variable.
309 </para>
310
311 <para>
312 While a number of ways exist through which you can set this variable,
313 the method that makes the most sense is to set the variable in your
314 distribution's configuration file.
315 Doing so creates an SDK installer default directory that applies
316 across your distribution.
317 As an example, assume you have your own layer for your distribution
318 named "meta-mydistro" and you are using the same type of file
319 hierarchy as does the default "poky" distribution.
320 If so, you could update the <filename>SDKEXTPATH</filename> variable
321 in the
322 <filename>~/meta-mydistro/conf/distro/mydistro.conf</filename> file
323 using the following form:
324 <literallayout class='monospaced'>
325 SDKEXTPATH = "<replaceable>some_path_for_your_installed_sdk</replaceable>"
326 </literallayout>
327 </para>
328
329 <para>
330 After building your installer, running it prompts the user for
331 acceptance of the
332 <replaceable>some_path_for_your_installed_sdk</replaceable> directory
333 as the default location to install the Extensible SDK.
334 </para>
335</section>
336
337<section id='sdk-providing-additional-installable-extensible-sdk-content'>
338 <title>Providing Additional Installable Extensible SDK Content</title>
339
340 <para>
341 If you want the users of an extensible SDK you build to be
342 able to add items to the SDK without requiring the users to build
343 the items from source, you need to do a number of things:
344 <orderedlist>
345 <listitem><para>
346 Ensure the additional items you want the user to be able to
347 install are already built:
348 <itemizedlist>
349 <listitem><para>
350 Build the items explicitly.
351 You could use one or more "meta" recipes that depend
352 on lists of other recipes.
353 </para></listitem>
354 <listitem><para>
355 Build the "world" target and set
356 <filename>EXCLUDE_FROM_WORLD_pn-</filename><replaceable>recipename</replaceable>
357 for the recipes you do not want built.
358 See the
359 <ulink url='&YOCTO_DOCS_REF_URL;#var-EXCLUDE_FROM_WORLD'><filename>EXCLUDE_FROM_WORLD</filename></ulink>
360 variable for additional information.
361 </para></listitem>
362 </itemizedlist>
363 </para></listitem>
364 <listitem><para>
365 Expose the <filename>sstate-cache</filename> directory
366 produced by the build.
367 Typically, you expose this directory by making it available
368 through an
369 <ulink url='https://en.wikipedia.org/wiki/Apache_HTTP_Server'>Apache HTTP Server</ulink>
370 or
371 <ulink url='https://en.wikipedia.org/wiki/Nginx'>Nginx</ulink>
372 server.
373 </para></listitem>
374 <listitem><para>
375 Set the appropriate configuration so that the produced SDK
376 knows how to find the configuration.
377 The variable you need to set is
378 <ulink url='&YOCTO_DOCS_REF_URL;#var-SSTATE_MIRRORS'><filename>SSTATE_MIRRORS</filename></ulink>:
379 <literallayout class='monospaced'>
380 SSTATE_MIRRORS = "file://.* http://<replaceable>example</replaceable>.com/<replaceable>some_path</replaceable>/sstate-cache/PATH"
381 </literallayout>
382 You can set the <filename>SSTATE_MIRRORS</filename> variable
383 in two different places:
384 <itemizedlist>
385 <listitem><para>
386 If the mirror value you are setting is appropriate to
387 be set for both the OpenEmbedded build system that is
388 actually building the SDK and the SDK itself (i.e. the
389 mirror is accessible in both places or it will fail
390 quickly on the OpenEmbedded build system side, and its
391 contents will not interfere with the build), then you
392 can set the variable in your
393 <filename>local.conf</filename> or custom distro
394 configuration file.
395 You can then "whitelist" the variable through
396 to the SDK by adding the following:
397 <literallayout class='monospaced'>
398 SDK_LOCAL_CONF_WHITELIST = "SSTATE_MIRRORS"
399 </literallayout>
400 </para></listitem>
401 <listitem><para>
402 Alternatively, if you just want to set the
403 <filename>SSTATE_MIRRORS</filename> variable's value
404 for the SDK alone, create a
405 <filename>conf/sdk-extra.conf</filename> file either in
406 your
407 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
408 or within any layer and put your
409 <filename>SSTATE_MIRRORS</filename> setting within
410 that file.
411 <note>
412 This second option is the safest option should
413 you have any doubts as to which method to use when
414 setting <filename>SSTATE_MIRRORS</filename>.
415 </note>
416 </para></listitem>
417 </itemizedlist>
418 </para></listitem>
419 </orderedlist>
420 </para>
421</section>
422
423<section id='sdk-minimizing-the-size-of-the-extensible-sdk-installer-download'>
424 <title>Minimizing the Size of the Extensible SDK Installer Download</title>
425
426 <para>
427 By default, the extensible SDK bundles the shared state artifacts for
428 everything needed to reconstruct the image for which the SDK was built.
429 This bundling can lead to an SDK installer file that is a Gigabyte or
430 more in size.
431 If the size of this file causes a problem, you can build an SDK that
432 has just enough in it to install and provide access to the
433 <filename>devtool command</filename> by setting the following in your
434 configuration:
435 <literallayout class='monospaced'>
436 SDK_EXT_TYPE = "minimal"
437 </literallayout>
438 Setting
439 <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_EXT_TYPE'><filename>SDK_EXT_TYPE</filename></ulink>
440 to "minimal" produces an SDK installer that is around 35 Mbytes in
441 size, which downloads and installs quickly.
442 You need to realize, though, that the minimal installer does not
443 install any libraries or tools out of the box.
444 These libraries and tools must be installed either "on the fly" or
445 through actions you perform using <filename>devtool</filename> or
446 explicitly with the <filename>devtool sdk-install</filename> command.
447 </para>
448
449 <para>
450 In most cases, when building a minimal SDK you need to also enable
451 bringing in the information on a wider range of packages produced by
452 the system.
453 Requiring this wider range of information is particularly true
454 so that <filename>devtool add</filename> is able to effectively map
455 dependencies it discovers in a source tree to the appropriate recipes.
456 Additionally, the information enables the
457 <filename>devtool search</filename> command to return useful results.
458 </para>
459
460 <para>
461 To facilitate this wider range of information, you would need to
462 set the following:
463 <literallayout class='monospaced'>
464 SDK_INCLUDE_PKGDATA = "1"
465 </literallayout>
466 See the
467 <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_INCLUDE_PKGDATA'><filename>SDK_INCLUDE_PKGDATA</filename></ulink>
468 variable for additional information.
469 </para>
470
471 <para>
472 Setting the <filename>SDK_INCLUDE_PKGDATA</filename> variable as
473 shown causes the "world" target to be built so that information
474 for all of the recipes included within it are available.
475 Having these recipes available increases build time significantly and
476 increases the size of the SDK installer by 30-80 Mbytes depending on
477 how many recipes are included in your configuration.
478 </para>
479
480 <para>
481 You can use
482 <filename>EXCLUDE_FROM_WORLD_pn-</filename><replaceable>recipename</replaceable>
483 for recipes you want to exclude.
484 However, it is assumed that you would need to be building the "world"
485 target if you want to provide additional items to the SDK.
486 Consequently, building for "world" should not represent undue
487 overhead in most cases.
488 <note>
489 If you set <filename>SDK_EXT_TYPE</filename> to "minimal",
490 then providing a shared state mirror is mandatory so that items
491 can be installed as needed.
492 See the
493 "<link linkend='sdk-providing-additional-installable-extensible-sdk-content'>Providing Additional Installable Extensible SDK Content</link>"
494 section for more information.
495 </note>
496 </para>
497
498 <para>
499 You can explicitly control whether or not to include the toolchain
500 when you build an SDK by setting the
501 <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_INCLUDE_TOOLCHAIN'><filename>SDK_INCLUDE_TOOLCHAIN</filename></ulink>
502 variable to "1".
503 In particular, it is useful to include the toolchain when you
504 have set <filename>SDK_EXT_TYPE</filename> to "minimal", which by
505 default, excludes the toolchain.
506 Also, it is helpful if you are building a small SDK for use with
507 an IDE or some
508 other tool where you do not want to take extra steps to install a
509 toolchain.
510 </para>
511</section>
512</appendix>
513<!--
514vim: expandtab tw=80 ts=4
515-->
diff --git a/documentation/sdk-manual/sdk-appendix-obtain.xml b/documentation/sdk-manual/sdk-appendix-obtain.xml
deleted file mode 100644
index de7f75e2bb..0000000000
--- a/documentation/sdk-manual/sdk-appendix-obtain.xml
+++ /dev/null
@@ -1,444 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<appendix id='sdk-appendix-obtain'>
7
8<title>Obtaining the SDK</title>
9
10<section id='sdk-locating-pre-built-sdk-installers'>
11 <title>Locating Pre-Built SDK Installers</title>
12
13 <para>
14 You can use existing, pre-built toolchains by locating and running
15 an SDK installer script that ships with the Yocto Project.
16 Using this method, you select and download an architecture-specific
17 SDK installer and then run the script to hand-install the
18 toolchain.
19 </para>
20
21 <para>
22 Follow these steps to locate and hand-install the toolchain:
23 <orderedlist>
24 <listitem><para>
25 <emphasis>Go to the Installers Directory:</emphasis>
26 Go to <ulink url='&YOCTO_TOOLCHAIN_DL_URL;'></ulink>
27 </para></listitem>
28 <listitem><para>
29 <emphasis>Open the Folder for Your Build Host:</emphasis>
30 Open the folder that matches your
31 <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>build host</ulink>
32 (i.e. <filename>i686</filename> for 32-bit machines or
33 <filename>x86_64</filename> for 64-bit machines).
34 </para></listitem>
35 <listitem><para>
36 <emphasis>Locate and Download the SDK Installer:</emphasis>
37 You need to find and download the installer appropriate for
38 your build host, target hardware, and image type.
39 </para>
40
41 <para>The installer files (<filename>*.sh</filename>) follow
42 this naming convention:
43 <literallayout class='monospaced'>
44 poky-glibc-<replaceable>host_system</replaceable>-core-image-<replaceable>type</replaceable>-<replaceable>arch</replaceable>-toolchain[-ext]-<replaceable>release</replaceable>.sh
45
46 Where:
47 <replaceable>host_system</replaceable> is a string representing your development system:
48 "i686" or "x86_64"
49
50 <replaceable>type</replaceable> is a string representing the image:
51 "sato" or "minimal"
52
53 <replaceable>arch</replaceable> is a string representing the target architecture:
54 "aarch64", "armv5e", "core2-64", "coretexa8hf-neon", "i586", "mips32r2",
55 "mips64", or "ppc7400"
56
57 <replaceable>release</replaceable> is the version of Yocto Project.
58
59 NOTE:
60 The standard SDK installer does not have the "-ext" string as
61 part of the filename.
62
63 </literallayout>
64 The toolchains provided by the Yocto Project are based off of
65 the <filename>core-image-sato</filename> and
66 <filename>core-image-minimal</filename> images and contain
67 libraries appropriate for developing against those images.
68 </para>
69
70 <para>For example, if your build host is a 64-bit x86 system
71 and you need an extended SDK for a 64-bit core2 target, go
72 into the <filename>x86_64</filename> folder and download the
73 following installer:
74 <literallayout class='monospaced'>
75 poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-&DISTRO;.sh
76 </literallayout>
77 </para></listitem>
78 <listitem><para>
79 <emphasis>Run the Installer:</emphasis>
80 Be sure you have execution privileges and run the installer.
81 Following is an example from the <filename>Downloads</filename>
82 directory:
83 <literallayout class='monospaced'>
84 $ ~/Downloads/poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-&DISTRO;.sh
85 </literallayout>
86 During execution of the script, you choose the root location
87 for the toolchain.
88 See the
89 "<link linkend='sdk-installed-standard-sdk-directory-structure'>Installed Standard SDK Directory Structure</link>"
90 section and the
91 "<link linkend='sdk-installed-extensible-sdk-directory-structure'>Installed Extensible SDK Directory Structure</link>"
92 section for more information.
93 </para></listitem>
94 </orderedlist>
95 </para>
96</section>
97
98<section id='sdk-building-an-sdk-installer'>
99 <title>Building an SDK Installer</title>
100
101 <para>
102 As an alternative to locating and downloading an SDK installer,
103 you can build the SDK installer.
104 Follow these steps:
105 <orderedlist>
106 <listitem><para>
107 <emphasis>Set Up the Build Environment:</emphasis>
108 Be sure you are set up to use BitBake in a shell.
109 See the
110 "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-preparing-the-build-host'>Preparing the Build Host</ulink>"
111 section in the Yocto Project Development Tasks Manual for
112 information on how to get a build host ready that is either a
113 native Linux machine or a machine that uses CROPS.
114 </para></listitem>
115 <listitem><para>
116 <emphasis>Clone the <filename>poky</filename> Repository:</emphasis>
117 You need to have a local copy of the Yocto Project
118 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
119 (i.e. a local <filename>poky</filename> repository).
120 See the
121 "<ulink url='&YOCTO_DOCS_DEV_URL;#cloning-the-poky-repository'>Cloning the <filename>poky</filename> Repository</ulink>"
122 and possibly the
123 "<ulink url='&YOCTO_DOCS_DEV_URL;#checking-out-by-branch-in-poky'>Checking Out by Branch in Poky</ulink>"
124 and
125 "<ulink url='&YOCTO_DOCS_DEV_URL;#checkout-out-by-tag-in-poky'>Checking Out by Tag in Poky</ulink>"
126 sections all in the Yocto Project Development Tasks Manual for
127 information on how to clone the <filename>poky</filename>
128 repository and check out the appropriate branch for your work.
129 </para></listitem>
130 <listitem><para>
131 <emphasis>Initialize the Build Environment:</emphasis>
132 While in the root directory of the Source Directory (i.e.
133 <filename>poky</filename>), run the
134 <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
135 environment setup script to define the OpenEmbedded
136 build environment on your build host.
137 <literallayout class='monospaced'>
138 $ source &OE_INIT_FILE;
139 </literallayout>
140 Among other things, the script creates the
141 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>,
142 which is <filename>build</filename> in this case
143 and is located in the Source Directory.
144 After the script runs, your current working directory
145 is set to the <filename>build</filename> directory.
146 </para></listitem>
147 <listitem><para>
148 <emphasis>Make Sure You Are Building an Installer for the Correct Machine:</emphasis>
149 Check to be sure that your
150 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
151 variable in the <filename>local.conf</filename> file in your
152 Build Directory matches the architecture for which you are
153 building.
154 </para></listitem>
155 <listitem><para>
156 <emphasis>Make Sure Your SDK Machine is Correctly Set:</emphasis>
157 If you are building a toolchain designed to run on an
158 architecture that differs from your current development host
159 machine (i.e. the build host), be sure that the
160 <ulink url='&YOCTO_DOCS_REF_URL;#var-SDKMACHINE'><filename>SDKMACHINE</filename></ulink>
161 variable in the <filename>local.conf</filename> file in your
162 Build Directory is correctly set.
163 <note>
164 If you are building an SDK installer for the Extensible
165 SDK, the <filename>SDKMACHINE</filename> value must be
166 set for the architecture of the machine you are using to
167 build the installer.
168 If <filename>SDKMACHINE</filename> is not set appropriately,
169 the build fails and provides an error message similar to
170 the following:
171 <literallayout class='monospaced'>
172 The extensible SDK can currently only be built for the same architecture as the machine being built on - SDK_ARCH is
173 set to i686 (likely via setting SDKMACHINE) which is different from the architecture of the build machine (x86_64).
174 Unable to continue.
175 </literallayout>
176 </note>
177 </para></listitem>
178 <listitem><para>
179 <emphasis>Build the SDK Installer:</emphasis>
180 To build the SDK installer for a standard SDK and populate
181 the SDK image, use the following command form.
182 Be sure to replace <replaceable>image</replaceable> with
183 an image (e.g. "core-image-sato"):
184 <literallayout class='monospaced'>
185 $ bitbake <replaceable>image</replaceable> -c populate_sdk
186 </literallayout>
187 You can do the same for the extensible SDK using this command
188 form:
189 <literallayout class='monospaced'>
190 $ bitbake <replaceable>image</replaceable> -c populate_sdk_ext
191 </literallayout>
192 These commands produce an SDK installer that contains the
193 sysroot that matches your target root filesystem.</para>
194
195 <para>When the <filename>bitbake</filename> command completes,
196 the SDK installer will be in
197 <filename>tmp/deploy/sdk</filename> in the Build Directory.
198 <note><title>Notes</title>
199 <itemizedlist>
200 <listitem><para>
201 By default, the previous BitBake command does not
202 build static binaries.
203 If you want to use the toolchain to build these
204 types of libraries, you need to be sure your SDK
205 has the appropriate static development libraries.
206 Use the
207 <ulink url='&YOCTO_DOCS_REF_URL;#var-TOOLCHAIN_TARGET_TASK'><filename>TOOLCHAIN_TARGET_TASK</filename></ulink>
208 variable inside your <filename>local.conf</filename>
209 file before building the SDK installer.
210 Doing so ensures that the eventual SDK installation
211 process installs the appropriate library packages
212 as part of the SDK.
213 Following is an example using
214 <filename>libc</filename> static development
215 libraries:
216 <literallayout class='monospaced'>
217 TOOLCHAIN_TARGET_TASK_append = " libc-staticdev"
218 </literallayout>
219 </para></listitem>
220 </itemizedlist>
221 </note>
222 </para></listitem>
223 <listitem><para>
224 <emphasis>Run the Installer:</emphasis>
225 You can now run the SDK installer from
226 <filename>tmp/deploy/sdk</filename> in the Build Directory.
227 Following is an example:
228 <literallayout class='monospaced'>
229 $ cd ~/poky/build/tmp/deploy/sdk
230 $ ./poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-&DISTRO;.sh
231 </literallayout>
232 During execution of the script, you choose the root location
233 for the toolchain.
234 See the
235 "<link linkend='sdk-installed-standard-sdk-directory-structure'>Installed Standard SDK Directory Structure</link>"
236 section and the
237 "<link linkend='sdk-installed-extensible-sdk-directory-structure'>Installed Extensible SDK Directory Structure</link>"
238 section for more information.
239 </para></listitem>
240 </orderedlist>
241 </para>
242</section>
243
244<section id='sdk-extracting-the-root-filesystem'>
245 <title>Extracting the Root Filesystem</title>
246
247 <para>
248 After installing the toolchain, for some use cases you
249 might need to separately extract a root filesystem:
250 <itemizedlist>
251 <listitem><para>
252 You want to boot the image using NFS.
253 </para></listitem>
254 <listitem><para>
255 You want to use the root filesystem as the
256 target sysroot.
257 </para></listitem>
258 <listitem><para>
259 You want to develop your target application
260 using the root filesystem as the target sysroot.
261 </para></listitem>
262 </itemizedlist>
263 </para>
264
265 <para>
266 Follow these steps to extract the root filesystem:
267 <orderedlist>
268 <listitem><para>
269 <emphasis>Locate and Download the Tarball for the Pre-Built
270 Root Filesystem Image File:</emphasis>
271 You need to find and download the root filesystem image
272 file that is appropriate for your target system.
273 These files are kept in machine-specific folders in the
274 <ulink url='&YOCTO_DL_URL;/releases/yocto/yocto-&DISTRO;/machines/'>Index of Releases</ulink>
275 in the "machines" directory.</para>
276
277 <para>The machine-specific folders of the "machines" directory
278 contain tarballs (<filename>*.tar.bz2</filename>) for supported
279 machines.
280 These directories also contain flattened root filesystem
281 image files (<filename>*.ext4</filename>), which you can use
282 with QEMU directly.</para>
283
284 <para>The pre-built root filesystem image files
285 follow these naming conventions:
286 <literallayout class='monospaced'>
287<!--
288 core-image-<replaceable>profile</replaceable>-<replaceable>arch</replaceable>-<replaceable>date_time</replaceable>.rootfs.tar.bz2
289-->
290 core-image-<replaceable>profile</replaceable>-<replaceable>arch</replaceable>.tar.bz2
291
292 Where:
293 <replaceable>profile</replaceable> is the filesystem image's profile:
294 lsb, lsb-dev, lsb-sdk, minimal, minimal-dev, minimal-initramfs,
295 sato, sato-dev, sato-sdk, sato-sdk-ptest. For information on
296 these types of image profiles, see the "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>" chapter in
297 the Yocto Project Reference Manual.
298
299 <replaceable>arch</replaceable> is a string representing the target architecture:
300 beaglebone-yocto, beaglebone-yocto-lsb, edgerouter, edgerouter-lsb,
301 genericx86, genericx86-64, genericx86-64-lsb, genericx86-lsb and qemu*.
302
303<!-->
304 <replaceable>date_time</replaceable> is a date and time stamp.
305-->
306
307 </literallayout>
308 The root filesystems provided by the Yocto Project are based
309 off of the <filename>core-image-sato</filename> and
310 <filename>core-image-minimal</filename> images.
311 </para>
312
313 <para>For example, if you plan on using a BeagleBone device
314 as your target hardware and your image is a
315 <filename>core-image-sato-sdk</filename>
316 image, you can download the following file:
317 <literallayout class='monospaced'>
318 core-image-sato-sdk-beaglebone-yocto.tar.bz2
319 </literallayout>
320 </para></listitem>
321 <listitem><para>
322 <emphasis>Initialize the Cross-Development Environment:</emphasis>
323 You must <filename>source</filename> the cross-development
324 environment setup script to establish necessary environment
325 variables.</para>
326
327 <para>This script is located in the top-level directory in
328 which you installed the toolchain (e.g.
329 <filename>poky_sdk</filename>).</para>
330
331 <para>Following is an example based on the toolchain installed
332 in the
333 "<link linkend='sdk-locating-pre-built-sdk-installers'>Locating Pre-Built SDK Installers</link>"
334 section:
335 <literallayout class='monospaced'>
336 $ source ~/poky_sdk/environment-setup-core2-64-poky-linux
337 </literallayout>
338 </para></listitem>
339 <listitem><para>
340 <emphasis>Extract the Root Filesystem:</emphasis>
341 Use the <filename>runqemu-extract-sdk</filename> command
342 and provide the root filesystem image.</para>
343
344 <para>Following is an example command that extracts the root
345 filesystem from a previously built root filesystem image that
346 was downloaded from the
347 <ulink url='&YOCTO_DOCS_OM_URL;#index-downloads'>Index of Releases</ulink>.
348 This command extracts the root filesystem into the
349 <filename>core2-64-sato</filename> directory:
350 <literallayout class='monospaced'>
351 $ runqemu-extract-sdk ~/Downloads/core-image-sato-sdk-beaglebone-yocto.tar.bz2 ~/beaglebone-sato
352 </literallayout>
353 You could now point to the target sysroot at
354 <filename>beablebone-sato</filename>.
355 </para></listitem>
356 </orderedlist>
357 </para>
358</section>
359
360<section id='sdk-installed-standard-sdk-directory-structure'>
361 <title>Installed Standard SDK Directory Structure</title>
362
363 <para>
364 The following figure shows the resulting directory structure after
365 you install the Standard SDK by running the <filename>*.sh</filename>
366 SDK installation script:
367 </para>
368
369 <para>
370 <imagedata fileref="figures/sdk-installed-standard-sdk-directory.png" scale="80" align="center" />
371 </para>
372
373 <para>
374 The installed SDK consists of an environment setup script for the SDK,
375 a configuration file for the target, a version file for the target,
376 and the root filesystem (<filename>sysroots</filename>) needed to
377 develop objects for the target system.
378 </para>
379
380 <para>
381 Within the figure, italicized text is used to indicate replaceable
382 portions of the file or directory name.
383 For example,
384 <replaceable>install_dir</replaceable>/<replaceable>version</replaceable>
385 is the directory where the SDK is installed.
386 By default, this directory is <filename>/opt/poky/</filename>.
387 And, <replaceable>version</replaceable> represents the specific
388 snapshot of the SDK (e.g. <filename>&DISTRO;</filename>).
389 Furthermore, <replaceable>target</replaceable> represents the target
390 architecture (e.g. <filename>i586</filename>) and
391 <replaceable>host</replaceable> represents the development system's
392 architecture (e.g. <filename>x86_64</filename>).
393 Thus, the complete names of the two directories within the
394 <filename>sysroots</filename> could be
395 <filename>i586-poky-linux</filename> and
396 <filename>x86_64-pokysdk-linux</filename> for the target and host,
397 respectively.
398 </para>
399</section>
400
401<section id='sdk-installed-extensible-sdk-directory-structure'>
402 <title>Installed Extensible SDK Directory Structure</title>
403
404 <para>
405 The following figure shows the resulting directory structure after
406 you install the Extensible SDK by running the <filename>*.sh</filename>
407 SDK installation script:
408 </para>
409
410 <para>
411 <imagedata fileref="figures/sdk-installed-extensible-sdk-directory.png" scale="80" align="center" />
412 </para>
413
414 <para>
415 The installed directory structure for the extensible SDK is quite
416 different than the installed structure for the standard SDK.
417 The extensible SDK does not separate host and target parts in the
418 same manner as does the standard SDK.
419 The extensible SDK uses an embedded copy of the OpenEmbedded
420 build system, which has its own sysroots.
421 </para>
422
423 <para>
424 Of note in the directory structure are an environment setup script
425 for the SDK, a configuration file for the target, a version file for
426 the target, and log files for the OpenEmbedded build system
427 preparation script run by the installer and BitBake.
428 </para>
429
430 <para>
431 Within the figure, italicized text is used to indicate replaceable
432 portions of the file or directory name.
433 For example,
434 <replaceable>install_dir</replaceable> is the directory where the SDK
435 is installed, which is <filename>poky_sdk</filename> by default, and
436 <replaceable>target</replaceable> represents the target
437 architecture (e.g. <filename>i586</filename>).
438 </para>
439</section>
440
441</appendix>
442<!--
443vim: expandtab tw=80 ts=4
444-->
diff --git a/documentation/sdk-manual/sdk-extensible.xml b/documentation/sdk-manual/sdk-extensible.xml
deleted file mode 100644
index a73a07a7b9..0000000000
--- a/documentation/sdk-manual/sdk-extensible.xml
+++ /dev/null
@@ -1,1847 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='sdk-extensible'>
7
8 <title>Using the Extensible SDK</title>
9
10 <para>
11 This chapter describes the extensible SDK and how to install it.
12 Information covers the pieces of the SDK, how to install it, and
13 presents a look at using the <filename>devtool</filename>
14 functionality.
15 The extensible SDK makes it easy to add new applications and libraries
16 to an image, modify the source for an existing component, test
17 changes on the target hardware, and ease integration into the rest of
18 the
19 <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>.
20 <note>
21 For a side-by-side comparison of main features supported for an
22 extensible SDK as compared to a standard SDK, see the
23 "<link linkend='sdk-manual-intro'>Introduction</link>"
24 section.
25 </note>
26 </para>
27
28 <para>
29 In addition to the functionality available through
30 <filename>devtool</filename>, you can alternatively make use of the
31 toolchain directly, for example from Makefile and Autotools.
32 See the
33 "<link linkend='sdk-working-projects'>Using the SDK Toolchain Directly</link>"
34 chapter for more information.
35 </para>
36
37 <section id='sdk-extensible-sdk-intro'>
38 <title>Why use the Extensible SDK and What is in It?</title>
39
40 <para>
41 The extensible SDK provides a cross-development toolchain and
42 libraries tailored to the contents of a specific image.
43 You would use the Extensible SDK if you want a toolchain experience
44 supplemented with the powerful set of <filename>devtool</filename>
45 commands tailored for the Yocto Project environment.
46 </para>
47
48 <para>
49 The installed extensible SDK consists of several files and
50 directories.
51 Basically, it contains an SDK environment setup script, some
52 configuration files, an internal build system, and the
53 <filename>devtool</filename> functionality.
54 </para>
55 </section>
56
57 <section id='sdk-installing-the-extensible-sdk'>
58 <title>Installing the Extensible SDK</title>
59
60 <para>
61 The first thing you need to do is install the SDK on your
62 <ulink url='&YOCTO_DOCS_REF_URL;#hardware-build-system-term'>Build Host</ulink>
63 by running the <filename>*.sh</filename> installation script.
64 </para>
65
66 <para>
67 You can download a tarball installer, which includes the
68 pre-built toolchain, the <filename>runqemu</filename>
69 script, the internal build system, <filename>devtool</filename>,
70 and support files from the appropriate
71 <ulink url='&YOCTO_TOOLCHAIN_DL_URL;'>toolchain</ulink>
72 directory within the Index of Releases.
73 Toolchains are available for several 32-bit and 64-bit
74 architectures with the <filename>x86_64</filename> directories,
75 respectively.
76 The toolchains the Yocto Project provides are based off the
77 <filename>core-image-sato</filename> and
78 <filename>core-image-minimal</filename> images and contain
79 libraries appropriate for developing against that image.
80 </para>
81
82 <para>
83 The names of the tarball installer scripts are such that a
84 string representing the host system appears first in the
85 filename and then is immediately followed by a string
86 representing the target architecture.
87 An extensible SDK has the string "-ext" as part of the name.
88 Following is the general form:
89 <literallayout class='monospaced'>
90 poky-glibc-<replaceable>host_system</replaceable>-<replaceable>image_type</replaceable>-<replaceable>arch</replaceable>-toolchain-ext-<replaceable>release_version</replaceable>.sh
91
92 Where:
93 <replaceable>host_system</replaceable> is a string representing your development system:
94
95 i686 or x86_64.
96
97 <replaceable>image_type</replaceable> is the image for which the SDK was built:
98
99 core-image-sato or core-image-minimal
100
101 <replaceable>arch</replaceable> is a string representing the tuned target architecture:
102
103 aarch64, armv5e, core2-64, i586, mips32r2, mips64, ppc7400, or cortexa8hf-neon
104
105 <replaceable>release_version</replaceable> is a string representing the release number of the Yocto Project:
106
107 &DISTRO;, &DISTRO;+snapshot
108 </literallayout>
109 For example, the following SDK installer is for a 64-bit
110 development host system and a i586-tuned target architecture
111 based off the SDK for <filename>core-image-sato</filename> and
112 using the current &DISTRO; snapshot:
113 <literallayout class='monospaced'>
114 poky-glibc-x86_64-core-image-sato-i586-toolchain-ext-&DISTRO;.sh
115 </literallayout>
116 <note>
117 As an alternative to downloading an SDK, you can build the
118 SDK installer.
119 For information on building the installer, see the
120 "<link linkend='sdk-building-an-sdk-installer'>Building an SDK Installer</link>"
121 section.
122 </note>
123 </para>
124
125 <para>
126 The SDK and toolchains are self-contained and by default are
127 installed into the <filename>poky_sdk</filename> folder in your
128 home directory.
129 You can choose to install the extensible SDK in any location when
130 you run the installer.
131 However, because files need to be written under that directory
132 during the normal course of operation, the location you choose
133 for installation must be writable for whichever
134 users need to use the SDK.
135 </para>
136
137 <para>
138 The following command shows how to run the installer given a
139 toolchain tarball for a 64-bit x86 development host system and
140 a 64-bit x86 target architecture.
141 The example assumes the SDK installer is located in
142 <filename>~/Downloads/</filename> and has execution rights.
143 <note>
144 If you do not have write permissions for the directory
145 into which you are installing the SDK, the installer
146 notifies you and exits.
147 For that case, set up the proper permissions in the directory
148 and run the installer again.
149 </note>
150 <literallayout class='monospaced'>
151 $ ./Downloads/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.5.sh
152 Poky (Yocto Project Reference Distro) Extensible SDK installer version 2.5
153 ==========================================================================
154 Enter target directory for SDK (default: ~/poky_sdk):
155 You are about to install the SDK to "/home/scottrif/poky_sdk". Proceed [Y/n]? Y
156 Extracting SDK..............done
157 Setting it up...
158 Extracting buildtools...
159 Preparing build system...
160 Parsing recipes: 100% |##################################################################| Time: 0:00:52
161 Initialising tasks: 100% |###############################################################| Time: 0:00:00
162 Checking sstate mirror object availability: 100% |#######################################| Time: 0:00:00
163 Loading cache: 100% |####################################################################| Time: 0:00:00
164 Initialising tasks: 100% |###############################################################| Time: 0:00:00
165 done
166 SDK has been successfully set up and is ready to be used.
167 Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.
168 $ . /home/scottrif/poky_sdk/environment-setup-core2-64-poky-linux
169
170 </literallayout>
171 </para>
172 </section>
173
174 <section id='sdk-running-the-extensible-sdk-environment-setup-script'>
175 <title>Running the Extensible SDK Environment Setup Script</title>
176
177 <para>
178 Once you have the SDK installed, you must run the SDK environment
179 setup script before you can actually use the SDK.
180 This setup script resides in the directory you chose when you
181 installed the SDK, which is either the default
182 <filename>poky_sdk</filename> directory or the directory you
183 chose during installation.
184 </para>
185
186 <para>
187 Before running the script, be sure it is the one that matches the
188 architecture for which you are developing.
189 Environment setup scripts begin with the string
190 "<filename>environment-setup</filename>" and include as part of
191 their name the tuned target architecture.
192 As an example, the following commands set the working directory
193 to where the SDK was installed and then source the environment
194 setup script.
195 In this example, the setup script is for an IA-based
196 target machine using i586 tuning:
197 <literallayout class='monospaced'>
198 $ cd /home/scottrif/poky_sdk
199 $ source environment-setup-core2-64-poky-linux
200 SDK environment now set up; additionally you may now run devtool to perform development tasks.
201 Run devtool --help for further details.
202 </literallayout>
203 Running the setup script defines many environment variables needed
204 in order to use the SDK (e.g. <filename>PATH</filename>,
205 <ulink url='&YOCTO_DOCS_REF_URL;#var-CC'><filename>CC</filename></ulink>,
206 <ulink url='&YOCTO_DOCS_REF_URL;#var-LD'><filename>LD</filename></ulink>,
207 and so forth).
208 If you want to see all the environment variables the script
209 exports, examine the installation file itself.
210 </para>
211 </section>
212
213 <section id='using-devtool-in-your-sdk-workflow'>
214 <title>Using <filename>devtool</filename> in Your SDK Workflow</title>
215
216 <para>
217 The cornerstone of the extensible SDK is a command-line tool
218 called <filename>devtool</filename>.
219 This tool provides a number of features that help
220 you build, test and package software within the extensible SDK, and
221 optionally integrate it into an image built by the OpenEmbedded
222 build system.
223 <note><title>Tip</title>
224 The use of <filename>devtool</filename> is not limited to
225 the extensible SDK.
226 You can use <filename>devtool</filename> to help you easily
227 develop any project whose build output must be part of an
228 image built using the build system.
229 </note>
230 </para>
231
232 <para>
233 The <filename>devtool</filename> command line is organized
234 similarly to
235 <ulink url='&YOCTO_DOCS_OM_URL;#git'>Git</ulink> in that it
236 has a number of sub-commands for each function.
237 You can run <filename>devtool --help</filename> to see all the
238 commands.
239 <note>
240 See the
241 "<ulink url='&YOCTO_DOCS_REF_URL;#ref-devtool-reference'><filename>devtool</filename>&nbsp;Quick Reference</ulink>"
242 in the Yocto Project Reference Manual for a
243 <filename>devtool</filename> quick reference.
244 </note>
245 </para>
246
247 <para>
248 Three <filename>devtool</filename> subcommands exist that provide
249 entry-points into development:
250 <itemizedlist>
251 <listitem><para>
252 <emphasis><filename>devtool add</filename></emphasis>:
253 Assists in adding new software to be built.
254 </para></listitem>
255 <listitem><para>
256 <emphasis><filename>devtool modify</filename></emphasis>:
257 Sets up an environment to enable you to modify the source of
258 an existing component.
259 </para></listitem>
260 <listitem><para>
261 <emphasis><filename>devtool upgrade</filename></emphasis>:
262 Updates an existing recipe so that you can build it for
263 an updated set of source files.
264 </para></listitem>
265 </itemizedlist>
266 As with the build system, "recipes" represent software packages
267 within <filename>devtool</filename>.
268 When you use <filename>devtool add</filename>, a recipe is
269 automatically created.
270 When you use <filename>devtool modify</filename>, the specified
271 existing recipe is used in order to determine where to get the
272 source code and how to patch it.
273 In both cases, an environment is set up so that when you build the
274 recipe a source tree that is under your control is used in order to
275 allow you to make changes to the source as desired.
276 By default, new recipes and the source go into a "workspace"
277 directory under the SDK.
278 </para>
279
280 <para>
281 The remainder of this section presents the
282 <filename>devtool add</filename>,
283 <filename>devtool modify</filename>, and
284 <filename>devtool upgrade</filename> workflows.
285 </para>
286
287 <section id='sdk-use-devtool-to-add-an-application'>
288 <title>Use <filename>devtool add</filename> to Add an Application</title>
289
290 <para>
291 The <filename>devtool add</filename> command generates
292 a new recipe based on existing source code.
293 This command takes advantage of the
294 <ulink url='&YOCTO_DOCS_REF_URL;#devtool-the-workspace-layer-structure'>workspace</ulink>
295 layer that many <filename>devtool</filename> commands
296 use.
297 The command is flexible enough to allow you to extract source
298 code into both the workspace or a separate local Git repository
299 and to use existing code that does not need to be extracted.
300 </para>
301
302 <para>
303 Depending on your particular scenario, the arguments and options
304 you use with <filename>devtool add</filename> form different
305 combinations.
306 The following diagram shows common development flows
307 you would use with the <filename>devtool add</filename>
308 command:
309 </para>
310
311 <para>
312 <imagedata fileref="figures/sdk-devtool-add-flow.png" align="center" />
313 </para>
314
315 <para>
316 <orderedlist>
317 <listitem><para><emphasis>Generating the New Recipe</emphasis>:
318 The top part of the flow shows three scenarios by which
319 you could use <filename>devtool add</filename> to
320 generate a recipe based on existing source code.</para>
321
322 <para>In a shared development environment, it is
323 typical for other developers to be responsible for
324 various areas of source code.
325 As a developer, you are probably interested in using
326 that source code as part of your development within
327 the Yocto Project.
328 All you need is access to the code, a recipe, and a
329 controlled area in which to do your work.</para>
330
331 <para>Within the diagram, three possible scenarios
332 feed into the <filename>devtool add</filename> workflow:
333 <itemizedlist>
334 <listitem><para>
335 <emphasis>Left</emphasis>:
336 The left scenario in the figure represents a
337 common situation where the source code does not
338 exist locally and needs to be extracted.
339 In this situation, the source code is extracted
340 to the default workspace - you do not
341 want the files in some specific location
342 outside of the workspace.
343 Thus, everything you need will be located in
344 the workspace:
345 <literallayout class='monospaced'>
346 $ devtool add <replaceable>recipe fetchuri</replaceable>
347 </literallayout>
348 With this command, <filename>devtool</filename>
349 extracts the upstream source files into a local
350 Git repository within the
351 <filename>sources</filename> folder.
352 The command then creates a recipe named
353 <replaceable>recipe</replaceable> and a
354 corresponding append file in the workspace.
355 If you do not provide
356 <replaceable>recipe</replaceable>, the command
357 makes an attempt to determine the recipe name.
358 </para></listitem>
359 <listitem><para>
360 <emphasis>Middle</emphasis>:
361 The middle scenario in the figure also
362 represents a situation where the source code
363 does not exist locally.
364 In this case, the code is again upstream
365 and needs to be extracted to some
366 local area - this time outside of the default
367 workspace.
368 <note>
369 If required, <filename>devtool</filename>
370 always creates
371 a Git repository locally during the
372 extraction.
373 </note>
374 Furthermore, the first positional argument
375 <replaceable>srctree</replaceable> in this
376 case identifies where the
377 <filename>devtool add</filename> command
378 will locate the extracted code outside of the
379 workspace.
380 You need to specify an empty directory:
381 <literallayout class='monospaced'>
382 $ devtool add <replaceable>recipe srctree fetchuri</replaceable>
383 </literallayout>
384 In summary, the source code is pulled from
385 <replaceable>fetchuri</replaceable> and
386 extracted into the location defined by
387 <replaceable>srctree</replaceable> as a local
388 Git repository.</para>
389
390 <para>Within workspace,
391 <filename>devtool</filename> creates a
392 recipe named <replaceable>recipe</replaceable>
393 along with an associated append file.
394 </para></listitem>
395 <listitem><para>
396 <emphasis>Right</emphasis>:
397 The right scenario in the figure represents a
398 situation where the
399 <replaceable>srctree</replaceable> has been
400 previously prepared outside of the
401 <filename>devtool</filename> workspace.</para>
402
403 <para>The following command provides a new
404 recipe name and identifies the existing source
405 tree location:
406 <literallayout class='monospaced'>
407 $ devtool add <replaceable>recipe srctree</replaceable>
408 </literallayout>
409 The command examines the source code and
410 creates a recipe named
411 <replaceable>recipe</replaceable> for the code
412 and places the recipe into the workspace.
413 </para>
414
415 <para>Because the extracted source code already
416 exists, <filename>devtool</filename> does not
417 try to relocate the source code into the
418 workspace - only the new recipe is placed
419 in the workspace.</para>
420
421 <para>Aside from a recipe folder, the command
422 also creates an associated append folder and
423 places an initial
424 <filename>*.bbappend</filename> file within.
425 </para></listitem>
426 </itemizedlist>
427 </para></listitem>
428 <listitem><para>
429 <emphasis>Edit the Recipe</emphasis>:
430 You can use <filename>devtool edit-recipe</filename>
431 to open up the editor as defined by the
432 <filename>$EDITOR</filename> environment variable
433 and modify the file:
434 <literallayout class='monospaced'>
435 $ devtool edit-recipe <replaceable>recipe</replaceable>
436 </literallayout>
437 From within the editor, you can make modifications to
438 the recipe that take affect when you build it later.
439 </para></listitem>
440 <listitem><para>
441 <emphasis>Build the Recipe or Rebuild the Image</emphasis>:
442 The next step you take depends on what you are going
443 to do with the new code.</para>
444
445 <para>If you need to eventually move the build output
446 to the target hardware, use the following
447 <filename>devtool</filename> command:
448 <literallayout class='monospaced'>
449 $ devtool build <replaceable>recipe</replaceable>
450 </literallayout></para>
451
452 <para>On the other hand, if you want an image to
453 contain the recipe's packages from the workspace
454 for immediate deployment onto a device (e.g. for
455 testing purposes), you can use
456 the <filename>devtool build-image</filename> command:
457 <literallayout class='monospaced'>
458 $ devtool build-image <replaceable>image</replaceable>
459 </literallayout>
460 </para></listitem>
461 <listitem><para>
462 <emphasis>Deploy the Build Output</emphasis>:
463 When you use the <filename>devtool build</filename>
464 command to build out your recipe, you probably want to
465 see if the resulting build output works as expected
466 on the target hardware.
467 <note>
468 This step assumes you have a previously built
469 image that is already either running in QEMU or
470 is running on actual hardware.
471 Also, it is assumed that for deployment of the
472 image to the target, SSH is installed in the image
473 and, if the image is running on real hardware,
474 you have network access to and from your
475 development machine.
476 </note>
477 You can deploy your build output to that target
478 hardware by using the
479 <filename>devtool deploy-target</filename> command:
480 <literallayout class='monospaced'>
481 $ devtool deploy-target <replaceable>recipe target</replaceable>
482 </literallayout>
483 The <replaceable>target</replaceable> is a live target
484 machine running as an SSH server.</para>
485
486 <para>You can, of course, also deploy the image you
487 build to actual hardware by using the
488 <filename>devtool build-image</filename> command.
489 However, <filename>devtool</filename> does not provide
490 a specific command that allows you to deploy the
491 image to actual hardware.
492 </para></listitem>
493 <listitem><para>
494 <emphasis>Finish Your Work With the Recipe</emphasis>:
495 The <filename>devtool finish</filename> command creates
496 any patches corresponding to commits in the local
497 Git repository, moves the new recipe to a more permanent
498 layer, and then resets the recipe so that the recipe is
499 built normally rather than from the workspace.
500 <literallayout class='monospaced'>
501 $ devtool finish <replaceable>recipe layer</replaceable>
502 </literallayout>
503 <note>
504 Any changes you want to turn into patches must be
505 committed to the Git repository in the source tree.
506 </note></para>
507
508 <para>As mentioned, the
509 <filename>devtool finish</filename> command moves the
510 final recipe to its permanent layer.
511 </para>
512
513 <para>As a final process of the
514 <filename>devtool finish</filename> command, the state
515 of the standard layers and the upstream source is
516 restored so that you can build the recipe from those
517 areas rather than the workspace.
518 <note>
519 You can use the <filename>devtool reset</filename>
520 command to put things back should you decide you
521 do not want to proceed with your work.
522 If you do use this command, realize that the source
523 tree is preserved.
524 </note>
525 </para></listitem>
526 </orderedlist>
527 </para>
528 </section>
529
530 <section id='sdk-devtool-use-devtool-modify-to-modify-the-source-of-an-existing-component'>
531 <title>Use <filename>devtool modify</filename> to Modify the Source of an Existing Component</title>
532
533 <para>
534 The <filename>devtool modify</filename> command prepares the
535 way to work on existing code that already has a local recipe in
536 place that is used to build the software.
537 The command is flexible enough to allow you to extract code
538 from an upstream source, specify the existing recipe, and
539 keep track of and gather any patch files from other developers
540 that are associated with the code.
541 </para>
542
543 <para>
544 Depending on your particular scenario, the arguments and options
545 you use with <filename>devtool modify</filename> form different
546 combinations.
547 The following diagram shows common development flows for the
548 <filename>devtool modify</filename> command:
549 </para>
550
551 <para>
552 <imagedata fileref="figures/sdk-devtool-modify-flow.png" align="center" />
553 </para>
554
555 <para>
556 <orderedlist>
557 <listitem><para>
558 <emphasis>Preparing to Modify the Code</emphasis>:
559 The top part of the flow shows three scenarios by which
560 you could use <filename>devtool modify</filename> to
561 prepare to work on source files.
562 Each scenario assumes the following:
563 <itemizedlist>
564 <listitem><para>
565 The recipe exists locally in a layer external
566 to the <filename>devtool</filename> workspace.
567 </para></listitem>
568 <listitem><para>
569 The source files exist either upstream in an
570 un-extracted state or locally in a previously
571 extracted state.
572 </para></listitem>
573 </itemizedlist>
574 The typical situation is where another developer has
575 created a layer for use with the Yocto Project and
576 their recipe already resides in that layer.
577 Furthermore, their source code is readily available
578 either upstream or locally.
579 <itemizedlist>
580 <listitem><para>
581 <emphasis>Left</emphasis>:
582 The left scenario in the figure represents a
583 common situation where the source code does
584 not exist locally and it needs to be extracted
585 from an upstream source.
586 In this situation, the source is extracted
587 into the default <filename>devtool</filename>
588 workspace location.
589 The recipe, in this scenario, is in its own
590 layer outside the workspace
591 (i.e.
592 <filename>meta-</filename><replaceable>layername</replaceable>).
593 </para>
594
595 <para>The following command identifies the
596 recipe and, by default, extracts the source
597 files:
598 <literallayout class='monospaced'>
599 $ devtool modify <replaceable>recipe</replaceable>
600 </literallayout>
601 Once <filename>devtool</filename>locates the
602 recipe, <filename>devtool</filename> uses the
603 recipe's
604 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
605 statements to locate the source code and any
606 local patch files from other developers.</para>
607
608 <para>With this scenario, no
609 <replaceable>srctree</replaceable> argument
610 exists.
611 Consequently, the default behavior of the
612 <filename>devtool modify</filename> command is
613 to extract the source files pointed to by the
614 <filename>SRC_URI</filename> statements into a
615 local Git structure.
616 Furthermore, the location for the extracted
617 source is the default area within the
618 <filename>devtool</filename> workspace.
619 The result is that the command sets up both
620 the source code and an append file within the
621 workspace while the recipe remains in its
622 original location.</para>
623
624 <para>Additionally, if you have any non-patch
625 local files (i.e. files referred to with
626 <filename>file://</filename> entries in
627 <filename>SRC_URI</filename> statement excluding
628 <filename>*.patch/</filename> or
629 <filename>*.diff</filename>), these files are
630 copied to an
631 <filename>oe-local-files</filename> folder
632 under the newly created source tree.
633 Copying the files here gives you a convenient
634 area from which you can modify the files.
635 Any changes or additions you make to those
636 files are incorporated into the build the next
637 time you build the software just as are other
638 changes you might have made to the source.
639 </para></listitem>
640 <listitem><para>
641 <emphasis>Middle</emphasis>:
642 The middle scenario in the figure represents a
643 situation where the source code also does not
644 exist locally.
645 In this case, the code is again upstream
646 and needs to be extracted to some
647 local area as a Git repository.
648 The recipe, in this scenario, is again local
649 and in its own layer outside the workspace.
650 </para>
651
652 <para>The following command tells
653 <filename>devtool</filename> the recipe with
654 which to work and, in this case, identifies a
655 local area for the extracted source files that
656 exists outside of the default
657 <filename>devtool</filename> workspace:
658 <literallayout class='monospaced'>
659 $ devtool modify <replaceable>recipe srctree</replaceable>
660 </literallayout>
661 <note>
662 You cannot provide a URL for
663 <replaceable>srctree</replaceable> using
664 the <filename>devtool</filename> command.
665 </note>
666 As with all extractions, the command uses
667 the recipe's <filename>SRC_URI</filename>
668 statements to locate the source files and any
669 associated patch files.
670 Non-patch files are copied to an
671 <filename>oe-local-files</filename> folder
672 under the newly created source tree.</para>
673
674 <para>Once the files are located, the command
675 by default extracts them into
676 <replaceable>srctree</replaceable>.</para>
677
678 <para>Within workspace,
679 <filename>devtool</filename> creates an append
680 file for the recipe.
681 The recipe remains in its original location but
682 the source files are extracted to the location
683 you provide with
684 <replaceable>srctree</replaceable>.
685 </para></listitem>
686 <listitem><para>
687 <emphasis>Right</emphasis>:
688 The right scenario in the figure represents a
689 situation where the source tree
690 (<replaceable>srctree</replaceable>) already
691 exists locally as a previously extracted Git
692 structure outside of the
693 <filename>devtool</filename> workspace.
694 In this example, the recipe also exists
695 elsewhere locally in its own layer.
696 </para>
697
698 <para>The following command tells
699 <filename>devtool</filename> the recipe
700 with which to work, uses the "-n" option to
701 indicate source does not need to be extracted,
702 and uses <replaceable>srctree</replaceable> to
703 point to the previously extracted source files:
704 <literallayout class='monospaced'>
705 $ devtool modify -n <replaceable>recipe srctree</replaceable>
706 </literallayout>
707 </para>
708
709 <para>If an <filename>oe-local-files</filename>
710 subdirectory happens to exist and it contains
711 non-patch files, the files are used.
712 However, if the subdirectory does not exist and
713 you run the <filename>devtool finish</filename>
714 command, any non-patch files that might exist
715 next to the recipe are removed because it
716 appears to <filename>devtool</filename> that
717 you have deleted those files.</para>
718
719 <para>Once the
720 <filename>devtool modify</filename> command
721 finishes, it creates only an append file for
722 the recipe in the <filename>devtool</filename>
723 workspace.
724 The recipe and the source code remain in their
725 original locations.
726 </para></listitem>
727 </itemizedlist>
728 </para></listitem>
729 <listitem><para>
730 <emphasis>Edit the Source</emphasis>:
731 Once you have used the
732 <filename>devtool modify</filename> command, you are
733 free to make changes to the source files.
734 You can use any editor you like to make and save
735 your source code modifications.
736 </para></listitem>
737 <listitem><para>
738 <emphasis>Build the Recipe or Rebuild the Image</emphasis>:
739 The next step you take depends on what you are going
740 to do with the new code.</para>
741
742 <para>If you need to eventually move the build output
743 to the target hardware, use the following
744 <filename>devtool</filename> command:
745 <literallayout class='monospaced'>
746 $ devtool build <replaceable>recipe</replaceable>
747 </literallayout></para>
748
749 <para>On the other hand, if you want an image to
750 contain the recipe's packages from the workspace
751 for immediate deployment onto a device (e.g. for
752 testing purposes), you can use
753 the <filename>devtool build-image</filename> command:
754 <literallayout class='monospaced'>
755 $ devtool build-image <replaceable>image</replaceable>
756 </literallayout>
757 </para></listitem>
758 <listitem><para>
759 <emphasis>Deploy the Build Output</emphasis>:
760 When you use the <filename>devtool build</filename>
761 command to build out your recipe, you probably want to
762 see if the resulting build output works as expected
763 on target hardware.
764 <note>
765 This step assumes you have a previously built
766 image that is already either running in QEMU or
767 running on actual hardware.
768 Also, it is assumed that for deployment of the image
769 to the target, SSH is installed in the image and if
770 the image is running on real hardware that you have
771 network access to and from your development machine.
772 </note>
773 You can deploy your build output to that target
774 hardware by using the
775 <filename>devtool deploy-target</filename> command:
776 <literallayout class='monospaced'>
777 $ devtool deploy-target <replaceable>recipe target</replaceable>
778 </literallayout>
779 The <replaceable>target</replaceable> is a live target
780 machine running as an SSH server.</para>
781
782 <para>You can, of course, use other methods to deploy
783 the image you built using the
784 <filename>devtool build-image</filename> command to
785 actual hardware.
786 <filename>devtool</filename> does not provide
787 a specific command to deploy the image to actual
788 hardware.
789 </para></listitem>
790 <listitem><para>
791 <emphasis>Finish Your Work With the Recipe</emphasis>:
792 The <filename>devtool finish</filename> command creates
793 any patches corresponding to commits in the local
794 Git repository, updates the recipe to point to them
795 (or creates a <filename>.bbappend</filename> file to do
796 so, depending on the specified destination layer), and
797 then resets the recipe so that the recipe is built
798 normally rather than from the workspace.
799 <literallayout class='monospaced'>
800 $ devtool finish <replaceable>recipe layer</replaceable>
801 </literallayout>
802 <note>
803 Any changes you want to turn into patches must be
804 staged and committed within the local Git
805 repository before you use the
806 <filename>devtool finish</filename> command.
807 </note></para>
808
809 <para>Because there is no need to move the recipe,
810 <filename>devtool finish</filename> either updates the
811 original recipe in the original layer or the command
812 creates a <filename>.bbappend</filename> file in a
813 different layer as provided by
814 <replaceable>layer</replaceable>.
815 Any work you did in the
816 <filename>oe-local-files</filename> directory is
817 preserved in the original files next to the recipe
818 during the <filename>devtool finish</filename>
819 command.</para>
820
821 <para>As a final process of the
822 <filename>devtool finish</filename> command, the state
823 of the standard layers and the upstream source is
824 restored so that you can build the recipe from those
825 areas rather than from the workspace.
826 <note>
827 You can use the <filename>devtool reset</filename>
828 command to put things back should you decide you
829 do not want to proceed with your work.
830 If you do use this command, realize that the source
831 tree is preserved.
832 </note>
833 </para></listitem>
834 </orderedlist>
835 </para>
836 </section>
837
838 <section id='sdk-devtool-use-devtool-upgrade-to-create-a-version-of-the-recipe-that-supports-a-newer-version-of-the-software'>
839 <title>Use <filename>devtool upgrade</filename> to Create a Version of the Recipe that Supports a Newer Version of the Software</title>
840
841 <para>
842 The <filename>devtool upgrade</filename> command upgrades
843 an existing recipe to that of a more up-to-date version
844 found upstream.
845 Throughout the life of software, recipes continually undergo
846 version upgrades by their upstream publishers.
847 You can use the <filename>devtool upgrade</filename>
848 workflow to make sure your recipes you are using for builds
849 are up-to-date with their upstream counterparts.
850 <note>
851 Several methods exist by which you can upgrade recipes -
852 <filename>devtool upgrade</filename> happens to be one.
853 You can read about all the methods by which you can
854 upgrade recipes in the
855 "<ulink url='&YOCTO_DOCS_DEV_URL;#gs-upgrading-recipes'>Upgrading Recipes</ulink>"
856 section of the Yocto Project Development Tasks Manual.
857 </note>
858 </para>
859
860 <para>
861 The <filename>devtool upgrade</filename> command is flexible
862 enough to allow you to specify source code revision and
863 versioning schemes, extract code into or out of the
864 <filename>devtool</filename>
865 <ulink url='&YOCTO_DOCS_REF_URL;#devtool-the-workspace-layer-structure'>workspace</ulink>,
866 and work with any source file forms that the
867 <ulink url='&YOCTO_DOCS_BB_URL;#bb-fetchers'>fetchers</ulink>
868 support.
869 </para>
870
871 <para>
872 The following diagram shows the common development flow
873 used with the <filename>devtool upgrade</filename> command:
874 </para>
875
876 <para>
877 <imagedata fileref="figures/sdk-devtool-upgrade-flow.png" align="center" />
878 </para>
879
880 <para>
881 <orderedlist>
882 <listitem><para>
883 <emphasis>Initiate the Upgrade</emphasis>:
884 The top part of the flow shows the typical scenario by
885 which you use the <filename>devtool upgrade</filename>
886 command.
887 The following conditions exist:
888 <itemizedlist>
889 <listitem><para>
890 The recipe exists in a local layer external
891 to the <filename>devtool</filename> workspace.
892 </para></listitem>
893 <listitem><para>
894 The source files for the new release
895 exist in the same location pointed to by
896 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
897 in the recipe (e.g. a tarball with the new
898 version number in the name, or as a different
899 revision in the upstream Git repository).
900 </para></listitem>
901 </itemizedlist>
902 A common situation is where third-party software has
903 undergone a revision so that it has been upgraded.
904 The recipe you have access to is likely in your own
905 layer.
906 Thus, you need to upgrade the recipe to use the
907 newer version of the software:
908 <literallayout class='monospaced'>
909 $ devtool upgrade -V <replaceable>version recipe</replaceable>
910 </literallayout>
911 By default, the <filename>devtool upgrade</filename>
912 command extracts source code into the
913 <filename>sources</filename> directory in the
914 <ulink url='&YOCTO_DOCS_REF_URL;#devtool-the-workspace-layer-structure'>workspace</ulink>.
915 If you want the code extracted to any other location,
916 you need to provide the
917 <replaceable>srctree</replaceable> positional argument
918 with the command as follows:
919 <literallayout class='monospaced'>
920 $ devtool upgrade -V <replaceable>version recipe srctree</replaceable>
921 </literallayout>
922 <note>
923 In this example, the "-V" option specifies the new
924 version.
925 If you don't use "-V", the command upgrades the
926 recipe to the latest version.
927 </note>
928 If the source files pointed to by the
929 <filename>SRC_URI</filename> statement in the recipe
930 are in a Git repository, you must provide the "-S"
931 option and specify a revision for the software.</para>
932
933 <para>Once <filename>devtool</filename> locates the
934 recipe, it uses the <filename>SRC_URI</filename>
935 variable to locate the source code and any local patch
936 files from other developers.
937 The result is that the command sets up the source
938 code, the new version of the recipe, and an append file
939 all within the workspace.</para>
940
941 <para>Additionally, if you have any non-patch
942 local files (i.e. files referred to with
943 <filename>file://</filename> entries in
944 <filename>SRC_URI</filename> statement excluding
945 <filename>*.patch/</filename> or
946 <filename>*.diff</filename>), these files are
947 copied to an
948 <filename>oe-local-files</filename> folder
949 under the newly created source tree.
950 Copying the files here gives you a convenient
951 area from which you can modify the files.
952 Any changes or additions you make to those
953 files are incorporated into the build the next
954 time you build the software just as are other
955 changes you might have made to the source.
956 </para></listitem>
957 <listitem><para>
958 <emphasis>Resolve any Conflicts created by the Upgrade</emphasis>:
959 Conflicts could exist due to the software being
960 upgraded to a new version.
961 Conflicts occur if your recipe specifies some patch
962 files in <filename>SRC_URI</filename> that conflict
963 with changes made in the new version of the software.
964 For such cases, you need to resolve the conflicts
965 by editing the source and following the normal
966 <filename>git rebase</filename> conflict resolution
967 process.</para>
968
969 <para>Before moving onto the next step, be sure to
970 resolve any such conflicts created through use of a
971 newer or different version of the software.
972 </para></listitem>
973 <listitem><para>
974 <emphasis>Build the Recipe or Rebuild the Image</emphasis>:
975 The next step you take depends on what you are going
976 to do with the new code.</para>
977
978 <para>If you need to eventually move the build output
979 to the target hardware, use the following
980 <filename>devtool</filename> command:
981 <literallayout class='monospaced'>
982 $ devtool build <replaceable>recipe</replaceable>
983 </literallayout></para>
984
985 <para>On the other hand, if you want an image to
986 contain the recipe's packages from the workspace
987 for immediate deployment onto a device (e.g. for
988 testing purposes), you can use
989 the <filename>devtool build-image</filename> command:
990 <literallayout class='monospaced'>
991 $ devtool build-image <replaceable>image</replaceable>
992 </literallayout>
993 </para></listitem>
994 <listitem><para>
995 <emphasis>Deploy the Build Output</emphasis>:
996 When you use the <filename>devtool build</filename>
997 command or <filename>bitbake</filename> to build
998 your recipe, you probably want to see if the resulting
999 build output works as expected on target hardware.
1000 <note>
1001 This step assumes you have a previously built
1002 image that is already either running in QEMU or
1003 running on actual hardware.
1004 Also, it is assumed that for deployment of the
1005 image to the target, SSH is installed in the image
1006 and if the image is running on real hardware that
1007 you have network access to and from your
1008 development machine.
1009 </note>
1010 You can deploy your build output to that target
1011 hardware by using the
1012 <filename>devtool deploy-target</filename> command:
1013 <literallayout class='monospaced'>
1014 $ devtool deploy-target <replaceable>recipe target</replaceable>
1015 </literallayout>
1016 The <replaceable>target</replaceable> is a live target
1017 machine running as an SSH server.</para>
1018
1019 <para>You can, of course, also deploy the image you
1020 build using the
1021 <filename>devtool build-image</filename> command
1022 to actual hardware.
1023 However, <filename>devtool</filename> does not provide
1024 a specific command that allows you to do this.
1025 </para></listitem>
1026 <listitem><para>
1027 <emphasis>Finish Your Work With the Recipe</emphasis>:
1028 The <filename>devtool finish</filename> command creates
1029 any patches corresponding to commits in the local
1030 Git repository, moves the new recipe to a more
1031 permanent layer, and then resets the recipe so that
1032 the recipe is built normally rather than from the
1033 workspace.</para>
1034
1035 <para>Any work you did in the
1036 <filename>oe-local-files</filename> directory is
1037 preserved in the original files next to the recipe
1038 during the <filename>devtool finish</filename>
1039 command.</para>
1040
1041 <para>
1042 If you specify a destination layer that is the same as
1043 the original source, then the old version of the
1044 recipe and associated files are removed prior to
1045 adding the new version.
1046 <literallayout class='monospaced'>
1047 $ devtool finish <replaceable>recipe layer</replaceable>
1048 </literallayout>
1049 <note>
1050 Any changes you want to turn into patches must be
1051 committed to the Git repository in the source tree.
1052 </note></para>
1053
1054 <para>As a final process of the
1055 <filename>devtool finish</filename> command, the state
1056 of the standard layers and the upstream source is
1057 restored so that you can build the recipe from those
1058 areas rather than the workspace.
1059 <note>
1060 You can use the <filename>devtool reset</filename>
1061 command to put things back should you decide you
1062 do not want to proceed with your work.
1063 If you do use this command, realize that the source
1064 tree is preserved.
1065 </note>
1066 </para></listitem>
1067 </orderedlist>
1068 </para>
1069 </section>
1070 </section>
1071
1072 <section id='sdk-a-closer-look-at-devtool-add'>
1073 <title>A Closer Look at <filename>devtool add</filename></title>
1074
1075 <para>
1076 The <filename>devtool add</filename> command automatically creates
1077 a recipe based on the source tree you provide with the command.
1078 Currently, the command has support for the following:
1079 <itemizedlist>
1080 <listitem><para>
1081 Autotools (<filename>autoconf</filename> and
1082 <filename>automake</filename>)
1083 </para></listitem>
1084 <listitem><para>
1085 CMake
1086 </para></listitem>
1087 <listitem><para>
1088 Scons
1089 </para></listitem>
1090 <listitem><para>
1091 <filename>qmake</filename>
1092 </para></listitem>
1093 <listitem><para>
1094 Plain <filename>Makefile</filename>
1095 </para></listitem>
1096 <listitem><para>
1097 Out-of-tree kernel module
1098 </para></listitem>
1099 <listitem><para>
1100 Binary package (i.e. "-b" option)
1101 </para></listitem>
1102 <listitem><para>
1103 Node.js module
1104 </para></listitem>
1105 <listitem><para>
1106 Python modules that use <filename>setuptools</filename>
1107 or <filename>distutils</filename>
1108 </para></listitem>
1109 </itemizedlist>
1110 </para>
1111
1112 <para>
1113 Apart from binary packages, the determination of how a source tree
1114 should be treated is automatic based on the files present within
1115 that source tree.
1116 For example, if a <filename>CMakeLists.txt</filename> file is found,
1117 then the source tree is assumed to be using
1118 CMake and is treated accordingly.
1119 <note>
1120 In most cases, you need to edit the automatically generated
1121 recipe in order to make it build properly.
1122 Typically, you would go through several edit and build cycles
1123 until the recipe successfully builds.
1124 Once the recipe builds, you could use possible further
1125 iterations to test the recipe on the target device.
1126 </note>
1127 </para>
1128
1129 <para>
1130 The remainder of this section covers specifics regarding how parts
1131 of the recipe are generated.
1132 </para>
1133
1134 <section id='sdk-name-and-version'>
1135 <title>Name and Version</title>
1136
1137 <para>
1138 If you do not specify a name and version on the command
1139 line, <filename>devtool add</filename> uses various metadata
1140 within the source tree in an attempt to determine
1141 the name and version of the software being built.
1142 Based on what the tool determines, <filename>devtool</filename>
1143 sets the name of the created recipe file accordingly.
1144 </para>
1145
1146 <para>
1147 If <filename>devtool</filename> cannot determine the name and
1148 version, the command prints an error.
1149 For such cases, you must re-run the command and provide
1150 the name and version, just the name, or just the version as
1151 part of the command line.
1152 </para>
1153
1154 <para>
1155 Sometimes the name or version determined from the source tree
1156 might be incorrect.
1157 For such a case, you must reset the recipe:
1158 <literallayout class='monospaced'>
1159 $ devtool reset -n <replaceable>recipename</replaceable>
1160 </literallayout>
1161 After running the <filename>devtool reset</filename> command,
1162 you need to run <filename>devtool add</filename> again and
1163 provide the name or the version.
1164 </para>
1165 </section>
1166
1167 <section id='sdk-dependency-detection-and-mapping'>
1168 <title>Dependency Detection and Mapping</title>
1169
1170 <para>
1171 The <filename>devtool add</filename> command attempts to
1172 detect build-time dependencies and map them to other recipes
1173 in the system.
1174 During this mapping, the command fills in the names of those
1175 recipes as part of the
1176 <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPENDS'><filename>DEPENDS</filename></ulink>
1177 variable within the recipe.
1178 If a dependency cannot be mapped, <filename>devtool</filename>
1179 places a comment in the recipe indicating such.
1180 The inability to map a dependency can result from naming not
1181 being recognized or because the dependency simply is not
1182 available.
1183 For cases where the dependency is not available, you must use
1184 the <filename>devtool add</filename> command to add an
1185 additional recipe that satisfies the dependency.
1186 Once you add that recipe, you need to update the
1187 <filename>DEPENDS</filename> variable in the original recipe
1188 to include the new recipe.
1189 </para>
1190
1191 <para>
1192 If you need to add runtime dependencies, you can do so by
1193 adding the following to your recipe:
1194 <literallayout class='monospaced'>
1195 RDEPENDS_${PN} += "<replaceable>dependency1 dependency2 ...</replaceable>"
1196 </literallayout>
1197 <note>
1198 The <filename>devtool add</filename> command often cannot
1199 distinguish between mandatory and optional dependencies.
1200 Consequently, some of the detected dependencies might
1201 in fact be optional.
1202 When in doubt, consult the documentation or the configure
1203 script for the software the recipe is building for further
1204 details.
1205 In some cases, you might find you can substitute the
1206 dependency with an option that disables the associated
1207 functionality passed to the configure script.
1208 </note>
1209 </para>
1210 </section>
1211
1212 <section id='sdk-license-detection'>
1213 <title>License Detection</title>
1214
1215 <para>
1216 The <filename>devtool add</filename> command attempts to
1217 determine if the software you are adding is able to be
1218 distributed under a common, open-source license.
1219 If so, the command sets the
1220 <ulink url='&YOCTO_DOCS_REF_URL;#var-LICENSE'><filename>LICENSE</filename></ulink>
1221 value accordingly.
1222 You should double-check the value added by the command against
1223 the documentation or source files for the software you are
1224 building and, if necessary, update that
1225 <filename>LICENSE</filename> value.
1226 </para>
1227
1228 <para>
1229 The <filename>devtool add</filename> command also sets the
1230 <ulink url='&YOCTO_DOCS_REF_URL;#var-LIC_FILES_CHKSUM'><filename>LIC_FILES_CHKSUM</filename></ulink>
1231 value to point to all files that appear to be license-related.
1232 Realize that license statements often appear in comments at
1233 the top of source files or within the documentation.
1234 In such cases, the command does not recognize those license
1235 statements.
1236 Consequently, you might need to amend the
1237 <filename>LIC_FILES_CHKSUM</filename> variable to point to one
1238 or more of those comments if present.
1239 Setting <filename>LIC_FILES_CHKSUM</filename> is particularly
1240 important for third-party software.
1241 The mechanism attempts to ensure correct licensing should you
1242 upgrade the recipe to a newer upstream version in future.
1243 Any change in licensing is detected and you receive an error
1244 prompting you to check the license text again.
1245 </para>
1246
1247 <para>
1248 If the <filename>devtool add</filename> command cannot
1249 determine licensing information, <filename>devtool</filename>
1250 sets the <filename>LICENSE</filename> value to "CLOSED" and
1251 leaves the <filename>LIC_FILES_CHKSUM</filename> value unset.
1252 This behavior allows you to continue with development even
1253 though the settings are unlikely to be correct in all cases.
1254 You should check the documentation or source files for the
1255 software you are building to determine the actual license.
1256 </para>
1257 </section>
1258
1259 <section id='sdk-adding-makefile-only-software'>
1260 <title>Adding Makefile-Only Software</title>
1261
1262 <para>
1263 The use of Make by itself is very common in both proprietary
1264 and open-source software.
1265 Unfortunately, Makefiles are often not written with
1266 cross-compilation in mind.
1267 Thus, <filename>devtool add</filename> often cannot do very
1268 much to ensure that these Makefiles build correctly.
1269 It is very common, for example, to explicitly call
1270 <filename>gcc</filename> instead of using the
1271 <ulink url='&YOCTO_DOCS_REF_URL;#var-CC'><filename>CC</filename></ulink>
1272 variable.
1273 Usually, in a cross-compilation environment,
1274 <filename>gcc</filename> is the compiler for the build host
1275 and the cross-compiler is named something similar to
1276 <filename>arm-poky-linux-gnueabi-gcc</filename> and might
1277 require arguments (e.g. to point to the associated sysroot
1278 for the target machine).
1279 </para>
1280
1281 <para>
1282 When writing a recipe for Makefile-only software, keep the
1283 following in mind:
1284 <itemizedlist>
1285 <listitem><para>
1286 You probably need to patch the Makefile to use
1287 variables instead of hardcoding tools within the
1288 toolchain such as <filename>gcc</filename> and
1289 <filename>g++</filename>.
1290 </para></listitem>
1291 <listitem><para>
1292 The environment in which Make runs is set up with
1293 various standard variables for compilation (e.g.
1294 <filename>CC</filename>, <filename>CXX</filename>, and
1295 so forth) in a similar manner to the environment set
1296 up by the SDK's environment setup script.
1297 One easy way to see these variables is to run the
1298 <filename>devtool build</filename> command on the
1299 recipe and then look in
1300 <filename>oe-logs/run.do_compile</filename>.
1301 Towards the top of this file, a list of environment
1302 variables exists that are being set.
1303 You can take advantage of these variables within the
1304 Makefile.
1305 </para></listitem>
1306 <listitem><para>
1307 If the Makefile sets a default for a variable using "=",
1308 that default overrides the value set in the environment,
1309 which is usually not desirable.
1310 For this case, you can either patch the Makefile
1311 so it sets the default using the "?=" operator, or
1312 you can alternatively force the value on the
1313 <filename>make</filename> command line.
1314 To force the value on the command line, add the
1315 variable setting to
1316 <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_OEMAKE'><filename>EXTRA_OEMAKE</filename></ulink>
1317 or
1318 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGECONFIG_CONFARGS'><filename>PACKAGECONFIG_CONFARGS</filename></ulink>
1319 within the recipe.
1320 Here is an example using <filename>EXTRA_OEMAKE</filename>:
1321 <literallayout class='monospaced'>
1322 EXTRA_OEMAKE += "'CC=${CC}' 'CXX=${CXX}'"
1323 </literallayout>
1324 In the above example, single quotes are used around the
1325 variable settings as the values are likely to contain
1326 spaces because required default options are passed to
1327 the compiler.
1328 </para></listitem>
1329 <listitem><para>
1330 Hardcoding paths inside Makefiles is often problematic
1331 in a cross-compilation environment.
1332 This is particularly true because those hardcoded paths
1333 often point to locations on the build host and thus
1334 will either be read-only or will introduce
1335 contamination into the cross-compilation because they
1336 are specific to the build host rather than the target.
1337 Patching the Makefile to use prefix variables or other
1338 path variables is usually the way to handle this
1339 situation.
1340 </para></listitem>
1341 <listitem><para>
1342 Sometimes a Makefile runs target-specific commands such
1343 as <filename>ldconfig</filename>.
1344 For such cases, you might be able to apply patches that
1345 remove these commands from the Makefile.
1346 </para></listitem>
1347 </itemizedlist>
1348 </para>
1349 </section>
1350
1351 <section id='sdk-adding-native-tools'>
1352 <title>Adding Native Tools</title>
1353
1354 <para>
1355 Often, you need to build additional tools that run on the
1356 <ulink url='&YOCTO_DOCS_REF_URL;#hardware-build-system-term'>build host</ulink>
1357 as opposed to the target.
1358 You should indicate this requirement by using one of the
1359 following methods when you run
1360 <filename>devtool add</filename>:
1361 <itemizedlist>
1362 <listitem><para>
1363 Specify the name of the recipe such that it ends
1364 with "-native".
1365 Specifying the name like this produces a recipe that
1366 only builds for the build host.
1367 </para></listitem>
1368 <listitem><para>
1369 Specify the "&dash;&dash;also-native" option with the
1370 <filename>devtool add</filename> command.
1371 Specifying this option creates a recipe file that still
1372 builds for the target but also creates a variant with
1373 a "-native" suffix that builds for the build host.
1374 </para></listitem>
1375 </itemizedlist>
1376 <note>
1377 If you need to add a tool that is shipped as part of a
1378 source tree that builds code for the target, you can
1379 typically accomplish this by building the native and target
1380 parts separately rather than within the same compilation
1381 process.
1382 Realize though that with the "&dash;&dash;also-native"
1383 option, you can add the tool using just one recipe file.
1384 </note>
1385 </para>
1386 </section>
1387
1388 <section id='sdk-adding-node-js-modules'>
1389 <title>Adding Node.js Modules</title>
1390
1391 <para>
1392 You can use the <filename>devtool add</filename> command two
1393 different ways to add Node.js modules: 1) Through
1394 <filename>npm</filename> and, 2) from a repository or local
1395 source.
1396 </para>
1397
1398 <para>
1399 Use the following form to add Node.js modules through
1400 <filename>npm</filename>:
1401 <literallayout class='monospaced'>
1402 $ devtool add "npm://registry.npmjs.org;name=forever;version=0.15.1"
1403 </literallayout>
1404 The name and version parameters are mandatory.
1405 Lockdown and shrinkwrap files are generated and pointed to by
1406 the recipe in order to freeze the version that is fetched for
1407 the dependencies according to the first time.
1408 This also saves checksums that are verified on future fetches.
1409 Together, these behaviors ensure the reproducibility and
1410 integrity of the build.
1411 <note><title>Notes</title>
1412 <itemizedlist>
1413 <listitem><para>
1414 You must use quotes around the URL.
1415 The <filename>devtool add</filename> does not require
1416 the quotes, but the shell considers ";" as a splitter
1417 between multiple commands.
1418 Thus, without the quotes,
1419 <filename>devtool add</filename> does not receive the
1420 other parts, which results in several "command not
1421 found" errors.
1422 </para></listitem>
1423 <listitem><para>
1424 In order to support adding Node.js modules, a
1425 <filename>nodejs</filename> recipe must be part
1426 of your SDK.
1427 </para></listitem>
1428 </itemizedlist>
1429 </note>
1430 </para>
1431
1432 <para>
1433 As mentioned earlier, you can also add Node.js modules
1434 directly from a repository or local source tree.
1435 To add modules this way, use <filename>devtool add</filename>
1436 in the following form:
1437 <literallayout class='monospaced'>
1438 $ devtool add https://github.com/diversario/node-ssdp
1439 </literallayout>
1440 In this example, <filename>devtool</filename> fetches the
1441 specified Git repository, detects the code as Node.js
1442 code, fetches dependencies using <filename>npm</filename>, and
1443 sets
1444 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
1445 accordingly.
1446 </para>
1447 </section>
1448 </section>
1449
1450 <section id='sdk-working-with-recipes'>
1451 <title>Working With Recipes</title>
1452
1453 <para>
1454 When building a recipe using the
1455 <filename>devtool build</filename> command, the typical build
1456 progresses as follows:
1457 <orderedlist>
1458 <listitem><para>
1459 Fetch the source
1460 </para></listitem>
1461 <listitem><para>
1462 Unpack the source
1463 </para></listitem>
1464 <listitem><para>
1465 Configure the source
1466 </para></listitem>
1467 <listitem><para>
1468 Compile the source
1469 </para></listitem>
1470 <listitem><para>
1471 Install the build output
1472 </para></listitem>
1473 <listitem><para>
1474 Package the installed output
1475 </para></listitem>
1476 </orderedlist>
1477 For recipes in the workspace, fetching and unpacking is disabled
1478 as the source tree has already been prepared and is persistent.
1479 Each of these build steps is defined as a function (task), usually
1480 with a "do_" prefix (e.g.
1481 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-fetch'><filename>do_fetch</filename></ulink>,
1482 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-unpack'><filename>do_unpack</filename></ulink>,
1483 and so forth).
1484 These functions are typically shell scripts but can instead be
1485 written in Python.
1486 </para>
1487
1488 <para>
1489 If you look at the contents of a recipe, you will see that the
1490 recipe does not include complete instructions for building the
1491 software.
1492 Instead, common functionality is encapsulated in classes inherited
1493 with the <filename>inherit</filename> directive.
1494 This technique leaves the recipe to describe just the things that
1495 are specific to the software being built.
1496 A
1497 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-base'><filename>base</filename></ulink>
1498 class exists that is implicitly inherited by all recipes and
1499 provides the functionality that most recipes typically need.
1500 </para>
1501
1502 <para>
1503 The remainder of this section presents information useful when
1504 working with recipes.
1505 </para>
1506
1507 <section id='sdk-finding-logs-and-work-files'>
1508 <title>Finding Logs and Work Files</title>
1509
1510 <para>
1511 After the first run of the <filename>devtool build</filename>
1512 command, recipes that were previously created using the
1513 <filename>devtool add</filename> command or whose sources were
1514 modified using the <filename>devtool modify</filename>
1515 command contain symbolic links created within the source tree:
1516 <itemizedlist>
1517 <listitem><para>
1518 <filename>oe-logs</filename>:
1519 This link points to the directory in which log files
1520 and run scripts for each build step are created.
1521 </para></listitem>
1522 <listitem><para>
1523 <filename>oe-workdir</filename>:
1524 This link points to the temporary work area for the
1525 recipe.
1526 The following locations under
1527 <filename>oe-workdir</filename> are particularly
1528 useful:
1529 <itemizedlist>
1530 <listitem><para>
1531 <filename>image/</filename>:
1532 Contains all of the files installed during
1533 the
1534 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink>
1535 stage.
1536 Within a recipe, this directory is referred
1537 to by the expression
1538 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-D'><filename>D</filename></ulink><filename>}</filename>.
1539 </para></listitem>
1540 <listitem><para>
1541 <filename>sysroot-destdir/</filename>:
1542 Contains a subset of files installed within
1543 <filename>do_install</filename> that have
1544 been put into the shared sysroot.
1545 For more information, see the
1546 "<link linkend='sdk-sharing-files-between-recipes'>Sharing Files Between Recipes</link>"
1547 section.
1548 </para></listitem>
1549 <listitem><para>
1550 <filename>packages-split/</filename>:
1551 Contains subdirectories for each package
1552 produced by the recipe.
1553 For more information, see the
1554 "<link linkend='sdk-packaging'>Packaging</link>"
1555 section.
1556 </para></listitem>
1557 </itemizedlist>
1558 </para></listitem>
1559 </itemizedlist>
1560 You can use these links to get more information on what is
1561 happening at each build step.
1562 </para>
1563 </section>
1564
1565 <section id='sdk-setting-configure-arguments'>
1566 <title>Setting Configure Arguments</title>
1567
1568 <para>
1569 If the software your recipe is building uses GNU autoconf,
1570 then a fixed set of arguments is passed to it to enable
1571 cross-compilation plus any extras specified by
1572 <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_OECONF'><filename>EXTRA_OECONF</filename></ulink>
1573 or
1574 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGECONFIG_CONFARGS'><filename>PACKAGECONFIG_CONFARGS</filename></ulink>
1575 set within the recipe.
1576 If you wish to pass additional options, add them to
1577 <filename>EXTRA_OECONF</filename> or
1578 <filename>PACKAGECONFIG_CONFARGS</filename>.
1579 Other supported build tools have similar variables
1580 (e.g.
1581 <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_OECMAKE'><filename>EXTRA_OECMAKE</filename></ulink>
1582 for CMake,
1583 <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_OESCONS'><filename>EXTRA_OESCONS</filename></ulink>
1584 for Scons, and so forth).
1585 If you need to pass anything on the <filename>make</filename>
1586 command line, you can use <filename>EXTRA_OEMAKE</filename> or the
1587 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGECONFIG_CONFARGS'><filename>PACKAGECONFIG_CONFARGS</filename></ulink>
1588 variables to do so.
1589 </para>
1590
1591 <para>
1592 You can use the <filename>devtool configure-help</filename> command
1593 to help you set the arguments listed in the previous paragraph.
1594 The command determines the exact options being passed, and shows
1595 them to you along with any custom arguments specified through
1596 <filename>EXTRA_OECONF</filename> or
1597 <filename>PACKAGECONFIG_CONFARGS</filename>.
1598 If applicable, the command also shows you the output of the
1599 configure script's "&dash;&dash;help" option as a reference.
1600 </para>
1601 </section>
1602
1603 <section id='sdk-sharing-files-between-recipes'>
1604 <title>Sharing Files Between Recipes</title>
1605
1606 <para>
1607 Recipes often need to use files provided by other recipes on
1608 the
1609 <ulink url='&YOCTO_DOCS_REF_URL;#hardware-build-system-term'>build host</ulink>.
1610 For example, an application linking to a common library needs
1611 access to the library itself and its associated headers.
1612 The way this access is accomplished within the extensible SDK is
1613 through the sysroot.
1614 One sysroot exists per "machine" for which the SDK is being
1615 built.
1616 In practical terms, this means a sysroot exists for the target
1617 machine, and a sysroot exists for the build host.
1618 </para>
1619
1620 <para>
1621 Recipes should never write files directly into the sysroot.
1622 Instead, files should be installed into standard locations
1623 during the
1624 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink>
1625 task within the
1626 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-D'><filename>D</filename></ulink><filename>}</filename>
1627 directory.
1628 A subset of these files automatically goes into the sysroot.
1629 The reason for this limitation is that almost all files that go
1630 into the sysroot are cataloged in manifests in order to ensure
1631 they can be removed later when a recipe is modified or removed.
1632 Thus, the sysroot is able to remain free from stale files.
1633 </para>
1634 </section>
1635
1636 <section id='sdk-packaging'>
1637 <title>Packaging</title>
1638
1639 <para>
1640 Packaging is not always particularly relevant within the
1641 extensible SDK.
1642 However, if you examine how build output gets into the final image
1643 on the target device, it is important to understand packaging
1644 because the contents of the image are expressed in terms of
1645 packages and not recipes.
1646 </para>
1647
1648 <para>
1649 During the
1650 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-package'><filename>do_package</filename></ulink>
1651 task, files installed during the
1652 <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink>
1653 task are split into one main package, which is almost always
1654 named the same as the recipe, and into several other packages.
1655 This separation exists because not all of those installed files
1656 are useful in every image.
1657 For example, you probably do not need any of the documentation
1658 installed in a production image.
1659 Consequently, for each recipe the documentation files are
1660 separated into a <filename>-doc</filename> package.
1661 Recipes that package software containing optional modules or
1662 plugins might undergo additional package splitting as well.
1663 </para>
1664
1665 <para>
1666 After building a recipe, you can see where files have gone by
1667 looking in the <filename>oe-workdir/packages-split</filename>
1668 directory, which contains a subdirectory for each package.
1669 Apart from some advanced cases, the
1670 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGES'><filename>PACKAGES</filename></ulink>
1671 and
1672 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILES'><filename>FILES</filename></ulink>
1673 variables controls splitting.
1674 The <filename>PACKAGES</filename> variable lists all of the
1675 packages to be produced, while the <filename>FILES</filename>
1676 variable specifies which files to include in each package by
1677 using an override to specify the package.
1678 For example, <filename>FILES_${PN}</filename> specifies the
1679 files to go into the main package (i.e. the main package has
1680 the same name as the recipe and
1681 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink><filename>}</filename>
1682 evaluates to the recipe name).
1683 The order of the <filename>PACKAGES</filename> value is
1684 significant.
1685 For each installed file, the first package whose
1686 <filename>FILES</filename> value matches the file is the
1687 package into which the file goes.
1688 Defaults exist for both the <filename>PACKAGES</filename> and
1689 <filename>FILES</filename> variables.
1690 Consequently, you might find you do not even need to set these
1691 variables in your recipe unless the software the recipe is
1692 building installs files into non-standard locations.
1693 </para>
1694 </section>
1695 </section>
1696
1697 <section id='sdk-restoring-the-target-device-to-its-original-state'>
1698 <title>Restoring the Target Device to its Original State</title>
1699
1700 <para>
1701 If you use the <filename>devtool deploy-target</filename>
1702 command to write a recipe's build output to the target, and
1703 you are working on an existing component of the system, then you
1704 might find yourself in a situation where you need to restore the
1705 original files that existed prior to running the
1706 <filename>devtool deploy-target</filename> command.
1707 Because the <filename>devtool deploy-target</filename> command
1708 backs up any files it overwrites, you can use the
1709 <filename>devtool undeploy-target</filename> command to restore
1710 those files and remove any other files the recipe deployed.
1711 Consider the following example:
1712 <literallayout class='monospaced'>
1713 $ devtool undeploy-target lighttpd root@192.168.7.2
1714 </literallayout>
1715 If you have deployed multiple applications, you can remove them
1716 all using the "-a" option thus restoring the target device to its
1717 original state:
1718 <literallayout class='monospaced'>
1719 $ devtool undeploy-target -a root@192.168.7.2
1720 </literallayout>
1721 Information about files deployed to the target as well as any
1722 backed up files are stored on the target itself.
1723 This storage, of course, requires some additional space
1724 on the target machine.
1725 <note>
1726 The <filename>devtool deploy-target</filename> and
1727 <filename>devtool undeploy-target</filename> commands do not
1728 currently interact with any package management system on the
1729 target device (e.g. RPM or OPKG).
1730 Consequently, you should not intermingle
1731 <filename>devtool deploy-target</filename> and package
1732 manager operations on the target device.
1733 Doing so could result in a conflicting set of files.
1734 </note>
1735 </para>
1736 </section>
1737
1738 <section id='sdk-installing-additional-items-into-the-extensible-sdk'>
1739 <title>Installing Additional Items Into the Extensible SDK</title>
1740
1741 <para>
1742 Out of the box the extensible SDK typically only comes with a small
1743 number of tools and libraries.
1744 A minimal SDK starts mostly empty and is populated on-demand.
1745 Sometimes you must explicitly install extra items into the SDK.
1746 If you need these extra items, you can first search for the items
1747 using the <filename>devtool search</filename> command.
1748 For example, suppose you need to link to libGL but you are not sure
1749 which recipe provides libGL.
1750 You can use the following command to find out:
1751 <literallayout class='monospaced'>
1752 $ devtool search libGL
1753 mesa A free implementation of the OpenGL API
1754 </literallayout>
1755 Once you know the recipe (i.e. <filename>mesa</filename> in this
1756 example), you can install it:
1757 <literallayout class='monospaced'>
1758 $ devtool sdk-install mesa
1759 </literallayout>
1760 By default, the <filename>devtool sdk-install</filename> command
1761 assumes the item is available in pre-built form from your SDK
1762 provider.
1763 If the item is not available and it is acceptable to build the item
1764 from source, you can add the "-s" option as follows:
1765 <literallayout class='monospaced'>
1766 $ devtool sdk-install -s mesa
1767 </literallayout>
1768 It is important to remember that building the item from source
1769 takes significantly longer than installing the pre-built artifact.
1770 Also, if no recipe exists for the item you want to add to the SDK,
1771 you must instead add the item using the
1772 <filename>devtool add</filename> command.
1773 </para>
1774 </section>
1775
1776 <section id='sdk-applying-updates-to-an-installed-extensible-sdk'>
1777 <title>Applying Updates to an Installed Extensible SDK</title>
1778
1779 <para>
1780 If you are working with an installed extensible SDK that gets
1781 occasionally updated (e.g. a third-party SDK), then you will need
1782 to manually "pull down" the updates into the installed SDK.
1783 </para>
1784
1785 <para>
1786 To update your installed SDK, use <filename>devtool</filename> as
1787 follows:
1788 <literallayout class='monospaced'>
1789 $ devtool sdk-update
1790 </literallayout>
1791 The previous command assumes your SDK provider has set the default
1792 update URL for you through the
1793 <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_UPDATE_URL'><filename>SDK_UPDATE_URL</filename></ulink>
1794 variable as described in the
1795 "<link linkend='sdk-providing-updates-to-the-extensible-sdk-after-installation'>Providing Updates to the Extensible SDK After Installation</link>"
1796 section.
1797 If the SDK provider has not set that default URL, you need to
1798 specify it yourself in the command as follows:
1799 <literallayout class='monospaced'>
1800 $ devtool sdk-update <replaceable>path_to_update_directory</replaceable>
1801 </literallayout>
1802 <note>
1803 The URL needs to point specifically to a published SDK and
1804 not to an SDK installer that you would download and install.
1805 </note>
1806 </para>
1807 </section>
1808
1809 <section id='sdk-creating-a-derivative-sdk-with-additional-components'>
1810 <title>Creating a Derivative SDK With Additional Components</title>
1811
1812 <para>
1813 You might need to produce an SDK that contains your own custom
1814 libraries.
1815 A good example would be if you were a vendor with customers that
1816 use your SDK to build their own platform-specific software and
1817 those customers need an SDK that has custom libraries.
1818 In such a case, you can produce a derivative SDK based on the
1819 currently installed SDK fairly easily by following these steps:
1820 <orderedlist>
1821 <listitem><para>
1822 If necessary, install an extensible SDK that
1823 you want to use as a base for your derivative SDK.
1824 </para></listitem>
1825 <listitem><para>
1826 Source the environment script for the SDK.
1827 </para></listitem>
1828 <listitem><para>
1829 Add the extra libraries or other components you want by
1830 using the <filename>devtool add</filename> command.
1831 </para></listitem>
1832 <listitem><para>
1833 Run the <filename>devtool build-sdk</filename> command.
1834 </para></listitem>
1835 </orderedlist>
1836 The previous steps take the recipes added to the workspace and
1837 construct a new SDK installer that contains those recipes and the
1838 resulting binary artifacts.
1839 The recipes go into their own separate layer in the constructed
1840 derivative SDK, which leaves the workspace clean and ready for
1841 users to add their own recipes.
1842 </para>
1843 </section>
1844</chapter>
1845<!--
1846vim: expandtab tw=80 ts=4
1847-->
diff --git a/documentation/sdk-manual/sdk-intro.xml b/documentation/sdk-manual/sdk-intro.xml
deleted file mode 100644
index f42670ea6e..0000000000
--- a/documentation/sdk-manual/sdk-intro.xml
+++ /dev/null
@@ -1,353 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='sdk-intro'>
7<title>Introduction</title>
8
9<section id='sdk-manual-intro'>
10 <title>Introduction</title>
11
12 <para>
13 Welcome to the Yocto Project Application Development and the
14 Extensible Software Development Kit (eSDK) manual.
15 This manual provides information that explains how to use both the
16 Yocto Project extensible and standard SDKs to develop
17 applications and images.
18 <note>
19 Prior to the 2.0 Release of the Yocto Project, application
20 development was primarily accomplished through the use of the
21 Application Development Toolkit (ADT) and the availability
22 of stand-alone cross-development toolchains and other tools.
23 With the 2.1 Release of the Yocto Project, application development
24 has transitioned to within a tool-rich extensible SDK and the more
25 traditional standard SDK.
26 </note>
27 </para>
28
29 <para>
30 All SDKs consist of the following:
31 <itemizedlist>
32 <listitem><para>
33 <emphasis>Cross-Development Toolchain</emphasis>:
34 This toolchain contains a compiler, debugger, and various
35 miscellaneous tools.
36 </para></listitem>
37 <listitem><para>
38 <emphasis>Libraries, Headers, and Symbols</emphasis>:
39 The libraries, headers, and symbols are specific to the image
40 (i.e. they match the image).
41 </para></listitem>
42 <listitem><para>
43 <emphasis>Environment Setup Script</emphasis>:
44 This <filename>*.sh</filename> file, once run, sets up the
45 cross-development environment by defining variables and
46 preparing for SDK use.
47 </para></listitem>
48 </itemizedlist>
49 </para>
50
51 <para>
52 Additionally, an extensible SDK has tools that allow you to easily add
53 new applications and libraries to an image, modify the source of an
54 existing component, test changes on the target hardware, and easily
55 integrate an application into the
56 <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>.
57 </para>
58
59 <para>
60 You can use an SDK to independently develop and test code
61 that is destined to run on some target machine.
62 SDKs are completely self-contained.
63 The binaries are linked against their own copy of
64 <filename>libc</filename>, which results in no dependencies
65 on the target system.
66 To achieve this, the pointer to the dynamic loader is
67 configured at install time since that path cannot be dynamically
68 altered.
69 This is the reason for a wrapper around the
70 <filename>populate_sdk</filename> and
71 <filename>populate_sdk_ext</filename> archives.
72 </para>
73
74 <para>
75 Another feature for the SDKs is that only one set of cross-compiler
76 toolchain binaries are produced for any given architecture.
77 This feature takes advantage of the fact that the target hardware can
78 be passed to <filename>gcc</filename> as a set of compiler options.
79 Those options are set up by the environment script and contained in
80 variables such as
81 <ulink url='&YOCTO_DOCS_REF_URL;#var-CC'><filename>CC</filename></ulink>
82 and
83 <ulink url='&YOCTO_DOCS_REF_URL;#var-LD'><filename>LD</filename></ulink>.
84 This reduces the space needed for the tools.
85 Understand, however, that every target still needs a sysroot because
86 those binaries are target-specific.
87 </para>
88
89 <para>
90 The SDK development environment consists of the following:
91 <itemizedlist>
92 <listitem><para>
93 The self-contained SDK, which is an
94 architecture-specific cross-toolchain and
95 matching sysroots (target and native) all built by the
96 OpenEmbedded build system (e.g. the SDK).
97 The toolchain and sysroots are based on a
98 <ulink url='&YOCTO_DOCS_REF_URL;#metadata'>Metadata</ulink>
99 configuration and extensions,
100 which allows you to cross-develop on the host machine for the
101 target hardware.
102 Additionally, the extensible SDK contains the
103 <filename>devtool</filename> functionality.
104 </para></listitem>
105 <listitem><para>
106 The Quick EMUlator (QEMU), which lets you simulate
107 target hardware.
108 QEMU is not literally part of the SDK.
109 You must build and include this emulator separately.
110 However, QEMU plays an important role in the development
111 process that revolves around use of the SDK.
112 </para></listitem>
113 </itemizedlist>
114 </para>
115
116 <para>
117 In summary, the extensible and standard SDK share many features.
118 However, the extensible SDK has powerful development tools to help you
119 more quickly develop applications.
120 Following is a table that summarizes the primary differences between
121 the standard and extensible SDK types when considering which to
122 build:
123 <informaltable frame='none'>
124 <tgroup cols='3' align='left' colsep='1' rowsep='1'>
125 <colspec colname='c1' colwidth='1*'/>
126 <colspec colname='c2' colwidth='1*'/>
127 <colspec colname='c3' colwidth='1*'/>
128 <thead>
129 <row>
130 <entry align="left"><emphasis>Feature</emphasis></entry>
131 <entry align="left"><emphasis>Standard SDK</emphasis></entry>
132 <entry align="left"><emphasis>Extensible SDK</emphasis></entry>
133 </row>
134 </thead>
135 <tbody>
136 <row>
137 <entry align="left">Toolchain</entry>
138 <entry align="left">Yes</entry>
139 <entry align="left">Yes*</entry>
140 </row>
141 <row>
142 <entry align="left">Debugger</entry>
143 <entry align="left">Yes</entry>
144 <entry align="left">Yes*</entry>
145 </row>
146 <row>
147 <entry align="left">Size</entry>
148 <entry align="left">100+ MBytes</entry>
149 <entry align="left">1+ GBytes (or 300+ MBytes for minimal w/toolchain)</entry>
150 </row>
151 <row>
152 <entry align="left"><filename>devtool</filename></entry>
153 <entry align="left">No</entry>
154 <entry align="left">Yes</entry>
155 </row>
156 <row>
157 <entry align="left">Build Images</entry>
158 <entry align="left">No</entry>
159 <entry align="left">Yes</entry>
160 </row>
161 <row>
162 <entry align="left">Updateable</entry>
163 <entry align="left">No</entry>
164 <entry align="left">Yes</entry>
165 </row>
166 <row>
167 <entry align="left">Managed Sysroot**</entry>
168 <entry align="left">No</entry>
169 <entry align="left">Yes</entry>
170 </row>
171 <row>
172 <entry align="left">Installed Packages</entry>
173 <entry align="left">No***</entry>
174 <entry align="left">Yes****</entry>
175 </row>
176 <row>
177 <entry align="left">Construction</entry>
178 <entry align="left">Packages</entry>
179 <entry align="left">Shared State</entry>
180 </row>
181 </tbody>
182 </tgroup>
183 </informaltable>
184 <literallayout class='monospaced'>
185 * Extensible SDK contains the toolchain and debugger if <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_EXT_TYPE'><filename>SDK_EXT_TYPE</filename></ulink> is "full" or <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_INCLUDE_TOOLCHAIN'><filename>SDK_INCLUDE_TOOLCHAIN</filename></ulink> is "1", which is the default.
186
187 ** Sysroot is managed through the use of <filename>devtool</filename>. Thus, it is less likely that you will corrupt your SDK sysroot when you try to add additional libraries.
188
189 *** You can add runtime package management to the standard SDK but it is not supported by default.
190
191 **** You must build and make the shared state available to extensible SDK users for "packages" you want to enable users to install.
192 </literallayout>
193 </para>
194
195 <section id='the-cross-development-toolchain'>
196 <title>The Cross-Development Toolchain</title>
197
198 <para>
199 The
200 <ulink url='&YOCTO_DOCS_REF_URL;#cross-development-toolchain'>Cross-Development Toolchain</ulink>
201 consists of a cross-compiler, cross-linker, and cross-debugger
202 that are used to develop user-space applications for targeted
203 hardware.
204 Additionally, for an extensible SDK, the toolchain also has
205 built-in <filename>devtool</filename> functionality.
206 This toolchain is created by running a SDK installer script
207 or through a
208 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>
209 that is based on your metadata configuration or extension for
210 your targeted device.
211 The cross-toolchain works with a matching target sysroot.
212 </para>
213 </section>
214
215 <section id='sysroot'>
216 <title>Sysroots</title>
217
218 <para>
219 The native and target sysroots contain needed headers and libraries
220 for generating binaries that run on the target architecture.
221 The target sysroot is based on the target root filesystem image
222 that is built by the OpenEmbedded build system and uses the same
223 metadata configuration used to build the cross-toolchain.
224 </para>
225 </section>
226
227 <section id='the-qemu-emulator'>
228 <title>The QEMU Emulator</title>
229
230 <para>
231 The QEMU emulator allows you to simulate your hardware while
232 running your application or image.
233 QEMU is not part of the SDK but is made available a number of
234 different ways:
235 <itemizedlist>
236 <listitem><para>
237 If you have cloned the <filename>poky</filename> Git
238 repository to create a
239 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
240 and you have sourced the environment setup script, QEMU is
241 installed and automatically available.
242 </para></listitem>
243 <listitem><para>
244 If you have downloaded a Yocto Project release and unpacked
245 it to create a Source Directory and you have sourced the
246 environment setup script, QEMU is installed and
247 automatically available.
248 </para></listitem>
249 <listitem><para>
250 If you have installed the cross-toolchain tarball and you
251 have sourced the toolchain's setup environment script, QEMU
252 is also installed and automatically available.
253 </para></listitem>
254 </itemizedlist>
255 </para>
256 </section>
257</section>
258
259<section id='sdk-development-model'>
260 <title>SDK Development Model</title>
261
262 <para>
263 Fundamentally, the SDK fits into the development process as follows:
264 <imagedata fileref="figures/sdk-environment.png" align="center" width="6in" depth="5in" scalefit="100" />
265 The SDK is installed on any machine and can be used to develop
266 applications, images, and kernels.
267 An SDK can even be used by a QA Engineer or Release Engineer.
268 The fundamental concept is that the machine that has the SDK installed
269 does not have to be associated with the machine that has the
270 Yocto Project installed.
271 A developer can independently compile and test an object on their
272 machine and then, when the object is ready for integration into an
273 image, they can simply make it available to the machine that has the
274 Yocto Project.
275 Once the object is available, the image can be rebuilt using the
276 Yocto Project to produce the modified image.
277 </para>
278
279 <para>
280 You just need to follow these general steps:
281 <orderedlist>
282 <listitem><para>
283 <emphasis>Install the SDK for your target hardware:</emphasis>
284 For information on how to install the SDK, see the
285 "<link linkend='sdk-installing-the-sdk'>Installing the SDK</link>"
286 section.
287 </para></listitem>
288 <listitem><para>
289 <emphasis>Download or Build the Target Image:</emphasis>
290 The Yocto Project supports several target architectures
291 and has many pre-built kernel images and root filesystem
292 images.</para>
293
294 <para>If you are going to develop your application on
295 hardware, go to the
296 <ulink url='&YOCTO_MACHINES_DL_URL;'><filename>machines</filename></ulink>
297 download area and choose a target machine area
298 from which to download the kernel image and root filesystem.
299 This download area could have several files in it that
300 support development using actual hardware.
301 For example, the area might contain
302 <filename>.hddimg</filename> files that combine the
303 kernel image with the filesystem, boot loaders, and
304 so forth.
305 Be sure to get the files you need for your particular
306 development process.</para>
307
308 <para>If you are going to develop your application and
309 then run and test it using the QEMU emulator, go to the
310 <ulink url='&YOCTO_QEMU_DL_URL;'><filename>machines/qemu</filename></ulink>
311 download area.
312 From this area, go down into the directory for your
313 target architecture (e.g. <filename>qemux86_64</filename>
314 for an <trademark class='registered'>Intel</trademark>-based
315 64-bit architecture).
316 Download the kernel, root filesystem, and any other files you
317 need for your process.
318 <note>
319 To use the root filesystem in QEMU, you need to extract it.
320 See the
321 "<link linkend='sdk-extracting-the-root-filesystem'>Extracting the Root Filesystem</link>"
322 section for information on how to extract the root
323 filesystem.
324 </note>
325 </para></listitem>
326 <listitem><para>
327 <emphasis>Develop and Test your Application:</emphasis>
328 At this point, you have the tools to develop your application.
329 If you need to separately install and use the QEMU emulator,
330 you can go to
331 <ulink url='http://wiki.qemu.org/Main_Page'>QEMU Home Page</ulink>
332 to download and learn about the emulator.
333 See the
334 "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-manual-qemu'>Using the Quick EMUlator (QEMU)</ulink>"
335 chapter in the Yocto Project Development Tasks Manual
336 for information on using QEMU within the Yocto
337 Project.
338 </para></listitem>
339 </orderedlist>
340 </para>
341
342 <para>
343 The remainder of this manual describes how to use the extensible
344 and standard SDKs.
345 Information also exists in appendix form that describes how you can
346 build, install, and modify an SDK.
347 </para>
348</section>
349
350</chapter>
351<!--
352vim: expandtab tw=80 ts=4
353-->
diff --git a/documentation/sdk-manual/sdk-manual-customization.xsl b/documentation/sdk-manual/sdk-manual-customization.xsl
deleted file mode 100644
index 4f8816f950..0000000000
--- a/documentation/sdk-manual/sdk-manual-customization.xsl
+++ /dev/null
@@ -1,28 +0,0 @@
1<?xml version='1.0'?>
2<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
3
4<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
5
6 <xsl:import href="http://downloads.yoctoproject.org/mirror/docbook-mirror/docbook-xsl-1.76.1/xhtml/docbook.xsl" />
7
8<!--
9 <xsl:import href="../template/1.76.1/docbook-xsl-1.76.1/xhtml/docbook.xsl" />
10
11 <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.76.1/xhtml/docbook.xsl" />
12
13-->
14
15 <xsl:include href="../template/permalinks.xsl"/>
16 <xsl:include href="../template/section.title.xsl"/>
17 <xsl:include href="../template/component.title.xsl"/>
18 <xsl:include href="../template/division.title.xsl"/>
19 <xsl:include href="../template/formal.object.heading.xsl"/>
20
21 <xsl:param name="html.stylesheet" select="'sdk-style.css'" />
22 <xsl:param name="chapter.autolabel" select="1" />
23 <xsl:param name="appendix.autolabel">A</xsl:param>
24 <xsl:param name="section.autolabel" select="1" />
25 <xsl:param name="section.label.includes.component.label" select="1" />
26 <xsl:param name="generate.id.attributes" select="1" />
27
28</xsl:stylesheet>
diff --git a/documentation/sdk-manual/sdk-manual.xml b/documentation/sdk-manual/sdk-manual.xml
deleted file mode 100755
index 6344478fb0..0000000000
--- a/documentation/sdk-manual/sdk-manual.xml
+++ /dev/null
@@ -1,159 +0,0 @@
1<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<book id='sdk-manual' lang='en'
7 xmlns:xi="http://www.w3.org/2003/XInclude"
8 xmlns="http://docbook.org/ns/docbook"
9 >
10 <bookinfo>
11
12 <mediaobject>
13 <imageobject>
14 <imagedata fileref='figures/sdk-title.png'
15 format='SVG'
16 align='left' scalefit='1' width='100%'/>
17 </imageobject>
18 </mediaobject>
19
20 <title>
21 Yocto Project Application Development and the Extensible Software Development Kit (eSDK)
22 </title>
23
24 <authorgroup>
25 <author>
26 <affiliation>
27 <orgname>&ORGNAME;</orgname>
28 </affiliation>
29 <email>&ORGEMAIL;</email>
30 </author>
31 </authorgroup>
32
33 <revhistory>
34 <revision>
35 <revnumber>2.1</revnumber>
36 <date>April 2016</date>
37 <revremark>The initial document released with the Yocto Project 2.1 Release.</revremark>
38 </revision>
39 <revision>
40 <revnumber>2.2</revnumber>
41 <date>October 2016</date>
42 <revremark>Released with the Yocto Project 2.2 Release.</revremark>
43 </revision>
44 <revision>
45 <revnumber>2.3</revnumber>
46 <date>May 2017</date>
47 <revremark>Released with the Yocto Project 2.3 Release.</revremark>
48 </revision>
49 <revision>
50 <revnumber>2.4</revnumber>
51 <date>October 2017</date>
52 <revremark>Released with the Yocto Project 2.4 Release.</revremark>
53 </revision>
54 <revision>
55 <revnumber>2.5</revnumber>
56 <date>May 2018</date>
57 <revremark>Released with the Yocto Project 2.5 Release.</revremark>
58 </revision>
59 <revision>
60 <revnumber>2.6</revnumber>
61 <date>November 2018</date>
62 <revremark>Released with the Yocto Project 2.6 Release.</revremark>
63 </revision>
64 <revision>
65 <revnumber>2.7</revnumber>
66 <date>May 2019</date>
67 <revremark>Released with the Yocto Project 2.7 Release.</revremark>
68 </revision>
69 <revision>
70 <revnumber>3.0</revnumber>
71 <date>October 2019</date>
72 <revremark>Released with the Yocto Project 3.0 Release.</revremark>
73 </revision>
74 <revision>
75 <revnumber>3.1</revnumber>
76 <date>&REL_MONTH_YEAR;</date>
77 <revremark>Released with the Yocto Project 3.1 Release.</revremark>
78 </revision>
79 </revhistory>
80
81 <copyright>
82 <year>&COPYRIGHT_YEAR;</year>
83 <holder>Linux Foundation</holder>
84 </copyright>
85
86 <legalnotice>
87 <para>
88 Permission is granted to copy, distribute and/or modify this document under
89 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 &amp; Wales</ulink> as published by Creative Commons.
90 </para>
91 <note><title>Manual Notes</title>
92 <itemizedlist>
93 <listitem><para>
94 This version of the
95 <emphasis>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</emphasis>
96 manual is for the &YOCTO_DOC_VERSION; release of the
97 Yocto Project.
98 To be sure you have the latest version of the manual
99 for this release, go to the
100 <ulink url='&YOCTO_DOCS_URL;'>Yocto Project documentation page</ulink>
101 and select the manual from that site.
102 Manuals from the site are more up-to-date than manuals
103 derived from the Yocto Project released TAR files.
104 </para></listitem>
105 <listitem><para>
106 If you located this manual through a web search, the
107 version of the manual might not be the one you want
108 (e.g. the search might have returned a manual much
109 older than the Yocto Project version with which you
110 are working).
111 You can see all Yocto Project major releases by
112 visiting the
113 <ulink url='&YOCTO_WIKI_URL;/wiki/Releases'>Releases</ulink>
114 page.
115 If you need a version of this manual for a different
116 Yocto Project release, visit the
117 <ulink url='&YOCTO_DOCS_URL;'>Yocto Project documentation page</ulink>
118 and select the manual set by using the
119 "ACTIVE RELEASES DOCUMENTATION" or "DOCUMENTS ARCHIVE"
120 pull-down menus.
121 </para></listitem>
122 <listitem>
123 <para>
124 To report any inaccuracies or problems with this
125 (or any other Yocto Project) manual, send an email to
126 the Yocto Project documentation mailing list at
127 <filename>docs@lists.yoctoproject.org</filename> or
128 log into the freenode <filename>#yocto</filename> channel.
129 </para>
130 </listitem>
131 </itemizedlist>
132 </note>
133 </legalnotice>
134
135 </bookinfo>
136
137 <xi:include href="sdk-intro.xml"/>
138
139 <xi:include href="sdk-extensible.xml"/>
140
141 <xi:include href="sdk-using.xml"/>
142
143 <xi:include href="sdk-working-projects.xml"/>
144
145 <xi:include href="sdk-appendix-obtain.xml"/>
146
147 <xi:include href="sdk-appendix-customizing.xml"/>
148
149 <xi:include href="sdk-appendix-customizing-standard.xml"/>
150
151<!-- <index id='index'>
152 <title>Index</title>
153 </index>
154-->
155
156</book>
157<!--
158vim: expandtab tw=80 ts=4
159-->
diff --git a/documentation/sdk-manual/sdk-style.css b/documentation/sdk-manual/sdk-style.css
deleted file mode 100644
index e0c4416a15..0000000000
--- a/documentation/sdk-manual/sdk-style.css
+++ /dev/null
@@ -1,991 +0,0 @@
1/*
2
3 SPDX-License-Identifier: CC-BY-2.0-UK
4
5 Generic XHTML / DocBook XHTML CSS Stylesheet.
6
7 Browser wrangling and typographic design by
8 Oyvind Kolas / pippin@gimp.org
9
10 Customised for Poky by
11 Matthew Allum / mallum@o-hand.com
12
13 Thanks to:
14 Liam R. E. Quin
15 William Skaggs
16 Jakub Steiner
17
18 Structure
19 ---------
20
21 The stylesheet is divided into the following sections:
22
23 Positioning
24 Margins, paddings, width, font-size, clearing.
25 Decorations
26 Borders, style
27 Colors
28 Colors
29 Graphics
30 Graphical backgrounds
31 Nasty IE tweaks
32 Workarounds needed to make it work in internet explorer,
33 currently makes the stylesheet non validating, but up until
34 this point it is validating.
35 Mozilla extensions
36 Transparency for footer
37 Rounded corners on boxes
38
39*/
40
41
42 /*************** /
43 / Positioning /
44/ ***************/
45
46body {
47 font-family: Verdana, Sans, sans-serif;
48
49 min-width: 640px;
50 width: 80%;
51 margin: 0em auto;
52 padding: 2em 5em 5em 5em;
53 color: #333;
54}
55
56h1,h2,h3,h4,h5,h6,h7 {
57 font-family: Arial, Sans;
58 color: #00557D;
59 clear: both;
60}
61
62h1 {
63 font-size: 2em;
64 text-align: left;
65 padding: 0em 0em 0em 0em;
66 margin: 2em 0em 0em 0em;
67}
68
69h2.subtitle {
70 margin: 0.10em 0em 3.0em 0em;
71 padding: 0em 0em 0em 0em;
72 font-size: 1.8em;
73 padding-left: 20%;
74 font-weight: normal;
75 font-style: italic;
76}
77
78h2 {
79 margin: 2em 0em 0.66em 0em;
80 padding: 0.5em 0em 0em 0em;
81 font-size: 1.5em;
82 font-weight: bold;
83}
84
85h3.subtitle {
86 margin: 0em 0em 1em 0em;
87 padding: 0em 0em 0em 0em;
88 font-size: 142.14%;
89 text-align: right;
90}
91
92h3 {
93 margin: 1em 0em 0.5em 0em;
94 padding: 1em 0em 0em 0em;
95 font-size: 140%;
96 font-weight: bold;
97}
98
99h4 {
100 margin: 1em 0em 0.5em 0em;
101 padding: 1em 0em 0em 0em;
102 font-size: 120%;
103 font-weight: bold;
104}
105
106h5 {
107 margin: 1em 0em 0.5em 0em;
108 padding: 1em 0em 0em 0em;
109 font-size: 110%;
110 font-weight: bold;
111}
112
113h6 {
114 margin: 1em 0em 0em 0em;
115 padding: 1em 0em 0em 0em;
116 font-size: 110%;
117 font-weight: bold;
118}
119
120.authorgroup {
121 background-color: transparent;
122 background-repeat: no-repeat;
123 padding-top: 256px;
124 background-image: url("figures/sdk-title.png");
125 background-position: left top;
126 margin-top: -256px;
127 padding-right: 50px;
128 margin-left: 0px;
129 text-align: right;
130 width: 740px;
131}
132
133h3.author {
134 margin: 0em 0me 0em 0em;
135 padding: 0em 0em 0em 0em;
136 font-weight: normal;
137 font-size: 100%;
138 color: #333;
139 clear: both;
140}
141
142.author tt.email {
143 font-size: 66%;
144}
145
146.titlepage hr {
147 width: 0em;
148 clear: both;
149}
150
151.revhistory {
152 padding-top: 2em;
153 clear: both;
154}
155
156.toc,
157.list-of-tables,
158.list-of-examples,
159.list-of-figures {
160 padding: 1.33em 0em 2.5em 0em;
161 color: #00557D;
162}
163
164.toc p,
165.list-of-tables p,
166.list-of-figures p,
167.list-of-examples p {
168 padding: 0em 0em 0em 0em;
169 padding: 0em 0em 0.3em;
170 margin: 1.5em 0em 0em 0em;
171}
172
173.toc p b,
174.list-of-tables p b,
175.list-of-figures p b,
176.list-of-examples p b{
177 font-size: 100.0%;
178 font-weight: bold;
179}
180
181.toc dl,
182.list-of-tables dl,
183.list-of-figures dl,
184.list-of-examples dl {
185 margin: 0em 0em 0.5em 0em;
186 padding: 0em 0em 0em 0em;
187}
188
189.toc dt {
190 margin: 0em 0em 0em 0em;
191 padding: 0em 0em 0em 0em;
192}
193
194.toc dd {
195 margin: 0em 0em 0em 2.6em;
196 padding: 0em 0em 0em 0em;
197}
198
199div.glossary dl,
200div.variablelist dl {
201}
202
203.glossary dl dt,
204.variablelist dl dt,
205.variablelist dl dt span.term {
206 font-weight: normal;
207 width: 20em;
208 text-align: right;
209}
210
211.variablelist dl dt {
212 margin-top: 0.5em;
213}
214
215.glossary dl dd,
216.variablelist dl dd {
217 margin-top: -1em;
218 margin-left: 25.5em;
219}
220
221.glossary dd p,
222.variablelist dd p {
223 margin-top: 0em;
224 margin-bottom: 1em;
225}
226
227
228div.calloutlist table td {
229 padding: 0em 0em 0em 0em;
230 margin: 0em 0em 0em 0em;
231}
232
233div.calloutlist table td p {
234 margin-top: 0em;
235 margin-bottom: 1em;
236}
237
238div p.copyright {
239 text-align: left;
240}
241
242div.legalnotice p.legalnotice-title {
243 margin-bottom: 0em;
244}
245
246p {
247 line-height: 1.5em;
248 margin-top: 0em;
249
250}
251
252dl {
253 padding-top: 0em;
254}
255
256hr {
257 border: solid 1px;
258}
259
260
261.mediaobject,
262.mediaobjectco {
263 text-align: center;
264}
265
266img {
267 border: none;
268}
269
270ul {
271 padding: 0em 0em 0em 1.5em;
272}
273
274ul li {
275 padding: 0em 0em 0em 0em;
276}
277
278ul li p {
279 text-align: left;
280}
281
282table {
283 width :100%;
284}
285
286th {
287 padding: 0.25em;
288 text-align: left;
289 font-weight: normal;
290 vertical-align: top;
291}
292
293td {
294 padding: 0.25em;
295 vertical-align: top;
296}
297
298p a[id] {
299 margin: 0px;
300 padding: 0px;
301 display: inline;
302 background-image: none;
303}
304
305a {
306 text-decoration: underline;
307 color: #444;
308}
309
310pre {
311 overflow: auto;
312}
313
314a:hover {
315 text-decoration: underline;
316 /*font-weight: bold;*/
317}
318
319/* This style defines how the permalink character
320 appears by itself and when hovered over with
321 the mouse. */
322
323[alt='Permalink'] { color: #eee; }
324[alt='Permalink']:hover { color: black; }
325
326
327div.informalfigure,
328div.informalexample,
329div.informaltable,
330div.figure,
331div.table,
332div.example {
333 margin: 1em 0em;
334 padding: 1em;
335 page-break-inside: avoid;
336}
337
338
339div.informalfigure p.title b,
340div.informalexample p.title b,
341div.informaltable p.title b,
342div.figure p.title b,
343div.example p.title b,
344div.table p.title b{
345 padding-top: 0em;
346 margin-top: 0em;
347 font-size: 100%;
348 font-weight: normal;
349}
350
351.mediaobject .caption,
352.mediaobject .caption p {
353 text-align: center;
354 font-size: 80%;
355 padding-top: 0.5em;
356 padding-bottom: 0.5em;
357}
358
359.epigraph {
360 padding-left: 55%;
361 margin-bottom: 1em;
362}
363
364.epigraph p {
365 text-align: left;
366}
367
368.epigraph .quote {
369 font-style: italic;
370}
371.epigraph .attribution {
372 font-style: normal;
373 text-align: right;
374}
375
376span.application {
377 font-style: italic;
378}
379
380.programlisting {
381 font-family: monospace;
382 font-size: 80%;
383 white-space: pre;
384 margin: 1.33em 0em;
385 padding: 1.33em;
386}
387
388.tip,
389.warning,
390.caution,
391.note {
392 margin-top: 1em;
393 margin-bottom: 1em;
394
395}
396
397/* force full width of table within div */
398.tip table,
399.warning table,
400.caution table,
401.note table {
402 border: none;
403 width: 100%;
404}
405
406
407.tip table th,
408.warning table th,
409.caution table th,
410.note table th {
411 padding: 0.8em 0.0em 0.0em 0.0em;
412 margin : 0em 0em 0em 0em;
413}
414
415.tip p,
416.warning p,
417.caution p,
418.note p {
419 margin-top: 0.5em;
420 margin-bottom: 0.5em;
421 padding-right: 1em;
422 text-align: left;
423}
424
425.acronym {
426 text-transform: uppercase;
427}
428
429b.keycap,
430.keycap {
431 padding: 0.09em 0.3em;
432 margin: 0em;
433}
434
435.itemizedlist li {
436 clear: none;
437}
438
439.filename {
440 font-size: medium;
441 font-family: Courier, monospace;
442}
443
444
445div.navheader, div.heading{
446 position: absolute;
447 left: 0em;
448 top: 0em;
449 width: 100%;
450 background-color: #cdf;
451 width: 100%;
452}
453
454div.navfooter, div.footing{
455 position: fixed;
456 left: 0em;
457 bottom: 0em;
458 background-color: #eee;
459 width: 100%;
460}
461
462
463div.navheader td,
464div.navfooter td {
465 font-size: 66%;
466}
467
468div.navheader table th {
469 /*font-family: Georgia, Times, serif;*/
470 /*font-size: x-large;*/
471 font-size: 80%;
472}
473
474div.navheader table {
475 border-left: 0em;
476 border-right: 0em;
477 border-top: 0em;
478 width: 100%;
479}
480
481div.navfooter table {
482 border-left: 0em;
483 border-right: 0em;
484 border-bottom: 0em;
485 width: 100%;
486}
487
488div.navheader table td a,
489div.navfooter table td a {
490 color: #777;
491 text-decoration: none;
492}
493
494/* normal text in the footer */
495div.navfooter table td {
496 color: black;
497}
498
499div.navheader table td a:visited,
500div.navfooter table td a:visited {
501 color: #444;
502}
503
504
505/* links in header and footer */
506div.navheader table td a:hover,
507div.navfooter table td a:hover {
508 text-decoration: underline;
509 background-color: transparent;
510 color: #33a;
511}
512
513div.navheader hr,
514div.navfooter hr {
515 display: none;
516}
517
518
519.qandaset tr.question td p {
520 margin: 0em 0em 1em 0em;
521 padding: 0em 0em 0em 0em;
522}
523
524.qandaset tr.answer td p {
525 margin: 0em 0em 1em 0em;
526 padding: 0em 0em 0em 0em;
527}
528.answer td {
529 padding-bottom: 1.5em;
530}
531
532.emphasis {
533 font-weight: bold;
534}
535
536
537 /************* /
538 / decorations /
539/ *************/
540
541.titlepage {
542}
543
544.part .title {
545}
546
547.subtitle {
548 border: none;
549}
550
551/*
552h1 {
553 border: none;
554}
555
556h2 {
557 border-top: solid 0.2em;
558 border-bottom: solid 0.06em;
559}
560
561h3 {
562 border-top: 0em;
563 border-bottom: solid 0.06em;
564}
565
566h4 {
567 border: 0em;
568 border-bottom: solid 0.06em;
569}
570
571h5 {
572 border: 0em;
573}
574*/
575
576.programlisting {
577 border: solid 1px;
578}
579
580div.figure,
581div.table,
582div.informalfigure,
583div.informaltable,
584div.informalexample,
585div.example {
586 border: 1px solid;
587}
588
589
590
591.tip,
592.warning,
593.caution,
594.note {
595 border: 1px solid;
596}
597
598.tip table th,
599.warning table th,
600.caution table th,
601.note table th {
602 border-bottom: 1px solid;
603}
604
605.question td {
606 border-top: 1px solid black;
607}
608
609.answer {
610}
611
612
613b.keycap,
614.keycap {
615 border: 1px solid;
616}
617
618
619div.navheader, div.heading{
620 border-bottom: 1px solid;
621}
622
623
624div.navfooter, div.footing{
625 border-top: 1px solid;
626}
627
628 /********* /
629 / colors /
630/ *********/
631
632body {
633 color: #333;
634 background: white;
635}
636
637a {
638 background: transparent;
639}
640
641a:hover {
642 background-color: #dedede;
643}
644
645
646h1,
647h2,
648h3,
649h4,
650h5,
651h6,
652h7,
653h8 {
654 background-color: transparent;
655}
656
657hr {
658 border-color: #aaa;
659}
660
661
662.tip, .warning, .caution, .note {
663 border-color: #fff;
664}
665
666
667.tip table th,
668.warning table th,
669.caution table th,
670.note table th {
671 border-bottom-color: #fff;
672}
673
674
675.warning {
676 background-color: #f0f0f2;
677}
678
679.caution {
680 background-color: #f0f0f2;
681}
682
683.tip {
684 background-color: #f0f0f2;
685}
686
687.note {
688 background-color: #f0f0f2;
689}
690
691.writernotes {
692 color: #ff0000;
693}
694
695.glossary dl dt,
696.variablelist dl dt,
697.variablelist dl dt span.term {
698 color: #044;
699}
700
701div.figure,
702div.table,
703div.example,
704div.informalfigure,
705div.informaltable,
706div.informalexample {
707 border-color: #aaa;
708}
709
710pre.programlisting {
711 color: black;
712 background-color: #fff;
713 border-color: #aaa;
714 border-width: 2px;
715}
716
717.guimenu,
718.guilabel,
719.guimenuitem {
720 background-color: #eee;
721}
722
723
724b.keycap,
725.keycap {
726 background-color: #eee;
727 border-color: #999;
728}
729
730
731div.navheader {
732 border-color: black;
733}
734
735
736div.navfooter {
737 border-color: black;
738}
739
740
741 /*********** /
742 / graphics /
743/ ***********/
744
745/*
746body {
747 background-image: url("images/body_bg.jpg");
748 background-attachment: fixed;
749}
750
751.navheader,
752.note,
753.tip {
754 background-image: url("images/note_bg.jpg");
755 background-attachment: fixed;
756}
757
758.warning,
759.caution {
760 background-image: url("images/warning_bg.jpg");
761 background-attachment: fixed;
762}
763
764.figure,
765.informalfigure,
766.example,
767.informalexample,
768.table,
769.informaltable {
770 background-image: url("images/figure_bg.jpg");
771 background-attachment: fixed;
772}
773
774*/
775h1,
776h2,
777h3,
778h4,
779h5,
780h6,
781h7{
782}
783
784/*
785Example of how to stick an image as part of the title.
786
787div.article .titlepage .title
788{
789 background-image: url("figures/white-on-black.png");
790 background-position: center;
791 background-repeat: repeat-x;
792}
793*/
794
795div.preface .titlepage .title,
796div.colophon .title,
797div.chapter .titlepage .title,
798div.article .titlepage .title
799{
800}
801
802div.section div.section .titlepage .title,
803div.sect2 .titlepage .title {
804 background: none;
805}
806
807
808h1.title {
809 background-color: transparent;
810 background-repeat: no-repeat;
811 height: 256px;
812 text-indent: -9000px;
813 overflow:hidden;
814}
815
816h2.subtitle {
817 background-color: transparent;
818 text-indent: -9000px;
819 overflow:hidden;
820 width: 0px;
821 display: none;
822}
823
824 /*************************************** /
825 / pippin.gimp.org specific alterations /
826/ ***************************************/
827
828/*
829div.heading, div.navheader {
830 color: #777;
831 font-size: 80%;
832 padding: 0;
833 margin: 0;
834 text-align: left;
835 position: absolute;
836 top: 0px;
837 left: 0px;
838 width: 100%;
839 height: 50px;
840 background: url('/gfx/heading_bg.png') transparent;
841 background-repeat: repeat-x;
842 background-attachment: fixed;
843 border: none;
844}
845
846div.heading a {
847 color: #444;
848}
849
850div.footing, div.navfooter {
851 border: none;
852 color: #ddd;
853 font-size: 80%;
854 text-align:right;
855
856 width: 100%;
857 padding-top: 10px;
858 position: absolute;
859 bottom: 0px;
860 left: 0px;
861
862 background: url('/gfx/footing_bg.png') transparent;
863}
864*/
865
866
867
868 /****************** /
869 / nasty ie tweaks /
870/ ******************/
871
872/*
873div.heading, div.navheader {
874 width:expression(document.body.clientWidth + "px");
875}
876
877div.footing, div.navfooter {
878 width:expression(document.body.clientWidth + "px");
879 margin-left:expression("-5em");
880}
881body {
882 padding:expression("4em 5em 0em 5em");
883}
884*/
885
886 /**************************************** /
887 / mozilla vendor specific css extensions /
888/ ****************************************/
889/*
890div.navfooter, div.footing{
891 -moz-opacity: 0.8em;
892}
893
894div.figure,
895div.table,
896div.informalfigure,
897div.informaltable,
898div.informalexample,
899div.example,
900.tip,
901.warning,
902.caution,
903.note {
904 -moz-border-radius: 0.5em;
905}
906
907b.keycap,
908.keycap {
909 -moz-border-radius: 0.3em;
910}
911*/
912
913table tr td table tr td {
914 display: none;
915}
916
917
918hr {
919 display: none;
920}
921
922table {
923 border: 0em;
924}
925
926 .photo {
927 float: right;
928 margin-left: 1.5em;
929 margin-bottom: 1.5em;
930 margin-top: 0em;
931 max-width: 17em;
932 border: 1px solid gray;
933 padding: 3px;
934 background: white;
935}
936 .seperator {
937 padding-top: 2em;
938 clear: both;
939 }
940
941 #validators {
942 margin-top: 5em;
943 text-align: right;
944 color: #777;
945 }
946 @media print {
947 body {
948 font-size: 8pt;
949 }
950 .noprint {
951 display: none;
952 }
953 }
954
955
956.tip,
957.note {
958 background: #f0f0f2;
959 color: #333;
960 padding: 20px;
961 margin: 20px;
962}
963
964.tip h3,
965.note h3 {
966 padding: 0em;
967 margin: 0em;
968 font-size: 2em;
969 font-weight: bold;
970 color: #333;
971}
972
973.tip a,
974.note a {
975 color: #333;
976 text-decoration: underline;
977}
978
979.footnote {
980 font-size: small;
981 color: #333;
982}
983
984/* Changes the announcement text */
985.tip h3,
986.warning h3,
987.caution h3,
988.note h3 {
989 font-size:large;
990 color: #00557D;
991}
diff --git a/documentation/sdk-manual/sdk-using.xml b/documentation/sdk-manual/sdk-using.xml
deleted file mode 100644
index 28ee50d0b7..0000000000
--- a/documentation/sdk-manual/sdk-using.xml
+++ /dev/null
@@ -1,201 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='sdk-using-the-standard-sdk'>
7 <title>Using the Standard SDK</title>
8
9 <para>
10 This chapter describes the standard SDK and how to install it.
11 Information includes unique installation and setup aspects for the
12 standard SDK.
13 <note>
14 For a side-by-side comparison of main features supported for a
15 standard SDK as compared to an extensible SDK, see the
16 "<link linkend='sdk-manual-intro'>Introduction</link>"
17 section.
18 </note>
19 </para>
20
21 <para>
22 You can use a standard SDK to work on Makefile and Autotools-based
23 projects.
24 See the
25 "<link linkend='sdk-working-projects'>Using the SDK Toolchain Directly</link>"
26 chapter for more information.
27 </para>
28
29 <section id='sdk-standard-sdk-intro'>
30 <title>Why use the Standard SDK and What is in It?</title>
31
32 <para>
33 The Standard SDK provides a cross-development toolchain and
34 libraries tailored to the contents of a specific image.
35 You would use the Standard SDK if you want a more traditional
36 toolchain experience as compared to the extensible SDK, which
37 provides an internal build system and the
38 <filename>devtool</filename> functionality.
39 </para>
40
41 <para>
42 The installed Standard SDK consists of several files and
43 directories.
44 Basically, it contains an SDK environment setup script, some
45 configuration files, and host and target root filesystems to
46 support usage.
47 You can see the directory structure in the
48 "<link linkend='sdk-installed-standard-sdk-directory-structure'>Installed Standard SDK Directory Structure</link>"
49 section.
50 </para>
51 </section>
52
53 <section id='sdk-installing-the-sdk'>
54 <title>Installing the SDK</title>
55
56 <para>
57 The first thing you need to do is install the SDK on your
58 <ulink url='&YOCTO_DOCS_REF_URL;#hardware-build-system-term'>Build Host</ulink>
59 by running the <filename>*.sh</filename> installation script.
60 </para>
61
62 <para>
63 You can download a tarball installer, which includes the
64 pre-built toolchain, the <filename>runqemu</filename>
65 script, and support files from the appropriate
66 <ulink url='&YOCTO_TOOLCHAIN_DL_URL;'>toolchain</ulink>
67 directory within the Index of Releases.
68 Toolchains are available for several 32-bit and 64-bit
69 architectures with the <filename>x86_64</filename> directories,
70 respectively.
71 The toolchains the Yocto Project provides are based off the
72 <filename>core-image-sato</filename> and
73 <filename>core-image-minimal</filename> images and contain
74 libraries appropriate for developing against that image.
75 </para>
76
77 <para>
78 The names of the tarball installer scripts are such that a
79 string representing the host system appears first in the
80 filename and then is immediately followed by a string
81 representing the target architecture.
82 <literallayout class='monospaced'>
83 poky-glibc-<replaceable>host_system</replaceable>-<replaceable>image_type</replaceable>-<replaceable>arch</replaceable>-toolchain-<replaceable>release_version</replaceable>.sh
84
85 Where:
86 <replaceable>host_system</replaceable> is a string representing your development system:
87
88 i686 or x86_64.
89
90 <replaceable>image_type</replaceable> is the image for which the SDK was built:
91
92 core-image-minimal or core-image-sato.
93
94 <replaceable>arch</replaceable> is a string representing the tuned target architecture:
95
96 aarch64, armv5e, core2-64, i586, mips32r2, mips64, ppc7400, or cortexa8hf-neon.
97
98 <replaceable>release_version</replaceable> is a string representing the release number of the Yocto Project:
99
100 &DISTRO;, &DISTRO;+snapshot
101 </literallayout>
102 For example, the following SDK installer is for a 64-bit
103 development host system and a i586-tuned target architecture
104 based off the SDK for <filename>core-image-sato</filename> and
105 using the current &DISTRO; snapshot:
106 <literallayout class='monospaced'>
107 poky-glibc-x86_64-core-image-sato-i586-toolchain-&DISTRO;.sh
108 </literallayout>
109 <note>
110 As an alternative to downloading an SDK, you can build the
111 SDK installer.
112 For information on building the installer, see the
113 "<link linkend='sdk-building-an-sdk-installer'>Building an SDK Installer</link>"
114 section.
115 </note>
116 </para>
117
118 <para>
119 The SDK and toolchains are self-contained and by default are
120 installed into the <filename>poky_sdk</filename> folder in your
121 home directory.
122 You can choose to install the extensible SDK in any location when
123 you run the installer.
124 However, because files need to be written under that directory
125 during the normal course of operation, the location you choose
126 for installation must be writable for whichever
127 users need to use the SDK.
128 </para>
129
130 <para>
131 The following command shows how to run the installer given a
132 toolchain tarball for a 64-bit x86 development host system and
133 a 64-bit x86 target architecture.
134 The example assumes the SDK installer is located in
135 <filename>~/Downloads/</filename> and has execution rights.
136 <note>
137 If you do not have write permissions for the directory
138 into which you are installing the SDK, the installer
139 notifies you and exits.
140 For that case, set up the proper permissions in the directory
141 and run the installer again.
142 </note>
143 <literallayout class='monospaced'>
144 $ ./Downloads/poky-glibc-x86_64-core-image-sato-i586-toolchain-&DISTRO;.sh
145 Poky (Yocto Project Reference Distro) SDK installer version &DISTRO;
146 ===============================================================
147 Enter target directory for SDK (default: /opt/poky/&DISTRO;):
148 You are about to install the SDK to "/opt/poky/&DISTRO;". Proceed [Y/n]? Y
149 Extracting SDK........................................ ..............................done
150 Setting it up...done
151 SDK has been successfully set up and is ready to be used.
152 Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.
153 $ . /opt/poky/&DISTRO;/environment-setup-i586-poky-linux
154 </literallayout>
155 </para>
156
157 <para>
158 Again, reference the
159 "<link linkend='sdk-installed-standard-sdk-directory-structure'>Installed Standard SDK Directory Structure</link>"
160 section for more details on the resulting directory structure of
161 the installed SDK.
162 </para>
163 </section>
164
165 <section id='sdk-running-the-sdk-environment-setup-script'>
166 <title>Running the SDK Environment Setup Script</title>
167
168 <para>
169 Once you have the SDK installed, you must run the SDK environment
170 setup script before you can actually use the SDK.
171 This setup script resides in the directory you chose when you
172 installed the SDK, which is either the default
173 <filename>/opt/poky/&DISTRO;</filename> directory or the directory
174 you chose during installation.
175 </para>
176
177 <para>
178 Before running the script, be sure it is the one that matches the
179 architecture for which you are developing.
180 Environment setup scripts begin with the string
181 "<filename>environment-setup</filename>" and include as part of
182 their name the tuned target architecture.
183 As an example, the following commands set the working directory
184 to where the SDK was installed and then source the environment
185 setup script.
186 In this example, the setup script is for an IA-based
187 target machine using i586 tuning:
188 <literallayout class='monospaced'>
189 $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux
190 </literallayout>
191 When you run the setup script, the same environment variables are
192 defined as are when you run the setup script for an extensible SDK.
193 See the
194 "<link linkend='sdk-running-the-extensible-sdk-environment-setup-script'>Running the Extensible SDK Environment Setup Script</link>"
195 section for more information.
196 </para>
197 </section>
198</chapter>
199<!--
200vim: expandtab tw=80 ts=4
201-->
diff --git a/documentation/sdk-manual/sdk-working-projects.xml b/documentation/sdk-manual/sdk-working-projects.xml
deleted file mode 100644
index 070d903c73..0000000000
--- a/documentation/sdk-manual/sdk-working-projects.xml
+++ /dev/null
@@ -1,511 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='sdk-working-projects'>
7
8 <title>Using the SDK Toolchain Directly</title>
9
10 <para>
11 You can use the SDK toolchain directly with Makefile and
12 Autotools-based projects.
13 </para>
14
15 <section id='autotools-based-projects'>
16 <title>Autotools-Based Projects</title>
17
18 <para>
19 Once you have a suitable
20 <ulink url='&YOCTO_DOCS_REF_URL;#cross-development-toolchain'>cross-development toolchain</ulink>
21 installed, it is very easy to develop a project using the
22 <ulink url='https://en.wikipedia.org/wiki/GNU_Build_System'>GNU Autotools-based</ulink>
23 workflow, which is outside of the
24 <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>.
25 </para>
26
27 <para>
28 The following figure presents a simple Autotools workflow.
29 <imagedata fileref="figures/sdk-autotools-flow.png" width="7in" height="8in" align="center" />
30 </para>
31
32 <para>
33 Follow these steps to create a simple Autotools-based
34 "Hello World" project:
35 <note>
36 For more information on the GNU Autotools workflow,
37 see the same example on the
38 <ulink url='https://developer.gnome.org/anjuta-build-tutorial/stable/create-autotools.html.en'>GNOME Developer</ulink>
39 site.
40 </note>
41 <orderedlist>
42 <listitem><para>
43 <emphasis>Create a Working Directory and Populate It:</emphasis>
44 Create a clean directory for your project and then make
45 that directory your working location.
46 <literallayout class='monospaced'>
47 $ mkdir $HOME/helloworld
48 $ cd $HOME/helloworld
49 </literallayout>
50 After setting up the directory, populate it with files
51 needed for the flow.
52 You need a project source file, a file to help with
53 configuration, and a file to help create the Makefile,
54 and a README file:
55 <filename>hello.c</filename>,
56 <filename>configure.ac</filename>,
57 <filename>Makefile.am</filename>, and
58 <filename>README</filename>, respectively.</para>
59
60 <para> Use the following command to create an empty README
61 file, which is required by GNU Coding Standards:
62 <literallayout class='monospaced'>
63 $ touch README
64 </literallayout>
65 Create the remaining three files as follows:
66 <itemizedlist>
67 <listitem><para>
68 <emphasis><filename>hello.c</filename>:</emphasis>
69 <literallayout class='monospaced'>
70 #include &lt;stdio.h&gt;
71
72 main()
73 {
74 printf("Hello World!\n");
75 }
76 </literallayout>
77 </para></listitem>
78 <listitem><para>
79 <emphasis><filename>configure.ac</filename>:</emphasis>
80 <literallayout class='monospaced'>
81 AC_INIT(hello,0.1)
82 AM_INIT_AUTOMAKE([foreign])
83 AC_PROG_CC
84 AC_CONFIG_FILES(Makefile)
85 AC_OUTPUT
86 </literallayout>
87 </para></listitem>
88 <listitem><para>
89 <emphasis><filename>Makefile.am</filename>:</emphasis>
90 <literallayout class='monospaced'>
91 bin_PROGRAMS = hello
92 hello_SOURCES = hello.c
93 </literallayout>
94 </para></listitem>
95 </itemizedlist>
96 </para></listitem>
97 <listitem><para>
98 <emphasis>Source the Cross-Toolchain
99 Environment Setup File:</emphasis>
100 As described earlier in the manual, installing the
101 cross-toolchain creates a cross-toolchain
102 environment setup script in the directory that the SDK
103 was installed.
104 Before you can use the tools to develop your project,
105 you must source this setup script.
106 The script begins with the string "environment-setup"
107 and contains the machine architecture, which is
108 followed by the string "poky-linux".
109 For this example, the command sources a script from the
110 default SDK installation directory that uses the
111 32-bit Intel x86 Architecture and the
112 &DISTRO_NAME; Yocto Project release:
113 <literallayout class='monospaced'>
114 $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux
115 </literallayout>
116 </para></listitem>
117 <listitem><para>
118 <emphasis>Create the <filename>configure</filename> Script:</emphasis>
119 Use the <filename>autoreconf</filename> command to
120 generate the <filename>configure</filename> script.
121 <literallayout class='monospaced'>
122 $ autoreconf
123 </literallayout>
124 The <filename>autoreconf</filename> tool takes care
125 of running the other Autotools such as
126 <filename>aclocal</filename>,
127 <filename>autoconf</filename>, and
128 <filename>automake</filename>.
129 <note>
130 If you get errors from
131 <filename>configure.ac</filename>, which
132 <filename>autoreconf</filename> runs, that indicate
133 missing files, you can use the "-i" option, which
134 ensures missing auxiliary files are copied to the build
135 host.
136 </note>
137 </para></listitem>
138 <listitem><para>
139 <emphasis>Cross-Compile the Project:</emphasis>
140 This command compiles the project using the
141 cross-compiler.
142 The
143 <ulink url='&YOCTO_DOCS_REF_URL;#var-CONFIGURE_FLAGS'><filename>CONFIGURE_FLAGS</filename></ulink>
144 environment variable provides the minimal arguments for
145 GNU configure:
146 <literallayout class='monospaced'>
147 $ ./configure ${CONFIGURE_FLAGS}
148 </literallayout>
149 For an Autotools-based project, you can use the
150 cross-toolchain by just passing the appropriate host
151 option to <filename>configure.sh</filename>.
152 The host option you use is derived from the name of the
153 environment setup script found in the directory in which
154 you installed the cross-toolchain.
155 For example, the host option for an ARM-based target that
156 uses the GNU EABI is
157 <filename>armv5te-poky-linux-gnueabi</filename>.
158 You will notice that the name of the script is
159 <filename>environment-setup-armv5te-poky-linux-gnueabi</filename>.
160 Thus, the following command works to update your project
161 and rebuild it using the appropriate cross-toolchain tools:
162 <literallayout class='monospaced'>
163 $ ./configure --host=armv5te-poky-linux-gnueabi --with-libtool-sysroot=<replaceable>sysroot_dir</replaceable>
164 </literallayout>
165 </para></listitem>
166 <listitem><para>
167 <emphasis>Make and Install the Project:</emphasis>
168 These two commands generate and install the project
169 into the destination directory:
170 <literallayout class='monospaced'>
171 $ make
172 $ make install DESTDIR=./tmp
173 </literallayout>
174 <note>
175 To learn about environment variables established
176 when you run the cross-toolchain environment setup
177 script and how they are used or overridden when
178 the Makefile, see the
179 "<link linkend='makefile-based-projects'>Makefile-Based Projects</link>"
180 section.
181 </note>
182 This next command is a simple way to verify the
183 installation of your project.
184 Running the command prints the architecture on which
185 the binary file can run.
186 This architecture should be the same architecture that
187 the installed cross-toolchain supports.
188 <literallayout class='monospaced'>
189 $ file ./tmp/usr/local/bin/hello
190 </literallayout>
191 </para></listitem>
192 <listitem><para>
193 <emphasis>Execute Your Project:</emphasis>
194 To execute the project, you would need to run it on your
195 target hardware.
196 If your target hardware happens to be your build host,
197 you could run the project as follows:
198 <literallayout class='monospaced'>
199 $ ./tmp/usr/local/bin/hello
200 </literallayout>
201 As expected, the project displays the "Hello World!"
202 message.
203 </para></listitem>
204 </orderedlist>
205 </para>
206 </section>
207
208 <section id='makefile-based-projects'>
209 <title>Makefile-Based Projects</title>
210
211 <para>
212 Simple Makefile-based projects use and interact with the
213 cross-toolchain environment variables established when you run
214 the cross-toolchain environment setup script.
215 The environment variables are subject to general
216 <filename>make</filename> rules.
217 </para>
218
219 <para>
220 This section presents a simple Makefile development flow and
221 provides an example that lets you see how you can use
222 cross-toolchain environment variables and Makefile variables
223 during development.
224 <imagedata fileref="figures/sdk-makefile-flow.png" width="6in" height="7in" align="center" />
225 </para>
226
227 <para>
228 The main point of this section is to explain the following three
229 cases regarding variable behavior:
230 <itemizedlist>
231 <listitem><para>
232 <emphasis>Case 1 - No Variables Set in the
233 <filename>Makefile</filename> Map to Equivalent
234 Environment Variables Set in the SDK Setup Script:</emphasis>
235 Because matching variables are not specifically set in the
236 <filename>Makefile</filename>, the variables retain their
237 values based on the environment setup script.
238 </para></listitem>
239 <listitem><para>
240 <emphasis>Case 2 - Variables Are Set in the Makefile that
241 Map to Equivalent Environment Variables from the SDK
242 Setup Script:</emphasis>
243 Specifically setting matching variables in the
244 <filename>Makefile</filename> during the build results in
245 the environment settings of the variables being
246 overwritten.
247 In this case, the variables you set in the
248 <filename>Makefile</filename> are used.
249 </para></listitem>
250 <listitem><para>
251 <emphasis>Case 3 - Variables Are Set Using the Command Line
252 that Map to Equivalent Environment Variables from the
253 SDK Setup Script:</emphasis>
254 Executing the <filename>Makefile</filename> from the
255 command line results in the environment variables being
256 overwritten.
257 In this case, the command-line content is used.
258 </para></listitem>
259 </itemizedlist>
260 <note>
261 Regardless of how you set your variables, if you use
262 the "-e" option with <filename>make</filename>, the
263 variables from the SDK setup script take precedence:
264 <literallayout class='monospaced'>
265 $ make -e <replaceable>target</replaceable>
266 </literallayout>
267 </note>
268 </para>
269
270 <para>
271 The remainder of this section presents a simple Makefile example
272 that demonstrates these variable behaviors.
273 </para>
274
275 <para>
276 In a new shell environment variables are not established for the
277 SDK until you run the setup script.
278 For example, the following commands show a null value for the
279 compiler variable (i.e.
280 <ulink url='&YOCTO_DOCS_REF_URL;#var-CC'><filename>CC</filename></ulink>).
281 <literallayout class='monospaced'>
282 $ echo ${CC}
283
284 $
285 </literallayout>
286 Running the SDK setup script for a 64-bit build host and an
287 i586-tuned target architecture for a
288 <filename>core-image-sato</filename> image using the current
289 &DISTRO; Yocto Project release and then echoing that variable
290 shows the value established through the script:
291 <literallayout class='monospaced'>
292 $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux
293 $ echo ${CC}
294 i586-poky-linux-gcc -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux
295 </literallayout>
296 </para>
297
298 <para>
299 To illustrate variable use, work through this simple "Hello World!"
300 example:
301 <orderedlist>
302 <listitem><para>
303 <emphasis>Create a Working Directory and Populate It:</emphasis>
304 Create a clean directory for your project and then make
305 that directory your working location.
306 <literallayout class='monospaced'>
307 $ mkdir $HOME/helloworld
308 $ cd $HOME/helloworld
309 </literallayout>
310 After setting up the directory, populate it with files
311 needed for the flow.
312 You need a <filename>main.c</filename> file from which you
313 call your function, a <filename>module.h</filename> file
314 to contain headers, and a <filename>module.c</filename>
315 that defines your function.
316 </para>
317
318 <para>Create the three files as follows:
319 <itemizedlist>
320 <listitem><para>
321 <emphasis><filename>main.c</filename>:</emphasis>
322 <literallayout class='monospaced'>
323 #include "module.h"
324 void sample_func();
325 int main()
326 {
327 sample_func();
328 return 0;
329 }
330 </literallayout>
331 </para></listitem>
332 <listitem><para>
333 <emphasis><filename>module.h</filename>:</emphasis>
334 <literallayout class='monospaced'>
335 #include &lt;stdio.h&gt;
336 void sample_func();
337 </literallayout>
338 </para></listitem>
339 <listitem><para>
340 <emphasis><filename>module.c</filename>:</emphasis>
341 <literallayout class='monospaced'>
342 #include "module.h"
343 void sample_func()
344 {
345 printf("Hello World!");
346 printf("\n");
347 }
348 </literallayout>
349 </para></listitem>
350 </itemizedlist>
351 </para></listitem>
352 <listitem><para>
353 <emphasis>Source the Cross-Toolchain Environment Setup File:</emphasis>
354 As described earlier in the manual, installing the
355 cross-toolchain creates a cross-toolchain environment setup
356 script in the directory that the SDK was installed.
357 Before you can use the tools to develop your project,
358 you must source this setup script.
359 The script begins with the string "environment-setup"
360 and contains the machine architecture, which is
361 followed by the string "poky-linux".
362 For this example, the command sources a script from the
363 default SDK installation directory that uses the
364 32-bit Intel x86 Architecture and the
365 &DISTRO_NAME; Yocto Project release:
366 <literallayout class='monospaced'>
367 $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux
368 </literallayout>
369 </para></listitem>
370 <listitem><para>
371 <emphasis>Create the <filename>Makefile</filename>:</emphasis>
372 For this example, the Makefile contains two lines that
373 can be used to set the <filename>CC</filename> variable.
374 One line is identical to the value that is set when you
375 run the SDK environment setup script, and the other line
376 sets <filename>CC</filename> to "gcc", the default GNU
377 compiler on the build host:
378 <literallayout class='monospaced'>
379 # CC=i586-poky-linux-gcc -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux
380 # CC="gcc"
381 all: main.o module.o
382 ${CC} main.o module.o -o target_bin
383 main.o: main.c module.h
384 ${CC} -I . -c main.c
385 module.o: module.c module.h
386 ${CC} -I . -c module.c
387 clean:
388 rm -rf *.o
389 rm target_bin
390 </literallayout>
391 </para></listitem>
392 <listitem><para>
393 <emphasis>Make the Project:</emphasis>
394 Use the <filename>make</filename> command to create the
395 binary output file.
396 Because variables are commented out in the Makefile,
397 the value used for <filename>CC</filename> is the value
398 set when the SDK environment setup file was run:
399 <literallayout class='monospaced'>
400 $ make
401 i586-poky-linux-gcc -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux -I . -c main.c
402 i586-poky-linux-gcc -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux -I . -c module.c
403 i586-poky-linux-gcc -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux main.o module.o -o target_bin
404 </literallayout>
405 From the results of the previous command, you can see that
406 the compiler used was the compiler established through
407 the <filename>CC</filename> variable defined in the
408 setup script.</para>
409
410 <para>You can override the <filename>CC</filename>
411 environment variable with the same variable as set from
412 the Makefile by uncommenting the line in the Makefile
413 and running <filename>make</filename> again.
414 <literallayout class='monospaced'>
415 $ make clean
416 rm -rf *.o
417 rm target_bin
418 #
419 # Edit the Makefile by uncommenting the line that sets CC to "gcc"
420 #
421 $ make
422 gcc -I . -c main.c
423 gcc -I . -c module.c
424 gcc main.o module.o -o target_bin
425 </literallayout>
426 As shown in the previous example, the cross-toolchain
427 compiler is not used.
428 Rather, the default compiler is used.</para>
429
430 <para>This next case shows how to override a variable
431 by providing the variable as part of the command line.
432 Go into the Makefile and re-insert the comment character
433 so that running <filename>make</filename> uses
434 the established SDK compiler.
435 However, when you run <filename>make</filename>, use a
436 command-line argument to set <filename>CC</filename>
437 to "gcc":
438 <literallayout class='monospaced'>
439 $ make clean
440 rm -rf *.o
441 rm target_bin
442 #
443 # Edit the Makefile to comment out the line setting CC to "gcc"
444 #
445 $ make
446 i586-poky-linux-gcc -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux -I . -c main.c
447 i586-poky-linux-gcc -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux -I . -c module.c
448 i586-poky-linux-gcc -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux main.o module.o -o target_bin
449 $ make clean
450 rm -rf *.o
451 rm target_bin
452 $ make CC="gcc"
453 gcc -I . -c main.c
454 gcc -I . -c module.c
455 gcc main.o module.o -o target_bin
456 </literallayout>
457 In the previous case, the command-line argument overrides
458 the SDK environment variable.</para>
459
460 <para>In this last case, edit Makefile again to use the
461 "gcc" compiler but then use the "-e" option on the
462 <filename>make</filename> command line:
463 <literallayout class='monospaced'>
464 $ make clean
465 rm -rf *.o
466 rm target_bin
467 #
468 # Edit the Makefile to use "gcc"
469 #
470 $ make
471 gcc -I . -c main.c
472 gcc -I . -c module.c
473 gcc main.o module.o -o target_bin
474 $ make clean
475 rm -rf *.o
476 rm target_bin
477 $ make -e
478 i586-poky-linux-gcc -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux -I . -c main.c
479 i586-poky-linux-gcc -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux -I . -c module.c
480 i586-poky-linux-gcc -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux main.o module.o -o target_bin
481 </literallayout>
482 In the previous case, the "-e" option forces
483 <filename>make</filename> to use the SDK environment
484 variables regardless of the values in the Makefile.
485 </para></listitem>
486 <listitem><para>
487 <emphasis>Execute Your Project:</emphasis>
488 To execute the project (i.e.
489 <filename>target_bin</filename>), use the following
490 command:
491 <literallayout class='monospaced'>
492 $ ./target_bin
493 Hello World!
494 </literallayout>
495 <note>
496 If you used the cross-toolchain compiler to build
497 <filename>target_bin</filename> and your build host
498 differs in architecture from that of the target
499 machine, you need to run your project on the target
500 device.
501 </note>
502 As expected, the project displays the "Hello World!"
503 message.
504 </para></listitem>
505 </orderedlist>
506 </para>
507 </section>
508</chapter>
509<!--
510vim: expandtab tw=80 ts=4
511-->
diff --git a/documentation/template/Vera.xml b/documentation/template/Vera.xml
deleted file mode 100644
index 3c82043e35..0000000000
--- a/documentation/template/Vera.xml
+++ /dev/null
@@ -1 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?><font-metrics type="TYPE0"><font-name>BitstreamVeraSans</font-name><embed/><cap-height>729</cap-height><x-height>546</x-height><ascender>928</ascender><descender>-235</descender><bbox><left>-183</left><bottom>-235</bottom><right>1287</right><top>928</top></bbox><flags>32</flags><stemv>0</stemv><italicangle>0</italicangle><subtype>TYPE0</subtype><multibyte-extras><cid-type>CIDFontType2</cid-type><default-width>0</default-width><bfranges><bf gi="3" ue="126" us="32"/><bf gi="172" ue="160" us="160"/><bf gi="163" ue="161" us="161"/><bf gi="132" ue="163" us="162"/><bf gi="189" ue="164" us="164"/><bf gi="150" ue="165" us="165"/><bf gi="231" ue="166" us="166"/><bf gi="134" ue="167" us="167"/><bf gi="142" ue="168" us="168"/><bf gi="139" ue="169" us="169"/><bf gi="157" ue="170" us="170"/><bf gi="169" ue="171" us="171"/><bf gi="164" ue="172" us="172"/><bf gi="256" ue="173" us="173"/><bf gi="138" ue="174" us="174"/><bf gi="217" ue="175" us="175"/><bf gi="131" ue="176" us="176"/><bf gi="147" ue="177" us="177"/><bf gi="241" ue="179" us="178"/><bf gi="141" ue="180" us="180"/><bf gi="151" ue="181" us="181"/><bf gi="136" ue="182" us="182"/><bf gi="195" ue="183" us="183"/><bf gi="221" ue="184" us="184"/><bf gi="240" ue="185" us="185"/><bf gi="158" ue="186" us="186"/><bf gi="170" ue="187" us="187"/><bf gi="243" ue="190" us="188"/><bf gi="162" ue="191" us="191"/><bf gi="173" ue="192" us="192"/><bf gi="201" ue="193" us="193"/><bf gi="199" ue="194" us="194"/><bf gi="174" ue="195" us="195"/><bf gi="98" ue="197" us="196"/><bf gi="144" ue="198" us="198"/><bf gi="100" ue="199" us="199"/><bf gi="203" ue="200" us="200"/><bf gi="101" ue="201" us="201"/><bf gi="200" ue="202" us="202"/><bf gi="202" ue="203" us="203"/><bf gi="207" ue="204" us="204"/><bf gi="204" ue="207" us="205"/><bf gi="232" ue="208" us="208"/><bf gi="102" ue="209" us="209"/><bf gi="210" ue="210" us="210"/><bf gi="208" ue="212" us="211"/><bf gi="175" ue="213" us="213"/><bf gi="103" ue="214" us="214"/><bf gi="239" ue="215" us="215"/><bf gi="145" ue="216" us="216"/><bf gi="213" ue="217" us="217"/><bf gi="211" ue="219" us="218"/><bf gi="104" ue="220" us="220"/><bf gi="234" ue="221" us="221"/><bf gi="236" ue="222" us="222"/><bf gi="137" ue="223" us="223"/><bf gi="106" ue="224" us="224"/><bf gi="105" ue="225" us="225"/><bf gi="107" ue="226" us="226"/><bf gi="109" ue="227" us="227"/><bf gi="108" ue="228" us="228"/><bf gi="110" ue="229" us="229"/><bf gi="160" ue="230" us="230"/><bf gi="111" ue="231" us="231"/><bf gi="113" ue="232" us="232"/><bf gi="112" ue="233" us="233"/><bf gi="114" ue="235" us="234"/><bf gi="117" ue="236" us="236"/><bf gi="116" ue="237" us="237"/><bf gi="118" ue="239" us="238"/><bf gi="233" ue="240" us="240"/><bf gi="120" ue="241" us="241"/><bf gi="122" ue="242" us="242"/><bf gi="121" ue="243" us="243"/><bf gi="123" ue="244" us="244"/><bf gi="125" ue="245" us="245"/><bf gi="124" ue="246" us="246"/><bf gi="184" ue="247" us="247"/><bf gi="161" ue="248" us="248"/><bf gi="127" ue="249" us="249"/><bf gi="126" ue="250" us="250"/><bf gi="128" ue="252" us="251"/><bf gi="235" ue="253" us="253"/><bf gi="237" ue="254" us="254"/><bf gi="186" ue="255" us="255"/><bf gi="251" ue="263" us="262"/><bf gi="253" ue="269" us="268"/><bf gi="0" ue="270" us="270"/><bf gi="0" ue="271" us="271"/><bf gi="0" ue="272" us="272"/><bf gi="255" ue="273" us="273"/><bf gi="246" ue="287" us="286"/><bf gi="248" ue="304" us="304"/><bf gi="214" ue="305" us="305"/><bf gi="225" ue="322" us="321"/><bf gi="176" ue="339" us="338"/><bf gi="249" ue="351" us="350"/><bf gi="227" ue="353" us="352"/><bf gi="187" ue="376" us="376"/><bf gi="229" ue="382" us="381"/><bf gi="166" ue="402" us="402"/><bf gi="215" ue="710" us="710"/><bf gi="224" ue="711" us="711"/><bf gi="218" ue="730" us="728"/><bf gi="223" ue="731" us="731"/><bf gi="216" ue="732" us="732"/><bf gi="222" ue="733" us="733"/><bf gi="159" ue="937" us="937"/><bf gi="155" ue="960" us="960"/><bf gi="178" ue="8212" us="8211"/><bf gi="0" ue="8213" us="8213"/><bf gi="0" ue="8214" us="8214"/><bf gi="0" ue="8215" us="8215"/><bf gi="182" ue="8217" us="8216"/><bf gi="196" ue="8218" us="8218"/><bf gi="0" ue="8219" us="8219"/><bf gi="180" ue="8221" us="8220"/><bf gi="197" ue="8222" us="8222"/><bf gi="0" ue="8223" us="8223"/><bf gi="130" ue="8224" us="8224"/><bf gi="194" ue="8225" us="8225"/><bf gi="135" ue="8226" us="8226"/><bf gi="0" ue="8227" us="8227"/><bf gi="0" ue="8228" us="8228"/><bf gi="0" ue="8229" us="8229"/><bf gi="171" ue="8230" us="8230"/><bf gi="198" ue="8240" us="8240"/><bf gi="190" ue="8250" us="8249"/><bf gi="258" ue="8364" us="8364"/><bf gi="140" ue="8482" us="8482"/><bf gi="152" ue="8706" us="8706"/><bf gi="0" ue="8707" us="8707"/><bf gi="0" ue="8708" us="8708"/><bf gi="0" ue="8709" us="8709"/><bf gi="168" ue="8710" us="8710"/><bf gi="154" ue="8719" us="8719"/><bf gi="0" ue="8720" us="8720"/><bf gi="153" ue="8721" us="8721"/><bf gi="238" ue="8722" us="8722"/><bf gi="0" ue="8723" us="8723"/><bf gi="0" ue="8724" us="8724"/><bf gi="188" ue="8725" us="8725"/><bf gi="0" ue="8726" us="8726"/><bf gi="0" ue="8727" us="8727"/><bf gi="0" ue="8728" us="8728"/><bf gi="257" ue="8729" us="8729"/><bf gi="165" ue="8730" us="8730"/><bf gi="0" ue="8731" us="8731"/><bf gi="0" ue="8732" us="8732"/><bf gi="0" ue="8733" us="8733"/><bf gi="146" ue="8734" us="8734"/><bf gi="156" ue="8747" us="8747"/><bf gi="167" ue="8776" us="8776"/><bf gi="143" ue="8800" us="8800"/><bf gi="0" ue="8801" us="8801"/><bf gi="0" ue="8802" us="8802"/><bf gi="0" ue="8803" us="8803"/><bf gi="148" ue="8805" us="8804"/><bf gi="185" ue="9674" us="9674"/><bf gi="192" ue="64258" us="64257"/><bf gi="0" ue="65535" us="65535"/></bfranges><cid-widths start-index="0"><wx w="600"/><wx w="0"/><wx w="317"/><wx w="317"/><wx w="400"/><wx w="459"/><wx w="837"/><wx w="636"/><wx w="950"/><wx w="779"/><wx w="274"/><wx w="390"/><wx w="390"/><wx w="500"/><wx w="837"/><wx w="317"/><wx w="360"/><wx w="317"/><wx w="336"/><wx w="636"/><wx w="636"/><wx w="636"/><wx w="636"/><wx w="636"/><wx w="636"/><wx w="636"/><wx w="636"/><wx w="636"/><wx w="636"/><wx w="336"/><wx w="336"/><wx w="837"/><wx w="837"/><wx w="837"/><wx w="530"/><wx w="1000"/><wx w="684"/><wx w="686"/><wx w="698"/><wx w="770"/><wx w="631"/><wx w="575"/><wx w="774"/><wx w="751"/><wx w="294"/><wx w="294"/><wx w="655"/><wx w="557"/><wx w="862"/><wx w="748"/><wx w="787"/><wx w="603"/><wx w="787"/><wx w="694"/><wx w="634"/><wx w="610"/><wx w="731"/><wx w="684"/><wx w="988"/><wx w="685"/><wx w="610"/><wx w="685"/><wx w="390"/><wx w="336"/><wx w="390"/><wx w="837"/><wx w="500"/><wx w="500"/><wx w="612"/><wx w="634"/><wx w="549"/><wx w="634"/><wx w="615"/><wx w="352"/><wx w="634"/><wx w="633"/><wx w="277"/><wx w="277"/><wx w="579"/><wx w="277"/><wx w="974"/><wx w="633"/><wx w="611"/><wx w="634"/><wx w="634"/><wx w="411"/><wx w="520"/><wx w="392"/><wx w="633"/><wx w="591"/><wx w="817"/><wx w="591"/><wx w="591"/><wx w="524"/><wx w="636"/><wx w="336"/><wx w="636"/><wx w="837"/><wx w="684"/><wx w="684"/><wx w="698"/><wx w="631"/><wx w="748"/><wx w="787"/><wx w="731"/><wx w="612"/><wx w="612"/><wx w="612"/><wx w="612"/><wx w="612"/><wx w="612"/><wx w="549"/><wx w="615"/><wx w="615"/><wx w="615"/><wx w="615"/><wx w="277"/><wx w="277"/><wx w="277"/><wx w="277"/><wx w="633"/><wx w="611"/><wx w="611"/><wx w="611"/><wx w="611"/><wx w="611"/><wx w="633"/><wx w="633"/><wx w="633"/><wx w="633"/><wx w="500"/><wx w="500"/><wx w="636"/><wx w="636"/><wx w="500"/><wx w="589"/><wx w="636"/><wx w="629"/><wx w="1000"/><wx w="1000"/><wx w="1000"/><wx w="500"/><wx w="500"/><wx w="837"/><wx w="974"/><wx w="787"/><wx w="833"/><wx w="837"/><wx w="837"/><wx w="837"/><wx w="636"/><wx w="636"/><wx w="517"/><wx w="673"/><wx w="756"/><wx w="588"/><wx w="520"/><wx w="471"/><wx w="471"/><wx w="764"/><wx w="981"/><wx w="611"/><wx w="530"/><wx w="400"/><wx w="837"/><wx w="637"/><wx w="636"/><wx w="837"/><wx w="668"/><wx w="611"/><wx w="611"/><wx w="1000"/><wx w="636"/><wx w="684"/><wx w="684"/><wx w="787"/><wx w="1069"/><wx w="1022"/><wx w="500"/><wx w="1000"/><wx w="518"/><wx w="518"/><wx w="317"/><wx w="317"/><wx w="837"/><wx w="494"/><wx w="591"/><wx w="610"/><wx w="166"/><wx w="636"/><wx w="399"/><wx w="399"/><wx w="629"/><wx w="629"/><wx w="500"/><wx w="317"/><wx w="317"/><wx w="518"/><wx w="1341"/><wx w="684"/><wx w="631"/><wx w="684"/><wx w="631"/><wx w="631"/><wx w="294"/><wx w="294"/><wx w="294"/><wx w="294"/><wx w="787"/><wx w="787"/><wx w="787"/><wx w="731"/><wx w="731"/><wx w="731"/><wx w="277"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="562"/><wx w="284"/><wx w="634"/><wx w="520"/><wx w="685"/><wx w="524"/><wx w="336"/><wx w="774"/><wx w="611"/><wx w="610"/><wx w="591"/><wx w="604"/><wx w="634"/><wx w="837"/><wx w="837"/><wx w="400"/><wx w="400"/><wx w="400"/><wx w="969"/><wx w="969"/><wx w="969"/><wx w="774"/><wx w="634"/><wx w="294"/><wx w="634"/><wx w="520"/><wx w="698"/><wx w="549"/><wx w="698"/><wx w="549"/><wx w="634"/><wx w="360"/><wx w="317"/><wx w="636"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="400"/><wx w="500"/><wx w="500"/></cid-widths></multibyte-extras><kerning kpx1="246"><pair kern="-21" kpx2="180"/><pair kern="-17" kpx2="169"/><pair kern="-26" kpx2="197"/><pair kern="-35" kpx2="55"/><pair kern="-49" kpx2="60"/><pair kern="-49" kpx2="187"/><pair kern="-21" kpx2="181"/><pair kern="-17" kpx2="170"/><pair kern="-49" kpx2="234"/></kerning><kerning kpx1="235"><pair kern="-142" kpx2="17"/><pair kern="-17" kpx2="169"/><pair kern="-146" kpx2="197"/><pair kern="-17" kpx2="16"/><pair kern="-72" kpx2="29"/><pair kern="-17" kpx2="170"/></kerning><kerning kpx1="43"><pair kern="-35" kpx2="180"/><pair kern="-17" kpx2="17"/><pair kern="-35" kpx2="197"/><pair kern="-30" kpx2="181"/></kerning><kerning kpx1="16"><pair kern="36" kpx2="246"/><pair kern="-17" kpx2="235"/><pair kern="-21" kpx2="199"/><pair kern="18" kpx2="123"/><pair kern="27" kpx2="208"/><pair kern="-118" kpx2="187"/><pair kern="-49" kpx2="59"/><pair kern="18" kpx2="124"/><pair kern="-21" kpx2="201"/><pair kern="-118" kpx2="60"/><pair kern="36" kpx2="52"/><pair kern="18" kpx2="125"/><pair kern="36" kpx2="42"/><pair kern="-118" kpx2="234"/><pair kern="18" kpx2="122"/><pair kern="27" kpx2="210"/><pair kern="-21" kpx2="36"/><pair kern="18" kpx2="82"/><pair kern="-40" kpx2="58"/><pair kern="-91" kpx2="55"/><pair kern="-17" kpx2="186"/><pair kern="27" kpx2="175"/><pair kern="27" kpx2="50"/><pair kern="27" kpx2="209"/><pair kern="27" kpx2="103"/><pair kern="-21" kpx2="98"/><pair kern="55" kpx2="45"/><pair kern="-21" kpx2="173"/><pair kern="-17" kpx2="92"/><pair kern="-26" kpx2="89"/><pair kern="18" kpx2="121"/><pair kern="-58" kpx2="57"/><pair kern="-35" kpx2="37"/><pair kern="-21" kpx2="174"/></kerning><kerning kpx1="112"><pair kern="-17" kpx2="91"/></kerning><kerning kpx1="123"><pair kern="-72" kpx2="180"/><pair kern="-17" kpx2="17"/><pair kern="-63" kpx2="197"/><pair kern="18" kpx2="16"/><pair kern="-30" kpx2="91"/><pair kern="-35" kpx2="181"/></kerning><kerning kpx1="251"><pair kern="-17" kpx2="169"/><pair kern="-17" kpx2="60"/><pair kern="-17" kpx2="187"/><pair kern="18" kpx2="181"/><pair kern="-17" kpx2="170"/><pair kern="-17" kpx2="234"/></kerning><kerning kpx1="213"><pair kern="-17" kpx2="229"/><pair kern="-17" kpx2="61"/></kerning><kerning kpx1="208"><pair kern="-17" kpx2="36"/><pair kern="-17" kpx2="199"/><pair kern="27" kpx2="16"/><pair kern="-54" kpx2="187"/><pair kern="-17" kpx2="98"/><pair kern="-17" kpx2="181"/><pair kern="-63" kpx2="59"/><pair kern="-40" kpx2="17"/><pair kern="-21" kpx2="180"/><pair kern="-17" kpx2="173"/><pair kern="-17" kpx2="169"/><pair kern="-91" kpx2="197"/><pair kern="-17" kpx2="201"/><pair kern="-54" kpx2="60"/><pair kern="-17" kpx2="29"/><pair kern="-17" kpx2="57"/><pair kern="-17" kpx2="174"/><pair kern="-54" kpx2="234"/></kerning><kerning kpx1="187"><pair kern="-114" kpx2="126"/><pair kern="-137" kpx2="107"/><pair kern="-132" kpx2="72"/><pair kern="-77" kpx2="199"/><pair kern="-118" kpx2="16"/><pair kern="-132" kpx2="123"/><pair kern="-132" kpx2="112"/><pair kern="-54" kpx2="251"/><pair kern="-54" kpx2="208"/><pair kern="-132" kpx2="113"/><pair kern="-54" kpx2="180"/><pair kern="-137" kpx2="105"/><pair kern="-114" kpx2="129"/><pair kern="-132" kpx2="124"/><pair kern="-109" kpx2="169"/><pair kern="-77" kpx2="201"/><pair kern="-54" kpx2="253"/><pair kern="-137" kpx2="106"/><pair kern="-132" kpx2="29"/><pair kern="-132" kpx2="125"/><pair kern="-72" kpx2="170"/><pair kern="-132" kpx2="115"/><pair kern="-114" kpx2="88"/><pair kern="-132" kpx2="122"/><pair kern="-54" kpx2="100"/><pair kern="-137" kpx2="68"/><pair kern="-54" kpx2="210"/><pair kern="-77" kpx2="36"/><pair kern="-132" kpx2="82"/><pair kern="-132" kpx2="114"/><pair kern="-54" kpx2="175"/><pair kern="-114" kpx2="127"/><pair kern="-54" kpx2="50"/><pair kern="-54" kpx2="209"/><pair kern="-54" kpx2="103"/><pair kern="-137" kpx2="108"/><pair kern="-77" kpx2="98"/><pair kern="-35" kpx2="76"/><pair kern="-17" kpx2="181"/><pair kern="-202" kpx2="17"/><pair kern="-114" kpx2="128"/><pair kern="-77" kpx2="173"/><pair kern="-137" kpx2="109"/><pair kern="-128" kpx2="197"/><pair kern="-54" kpx2="38"/><pair kern="-132" kpx2="121"/><pair kern="-137" kpx2="110"/><pair kern="-77" kpx2="174"/></kerning><kerning kpx1="113"><pair kern="-17" kpx2="91"/></kerning><kerning kpx1="144"><pair kern="-40" kpx2="180"/><pair kern="-54" kpx2="197"/><pair kern="-44" kpx2="181"/></kerning><kerning kpx1="59"><pair kern="-72" kpx2="100"/><pair kern="-63" kpx2="210"/><pair kern="-17" kpx2="55"/><pair kern="-44" kpx2="114"/><pair kern="-44" kpx2="72"/><pair kern="-63" kpx2="175"/><pair kern="-49" kpx2="16"/><pair kern="-63" kpx2="50"/><pair kern="-63" kpx2="209"/><pair kern="-44" kpx2="112"/><pair kern="-72" kpx2="251"/><pair kern="-63" kpx2="103"/><pair kern="-63" kpx2="208"/><pair kern="-44" kpx2="113"/><pair kern="-40" kpx2="181"/><pair kern="-77" kpx2="180"/><pair kern="-54" kpx2="169"/><pair kern="-21" kpx2="197"/><pair kern="-72" kpx2="38"/><pair kern="-72" kpx2="253"/><pair kern="-44" kpx2="115"/></kerning><kerning kpx1="73"><pair kern="31" kpx2="180"/><pair kern="-17" kpx2="90"/><pair kern="-72" kpx2="17"/><pair kern="-17" kpx2="235"/><pair kern="-35" kpx2="169"/><pair kern="-114" kpx2="197"/><pair kern="-17" kpx2="186"/><pair kern="-17" kpx2="92"/><pair kern="-17" kpx2="87"/><pair kern="-54" kpx2="16"/><pair kern="-35" kpx2="29"/><pair kern="-17" kpx2="170"/></kerning><kerning kpx1="41"><pair kern="-17" kpx2="227"/><pair kern="-54" kpx2="126"/><pair kern="-91" kpx2="107"/><pair kern="-91" kpx2="235"/><pair kern="-54" kpx2="72"/><pair kern="-91" kpx2="199"/><pair kern="-35" kpx2="123"/><pair kern="-54" kpx2="112"/><pair kern="-54" kpx2="113"/><pair kern="-17" kpx2="54"/><pair kern="-21" kpx2="180"/><pair kern="-91" kpx2="105"/><pair kern="-54" kpx2="129"/><pair kern="-35" kpx2="124"/><pair kern="-91" kpx2="201"/><pair kern="-72" kpx2="85"/><pair kern="-91" kpx2="106"/><pair kern="-77" kpx2="29"/><pair kern="-35" kpx2="125"/><pair kern="-54" kpx2="115"/><pair kern="-54" kpx2="88"/><pair kern="-35" kpx2="122"/><pair kern="-91" kpx2="68"/><pair kern="-91" kpx2="36"/><pair kern="-35" kpx2="82"/><pair kern="-91" kpx2="186"/><pair kern="-17" kpx2="55"/><pair kern="-54" kpx2="114"/><pair kern="-54" kpx2="127"/><pair kern="-91" kpx2="108"/><pair kern="-91" kpx2="98"/><pair kern="-72" kpx2="76"/><pair kern="-160" kpx2="17"/><pair kern="-54" kpx2="128"/><pair kern="-91" kpx2="173"/><pair kern="-91" kpx2="109"/><pair kern="-183" kpx2="197"/><pair kern="-91" kpx2="92"/><pair kern="-35" kpx2="121"/><pair kern="-91" kpx2="110"/><pair kern="-91" kpx2="174"/><pair kern="-17" kpx2="249"/></kerning><kerning kpx1="124"><pair kern="-72" kpx2="180"/><pair kern="-17" kpx2="17"/><pair kern="-63" kpx2="197"/><pair kern="18" kpx2="16"/><pair kern="-30" kpx2="91"/><pair kern="-35" kpx2="181"/></kerning><kerning kpx1="169"><pair kern="-17" kpx2="90"/><pair kern="-17" kpx2="100"/><pair kern="-17" kpx2="246"/><pair kern="-17" kpx2="235"/><pair kern="-17" kpx2="58"/><pair kern="-17" kpx2="186"/><pair kern="-54" kpx2="55"/><pair kern="-17" kpx2="251"/><pair kern="-72" kpx2="187"/><pair kern="-17" kpx2="39"/><pair kern="73" kpx2="144"/><pair kern="-17" kpx2="45"/><pair kern="-17" kpx2="92"/><pair kern="-17" kpx2="38"/><pair kern="-72" kpx2="60"/><pair kern="-17" kpx2="89"/><pair kern="-17" kpx2="253"/><pair kern="-54" kpx2="57"/><pair kern="-17" kpx2="37"/><pair kern="-17" kpx2="42"/><pair kern="-72" kpx2="234"/></kerning><kerning kpx1="201"><pair kern="-17" kpx2="246"/><pair kern="-67" kpx2="235"/><pair kern="-21" kpx2="16"/><pair kern="-17" kpx2="112"/><pair kern="-17" kpx2="123"/><pair kern="-17" kpx2="251"/><pair kern="-17" kpx2="113"/><pair kern="-77" kpx2="187"/><pair kern="-17" kpx2="208"/><pair kern="-35" kpx2="73"/><pair kern="-17" kpx2="124"/><pair kern="-35" kpx2="169"/><pair kern="-17" kpx2="252"/><pair kern="-17" kpx2="70"/><pair kern="-77" kpx2="60"/><pair kern="27" kpx2="201"/><pair kern="-17" kpx2="29"/><pair kern="-77" kpx2="234"/><pair kern="-17" kpx2="100"/><pair kern="-17" kpx2="122"/><pair kern="-17" kpx2="210"/><pair kern="-17" kpx2="82"/><pair kern="-54" kpx2="58"/><pair kern="-67" kpx2="186"/><pair kern="-17" kpx2="175"/><pair kern="-17" kpx2="209"/><pair kern="-17" kpx2="103"/><pair kern="27" kpx2="98"/><pair kern="-123" kpx2="181"/><pair kern="-17" kpx2="17"/><pair kern="-17" kpx2="38"/><pair kern="-17" kpx2="84"/><pair kern="-17" kpx2="121"/><pair kern="-63" kpx2="57"/><pair kern="-17" kpx2="254"/><pair kern="-17" kpx2="87"/><pair kern="-17" kpx2="72"/><pair kern="27" kpx2="199"/><pair kern="-17" kpx2="71"/><pair kern="-128" kpx2="180"/><pair kern="-17" kpx2="253"/><pair kern="-17" kpx2="52"/><pair kern="-17" kpx2="125"/><pair kern="-17" kpx2="42"/><pair kern="-17" kpx2="115"/><pair kern="-40" kpx2="90"/><pair kern="-17" kpx2="111"/><pair kern="27" kpx2="36"/><pair kern="-77" kpx2="55"/><pair kern="-17" kpx2="114"/><pair kern="-17" kpx2="50"/><pair kern="27" kpx2="173"/><pair kern="-67" kpx2="92"/><pair kern="22" kpx2="197"/><pair kern="-58" kpx2="89"/><pair kern="27" kpx2="174"/></kerning><kerning kpx1="60"><pair kern="-114" kpx2="126"/><pair kern="-137" kpx2="107"/><pair kern="-132" kpx2="72"/><pair kern="-77" kpx2="199"/><pair kern="-118" kpx2="16"/><pair kern="-132" kpx2="123"/><pair kern="-132" kpx2="112"/><pair kern="-54" kpx2="251"/><pair kern="-54" kpx2="208"/><pair kern="-132" kpx2="113"/><pair kern="-54" kpx2="180"/><pair kern="-137" kpx2="105"/><pair kern="-114" kpx2="129"/><pair kern="-132" kpx2="124"/><pair kern="-109" kpx2="169"/><pair kern="-77" kpx2="201"/><pair kern="-54" kpx2="253"/><pair kern="-137" kpx2="106"/><pair kern="-132" kpx2="29"/><pair kern="-132" kpx2="125"/><pair kern="-72" kpx2="170"/><pair kern="-132" kpx2="115"/><pair kern="-114" kpx2="88"/><pair kern="-132" kpx2="122"/><pair kern="-54" kpx2="100"/><pair kern="-137" kpx2="68"/><pair kern="-54" kpx2="210"/><pair kern="-77" kpx2="36"/><pair kern="-132" kpx2="82"/><pair kern="-132" kpx2="114"/><pair kern="-54" kpx2="175"/><pair kern="-114" kpx2="127"/><pair kern="-54" kpx2="50"/><pair kern="-54" kpx2="209"/><pair kern="-54" kpx2="103"/><pair kern="-137" kpx2="108"/><pair kern="-77" kpx2="98"/><pair kern="-35" kpx2="76"/><pair kern="-17" kpx2="181"/><pair kern="-202" kpx2="17"/><pair kern="-114" kpx2="128"/><pair kern="-77" kpx2="173"/><pair kern="-137" kpx2="109"/><pair kern="-128" kpx2="197"/><pair kern="-54" kpx2="38"/><pair kern="-132" kpx2="121"/><pair kern="-137" kpx2="110"/><pair kern="-77" kpx2="174"/></kerning><kerning kpx1="85"><pair kern="-21" kpx2="254"/><pair kern="-21" kpx2="72"/><pair kern="-63" kpx2="16"/><pair kern="-21" kpx2="112"/><pair kern="-21" kpx2="123"/><pair kern="-17" kpx2="80"/><pair kern="-21" kpx2="113"/><pair kern="-17" kpx2="71"/><pair kern="-21" kpx2="124"/><pair kern="-35" kpx2="169"/><pair kern="-21" kpx2="252"/><pair kern="-21" kpx2="70"/><pair kern="-17" kpx2="85"/><pair kern="-17" kpx2="29"/><pair kern="-21" kpx2="125"/><pair kern="-21" kpx2="115"/><pair kern="-21" kpx2="111"/><pair kern="-21" kpx2="122"/><pair kern="-21" kpx2="82"/><pair kern="-17" kpx2="75"/><pair kern="-21" kpx2="114"/><pair kern="-26" kpx2="91"/><pair kern="-17" kpx2="81"/><pair kern="41" kpx2="181"/><pair kern="-91" kpx2="17"/><pair kern="-151" kpx2="197"/><pair kern="-17" kpx2="74"/><pair kern="-17" kpx2="84"/><pair kern="-21" kpx2="121"/><pair kern="-17" kpx2="247"/><pair kern="-17" kpx2="120"/></kerning><kerning kpx1="61"><pair kern="-17" kpx2="180"/><pair kern="-17" kpx2="197"/><pair kern="-17" kpx2="16"/><pair kern="-17" kpx2="181"/></kerning><kerning kpx1="234"><pair kern="-114" kpx2="126"/><pair kern="-137" kpx2="107"/><pair kern="-132" kpx2="72"/><pair kern="-77" kpx2="199"/><pair kern="-118" kpx2="16"/><pair kern="-132" kpx2="123"/><pair kern="-132" kpx2="112"/><pair kern="-54" kpx2="251"/><pair kern="-54" kpx2="208"/><pair kern="-132" kpx2="113"/><pair kern="-54" kpx2="180"/><pair kern="-137" kpx2="105"/><pair kern="-114" kpx2="129"/><pair kern="-132" kpx2="124"/><pair kern="-109" kpx2="169"/><pair kern="-77" kpx2="201"/><pair kern="-54" kpx2="253"/><pair kern="-137" kpx2="106"/><pair kern="-132" kpx2="29"/><pair kern="-132" kpx2="125"/><pair kern="-72" kpx2="170"/><pair kern="-132" kpx2="115"/><pair kern="-114" kpx2="88"/><pair kern="-132" kpx2="122"/><pair kern="-54" kpx2="100"/><pair kern="-137" kpx2="68"/><pair kern="-54" kpx2="210"/><pair kern="-77" kpx2="36"/><pair kern="-132" kpx2="82"/><pair kern="-132" kpx2="114"/><pair kern="-54" kpx2="175"/><pair kern="-114" kpx2="127"/><pair kern="-54" kpx2="50"/><pair kern="-54" kpx2="209"/><pair kern="-54" kpx2="103"/><pair kern="-137" kpx2="108"/><pair kern="-77" kpx2="98"/><pair kern="-35" kpx2="76"/><pair kern="-17" kpx2="181"/><pair kern="-202" kpx2="17"/><pair kern="-114" kpx2="128"/><pair kern="-77" kpx2="173"/><pair kern="-137" kpx2="109"/><pair kern="-128" kpx2="197"/><pair kern="-54" kpx2="38"/><pair kern="-132" kpx2="121"/><pair kern="-137" kpx2="110"/><pair kern="-77" kpx2="174"/></kerning><kerning kpx1="100"><pair kern="-17" kpx2="169"/><pair kern="-17" kpx2="60"/><pair kern="-17" kpx2="187"/><pair kern="18" kpx2="181"/><pair kern="-17" kpx2="170"/><pair kern="-17" kpx2="234"/></kerning><kerning kpx1="122"><pair kern="-72" kpx2="180"/><pair kern="-17" kpx2="17"/><pair kern="-63" kpx2="197"/><pair kern="18" kpx2="16"/><pair kern="-30" kpx2="91"/><pair kern="-35" kpx2="181"/></kerning><kerning kpx1="47"><pair kern="-17" kpx2="126"/><pair kern="-91" kpx2="235"/><pair kern="-49" kpx2="104"/><pair kern="-17" kpx2="72"/><pair kern="22" kpx2="199"/><pair kern="-17" kpx2="16"/><pair kern="-17" kpx2="112"/><pair kern="-17" kpx2="123"/><pair kern="-49" kpx2="213"/><pair kern="-35" kpx2="208"/><pair kern="-132" kpx2="187"/><pair kern="-17" kpx2="113"/><pair kern="-202" kpx2="180"/><pair kern="-17" kpx2="129"/><pair kern="-17" kpx2="124"/><pair kern="22" kpx2="201"/><pair kern="-132" kpx2="60"/><pair kern="-49" kpx2="211"/><pair kern="-17" kpx2="125"/><pair kern="-17" kpx2="115"/><pair kern="-132" kpx2="234"/><pair kern="-17" kpx2="88"/><pair kern="-17" kpx2="122"/><pair kern="-35" kpx2="210"/><pair kern="22" kpx2="36"/><pair kern="-17" kpx2="82"/><pair kern="-91" kpx2="58"/><pair kern="-91" kpx2="186"/><pair kern="-137" kpx2="55"/><pair kern="-17" kpx2="114"/><pair kern="-35" kpx2="175"/><pair kern="-17" kpx2="127"/><pair kern="-35" kpx2="50"/><pair kern="-35" kpx2="209"/><pair kern="-35" kpx2="103"/><pair kern="22" kpx2="98"/><pair kern="-262" kpx2="181"/><pair kern="-17" kpx2="128"/><pair kern="22" kpx2="173"/><pair kern="-49" kpx2="212"/><pair kern="-91" kpx2="92"/><pair kern="-17" kpx2="121"/><pair kern="-109" kpx2="57"/><pair kern="22" kpx2="174"/><pair kern="-49" kpx2="56"/></kerning><kerning kpx1="210"><pair kern="-17" kpx2="36"/><pair kern="-17" kpx2="199"/><pair kern="27" kpx2="16"/><pair kern="-54" kpx2="187"/><pair kern="-17" kpx2="98"/><pair kern="-17" kpx2="181"/><pair kern="-63" kpx2="59"/><pair kern="-40" kpx2="17"/><pair kern="-21" kpx2="180"/><pair kern="-17" kpx2="173"/><pair kern="-17" kpx2="169"/><pair kern="-91" kpx2="197"/><pair kern="-17" kpx2="201"/><pair kern="-54" kpx2="60"/><pair kern="-17" kpx2="29"/><pair kern="-17" kpx2="57"/><pair kern="-17" kpx2="174"/><pair kern="-54" kpx2="234"/></kerning><kerning kpx1="58"><pair kern="-35" kpx2="126"/><pair kern="-63" kpx2="107"/><pair kern="-17" kpx2="235"/><pair kern="-58" kpx2="72"/><pair kern="-54" kpx2="199"/><pair kern="-40" kpx2="16"/><pair kern="-58" kpx2="112"/><pair kern="-58" kpx2="123"/><pair kern="-58" kpx2="113"/><pair kern="-17" kpx2="180"/><pair kern="-63" kpx2="105"/><pair kern="-35" kpx2="129"/><pair kern="-58" kpx2="124"/><pair kern="-54" kpx2="169"/><pair kern="-54" kpx2="201"/><pair kern="-44" kpx2="85"/><pair kern="-63" kpx2="106"/><pair kern="-58" kpx2="29"/><pair kern="-58" kpx2="125"/><pair kern="-17" kpx2="170"/><pair kern="-58" kpx2="115"/><pair kern="-35" kpx2="88"/><pair kern="-58" kpx2="122"/><pair kern="-63" kpx2="68"/><pair kern="-54" kpx2="36"/><pair kern="-58" kpx2="82"/><pair kern="-17" kpx2="186"/><pair kern="-58" kpx2="114"/><pair kern="-35" kpx2="127"/><pair kern="-63" kpx2="108"/><pair kern="-54" kpx2="98"/><pair kern="-21" kpx2="76"/><pair kern="-114" kpx2="17"/><pair kern="-35" kpx2="128"/><pair kern="-54" kpx2="173"/><pair kern="-63" kpx2="109"/><pair kern="-128" kpx2="197"/><pair kern="-17" kpx2="92"/><pair kern="-58" kpx2="121"/><pair kern="-63" kpx2="110"/><pair kern="-54" kpx2="174"/></kerning><kerning kpx1="82"><pair kern="-72" kpx2="180"/><pair kern="-17" kpx2="17"/><pair kern="-63" kpx2="197"/><pair kern="18" kpx2="16"/><pair kern="-30" kpx2="91"/><pair kern="-35" kpx2="181"/></kerning><kerning kpx1="186"><pair kern="-142" kpx2="17"/><pair kern="-17" kpx2="169"/><pair kern="-146" kpx2="197"/><pair kern="-17" kpx2="16"/><pair kern="-72" kpx2="29"/><pair kern="-17" kpx2="170"/></kerning><kerning kpx1="175"><pair kern="-17" kpx2="36"/><pair kern="-17" kpx2="199"/><pair kern="27" kpx2="16"/><pair kern="-54" kpx2="187"/><pair kern="-17" kpx2="98"/><pair kern="-17" kpx2="181"/><pair kern="-63" kpx2="59"/><pair kern="-40" kpx2="17"/><pair kern="-21" kpx2="180"/><pair kern="-17" kpx2="173"/><pair kern="-17" kpx2="169"/><pair kern="-91" kpx2="197"/><pair kern="-17" kpx2="201"/><pair kern="-54" kpx2="60"/><pair kern="-17" kpx2="29"/><pair kern="-17" kpx2="57"/><pair kern="-17" kpx2="174"/><pair kern="-54" kpx2="234"/></kerning><kerning kpx1="209"><pair kern="-17" kpx2="36"/><pair kern="-17" kpx2="199"/><pair kern="27" kpx2="16"/><pair kern="-54" kpx2="187"/><pair kern="-17" kpx2="98"/><pair kern="-17" kpx2="181"/><pair kern="-63" kpx2="59"/><pair kern="-40" kpx2="17"/><pair kern="-21" kpx2="180"/><pair kern="-17" kpx2="173"/><pair kern="-17" kpx2="169"/><pair kern="-91" kpx2="197"/><pair kern="-17" kpx2="201"/><pair kern="-54" kpx2="60"/><pair kern="-17" kpx2="29"/><pair kern="-17" kpx2="57"/><pair kern="-17" kpx2="174"/><pair kern="-54" kpx2="234"/></kerning><kerning kpx1="103"><pair kern="-17" kpx2="36"/><pair kern="-17" kpx2="199"/><pair kern="27" kpx2="16"/><pair kern="-54" kpx2="187"/><pair kern="-17" kpx2="98"/><pair kern="-17" kpx2="181"/><pair kern="-63" kpx2="59"/><pair kern="-40" kpx2="17"/><pair kern="-21" kpx2="180"/><pair kern="-17" kpx2="173"/><pair kern="-17" kpx2="169"/><pair kern="-91" kpx2="197"/><pair kern="-17" kpx2="201"/><pair kern="-54" kpx2="60"/><pair kern="-17" kpx2="29"/><pair kern="-17" kpx2="57"/><pair kern="-17" kpx2="174"/><pair kern="-54" kpx2="234"/></kerning><kerning kpx1="81"><pair kern="-72" kpx2="180"/><pair kern="-44" kpx2="197"/><pair kern="-54" kpx2="181"/></kerning><kerning kpx1="98"><pair kern="-17" kpx2="246"/><pair kern="-67" kpx2="235"/><pair kern="-21" kpx2="16"/><pair kern="-17" kpx2="112"/><pair kern="-17" kpx2="123"/><pair kern="-17" kpx2="251"/><pair kern="-17" kpx2="113"/><pair kern="-77" kpx2="187"/><pair kern="-17" kpx2="208"/><pair kern="-35" kpx2="73"/><pair kern="-17" kpx2="124"/><pair kern="-35" kpx2="169"/><pair kern="-17" kpx2="252"/><pair kern="-17" kpx2="70"/><pair kern="-77" kpx2="60"/><pair kern="27" kpx2="201"/><pair kern="-17" kpx2="29"/><pair kern="-77" kpx2="234"/><pair kern="-17" kpx2="100"/><pair kern="-17" kpx2="122"/><pair kern="-17" kpx2="210"/><pair kern="-17" kpx2="82"/><pair kern="-54" kpx2="58"/><pair kern="-67" kpx2="186"/><pair kern="-17" kpx2="175"/><pair kern="-17" kpx2="209"/><pair kern="-17" kpx2="103"/><pair kern="27" kpx2="98"/><pair kern="-123" kpx2="181"/><pair kern="-17" kpx2="17"/><pair kern="-17" kpx2="38"/><pair kern="-17" kpx2="84"/><pair kern="-17" kpx2="121"/><pair kern="-63" kpx2="57"/><pair kern="-17" kpx2="254"/><pair kern="-17" kpx2="87"/><pair kern="-17" kpx2="72"/><pair kern="27" kpx2="199"/><pair kern="-17" kpx2="71"/><pair kern="-128" kpx2="180"/><pair kern="-17" kpx2="253"/><pair kern="-17" kpx2="52"/><pair kern="-17" kpx2="125"/><pair kern="-17" kpx2="42"/><pair kern="-17" kpx2="115"/><pair kern="-40" kpx2="90"/><pair kern="-17" kpx2="111"/><pair kern="27" kpx2="36"/><pair kern="-77" kpx2="55"/><pair kern="-17" kpx2="114"/><pair kern="-17" kpx2="50"/><pair kern="27" kpx2="173"/><pair kern="-67" kpx2="92"/><pair kern="22" kpx2="197"/><pair kern="-58" kpx2="89"/><pair kern="27" kpx2="174"/></kerning><kerning kpx1="212"><pair kern="-17" kpx2="229"/><pair kern="-17" kpx2="61"/></kerning><kerning kpx1="229"><pair kern="-17" kpx2="180"/><pair kern="-17" kpx2="197"/><pair kern="-17" kpx2="16"/><pair kern="-17" kpx2="181"/></kerning><kerning kpx1="38"><pair kern="-17" kpx2="169"/><pair kern="-17" kpx2="60"/><pair kern="-17" kpx2="187"/><pair kern="18" kpx2="181"/><pair kern="-17" kpx2="170"/><pair kern="-17" kpx2="234"/></kerning><kerning kpx1="121"><pair kern="-72" kpx2="180"/><pair kern="-17" kpx2="17"/><pair kern="-63" kpx2="197"/><pair kern="18" kpx2="16"/><pair kern="-30" kpx2="91"/><pair kern="-35" kpx2="181"/></kerning><kerning kpx1="57"><pair kern="-67" kpx2="126"/><pair kern="-77" kpx2="107"/><pair kern="-26" kpx2="235"/><pair kern="-77" kpx2="72"/><pair kern="-63" kpx2="199"/><pair kern="-58" kpx2="16"/><pair kern="-77" kpx2="123"/><pair kern="-77" kpx2="112"/><pair kern="-17" kpx2="208"/><pair kern="-77" kpx2="113"/><pair kern="-77" kpx2="105"/><pair kern="-67" kpx2="129"/><pair kern="-77" kpx2="124"/><pair kern="-86" kpx2="169"/><pair kern="-63" kpx2="201"/><pair kern="-77" kpx2="106"/><pair kern="-81" kpx2="29"/><pair kern="-77" kpx2="125"/><pair kern="-54" kpx2="170"/><pair kern="-77" kpx2="115"/><pair kern="-67" kpx2="88"/><pair kern="-77" kpx2="122"/><pair kern="-77" kpx2="68"/><pair kern="-17" kpx2="210"/><pair kern="-63" kpx2="36"/><pair kern="-77" kpx2="82"/><pair kern="-26" kpx2="186"/><pair kern="-77" kpx2="114"/><pair kern="-17" kpx2="175"/><pair kern="-67" kpx2="127"/><pair kern="-17" kpx2="50"/><pair kern="-17" kpx2="209"/><pair kern="-17" kpx2="103"/><pair kern="-77" kpx2="108"/><pair kern="-63" kpx2="98"/><pair kern="-21" kpx2="76"/><pair kern="-128" kpx2="17"/><pair kern="-67" kpx2="128"/><pair kern="-63" kpx2="173"/><pair kern="-77" kpx2="109"/><pair kern="-137" kpx2="197"/><pair kern="-26" kpx2="92"/><pair kern="-77" kpx2="121"/><pair kern="-77" kpx2="110"/><pair kern="-63" kpx2="174"/></kerning><kerning kpx1="37"><pair kern="-17" kpx2="227"/><pair kern="-17" kpx2="246"/><pair kern="-17" kpx2="251"/><pair kern="-54" kpx2="187"/><pair kern="-17" kpx2="208"/><pair kern="-17" kpx2="54"/><pair kern="-54" kpx2="180"/><pair kern="-30" kpx2="169"/><pair kern="-54" kpx2="60"/><pair kern="-17" kpx2="253"/><pair kern="-17" kpx2="42"/><pair kern="-17" kpx2="170"/><pair kern="-54" kpx2="234"/><pair kern="-17" kpx2="100"/><pair kern="-17" kpx2="210"/><pair kern="-35" kpx2="58"/><pair kern="-17" kpx2="175"/><pair kern="-17" kpx2="50"/><pair kern="-17" kpx2="209"/><pair kern="-17" kpx2="103"/><pair kern="-54" kpx2="181"/><pair kern="-40" kpx2="197"/><pair kern="-17" kpx2="38"/><pair kern="-30" kpx2="57"/><pair kern="-17" kpx2="249"/></kerning><kerning kpx1="120"><pair kern="-72" kpx2="180"/><pair kern="-44" kpx2="197"/><pair kern="-54" kpx2="181"/></kerning><kerning kpx1="249"><pair kern="18" kpx2="173"/><pair kern="18" kpx2="36"/><pair kern="18" kpx2="201"/><pair kern="18" kpx2="199"/><pair kern="18" kpx2="174"/><pair kern="18" kpx2="98"/></kerning><kerning kpx1="227"><pair kern="18" kpx2="173"/><pair kern="18" kpx2="36"/><pair kern="18" kpx2="201"/><pair kern="18" kpx2="199"/><pair kern="18" kpx2="174"/><pair kern="18" kpx2="98"/></kerning><kerning kpx1="51"><pair kern="-17" kpx2="126"/><pair kern="-44" kpx2="107"/><pair kern="-35" kpx2="72"/><pair kern="-63" kpx2="199"/><pair kern="-21" kpx2="16"/><pair kern="-35" kpx2="123"/><pair kern="-35" kpx2="112"/><pair kern="-21" kpx2="187"/><pair kern="-35" kpx2="113"/><pair kern="-17" kpx2="86"/><pair kern="18" kpx2="180"/><pair kern="-44" kpx2="105"/><pair kern="-17" kpx2="129"/><pair kern="-35" kpx2="124"/><pair kern="-17" kpx2="169"/><pair kern="-63" kpx2="201"/><pair kern="-17" kpx2="85"/><pair kern="-21" kpx2="60"/><pair kern="-44" kpx2="106"/><pair kern="-35" kpx2="125"/><pair kern="-35" kpx2="115"/><pair kern="-21" kpx2="234"/><pair kern="-17" kpx2="88"/><pair kern="-35" kpx2="122"/><pair kern="-44" kpx2="68"/><pair kern="-63" kpx2="36"/><pair kern="-35" kpx2="82"/><pair kern="-35" kpx2="114"/><pair kern="-17" kpx2="250"/><pair kern="-17" kpx2="127"/><pair kern="-44" kpx2="108"/><pair kern="-63" kpx2="98"/><pair kern="-17" kpx2="81"/><pair kern="-21" kpx2="76"/><pair kern="18" kpx2="181"/><pair kern="-155" kpx2="17"/><pair kern="-17" kpx2="128"/><pair kern="-63" kpx2="173"/><pair kern="-44" kpx2="109"/><pair kern="-160" kpx2="197"/><pair kern="-35" kpx2="121"/><pair kern="-17" kpx2="228"/><pair kern="-44" kpx2="110"/><pair kern="-63" kpx2="174"/><pair kern="-17" kpx2="120"/></kerning><kerning kpx1="104"><pair kern="-17" kpx2="229"/><pair kern="-17" kpx2="61"/></kerning><kerning kpx1="72"><pair kern="-17" kpx2="91"/></kerning><kerning kpx1="199"><pair kern="-17" kpx2="246"/><pair kern="-67" kpx2="235"/><pair kern="-21" kpx2="16"/><pair kern="-17" kpx2="112"/><pair kern="-17" kpx2="123"/><pair kern="-17" kpx2="251"/><pair kern="-17" kpx2="113"/><pair kern="-77" kpx2="187"/><pair kern="-17" kpx2="208"/><pair kern="-35" kpx2="73"/><pair kern="-17" kpx2="124"/><pair kern="-35" kpx2="169"/><pair kern="-17" kpx2="252"/><pair kern="-17" kpx2="70"/><pair kern="-77" kpx2="60"/><pair kern="27" kpx2="201"/><pair kern="-17" kpx2="29"/><pair kern="-77" kpx2="234"/><pair kern="-17" kpx2="100"/><pair kern="-17" kpx2="122"/><pair kern="-17" kpx2="210"/><pair kern="-17" kpx2="82"/><pair kern="-54" kpx2="58"/><pair kern="-67" kpx2="186"/><pair kern="-17" kpx2="175"/><pair kern="-17" kpx2="209"/><pair kern="-17" kpx2="103"/><pair kern="27" kpx2="98"/><pair kern="-123" kpx2="181"/><pair kern="-17" kpx2="17"/><pair kern="-17" kpx2="38"/><pair kern="-17" kpx2="84"/><pair kern="-17" kpx2="121"/><pair kern="-63" kpx2="57"/><pair kern="-17" kpx2="254"/><pair kern="-17" kpx2="87"/><pair kern="-17" kpx2="72"/><pair kern="27" kpx2="199"/><pair kern="-17" kpx2="71"/><pair kern="-128" kpx2="180"/><pair kern="-17" kpx2="253"/><pair kern="-17" kpx2="52"/><pair kern="-17" kpx2="125"/><pair kern="-17" kpx2="42"/><pair kern="-17" kpx2="115"/><pair kern="-40" kpx2="90"/><pair kern="-17" kpx2="111"/><pair kern="27" kpx2="36"/><pair kern="-77" kpx2="55"/><pair kern="-17" kpx2="114"/><pair kern="-17" kpx2="50"/><pair kern="27" kpx2="173"/><pair kern="-67" kpx2="92"/><pair kern="22" kpx2="197"/><pair kern="-58" kpx2="89"/><pair kern="27" kpx2="174"/></kerning><kerning kpx1="54"><pair kern="18" kpx2="173"/><pair kern="18" kpx2="36"/><pair kern="18" kpx2="201"/><pair kern="18" kpx2="199"/><pair kern="18" kpx2="174"/><pair kern="18" kpx2="98"/></kerning><kerning kpx1="180"><pair kern="-35" kpx2="235"/><pair kern="-35" kpx2="246"/><pair kern="-30" kpx2="43"/><pair kern="-72" kpx2="123"/><pair kern="-35" kpx2="251"/><pair kern="-35" kpx2="208"/><pair kern="-188" kpx2="144"/><pair kern="-58" kpx2="59"/><pair kern="-35" kpx2="73"/><pair kern="-30" kpx2="41"/><pair kern="-72" kpx2="124"/><pair kern="-54" kpx2="85"/><pair kern="-128" kpx2="201"/><pair kern="-17" kpx2="61"/><pair kern="-35" kpx2="100"/><pair kern="-72" kpx2="122"/><pair kern="-30" kpx2="47"/><pair kern="-35" kpx2="210"/><pair kern="-72" kpx2="82"/><pair kern="-35" kpx2="186"/><pair kern="-35" kpx2="175"/><pair kern="-35" kpx2="209"/><pair kern="-35" kpx2="103"/><pair kern="-128" kpx2="98"/><pair kern="-54" kpx2="81"/><pair kern="-17" kpx2="229"/><pair kern="-35" kpx2="38"/><pair kern="-72" kpx2="121"/><pair kern="-30" kpx2="37"/><pair kern="-54" kpx2="120"/><pair kern="-30" kpx2="51"/><pair kern="-128" kpx2="199"/><pair kern="-30" kpx2="53"/><pair kern="-30" kpx2="137"/><pair kern="-35" kpx2="233"/><pair kern="-35" kpx2="253"/><pair kern="-35" kpx2="52"/><pair kern="-72" kpx2="125"/><pair kern="-35" kpx2="42"/><pair kern="-35" kpx2="90"/><pair kern="-128" kpx2="36"/><pair kern="-35" kpx2="50"/><pair kern="-30" kpx2="39"/><pair kern="-30" kpx2="236"/><pair kern="-30" kpx2="45"/><pair kern="-128" kpx2="173"/><pair kern="-35" kpx2="92"/><pair kern="-35" kpx2="89"/><pair kern="-30" kpx2="46"/><pair kern="-128" kpx2="174"/></kerning><kerning kpx1="53"><pair kern="-21" kpx2="107"/><pair kern="-54" kpx2="235"/><pair kern="-40" kpx2="16"/><pair kern="-44" kpx2="112"/><pair kern="-44" kpx2="123"/><pair kern="-49" kpx2="251"/><pair kern="-44" kpx2="113"/><pair kern="-63" kpx2="187"/><pair kern="-44" kpx2="129"/><pair kern="-44" kpx2="124"/><pair kern="-54" kpx2="169"/><pair kern="-63" kpx2="60"/><pair kern="-40" kpx2="201"/><pair kern="-21" kpx2="106"/><pair kern="-30" kpx2="29"/><pair kern="-63" kpx2="234"/><pair kern="-49" kpx2="100"/><pair kern="-44" kpx2="122"/><pair kern="-21" kpx2="68"/><pair kern="-40" kpx2="58"/><pair kern="-44" kpx2="82"/><pair kern="-54" kpx2="186"/><pair kern="-40" kpx2="98"/><pair kern="-63" kpx2="181"/><pair kern="-35" kpx2="17"/><pair kern="-49" kpx2="38"/><pair kern="-44" kpx2="121"/><pair kern="-54" kpx2="57"/><pair kern="-44" kpx2="126"/><pair kern="-44" kpx2="72"/><pair kern="-40" kpx2="199"/><pair kern="-72" kpx2="180"/><pair kern="-21" kpx2="105"/><pair kern="-49" kpx2="253"/><pair kern="-44" kpx2="125"/><pair kern="-44" kpx2="115"/><pair kern="-17" kpx2="170"/><pair kern="-44" kpx2="88"/><pair kern="-40" kpx2="36"/><pair kern="-44" kpx2="114"/><pair kern="-72" kpx2="55"/><pair kern="-44" kpx2="127"/><pair kern="-21" kpx2="108"/><pair kern="-44" kpx2="128"/><pair kern="-40" kpx2="173"/><pair kern="-21" kpx2="109"/><pair kern="-54" kpx2="92"/><pair kern="-17" kpx2="197"/><pair kern="-21" kpx2="110"/><pair kern="-40" kpx2="174"/></kerning><kerning kpx1="137"><pair kern="-54" kpx2="180"/><pair kern="-40" kpx2="197"/><pair kern="18" kpx2="16"/><pair kern="-54" kpx2="181"/></kerning><kerning kpx1="233"><pair kern="-44" kpx2="180"/><pair kern="-35" kpx2="197"/><pair kern="-54" kpx2="181"/></kerning><kerning kpx1="253"><pair kern="-17" kpx2="169"/><pair kern="-17" kpx2="60"/><pair kern="-17" kpx2="187"/><pair kern="18" kpx2="181"/><pair kern="-17" kpx2="170"/><pair kern="-17" kpx2="234"/></kerning><kerning kpx1="211"><pair kern="-17" kpx2="229"/><pair kern="-17" kpx2="61"/></kerning><kerning kpx1="78"><pair kern="-17" kpx2="107"/><pair kern="-30" kpx2="126"/><pair kern="-35" kpx2="235"/><pair kern="-35" kpx2="72"/><pair kern="-35" kpx2="112"/><pair kern="-35" kpx2="123"/><pair kern="-35" kpx2="113"/><pair kern="-17" kpx2="105"/><pair kern="-30" kpx2="129"/><pair kern="-35" kpx2="124"/><pair kern="-17" kpx2="106"/><pair kern="-35" kpx2="125"/><pair kern="-35" kpx2="115"/><pair kern="-30" kpx2="88"/><pair kern="-35" kpx2="122"/><pair kern="-17" kpx2="68"/><pair kern="-35" kpx2="82"/><pair kern="-35" kpx2="114"/><pair kern="-35" kpx2="186"/><pair kern="-30" kpx2="127"/><pair kern="-17" kpx2="108"/><pair kern="-30" kpx2="128"/><pair kern="-17" kpx2="109"/><pair kern="-35" kpx2="92"/><pair kern="-35" kpx2="121"/><pair kern="-17" kpx2="110"/></kerning><kerning kpx1="52"><pair kern="-21" kpx2="180"/><pair kern="-63" kpx2="197"/><pair kern="27" kpx2="16"/><pair kern="-17" kpx2="181"/></kerning><kerning kpx1="125"><pair kern="-72" kpx2="180"/><pair kern="-17" kpx2="17"/><pair kern="-63" kpx2="197"/><pair kern="18" kpx2="16"/><pair kern="-30" kpx2="91"/><pair kern="-35" kpx2="181"/></kerning><kerning kpx1="42"><pair kern="-21" kpx2="180"/><pair kern="-17" kpx2="169"/><pair kern="-26" kpx2="197"/><pair kern="-35" kpx2="55"/><pair kern="-49" kpx2="60"/><pair kern="-49" kpx2="187"/><pair kern="-21" kpx2="181"/><pair kern="-17" kpx2="170"/><pair kern="-49" kpx2="234"/></kerning><kerning kpx1="170"><pair kern="-17" kpx2="235"/><pair kern="-35" kpx2="199"/><pair kern="-17" kpx2="251"/><pair kern="-109" kpx2="187"/><pair kern="-17" kpx2="208"/><pair kern="-54" kpx2="59"/><pair kern="-109" kpx2="60"/><pair kern="-35" kpx2="201"/><pair kern="-17" kpx2="253"/><pair kern="-109" kpx2="234"/><pair kern="-17" kpx2="90"/><pair kern="-17" kpx2="100"/><pair kern="-17" kpx2="210"/><pair kern="-35" kpx2="36"/><pair kern="-54" kpx2="58"/><pair kern="-91" kpx2="55"/><pair kern="-17" kpx2="186"/><pair kern="-17" kpx2="175"/><pair kern="-17" kpx2="50"/><pair kern="-17" kpx2="209"/><pair kern="-17" kpx2="103"/><pair kern="-17" kpx2="39"/><pair kern="-35" kpx2="98"/><pair kern="-17" kpx2="45"/><pair kern="-35" kpx2="173"/><pair kern="-17" kpx2="92"/><pair kern="-17" kpx2="38"/><pair kern="-17" kpx2="89"/><pair kern="-86" kpx2="57"/><pair kern="-35" kpx2="37"/><pair kern="-35" kpx2="174"/></kerning><kerning kpx1="115"><pair kern="-17" kpx2="91"/></kerning><kerning kpx1="90"><pair kern="-91" kpx2="17"/><pair kern="-17" kpx2="169"/><pair kern="-104" kpx2="197"/><pair kern="-54" kpx2="29"/><pair kern="-17" kpx2="170"/></kerning><kerning kpx1="36"><pair kern="-17" kpx2="246"/><pair kern="-67" kpx2="235"/><pair kern="-21" kpx2="16"/><pair kern="-17" kpx2="112"/><pair kern="-17" kpx2="123"/><pair kern="-17" kpx2="251"/><pair kern="-17" kpx2="113"/><pair kern="-77" kpx2="187"/><pair kern="-17" kpx2="208"/><pair kern="-35" kpx2="73"/><pair kern="-17" kpx2="124"/><pair kern="-35" kpx2="169"/><pair kern="-17" kpx2="252"/><pair kern="-17" kpx2="70"/><pair kern="-77" kpx2="60"/><pair kern="27" kpx2="201"/><pair kern="-17" kpx2="29"/><pair kern="-77" kpx2="234"/><pair kern="-17" kpx2="100"/><pair kern="-17" kpx2="122"/><pair kern="-17" kpx2="210"/><pair kern="-17" kpx2="82"/><pair kern="-54" kpx2="58"/><pair kern="-67" kpx2="186"/><pair kern="-17" kpx2="175"/><pair kern="-17" kpx2="209"/><pair kern="-17" kpx2="103"/><pair kern="27" kpx2="98"/><pair kern="-123" kpx2="181"/><pair kern="-17" kpx2="17"/><pair kern="-17" kpx2="38"/><pair kern="-17" kpx2="84"/><pair kern="-17" kpx2="121"/><pair kern="-63" kpx2="57"/><pair kern="-17" kpx2="254"/><pair kern="-17" kpx2="87"/><pair kern="-17" kpx2="72"/><pair kern="27" kpx2="199"/><pair kern="-17" kpx2="71"/><pair kern="-128" kpx2="180"/><pair kern="-17" kpx2="253"/><pair kern="-17" kpx2="52"/><pair kern="-17" kpx2="125"/><pair kern="-17" kpx2="42"/><pair kern="-17" kpx2="115"/><pair kern="-40" kpx2="90"/><pair kern="-17" kpx2="111"/><pair kern="27" kpx2="36"/><pair kern="-77" kpx2="55"/><pair kern="-17" kpx2="114"/><pair kern="-17" kpx2="50"/><pair kern="27" kpx2="173"/><pair kern="-67" kpx2="92"/><pair kern="22" kpx2="197"/><pair kern="-58" kpx2="89"/><pair kern="27" kpx2="174"/></kerning><kerning kpx1="55"><pair kern="-165" kpx2="107"/><pair kern="-155" kpx2="235"/><pair kern="-91" kpx2="16"/><pair kern="-169" kpx2="112"/><pair kern="-169" kpx2="123"/><pair kern="-58" kpx2="251"/><pair kern="-169" kpx2="113"/><pair kern="-165" kpx2="86"/><pair kern="-151" kpx2="129"/><pair kern="-169" kpx2="124"/><pair kern="-91" kpx2="169"/><pair kern="-169" kpx2="252"/><pair kern="-169" kpx2="70"/><pair kern="-146" kpx2="85"/><pair kern="-77" kpx2="201"/><pair kern="-165" kpx2="106"/><pair kern="-109" kpx2="29"/><pair kern="-58" kpx2="100"/><pair kern="-169" kpx2="122"/><pair kern="-165" kpx2="68"/><pair kern="-169" kpx2="82"/><pair kern="-155" kpx2="186"/><pair kern="-165" kpx2="250"/><pair kern="-77" kpx2="98"/><pair kern="-21" kpx2="181"/><pair kern="-118" kpx2="17"/><pair kern="-58" kpx2="38"/><pair kern="-169" kpx2="121"/><pair kern="-165" kpx2="228"/><pair kern="-169" kpx2="254"/><pair kern="-151" kpx2="126"/><pair kern="-169" kpx2="72"/><pair kern="-77" kpx2="199"/><pair kern="-165" kpx2="105"/><pair kern="-58" kpx2="253"/><pair kern="-169" kpx2="125"/><pair kern="-169" kpx2="115"/><pair kern="-54" kpx2="170"/><pair kern="-151" kpx2="88"/><pair kern="-169" kpx2="111"/><pair kern="-165" kpx2="90"/><pair kern="-77" kpx2="36"/><pair kern="-17" kpx2="55"/><pair kern="-169" kpx2="114"/><pair kern="-151" kpx2="127"/><pair kern="-165" kpx2="108"/><pair kern="-30" kpx2="76"/><pair kern="-151" kpx2="128"/><pair kern="-77" kpx2="173"/><pair kern="-165" kpx2="109"/><pair kern="-155" kpx2="92"/><pair kern="-128" kpx2="197"/><pair kern="-165" kpx2="110"/><pair kern="-77" kpx2="174"/></kerning><kerning kpx1="114"><pair kern="-17" kpx2="91"/></kerning><kerning kpx1="50"><pair kern="-17" kpx2="36"/><pair kern="-17" kpx2="199"/><pair kern="27" kpx2="16"/><pair kern="-54" kpx2="187"/><pair kern="-17" kpx2="98"/><pair kern="-17" kpx2="181"/><pair kern="-63" kpx2="59"/><pair kern="-40" kpx2="17"/><pair kern="-21" kpx2="180"/><pair kern="-17" kpx2="173"/><pair kern="-17" kpx2="169"/><pair kern="-91" kpx2="197"/><pair kern="-17" kpx2="201"/><pair kern="-54" kpx2="60"/><pair kern="-17" kpx2="29"/><pair kern="-17" kpx2="57"/><pair kern="-17" kpx2="174"/><pair kern="-54" kpx2="234"/></kerning><kerning kpx1="91"><pair kern="-17" kpx2="254"/><pair kern="-17" kpx2="111"/><pair kern="-30" kpx2="122"/><pair kern="-30" kpx2="82"/><pair kern="-30" kpx2="114"/><pair kern="-30" kpx2="72"/><pair kern="-30" kpx2="112"/><pair kern="-30" kpx2="123"/><pair kern="-30" kpx2="113"/><pair kern="-30" kpx2="124"/><pair kern="-17" kpx2="252"/><pair kern="-17" kpx2="70"/><pair kern="-30" kpx2="121"/><pair kern="-30" kpx2="125"/><pair kern="-30" kpx2="115"/></kerning><kerning kpx1="39"><pair kern="-17" kpx2="36"/><pair kern="-17" kpx2="199"/><pair kern="-17" kpx2="98"/><pair kern="-54" kpx2="187"/><pair kern="-26" kpx2="181"/><pair kern="-21" kpx2="180"/><pair kern="-17" kpx2="173"/><pair kern="-17" kpx2="169"/><pair kern="-91" kpx2="197"/><pair kern="-17" kpx2="201"/><pair kern="-54" kpx2="60"/><pair kern="-17" kpx2="57"/><pair kern="-17" kpx2="174"/><pair kern="-17" kpx2="170"/><pair kern="-54" kpx2="234"/></kerning><kerning kpx1="236"><pair kern="-17" kpx2="180"/><pair kern="-72" kpx2="17"/><pair kern="-91" kpx2="197"/><pair kern="-35" kpx2="29"/></kerning><kerning kpx1="45"><pair kern="-35" kpx2="180"/><pair kern="-17" kpx2="173"/><pair kern="-17" kpx2="36"/><pair kern="-17" kpx2="169"/><pair kern="-54" kpx2="197"/><pair kern="-17" kpx2="201"/><pair kern="-17" kpx2="199"/><pair kern="-35" kpx2="16"/><pair kern="-17" kpx2="174"/><pair kern="-17" kpx2="98"/><pair kern="-30" kpx2="181"/><pair kern="-17" kpx2="170"/></kerning><kerning kpx1="173"><pair kern="-17" kpx2="246"/><pair kern="-67" kpx2="235"/><pair kern="-21" kpx2="16"/><pair kern="-17" kpx2="112"/><pair kern="-17" kpx2="123"/><pair kern="-17" kpx2="251"/><pair kern="-17" kpx2="113"/><pair kern="-77" kpx2="187"/><pair kern="-17" kpx2="208"/><pair kern="-35" kpx2="73"/><pair kern="-17" kpx2="124"/><pair kern="-35" kpx2="169"/><pair kern="-17" kpx2="252"/><pair kern="-17" kpx2="70"/><pair kern="-77" kpx2="60"/><pair kern="27" kpx2="201"/><pair kern="-17" kpx2="29"/><pair kern="-77" kpx2="234"/><pair kern="-17" kpx2="100"/><pair kern="-17" kpx2="122"/><pair kern="-17" kpx2="210"/><pair kern="-17" kpx2="82"/><pair kern="-54" kpx2="58"/><pair kern="-67" kpx2="186"/><pair kern="-17" kpx2="175"/><pair kern="-17" kpx2="209"/><pair kern="-17" kpx2="103"/><pair kern="27" kpx2="98"/><pair kern="-123" kpx2="181"/><pair kern="-17" kpx2="17"/><pair kern="-17" kpx2="38"/><pair kern="-17" kpx2="84"/><pair kern="-17" kpx2="121"/><pair kern="-63" kpx2="57"/><pair kern="-17" kpx2="254"/><pair kern="-17" kpx2="87"/><pair kern="-17" kpx2="72"/><pair kern="27" kpx2="199"/><pair kern="-17" kpx2="71"/><pair kern="-128" kpx2="180"/><pair kern="-17" kpx2="253"/><pair kern="-17" kpx2="52"/><pair kern="-17" kpx2="125"/><pair kern="-17" kpx2="42"/><pair kern="-17" kpx2="115"/><pair kern="-40" kpx2="90"/><pair kern="-17" kpx2="111"/><pair kern="27" kpx2="36"/><pair kern="-77" kpx2="55"/><pair kern="-17" kpx2="114"/><pair kern="-17" kpx2="50"/><pair kern="27" kpx2="173"/><pair kern="-67" kpx2="92"/><pair kern="22" kpx2="197"/><pair kern="-58" kpx2="89"/><pair kern="27" kpx2="174"/></kerning><kerning kpx1="197"><pair kern="-35" kpx2="246"/><pair kern="-54" kpx2="235"/><pair kern="-35" kpx2="43"/><pair kern="-35" kpx2="123"/><pair kern="-54" kpx2="251"/><pair kern="-183" kpx2="187"/><pair kern="-54" kpx2="208"/><pair kern="18" kpx2="144"/><pair kern="-35" kpx2="59"/><pair kern="-17" kpx2="73"/><pair kern="-35" kpx2="41"/><pair kern="-35" kpx2="124"/><pair kern="-35" kpx2="85"/><pair kern="-183" kpx2="60"/><pair kern="18" kpx2="201"/><pair kern="-183" kpx2="234"/><pair kern="-54" kpx2="100"/><pair kern="-35" kpx2="122"/><pair kern="-35" kpx2="47"/><pair kern="-54" kpx2="210"/><pair kern="-35" kpx2="82"/><pair kern="-123" kpx2="58"/><pair kern="-54" kpx2="186"/><pair kern="-54" kpx2="175"/><pair kern="-54" kpx2="209"/><pair kern="-54" kpx2="103"/><pair kern="-35" kpx2="81"/><pair kern="18" kpx2="98"/><pair kern="-54" kpx2="38"/><pair kern="-35" kpx2="121"/><pair kern="-183" kpx2="57"/><pair kern="-35" kpx2="37"/><pair kern="-35" kpx2="120"/><pair kern="-35" kpx2="51"/><pair kern="18" kpx2="199"/><pair kern="-35" kpx2="53"/><pair kern="-35" kpx2="137"/><pair kern="-35" kpx2="233"/><pair kern="-54" kpx2="253"/><pair kern="-54" kpx2="52"/><pair kern="-35" kpx2="125"/><pair kern="-35" kpx2="42"/><pair kern="-95" kpx2="90"/><pair kern="18" kpx2="36"/><pair kern="-137" kpx2="55"/><pair kern="-54" kpx2="50"/><pair kern="-35" kpx2="39"/><pair kern="-35" kpx2="236"/><pair kern="22" kpx2="45"/><pair kern="18" kpx2="173"/><pair kern="-54" kpx2="92"/><pair kern="-114" kpx2="89"/><pair kern="-35" kpx2="46"/><pair kern="18" kpx2="174"/></kerning><kerning kpx1="92"><pair kern="-142" kpx2="17"/><pair kern="-17" kpx2="169"/><pair kern="-146" kpx2="197"/><pair kern="-17" kpx2="16"/><pair kern="-72" kpx2="29"/><pair kern="-17" kpx2="170"/></kerning><kerning kpx1="89"><pair kern="-77" kpx2="17"/><pair kern="-17" kpx2="169"/><pair kern="-132" kpx2="197"/><pair kern="-26" kpx2="16"/><pair kern="-54" kpx2="29"/><pair kern="-17" kpx2="181"/><pair kern="-17" kpx2="170"/></kerning><kerning kpx1="46"><pair kern="-17" kpx2="107"/><pair kern="-72" kpx2="235"/><pair kern="-104" kpx2="16"/><pair kern="-49" kpx2="112"/><pair kern="-49" kpx2="123"/><pair kern="-54" kpx2="251"/><pair kern="-26" kpx2="213"/><pair kern="-49" kpx2="113"/><pair kern="-35" kpx2="187"/><pair kern="-54" kpx2="208"/><pair kern="-49" kpx2="129"/><pair kern="-49" kpx2="124"/><pair kern="-63" kpx2="169"/><pair kern="-35" kpx2="60"/><pair kern="-17" kpx2="201"/><pair kern="-17" kpx2="106"/><pair kern="-35" kpx2="234"/><pair kern="-54" kpx2="100"/><pair kern="-49" kpx2="122"/><pair kern="-17" kpx2="68"/><pair kern="-54" kpx2="210"/><pair kern="-35" kpx2="58"/><pair kern="-49" kpx2="82"/><pair kern="-72" kpx2="186"/><pair kern="-54" kpx2="175"/><pair kern="-54" kpx2="209"/><pair kern="-54" kpx2="103"/><pair kern="-17" kpx2="98"/><pair kern="-30" kpx2="181"/><pair kern="-26" kpx2="212"/><pair kern="-54" kpx2="38"/><pair kern="-49" kpx2="121"/><pair kern="-49" kpx2="126"/><pair kern="-26" kpx2="104"/><pair kern="-49" kpx2="72"/><pair kern="-17" kpx2="199"/><pair kern="-30" kpx2="180"/><pair kern="-17" kpx2="105"/><pair kern="-54" kpx2="253"/><pair kern="-26" kpx2="211"/><pair kern="-49" kpx2="125"/><pair kern="-49" kpx2="115"/><pair kern="-49" kpx2="88"/><pair kern="-17" kpx2="36"/><pair kern="-77" kpx2="55"/><pair kern="-49" kpx2="114"/><pair kern="-54" kpx2="50"/><pair kern="-49" kpx2="127"/><pair kern="-17" kpx2="108"/><pair kern="-49" kpx2="128"/><pair kern="-17" kpx2="173"/><pair kern="-17" kpx2="109"/><pair kern="-72" kpx2="92"/><pair kern="-17" kpx2="110"/><pair kern="-17" kpx2="174"/><pair kern="-26" kpx2="56"/></kerning><kerning kpx1="174"><pair kern="-17" kpx2="246"/><pair kern="-67" kpx2="235"/><pair kern="-21" kpx2="16"/><pair kern="-17" kpx2="112"/><pair kern="-17" kpx2="123"/><pair kern="-17" kpx2="251"/><pair kern="-17" kpx2="113"/><pair kern="-77" kpx2="187"/><pair kern="-17" kpx2="208"/><pair kern="-35" kpx2="73"/><pair kern="-17" kpx2="124"/><pair kern="-35" kpx2="169"/><pair kern="-17" kpx2="252"/><pair kern="-17" kpx2="70"/><pair kern="-77" kpx2="60"/><pair kern="27" kpx2="201"/><pair kern="-17" kpx2="29"/><pair kern="-77" kpx2="234"/><pair kern="-17" kpx2="100"/><pair kern="-17" kpx2="122"/><pair kern="-17" kpx2="210"/><pair kern="-17" kpx2="82"/><pair kern="-54" kpx2="58"/><pair kern="-67" kpx2="186"/><pair kern="-17" kpx2="175"/><pair kern="-17" kpx2="209"/><pair kern="-17" kpx2="103"/><pair kern="27" kpx2="98"/><pair kern="-123" kpx2="181"/><pair kern="-17" kpx2="17"/><pair kern="-17" kpx2="38"/><pair kern="-17" kpx2="84"/><pair kern="-17" kpx2="121"/><pair kern="-63" kpx2="57"/><pair kern="-17" kpx2="254"/><pair kern="-17" kpx2="87"/><pair kern="-17" kpx2="72"/><pair kern="27" kpx2="199"/><pair kern="-17" kpx2="71"/><pair kern="-128" kpx2="180"/><pair kern="-17" kpx2="253"/><pair kern="-17" kpx2="52"/><pair kern="-17" kpx2="125"/><pair kern="-17" kpx2="42"/><pair kern="-17" kpx2="115"/><pair kern="-40" kpx2="90"/><pair kern="-17" kpx2="111"/><pair kern="27" kpx2="36"/><pair kern="-77" kpx2="55"/><pair kern="-17" kpx2="114"/><pair kern="-17" kpx2="50"/><pair kern="27" kpx2="173"/><pair kern="-67" kpx2="92"/><pair kern="22" kpx2="197"/><pair kern="-58" kpx2="89"/><pair kern="27" kpx2="174"/></kerning><kerning kpx1="56"><pair kern="-17" kpx2="229"/><pair kern="-17" kpx2="61"/></kerning></font-metrics> \ No newline at end of file
diff --git a/documentation/template/VeraMoBd.xml b/documentation/template/VeraMoBd.xml
deleted file mode 100644
index 9b33107a44..0000000000
--- a/documentation/template/VeraMoBd.xml
+++ /dev/null
@@ -1 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?><font-metrics metrics-version="2" type="TYPE0"><font-name>BitstreamVeraSansMono-Bold</font-name><full-name>Bitstream Vera Sans Mono Bold</full-name><family-name>Bitstream Vera Sans Mono</family-name><embed/><cap-height>729</cap-height><x-height>546</x-height><ascender>759</ascender><descender>-240</descender><bbox><left>-19</left><bottom>-235</bottom><right>605</right><top>928</top></bbox><flags>34</flags><stemv>0</stemv><italicangle>0</italicangle><subtype>TYPE0</subtype><multibyte-extras><cid-type>CIDFontType2</cid-type><default-width>0</default-width><bfranges><bf gi="3" ue="126" us="32"/><bf gi="172" ue="160" us="160"/><bf gi="163" ue="161" us="161"/><bf gi="132" ue="163" us="162"/><bf gi="189" ue="164" us="164"/><bf gi="150" ue="165" us="165"/><bf gi="231" ue="166" us="166"/><bf gi="134" ue="167" us="167"/><bf gi="142" ue="168" us="168"/><bf gi="139" ue="169" us="169"/><bf gi="157" ue="170" us="170"/><bf gi="169" ue="171" us="171"/><bf gi="164" ue="172" us="172"/><bf gi="256" ue="173" us="173"/><bf gi="138" ue="174" us="174"/><bf gi="217" ue="175" us="175"/><bf gi="131" ue="176" us="176"/><bf gi="147" ue="177" us="177"/><bf gi="241" ue="179" us="178"/><bf gi="141" ue="180" us="180"/><bf gi="151" ue="181" us="181"/><bf gi="136" ue="182" us="182"/><bf gi="195" ue="183" us="183"/><bf gi="221" ue="184" us="184"/><bf gi="240" ue="185" us="185"/><bf gi="158" ue="186" us="186"/><bf gi="170" ue="187" us="187"/><bf gi="243" ue="190" us="188"/><bf gi="162" ue="191" us="191"/><bf gi="173" ue="192" us="192"/><bf gi="201" ue="193" us="193"/><bf gi="199" ue="194" us="194"/><bf gi="174" ue="195" us="195"/><bf gi="98" ue="197" us="196"/><bf gi="144" ue="198" us="198"/><bf gi="100" ue="199" us="199"/><bf gi="203" ue="200" us="200"/><bf gi="101" ue="201" us="201"/><bf gi="200" ue="202" us="202"/><bf gi="202" ue="203" us="203"/><bf gi="207" ue="204" us="204"/><bf gi="204" ue="207" us="205"/><bf gi="232" ue="208" us="208"/><bf gi="102" ue="209" us="209"/><bf gi="210" ue="210" us="210"/><bf gi="208" ue="212" us="211"/><bf gi="175" ue="213" us="213"/><bf gi="103" ue="214" us="214"/><bf gi="239" ue="215" us="215"/><bf gi="145" ue="216" us="216"/><bf gi="213" ue="217" us="217"/><bf gi="211" ue="219" us="218"/><bf gi="104" ue="220" us="220"/><bf gi="234" ue="221" us="221"/><bf gi="236" ue="222" us="222"/><bf gi="137" ue="223" us="223"/><bf gi="106" ue="224" us="224"/><bf gi="105" ue="225" us="225"/><bf gi="107" ue="226" us="226"/><bf gi="109" ue="227" us="227"/><bf gi="108" ue="228" us="228"/><bf gi="110" ue="229" us="229"/><bf gi="160" ue="230" us="230"/><bf gi="111" ue="231" us="231"/><bf gi="113" ue="232" us="232"/><bf gi="112" ue="233" us="233"/><bf gi="114" ue="235" us="234"/><bf gi="117" ue="236" us="236"/><bf gi="116" ue="237" us="237"/><bf gi="118" ue="239" us="238"/><bf gi="233" ue="240" us="240"/><bf gi="120" ue="241" us="241"/><bf gi="122" ue="242" us="242"/><bf gi="121" ue="243" us="243"/><bf gi="123" ue="244" us="244"/><bf gi="125" ue="245" us="245"/><bf gi="124" ue="246" us="246"/><bf gi="184" ue="247" us="247"/><bf gi="161" ue="248" us="248"/><bf gi="127" ue="249" us="249"/><bf gi="126" ue="250" us="250"/><bf gi="128" ue="252" us="251"/><bf gi="235" ue="253" us="253"/><bf gi="237" ue="254" us="254"/><bf gi="186" ue="255" us="255"/><bf gi="251" ue="263" us="262"/><bf gi="253" ue="269" us="268"/><bf gi="0" ue="270" us="270"/><bf gi="0" ue="271" us="271"/><bf gi="0" ue="272" us="272"/><bf gi="255" ue="273" us="273"/><bf gi="246" ue="287" us="286"/><bf gi="248" ue="304" us="304"/><bf gi="214" ue="305" us="305"/><bf gi="225" ue="322" us="321"/><bf gi="176" ue="339" us="338"/><bf gi="249" ue="351" us="350"/><bf gi="227" ue="353" us="352"/><bf gi="187" ue="376" us="376"/><bf gi="229" ue="382" us="381"/><bf gi="166" ue="402" us="402"/><bf gi="215" ue="710" us="710"/><bf gi="224" ue="711" us="711"/><bf gi="218" ue="730" us="728"/><bf gi="223" ue="731" us="731"/><bf gi="216" ue="732" us="732"/><bf gi="222" ue="733" us="733"/><bf gi="159" ue="937" us="937"/><bf gi="155" ue="960" us="960"/><bf gi="178" ue="8212" us="8211"/><bf gi="0" ue="8213" us="8213"/><bf gi="0" ue="8214" us="8214"/><bf gi="0" ue="8215" us="8215"/><bf gi="182" ue="8217" us="8216"/><bf gi="196" ue="8218" us="8218"/><bf gi="0" ue="8219" us="8219"/><bf gi="180" ue="8221" us="8220"/><bf gi="197" ue="8222" us="8222"/><bf gi="0" ue="8223" us="8223"/><bf gi="130" ue="8224" us="8224"/><bf gi="194" ue="8225" us="8225"/><bf gi="135" ue="8226" us="8226"/><bf gi="0" ue="8227" us="8227"/><bf gi="0" ue="8228" us="8228"/><bf gi="0" ue="8229" us="8229"/><bf gi="171" ue="8230" us="8230"/><bf gi="198" ue="8240" us="8240"/><bf gi="190" ue="8250" us="8249"/><bf gi="258" ue="8364" us="8364"/><bf gi="140" ue="8482" us="8482"/><bf gi="152" ue="8706" us="8706"/><bf gi="0" ue="8707" us="8707"/><bf gi="0" ue="8708" us="8708"/><bf gi="0" ue="8709" us="8709"/><bf gi="168" ue="8710" us="8710"/><bf gi="154" ue="8719" us="8719"/><bf gi="0" ue="8720" us="8720"/><bf gi="153" ue="8721" us="8721"/><bf gi="238" ue="8722" us="8722"/><bf gi="0" ue="8723" us="8723"/><bf gi="0" ue="8724" us="8724"/><bf gi="188" ue="8725" us="8725"/><bf gi="0" ue="8726" us="8726"/><bf gi="0" ue="8727" us="8727"/><bf gi="0" ue="8728" us="8728"/><bf gi="257" ue="8729" us="8729"/><bf gi="165" ue="8730" us="8730"/><bf gi="0" ue="8731" us="8731"/><bf gi="0" ue="8732" us="8732"/><bf gi="0" ue="8733" us="8733"/><bf gi="146" ue="8734" us="8734"/><bf gi="156" ue="8747" us="8747"/><bf gi="167" ue="8776" us="8776"/><bf gi="143" ue="8800" us="8800"/><bf gi="0" ue="8801" us="8801"/><bf gi="0" ue="8802" us="8802"/><bf gi="0" ue="8803" us="8803"/><bf gi="148" ue="8805" us="8804"/><bf gi="185" ue="9674" us="9674"/><bf gi="192" ue="64258" us="64257"/><bf gi="0" ue="65535" us="65535"/></bfranges><cid-widths start-index="0"><wx w="602"/><wx w="0"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/></cid-widths></multibyte-extras></font-metrics> \ No newline at end of file
diff --git a/documentation/template/VeraMono.xml b/documentation/template/VeraMono.xml
deleted file mode 100644
index 3a0a86659c..0000000000
--- a/documentation/template/VeraMono.xml
+++ /dev/null
@@ -1 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?><font-metrics metrics-version="2" type="TYPE0"><font-name>BitstreamVeraSansMono-Roman</font-name><full-name>Bitstream Vera Sans Mono</full-name><family-name>Bitstream Vera Sans Mono</family-name><embed/><cap-height>729</cap-height><x-height>546</x-height><ascender>759</ascender><descender>-240</descender><bbox><left>-4</left><bottom>-235</bottom><right>605</right><top>928</top></bbox><flags>34</flags><stemv>0</stemv><italicangle>0</italicangle><subtype>TYPE0</subtype><multibyte-extras><cid-type>CIDFontType2</cid-type><default-width>0</default-width><bfranges><bf gi="3" ue="126" us="32"/><bf gi="172" ue="160" us="160"/><bf gi="163" ue="161" us="161"/><bf gi="132" ue="163" us="162"/><bf gi="189" ue="164" us="164"/><bf gi="150" ue="165" us="165"/><bf gi="231" ue="166" us="166"/><bf gi="134" ue="167" us="167"/><bf gi="142" ue="168" us="168"/><bf gi="139" ue="169" us="169"/><bf gi="157" ue="170" us="170"/><bf gi="169" ue="171" us="171"/><bf gi="164" ue="172" us="172"/><bf gi="256" ue="173" us="173"/><bf gi="138" ue="174" us="174"/><bf gi="217" ue="175" us="175"/><bf gi="131" ue="176" us="176"/><bf gi="147" ue="177" us="177"/><bf gi="241" ue="179" us="178"/><bf gi="141" ue="180" us="180"/><bf gi="151" ue="181" us="181"/><bf gi="136" ue="182" us="182"/><bf gi="195" ue="183" us="183"/><bf gi="221" ue="184" us="184"/><bf gi="240" ue="185" us="185"/><bf gi="158" ue="186" us="186"/><bf gi="170" ue="187" us="187"/><bf gi="243" ue="190" us="188"/><bf gi="162" ue="191" us="191"/><bf gi="173" ue="192" us="192"/><bf gi="201" ue="193" us="193"/><bf gi="199" ue="194" us="194"/><bf gi="174" ue="195" us="195"/><bf gi="98" ue="197" us="196"/><bf gi="144" ue="198" us="198"/><bf gi="100" ue="199" us="199"/><bf gi="203" ue="200" us="200"/><bf gi="101" ue="201" us="201"/><bf gi="200" ue="202" us="202"/><bf gi="202" ue="203" us="203"/><bf gi="207" ue="204" us="204"/><bf gi="204" ue="207" us="205"/><bf gi="232" ue="208" us="208"/><bf gi="102" ue="209" us="209"/><bf gi="210" ue="210" us="210"/><bf gi="208" ue="212" us="211"/><bf gi="175" ue="213" us="213"/><bf gi="103" ue="214" us="214"/><bf gi="239" ue="215" us="215"/><bf gi="145" ue="216" us="216"/><bf gi="213" ue="217" us="217"/><bf gi="211" ue="219" us="218"/><bf gi="104" ue="220" us="220"/><bf gi="234" ue="221" us="221"/><bf gi="236" ue="222" us="222"/><bf gi="137" ue="223" us="223"/><bf gi="106" ue="224" us="224"/><bf gi="105" ue="225" us="225"/><bf gi="107" ue="226" us="226"/><bf gi="109" ue="227" us="227"/><bf gi="108" ue="228" us="228"/><bf gi="110" ue="229" us="229"/><bf gi="160" ue="230" us="230"/><bf gi="111" ue="231" us="231"/><bf gi="113" ue="232" us="232"/><bf gi="112" ue="233" us="233"/><bf gi="114" ue="235" us="234"/><bf gi="117" ue="236" us="236"/><bf gi="116" ue="237" us="237"/><bf gi="118" ue="239" us="238"/><bf gi="233" ue="240" us="240"/><bf gi="120" ue="241" us="241"/><bf gi="122" ue="242" us="242"/><bf gi="121" ue="243" us="243"/><bf gi="123" ue="244" us="244"/><bf gi="125" ue="245" us="245"/><bf gi="124" ue="246" us="246"/><bf gi="184" ue="247" us="247"/><bf gi="161" ue="248" us="248"/><bf gi="127" ue="249" us="249"/><bf gi="126" ue="250" us="250"/><bf gi="128" ue="252" us="251"/><bf gi="235" ue="253" us="253"/><bf gi="237" ue="254" us="254"/><bf gi="186" ue="255" us="255"/><bf gi="251" ue="263" us="262"/><bf gi="253" ue="269" us="268"/><bf gi="0" ue="270" us="270"/><bf gi="0" ue="271" us="271"/><bf gi="0" ue="272" us="272"/><bf gi="255" ue="273" us="273"/><bf gi="246" ue="287" us="286"/><bf gi="248" ue="304" us="304"/><bf gi="214" ue="305" us="305"/><bf gi="225" ue="322" us="321"/><bf gi="176" ue="339" us="338"/><bf gi="249" ue="351" us="350"/><bf gi="227" ue="353" us="352"/><bf gi="187" ue="376" us="376"/><bf gi="229" ue="382" us="381"/><bf gi="166" ue="402" us="402"/><bf gi="215" ue="710" us="710"/><bf gi="224" ue="711" us="711"/><bf gi="218" ue="730" us="728"/><bf gi="223" ue="731" us="731"/><bf gi="216" ue="732" us="732"/><bf gi="222" ue="733" us="733"/><bf gi="159" ue="937" us="937"/><bf gi="155" ue="960" us="960"/><bf gi="178" ue="8212" us="8211"/><bf gi="0" ue="8213" us="8213"/><bf gi="0" ue="8214" us="8214"/><bf gi="0" ue="8215" us="8215"/><bf gi="182" ue="8217" us="8216"/><bf gi="196" ue="8218" us="8218"/><bf gi="0" ue="8219" us="8219"/><bf gi="180" ue="8221" us="8220"/><bf gi="197" ue="8222" us="8222"/><bf gi="0" ue="8223" us="8223"/><bf gi="130" ue="8224" us="8224"/><bf gi="194" ue="8225" us="8225"/><bf gi="135" ue="8226" us="8226"/><bf gi="0" ue="8227" us="8227"/><bf gi="0" ue="8228" us="8228"/><bf gi="0" ue="8229" us="8229"/><bf gi="171" ue="8230" us="8230"/><bf gi="198" ue="8240" us="8240"/><bf gi="190" ue="8250" us="8249"/><bf gi="258" ue="8364" us="8364"/><bf gi="140" ue="8482" us="8482"/><bf gi="152" ue="8706" us="8706"/><bf gi="0" ue="8707" us="8707"/><bf gi="0" ue="8708" us="8708"/><bf gi="0" ue="8709" us="8709"/><bf gi="168" ue="8710" us="8710"/><bf gi="154" ue="8719" us="8719"/><bf gi="0" ue="8720" us="8720"/><bf gi="153" ue="8721" us="8721"/><bf gi="238" ue="8722" us="8722"/><bf gi="0" ue="8723" us="8723"/><bf gi="0" ue="8724" us="8724"/><bf gi="188" ue="8725" us="8725"/><bf gi="0" ue="8726" us="8726"/><bf gi="0" ue="8727" us="8727"/><bf gi="0" ue="8728" us="8728"/><bf gi="257" ue="8729" us="8729"/><bf gi="165" ue="8730" us="8730"/><bf gi="0" ue="8731" us="8731"/><bf gi="0" ue="8732" us="8732"/><bf gi="0" ue="8733" us="8733"/><bf gi="146" ue="8734" us="8734"/><bf gi="156" ue="8747" us="8747"/><bf gi="167" ue="8776" us="8776"/><bf gi="143" ue="8800" us="8800"/><bf gi="0" ue="8801" us="8801"/><bf gi="0" ue="8802" us="8802"/><bf gi="0" ue="8803" us="8803"/><bf gi="148" ue="8805" us="8804"/><bf gi="185" ue="9674" us="9674"/><bf gi="192" ue="64258" us="64257"/><bf gi="0" ue="65535" us="65535"/></bfranges><cid-widths start-index="0"><wx w="602"/><wx w="0"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/></cid-widths></multibyte-extras></font-metrics> \ No newline at end of file
diff --git a/documentation/template/component.title.xsl b/documentation/template/component.title.xsl
deleted file mode 100644
index ee21d59ad5..0000000000
--- a/documentation/template/component.title.xsl
+++ /dev/null
@@ -1,39 +0,0 @@
1<xsl:stylesheet version="1.0"
2 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:d="http://docbook.org/ns/docbook"
4 xmlns="http://www.w3.org/1999/xhtml"
5 exclude-result-prefixes="d">
6
7 <xsl:template name="component.title">
8 <xsl:param name="node" select="."/>
9
10 <xsl:variable name="level">
11 <xsl:choose>
12 <xsl:when test="ancestor::d:section">
13 <xsl:value-of select="count(ancestor::d:section)+1"/>
14 </xsl:when>
15 <xsl:when test="ancestor::sect5">6</xsl:when>
16 <xsl:when test="ancestor::sect4">5</xsl:when>
17 <xsl:when test="ancestor::sect3">4</xsl:when>
18 <xsl:when test="ancestor::sect2">3</xsl:when>
19 <xsl:when test="ancestor::sect1">2</xsl:when>
20 <xsl:otherwise>1</xsl:otherwise>
21 </xsl:choose>
22 </xsl:variable>
23 <xsl:element name="h{$level+1}" namespace="http://www.w3.org/1999/xhtml">
24 <xsl:attribute name="class">title</xsl:attribute>
25 <xsl:if test="$generate.id.attributes = 0">
26 <xsl:call-template name="anchor">
27 <xsl:with-param name="node" select="$node"/>
28 <xsl:with-param name="conditional" select="0"/>
29 </xsl:call-template>
30 </xsl:if>
31 <xsl:apply-templates select="$node" mode="object.title.markup">
32 <xsl:with-param name="allow-anchors" select="1"/>
33 </xsl:apply-templates>
34 <xsl:call-template name="permalink">
35 <xsl:with-param name="node" select="$node"/>
36 </xsl:call-template>
37 </xsl:element>
38 </xsl:template>
39</xsl:stylesheet>
diff --git a/documentation/template/division.title.xsl b/documentation/template/division.title.xsl
deleted file mode 100644
index 6c265970d5..0000000000
--- a/documentation/template/division.title.xsl
+++ /dev/null
@@ -1,24 +0,0 @@
1<xsl:stylesheet version="1.0"
2 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:d="http://docbook.org/ns/docbook"
4 xmlns="http://www.w3.org/1999/xhtml"
5 exclude-result-prefixes="d">
6
7 <xsl:template name="division.title">
8 <xsl:param name="node" select="."/>
9
10 <h1>
11 <xsl:attribute name="class">title</xsl:attribute>
12 <xsl:call-template name="anchor">
13 <xsl:with-param name="node" select="$node"/>
14 <xsl:with-param name="conditional" select="0"/>
15 </xsl:call-template>
16 <xsl:apply-templates select="$node" mode="object.title.markup">
17 <xsl:with-param name="allow-anchors" select="1"/>
18 </xsl:apply-templates>
19 <xsl:call-template name="permalink">
20 <xsl:with-param name="node" select="$node"/>
21 </xsl:call-template>
22 </h1>
23 </xsl:template>
24</xsl:stylesheet>
diff --git a/documentation/template/embedded_video.xsl b/documentation/template/embedded_video.xsl
deleted file mode 100644
index dfb33c3441..0000000000
--- a/documentation/template/embedded_video.xsl
+++ /dev/null
@@ -1,22 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<xsl:stylesheet version="1.0"
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns:d="http://docbook.org/ns/docbook">
5
6 <xsl:output method="html" />
7
8 <xsl:template match="/d:chapter/d:section/d:mediaobject">
9 <xsl:for-each select=".">
10 <xsl:variable name="vid_url">
11 <xsl:value-of select="./d:videoobject/d:videodata/@fileref" />
12 </xsl:variable>
13 <div style="text-align: center; margin: auto">
14 <object type="application/x-shockwave-flash" width="640" height="420" data="{$vid_url}?color2=FBE9EC&amp;showsearch=0&amp;version=3&amp;modestbranding=1&amp;fs=1">
15 <param name="movie" value="{$vid_url}?color2=FBE9EC&amp;showsearch=0&amp;version=3&amp;modestbranding=1&amp;fs=1" />
16 <param name="allowFullScreen" value="true" />
17 <param name="allowscriptaccess" value="always" />
18 </object>
19 </div>
20 </xsl:for-each>
21 </xsl:template>
22</xsl:stylesheet>
diff --git a/documentation/template/fop-config.xml b/documentation/template/fop-config.xml
deleted file mode 100644
index 09cc5ca0f5..0000000000
--- a/documentation/template/fop-config.xml
+++ /dev/null
@@ -1,58 +0,0 @@
1<fop version="1.0">
2
3 <!-- Strict user configuration -->
4 <strict-configuration>true</strict-configuration>
5
6 <!-- Strict FO validation -->
7 <strict-validation>true</strict-validation>
8
9 <!--
10 Set the baseDir so common/openedhand.svg references in plans still
11 work ok. Note, relative file references to current dir should still work.
12 -->
13 <base>../template</base>
14 <font-base>../template</font-base>
15
16 <!-- Source resolution in dpi (dots/pixels per inch) for determining the
17 size of pixels in SVG and bitmap images, default: 72dpi -->
18 <!-- <source-resolution>72</source-resolution> -->
19 <!-- Target resolution in dpi (dots/pixels per inch) for specifying the
20 target resolution for generated bitmaps, default: 72dpi -->
21 <!-- <target-resolution>72</target-resolution> -->
22
23 <!-- default page-height and page-width, in case
24 value is specified as auto -->
25 <default-page-settings height="11in" width="8.26in"/>
26
27 <!-- <use-cache>false</use-cache> -->
28
29 <renderers>
30 <renderer mime="application/pdf">
31 <fonts>
32 <font metrics-file="VeraMono.xml"
33 kerning="yes"
34 embed-url="VeraMono.ttf">
35 <font-triplet name="veramono" style="normal" weight="normal"/>
36 </font>
37
38 <font metrics-file="VeraMoBd.xml"
39 kerning="yes"
40 embed-url="VeraMoBd.ttf">
41 <font-triplet name="veramono" style="normal" weight="bold"/>
42 </font>
43
44 <font metrics-file="Vera.xml"
45 kerning="yes"
46 embed-url="Vera.ttf">
47 <font-triplet name="verasans" style="normal" weight="normal"/>
48 <font-triplet name="verasans" style="normal" weight="bold"/>
49 <font-triplet name="verasans" style="italic" weight="normal"/>
50 <font-triplet name="verasans" style="italic" weight="bold"/>
51 </font>
52
53 <auto-detect/>
54 </fonts>
55 </renderer>
56 </renderers>
57</fop>
58
diff --git a/documentation/template/formal.object.heading.xsl b/documentation/template/formal.object.heading.xsl
deleted file mode 100644
index 1a5e697808..0000000000
--- a/documentation/template/formal.object.heading.xsl
+++ /dev/null
@@ -1,21 +0,0 @@
1<xsl:stylesheet version="1.0"
2 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:d="http://docbook.org/ns/docbook"
4 xmlns="http://www.w3.org/1999/xhtml"
5 exclude-result-prefixes="d">
6
7 <xsl:template name="formal.object.heading">
8 <xsl:param name="object" select="."/>
9 <xsl:param name="title">
10 <xsl:apply-templates select="$object" mode="object.title.markup">
11 <xsl:with-param name="allow-anchors" select="1"/>
12 </xsl:apply-templates>
13 </xsl:param>
14 <p class="title">
15 <b><xsl:copy-of select="$title"/></b>
16 <xsl:call-template name="permalink">
17 <xsl:with-param name="node" select="$object"/>
18 </xsl:call-template>
19 </p>
20 </xsl:template>
21</xsl:stylesheet>
diff --git a/documentation/template/gloss-permalinks.xsl b/documentation/template/gloss-permalinks.xsl
deleted file mode 100644
index 6bf58116f6..0000000000
--- a/documentation/template/gloss-permalinks.xsl
+++ /dev/null
@@ -1,14 +0,0 @@
1<xsl:stylesheet version="1.0"
2 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:d="http://docbook.org/ns/docbook"
4 xmlns="http://www.w3.org/1999/xhtml">
5
6 <xsl:template match="glossentry/glossterm">
7 <xsl:apply-imports/>
8 <xsl:if test="$generate.permalink != 0">
9 <xsl:call-template name="permalink">
10 <xsl:with-param name="node" select=".."/>
11 </xsl:call-template>
12 </xsl:if>
13 </xsl:template>
14</xsl:stylesheet>
diff --git a/documentation/template/permalinks.xsl b/documentation/template/permalinks.xsl
deleted file mode 100644
index d2a1c14524..0000000000
--- a/documentation/template/permalinks.xsl
+++ /dev/null
@@ -1,25 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<xsl:stylesheet version="1.0"
3 xmlns="http://www.w3.org/1999/xhtml"
4 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
5
6 <xsl:param name="generate.permalink" select="1"/>
7 <xsl:param name="permalink.text">¶</xsl:param>
8
9 <xsl:template name="permalink">
10 <xsl:param name="node"/>
11
12 <xsl:if test="$generate.permalink != '0'">
13 <span class="permalink">
14 <a alt="Permalink" title="Permalink">
15 <xsl:attribute name="href">
16 <xsl:call-template name="href.target">
17 <xsl:with-param name="object" select="$node"/>
18 </xsl:call-template>
19 </xsl:attribute>
20 <xsl:copy-of select="$permalink.text"/>
21 </a>
22 </span>
23 </xsl:if>
24 </xsl:template>
25</xsl:stylesheet>
diff --git a/documentation/template/poky-db-pdf.xsl b/documentation/template/poky-db-pdf.xsl
deleted file mode 100644
index f8a3df103d..0000000000
--- a/documentation/template/poky-db-pdf.xsl
+++ /dev/null
@@ -1,64 +0,0 @@
1<?xml version='1.0'?>
2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
3
4 <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl" />
5
6 <!-- check project-plan.sh for how this is generated, needed to tweak
7 the cover page
8 -->
9 <xsl:include href="/tmp/titlepage.xsl"/>
10
11 <!-- To force a page break in document, i.e per section add a
12 <?hard-pagebreak?> tag.
13 -->
14 <xsl:template match="processing-instruction('hard-pagebreak')">
15 <fo:block break-before='page' />
16 </xsl:template>
17
18 <!--Fix for defualt indent getting TOC all wierd..
19 See http://sources.redhat.com/ml/docbook-apps/2005-q1/msg00455.html
20 FIXME: must be a better fix
21 -->
22 <xsl:param name="body.start.indent" select="'0'"/>
23 <!--<xsl:param name="title.margin.left" select="'0'"/>-->
24
25 <!-- stop long-ish header titles getting wrapped -->
26 <xsl:param name="header.column.widths">1 10 1</xsl:param>
27
28 <!-- customise headers and footers a little -->
29
30 <xsl:template name="head.sep.rule">
31 <xsl:if test="$header.rule != 0">
32 <xsl:attribute name="border-bottom-width">0.5pt</xsl:attribute>
33 <xsl:attribute name="border-bottom-style">solid</xsl:attribute>
34 <xsl:attribute name="border-bottom-color">#999999</xsl:attribute>
35 </xsl:if>
36 </xsl:template>
37
38 <xsl:template name="foot.sep.rule">
39 <xsl:if test="$footer.rule != 0">
40 <xsl:attribute name="border-top-width">0.5pt</xsl:attribute>
41 <xsl:attribute name="border-top-style">solid</xsl:attribute>
42 <xsl:attribute name="border-top-color">#999999</xsl:attribute>
43 </xsl:if>
44 </xsl:template>
45
46 <xsl:attribute-set name="header.content.properties">
47 <xsl:attribute name="color">#999999</xsl:attribute>
48 </xsl:attribute-set>
49
50 <xsl:attribute-set name="footer.content.properties">
51 <xsl:attribute name="color">#999999</xsl:attribute>
52 </xsl:attribute-set>
53
54
55 <!-- general settings -->
56
57 <xsl:param name="fop1.extensions" select="1"></xsl:param>
58 <xsl:param name="paper.type" select="'A4'"></xsl:param>
59 <xsl:param name="section.autolabel" select="1"></xsl:param>
60 <xsl:param name="body.font.family" select="'verasans'"></xsl:param>
61 <xsl:param name="title.font.family" select="'verasans'"></xsl:param>
62 <xsl:param name="monospace.font.family" select="'veramono'"></xsl:param>
63
64</xsl:stylesheet>
diff --git a/documentation/template/qa-code-permalinks.xsl b/documentation/template/qa-code-permalinks.xsl
deleted file mode 100644
index a309095c60..0000000000
--- a/documentation/template/qa-code-permalinks.xsl
+++ /dev/null
@@ -1,23 +0,0 @@
1<!--
2This XSL sheet enables creation of permalinks for <para><code>
3constructs. Right now, this construct occurs only in the ref-manual
4book's qa issues and warnings chapter. However, if the construct
5were to appear anywhere in that ref-manual, a permalink would be
6generated. I don't foresee any <para><code> constructs being used
7in the future but if they are then a permalink with a generically
8numbered permalink would be generated.
9-->
10<xsl:stylesheet version="1.0"
11 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
12 xmlns:d="http://docbook.org/ns/docbook"
13 xmlns="http://www.w3.org/1999/xhtml">
14
15 <xsl:template match="para/code">
16 <xsl:apply-imports/>
17 <xsl:if test="$generate.permalink != 0">
18 <xsl:call-template name="permalink">
19 <xsl:with-param name="node" select=".."/>
20 </xsl:call-template>
21 </xsl:if>
22 </xsl:template>
23</xsl:stylesheet>
diff --git a/documentation/template/section.title.xsl b/documentation/template/section.title.xsl
deleted file mode 100644
index 5c6ff9a96e..0000000000
--- a/documentation/template/section.title.xsl
+++ /dev/null
@@ -1,55 +0,0 @@
1<xsl:stylesheet version="1.0"
2 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:d="http://docbook.org/ns/docbook"
4 xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="d">
5
6 <xsl:template name="section.title">
7 <xsl:variable name="section"
8 select="(ancestor::section |
9 ancestor::simplesect|
10 ancestor::sect1|
11 ancestor::sect2|
12 ancestor::sect3|
13 ancestor::sect4|
14 ancestor::sect5)[last()]"/>
15
16 <xsl:variable name="renderas">
17 <xsl:choose>
18 <xsl:when test="$section/@renderas = 'sect1'">1</xsl:when>
19 <xsl:when test="$section/@renderas = 'sect2'">2</xsl:when>
20 <xsl:when test="$section/@renderas = 'sect3'">3</xsl:when>
21 <xsl:when test="$section/@renderas = 'sect4'">4</xsl:when>
22 <xsl:when test="$section/@renderas = 'sect5'">5</xsl:when>
23 <xsl:otherwise><xsl:value-of select="''"/></xsl:otherwise>
24 </xsl:choose>
25 </xsl:variable>
26
27 <xsl:variable name="level">
28 <xsl:choose>
29 <xsl:when test="$renderas != ''">
30 <xsl:value-of select="$renderas"/>
31 </xsl:when>
32 <xsl:otherwise>
33 <xsl:call-template name="section.level">
34 <xsl:with-param name="node" select="$section"/>
35 </xsl:call-template>
36 </xsl:otherwise>
37 </xsl:choose>
38 </xsl:variable>
39
40 <xsl:call-template name="section.heading">
41 <xsl:with-param name="section" select="$section"/>
42 <xsl:with-param name="level" select="$level"/>
43 <xsl:with-param name="title">
44 <xsl:apply-templates select="$section" mode="object.title.markup">
45 <xsl:with-param name="allow-anchors" select="1"/>
46 </xsl:apply-templates>
47 <xsl:if test="$level &gt; 0">
48 <xsl:call-template name="permalink">
49 <xsl:with-param name="node" select="$section"/>
50 </xsl:call-template>
51 </xsl:if>
52 </xsl:with-param>
53 </xsl:call-template>
54 </xsl:template>
55</xsl:stylesheet>
diff --git a/documentation/template/titlepage.templates.xml b/documentation/template/titlepage.templates.xml
deleted file mode 100644
index f53f147002..0000000000
--- a/documentation/template/titlepage.templates.xml
+++ /dev/null
@@ -1,1227 +0,0 @@
1<!DOCTYPE t:templates [
2<!ENTITY hsize0 "10pt">
3<!ENTITY hsize1 "12pt">
4<!ENTITY hsize2 "14.4pt">
5<!ENTITY hsize3 "17.28pt">
6<!ENTITY hsize4 "20.736pt">
7<!ENTITY hsize5 "24.8832pt">
8<!ENTITY hsize0space "7.5pt"> <!-- 0.75 * hsize0 -->
9<!ENTITY hsize1space "9pt"> <!-- 0.75 * hsize1 -->
10<!ENTITY hsize2space "10.8pt"> <!-- 0.75 * hsize2 -->
11<!ENTITY hsize3space "12.96pt"> <!-- 0.75 * hsize3 -->
12<!ENTITY hsize4space "15.552pt"> <!-- 0.75 * hsize4 -->
13<!ENTITY hsize5space "18.6624pt"> <!-- 0.75 * hsize5 -->
14]>
15<t:templates xmlns:t="http://nwalsh.com/docbook/xsl/template/1.0"
16 xmlns:param="http://nwalsh.com/docbook/xsl/template/1.0/param"
17 xmlns:fo="http://www.w3.org/1999/XSL/Format"
18 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
19
20<!-- ********************************************************************
21 $Id: titlepage.templates.xml,v 1.23 2003/12/16 00:30:49 bobstayton Exp $
22 ********************************************************************
23
24 This file is part of the DocBook XSL Stylesheet distribution.
25 See ../README or http://docbook.sf.net/ for copyright
26 and other information.
27
28 ******************************************************************** -->
29
30<!-- ==================================================================== -->
31
32<t:titlepage t:element="article" t:wrapper="fo:block"
33 font-family="{$title.fontset}">
34
35 <t:titlepage-content t:side="recto"
36 text-align="center">
37
38 <mediaobject/>
39
40 <title t:named-template="component.title"
41 param:node="ancestor-or-self::article[1]"
42 keep-with-next="always"
43 font-size="&hsize5;"
44 font-weight="bold"/>
45
46 <subtitle param:node="ancestor-or-self::article[1]"
47 keep-with-next="always"
48 font-size="&hsize3;"
49 font-weight="bold"
50 space-after="0.8em"/>
51
52 <corpauthor space-before="0.5em"
53 font-size="&hsize3;"/>
54 <authorgroup space-before="0.5em"
55 font-size="&hsize2;"/>
56 <author space-before="0.5em"
57 font-size="&hsize2;"
58 space-after="0.8em"/>
59
60 <email font-size="&hsize2;"/>
61
62 <othercredit space-before="0.5em"/>
63 <releaseinfo space-before="0.5em"/>
64 <copyright space-before="0.5em"/>
65 <legalnotice text-align="start"
66 margin-left="0.5in"
67 margin-right="0.5in"
68 font-family="{$body.fontset}"/>
69 <pubdate space-before="0.5em"/>
70 <para></para>
71 <revision space-before="0.5em"/>
72 <revhistory space-before="0.5em"/>
73 <abstract space-before="0.5em"
74 text-align="start"
75 margin-left="0.5in"
76 margin-right="0.5in"
77 font-family="{$body.fontset}"/>
78
79 <para></para>
80 </t:titlepage-content>
81
82 <t:titlepage-content t:side="verso">
83 </t:titlepage-content>
84
85 <t:titlepage-separator>
86 </t:titlepage-separator>
87
88 <t:titlepage-before t:side="recto">
89 </t:titlepage-before>
90
91 <t:titlepage-before t:side="verso">
92 </t:titlepage-before>
93</t:titlepage>
94
95<!-- ==================================================================== -->
96
97<t:titlepage t:element="set" t:wrapper="fo:block">
98 <t:titlepage-content t:side="recto">
99 <title
100 t:named-template="division.title"
101 param:node="ancestor-or-self::set[1]"
102 text-align="center"
103 font-size="&hsize5;"
104 space-before="&hsize5space;"
105 font-weight="bold"
106 font-family="{$title.fontset}"/>
107 <subtitle
108 font-family="{$title.fontset}"
109 text-align="center"/>
110 <corpauthor/>
111 <authorgroup/>
112 <author/>
113 <othercredit/>
114 <releaseinfo/>
115 <copyright/>
116 <legalnotice/>
117 <pubdate/>
118 <revision/>
119 <revhistory/>
120 <abstract/>
121 </t:titlepage-content>
122
123 <t:titlepage-content t:side="verso">
124 </t:titlepage-content>
125
126 <t:titlepage-separator>
127 </t:titlepage-separator>
128
129 <t:titlepage-before t:side="recto">
130 </t:titlepage-before>
131
132 <t:titlepage-before t:side="verso">
133 </t:titlepage-before>
134</t:titlepage>
135
136<!-- ==================================================================== -->
137
138 <t:titlepage t:element="book" t:wrapper="fo:block">
139 <t:titlepage-content t:side="recto">
140
141 <mediaobject/>
142
143 <subtitle
144 text-align="center"
145 font-size="&hsize4;"
146 space-before="&hsize4space;"
147 font-family="{$title.fontset}"/>
148 <corpauthor font-size="&hsize3;"
149 keep-with-next="always"
150 space-before="2in"/>
151 <authorgroup space-before="2in"/>
152 <author font-size="&hsize3;"
153 space-before="&hsize2space;"
154 keep-with-next="always"/>
155 </t:titlepage-content>
156
157 <t:titlepage-content t:side="verso">
158 <corpauthor/>
159 <authorgroup t:named-template="verso.authorgroup"/>
160 <author/>
161 <othercredit/>
162 <pubdate space-before="1em"/>
163 <copyright/>
164 <abstract/>
165 <legalnotice font-size="8pt"/>
166 </t:titlepage-content>
167
168 <t:titlepage-separator>
169 <fo:block break-after="page"/>
170 </t:titlepage-separator>
171
172 <t:titlepage-before t:side="recto">
173 </t:titlepage-before>
174
175 <t:titlepage-before t:side="verso">
176 <fo:block break-after="page"/>
177 </t:titlepage-before>
178</t:titlepage>
179
180<!-- ==================================================================== -->
181
182<t:titlepage t:element="part" t:wrapper="fo:block">
183 <t:titlepage-content t:side="recto">
184 <title
185 t:named-template="division.title"
186 param:node="ancestor-or-self::part[1]"
187 text-align="center"
188 font-size="&hsize5;"
189 space-before="&hsize5space;"
190 font-weight="bold"
191 font-family="{$title.fontset}"/>
192 <subtitle
193 text-align="center"
194 font-size="&hsize4;"
195 space-before="&hsize4space;"
196 font-weight='bold'
197 font-style='italic'
198 font-family="{$title.fontset}"/>
199 </t:titlepage-content>
200
201 <t:titlepage-content t:side="verso">
202 </t:titlepage-content>
203
204 <t:titlepage-separator>
205 </t:titlepage-separator>
206
207 <t:titlepage-before t:side="recto">
208 </t:titlepage-before>
209
210 <t:titlepage-before t:side="verso">
211 </t:titlepage-before>
212</t:titlepage>
213
214<t:titlepage t:element="partintro" t:wrapper="fo:block">
215 <t:titlepage-content t:side="recto">
216 <title
217 text-align="center"
218 font-size="&hsize5;"
219 font-weight="bold"
220 space-before="1em"
221 font-family="{$title.fontset}"/>
222 <subtitle
223 text-align="center"
224 font-size="&hsize2;"
225 font-weight="bold"
226 font-style="italic"
227 font-family="{$title.fontset}"/>
228 <corpauthor/>
229 <authorgroup/>
230 <author/>
231 <othercredit/>
232 <releaseinfo/>
233 <copyright/>
234 <legalnotice/>
235 <pubdate/>
236 <revision/>
237 <revhistory/>
238 <abstract/>
239 </t:titlepage-content>
240
241 <t:titlepage-content t:side="verso">
242 </t:titlepage-content>
243
244 <t:titlepage-separator>
245 </t:titlepage-separator>
246
247 <t:titlepage-before t:side="recto">
248 </t:titlepage-before>
249
250 <t:titlepage-before t:side="verso">
251 </t:titlepage-before>
252</t:titlepage>
253
254<!-- ==================================================================== -->
255
256<t:titlepage t:element="reference" t:wrapper="fo:block">
257 <t:titlepage-content t:side="recto">
258 <title
259 t:named-template="division.title"
260 param:node="ancestor-or-self::reference[1]"
261 text-align="center"
262 font-size="&hsize5;"
263 space-before="&hsize5space;"
264 font-weight="bold"
265 font-family="{$title.fontset}"/>
266 <subtitle
267 font-family="{$title.fontset}"
268 text-align="center"/>
269 <corpauthor/>
270 <authorgroup/>
271 <author/>
272 <othercredit/>
273 <releaseinfo/>
274 <copyright/>
275 <legalnotice/>
276 <pubdate/>
277 <revision/>
278 <revhistory/>
279 <abstract/>
280 </t:titlepage-content>
281
282 <t:titlepage-content t:side="verso">
283 </t:titlepage-content>
284
285 <t:titlepage-separator>
286 </t:titlepage-separator>
287
288 <t:titlepage-before t:side="recto">
289 </t:titlepage-before>
290
291 <t:titlepage-before t:side="verso">
292 </t:titlepage-before>
293</t:titlepage>
294
295<!-- ==================================================================== -->
296
297<t:titlepage t:element="refsynopsisdiv" t:wrapper="fo:block">
298 <t:titlepage-content t:side="recto">
299 <title
300 font-family="{$title.fontset}"/>
301 </t:titlepage-content>
302
303 <t:titlepage-content t:side="verso">
304 </t:titlepage-content>
305
306 <t:titlepage-separator>
307 </t:titlepage-separator>
308
309 <t:titlepage-before t:side="recto">
310 </t:titlepage-before>
311
312 <t:titlepage-before t:side="verso">
313 </t:titlepage-before>
314</t:titlepage>
315
316<!-- ==================================================================== -->
317
318<t:titlepage t:element="refsection" t:wrapper="fo:block">
319 <t:titlepage-content t:side="recto">
320 <title
321 font-family="{$title.fontset}"/>
322 </t:titlepage-content>
323
324 <t:titlepage-content t:side="verso">
325 </t:titlepage-content>
326
327 <t:titlepage-separator>
328 </t:titlepage-separator>
329
330 <t:titlepage-before t:side="recto">
331 </t:titlepage-before>
332
333 <t:titlepage-before t:side="verso">
334 </t:titlepage-before>
335</t:titlepage>
336
337<!-- ==================================================================== -->
338
339<t:titlepage t:element="refsect1" t:wrapper="fo:block">
340 <t:titlepage-content t:side="recto">
341 <title
342 font-family="{$title.fontset}"/>
343 </t:titlepage-content>
344
345 <t:titlepage-content t:side="verso">
346 </t:titlepage-content>
347
348 <t:titlepage-separator>
349 </t:titlepage-separator>
350
351 <t:titlepage-before t:side="recto">
352 </t:titlepage-before>
353
354 <t:titlepage-before t:side="verso">
355 </t:titlepage-before>
356</t:titlepage>
357
358<!-- ==================================================================== -->
359
360<t:titlepage t:element="refsect2" t:wrapper="fo:block">
361 <t:titlepage-content t:side="recto">
362 <title
363 font-family="{$title.fontset}"/>
364 </t:titlepage-content>
365
366 <t:titlepage-content t:side="verso">
367 </t:titlepage-content>
368
369 <t:titlepage-separator>
370 </t:titlepage-separator>
371
372 <t:titlepage-before t:side="recto">
373 </t:titlepage-before>
374
375 <t:titlepage-before t:side="verso">
376 </t:titlepage-before>
377</t:titlepage>
378
379<!-- ==================================================================== -->
380
381<t:titlepage t:element="refsect3" t:wrapper="fo:block">
382 <t:titlepage-content t:side="recto">
383 <title
384 font-family="{$title.fontset}"/>
385 </t:titlepage-content>
386
387 <t:titlepage-content t:side="verso">
388 </t:titlepage-content>
389
390 <t:titlepage-separator>
391 </t:titlepage-separator>
392
393 <t:titlepage-before t:side="recto">
394 </t:titlepage-before>
395
396 <t:titlepage-before t:side="verso">
397 </t:titlepage-before>
398</t:titlepage>
399
400<!-- ==================================================================== -->
401
402 <t:titlepage t:element="dedication" t:wrapper="fo:block">
403 <t:titlepage-content t:side="recto">
404 <title
405 t:force="1"
406 t:named-template="component.title"
407 param:node="ancestor-or-self::dedication[1]"
408 margin-left="{$title.margin.left}"
409 font-size="&hsize5;"
410 font-family="{$title.fontset}"
411 font-weight="bold"/>
412 <subtitle
413 font-family="{$title.fontset}"/>
414 </t:titlepage-content>
415
416 <t:titlepage-content t:side="verso">
417 </t:titlepage-content>
418
419 <t:titlepage-separator>
420 </t:titlepage-separator>
421
422 <t:titlepage-before t:side="recto">
423 </t:titlepage-before>
424
425 <t:titlepage-before t:side="verso">
426 </t:titlepage-before>
427</t:titlepage>
428
429<!-- ==================================================================== -->
430
431 <t:titlepage t:element="preface" t:wrapper="fo:block">
432 <t:titlepage-content t:side="recto">
433 <title
434 t:force="1"
435 t:named-template="component.title"
436 param:node="ancestor-or-self::preface[1]"
437 margin-left="{$title.margin.left}"
438 font-size="&hsize5;"
439 font-family="{$title.fontset}"
440 font-weight="bold"/>
441 <subtitle
442 font-family="{$title.fontset}"/>
443 <corpauthor/>
444 <authorgroup/>
445 <author/>
446 <othercredit/>
447 <releaseinfo/>
448 <copyright/>
449 <legalnotice/>
450 <pubdate/>
451 <revision/>
452 <revhistory/>
453 <abstract/>
454 </t:titlepage-content>
455
456 <t:titlepage-content t:side="verso">
457 </t:titlepage-content>
458
459 <t:titlepage-separator>
460 </t:titlepage-separator>
461
462 <t:titlepage-before t:side="recto">
463 </t:titlepage-before>
464
465 <t:titlepage-before t:side="verso">
466 </t:titlepage-before>
467</t:titlepage>
468
469<!-- ==================================================================== -->
470
471 <t:titlepage t:element="chapter" t:wrapper="fo:block"
472 font-family="{$title.fontset}">
473 <t:titlepage-content t:side="recto" margin-left="{$title.margin.left}">
474 <title t:named-template="component.title"
475 param:node="ancestor-or-self::chapter[1]"
476 font-size="&hsize5;"
477 font-weight="bold"/>
478
479 <subtitle space-before="0.5em"
480 font-style="italic"
481 font-size="&hsize2;"
482 font-weight="bold"/>
483
484 <corpauthor space-before="0.5em"
485 space-after="0.5em"
486 font-size="&hsize2;"/>
487
488 <authorgroup space-before="0.5em"
489 space-after="0.5em"
490 font-size="&hsize2;"/>
491
492 <author space-before="0.5em"
493 space-after="0.5em"
494 font-size="&hsize2;"/>
495
496 <othercredit/>
497 <releaseinfo/>
498 <copyright/>
499 <legalnotice/>
500 <pubdate/>
501 <revision/>
502 <revhistory/>
503 <abstract/>
504 </t:titlepage-content>
505
506 <t:titlepage-content t:side="verso">
507 </t:titlepage-content>
508
509 <t:titlepage-separator>
510 </t:titlepage-separator>
511
512 <t:titlepage-before t:side="recto">
513 </t:titlepage-before>
514
515 <t:titlepage-before t:side="verso">
516 </t:titlepage-before>
517</t:titlepage>
518
519<!-- ==================================================================== -->
520
521 <t:titlepage t:element="appendix" t:wrapper="fo:block">
522 <t:titlepage-content t:side="recto">
523 <title
524 t:named-template="component.title"
525 param:node="ancestor-or-self::appendix[1]"
526 margin-left="{$title.margin.left}"
527 font-size="&hsize5;"
528 font-weight="bold"
529 font-family="{$title.fontset}"/>
530 <subtitle
531 font-family="{$title.fontset}"/>
532 <corpauthor/>
533 <authorgroup/>
534 <author/>
535 <othercredit/>
536 <releaseinfo/>
537 <copyright/>
538 <legalnotice/>
539 <pubdate/>
540 <revision/>
541 <revhistory/>
542 <abstract/>
543 </t:titlepage-content>
544
545 <t:titlepage-content t:side="verso">
546 </t:titlepage-content>
547
548 <t:titlepage-separator>
549 </t:titlepage-separator>
550
551 <t:titlepage-before t:side="recto">
552 </t:titlepage-before>
553
554 <t:titlepage-before t:side="verso">
555 </t:titlepage-before>
556</t:titlepage>
557
558<!-- ==================================================================== -->
559
560<t:titlepage t:element="section" t:wrapper="fo:block">
561 <t:titlepage-content t:side="recto">
562 <title
563 margin-left="{$title.margin.left}"
564 font-family="{$title.fontset}"/>
565 <subtitle
566 font-family="{$title.fontset}"/>
567 <corpauthor/>
568 <authorgroup/>
569 <author/>
570 <othercredit/>
571 <releaseinfo/>
572 <copyright/>
573 <legalnotice/>
574 <pubdate/>
575 <revision/>
576 <revhistory/>
577 <abstract/>
578 </t:titlepage-content>
579
580 <t:titlepage-content t:side="verso">
581 </t:titlepage-content>
582
583 <t:titlepage-separator>
584 </t:titlepage-separator>
585
586 <t:titlepage-before t:side="recto">
587 </t:titlepage-before>
588
589 <t:titlepage-before t:side="verso">
590 </t:titlepage-before>
591</t:titlepage>
592
593<t:titlepage t:element="sect1" t:wrapper="fo:block">
594 <t:titlepage-content t:side="recto">
595 <title
596 margin-left="{$title.margin.left}"
597 font-family="{$title.fontset}"/>
598 <subtitle
599 font-family="{$title.fontset}"/>
600 <corpauthor/>
601 <authorgroup/>
602 <author/>
603 <othercredit/>
604 <releaseinfo/>
605 <copyright/>
606 <legalnotice/>
607 <pubdate/>
608 <revision/>
609 <revhistory/>
610 <abstract/>
611 </t:titlepage-content>
612
613 <t:titlepage-content t:side="verso">
614 </t:titlepage-content>
615
616 <t:titlepage-separator>
617 </t:titlepage-separator>
618
619 <t:titlepage-before t:side="recto">
620 </t:titlepage-before>
621
622 <t:titlepage-before t:side="verso">
623 </t:titlepage-before>
624</t:titlepage>
625
626<t:titlepage t:element="sect2" t:wrapper="fo:block">
627 <t:titlepage-content t:side="recto">
628 <title
629 margin-left="{$title.margin.left}"
630 font-family="{$title.fontset}"/>
631 <subtitle
632 font-family="{$title.fontset}"/>
633 <corpauthor/>
634 <authorgroup/>
635 <author/>
636 <othercredit/>
637 <releaseinfo/>
638 <copyright/>
639 <legalnotice/>
640 <pubdate/>
641 <revision/>
642 <revhistory/>
643 <abstract/>
644 </t:titlepage-content>
645
646 <t:titlepage-content t:side="verso">
647 </t:titlepage-content>
648
649 <t:titlepage-separator>
650 </t:titlepage-separator>
651
652 <t:titlepage-before t:side="recto">
653 </t:titlepage-before>
654
655 <t:titlepage-before t:side="verso">
656 </t:titlepage-before>
657</t:titlepage>
658
659<t:titlepage t:element="sect3" t:wrapper="fo:block">
660 <t:titlepage-content t:side="recto">
661 <title
662 margin-left="{$title.margin.left}"
663 font-family="{$title.fontset}"/>
664 <subtitle
665 font-family="{$title.fontset}"/>
666 <corpauthor/>
667 <authorgroup/>
668 <author/>
669 <othercredit/>
670 <releaseinfo/>
671 <copyright/>
672 <legalnotice/>
673 <pubdate/>
674 <revision/>
675 <revhistory/>
676 <abstract/>
677 </t:titlepage-content>
678
679 <t:titlepage-content t:side="verso">
680 </t:titlepage-content>
681
682 <t:titlepage-separator>
683 </t:titlepage-separator>
684
685 <t:titlepage-before t:side="recto">
686 </t:titlepage-before>
687
688 <t:titlepage-before t:side="verso">
689 </t:titlepage-before>
690</t:titlepage>
691
692<t:titlepage t:element="sect4" t:wrapper="fo:block">
693 <t:titlepage-content t:side="recto">
694 <title
695 margin-left="{$title.margin.left}"
696 font-family="{$title.fontset}"/>
697 <subtitle
698 font-family="{$title.fontset}"/>
699 <corpauthor/>
700 <authorgroup/>
701 <author/>
702 <othercredit/>
703 <releaseinfo/>
704 <copyright/>
705 <legalnotice/>
706 <pubdate/>
707 <revision/>
708 <revhistory/>
709 <abstract/>
710 </t:titlepage-content>
711
712 <t:titlepage-content t:side="verso">
713 </t:titlepage-content>
714
715 <t:titlepage-separator>
716 </t:titlepage-separator>
717
718 <t:titlepage-before t:side="recto">
719 </t:titlepage-before>
720
721 <t:titlepage-before t:side="verso">
722 </t:titlepage-before>
723</t:titlepage>
724
725<t:titlepage t:element="sect5" t:wrapper="fo:block">
726 <t:titlepage-content t:side="recto">
727 <title
728 margin-left="{$title.margin.left}"
729 font-family="{$title.fontset}"/>
730 <subtitle
731 font-family="{$title.fontset}"/>
732 <corpauthor/>
733 <authorgroup/>
734 <author/>
735 <othercredit/>
736 <releaseinfo/>
737 <copyright/>
738 <legalnotice/>
739 <pubdate/>
740 <revision/>
741 <revhistory/>
742 <abstract/>
743 </t:titlepage-content>
744
745 <t:titlepage-content t:side="verso">
746 </t:titlepage-content>
747
748 <t:titlepage-separator>
749 </t:titlepage-separator>
750
751 <t:titlepage-before t:side="recto">
752 </t:titlepage-before>
753
754 <t:titlepage-before t:side="verso">
755 </t:titlepage-before>
756</t:titlepage>
757
758<t:titlepage t:element="simplesect" t:wrapper="fo:block">
759 <t:titlepage-content t:side="recto">
760 <title
761 margin-left="{$title.margin.left}"
762 font-family="{$title.fontset}"/>
763 <subtitle
764 font-family="{$title.fontset}"/>
765 <corpauthor/>
766 <authorgroup/>
767 <author/>
768 <othercredit/>
769 <releaseinfo/>
770 <copyright/>
771 <legalnotice/>
772 <pubdate/>
773 <revision/>
774 <revhistory/>
775 <abstract/>
776 </t:titlepage-content>
777
778 <t:titlepage-content t:side="verso">
779 </t:titlepage-content>
780
781 <t:titlepage-separator>
782 </t:titlepage-separator>
783
784 <t:titlepage-before t:side="recto">
785 </t:titlepage-before>
786
787 <t:titlepage-before t:side="verso">
788 </t:titlepage-before>
789</t:titlepage>
790
791<!-- ==================================================================== -->
792
793 <t:titlepage t:element="bibliography" t:wrapper="fo:block">
794 <t:titlepage-content t:side="recto">
795 <title
796 t:force="1"
797 t:named-template="component.title"
798 param:node="ancestor-or-self::bibliography[1]"
799 margin-left="{$title.margin.left}"
800 font-size="&hsize5;"
801 font-family="{$title.fontset}"
802 font-weight="bold"/>
803 <subtitle
804 font-family="{$title.fontset}"/>
805 </t:titlepage-content>
806
807 <t:titlepage-content t:side="verso">
808 </t:titlepage-content>
809
810 <t:titlepage-separator>
811 </t:titlepage-separator>
812
813 <t:titlepage-before t:side="recto">
814 </t:titlepage-before>
815
816 <t:titlepage-before t:side="verso">
817 </t:titlepage-before>
818 </t:titlepage>
819
820<!-- ==================================================================== -->
821
822 <t:titlepage t:element="bibliodiv" t:wrapper="fo:block">
823 <t:titlepage-content t:side="recto">
824 <title t:named-template="component.title"
825 param:node="ancestor-or-self::bibliodiv[1]"
826 margin-left="{$title.margin.left}"
827 font-size="&hsize4;"
828 font-family="{$title.fontset}"
829 font-weight="bold"/>
830 <subtitle
831 font-family="{$title.fontset}"/>
832 </t:titlepage-content>
833
834 <t:titlepage-content t:side="verso">
835 </t:titlepage-content>
836
837 <t:titlepage-separator>
838 </t:titlepage-separator>
839
840 <t:titlepage-before t:side="recto">
841 </t:titlepage-before>
842
843 <t:titlepage-before t:side="verso">
844 </t:titlepage-before>
845 </t:titlepage>
846
847<!-- ==================================================================== -->
848
849 <t:titlepage t:element="glossary" t:wrapper="fo:block">
850 <t:titlepage-content t:side="recto">
851 <title
852 t:force="1"
853 t:named-template="component.title"
854 param:node="ancestor-or-self::glossary[1]"
855 margin-left="{$title.margin.left}"
856 font-size="&hsize5;"
857 font-family="{$title.fontset}"
858 font-weight="bold"/>
859 <subtitle
860 font-family="{$title.fontset}"/>
861 </t:titlepage-content>
862
863 <t:titlepage-content t:side="verso">
864 </t:titlepage-content>
865
866 <t:titlepage-separator>
867 </t:titlepage-separator>
868
869 <t:titlepage-before t:side="recto">
870 </t:titlepage-before>
871
872 <t:titlepage-before t:side="verso">
873 </t:titlepage-before>
874 </t:titlepage>
875
876<!-- ==================================================================== -->
877
878 <t:titlepage t:element="glossdiv" t:wrapper="fo:block">
879 <t:titlepage-content t:side="recto">
880 <title t:named-template="component.title"
881 param:node="ancestor-or-self::glossdiv[1]"
882 margin-left="{$title.margin.left}"
883 font-size="&hsize4;"
884 font-family="{$title.fontset}"
885 font-weight="bold"/>
886 <subtitle
887 font-family="{$title.fontset}"/>
888 </t:titlepage-content>
889
890 <t:titlepage-content t:side="verso">
891 </t:titlepage-content>
892
893 <t:titlepage-separator>
894 </t:titlepage-separator>
895
896 <t:titlepage-before t:side="recto">
897 </t:titlepage-before>
898
899 <t:titlepage-before t:side="verso">
900 </t:titlepage-before>
901 </t:titlepage>
902
903<!-- ==================================================================== -->
904
905 <t:titlepage t:element="index" t:wrapper="fo:block">
906 <t:titlepage-content t:side="recto">
907 <title
908 t:force="1"
909 t:named-template="component.title"
910 param:node="ancestor-or-self::index[1]"
911 param:pagewide="1"
912 margin-left="0pt"
913 font-size="&hsize5;"
914 font-family="{$title.fontset}"
915 font-weight="bold"/>
916 <subtitle
917 font-family="{$title.fontset}"/>
918 </t:titlepage-content>
919
920 <t:titlepage-content t:side="verso">
921 </t:titlepage-content>
922
923 <t:titlepage-separator>
924 </t:titlepage-separator>
925
926 <t:titlepage-before t:side="recto">
927 </t:titlepage-before>
928
929 <t:titlepage-before t:side="verso">
930 </t:titlepage-before>
931 </t:titlepage>
932
933<!-- ==================================================================== -->
934
935 <!-- The indexdiv.title template is used so that manual and -->
936 <!-- automatically generated indexdiv titles get the same -->
937 <!-- formatting. -->
938
939 <t:titlepage t:element="indexdiv" t:wrapper="fo:block">
940 <t:titlepage-content t:side="recto">
941 <title t:force="1"
942 t:named-template="indexdiv.title"
943 param:title="title"/>
944 <subtitle
945 font-family="{$title.fontset}"/>
946 </t:titlepage-content>
947
948 <t:titlepage-content t:side="verso">
949 </t:titlepage-content>
950
951 <t:titlepage-separator>
952 </t:titlepage-separator>
953
954 <t:titlepage-before t:side="recto">
955 </t:titlepage-before>
956
957 <t:titlepage-before t:side="verso">
958 </t:titlepage-before>
959 </t:titlepage>
960
961<!-- ==================================================================== -->
962
963 <t:titlepage t:element="setindex" t:wrapper="fo:block">
964 <t:titlepage-content t:side="recto">
965 <title
966 t:force="1"
967 t:named-template="component.title"
968 param:node="ancestor-or-self::setindex[1]"
969 param:pagewide="1"
970 margin-left="0pt"
971 font-size="&hsize5;"
972 font-family="{$title.fontset}"
973 font-weight="bold"/>
974 <subtitle
975 font-family="{$title.fontset}"/>
976 </t:titlepage-content>
977
978 <t:titlepage-content t:side="verso">
979 </t:titlepage-content>
980
981 <t:titlepage-separator>
982 </t:titlepage-separator>
983
984 <t:titlepage-before t:side="recto">
985 </t:titlepage-before>
986
987 <t:titlepage-before t:side="verso">
988 </t:titlepage-before>
989 </t:titlepage>
990
991<!-- ==================================================================== -->
992
993 <t:titlepage t:element="colophon" t:wrapper="fo:block">
994 <t:titlepage-content t:side="recto">
995 <title
996 t:force="1"
997 t:named-template="component.title"
998 param:node="ancestor-or-self::colophon[1]"
999 margin-left="{$title.margin.left}"
1000 font-size="&hsize5;"
1001 font-family="{$title.fontset}"
1002 font-weight="bold"/>
1003 <subtitle
1004 font-family="{$title.fontset}"/>
1005 </t:titlepage-content>
1006
1007 <t:titlepage-content t:side="verso">
1008 </t:titlepage-content>
1009
1010 <t:titlepage-separator>
1011 </t:titlepage-separator>
1012
1013 <t:titlepage-before t:side="recto">
1014 </t:titlepage-before>
1015
1016 <t:titlepage-before t:side="verso">
1017 </t:titlepage-before>
1018</t:titlepage>
1019
1020<!-- ==================================================================== -->
1021
1022 <t:titlepage t:element="table.of.contents" t:wrapper="fo:block">
1023 <t:titlepage-content t:side="recto">
1024 <title
1025 t:force="1"
1026 t:named-template="gentext"
1027 param:key="'TableofContents'"
1028 space-before.minimum="1em"
1029 space-before.optimum="1.5em"
1030 space-before.maximum="2em"
1031 space-after="0.5em"
1032 margin-left="{$title.margin.left}"
1033 font-size="&hsize3;"
1034 font-weight="bold"
1035 font-family="{$title.fontset}"/>
1036 </t:titlepage-content>
1037
1038 <t:titlepage-content t:side="verso">
1039 </t:titlepage-content>
1040
1041 <t:titlepage-separator>
1042 </t:titlepage-separator>
1043
1044 <t:titlepage-before t:side="recto">
1045 </t:titlepage-before>
1046
1047 <t:titlepage-before t:side="verso">
1048 </t:titlepage-before>
1049 </t:titlepage>
1050
1051 <t:titlepage t:element="list.of.tables" t:wrapper="fo:block">
1052 <t:titlepage-content t:side="recto">
1053 <title
1054 t:force="1"
1055 t:named-template="gentext"
1056 param:key="'ListofTables'"
1057 space-before.minimum="1em"
1058 space-before.optimum="1.5em"
1059 space-before.maximum="2em"
1060 space-after="0.5em"
1061 margin-left="{$title.margin.left}"
1062 font-size="&hsize3;"
1063 font-weight="bold"
1064 font-family="{$title.fontset}"/>
1065 </t:titlepage-content>
1066
1067 <t:titlepage-content t:side="verso">
1068 </t:titlepage-content>
1069
1070 <t:titlepage-separator>
1071 </t:titlepage-separator>
1072
1073 <t:titlepage-before t:side="recto">
1074 </t:titlepage-before>
1075
1076 <t:titlepage-before t:side="verso">
1077 </t:titlepage-before>
1078 </t:titlepage>
1079
1080 <t:titlepage t:element="list.of.figures" t:wrapper="fo:block">
1081 <t:titlepage-content t:side="recto">
1082 <title
1083 t:force="1"
1084 t:named-template="gentext"
1085 param:key="'ListofFigures'"
1086 space-before.minimum="1em"
1087 space-before.optimum="1.5em"
1088 space-before.maximum="2em"
1089 space-after="0.5em"
1090 margin-left="{$title.margin.left}"
1091 font-size="&hsize3;"
1092 font-weight="bold"
1093 font-family="{$title.fontset}"/>
1094 </t:titlepage-content>
1095
1096 <t:titlepage-content t:side="verso">
1097 </t:titlepage-content>
1098
1099 <t:titlepage-separator>
1100 </t:titlepage-separator>
1101
1102 <t:titlepage-before t:side="recto">
1103 </t:titlepage-before>
1104
1105 <t:titlepage-before t:side="verso">
1106 </t:titlepage-before>
1107 </t:titlepage>
1108
1109 <t:titlepage t:element="list.of.examples" t:wrapper="fo:block">
1110 <t:titlepage-content t:side="recto">
1111 <title
1112 t:force="1"
1113 t:named-template="gentext"
1114 param:key="'ListofExamples'"
1115 space-before.minimum="1em"
1116 space-before.optimum="1.5em"
1117 space-before.maximum="2em"
1118 space-after="0.5em"
1119 margin-left="{$title.margin.left}"
1120 font-size="&hsize3;"
1121 font-weight="bold"
1122 font-family="{$title.fontset}"/>
1123 </t:titlepage-content>
1124
1125 <t:titlepage-content t:side="verso">
1126 </t:titlepage-content>
1127
1128 <t:titlepage-separator>
1129 </t:titlepage-separator>
1130
1131 <t:titlepage-before t:side="recto">
1132 </t:titlepage-before>
1133
1134 <t:titlepage-before t:side="verso">
1135 </t:titlepage-before>
1136 </t:titlepage>
1137
1138 <t:titlepage t:element="list.of.equations" t:wrapper="fo:block">
1139 <t:titlepage-content t:side="recto">
1140 <title
1141 t:force="1"
1142 t:named-template="gentext"
1143 param:key="'ListofEquations'"
1144 space-before.minimum="1em"
1145 space-before.optimum="1.5em"
1146 space-before.maximum="2em"
1147 space-after="0.5em"
1148 margin-left="{$title.margin.left}"
1149 font-size="&hsize3;"
1150 font-weight="bold"
1151 font-family="{$title.fontset}"/>
1152 </t:titlepage-content>
1153
1154 <t:titlepage-content t:side="verso">
1155 </t:titlepage-content>
1156
1157 <t:titlepage-separator>
1158 </t:titlepage-separator>
1159
1160 <t:titlepage-before t:side="recto">
1161 </t:titlepage-before>
1162
1163 <t:titlepage-before t:side="verso">
1164 </t:titlepage-before>
1165 </t:titlepage>
1166
1167 <t:titlepage t:element="list.of.procedures" t:wrapper="fo:block">
1168 <t:titlepage-content t:side="recto">
1169 <title
1170 t:force="1"
1171 t:named-template="gentext"
1172 param:key="'ListofProcedures'"
1173 space-before.minimum="1em"
1174 space-before.optimum="1.5em"
1175 space-before.maximum="2em"
1176 space-after="0.5em"
1177 margin-left="{$title.margin.left}"
1178 font-size="&hsize3;"
1179 font-weight="bold"
1180 font-family="{$title.fontset}"/>
1181 </t:titlepage-content>
1182
1183 <t:titlepage-content t:side="verso">
1184 </t:titlepage-content>
1185
1186 <t:titlepage-separator>
1187 </t:titlepage-separator>
1188
1189 <t:titlepage-before t:side="recto">
1190 </t:titlepage-before>
1191
1192 <t:titlepage-before t:side="verso">
1193 </t:titlepage-before>
1194 </t:titlepage>
1195
1196 <t:titlepage t:element="list.of.unknowns" t:wrapper="fo:block">
1197 <t:titlepage-content t:side="recto">
1198 <title
1199 t:force="1"
1200 t:named-template="gentext"
1201 param:key="'ListofUnknown'"
1202 space-before.minimum="1em"
1203 space-before.optimum="1.5em"
1204 space-before.maximum="2em"
1205 space-after="0.5em"
1206 margin-left="{$title.margin.left}"
1207 font-size="&hsize3;"
1208 font-weight="bold"
1209 font-family="{$title.fontset}"/>
1210 </t:titlepage-content>
1211
1212 <t:titlepage-content t:side="verso">
1213 </t:titlepage-content>
1214
1215 <t:titlepage-separator>
1216 </t:titlepage-separator>
1217
1218 <t:titlepage-before t:side="recto">
1219 </t:titlepage-before>
1220
1221 <t:titlepage-before t:side="verso">
1222 </t:titlepage-before>
1223 </t:titlepage>
1224
1225<!-- ==================================================================== -->
1226
1227</t:templates>
diff --git a/documentation/test-manual/test-manual-customization.xsl b/documentation/test-manual/test-manual-customization.xsl
deleted file mode 100644
index 17bf57c2d1..0000000000
--- a/documentation/test-manual/test-manual-customization.xsl
+++ /dev/null
@@ -1,29 +0,0 @@
1<?xml version='1.0'?>
2<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
3
4<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
5
6 <xsl:import href="http://downloads.yoctoproject.org/mirror/docbook-mirror/docbook-xsl-1.76.1/xhtml/docbook.xsl" />
7
8<!--
9
10 <xsl:import href="../template/1.76.1/docbook-xsl-1.76.1/xhtml/docbook.xsl" />
11
12 <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.76.1/xhtml/docbook.xsl" />
13
14-->
15
16 <xsl:include href="../template/permalinks.xsl"/>
17 <xsl:include href="../template/section.title.xsl"/>
18 <xsl:include href="../template/component.title.xsl"/>
19 <xsl:include href="../template/division.title.xsl"/>
20 <xsl:include href="../template/formal.object.heading.xsl"/>
21
22 <xsl:param name="html.stylesheet" select="'test-manual-style.css'" />
23 <xsl:param name="chapter.autolabel" select="1" />
24 <xsl:param name="appendix.autolabel" select="A" />
25 <xsl:param name="section.autolabel" select="1" />
26 <xsl:param name="section.label.includes.component.label" select="1" />
27 <xsl:param name="generate.id.attributes" select="1" />
28
29</xsl:stylesheet>
diff --git a/documentation/test-manual/test-manual-intro.xml b/documentation/test-manual/test-manual-intro.xml
deleted file mode 100644
index 0cdbee4d8e..0000000000
--- a/documentation/test-manual/test-manual-intro.xml
+++ /dev/null
@@ -1,624 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='test-manual-intro'>
7
8<title>The Yocto Project Test Environment Manual</title>
9 <section id='test-welcome'>
10 <title>Welcome</title>
11
12 <para> Welcome to the Yocto Project Test Environment Manual! This manual is a work in
13 progress. The manual contains information about the testing environment used by the
14 Yocto Project to make sure each major and minor release works as intended. All the
15 project's testing infrastructure and processes are publicly visible and available so
16 that the community can see what testing is being performed, how it's being done and the
17 current status of the tests and the project at any given time. It is intended that Other
18 organizations can leverage off the process and testing environment used by the Yocto
19 Project to create their own automated, production test environment, building upon the
20 foundations from the project core. </para>
21
22 <para> Currently, the Yocto Project Test Environment Manual has no projected release date.
23 This manual is a work-in-progress and is being initially loaded with information from
24 the <ulink url="">README</ulink> files and notes from key engineers: <itemizedlist>
25 <listitem>
26 <para>
27 <emphasis><filename>yocto-autobuilder2</filename>:</emphasis> This <ulink
28 url="http://git.yoctoproject.org/clean/cgit.cgi/yocto-autobuilder2/tree/README.md"
29 ><filename>README.md</filename></ulink> is the main README which
30 detials how to set up the Yocto Project Autobuilder. The
31 <filename>yocto-autobuilder2</filename> repository represents the Yocto
32 Project's console UI plugin to Buildbot and the configuration necessary to
33 configure Buildbot to perform the testing the project requires. </para>
34 </listitem>
35 <listitem>
36 <para>
37 <emphasis><filename>yocto-autobuilder-helper</filename>:</emphasis> This
38 <ulink
39 url="http://git.yoctoproject.org/clean/cgit.cgi/yocto-autobuilder-helper/tree/README"
40 ><filename>README</filename></ulink> and repository contains Yocto
41 Project Autobuilder Helper scripts and configuration. The
42 <filename>yocto-autobuilder-helper</filename> repository contains the
43 "glue" logic that defines which tests to run and how to run them. As a
44 result, it can be used by any Continuous Improvement (CI) system to run
45 builds, support getting the correct code revisions, configure builds and
46 layers, run builds, and collect results. The code is independent of any CI
47 system, which means the code can work Buildbot, Jenkins, or others. This
48 repository has a branch per release of the project defining the tests to run
49 on a per release basis.</para>
50 </listitem>
51 </itemizedlist>
52 </para>
53 </section>
54
55 <section id='test-yocto-project-autobuilder-overview'>
56 <title>Yocto Project Autobuilder Overview</title>
57
58 <para>The Yocto Project Autobuilder collectively refers to the software, tools, scripts, and
59 procedures used by the Yocto Project to test released software across supported hardware
60 in an automated and regular fashion. Basically, during the development of a Yocto
61 Project release, the Autobuilder tests if things work. The Autobuilder builds all test
62 targets and runs all the tests. </para>
63
64 <para>The Yocto Project uses now uses standard upstream <ulink
65 url="https://docs.buildbot.net/0.9.15.post1/">Buildbot</ulink> (version 9) to drive
66 its integration and testing. Buildbot Nine has a plug-in interface that the Yocto
67 Project customizes using code from the <filename>yocto-autobuilder2</filename>
68 repository, adding its own console UI plugin. The resulting UI plug-in allows you to
69 visualize builds in a way suited to the project's needs.</para>
70
71 <para>A <filename>helper</filename> layer provides configuration and job management through
72 scripts found in the <filename>yocto-autobuilder-helper</filename> repository. The
73 <filename>helper</filename> layer contains the bulk of the build configuration
74 information and is release-specific, which makes it highly customizable on a per-project
75 basis. The layer is CI system-agnostic and contains a number of Helper scripts that can
76 generate build configurations from simple JSON files. <note>
77 <para>The project uses Buildbot for historical reasons but also because many of the
78 project developers have knowledge of python. It is possible to use the outer
79 layers from another Continuous Integration (CI) system such as <ulink
80 url="https://en.wikipedia.org/wiki/Jenkins_(software)">Jenkins</ulink>
81 instead of Buildbot. </para>
82 </note>
83 </para>
84
85 <para> The following figure shows the Yocto Project Autobuilder stack with a topology that
86 includes a controller and a cluster of workers: <imagedata
87 fileref="figures/ab-test-cluster.png" width="4.6in" depth="4.35in" align="center"
88 scalefit="1"/>
89 </para>
90 </section>
91
92 <section id='test-project-tests'>
93 <title>Yocto Project Tests - Types of Testing Overview</title>
94
95 <para>The Autobuilder tests different elements of the project by using thefollowing types of
96 tests: <itemizedlist>
97 <listitem>
98 <para>
99 <emphasis>Build Testing:</emphasis> Tests whether specific configurations
100 build by varying <ulink url="&YOCTO_DOCS_REF_URL;#var-MACHINE"
101 ><filename>MACHINE</filename></ulink>, <ulink
102 url="&YOCTO_DOCS_REF_URL;#var-DISTRO"
103 ><filename>DISTRO</filename></ulink>, other configuration options, and
104 the specific target images being built (or world). Used to trigger builds of
105 all the different test configurations on the Autobuilder. Builds usually
106 cover many different targets for different architectures, machines, and
107 distributions, as well as different configurations, such as different init
108 systems. The Autobuilder tests literally hundreds of configurations and
109 targets. <itemizedlist>
110 <listitem>
111 <para>
112 <emphasis>Sanity Checks During the Build Process:</emphasis>
113 Tests initiated through the <ulink
114 url="&YOCTO_DOCS_REF_URL;#ref-classes-insane"
115 ><filename>insane</filename></ulink> class. These checks
116 ensure the output of the builds are correct. For example, does
117 the ELF architecture in the generated binaries match the target
118 system? ARM binaries would not work in a MIPS system! </para>
119 </listitem>
120 </itemizedlist></para>
121 </listitem>
122 <listitem>
123 <para>
124 <emphasis>Build Performance Testing:</emphasis> Tests whether or not
125 commonly used steps during builds work efficiently and avoid regressions.
126 Tests to time commonly used usage scenarios are run through
127 <filename>oe-build-perf-test</filename>. These tests are run on isolated
128 machines so that the time measurements of the tests are accurate and no
129 other processes interfere with the timing results. The project currently
130 tests performance on two different distributions, Fedora and Ubuntu, to
131 ensure we have no single point of failure and can ensure the different
132 distros work effectively. </para>
133 </listitem>
134 <listitem>
135 <para>
136 <emphasis>eSDK Testing:</emphasis> Image tests initiated through the
137 following command:
138 <literallayout class="monospaced">
139 $ bitbake <replaceable>image</replaceable> -c testsdkext
140 </literallayout>
141 The tests utilize the <filename>testsdkext</filename> class and the
142 <filename>do_testsdkext</filename> task. </para>
143 </listitem>
144 <listitem>
145 <para>
146 <emphasis>Feature Testing:</emphasis> Various scenario-based tests are run
147 through the <ulink url="&YOCTO_DOCS_REF_URL;#testing-and-quality-assurance"
148 >OpenEmbedded Self-Test</ulink> (oe-selftest). We test oe-selftest on
149 each of the main distrubutions we support. </para>
150 </listitem>
151 <listitem>
152 <para>
153 <emphasis>Image Testing:</emphasis> Image tests initiated through the
154 following command:
155 <literallayout class="monospaced">
156 $ bitbake <replaceable>image</replaceable> -c testimage
157 </literallayout>
158 The tests utilize the <ulink
159 url="&YOCTO_DOCS_REF_URL;#ref-classes-testimage*"
160 ><filename>testimage*</filename></ulink> classes and the <ulink
161 url="&YOCTO_DOCS_REF_URL;#ref-tasks-testimage"
162 ><filename>do_testimage</filename></ulink> task. </para>
163 </listitem>
164 <listitem>
165 <para>
166 <emphasis>Layer Testing:</emphasis> The Autobuilder has the possibility to
167 test whether specific layers work with the test of the system. The layers
168 tested may be selected by members of the project. Some key community layers
169 are also tested periodically.</para>
170 </listitem>
171 <listitem>
172 <para>
173 <emphasis>Package Testing:</emphasis> A Package Test (ptest) runs tests
174 against packages built by the OpenEmbedded build system on the target
175 machine. See the "<ulink
176 url="&YOCTO_DOCS_DEV_URL;#testing-packages-with-ptest">Testing Packages
177 With ptest</ulink>" section in the Yocto Project Development Tasks
178 Manual and the "<ulink url="&YOCTO_WIKI_URL;/wiki/Ptest">Ptest</ulink>" Wiki
179 page for more information on Ptest. </para>
180 </listitem>
181 <listitem>
182 <para>
183 <emphasis>SDK Testing:</emphasis> Image tests initiated through the
184 following command:
185 <literallayout class="monospaced">
186 $ bitbake <replaceable>image</replaceable> -c testsdk
187 </literallayout>
188 The tests utilize the <ulink url="&YOCTO_DOCS_REF_URL;#ref-classes-testsdk"
189 ><filename>testsdk</filename></ulink> class and the
190 <filename>do_testsdk</filename> task. </para>
191 </listitem>
192 <listitem>
193 <para>
194 <emphasis>Unit Testing:</emphasis> Unit tests on various components of the
195 system run through <filename>oe-selftest</filename> and <ulink
196 url="&YOCTO_DOCS_REF_URL;#testing-and-quality-assurance"
197 ><filename>bitbake-selftest</filename></ulink>. </para>
198 </listitem>
199 <listitem>
200 <para>
201 <emphasis>Automatic Upgrade Helper:</emphasis> This target tests whether new
202 versions of software are available and whether we can automatically upgrade
203 to those new versions. If so, this target emails the maintainers with a
204 patch to let them know this is possible.</para>
205 </listitem>
206 </itemizedlist>
207 </para>
208 </section>
209
210 <section id='test-test-mapping'>
211 <title>How Tests Map to Areas of Code</title>
212
213 <para>
214 Tests map into the codebase as follows:
215 <itemizedlist>
216 <listitem><para>
217 <emphasis>bitbake-selftest</emphasis>: </para>
218 <para>These tests are self-contained and test BitBake as well as its APIs, which
219 include the fetchers. The tests are located in
220 <filename>bitbake/lib/*/tests</filename>. </para>
221 <para>From within the BitBake repository, run the following:
222 <literallayout class="monospaced">
223 $ bitbake-selftest
224 </literallayout>
225 </para>
226 <para>To skip tests that access the Internet, use the
227 <filename>BB_SKIP_NETTEST</filename> variable when running
228 "bitbake-selftest" as follows:
229 <literallayout class="monospaced">
230 $ BB_SKIP_NETTEST=yes bitbake-selftest
231 </literallayout></para>
232 <para>The default output is quiet and just prints a summary of what was run. To
233 see more information, there is a verbose
234 option:<literallayout class="monospaced">
235 $ bitbake-selftest -v
236 </literallayout></para>
237 <para>Use this option when you wish to skip tests that access the network, which
238 are mostly necessary to test the fetcher modules. To specify individual test
239 modules to run, append the test module name to the "bitbake-selftest"
240 command. For example, to specify the tests for the bb.data.module, run:
241 <literallayout class="monospaced">
242 $ bitbake-selftest bb.test.data.module
243 </literallayout>You
244 can also specify individual tests by defining the full name and module plus
245 the class path of the test, for example:
246 <literallayout class="monospaced">
247 $ bitbake-selftest bb.tests.data.TestOverrides.test_one_override
248 </literallayout></para>
249 <para>The tests are based on <ulink
250 url="https://docs.python.org/3/library/unittest.html">Python
251 unittest</ulink>. </para></listitem>
252 <listitem><para>
253 <emphasis>oe-selftest</emphasis>: <itemizedlist>
254 <listitem>
255 <para>These tests use OE to test the workflows, which include
256 testing specific features, behaviors of tasks, and API unit
257 tests. </para>
258 </listitem>
259 <listitem>
260 <para>The tests can take advantage of parallelism through the "-j"
261 option, which can specify a number of threads to spread the
262 tests across. Note that all tests from a given class of tests
263 will run in the same thread. To parallelize large numbers of
264 tests you can split the class into multiple units.</para>
265 </listitem>
266 <listitem>
267 <para>The tests are based on Python unittest. </para>
268 </listitem>
269 <listitem>
270 <para>The code for the tests resides in
271 <filename>meta/lib/oeqa/selftest/cases/</filename>. </para>
272 </listitem>
273 <listitem>
274 <para>To run all the tests, enter the following command:
275 <literallayout class="monospaced">
276 $ oe-selftest -a
277 </literallayout>
278 </para>
279 </listitem>
280 <listitem>
281 <para>To run a specific test, use the following command form where
282 <replaceable>testname</replaceable> is the name of the
283 specific test:
284 <literallayout class="monospaced">
285 $ oe-selftest -r <replaceable>testname</replaceable>
286 </literallayout>
287 For example, the following command would run the tinfoil getVar
288 API
289 test:<literallayout class="monospaced">
290 $ oe-selftest -r tinfoil.TinfoilTests.test_getvar
291 </literallayout>It
292 is also possible to run a set of tests. For example the
293 following command will run all of the tinfoil
294 tests:<literallayout class="monospaced">
295 $ oe-selftest -r tinfoil
296 </literallayout></para>
297 </listitem>
298 </itemizedlist>
299 </para></listitem>
300 <listitem><para>
301 <emphasis>testimage:</emphasis>
302 <itemizedlist>
303 <listitem><para>
304 These tests build an image, boot it, and run tests
305 against the image's content.
306 </para></listitem>
307 <listitem><para> The code for these tests resides in <filename>meta/lib/oeqa/runtime/cases/</filename>. </para></listitem>
308 <listitem><para>
309 You need to set the
310 <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_CLASSES'><filename>IMAGE_CLASSES</filename></ulink>
311 variable as follows:
312 <literallayout class='monospaced'>
313 IMAGE_CLASSES += "testimage"
314 </literallayout>
315 </para></listitem>
316 <listitem><para>
317 Run the tests using the following command form:
318 <literallayout class='monospaced'>
319 $ bitbake <replaceable>image</replaceable> -c testimage
320 </literallayout>
321 </para></listitem>
322 </itemizedlist>
323 </para></listitem>
324 <listitem><para>
325 <emphasis>testsdk:</emphasis>
326 <itemizedlist>
327 <listitem><para>These tests build an SDK, install it, and then run tests against that SDK. </para></listitem>
328 <listitem><para>The code for these tests resides in <filename>meta/lib/oeqa/sdk/cases/</filename>. </para></listitem>
329 <listitem><para>Run the test using the following command form:
330 <literallayout class="monospaced">
331 $ bitbake <replaceable>image</replaceable> -c testsdk
332 </literallayout>
333 </para></listitem>
334 </itemizedlist>
335 </para></listitem>
336 <listitem><para>
337 <emphasis>testsdk_ext:</emphasis>
338 <itemizedlist>
339 <listitem><para>These tests build an extended SDK (eSDK), install that eSDK, and run tests against the eSDK. </para></listitem>
340 <listitem><para>The code for these tests resides in <filename>meta/lib/oeqa/esdk</filename>. </para></listitem>
341 <listitem><para>To run the tests, use the following command form:
342 <literallayout class="monospaced">
343 $ bitbake <replaceable>image</replaceable> -c testsdkext
344 </literallayout>
345 </para></listitem>
346 </itemizedlist>
347 </para></listitem>
348
349
350 <listitem><para>
351 <emphasis>oe-build-perf-test:</emphasis>
352 <itemizedlist>
353 <listitem><para>These tests run through commonly used usage scenarios and measure the performance times. </para></listitem>
354 <listitem><para>The code for these tests resides in <filename>meta/lib/oeqa/buildperf</filename>. </para></listitem>
355 <listitem><para>To run the tests, use the following command form:
356 <literallayout class="monospaced">
357 $ oe-build-perf-test <replaceable>options</replaceable>
358 </literallayout>The
359 command takes a number of options, such as where to place the
360 test results. The Autobuilder Helper Scripts include the
361 <filename>build-perf-test-wrapper</filename> script with
362 examples of how to use the oe-build-perf-test from the command
363 line.</para>
364 <para>Use the <filename>oe-git-archive</filename> command to store
365 test results into a Git repository. </para>
366 <para>Use the <filename>oe-build-perf-report</filename> command to
367 generate text reports and HTML reports with graphs of the
368 performance data. For examples, see <link linkend=""
369 >http://downloads.yoctoproject.org/releases/yocto/yocto-2.7/testresults/buildperf-centos7/perf-centos7.yoctoproject.org_warrior_20190414204758_0e39202.html</link>
370 and <link linkend=""
371 >http://downloads.yoctoproject.org/releases/yocto/yocto-2.7/testresults/buildperf-centos7/perf-centos7.yoctoproject.org_warrior_20190414204758_0e39202.txt</link>.</para></listitem>
372 <listitem>
373 <para>The tests are contained in
374 <filename>lib/oeqa/buildperf/test_basic.py</filename>.</para>
375 </listitem>
376 </itemizedlist>
377 </para></listitem>
378
379
380
381
382 </itemizedlist>
383 </para>
384 </section>
385
386 <section id='test-examples'>
387 <title>Test Examples</title>
388
389 <para>This section provides example tests for each of the tests listed in the <link
390 linkend="test-test-mapping">How Tests Map to Areas of Code</link> section. </para>
391 <para>For oeqa tests, testcases for each area reside in the main test directory at
392 <filename>meta/lib/oeqa/selftest/cases</filename> directory.</para>
393 <para>For oe-selftest. bitbake testcases reside in the <filename>lib/bb/tests/</filename>
394 directory. </para>
395
396 <section id='bitbake-selftest-example'>
397 <title><filename>bitbake-selftest</filename></title>
398
399 <para>A simple test example from <filename>lib/bb/tests/data.py</filename> is:
400 <literallayout class="monospaced">
401 class DataExpansions(unittest.TestCase):
402 def setUp(self):
403 self.d = bb.data.init()
404 self.d["foo"] = "value_of_foo"
405 self.d["bar"] = "value_of_bar"
406 self.d["value_of_foo"] = "value_of_'value_of_foo'"
407
408 def test_one_var(self):
409 val = self.d.expand("${foo}")
410 self.assertEqual(str(val), "value_of_foo")
411 </literallayout>
412 </para>
413 <para>In this example, a <ulink url=""><filename>DataExpansions</filename></ulink> class
414 of tests is created, derived from standard python unittest. The class has a common
415 <filename>setUp</filename> function which is shared by all the tests in the
416 class. A simple test is then added to test that when a variable is expanded, the
417 correct value is found.</para>
418 <para>Bitbake selftests are straightforward python unittest. Refer to the Python
419 unittest documentation for additional information on writing these tests at: <link
420 linkend="">https://docs.python.org/3/library/unittest.html</link>.</para>
421 </section>
422
423 <section id='oe-selftest-example'>
424 <title><filename>oe-selftest</filename></title>
425
426 <para>These tests are more complex due to the setup required behind the scenes for full
427 builds. Rather than directly using Python's unittest, the code wraps most of the
428 standard objects. The tests can be simple, such as testing a command from within the
429 OE build environment using the following
430 example:<literallayout class="monospaced">
431 class BitbakeLayers(OESelftestTestCase):
432 def test_bitbakelayers_showcrossdepends(self):
433 result = runCmd('bitbake-layers show-cross-depends')
434 self.assertTrue('aspell' in result.output, msg = "No dependencies
435 were shown. bitbake-layers show-cross-depends output:
436 %s"% result.output)
437 </literallayout></para>
438 <para>This example, taken from
439 <filename>meta/lib/oeqa/selftest/cases/bblayers.py</filename>, creates a
440 testcase from the <ulink url=""><filename>OESelftestTestCase</filename></ulink>
441 class, derived from <filename>unittest.TestCase</filename>, which runs the
442 <filename>bitbake-layers</filename> command and checks the output to ensure it
443 contains something we know should be here.</para>
444 <para>The <filename>oeqa.utils.commands</filename> module contains Helpers which can
445 assist with common tasks, including:<itemizedlist>
446 <listitem>
447 <para><emphasis>Obtaining the value of a bitbake variable:</emphasis> Use
448 <filename>oeqa.utils.commands.get_bb_var()</filename> or use
449 <filename>oeqa.utils.commands.get_bb_vars()</filename> for more than
450 one variable</para>
451 </listitem>
452 <listitem>
453 <para><emphasis>Running a bitbake invocation for a build:</emphasis> Use
454 <filename>oeqa.utils.commands.bitbake()</filename></para>
455 </listitem>
456 <listitem>
457 <para><emphasis>Running a command:</emphasis> Use
458 <filename>oeqa.utils.commandsrunCmd()</filename></para>
459 </listitem>
460 </itemizedlist></para>
461 <para>There is also a <filename>oeqa.utils.commands.runqemu()</filename> function for
462 launching the <filename>runqemu</filename> command for testing things within a
463 running, virtualized image.</para>
464 <para>You can run these tests in parallel. Parallelism works per test class, so tests
465 within a given test class should always run in the same build, while tests in
466 different classes or modules may be split into different builds. There is no data
467 store available for these tests since the tests launch the
468 <filename>bitbake</filename> command and exist outside of its context. As a
469 result, common bitbake library functions (bb.*) are also unavailable.</para>
470 </section>
471
472 <section id='testimage-example'>
473 <title><filename>testimage</filename></title>
474
475 <para>These tests are run once an image is up and running, either on target hardware or
476 under QEMU. As a result, they are assumed to be running in a target image
477 environment, as opposed to a host build environment. A simple example from
478 <filename>meta/lib/oeqa/runtime/cases/python.py</filename> contains the
479 following:<literallayout class="monospaced">
480 class PythonTest(OERuntimeTestCase):
481 @OETestDepends(['ssh.SSHTest.test_ssh'])
482 @OEHasPackage(['python3-core'])
483 def test_python3(self):
484 cmd = "python3 -c \"import codecs; print(codecs.encode('Uryyb,
485 jbeyq', 'rot13'))\""
486 status, output = self.target.run(cmd)
487 msg = 'Exit status was not 0. Output: %s' % output
488 self.assertEqual(status, 0, msg=msg)
489 </literallayout></para>
490 <para>In this example, the <ulink url=""><filename>OERuntimeTestCase</filename></ulink>
491 class wraps <filename>unittest.TestCase</filename>. Within the test,
492 <filename>self.target</filename> represents the target system, where commands
493 can be run on it using the <filename>run()</filename> method. </para>
494 <para>To ensure certain test or package dependencies are met, you can use the
495 <filename>OETestDepends</filename> and <filename>OEHasPackage</filename>
496 decorators. For example, the test in this example would only make sense if
497 python3-core is installed in the image.</para>
498 </section>
499
500 <section id='testsdk_ext-example'>
501 <title><filename>testsdk_ext</filename></title>
502
503 <para>These tests are run against built extensible SDKs (eSDKs). The tests can assume
504 that the eSDK environment has already been setup. An example from
505 <filename>meta/lib/oeqa/sdk/cases/devtool.py</filename> contains the
506 following:<literallayout class="monospaced">
507 class DevtoolTest(OESDKExtTestCase):
508 @classmethod
509 def setUpClass(cls):
510 myapp_src = os.path.join(cls.tc.esdk_files_dir, "myapp")
511 cls.myapp_dst = os.path.join(cls.tc.sdk_dir, "myapp")
512 shutil.copytree(myapp_src, cls.myapp_dst)
513 subprocess.check_output(['git', 'init', '.'], cwd=cls.myapp_dst)
514 subprocess.check_output(['git', 'add', '.'], cwd=cls.myapp_dst)
515 subprocess.check_output(['git', 'commit', '-m', "'test commit'"], cwd=cls.myapp_dst)
516
517 @classmethod
518 def tearDownClass(cls):
519 shutil.rmtree(cls.myapp_dst)
520 def _test_devtool_build(self, directory):
521 self._run('devtool add myapp %s' % directory)
522 try:
523 self._run('devtool build myapp')
524 finally:
525 self._run('devtool reset myapp')
526 def test_devtool_build_make(self):
527 self._test_devtool_build(self.myapp_dst)
528 </literallayout>In
529 this example, the <filename>devtool</filename> command is tested to see whether a
530 sample application can be built with the <filename>devtool build</filename> command
531 within the eSDK.</para>
532 </section>
533
534 <section id='testsdk-example'>
535 <title><filename>testsdk</filename></title>
536
537 <para>These tests are run against built SDKs. The tests can assume that an SDK has
538 already been extracted and its environment file has been sourced. A simple example
539 from <filename>meta/lib/oeqa/sdk/cases/python2.py</filename> contains the
540 following:<literallayout class="monospaced">
541 class Python3Test(OESDKTestCase):
542 def setUp(self):
543 if not (self.tc.hasHostPackage("nativesdk-python3-core") or
544 self.tc.hasHostPackage("python3-core-native")):
545 raise unittest.SkipTest("No python3 package in the SDK")
546
547 def test_python3(self):
548 cmd = "python3 -c \"import codecs; print(codecs.encode('Uryyb, jbeyq', 'rot13'))\""
549 output = self._run(cmd)
550 self.assertEqual(output, "Hello, world\n")
551 </literallayout>In
552 this example, if nativesdk-python3-core has been installed into the SDK, the code
553 runs the python3 interpreter with a basic command to check it is working correctly.
554 The test would only run if python3 is installed in the SDK.</para>
555 </section>
556
557 <section id='oe-build-perf-test-example'>
558 <title><filename>oe-build-perf-test</filename></title>
559
560 <para>The performance tests usually measure how long operations take and the resource
561 utilisation as that happens. An example from
562 <filename>meta/lib/oeqa/buildperf/test_basic.py</filename> contains the
563 following:<literallayout class="monospaced">
564 class Test3(BuildPerfTestCase):
565
566 def test3(self):
567 """Bitbake parsing (bitbake -p)"""
568 # Drop all caches and parse
569 self.rm_cache()
570 oe.path.remove(os.path.join(self.bb_vars['TMPDIR'], 'cache'), True)
571 self.measure_cmd_resources(['bitbake', '-p'], 'parse_1',
572 'bitbake -p (no caches)')
573 # Drop tmp/cache
574 oe.path.remove(os.path.join(self.bb_vars['TMPDIR'], 'cache'), True)
575 self.measure_cmd_resources(['bitbake', '-p'], 'parse_2',
576 'bitbake -p (no tmp/cache)')
577 # Parse with fully cached data
578 self.measure_cmd_resources(['bitbake', '-p'], 'parse_3',
579 'bitbake -p (cached)')
580 </literallayout>This
581 example shows how three specific parsing timings are measured, with and without
582 various caches, to show how BitBake's parsing performance trends over time.</para>
583 </section>
584 </section>
585 <section id='test-writing-considerations'>
586 <title>Considerations When Writing Tests</title>
587 <para>When writing good tests, there are several things to keep in mind. Since things
588 running on the Autobuilder are accessed concurrently by multiple workers, consider the
589 following:</para>
590 <formalpara>
591 <title>Running "cleanall" is not permitted</title>
592 <para>This can delete files from DL_DIR which would potentially break other builds
593 running in parallel. If this is required, DL_DIR must be set to an isolated
594 directory.</para>
595 </formalpara>
596 <formalpara>
597 <title>Running "cleansstate" is not permitted</title>
598 <para>This can delete files from SSTATE_DIR which would potentially break other builds
599 running in parallel. If this is required, SSTATE_DIR must be set to an isolated
600 directory. Alternatively, you can use the "-f" option with the
601 <filename>bitbake</filename> command to "taint" tasks by changing the sstate
602 checksums to ensure sstate cache items will not be reused.</para>
603 </formalpara>
604 <formalpara>
605 <title>Tests should not change the metadata</title>
606 <para>This is particularly true for oe-selftests since these can run in parallel and
607 changing metadata leads to changing checksums, which confuses BitBake while running
608 in parallel. If this is necessary, copy layers to a temporary location and modify
609 them. Some tests need to change metadata, such as the devtool tests. To prevent the
610 metadate from changes, set up temporary copies of that data first.</para>
611 </formalpara>
612 </section>
613
614
615
616
617
618
619
620
621</chapter>
622<!--
623vim: expandtab tw=80 ts=4
624-->
diff --git a/documentation/test-manual/test-manual-style.css b/documentation/test-manual/test-manual-style.css
deleted file mode 100644
index 10ee4c79cf..0000000000
--- a/documentation/test-manual/test-manual-style.css
+++ /dev/null
@@ -1,991 +0,0 @@
1/*
2 Generic XHTML / DocBook XHTML CSS Stylesheet.
3
4 SPDX-License-Identifier: CC-BY-2.0-UK
5
6 Browser wrangling and typographic design by
7 Oyvind Kolas / pippin@gimp.org
8
9 Customised for Poky by
10 Matthew Allum / mallum@o-hand.com
11
12 Thanks to:
13 Liam R. E. Quin
14 William Skaggs
15 Jakub Steiner
16
17 Structure
18 ---------
19
20 The stylesheet is divided into the following sections:
21
22 Positioning
23 Margins, paddings, width, font-size, clearing.
24 Decorations
25 Borders, style
26 Colors
27 Colors
28 Graphics
29 Graphical backgrounds
30 Nasty IE tweaks
31 Workarounds needed to make it work in internet explorer,
32 currently makes the stylesheet non validating, but up until
33 this point it is validating.
34 Mozilla extensions
35 Transparency for footer
36 Rounded corners on boxes
37
38*/
39
40
41 /*************** /
42 / Positioning /
43/ ***************/
44
45body {
46 font-family: Verdana, Sans, sans-serif;
47
48 min-width: 640px;
49 width: 80%;
50 margin: 0em auto;
51 padding: 2em 5em 5em 5em;
52 color: #333;
53}
54
55h1,h2,h3,h4,h5,h6,h7 {
56 font-family: Arial, Sans;
57 color: #00557D;
58 clear: both;
59}
60
61h1 {
62 font-size: 2em;
63 text-align: left;
64 padding: 0em 0em 0em 0em;
65 margin: 2em 0em 0em 0em;
66}
67
68h2.subtitle {
69 margin: 0.10em 0em 3.0em 0em;
70 padding: 0em 0em 0em 0em;
71 font-size: 1.8em;
72 padding-left: 20%;
73 font-weight: normal;
74 font-style: italic;
75}
76
77h2 {
78 margin: 2em 0em 0.66em 0em;
79 padding: 0.5em 0em 0em 0em;
80 font-size: 1.5em;
81 font-weight: bold;
82}
83
84h3.subtitle {
85 margin: 0em 0em 1em 0em;
86 padding: 0em 0em 0em 0em;
87 font-size: 142.14%;
88 text-align: right;
89}
90
91h3 {
92 margin: 1em 0em 0.5em 0em;
93 padding: 1em 0em 0em 0em;
94 font-size: 140%;
95 font-weight: bold;
96}
97
98h4 {
99 margin: 1em 0em 0.5em 0em;
100 padding: 1em 0em 0em 0em;
101 font-size: 120%;
102 font-weight: bold;
103}
104
105h5 {
106 margin: 1em 0em 0.5em 0em;
107 padding: 1em 0em 0em 0em;
108 font-size: 110%;
109 font-weight: bold;
110}
111
112h6 {
113 margin: 1em 0em 0em 0em;
114 padding: 1em 0em 0em 0em;
115 font-size: 110%;
116 font-weight: bold;
117}
118
119.authorgroup {
120 background-color: transparent;
121 background-repeat: no-repeat;
122 padding-top: 256px;
123 background-image: url("figures/test-manual-title.png");
124 background-position: left top;
125 margin-top: -256px;
126 padding-right: 50px;
127 margin-left: 0px;
128 text-align: right;
129 width: 740px;
130}
131
132h3.author {
133 margin: 0em 0me 0em 0em;
134 padding: 0em 0em 0em 0em;
135 font-weight: normal;
136 font-size: 100%;
137 color: #333;
138 clear: both;
139}
140
141.author tt.email {
142 font-size: 66%;
143}
144
145.titlepage hr {
146 width: 0em;
147 clear: both;
148}
149
150.revhistory {
151 padding-top: 2em;
152 clear: both;
153}
154
155.toc,
156.list-of-tables,
157.list-of-examples,
158.list-of-figures {
159 padding: 1.33em 0em 2.5em 0em;
160 color: #00557D;
161}
162
163.toc p,
164.list-of-tables p,
165.list-of-figures p,
166.list-of-examples p {
167 padding: 0em 0em 0em 0em;
168 padding: 0em 0em 0.3em;
169 margin: 1.5em 0em 0em 0em;
170}
171
172.toc p b,
173.list-of-tables p b,
174.list-of-figures p b,
175.list-of-examples p b{
176 font-size: 100.0%;
177 font-weight: bold;
178}
179
180.toc dl,
181.list-of-tables dl,
182.list-of-figures dl,
183.list-of-examples dl {
184 margin: 0em 0em 0.5em 0em;
185 padding: 0em 0em 0em 0em;
186}
187
188.toc dt {
189 margin: 0em 0em 0em 0em;
190 padding: 0em 0em 0em 0em;
191}
192
193.toc dd {
194 margin: 0em 0em 0em 2.6em;
195 padding: 0em 0em 0em 0em;
196}
197
198div.glossary dl,
199div.variablelist dl {
200}
201
202.glossary dl dt,
203.variablelist dl dt,
204.variablelist dl dt span.term {
205 font-weight: normal;
206 width: 20em;
207 text-align: right;
208}
209
210.variablelist dl dt {
211 margin-top: 0.5em;
212}
213
214.glossary dl dd,
215.variablelist dl dd {
216 margin-top: 0em;
217 margin-left: 25.5em;
218}
219
220.glossary dd p,
221.variablelist dd p {
222 margin-top: 0em;
223 margin-bottom: 1em;
224}
225
226
227div.calloutlist table td {
228 padding: 0em 0em 0em 0em;
229 margin: 0em 0em 0em 0em;
230}
231
232div.calloutlist table td p {
233 margin-top: 0em;
234 margin-bottom: 1em;
235}
236
237div p.copyright {
238 text-align: left;
239}
240
241div.legalnotice p.legalnotice-title {
242 margin-bottom: 0em;
243}
244
245p {
246 line-height: 1.5em;
247 margin-top: 0em;
248
249}
250
251dl {
252 padding-top: 0em;
253}
254
255hr {
256 border: solid 1px;
257}
258
259
260.mediaobject,
261.mediaobjectco {
262 text-align: center;
263}
264
265img {
266 border: none;
267}
268
269ul {
270 padding: 0em 0em 0em 1.5em;
271}
272
273ul li {
274 padding: 0em 0em 0em 0em;
275}
276
277ul li p {
278 text-align: left;
279}
280
281table {
282 width :100%;
283}
284
285th {
286 padding: 0.25em;
287 text-align: left;
288 font-weight: normal;
289 vertical-align: top;
290}
291
292td {
293 padding: 0.25em;
294 vertical-align: top;
295}
296
297p a[id] {
298 margin: 0px;
299 padding: 0px;
300 display: inline;
301 background-image: none;
302}
303
304a {
305 text-decoration: underline;
306 color: #444;
307}
308
309pre {
310 overflow: auto;
311}
312
313a:hover {
314 text-decoration: underline;
315 /*font-weight: bold;*/
316}
317
318/* This style defines how the permalink character
319 appears by itself and when hovered over with
320 the mouse. */
321
322[alt='Permalink'] { color: #eee; }
323[alt='Permalink']:hover { color: black; }
324
325
326div.informalfigure,
327div.informalexample,
328div.informaltable,
329div.figure,
330div.table,
331div.example {
332 margin: 1em 0em;
333 padding: 1em;
334 page-break-inside: avoid;
335}
336
337
338div.informalfigure p.title b,
339div.informalexample p.title b,
340div.informaltable p.title b,
341div.figure p.title b,
342div.example p.title b,
343div.table p.title b{
344 padding-top: 0em;
345 margin-top: 0em;
346 font-size: 100%;
347 font-weight: normal;
348}
349
350.mediaobject .caption,
351.mediaobject .caption p {
352 text-align: center;
353 font-size: 80%;
354 padding-top: 0.5em;
355 padding-bottom: 0.5em;
356}
357
358.epigraph {
359 padding-left: 55%;
360 margin-bottom: 1em;
361}
362
363.epigraph p {
364 text-align: left;
365}
366
367.epigraph .quote {
368 font-style: italic;
369}
370.epigraph .attribution {
371 font-style: normal;
372 text-align: right;
373}
374
375span.application {
376 font-style: italic;
377}
378
379.programlisting {
380 font-family: monospace;
381 font-size: 80%;
382 white-space: pre;
383 margin: 1.33em 0em;
384 padding: 1.33em;
385}
386
387.tip,
388.warning,
389.caution,
390.note {
391 margin-top: 1em;
392 margin-bottom: 1em;
393
394}
395
396/* force full width of table within div */
397.tip table,
398.warning table,
399.caution table,
400.note table {
401 border: none;
402 width: 100%;
403}
404
405
406.tip table th,
407.warning table th,
408.caution table th,
409.note table th {
410 padding: 0.8em 0.0em 0.0em 0.0em;
411 margin : 0em 0em 0em 0em;
412}
413
414.tip p,
415.warning p,
416.caution p,
417.note p {
418 margin-top: 0.5em;
419 margin-bottom: 0.5em;
420 padding-right: 1em;
421 text-align: left;
422}
423
424.acronym {
425 text-transform: uppercase;
426}
427
428b.keycap,
429.keycap {
430 padding: 0.09em 0.3em;
431 margin: 0em;
432}
433
434.itemizedlist li {
435 clear: none;
436}
437
438.filename {
439 font-size: medium;
440 font-family: Courier, monospace;
441}
442
443
444div.navheader, div.heading{
445 position: absolute;
446 left: 0em;
447 top: 0em;
448 width: 100%;
449 background-color: #cdf;
450 width: 100%;
451}
452
453div.navfooter, div.footing{
454 position: fixed;
455 left: 0em;
456 bottom: 0em;
457 background-color: #eee;
458 width: 100%;
459}
460
461
462div.navheader td,
463div.navfooter td {
464 font-size: 66%;
465}
466
467div.navheader table th {
468 /*font-family: Georgia, Times, serif;*/
469 /*font-size: x-large;*/
470 font-size: 80%;
471}
472
473div.navheader table {
474 border-left: 0em;
475 border-right: 0em;
476 border-top: 0em;
477 width: 100%;
478}
479
480div.navfooter table {
481 border-left: 0em;
482 border-right: 0em;
483 border-bottom: 0em;
484 width: 100%;
485}
486
487div.navheader table td a,
488div.navfooter table td a {
489 color: #777;
490 text-decoration: none;
491}
492
493/* normal text in the footer */
494div.navfooter table td {
495 color: black;
496}
497
498div.navheader table td a:visited,
499div.navfooter table td a:visited {
500 color: #444;
501}
502
503
504/* links in header and footer */
505div.navheader table td a:hover,
506div.navfooter table td a:hover {
507 text-decoration: underline;
508 background-color: transparent;
509 color: #33a;
510}
511
512div.navheader hr,
513div.navfooter hr {
514 display: none;
515}
516
517
518.qandaset tr.question td p {
519 margin: 0em 0em 1em 0em;
520 padding: 0em 0em 0em 0em;
521}
522
523.qandaset tr.answer td p {
524 margin: 0em 0em 1em 0em;
525 padding: 0em 0em 0em 0em;
526}
527.answer td {
528 padding-bottom: 1.5em;
529}
530
531.emphasis {
532 font-weight: bold;
533}
534
535
536 /************* /
537 / decorations /
538/ *************/
539
540.titlepage {
541}
542
543.part .title {
544}
545
546.subtitle {
547 border: none;
548}
549
550/*
551h1 {
552 border: none;
553}
554
555h2 {
556 border-top: solid 0.2em;
557 border-bottom: solid 0.06em;
558}
559
560h3 {
561 border-top: 0em;
562 border-bottom: solid 0.06em;
563}
564
565h4 {
566 border: 0em;
567 border-bottom: solid 0.06em;
568}
569
570h5 {
571 border: 0em;
572}
573*/
574
575.programlisting {
576 border: solid 1px;
577}
578
579div.figure,
580div.table,
581div.informalfigure,
582div.informaltable,
583div.informalexample,
584div.example {
585 border: 1px solid;
586}
587
588
589
590.tip,
591.warning,
592.caution,
593.note {
594 border: 1px solid;
595}
596
597.tip table th,
598.warning table th,
599.caution table th,
600.note table th {
601 border-bottom: 1px solid;
602}
603
604.question td {
605 border-top: 1px solid black;
606}
607
608.answer {
609}
610
611
612b.keycap,
613.keycap {
614 border: 1px solid;
615}
616
617
618div.navheader, div.heading{
619 border-bottom: 1px solid;
620}
621
622
623div.navfooter, div.footing{
624 border-top: 1px solid;
625}
626
627 /********* /
628 / colors /
629/ *********/
630
631body {
632 color: #333;
633 background: white;
634}
635
636a {
637 background: transparent;
638}
639
640a:hover {
641 background-color: #dedede;
642}
643
644
645h1,
646h2,
647h3,
648h4,
649h5,
650h6,
651h7,
652h8 {
653 background-color: transparent;
654}
655
656hr {
657 border-color: #aaa;
658}
659
660
661.tip, .warning, .caution, .note {
662 border-color: #fff;
663}
664
665
666.tip table th,
667.warning table th,
668.caution table th,
669.note table th {
670 border-bottom-color: #fff;
671}
672
673
674.warning {
675 background-color: #f0f0f2;
676}
677
678.caution {
679 background-color: #f0f0f2;
680}
681
682.tip {
683 background-color: #f0f0f2;
684}
685
686.note {
687 background-color: #f0f0f2;
688}
689
690.glossary dl dt,
691.variablelist dl dt,
692.variablelist dl dt span.term {
693 color: #044;
694}
695
696div.figure,
697div.table,
698div.example,
699div.informalfigure,
700div.informaltable,
701div.informalexample {
702 border-color: #aaa;
703}
704
705pre.programlisting {
706 color: black;
707 background-color: #fff;
708 border-color: #aaa;
709 border-width: 2px;
710}
711
712.guimenu,
713.guilabel,
714.guimenuitem {
715 background-color: #eee;
716}
717
718
719b.keycap,
720.keycap {
721 background-color: #eee;
722 border-color: #999;
723}
724
725
726div.navheader {
727 border-color: black;
728}
729
730
731div.navfooter {
732 border-color: black;
733}
734
735.writernotes {
736 color: red;
737}
738
739
740 /*********** /
741 / graphics /
742/ ***********/
743
744/*
745body {
746 background-image: url("images/body_bg.jpg");
747 background-attachment: fixed;
748}
749
750.navheader,
751.note,
752.tip {
753 background-image: url("images/note_bg.jpg");
754 background-attachment: fixed;
755}
756
757.warning,
758.caution {
759 background-image: url("images/warning_bg.jpg");
760 background-attachment: fixed;
761}
762
763.figure,
764.informalfigure,
765.example,
766.informalexample,
767.table,
768.informaltable {
769 background-image: url("images/figure_bg.jpg");
770 background-attachment: fixed;
771}
772
773*/
774h1,
775h2,
776h3,
777h4,
778h5,
779h6,
780h7{
781}
782
783/*
784Example of how to stick an image as part of the title.
785
786div.article .titlepage .title
787{
788 background-image: url("figures/white-on-black.png");
789 background-position: center;
790 background-repeat: repeat-x;
791}
792*/
793
794div.preface .titlepage .title,
795div.colophon .title,
796div.chapter .titlepage .title,
797div.article .titlepage .title
798{
799}
800
801div.section div.section .titlepage .title,
802div.sect2 .titlepage .title {
803 background: none;
804}
805
806
807h1.title {
808 background-color: transparent;
809 background-image: url("figures/test-title.png");
810 background-repeat: no-repeat;
811 height: 256px;
812 text-indent: -9000px;
813 overflow:hidden;
814}
815
816h2.subtitle {
817 background-color: transparent;
818 text-indent: -9000px;
819 overflow:hidden;
820 width: 0px;
821 display: none;
822}
823
824 /*************************************** /
825 / pippin.gimp.org specific alterations /
826/ ***************************************/
827
828/*
829div.heading, div.navheader {
830 color: #777;
831 font-size: 80%;
832 padding: 0;
833 margin: 0;
834 text-align: left;
835 position: absolute;
836 top: 0px;
837 left: 0px;
838 width: 100%;
839 height: 50px;
840 background: url('/gfx/heading_bg.png') transparent;
841 background-repeat: repeat-x;
842 background-attachment: fixed;
843 border: none;
844}
845
846div.heading a {
847 color: #444;
848}
849
850div.footing, div.navfooter {
851 border: none;
852 color: #ddd;
853 font-size: 80%;
854 text-align:right;
855
856 width: 100%;
857 padding-top: 10px;
858 position: absolute;
859 bottom: 0px;
860 left: 0px;
861
862 background: url('/gfx/footing_bg.png') transparent;
863}
864*/
865
866
867
868 /****************** /
869 / nasty ie tweaks /
870/ ******************/
871
872/*
873div.heading, div.navheader {
874 width:expression(document.body.clientWidth + "px");
875}
876
877div.footing, div.navfooter {
878 width:expression(document.body.clientWidth + "px");
879 margin-left:expression("-5em");
880}
881body {
882 padding:expression("4em 5em 0em 5em");
883}
884*/
885
886 /**************************************** /
887 / mozilla vendor specific css extensions /
888/ ****************************************/
889/*
890div.navfooter, div.footing{
891 -moz-opacity: 0.8em;
892}
893
894div.figure,
895div.table,
896div.informalfigure,
897div.informaltable,
898div.informalexample,
899div.example,
900.tip,
901.warning,
902.caution,
903.note {
904 -moz-border-radius: 0.5em;
905}
906
907b.keycap,
908.keycap {
909 -moz-border-radius: 0.3em;
910}
911*/
912
913table tr td table tr td {
914 display: none;
915}
916
917
918hr {
919 display: none;
920}
921
922table {
923 border: 0em;
924}
925
926 .photo {
927 float: right;
928 margin-left: 1.5em;
929 margin-bottom: 1.5em;
930 margin-top: 0em;
931 max-width: 17em;
932 border: 1px solid gray;
933 padding: 3px;
934 background: white;
935}
936 .seperator {
937 padding-top: 2em;
938 clear: both;
939 }
940
941 #validators {
942 margin-top: 5em;
943 text-align: right;
944 color: #777;
945 }
946 @media print {
947 body {
948 font-size: 8pt;
949 }
950 .noprint {
951 display: none;
952 }
953 }
954
955
956.tip,
957.note {
958 background: #f0f0f2;
959 color: #333;
960 padding: 20px;
961 margin: 20px;
962}
963
964.tip h3,
965.note h3 {
966 padding: 0em;
967 margin: 0em;
968 font-size: 2em;
969 font-weight: bold;
970 color: #333;
971}
972
973.tip a,
974.note a {
975 color: #333;
976 text-decoration: underline;
977}
978
979.footnote {
980 font-size: small;
981 color: #333;
982}
983
984/* Changes the announcement text */
985.tip h3,
986.warning h3,
987.caution h3,
988.note h3 {
989 font-size:large;
990 color: #00557D;
991}
diff --git a/documentation/test-manual/test-manual-test-process.xml b/documentation/test-manual/test-manual-test-process.xml
deleted file mode 100644
index 6e2157c621..0000000000
--- a/documentation/test-manual/test-manual-test-process.xml
+++ /dev/null
@@ -1,110 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='test-manual-test-process'>
7
8<title>Project Testing and Release Process</title>
9 <section id='test-daily-devel'>
10 <title>Day to Day Development</title>
11
12 <para>This section details how the project tests changes, through automation on the
13 Autobuilder or with the assistance of QA teams, through to making releases.</para>
14
15 <para>The project aims to test changes against our test matrix before those changes are
16 merged into the master branch. As such, changes are queued up in batches either in the
17 <filename>master-next</filename> branch in the main trees, or in user trees such as
18 <filename>ross/mut</filename> in <filename>poky-contrib</filename> (Ross Burton
19 helps review and test patches and this is his testing tree).</para>
20 <para>We have two broad categories of test builds, including "full" and "quick". On the
21 Autobuilder, these can be seen as "a-quick" and "a-full", simply for ease of sorting in
22 the UI. Use our Autobuilder console view to see where me manage most test-related items,
23 available at: <link linkend=""
24 >https://autobuilder.yoctoproject.org/typhoon/#/console</link>.</para>
25 <para>Builds are triggered manually when the test branches are ready. The builds are
26 monitored by the SWAT team. For additional information, see <link linkend=""
27 >https://wiki.yoctoproject.org/wiki/Yocto_Build_Failure_Swat_Team</link>. If
28 successful, the changes would usually be merged to the <filename>master</filename>
29 branch. If not successful, someone would respond to the changes on the mailing list
30 explaining that there was a failure in testing. The choice of quick or full would depend
31 on the type of changes and the speed with which the result was required.</para>
32 <para>The Autobuilder does build the <filename>master</filename> branch once daily for
33 several reasons, in particular, to ensure the current <filename>master</filename> branch
34 does build, but also to keep <filename>yocto-testresults</filename> (<link linkend=""
35 >http://git.yoctoproject.org/cgit.cgi/yocto-testresults/</link>), buildhistory
36 (<link linkend="">http://git.yoctoproject.org/cgit.cgi/poky-buildhistory/</link>),
37 and our sstate up to date. On the weekend, there is a master-next build instead to
38 ensure the test results are updated for the less frequently run targets.</para>
39 <para>Performance builds (buildperf-* targets in the console) are triggered separately every
40 six hours and automatically push their results to the buildstats repository at: <link
41 linkend="">http://git.yoctoproject.org/cgit.cgi/yocto-buildstats/</link>. </para>
42 <para>The 'quick' targets have been selected to be the ones which catch the most failures or
43 give the most valuable data. We run 'fast' ptests in this case for example but not the
44 ones which take a long time. The quick target doesn't include *-lsb builds for all
45 architectures, some world builds and doesn't trigger performance tests or ltp testing.
46 The full build includes all these things and is slower but more comprehensive.</para>
47 </section>
48
49 <section id='test-yocto-project-autobuilder-overview'>
50 <title>Release Builds</title>
51
52 <para>The project typically has two major releases a year with a six month cadence in April
53 and October. Between these there would be a number of milestone releases (usually four)
54 with the final one being stablization only along with point releases of our stable
55 branches.</para>
56 <para>The build and release process for these project releases is similar to that in <link
57 linkend="test-daily-devel">Day to Day Development</link>, in that the a-full target
58 of the Autobuilder is used but in addition the form is configured to generate and
59 publish artefacts and the milestone number, version, release candidate number and other
60 information is entered. The box to "generate an email to QA"is also checked.</para>
61 <para>When the build completes, an email is sent out using the send-qa-email script in the
62 <filename>yocto-autobuilder-helper</filename> repository to the list of people
63 configured for that release. Release builds are placed into a directory in <link
64 linkend="">https://autobuilder.yocto.io/pub/releases</link> on the Autobuilder which
65 is included in the email. The process from here is more manual and control is
66 effectively passed to release engineering. The next steps include:<itemizedlist>
67 <listitem>
68 <para>QA teams respond to the email saying which tests they plan to run and when
69 the results will be available.</para>
70 </listitem>
71 <listitem>
72 <para>QA teams run their tests and share their results in the yocto-
73 testresults-contrib repository, along with a summary of their findings.
74 </para>
75 </listitem>
76 <listitem>
77 <para>Release engineering prepare the release as per their process. </para>
78 </listitem>
79 <listitem>
80 <para>Test results from the QA teams are included into the release in separate
81 directories and also uploaded to the yocto-testresults repository alongside
82 the other test results for the given revision.</para>
83 </listitem>
84 <listitem>
85 <para>The QA report in the final release is regenerated using resulttool to
86 include the new test results and the test summaries from the teams (as
87 headers to the generated report).</para>
88 </listitem>
89 <listitem>
90 <para>The release is checked against the release checklist and release readiness
91 criteria.</para>
92 </listitem>
93 <listitem>
94 <para>A final decision on whether to release is made by the YP TSC who have
95 final oversight on release readiness.</para>
96 </listitem>
97 </itemizedlist></para>
98 </section>
99
100
101
102
103
104
105
106
107</chapter>
108<!--
109vim: expandtab tw=80 ts=4
110-->
diff --git a/documentation/test-manual/test-manual-understand-autobuilder.xml b/documentation/test-manual/test-manual-understand-autobuilder.xml
deleted file mode 100644
index 8600367be7..0000000000
--- a/documentation/test-manual/test-manual-understand-autobuilder.xml
+++ /dev/null
@@ -1,314 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='test-manual-understand-autobuilder'>
7
8<title>Understanding the Yocto Project Autobuilder</title>
9 <section>
10 <title>Execution Flow within the Autobuilder</title>
11 <para>The "a-full" and "a-quick" targets are the usual entry points into the Autobuilder and
12 it makes sense to follow the process through the system starting there. This is best
13 visualised from the Autobuilder Console view (<link linkend=""
14 >https://autobuilder.yoctoproject.org/typhoon/#/console</link>). </para>
15 <para>Each item along the top of that view represents some "target build" and these targets
16 are all run in parallel. The 'full' build will trigger the majority of them, the "quick"
17 build will trigger some subset of them. The Autobuilder effectively runs whichever
18 configuration is defined for each of those targets on a seperate buildbot worker. To
19 understand the configuration, you need to look at the entry on
20 <filename>config.json</filename> file within the
21 <filename>yocto-autobuilder-helper</filename> repository. The targets are defined in
22 the ‘overrides' section, a quick example could be qemux86-64 which looks
23 like:<literallayout class="monospaced">
24 "qemux86-64" : {
25 "MACHINE" : "qemux86-64",
26 "TEMPLATE" : "arch-qemu",
27 "step1" : {
28 "extravars" : [
29 "IMAGE_FSTYPES_append = ' wic wic.bmap'"
30 ]
31 }
32 },
33 </literallayout>And
34 to expand that, you need the "arch-qemu" entry from the "templates" section, which looks
35 like:<literallayout class="monospaced">
36 "arch-qemu" : {
37 "BUILDINFO" : true,
38 "BUILDHISTORY" : true,
39 "step1" : {
40 "BBTARGETS" : "core-image-sato core-image-sato-dev core-image-sato-sdk core-image-minimal core-image-minimal-dev core-image-sato:do_populate_sdk",
41 "SANITYTARGETS" : "core-image-minimal:do_testimage core-image-sato:do_testimage core-image-sato-sdk:do_testimage core-image-sato:do_testsdk"
42 },
43 "step2" : {
44 "SDKMACHINE" : "x86_64",
45 "BBTARGETS" : "core-image-sato:do_populate_sdk core-image-minimal:do_populate_sdk_ext core-image-sato:do_populate_sdk_ext",
46 "SANITYTARGETS" : "core-image-sato:do_testsdk core-image-minimal:do_testsdkext core-image-sato:do_testsdkext"
47 },
48 "step3" : {
49 "BUILDHISTORY" : false,
50 "EXTRACMDS" : ["${SCRIPTSDIR}/checkvnc; DISPLAY=:1 oe-selftest ${HELPERSTMACHTARGS} -j 15"],
51 "ADDLAYER" : ["${BUILDDIR}/../meta-selftest"]
52 }
53 },
54 </literallayout>Combining
55 these two entries you can see that "qemux86-64" is a three step build where the
56 <filename>bitbake BBTARGETS</filename> would be run, then <filename>bitbake
57 SANITYTARGETS</filename> for each step; all for
58 <filename>MACHINE="qemx86-64"</filename> but with differing SDKMACHINE settings. In
59 step 1 an extra variable is added to the <filename>auto.conf</filename> file to enable
60 wic image generation.</para>
61 <para>While not every detail of this is covered here, you can see how the templating
62 mechanism allows quite complex configurations to be built up yet allows duplication and
63 repetition to be kept to a minimum.</para>
64 <para>The different build targets are designed to allow for parallelisation, so different
65 machines are usually built in parallel, operations using the same machine and metadata
66 are built sequentially, with the aim of trying to optimise build efficiency as much as
67 possible.</para>
68 <para>The <filename>config.json</filename> file is processed by the scripts in the Helper
69 repository in the <filename>scripts</filename> directory. The following section details
70 how this works.</para>
71 </section>
72
73 <section id='test-autobuilder-target-exec-overview'>
74 <title>Autobuilder Target Execution Overview</title>
75
76 <para>For each given target in a build, the Autobuilder executes several steps. These are
77 configured in <filename>yocto-autobuilder2/builders.py</filename> and roughly consist
78 of: <orderedlist>
79 <listitem id='test-list-tgt-exec-clobberdir'>
80 <para><emphasis>Run <filename>clobberdir</filename></emphasis></para>
81 <para>This cleans out any previous build. Old builds are left around to allow
82 easier debugging of failed builds. For additional information, see <link
83 linkend="test-clobberdir"><filename>clobberdir</filename></link>.</para>
84 </listitem>
85 <listitem>
86 <para><emphasis>Obtain yocto-autobuilder-helper</emphasis></para>
87 <para>This step clones the <filename>yocto-autobuilder-helper</filename> git
88 repository. This is necessary to prevent the requirement to maintain all the
89 release or project-specific code within Buildbot. The branch chosen matches
90 the release being built so we can support older releases and still make
91 changes in newer ones.</para>
92 </listitem>
93 <listitem>
94 <para><emphasis>Write layerinfo.json</emphasis></para>
95 <para>This transfers data in the Buildbot UI when the build was configured to
96 the Helper.</para>
97 </listitem>
98 <listitem>
99 <para><emphasis>Call scripts/shared-repo-unpack</emphasis></para>
100 <para>This is a call into the Helper scripts to set up a checkout of all the
101 pieces this build might need. It might clone the BitBake repository and the
102 OpenEmbedded-Core repository. It may clone the Poky repository, as well as
103 additional layers. It will use the data from the
104 <filename>layerinfo.json</filename> file to help understand the
105 configuration. It will also use a local cache of repositories to speed up
106 the clone checkouts. For additional information, see <link
107 linkend="test-autobuilder-clone-cache">Autobuilder Clone
108 Cache</link>.</para>
109 <para>This step has two possible modes of operation. If the build is part of a
110 parent build, its possible that all the repositories needed may already be
111 available, ready in a pre-prepared directory. An "a-quick" or "a-full" build
112 would prepare this before starting the other sub-target builds. This is done
113 for two reasons:<itemizedlist>
114 <listitem>
115 <para>the upstream may change during a build, for example, from a
116 forced push and this ensures we have matching content for the
117 whole build</para>
118 </listitem>
119 <listitem>
120 <para>if 15 Workers all tried to pull the same data from the same
121 repos, we can hit resource limits on upstream servers as they
122 can think they are under some kind of network attack</para>
123 </listitem>
124 </itemizedlist>This pre-prepared directory is shared among the Workers over
125 NFS. If the build is an individual build and there is no "shared" directory
126 available, it would clone from the cache and the upstreams as necessary.
127 This is considered the fallback mode.</para>
128 </listitem>
129 <listitem>
130 <para><emphasis>Call scripts/run-config</emphasis></para>
131 <para>This is another call into the Helper scripts where its expected that the
132 main functionality of this target will be executed.</para>
133 </listitem>
134 </orderedlist></para>
135 </section>
136 <section id='test-autobuilder-tech'>
137 <title>Autobuilder Technology</title>
138 <para>The Autobuilder has Yocto Project-specific functionality to allow builds to operate
139 with increased efficiency and speed.</para>
140 <section id='test-clobberdir'>
141 <title>clobberdir</title>
142 <para>When deleting files, the Autobuilder uses <filename>clobberdir</filename>, which
143 is a special script that moves files to a special location, rather than deleting
144 them. Files in this location are deleted by an <filename>rm</filename> command,
145 which is run under <filename>ionice -c 3</filename>. For example, the deletion only
146 happens when there is idle IO capacity on the Worker. The Autobuilder Worker Janitor
147 runs this deletion. See <link linkend="test-autobuilder-worker-janitor">Autobuilder
148 Worker Janitor</link>.</para>
149 </section>
150 <section id='test-autobuilder-clone-cache'>
151 <title>Autobuilder Clone Cache</title>
152 <para>Cloning repositories from scratch each time they are required was slow on the
153 Autobuilder. We therefore have a stash of commonly used repositories pre-cloned on
154 the Workers. Data is fetched from these during clones first, then "topped up" with
155 later revisions from any upstream when necesary. The cache is maintained by the
156 Autobuilder Worker Janitor. See <link linkend="test-autobuilder-worker-janitor"
157 >Autobuilder Worker Janitor</link>.</para>
158 </section>
159 <section id='test-autobuilder-worker-janitor'>
160 <title>Autobuilder Worker Janitor</title>
161 <para>This is a process running on each Worker that performs two basic operations,
162 including background file deletion at IO idle (see <link
163 linkend="test-list-tgt-exec-clobberdir">Target Execution: clobberdir</link>) and
164 maintainenance of a cache of cloned repositories to improve the speed the system can
165 checkout repositories.</para>
166 </section>
167 <section id='test-shared-dl-dir'>
168 <title>Shared DL_DIR</title>
169 <para>The Workers are all connected over NFS which allows DL_DIR to be shared between
170 them. This reduces network accesses from the system and allows the build to be sped
171 up. Usage of the directory within the build system is designed to be able to be
172 shared over NFS.</para>
173 </section>
174 <section id='test-shared-sstate-cache'>
175 <title>Shared SSTATE_DIR</title>
176 <para>The Workers are all connected over NFS which allows the
177 <filename>sstate</filename> directory to be shared between them. This means once
178 a Worker has built an artefact, all the others can benefit from it. Usage of the
179 directory within the directory is designed for sharing over NFS.</para>
180 </section>
181 <section id='test-resulttool'>
182 <title>Resulttool</title>
183 <para>All of the different tests run as part of the build generate output into
184 <filename>testresults.json</filename> files. This allows us to determine which
185 tests ran in a given build and their status. Additional information, such as failure
186 logs or the time taken to run the tests, may also be included.</para>
187 <para>Resulttool is part of OpenEmbedded-Core and is used to manipulate these json
188 results files. It has the ability to merge files together, display reports of the
189 test results and compare different result files.</para>
190 <para>For details, see <link linkend=""
191 >https://wiki.yoctoproject.org/wiki/Resulttool</link>.</para>
192 </section>
193 </section>
194 <section id='test-run-config-tgt-execution'>
195 <title>run-config Target Execution</title>
196 <para>The <filename>scripts/run-config</filename> execution is where most of the work within
197 the Autobuilder happens. It runs through a number of steps; the first are general setup
198 steps that are run once and include:<orderedlist>
199 <listitem>
200 <para>Set up any <filename>buildtools-tarball</filename> if configured.</para>
201 </listitem>
202 <listitem>
203 <para>Call "buildhistory-init" if buildhistory is configured.</para>
204 </listitem>
205 </orderedlist></para>
206 <para>For each step that is configured in <filename>config.json</filename>, it will perform
207 the following:</para>
208 <para>
209 <remark>## WRITER's question: What does "logging in as stepXa" and others refer to
210 below? ##</remark>
211 <orderedlist>
212 <listitem id="test-run-config-add-layers-step">
213 <para dir="ltr">Add any layers that are specified using the
214 <filename>bitbake-layers add-layer</filename> command (logging as
215 stepXa)</para>
216 </listitem>
217 <listitem>
218 <para dir="ltr">Call the <filename>scripts/setup-config</filename> script to
219 generate the necessary <filename>auto.conf</filename> configuration file for
220 the build</para>
221 </listitem>
222 <listitem>
223 <para dir="ltr">Run the <filename>bitbake BBTARGETS</filename> command (logging
224 as stepXb)</para>
225 </listitem>
226 <listitem>
227 <para dir="ltr">Run the <filename>bitbake SANITYTARGETS</filename> command
228 (logging as stepXc)</para>
229 </listitem>
230 <listitem>
231 <para dir="ltr">Run the <filename>EXTRACMDS</filename> command, which are run
232 within the BitBake build environment (logging as stepXd)</para>
233 </listitem>
234 <listitem>
235 <para dir="ltr">Run the <filename>EXTRAPLAINCMDS</filename> command(s), which
236 are run outside the BitBake build environment (logging as stepXd)</para>
237 </listitem>
238 <listitem>
239 <para dir="ltr">Remove any layers added in <link
240 linkend="test-run-config-add-layers-step">step 1</link> using the
241 <filename>bitbake-layers remove-layer</filename> command (logging as
242 stepXa)</para>
243 </listitem>
244 </orderedlist>
245 </para>
246 <para>Once the execution steps above complete, <filename>run-config</filename> executes a
247 set of post-build steps, including:<orderedlist>
248 <listitem>
249 <para dir="ltr">Call <filename>scripts/publish-artifacts</filename> to collect
250 any output which is to be saved from the build.</para>
251 </listitem>
252 <listitem>
253 <para dir="ltr">Call <filename>scripts/collect-results</filename> to collect any
254 test results to be saved from the build.</para>
255 </listitem>
256 <listitem>
257 <para dir="ltr">Call <filename>scripts/upload-error-reports</filename> to send
258 any error reports generated to the remote server.</para>
259 </listitem>
260 <listitem>
261 <para dir="ltr">Cleanup the build directory using <link
262 linkend="test-clobberdir"><filename>clobberdir</filename></link> if the
263 build was successful, else rename it to "build-renamed" for potential future
264 debugging.</para>
265 </listitem>
266 </orderedlist></para>
267 </section>
268 <section id='test-deploying-yp-autobuilder'>
269 <title>Deploying Yocto Autobuilder</title>
270 <para>The most up to date information about how to setup and deploy your own Autbuilder can
271 be found in README.md in the <filename>yocto-autobuilder2</filename> repository.</para>
272 <para>We hope that people can use the <filename>yocto-autobuilder2</filename> code directly
273 but it is inevitable that users will end up needing to heavily customise the
274 <filename>yocto-autobuilder-helper</filename> repository, particularly the
275 <filename>config.json</filename> file as they will want to define their own test
276 matrix.</para>
277 <para>The Autobuilder supports wo customization options: <itemizedlist>
278 <listitem>
279 <para>variable substitution</para>
280 </listitem>
281 <listitem>
282 <para>overlaying configuration files</para>
283 </listitem>
284 </itemizedlist>The standard <filename>config.json</filename> minimally attempts to allow
285 substitution of the paths. The Helper script repository includes a
286 <filename>local-example.json</filename> file to show how you could override these
287 from a separate configuration file. Pass the following into the environment of the
288 Autobuilder:<literallayout class="monospaced">
289 $ ABHELPER_JSON="config.json local-example.json"
290 </literallayout>As
291 another example, you could also pass the following into the
292 environment:<literallayout class="monospaced">
293 $ ABHELPER_JSON="config.json <replaceable>/some/location/</replaceable>local.json"
294 </literallayout>One
295 issue users often run into is validation of the <filename>config.json</filename> files.
296 A tip for minimizing issues from invalid json files is to use a Git
297 <filename>pre-commit-hook.sh</filename> script to verify the JSON file before
298 committing it. Create a symbolic link as
299 follows:<literallayout class="monospaced">
300 $ ln -s ../../scripts/pre-commit-hook.sh .git/hooks/pre-commit
301 </literallayout></para>
302 </section>
303
304
305
306
307
308
309
310
311</chapter>
312<!--
313vim: expandtab tw=80 ts=4
314-->
diff --git a/documentation/test-manual/test-manual.xml b/documentation/test-manual/test-manual.xml
deleted file mode 100755
index d454566c5f..0000000000
--- a/documentation/test-manual/test-manual.xml
+++ /dev/null
@@ -1,104 +0,0 @@
1<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<book id='test-manual' lang='en'
7 xmlns:xi="http://www.w3.org/2003/XInclude"
8 xmlns="http://docbook.org/ns/docbook"
9 >
10 <bookinfo>
11
12 <mediaobject>
13 <imageobject>
14 <imagedata fileref='figures/test-manual-title.png'
15 format='SVG'
16 align='left' scalefit='1' width='100%'/>
17 </imageobject>
18 </mediaobject>
19
20 <title>
21 Yocto Project Test Environment Manual
22 </title>
23
24 <authorgroup>
25 <author>
26 <affiliation>
27 <orgname>&ORGNAME;</orgname>
28 </affiliation>
29 <email>&ORGEMAIL;</email>
30 </author>
31 </authorgroup>
32
33 <revhistory>
34 <revision>
35 <revnumber>3.1.1</revnumber>
36 <date>TBD</date>
37 <revremark>DRAFT - Work-in-Progress - posted June 16, 2020</revremark>
38 </revision>
39 </revhistory>
40
41 <copyright>
42 <year>&COPYRIGHT_YEAR;</year>
43 <holder>Linux Foundation</holder>
44 </copyright>
45
46 <legalnotice>
47 <para>
48 Permission is granted to copy, distribute and/or modify this document under
49 the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-sa/2.0/uk/">
50 Creative Commons Attribution-Share Alike 2.0 UK: England &amp; Wales</ulink> as published by
51 Creative Commons.
52 </para>
53 <note><title>Manual Notes</title>
54 <itemizedlist>
55 <listitem><para>
56 This version of the
57 <emphasis>Yocto Project Test Environment Manual</emphasis>
58 is for the &YOCTO_DOC_VERSION; release of the
59 Yocto Project.
60 To be sure you have the latest version of the manual
61 for this release, go to the
62 <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>
63 and select the manual from that site.
64 Manuals from the site are more up-to-date than manuals
65 derived from the Yocto Project released TAR files.
66 </para></listitem>
67 <listitem><para>
68 If you located this manual through a web search, the
69 version of the manual might not be the one you want
70 (e.g. the search might have returned a manual much
71 older than the Yocto Project version with which you
72 are working).
73 You can see all Yocto Project major releases by
74 visiting the
75 <ulink url='&YOCTO_WIKI_URL;/wiki/Releases'>Releases</ulink>
76 page.
77 If you need a version of this manual for a different
78 Yocto Project release, visit the
79 <ulink url='&YOCTO_HOME_URL;/documentation'>Yocto Project documentation page</ulink>
80 and select the manual set by using the
81 "ACTIVE RELEASES DOCUMENTATION" or "DOCUMENTS ARCHIVE"
82 pull-down menus.
83 </para></listitem>
84 <listitem><para>
85 To report any inaccuracies or problems with this
86 manual, send an email to the Yocto Project
87 discussion group at
88 <filename>yocto@yoctoproject.com</filename> or log into
89 the freenode <filename>#yocto</filename> channel.
90 </para></listitem>
91 </itemizedlist>
92 </note>
93 </legalnotice>
94
95 </bookinfo>
96
97 <xi:include href="test-manual-intro.xml"/>
98 <xi:include href="test-manual-test-process.xml"/>
99 <xi:include href="test-manual-understand-autobuilder.xml"/>
100
101</book>
102<!--
103vim: expandtab tw=80 ts=4
104-->
diff --git a/documentation/toaster-manual/toaster-manual-customization.xsl b/documentation/toaster-manual/toaster-manual-customization.xsl
deleted file mode 100644
index 3a9b22eb8e..0000000000
--- a/documentation/toaster-manual/toaster-manual-customization.xsl
+++ /dev/null
@@ -1,30 +0,0 @@
1<?xml version='1.0'?>
2<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
3
4<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
5
6 <xsl:import href="http://downloads.yoctoproject.org/mirror/docbook-mirror/docbook-xsl-1.76.1/xhtml/docbook.xsl" />
7
8<!--
9
10 <xsl:import href="../template/1.76.1/docbook-xsl-1.76.1/xhtml/docbook.xsl" />
11
12 <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.76.1/xhtml/docbook.xsl" />
13
14-->
15
16 <xsl:include href="../template/permalinks.xsl"/>
17 <xsl:include href="../template/section.title.xsl"/>
18 <xsl:include href="../template/component.title.xsl"/>
19 <xsl:include href="../template/division.title.xsl"/>
20 <xsl:include href="../template/formal.object.heading.xsl"/>
21 <xsl:include href="../template/embedded_video.xsl"/>
22
23 <xsl:param name="html.stylesheet" select="'toaster-manual-style.css'" />
24 <xsl:param name="chapter.autolabel" select="1" />
25 <xsl:param name="appendix.autolabel" select="A" />
26 <xsl:param name="section.autolabel" select="1" />
27 <xsl:param name="section.label.includes.component.label" select="1" />
28 <xsl:param name="generate.id.attributes" select="1" />
29
30</xsl:stylesheet>
diff --git a/documentation/toaster-manual/toaster-manual-intro.xml b/documentation/toaster-manual/toaster-manual-intro.xml
deleted file mode 100644
index 6ee9ec720a..0000000000
--- a/documentation/toaster-manual/toaster-manual-intro.xml
+++ /dev/null
@@ -1,165 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='toaster-manual-intro'>
7<title>Introduction</title>
8
9 <para>
10 Toaster is a web interface to the Yocto Project's
11 <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink>.
12 The interface enables you to configure and run your builds.
13 Information about builds is collected and stored in a database.
14 You can use Toaster to configure and start builds on multiple
15 remote build servers.
16 </para>
17
18 <section id='intro-features'>
19 <title>Toaster Features</title>
20
21 <para>
22 Toaster allows you to configure and run builds, and it
23 provides extensive information about the build process.
24 <itemizedlist>
25 <listitem><para id='toaster-build-features'>
26 <emphasis>Configure and Run Builds:</emphasis>
27 You can use the Toaster web interface to configure and
28 start your builds.
29 Builds started using the Toaster web interface are
30 organized into projects.
31 When you create a project, you are asked to select a
32 release, or version of the build system you want to
33 use for the project builds.
34 As shipped, Toaster supports Yocto Project releases 1.8
35 and beyond.
36 With the Toaster web interface, you can:
37 <itemizedlist>
38 <listitem><para>
39 Browse layers listed in the various
40 <link linkend='layer-source'>layer sources</link>
41 that are available in your project (e.g. the
42 OpenEmbedded Layer Index at
43 <ulink url='http://layers.openembedded.org/layerindex/'></ulink>).
44 </para></listitem>
45 <listitem><para>
46 Browse images, recipes, and machines provided by
47 those layers.
48 </para></listitem>
49 <listitem><para>
50 Import your own layers for building.
51 </para></listitem>
52 <listitem><para>
53 Add and remove layers from your configuration.
54 </para></listitem>
55 <listitem><para>
56 Set configuration variables.
57 </para></listitem>
58 <listitem><para>
59 Select a target or multiple targets to build.
60 </para></listitem>
61 <listitem><para>
62 Start your builds.
63 </para></listitem>
64 </itemizedlist>
65 Toaster also allows you to configure and run your builds
66 from the command line, and switch between the command line and
67 the web interface at any time.
68 Builds started from the command line appear within a special
69 Toaster project called "Command line builds".
70 </para></listitem>
71 <listitem><para id='toaster-analysis-features'>
72 <emphasis>Information About the Build Process:</emphasis>
73 Toaster also records extensive information about your builds.
74 Toaster collects data for builds you start from the web
75 interface and from the command line as long as Toaster
76 is running.
77 <note>
78 You must start Toaster before the build or it will not
79 collect build data.
80 </note></para>
81 <para>With Toaster you can:
82 <itemizedlist>
83 <listitem><para>
84 See what was built (recipes and packages) and what
85 packages were installed into your final image.
86 </para></listitem>
87 <listitem><para>
88 Browse the directory structure of your image.
89 </para></listitem>
90 <listitem><para>
91 See the value of all variables in your build
92 configuration, and which files set each value.
93 </para></listitem>
94 <listitem><para>
95 Examine error, warning, and trace messages to aid
96 in debugging.
97 </para></listitem>
98 <listitem><para>
99 See information about the BitBake tasks executed
100 and reused during your build, including those that
101 used shared state.
102 </para></listitem>
103 <listitem><para>
104 See dependency relationships between recipes,
105 packages, and tasks.
106 </para></listitem>
107 <listitem><para>
108 See performance information such as build time,
109 task time, CPU usage, and disk I/O.
110 </para></listitem>
111 </itemizedlist>
112 </para></listitem>
113 </itemizedlist>
114 </para>
115
116 <para>
117 For an overview of Toaster shipped with the Yocto Project &DISTRO;
118 Release, see the
119 "<ulink url='https://youtu.be/BlXdOYLgPxA'>Toaster - Yocto Project 2.2</ulink>"
120 video.
121 </para>
122 </section>
123
124 <section id='toaster-installation-options'>
125 <title>Installation Options</title>
126
127 <para>
128 You can set Toaster up to run as a local instance or as a shared
129 hosted service.
130 </para>
131
132 <para>
133 When Toaster is set up as a local instance, all the components
134 reside on a single build host.
135 Fundamentally, a local instance of Toaster is suited for a single
136 user developing on a single build host.
137 </para>
138
139 <para>
140 <imagedata fileref="figures/simple-configuration.png" align="center" width="6in" depth="1.5in" />
141 </para>
142
143 <para>
144 Toaster as a hosted service is suited for multiple users
145 developing across several build hosts.
146 When Toaster is set up as a hosted service, its components can
147 be spread across several machines:
148 </para>
149
150 <para>
151 <imagedata fileref="figures/hosted-service.png" align="center" width="6in" depth="3.5in" />
152 </para>
153 </section>
154
155<!--THIS EXTRA INFORMATION PROBABLY WILL GO AWAY
156 For additional information on installing and running Toaster, see the
157 "<ulink url='https://wiki.yoctoproject.org/wiki/Toaster#Installation_and_Running'>Installation and Running</ulink>"
158 section of the "Toaster" wiki page.
159 For complete information on the API and its search operation
160 URI, parameters, and responses, see the
161 <ulink url='https://wiki.yoctoproject.org/wiki/REST_API_Contracts'>REST API Contracts</ulink>
162 Wiki page.
163 </para>
164-->
165</chapter>
diff --git a/documentation/toaster-manual/toaster-manual-reference.xml b/documentation/toaster-manual/toaster-manual-reference.xml
deleted file mode 100644
index ae267f4184..0000000000
--- a/documentation/toaster-manual/toaster-manual-reference.xml
+++ /dev/null
@@ -1,837 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='toaster-manual-reference'>
7
8<title>Concepts and Reference</title>
9
10 <para>
11 In order to configure and use Toaster, you should understand some
12 concepts and have some basic command reference material available.
13 This final chapter provides conceptual information on layer sources,
14 releases, and JSON configuration files.
15 Also provided is a quick look at some useful
16 <filename>manage.py</filename> commands that are Toaster-specific.
17 Information on <filename>manage.py</filename> commands does exist
18 across the Web and the information in this manual by no means
19 attempts to provide a command comprehensive reference.
20 </para>
21
22 <section id='layer-source'>
23 <title>Layer Source</title>
24
25 <para>
26 In general, a "layer source" is a source of information about
27 existing layers.
28 In particular, we are concerned with layers that you can use
29 with the Yocto Project and Toaster.
30 This chapter describes a particular type of layer source called
31 a "layer index."
32 </para>
33
34 <para>
35 A layer index is a web application that contains information
36 about a set of custom layers.
37 A good example of an existing layer index is the
38 OpenEmbedded Layer Index.
39 A public instance of this layer index exists at
40 <ulink url='http://layers.openembedded.org'></ulink>.
41 You can find the code for this layer index's web application at
42 <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/layerindex-web/'></ulink>.
43 </para>
44
45 <para>
46 When you tie a layer source into Toaster, it can query the layer
47 source through a
48 <ulink url='http://en.wikipedia.org/wiki/Representational_state_transfer'>REST</ulink>
49 API, store the information about the layers in the Toaster
50 database, and then show the information to users.
51 Users are then able to view that information and build layers
52 from Toaster itself without worrying about cloning or editing
53 the BitBake layers configuration file
54 <filename>bblayers.conf</filename>.
55 </para>
56
57 <para>
58 Tying a layer source into Toaster is convenient when you have
59 many custom layers that need to be built on a regular basis by
60 a community of developers.
61 In fact, Toaster comes pre-configured with the OpenEmbedded
62 Metadata Index.
63 <note>
64 You do not have to use a layer source to use Toaster.
65 Tying into a layer source is optional.
66 </note>
67 </para>
68
69 <section id='layer-source-using-with-toaster'>
70 <title>Setting Up and Using a Layer Source</title>
71
72 <para>
73 To use your own layer source, you need to set up the layer
74 source and then tie it into Toaster.
75 This section describes how to tie into a layer index in a manner
76 similar to the way Toaster ties into the OpenEmbedded Metadata
77 Index.
78 </para>
79
80 <section id='understanding-your-layers'>
81 <title>Understanding Your Layers</title>
82
83 <para>
84 The obvious first step for using a layer index is to have
85 several custom layers that developers build and access using
86 the Yocto Project on a regular basis.
87 This set of layers needs to exist and you need to be
88 familiar with where they reside.
89 You will need that information when you set up the
90 code for the web application that "hooks" into your set of
91 layers.
92 </para>
93
94 <para>
95 For general information on layers, see the
96 "<ulink url='&YOCTO_DOCS_OM_URL;#the-yocto-project-layer-model'>The Yocto Project Layer Model</ulink>"
97 section in the Yocto Project Overview and Concepts Manual.
98 For information on how to create layers, see the
99 "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
100 section in the Yocto Project Development Tasks Manual.
101 </para>
102 </section>
103
104 <section id='configuring-toaster-to-hook-into-your-layer-source'>
105 <title>Configuring Toaster to Hook Into Your Layer Index</title>
106
107 <para>
108 If you want Toaster to use your layer index, you must host
109 the web application in a server to which Toaster can
110 connect.
111 You also need to give Toaster the information about your
112 layer index.
113 In other words, you have to configure Toaster to use your
114 layer index.
115 This section describes two methods by which you can
116 configure and use your layer index.
117 </para>
118
119 <para>
120 In the previous section, the code for the OpenEmbedded
121 Metadata Index (i.e.
122 <ulink url='http://layers.openembedded.org'></ulink>) was
123 referenced.
124 You can use this code, which is at
125 <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/layerindex-web/'></ulink>,
126 as a base to create your own layer index.
127 </para>
128
129 <section id='use-the-administration-interface'>
130 <title>Use the Administration Interface</title>
131
132 <para>
133 Access the administration interface through a
134 browser by entering the URL of your Toaster instance and
135 adding "<filename>/admin</filename>" to the end of the
136 URL.
137 As an example, if you are running Toaster locally, use
138 the following URL:
139 <literallayout class='monospaced'>
140 http://127.0.0.1:8000/admin
141 </literallayout>
142 </para>
143
144 <para>
145 The administration interface has a "Layer sources"
146 section that includes an "Add layer source" button.
147 Click that button and provide the required information.
148 Make sure you select "layerindex" as the layer source type.
149 </para>
150 </section>
151
152 <section id='use-the-fixture-feature'>
153 <title>Use the Fixture Feature</title>
154
155 <para>
156 The Django fixture feature overrides the default layer
157 server when you use it to specify a custom URL. To use
158 the fixture feature, create (or edit) the file
159 <filename>bitbake/lib/toaster.orm/fixtures/custom.xml</filename>,
160 and then set the following Toaster setting to your
161 custom URL:
162 <literallayout class='monospaced'>
163 &lt;?xml version="1.0" ?&gt;
164 &lt;django-objects version="1.0"&gt;
165 &lt;object model="orm.toastersetting" pk="100"&gt;
166 &lt;field name="name" type="CharField"&gt;CUSTOM_LAYERINDEX_SERVER&lt;/field&gt;
167 &lt;field name="value" type="CharField"&gt;https://layers.my_organization.org/layerindex/branch/master/layers/&lt;/field&gt;
168 &lt;/object&gt;
169 &lt;django-objects&gt;
170 </literallayout>
171 When you start Toaster for the first time, or if you
172 delete the file <filename>toaster.sqlite</filename> and restart,
173 the database will populate cleanly from this layer index server.
174 </para>
175
176 <para>
177 Once the information has been updated, verify the new layer
178 information is available by using the Toaster web interface.
179 To do that, visit the "All compatible layers" page inside a
180 Toaster project. The layers from your layer source should be
181 listed there.
182 </para>
183
184 <para>
185 If you change the information in your layer index server,
186 refresh the Toaster database by running the following command:
187 <literallayout class='monospaced'>
188 $ bitbake/lib/toaster/manage.py lsupdates
189 </literallayout>
190 If Toaster can reach the API URL, you should see a message
191 telling you that Toaster is updating the layer source information.
192 </para>
193 </section>
194 </section>
195 </section>
196 </section>
197
198 <section id='toaster-releases'>
199 <title>Releases</title>
200
201 <para>
202 When you create a Toaster project using the web interface,
203 you are asked to choose a "Release."
204 In the context of Toaster, the term "Release" refers to a set of
205 layers and a BitBake version the OpenEmbedded build system uses
206 to build something.
207 As shipped, Toaster is pre-configured with releases that
208 correspond to Yocto Project release branches.
209 However, you can modify, delete, and create new releases
210 according to your needs.
211 This section provides some background information on releases.
212 </para>
213
214 <section id='toaster-releases-supported'>
215 <title>Pre-Configured Releases</title>
216
217 <para>
218 As shipped, Toaster is configured to use a specific set of
219 releases.
220 Of course, you can always configure Toaster to use any
221 release.
222 For example, you might want your project to build against a
223 specific commit of any of the "out-of-the-box" releases.
224 Or, you might want your project to build against different
225 revisions of OpenEmbedded and BitBake.
226 </para>
227
228 <para>
229 As shipped, Toaster is configured to work with the following
230 releases:
231 <itemizedlist>
232 <listitem><para><emphasis>
233 Yocto Project &DISTRO; "&DISTRO_NAME;" or OpenEmbedded "&DISTRO_NAME;":</emphasis>
234 This release causes your Toaster projects to build
235 against the head of the &DISTRO_NAME_NO_CAP; branch at
236 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/log/?h=rocko'></ulink>
237 or <ulink url='http://git.openembedded.org/openembedded-core/commit/?h=rocko'></ulink>.
238 </para></listitem>
239 <listitem><para><emphasis>Yocto Project "Master" or OpenEmbedded "Master":</emphasis>
240 This release causes your Toaster Projects to
241 build against the head of the master branch, which is
242 where active development takes place, at
243 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/log/'></ulink>
244 or
245 <ulink url='http://git.openembedded.org/openembedded-core/log/'></ulink>.
246 </para></listitem>
247 <listitem><para><emphasis>Local Yocto Project or Local OpenEmbedded:</emphasis>
248 This release causes your Toaster Projects to
249 build against the head of the <filename>poky</filename>
250 or <filename>openembedded-core</filename> clone you
251 have local to the machine running Toaster.
252 </para></listitem>
253 </itemizedlist>
254 </para>
255 </section>
256 </section>
257
258 <section id='configuring-toaster'>
259 <title>Configuring Toaster</title>
260
261 <para>
262 In order to use Toaster, you must configure the database with the
263 default content. The following subsections describe various aspects
264 of Toaster configuration.
265 </para>
266
267 <section id='configuring-the-workflow'>
268 <title>Configuring the Workflow</title>
269
270 <para>
271 The
272 <filename>bldcontrol/management/commands/checksettings.py</filename>
273 file controls workflow configuration.
274 The following steps outline the process to initially populate
275 this database.
276 <orderedlist>
277 <listitem><para>
278 The default project settings are set from
279 <filename>orm/fixtures/settings.xml</filename>.
280 </para></listitem>
281 <listitem><para>
282 The default project distro and layers are added
283 from <filename>orm/fixtures/poky.xml</filename> if poky
284 is installed.
285 If poky is not installed, they are added
286 from <filename>orm/fixtures/oe-core.xml</filename>.
287 </para></listitem>
288 <listitem><para>
289 If the <filename>orm/fixtures/custom.xml</filename> file
290 exists, then its values are added.
291 </para></listitem>
292 <listitem><para>
293 The layer index is then scanned and added to the database.
294 </para></listitem>
295 </orderedlist>
296 Once these steps complete, Toaster is set up and ready to use.
297 </para>
298 </section>
299
300 <section id='customizing-pre-set-data'>
301 <title>Customizing Pre-Set Data</title>
302
303 <para>
304 The pre-set data for Toaster is easily customizable. You can
305 create the <filename>orm/fixtures/custom.xml</filename> file
306 to customize the values that go into to the database.
307 Customization is additive,
308 and can either extend or completely replace the existing values.
309 </para>
310
311 <para>
312 You use the <filename>orm/fixtures/custom.xml</filename> file
313 to change the default project settings for the machine, distro,
314 file images, and layers.
315 When creating a new project, you can use the file to define
316 the offered alternate project release selections.
317 For example, you can add one or more additional selections that
318 present custom layer sets or distros, and any other local or proprietary
319 content.
320 </para>
321
322 <para>
323 Additionally, you can completely disable the content from the
324 <filename>oe-core.xml</filename> and <filename>poky.xml</filename>
325 files by defining the section shown below in the
326 <filename>settings.xml</filename> file.
327 For example, this option is particularly useful if your custom
328 configuration defines fewer releases or layers than the default
329 fixture files.
330 </para>
331
332 <para>
333 The following example sets "name" to "CUSTOM_XML_ONLY" and its value
334 to "True".
335 <literallayout class='monospaced'>
336 &lt;object model="orm.toastersetting" pk="99"&gt;
337 &lt;field type="CharField" name="name"&gt;CUSTOM_XML_ONLY&lt;/field&gt;
338 &lt;field type="CharField" name="value"&gt;True&lt;/field&gt;
339 &lt;/object&gt;
340 </literallayout>
341 </para>
342 </section>
343
344 <section id='understanding-fixture-file-format'>
345 <title>Understanding Fixture File Format</title>
346
347 <para>
348 The following is an overview of the file format used by the
349 <filename>oe-core.xml</filename>, <filename>poky.xml</filename>,
350 and <filename>custom.xml</filename> files.
351 </para>
352
353 <para>
354 The following subsections describe each of the sections in the
355 fixture files, and outline an example section of the XML code.
356 you can use to help understand this information and create a local
357 <filename>custom.xml</filename> file.
358 </para>
359
360 <section id='defining-the-default-distro-and-other-values'>
361 <title>Defining the Default Distro and Other Values</title>
362
363 <para>
364 This section defines the default distro value for new projects.
365 By default, it reserves the first Toaster Setting record "1".
366 The following demonstrates how to set the project default value
367 for
368 <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO'><filename>DISTRO</filename></ulink>:
369 <literallayout class='monospaced'>
370 &lt;!-- Set the project default value for DISTRO --&gt;
371 &lt;object model="orm.toastersetting" pk="1"&gt;
372 &lt;field type="CharField" name="name"&gt;DEFCONF_DISTRO&lt;/field&gt;
373 &lt;field type="CharField" name="value"&gt;poky&lt;/field&gt;
374 &lt;/object&gt;
375 </literallayout>
376 You can override other default project values by adding
377 additional Toaster Setting sections such as any of the
378 settings coming from the <filename>settings.xml</filename>
379 file.
380 Also, you can add custom values that are included in the
381 BitBake environment.
382 The "pk" values must be unique.
383 By convention, values that set default project values have a
384 "DEFCONF" prefix.
385 </para>
386 </section>
387
388 <section id='defining-bitbake-version'>
389 <title>Defining BitBake Version</title>
390
391 <para>
392 The following defines which version of BitBake is used
393 for the following release selection:
394 <literallayout class='monospaced'>
395 &lt;!-- Bitbake versions which correspond to the metadata release --&gt;
396 &lt;object model="orm.bitbakeversion" pk="1"&gt;
397 &lt;field type="CharField" name="name"&gt;rocko&lt;/field&gt;
398 &lt;field type="CharField" name="giturl"&gt;git://git.yoctoproject.org/poky&lt;/field&gt;
399 &lt;field type="CharField" name="branch"&gt;rocko&lt;/field&gt;
400 &lt;field type="CharField" name="dirpath"&gt;bitbake&lt;/field&gt;
401 &lt;/object&gt;
402 </literallayout>
403 </para>
404 </section>
405
406 <section id='defining-releases'>
407 <title>Defining Release</title>
408
409 <para>
410 The following defines the releases when you create a new
411 project.
412 <literallayout class='monospaced'>
413 &lt;!-- Releases available --&gt;
414 &lt;object model="orm.release" pk="1"&gt;
415 &lt;field type="CharField" name="name"&gt;rocko&lt;/field&gt;
416 &lt;field type="CharField" name="description"&gt;Yocto Project 2.4 "Rocko"&lt;/field&gt;
417 &lt;field rel="ManyToOneRel" to="orm.bitbakeversion" name="bitbake_version"&gt;1&lt;/field&gt;
418 &lt;field type="CharField" name="branch_name"&gt;rocko&lt;/field&gt;
419 &lt;field type="TextField" name="helptext"&gt;Toaster will run your builds using the tip of the &lt;a href="http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?h=rocko"&gt;Yocto Project Rocko branch&lt;/a&gt;.&lt;/field&gt;
420 &lt;/object&gt;
421 </literallayout>
422 The "pk" value must match the above respective BitBake
423 version record.
424 </para>
425 </section>
426
427 <section id='defining-the-release-default-layer-names'>
428 <title>Defining the Release Default Layer Names</title>
429
430 <para>
431 The following defines the default layers for each release:
432 <literallayout class='monospaced'>
433 &lt;!-- Default project layers for each release --&gt;
434 &lt;object model="orm.releasedefaultlayer" pk="1"&gt;
435 &lt;field rel="ManyToOneRel" to="orm.release" name="release"&gt;1&lt;/field&gt;
436 &lt;field type="CharField" name="layer_name"&gt;openembedded-core&lt;/field&gt;
437 &lt;/object&gt;
438 </literallayout>
439 The 'pk' values in the example above should start at "1" and increment
440 uniquely.
441 You can use the same layer name in multiple releases.
442 </para>
443 </section>
444
445 <section id='defining-layer-definitions'>
446 <title>Defining Layer Definitions</title>
447
448 <para>
449 Layer definitions are the most complex.
450 The following defines each of the layers, and then defines the exact layer
451 version of the layer used for each respective release.
452 You must have one <filename>orm.layer</filename>
453 entry for each layer.
454 Then, with each entry you need a set of
455 <filename>orm.layer_version</filename> entries that connects
456 the layer with each release that includes the layer.
457 In general all releases include the layer.
458 <literallayout class='monospaced'>
459 &lt;object model="orm.layer" pk="1"&gt;
460 &lt;field type="CharField" name="name"&gt;openembedded-core&lt;/field&gt;
461 &lt;field type="CharField" name="layer_index_url"&gt;&lt;/field&gt;
462 &lt;field type="CharField" name="vcs_url"&gt;git://git.yoctoproject.org/poky&lt;/field&gt;
463 &lt;field type="CharField" name="vcs_web_url"&gt;http://git.yoctoproject.org/cgit/cgit.cgi/poky&lt;/field&gt;
464 &lt;field type="CharField" name="vcs_web_tree_base_url"&gt;http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/%path%?h=%branch%&lt;/field&gt;
465 &lt;field type="CharField" name="vcs_web_file_base_url"&gt;http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/%path%?h=%branch%&lt;/field&gt;
466 &lt;/object&gt;
467 &lt;object model="orm.layer_version" pk="1"&gt;
468 &lt;field rel="ManyToOneRel" to="orm.layer" name="layer"&gt;1&lt;/field&gt;
469 &lt;field type="IntegerField" name="layer_source"&gt;0&lt;/field&gt;
470 &lt;field rel="ManyToOneRel" to="orm.release" name="release"&gt;1&lt;/field&gt;
471 &lt;field type="CharField" name="branch"&gt;rocko&lt;/field&gt;
472 &lt;field type="CharField" name="dirpath"&gt;meta&lt;/field&gt;
473 &lt;/object&gt;
474 &lt;object model="orm.layer_version" pk="2"&gt;
475 &lt;field rel="ManyToOneRel" to="orm.layer" name="layer"&gt;1&lt;/field&gt;
476 &lt;field type="IntegerField" name="layer_source"&gt;0&lt;/field&gt;
477 &lt;field rel="ManyToOneRel" to="orm.release" name="release"&gt;2&lt;/field&gt;
478 &lt;field type="CharField" name="branch"&gt;HEAD&lt;/field&gt;
479 &lt;field type="CharField" name="commit"&gt;HEAD&lt;/field&gt;
480 &lt;field type="CharField" name="dirpath"&gt;meta&lt;/field&gt;
481 &lt;/object&gt;
482 &lt;object model="orm.layer_version" pk="3"&gt;
483 &lt;field rel="ManyToOneRel" to="orm.layer" name="layer"&gt;1&lt;/field&gt;
484 &lt;field type="IntegerField" name="layer_source"&gt;0&lt;/field&gt;
485 &lt;field rel="ManyToOneRel" to="orm.release" name="release"&gt;3&lt;/field&gt;
486
487 &lt;field type="CharField" name="branch"&gt;master&lt;/field&gt;
488 &lt;field type="CharField" name="dirpath"&gt;meta&lt;/field&gt;
489 &lt;/object&gt;
490 </literallayout>
491 The layer "pk" values above must be unique, and typically start at "1".
492 The layer version "pk" values must also be unique across all layers,
493 and typically start at "1".
494 </para>
495 </section>
496 </section>
497 </section>
498
499 <section id='remote-toaster-monitoring'>
500 <title>Remote Toaster Monitoring</title>
501
502 <para>
503 Toaster has an API that allows remote management applications to
504 directly query the state of the Toaster server and its builds
505 in a machine-to-machine manner.
506 This API uses the
507 <ulink url='http://en.wikipedia.org/wiki/Representational_state_transfer'>REST</ulink>
508 interface and the transfer of JSON files.
509 For example, you might
510 monitor a build inside a container through well supported
511 known HTTP ports in order to easily access a Toaster server
512 inside the container.
513 In this example, when you use this direct JSON API, you avoid
514 having web page parsing against the display the user sees.
515 </para>
516
517 <section id='checking-health'>
518 <title>Checking Health</title>
519
520 <para>
521 Before you use remote Toaster monitoring, you should do
522 a health check.
523 To do this, ping the Toaster server using the following call
524 to see if it is still alive:
525 <literallayout class='monospaced'>
526 http://<replaceable>host</replaceable>:<replaceable>port</replaceable>/health
527 </literallayout>
528 Be sure to provide values for <replaceable>host</replaceable>
529 and <replaceable>port</replaceable>.
530 If the server is alive, you will get the response HTML:
531 <literallayout class='monospaced'>
532 &lt;!DOCTYPE html&gt;
533 &lt;html lang="en"&gt;
534 &lt;head&gt;&lt;title&gt;Toaster Health&lt;/title&gt;&lt;/head&gt;
535 &lt;body&gt;Ok&lt;/body&gt;
536 &lt;/html&gt;
537 </literallayout>
538 </para>
539 </section>
540
541 <section id='determining-status-of-builds-in-progress'>
542 <title>Determining Status of Builds in Progress</title>
543
544 <para>
545 Sometimes it is useful to determine the status of a build
546 in progress.
547 To get the status of pending builds, use the following call:
548 <literallayout class='monospaced'>
549 http://<replaceable>host</replaceable>:<replaceable>port</replaceable>/toastergui/api/building
550 </literallayout>
551 Be sure to provide values for <replaceable>host</replaceable>
552 and <replaceable>port</replaceable>.
553 The output is a JSON file that itemizes all builds in
554 progress.
555 This file includes the time in seconds since each
556 respective build started as well as the progress of the
557 cloning, parsing, and task execution.
558 The following is sample output for a build in progress:
559 <literallayout class='monospaced'>
560 {"count": 1,
561 "building": [
562 {"machine": "beaglebone",
563 "seconds": "463.869",
564 "task": "927:2384",
565 "distro": "poky",
566 "clone": "1:1",
567 "id": 2,
568 "start": "2017-09-22T09:31:44.887Z",
569 "name": "20170922093200",
570 "parse": "818:818",
571 "project": "my_rocko",
572 "target": "core-image-minimal"
573 }]
574 }
575 </literallayout>
576 The JSON data for this query is returned in a single line.
577 In the previous example the line has been artificially split for readability.
578 </para>
579 </section>
580
581 <section id='checking-status-of-builds-completed'>
582 <title>Checking Status of Builds Completed</title>
583
584 <para>
585 Once a build is completed, you get the status when you use
586 the following call:
587 <literallayout class='monospaced'>
588 http://<replaceable>host</replaceable>:<replaceable>port</replaceable>/toastergui/api/builds
589 </literallayout>
590 Be sure to provide values for <replaceable>host</replaceable>
591 and <replaceable>port</replaceable>.
592 The output is a JSON file that itemizes all complete builds,
593 and includes build summary information.
594 The following is sample output for a completed build:
595 <literallayout class='monospaced'>
596 {"count": 1,
597 "builds": [
598 {"distro": "poky",
599 "errors": 0,
600 "machine":
601 "beaglebone",
602 "project": "my_rocko",
603 "stop": "2017-09-22T09:26:36.017Z",
604 "target": "quilt-native",
605 "seconds": "78.193",
606 "outcome": "Succeeded",
607 "id": 1,
608 "start": "2017-09-22T09:25:17.824Z",
609 "warnings": 1,
610 "name": "20170922092618"
611 }]
612 }
613 </literallayout>
614 The JSON data for this query is returned in a single line.
615 In the previous example the line has been artificially split for readability.
616 </para>
617 </section>
618
619 <section id='determining-status-of-a-specific-build'>
620 <title>Determining Status of a Specific Build</title>
621
622 <para>
623 Sometimes it is useful to determine the status of a specific
624 build.
625 To get the status of a specific build, use the following
626 call:
627 <literallayout class='monospaced'>
628 http://<replaceable>host</replaceable>:<replaceable>port</replaceable>/toastergui/api/build/<replaceable>ID</replaceable>
629 </literallayout>
630 Be sure to provide values for <replaceable>host</replaceable>,
631 <replaceable>port</replaceable>, and <replaceable>ID</replaceable>.
632 You can find the value for <replaceable>ID</replaceable> from the
633 Builds Completed query. See the
634 "<link linkend='checking-status-of-builds-completed'>Checking Status of Builds Completed</link>"
635 section for more information.
636 </para>
637
638 <para>
639 The output is a JSON file that itemizes the specific build
640 and includes build summary information.
641 The following is sample output for a specific build:
642 <literallayout class='monospaced'>
643 {"build":
644 {"distro": "poky",
645 "errors": 0,
646 "machine": "beaglebone",
647 "project": "my_rocko",
648 "stop": "2017-09-22T09:26:36.017Z",
649 "target": "quilt-native",
650 "seconds": "78.193",
651 "outcome": "Succeeded",
652 "id": 1,
653 "start": "2017-09-22T09:25:17.824Z",
654 "warnings": 1,
655 "name": "20170922092618",
656 "cooker_log": "/opt/user/poky/build-toaster-2/tmp/log/cooker/beaglebone/build_20170922_022607.991.log"
657 }
658 }
659 </literallayout>
660 The JSON data for this query is returned in a single line.
661 In the previous example the line has been artificially split for readability.
662 </para>
663 </section>
664 </section>
665
666 <section id='toaster-useful-commands'>
667 <title>Useful Commands</title>
668
669 <para>
670 In addition to the web user interface and the scripts that start
671 and stop Toaster, command-line commands exist through the
672 <filename>manage.py</filename> management script.
673 You can find general documentation on
674 <filename>manage.py</filename> at the
675 <ulink url='https://docs.djangoproject.com/en/1.7/topics/settings/'>Django</ulink>
676 site.
677 However, several <filename>manage.py</filename> commands have been
678 created that are specific to Toaster and are used to control
679 configuration and back-end tasks.
680 You can locate these commands in the
681 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
682 (e.g. <filename>poky</filename>) at
683 <filename>bitbake/lib/manage.py</filename>.
684 This section documents those commands.
685 <note><title>Notes</title>
686 <itemizedlist>
687 <listitem><para>
688 When using <filename>manage.py</filename> commands given
689 a default configuration, you must be sure that your
690 working directory is set to the
691 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
692 Using <filename>manage.py</filename> commands from the
693 Build Directory allows Toaster to find the
694 <filename>toaster.sqlite</filename> file, which is located
695 in the Build Directory.
696 </para></listitem>
697 <listitem><para>
698 For non-default database configurations, it is possible
699 that you can use <filename>manage.py</filename> commands
700 from a directory other than the Build Directory.
701 To do so, the
702 <filename>toastermain/settings.py</filename> file must be
703 configured to point to the correct database backend.
704 </para></listitem>
705 </itemizedlist>
706 </note>
707 </para>
708
709 <section id='toaster-command-buildslist'>
710 <title><filename>buildslist</filename></title>
711
712 <para>
713 The <filename>buildslist</filename> command lists all builds
714 that Toaster has recorded.
715 Access the command as follows:
716 <literallayout class='monospaced'>
717 $ bitbake/lib/toaster/manage.py buildslist
718 </literallayout>
719 The command returns a list, which includes numeric
720 identifications, of the builds that Toaster has recorded in the
721 current database.
722 </para>
723
724 <para>
725 You need to run the <filename>buildslist</filename> command
726 first to identify existing builds in the database before
727 using the
728 <link linkend='toaster-command-builddelete'><filename>builddelete</filename></link>
729 command.
730 Here is an example that assumes default repository and build
731 directory names:
732 <literallayout class='monospaced'>
733 $ cd ~/poky/build
734 $ python ../bitbake/lib/toaster/manage.py buildslist
735 </literallayout>
736 If your Toaster database had only one build, the above
737 <filename>buildslist</filename> command would return something
738 like the following:
739 <literallayout class='monospaced'>
740 1: qemux86 poky core-image-minimal
741 </literallayout>
742 </para>
743 </section>
744
745 <section id='toaster-command-builddelete'>
746 <title><filename>builddelete</filename></title>
747
748 <para>
749 The <filename>builddelete</filename> command deletes data
750 associated with a build.
751 Access the command as follows:
752 <literallayout class='monospaced'>
753 $ bitbake/lib/toaster/manage.py builddelete <replaceable>build_id</replaceable>
754 </literallayout>
755 The command deletes all the build data for the specified
756 <replaceable>build_id</replaceable>.
757 This command is useful for removing old and unused data from
758 the database.
759 </para>
760
761 <para>
762 Prior to running the <filename>builddelete</filename>
763 command, you need to get the ID associated with builds
764 by using the
765 <link linkend='toaster-command-buildslist'><filename>buildslist</filename></link>
766 command.
767 </para>
768 </section>
769
770 <section id='toaster-command-perf'>
771 <title><filename>perf</filename></title>
772
773 <para>
774 The <filename>perf</filename> command measures Toaster
775 performance.
776 Access the command as follows:
777 <literallayout class='monospaced'>
778 $ bitbake/lib/toaster/manage.py perf
779 </literallayout>
780 The command is a sanity check that returns page loading
781 times in order to identify performance problems.
782 </para>
783 </section>
784
785 <section id='toaster-command-checksettings'>
786 <title><filename>checksettings</filename></title>
787
788 <para>
789 The <filename>checksettings</filename> command verifies
790 existing Toaster settings.
791 Access the command as follows:
792 <literallayout class='monospaced'>
793 $ bitbake/lib/toaster/manage.py checksettings
794 </literallayout>
795 Toaster uses settings that are based on the
796 database to configure the building tasks.
797 The <filename>checksettings</filename> command verifies that
798 the database settings are valid in the sense that they have
799 the minimal information needed to start a build.
800 </para>
801
802 <para>
803 In order for the <filename>checksettings</filename> command
804 to work, the database must be correctly set up and not have
805 existing data.
806 To be sure the database is ready, you can run the following:
807 <literallayout class='monospaced'>
808 $ bitbake/lib/toaster/mana​ge.py syncdb
809 $ bitbake/lib/toaster/mana​ge.py migrate orm
810 $ bitbake/lib/toaster/mana​ge.py migrate bldcontrol
811 </literallayout>
812 After running these commands, you can run the
813 <filename>checksettings</filename> command.
814 </para>
815 </section>
816
817 <section id='toaster-command-runbuilds'>
818 <title><filename>runbuilds</filename></title>
819
820 <para>
821 The <filename>runbuilds</filename> command launches
822 scheduled builds.
823 Access the command as follows:
824 <literallayout class='monospaced'>
825 $ bitbake/lib/toaster/manage.py runbuilds
826 </literallayout>
827 The <filename>runbuilds</filename> command checks if
828 scheduled builds exist in the database and then launches them
829 per schedule.
830 The command returns after the builds start but before they
831 complete.
832 The Toaster Logging Interface records and updates the database
833 when the builds complete.
834 </para>
835 </section>
836 </section>
837</chapter>
diff --git a/documentation/toaster-manual/toaster-manual-setup-and-use.xml b/documentation/toaster-manual/toaster-manual-setup-and-use.xml
deleted file mode 100644
index f555745923..0000000000
--- a/documentation/toaster-manual/toaster-manual-setup-and-use.xml
+++ /dev/null
@@ -1,844 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='toaster-manual-setup-and-use'>
7
8<title>Setting Up and Using Toaster</title>
9
10 <section id='starting-toaster-for-local-development'>
11 <title>Starting Toaster for Local Development</title>
12
13 <para>
14 Once you have set up the Yocto Project and installed the
15 Toaster system dependencies as described in the
16 "<link linkend='toaster-manual-start'>Preparing to Use Toaster</link>"
17 chapter, you are ready to start Toaster.
18 </para>
19
20 <para>
21 Navigate to the root of your
22 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
23 (e.g. <filename>poky</filename>):
24 <literallayout class='monospaced'>
25 $ cd poky
26 </literallayout>
27 Once in that directory, source the build environment script:
28 <literallayout class='monospaced'>
29 $ source oe-init-build-env
30 </literallayout>
31 Next, from the build directory (e.g.
32 <filename>poky/build</filename>), start Toaster using this
33 command:
34 <literallayout class='monospaced'>
35 $ source toaster start
36 </literallayout>
37 You can now run your builds from the command line, or with
38 Toaster as explained in section
39 "<link linkend='using-the-toaster-web-interface'>Using the Toaster Web Interface</link>".
40 </para>
41
42 <para>
43 To access the Toaster web interface, open your favorite
44 browser and enter the following:
45 <literallayout class='monospaced'>
46 http://127.0.0.1:8000
47 </literallayout>
48 </para>
49 </section>
50
51 <section id='setting-a-different-port'>
52 <title>Setting a Different Port</title>
53
54 <para>
55 By default, Toaster starts on port 8000.
56 You can use the <filename>WEBPORT</filename> parameter to
57 set a different port.
58 For example, the following command sets the port to "8400":
59 <literallayout class='monospaced'>
60 $ source toaster start webport=8400
61 </literallayout>
62 </para>
63 </section>
64
65 <section id='setting-up-toaster-without-a-web-server'>
66 <title>Setting Up Toaster Without a Web Server</title>
67
68 <para>
69 You can start a Toaster environment without starting its
70 web server. This is useful for the following:
71 <itemizedlist>
72 <listitem><para>
73 Capturing a command-line build's statistics into
74 the Toaster database for examination later.
75 </para></listitem>
76 <listitem><para>
77 Capturing a command-line build's statistics when
78 the Toaster server is already running.
79 </para></listitem>
80 <listitem><para>
81 Having one instance of the Toaster web server
82 track and capture multiple command-line builds,
83 where each build is started in its own "noweb"
84 Toaster environment.
85 </para></listitem>
86 </itemizedlist>
87 The following commands show how to start a Toaster environment
88 without starting its web server, perform BitBake operations,
89 and then shut down the Toaster environment.
90 Once the build is complete, you can close the Toaster environment.
91 Before closing the environment, however, you should allow a few
92 minutes to ensure the complete transfer of its BitBake build
93 statistics to the Toaster database.
94 If you have a separate Toaster web server instance running, you
95 can watch this command-line build's progress and examine the
96 results as soon as they are posted:
97 <literallayout class='monospaced'>
98 $ source toaster start noweb
99 $ bitbake <replaceable>target</replaceable>
100 $ source toaster stop
101 </literallayout>
102 </para>
103 </section>
104
105 <section id='setting-up-toaster-without-a-build-server'>
106 <title>Setting Up Toaster Without a Build Server</title>
107
108 <para>
109 You can start a Toaster environment with the
110 "New Projects" feature disabled.
111 Doing so is useful for the following:
112 <itemizedlist>
113 <listitem><para>
114 Sharing your build results over the web server while
115 blocking others from starting builds on your host.
116 </para></listitem>
117 <listitem><para>
118 Allowing only local command-line builds to be captured
119 into the Toaster database.
120 </para></listitem>
121 </itemizedlist>
122 Use the following command to set up Toaster without a
123 build server:
124 <literallayout class='monospaced'>
125 $ source toaster start nobuild webport=<replaceable>port</replaceable>
126 </literallayout>
127 </para>
128 </section>
129
130 <section id='setting-up-external-access'>
131 <title>Setting up External Access</title>
132
133 <para>
134 By default, Toaster binds to the loop back address
135 (i.e. localhost), which does not allow access from
136 external hosts. To allow external access, use the
137 <filename>WEBPORT</filename> parameter to open an
138 address that connects to the network, specifically the
139 IP address that your NIC uses to connect to the network.
140 You can also bind to all IP addresses the computer
141 supports by using the shortcut
142 "0.0.0.0:<replaceable>port</replaceable>".
143 </para>
144
145 <para>
146 The following example binds to all IP addresses on the
147 host:
148 <literallayout class='monospaced'>
149 $ source toaster start webport=0.0.0.0:8400
150 </literallayout>
151 This example binds to a specific IP address on the host's
152 NIC:
153 <literallayout class='monospaced'>
154 $ source toaster start webport=192.168.1.1:8400
155 </literallayout>
156 </para>
157 </section>
158
159 <section id='the-directory-for-cloning-layers'>
160 <title>The Directory for Cloning Layers</title>
161
162 <para>
163 Toaster creates a <filename>_toaster_clones</filename>
164 directory inside your Source Directory
165 (i.e. <filename>poky</filename>) to clone any layers
166 needed for your builds.
167 </para>
168
169 <para>
170 Alternatively, if you would like all of your Toaster related
171 files and directories to be in a particular location other than
172 the default, you can set the <filename>TOASTER_DIR</filename>
173 environment variable, which takes precedence over your current
174 working directory.
175 Setting this environment variable causes Toaster to create and use
176 <filename>$TOASTER_DIR./_toaster_clones</filename>.
177 </para>
178 </section>
179
180 <section id='toaster-the-build-directory'>
181 <title>The Build Directory</title>
182
183 <para>
184 Toaster creates a build directory within your Source
185 Directory (e.g. <filename>poky</filename>) to execute
186 the builds.
187 </para>
188
189 <para>
190 Alternatively, if you would like all of your Toaster related files
191 and directories to be in a particular location, you can set
192 the <filename>TOASTER_DIR</filename> environment variable,
193 which takes precedence over your current working directory.
194 Setting this environment variable causes Toaster to use
195 <filename>$TOASTER_DIR/build</filename> as the build directory.
196 </para>
197 </section>
198
199 <section id='toaster-creating-a-django-super-user'>
200 <title>Creating a Django Superuser</title>
201
202 <para>
203 Toaster is built on the
204 <ulink url='https://www.djangoproject.com/'>Django framework</ulink>.
205 Django provides an administration interface you can use
206 to edit Toaster configuration parameters.
207 </para>
208
209 <para>
210 To access the Django administration interface, you must
211 create a superuser by following these steps:
212 <orderedlist>
213 <listitem><para>
214 If you used <filename>pip3</filename>, which is
215 recommended, to set up the Toaster system dependencies,
216 you need be sure the local user path is in your
217 <filename>PATH</filename> list.
218 To append the pip3 local user path, use the following
219 command:
220 <literallayout class='monospaced'>
221 $ export PATH=$PATH:$HOME/.local/bin
222 </literallayout>
223 </para></listitem>
224 <listitem><para>
225 From the directory containing the Toaster database,
226 which by default is the
227 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>,
228 invoke the <filename>createsuperuser</filename> command
229 from <filename>manage.py</filename>:
230 <literallayout class='monospaced'>
231 $ cd ~/poky/build
232 $ ../bitbake/lib/toaster/manage.py createsuperuser
233 </literallayout>
234 </para></listitem>
235 <listitem><para>
236 Django prompts you for the username, which you need to
237 provide.
238 </para></listitem>
239 <listitem><para>
240 Django prompts you for an email address, which is
241 optional.
242 </para></listitem>
243 <listitem><para>
244 Django prompts you for a password, which you must provide.
245 </para></listitem>
246 <listitem><para>
247 Django prompts you to re-enter your password for verification.
248 </para></listitem>
249 </orderedlist>
250 After completing these steps, the following confirmation message
251 appears:
252 <literallayout class='monospaced'>
253 Superuser created successfully.
254 </literallayout>
255 </para>
256
257 <para>
258 Creating a superuser allows you to access the Django administration
259 interface through a browser.
260 The URL for this interface is the same as the URL used for the
261 Toaster instance with "/admin" on the end.
262 For example, if you are running Toaster locally, use the
263 following URL:
264 <literallayout class='monospaced'>
265 http://127.0.0.1:8000/admin
266 </literallayout>
267 You can use the Django administration interface to set Toaster
268 configuration parameters such as the build directory, layer sources,
269 default variable values, and BitBake versions.
270 </para>
271 </section>
272
273 <section id='toaster-setting-up-a-production-instance-of-toaster'>
274 <title>Setting Up a Production Instance of Toaster</title>
275
276 <para>
277 You can use a production instance of Toaster to share the
278 Toaster instance with remote users, multiple users, or both.
279 The production instance is also the setup that can handle
280 heavier loads on the web service.
281 Use the instructions in the following sections to set up
282 Toaster to run builds through the Toaster web interface.
283 </para>
284
285 <section id='toaster-production-instance-requirements'>
286 <title>Requirements</title>
287
288 <para>
289 Be sure you meet the following requirements:
290 <note>
291 You must comply with all Apache,
292 <filename>mod-wsgi</filename>, and Mysql requirements.
293 </note>
294 <itemizedlist>
295 <listitem><para>
296 Have all the build requirements as described in the
297 "<link linkend='toaster-manual-start'>Preparing to Use Toaster</link>"
298 chapter.
299 </para></listitem>
300 <listitem><para>
301 Have an Apache webserver.
302 </para></listitem>
303 <listitem><para>
304 Have <filename>mod-wsgi</filename> for the Apache
305 webserver.
306 </para></listitem>
307 <listitem><para>
308 Use the Mysql database server.
309 </para></listitem>
310 <listitem><para>
311 If you are using Ubuntu 16.04, run the following:
312 <literallayout class='monospaced'>
313 $ sudo apt-get install apache2 libapache2-mod-wsgi-py3 mysql-server python3-pip libmysqlclient-dev
314 </literallayout>
315 </para></listitem>
316 <listitem><para>
317 If you are using Fedora 24 or a RedHat distribution, run
318 the following:
319 <literallayout class='monospaced'>
320 $ sudo dnf install httpd python3-mod_wsgi python3-pip mariadb-server mariadb-devel python3-devel
321 </literallayout>
322 </para></listitem>
323 <listitem><para>
324 If you are using openSUSE Leap 42.1, run
325 the following:
326 <literallayout class='monospaced'>
327 $ sudo zypper install apache2 apache2-mod_wsgi-python3 python3-pip mariadb mariadb-client python3-devel
328 </literallayout>
329 </para></listitem>
330 </itemizedlist>
331 </para>
332 </section>
333
334 <section id='toaster-installation-steps'>
335 <title>Installation</title>
336
337 <para>
338 Perform the following steps to install Toaster:
339 <orderedlist>
340 <listitem><para>
341 Create toaster user and set its home directory to
342 <filename>/var/www/toaster</filename>:
343 <literallayout class='monospaced'>
344 $ sudo /usr/sbin/useradd toaster -md /var/www/toaster -s /bin/false
345 $ sudo su - toaster -s /bin/bash
346 </literallayout>
347 </para></listitem>
348 <listitem><para>
349 Checkout a copy of <filename>poky</filename>
350 into the web server directory.
351 You will be using <filename>/var/www/toaster</filename>:
352 <literallayout class='monospaced'>
353 $ git clone git://git.yoctoproject.org/poky
354 $ git checkout &DISTRO_NAME_NO_CAP;
355 </literallayout>
356 </para></listitem>
357 <listitem><para>
358 Install Toaster
359 dependencies using the --user flag which
360 keeps the Python packages
361 isolated from your system-provided packages:
362 <literallayout class='monospaced'>
363 $ cd /var/www/toaster/
364 $ pip3 install --user -r ./poky/bitbake/toaster-requirements.txt
365 $ pip3 install --user mysqlclient
366 </literallayout>
367 <note>
368 Isolating these packages is not required but is
369 recommended.
370 Alternatively, you can use your operating system's
371 package manager to install the packages.
372 </note>
373 </para></listitem>
374 <listitem><para>
375 Configure Toaster by editing
376 <filename>/var/www/toaster/poky/bitbake/lib/toaster/toastermain/settings.py</filename>
377 as follows:
378 <itemizedlist>
379 <listitem><para>
380 Edit the
381 <ulink url='https://docs.djangoproject.com/en/1.11/ref/settings/#databases'>DATABASES</ulink>
382 settings:
383 <literallayout class='monospaced'>
384 DATABASES = {
385 'default': {
386 'ENGINE': 'django.db.backends.mysql',
387 'NAME': 'toaster_data',
388 'USER': 'toaster',
389 'PASSWORD': 'yourpasswordhere',
390 'HOST': 'localhost',
391 'PORT': '3306',
392 }
393 }
394 </literallayout>
395 </para></listitem>
396 <listitem><para>
397 Edit the
398 <ulink url='https://docs.djangoproject.com/en/1.11/ref/settings/#std:setting-SECRET_KEY'>SECRET_KEY</ulink>:
399 <literallayout class='monospaced'>
400 SECRET_KEY = '<replaceable>your_secret_key</replaceable>'
401 </literallayout>
402 </para></listitem>
403 <listitem><para>
404 Edit the
405 <ulink url='https://docs.djangoproject.com/en/1.11/ref/settings/#std:setting-STATIC_ROOT'>STATIC_ROOT</ulink>:
406 <literallayout class='monospaced'>
407 STATIC_ROOT = '/var/www/toaster/static_files/'
408 </literallayout>
409 </para></listitem>
410 </itemizedlist>
411 </para></listitem>
412 <listitem><para>
413 Add the database and user to the <filename>mysql</filename>
414 server defined earlier:
415 <literallayout class='monospaced'>
416 $ mysql -u root -p
417 mysql> CREATE DATABASE toaster_data;
418 mysql> CREATE USER 'toaster'@'localhost' identified by 'yourpasswordhere';
419 mysql> GRANT all on toaster_data.* to 'toaster'@'localhost';
420 mysql> quit
421 </literallayout>
422 </para></listitem>
423 <listitem><para>
424 Get Toaster to create the database schema,
425 default data, and gather the statically-served files:
426 <literallayout class='monospaced'>
427 $ cd /var/www/toaster/poky/
428 $ ./bitbake/lib/toaster/manage.py migrate
429 $ TOASTER_DIR=`pwd` TEMPLATECONF='poky' \
430 ./bitbake/lib/toaster/manage.py checksettings
431 $ ./bitbake/lib/toaster/manage.py collectstatic
432 </literallayout>
433 In the previous example, from the <filename>poky</filename>
434 directory, the <filename>migrate</filename> command
435 ensures the database schema changes have propagated
436 correctly (i.e. migrations).
437 The next line sets the Toaster root directory
438 <filename>TOASTER_DIR</filename> and the location
439 of the Toaster configuration file
440 <filename>TOASTER_CONF</filename>, which is relative to
441 <filename>TOASTER_DIR</filename>.
442 The <filename>TEMPLATECONF</filename> value reflects the
443 contents of <filename>poky/.templateconf</filename>, and
444 by default, should include the string "poky".
445 For more information on the Toaster configuration
446 file, see the
447 "<link linkend='configuring-toaster'>Configuring Toaster</link>"
448 section.</para>
449
450 <para>This line also runs the <filename>checksettings</filename>
451 command, which configures the location of the Toaster
452 <ulink url='&YOCTO_DOCS_REF_URL;#build-directory'>Build Directory</ulink>.
453 The Toaster root directory <filename>TOASTER_DIR</filename>
454 determines where the Toaster build directory
455 is created on the file system.
456 In the example above,
457 <filename>TOASTER_DIR</filename> is set as follows:
458 <literallayout class="monospaced">
459 /var/www/toaster/poky
460 </literallayout>
461 This setting causes the Toaster build directory to be:
462 <literallayout class="monospaced">
463 /var/www/toaster/poky/build
464 </literallayout></para>
465
466 <para>Finally, the <filename>collectstatic</filename> command
467 is a Django framework command that collects all the
468 statically served files into a designated directory to
469 be served up by the Apache web server as defined by
470 <filename>STATIC_ROOT</filename>.
471 </para></listitem>
472 <listitem><para>
473 Test and/or use the Mysql integration with Toaster's
474 Django web server.
475 At this point, you can start up the normal Toaster
476 Django web server with the Toaster database in Mysql.
477 You can use this web server to confirm that the database
478 migration and data population from the Layer Index is
479 complete.</para>
480
481 <para>To start the default Toaster Django web server with
482 the Toaster database now in Mysql, use the standard
483 start commands:
484 <literallayout class='monospaced'>
485 $ source oe-init-build-env
486 $ source toaster start
487 </literallayout>
488 Additionally, if Django is sufficient for your requirements,
489 you can use it for your release system and migrate later
490 to Apache as your requirements change.
491 </para></listitem>
492 <listitem><para>
493 Add an Apache configuration file for Toaster to your Apache web
494 server's configuration directory.
495 If you are using Ubuntu or Debian, put the file here:
496 <literallayout class='monospaced'>
497 /etc/apache2/conf-available/toaster.conf
498 </literallayout>
499 If you are using Fedora or RedHat, put it here:
500 <literallayout class='monospaced'>
501 /etc/httpd/conf.d/toaster.conf
502 </literallayout>
503 If you are using OpenSUSE, put it here:
504 <literallayout class='monospaced'>
505 /etc/apache2/conf.d/toaster.conf
506 </literallayout>
507 Following is a sample Apache configuration for Toaster
508 you can follow:
509 <literallayout class='monospaced'>
510 Alias /static /var/www/toaster/static_files
511 &lt;Directory /var/www/toaster/static_files&gt;
512 &lt;IfModule mod_access_compat.c&gt;
513 Order allow,deny
514 Allow from all
515 &lt;/IfModule&gt;
516 &lt;IfModule !mod_access_compat.c&gt;
517 Require all granted
518 &lt;/IfModule&gt;
519 &lt;/Directory&gt;
520
521 &lt;Directory /var/www/toaster/poky/bitbake/lib/toaster/toastermain&gt;
522 &lt;Files "wsgi.py"&gt;
523 Require all granted
524 &lt;/Files&gt;
525 &lt;/Directory&gt;
526
527 WSGIDaemonProcess toaster_wsgi python-path=/var/www/toaster/poky/bitbake/lib/toaster:/var/www/toaster/.local/lib/python3.4/site-packages
528
529 WSGIScriptAlias / "/var/www/toaster/poky/bitbake/lib/toaster/toastermain/wsgi.py"
530 &lt;Location /&gt;
531 WSGIProcessGroup toaster_wsgi
532 &lt;/Location&gt;
533 </literallayout>
534 If you are using Ubuntu or Debian,
535 you will need to enable the config and module for Apache:
536 <literallayout class='monospaced'>
537 $ sudo a2enmod wsgi
538 $ sudo a2enconf toaster
539 $ chmod +x bitbake/lib/toaster/toastermain/wsgi.py
540 </literallayout>
541 Finally, restart Apache to make sure all new configuration
542 is loaded.
543 For Ubuntu, Debian, and OpenSUSE use:
544 <literallayout class='monospaced'>
545 $ sudo service apache2 restart
546 </literallayout>
547 For Fedora and RedHat use:
548 <literallayout class='monospaced'>
549 $ sudo service httpd restart
550 </literallayout>
551 </para></listitem>
552 <listitem><para>
553 Prepare the systemd service to run Toaster builds.
554 Here is a sample configuration file for the service:
555 <literallayout class='monospaced'>
556 [Unit]
557 Description=Toaster runbuilds
558
559 [Service]
560 Type=forking
561 User=toaster
562 ExecStart=/usr/bin/screen -d -m -S runbuilds /var/www/toaster/poky/bitbake/lib/toaster/runbuilds-service.sh start
563 ExecStop=/usr/bin/screen -S runbuilds -X quit
564 WorkingDirectory=/var/www/toaster/poky
565
566 [Install]
567 WantedBy=multi-user.target
568 </literallayout>
569 Prepare the <filename>runbuilds-service.sh</filename>
570 script that you need to place in the
571 <filename>/var/www/toaster/poky/bitbake/lib/toaster/</filename>
572 directory by setting up executable permissions:
573 <literallayout class='monospaced'>
574 #!/bin/bash
575
576 #export http_proxy=http://proxy.host.com:8080
577 #export https_proxy=http://proxy.host.com:8080
578 #export GIT_PROXY_COMMAND=$HOME/bin/gitproxy
579
580 cd ~/poky/
581 source ./oe-init-build-env build
582 source ../bitbake/bin/toaster $1 noweb
583 [ "$1" == 'start' ] &amp;&amp; /bin/bash
584 </literallayout>
585 </para></listitem>
586 <listitem><para>
587 Run the service:
588 <literallayout class='monospaced'>
589 # service runbuilds start
590 </literallayout>
591 Since the service is running in a detached screen
592 session, you can attach to it using this command:
593 <literallayout class='monospaced'>
594 $ sudo su - toaster
595 $ screen -rS runbuilds
596 </literallayout>
597 You can detach from the service again using "Ctrl-a"
598 followed by "d" key combination.
599 </para></listitem>
600 </orderedlist>
601 You can now open up a browser and start using Toaster.
602 </para>
603 </section>
604 </section>
605
606 <section id='using-the-toaster-web-interface'>
607 <title>Using the Toaster Web Interface</title>
608
609 <para>
610 The Toaster web interface allows you to do the following:
611 <itemizedlist>
612 <listitem><para>
613 Browse published layers in the
614 <ulink url='http://layers.openembedded.org'>OpenEmbedded Layer Index</ulink>
615 that are available for your selected version of the build
616 system.
617 </para></listitem>
618 <listitem><para>
619 Import your own layers for building.
620 </para></listitem>
621 <listitem><para>
622 Add and remove layers from your configuration.
623 </para></listitem>
624 <listitem><para>
625 Set configuration variables.
626 </para></listitem>
627 <listitem><para>
628 Select a target or multiple targets to build.
629 </para></listitem>
630 <listitem><para>
631 Start your builds.
632 </para></listitem>
633 <listitem><para>
634 See what was built (recipes and packages) and what
635 packages were installed into your final image.
636 </para></listitem>
637 <listitem><para>
638 Browse the directory structure of your image.
639 </para></listitem>
640 <listitem><para>
641 See the value of all variables in your build configuration,
642 and which files set each value.
643 </para></listitem>
644 <listitem><para>
645 Examine error, warning and trace messages to aid in
646 debugging.
647 </para></listitem>
648 <listitem><para>
649 See information about the BitBake tasks executed and
650 reused during your build, including those that used
651 shared state.
652 </para></listitem>
653 <listitem><para>
654 See dependency relationships between recipes, packages
655 and tasks.
656 </para></listitem>
657 <listitem><para>
658 See performance information such as build time, task time,
659 CPU usage, and disk I/O.
660 </para></listitem>
661 </itemizedlist>
662 </para>
663
664 <section id='web-interface-videos'>
665 <title>Toaster Web Interface Videos</title>
666
667 <para>
668 Following are several videos that show how to use the Toaster GUI:
669 <itemizedlist>
670 <listitem><para><emphasis>Build Configuration:</emphasis>
671 This
672 <ulink url='https://www.youtube.com/watch?v=qYgDZ8YzV6w'>video</ulink>
673 overviews and demonstrates build configuration for Toaster.
674 </para></listitem>
675 <listitem><para><emphasis>Build Custom Layers:</emphasis>
676 This
677 <ulink url='https://www.youtube.com/watch?v=QJzaE_XjX5c'>video</ulink>
678 shows you how to build custom layers that are used with
679 Toaster.
680 </para></listitem>
681 <listitem><para><emphasis>Toaster Homepage and Table Controls:</emphasis>
682 This
683 <ulink url='https://www.youtube.com/watch?v=QEARDnrR1Xw'>video</ulink>
684 goes over the Toaster entry page, and provides
685 an overview of the data manipulation capabilities of
686 Toaster, which include search, sorting and filtering by
687 different criteria.
688 </para></listitem>
689 <listitem><para><emphasis>Build Dashboard:</emphasis>
690 This
691 <ulink url='https://www.youtube.com/watch?v=KKqHYcnp2gE'>video</ulink>
692 shows you the build dashboard, a page providing an
693 overview of the information available for a selected build.
694 </para></listitem>
695 <listitem><para><emphasis>Image Information:</emphasis>
696 This
697 <ulink url='https://www.youtube.com/watch?v=XqYGFsmA0Rw'>video</ulink>
698 walks through the information Toaster provides
699 about images: packages installed and root file system.
700 </para></listitem>
701 <listitem><para><emphasis>Configuration:</emphasis>
702 This
703 <ulink url='https://www.youtube.com/watch?v=UW-j-T2TzIg'>video</ulink>
704 provides Toaster build configuration information.
705 </para></listitem>
706 <listitem><para><emphasis>Tasks:</emphasis>
707 This
708 <ulink url='https://www.youtube.com/watch?v=D4-9vGSxQtw'>video</ulink>
709 shows the information Toaster provides about the
710 tasks run by the build system.
711 </para></listitem>
712 <listitem><para><emphasis>Recipes and Packages Built:</emphasis>
713 This
714 <ulink url='https://www.youtube.com/watch?v=x-6dx4huNnw'>video</ulink>
715 shows the information Toaster provides about recipes
716 and packages built.
717 </para></listitem>
718 <listitem><para><emphasis>Performance Data:</emphasis>
719 This
720 <ulink url='https://www.youtube.com/watch?v=qWGMrJoqusQ'>video</ulink>
721 shows the build performance data provided by
722 Toaster.
723 </para></listitem>
724 </itemizedlist>
725 </para>
726 </section>
727
728 <section id='a-note-on-the-local-yocto-project-release'>
729 <title>Additional Information About the Local Yocto Project Release</title>
730
731 <para>
732 This section only applies if you have set up Toaster
733 for local development, as explained in the
734 "<link linkend='starting-toaster-for-local-development'>Starting Toaster for Local Development</link>"
735 section.
736 </para>
737
738 <para>
739 When you create a project in Toaster, you will be asked to
740 provide a name and to select a Yocto Project release.
741 One of the release options you will find is called
742 "Local Yocto Project".
743 <imagedata fileref="figures/new-project.png" align="center" width="9in" />
744 </para>
745
746 <para>
747 When you select the "Local Yocto Project" release, Toaster
748 will run your builds using the local Yocto
749 Project clone you have in your computer: the same clone
750 you are using to run Toaster.
751 Unless you manually update
752 this clone, your builds will always use the same Git revision.
753 </para>
754
755 <para>
756 If you select any of the other release options, Toaster
757 will fetch the tip of your selected release from the upstream
758 <ulink url='https://git.yoctoproject.org'>Yocto Project repository</ulink>
759 every time you run a build.
760 Fetching this tip effectively
761 means that if your selected release is updated upstream, the
762 Git revision you are using for your builds will change.
763 If you are doing development locally, you might not want this
764 change to happen.
765 In that case, the "Local Yocto Project"
766 release might be the right choice.
767 </para>
768
769 <para>
770 However, the "Local Yocto Project" release
771 will not provide you with any compatible layers, other than the
772 three core layers that come with the Yocto Project:
773 <itemizedlist>
774 <listitem><para>
775 <ulink url='http://layers.openembedded.org/layerindex/branch/master/layer/openembedded-core/'>openembedded-core</ulink>
776 </para></listitem>
777 <listitem><para>
778 <ulink url='http://layers.openembedded.org/layerindex/branch/master/layer/meta-poky/'>meta-poky</ulink>
779 </para></listitem>
780 <listitem><para>
781 <ulink url='http://layers.openembedded.org/layerindex/branch/master/layer/meta-yocto-bsp/'>meta-yocto-bsp</ulink>
782 </para></listitem>
783 </itemizedlist>
784 <imagedata fileref="figures/compatible-layers.png" align="center" width="9in" />
785 </para>
786
787 <para>
788 If you want to build any other layers, you will need to
789 manually import them into your Toaster project, using the
790 "Import layer" page.
791 <imagedata fileref="figures/import-layer.png" align="center" width="9in" />
792 </para>
793
794 </section>
795
796 <section id='toaster-web-interface-preferred-version'>
797 <title>Building a Specific Recipe Given Multiple Versions</title>
798
799 <para>
800 Occasionally, a layer might provide more than one version of
801 the same recipe.
802 For example, the <filename>openembedded-core</filename> layer
803 provides two versions of the <filename>bash</filename> recipe
804 (i.e. 3.2.48 and 4.3.30-r0) and two versions of the
805 <filename>which</filename> recipe (i.e. 2.21 and 2.18).
806 The following figure shows this exact scenario:
807 <imagedata fileref="figures/bash-oecore.png" align="center" width="9in" depth="6in" />
808 </para>
809
810 <para>
811 By default, the OpenEmbedded build system builds one of the
812 two recipes.
813 For the <filename>bash</filename> case, version 4.3.30-r0 is
814 built by default.
815 Unfortunately, Toaster as it exists, is not able to override
816 the default recipe version.
817 If you would like to build bash 3.2.48, you need to set the
818 <ulink url='&YOCTO_DOCS_REF_URL;#var-PREFERRED_VERSION'><filename>PREFERRED_VERSION</filename></ulink>
819 variable.
820 You can do so from Toaster, using the "Add variable" form,
821 which is available in the "BitBake variables" page of the
822 project configuration section as shown in the following screen:
823 <imagedata fileref="figures/add-variable.png" align="center" width="9in" depth="6in" />
824 </para>
825
826 <para>
827 To specify <filename>bash</filename> 3.2.48 as the version to build,
828 enter "PREFERRED_VERSION_bash" in the "Variable" field, and "3.2.48"
829 in the "Value" field.
830 Next, click the "Add variable" button:
831 <imagedata fileref="figures/set-variable.png" align="center" width="9in" depth="6in" />
832 </para>
833
834 <para>
835 After clicking the "Add variable" button, the settings for
836 <filename>PREFERRED_VERSION</filename> are added to the bottom
837 of the BitBake variables list.
838 With these settings, the OpenEmbedded build system builds the
839 desired version of the recipe rather than the default version:
840 <imagedata fileref="figures/variable-added.png" align="center" width="9in" depth="6in" />
841 </para>
842 </section>
843 </section>
844</chapter>
diff --git a/documentation/toaster-manual/toaster-manual-start.xml b/documentation/toaster-manual/toaster-manual-start.xml
deleted file mode 100644
index 8a857006e5..0000000000
--- a/documentation/toaster-manual/toaster-manual-start.xml
+++ /dev/null
@@ -1,116 +0,0 @@
1<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<chapter id='toaster-manual-start'>
7
8<title>Preparing to Use Toaster</title>
9
10 <para>
11 This chapter describes how you need to prepare your system in order to
12 use Toaster.
13 </para>
14
15 <section id='toaster-setting-up-the-basic-system-requirements'>
16 <title>Setting Up the Basic System Requirements</title>
17
18 <para>
19 Before you can use Toaster, you need to first set up your
20 build system to run the Yocto Project.
21 To do this, follow the instructions in the
22 "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-preparing-the-build-host'>Preparing the Build Host</ulink>"
23 section of the Yocto Project Development Tasks
24 Manual.
25 For Ubuntu/Debian, you might also need to do an additional install
26 of pip3.
27 <literallayout class='monospaced'>
28 $ sudo apt-get install python3-pip
29 </literallayout>
30 </para>
31 </section>
32
33 <section id='toaster-establishing-toaster-system-dependencies'>
34 <title>Establishing Toaster System Dependencies</title>
35
36 <para>
37 Toaster requires extra Python dependencies in order to run.
38 A Toaster requirements file named
39 <filename>toaster-requirements.txt</filename> defines the
40 Python dependencies.
41 The requirements file is located in the
42 <filename>bitbake</filename> directory, which is located in the
43 root directory of the
44 <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink>
45 (e.g. <filename>poky/bitbake/toaster-requirements.txt</filename>).
46 The dependencies appear in a <filename>pip</filename>,
47 install-compatible format.
48 </para>
49
50 <section id='toaster-load-packages'>
51 <title>Install Toaster Packages</title>
52
53 <para>
54 You need to install the packages that Toaster requires.
55 Use this command:
56 <literallayout class='monospaced'>
57 $ pip3 install --user -r bitbake/toaster-requirements.txt
58 </literallayout>
59 The previous command installs the necessary Toaster modules
60 into a local python 3 cache in your
61 <filename>$HOME</filename> directory.
62 The caches is actually located in
63 <filename>$HOME/.local</filename>.
64 To see what packages have been installed into your
65 <filename>$HOME</filename> directory, do the following:
66 <literallayout class='monospaced'>
67 $ pip3 list installed --local
68 </literallayout>
69 If you need to remove something, the following works:
70 <literallayout class='monospaced'>
71 $ pip3 uninstall PackageNameToUninstall
72 </literallayout>
73 </para>
74 </section>
75
76<!-- Commenting this section out for now in case it needs to be used again.
77
78 <section id='toaster-install-daemon'>
79 <title>Install <filename>daemon</filename></title>
80
81 <para>
82 Toaster depends on
83 <ulink url='http://www.libslack.org/daemon/'><filename>daemon</filename></ulink>.
84 Depending on your distribution, how you install
85 <filename>daemon</filename> differs:
86 <itemizedlist>
87 <listitem><para><emphasis>Debian-Based Systems:</emphasis>
88 If you are running a Debian-based distribution,
89 install <filename>daemon</filename> using the
90 following command:
91 <literallayout class='monospaced'>
92 $ sudo apt-get install daemon​
93 </literallayout>
94 </para></listitem>
95 <listitem><para><emphasis>Non-Debian-Based Systems:</emphasis>
96 If you are not running a Debian-based distribution
97 (Redhat-based distribution such as Fedora),
98 you need to download ​the file relevant to the
99 architecture and then install
100 <filename>daemon</filename> manually.
101 Following are the commands for 64-bit distributions:
102 <literallayout class='monospaced'>
103 $ wget http://libslack.org/daemon/download/daemon-0.6.4-1.x86_64.rpm
104 $ sudo rpm -i daemon-0.6.4-1.x86_64.rpm
105 </literallayout>
106 Here are the commands for a 32-bit distribution:
107 <literallayout class='monospaced'>
108 $ wget http://libslack.org/daemon/download/daemon-0.6.4-1.i686.rpm
109 $ sudo rpm -i ​daemon-0.6.4-1.i686.rpm​
110 </literallayout>
111 </para></listitem>
112 </itemizedlist>
113 </para>
114 </section> -->
115 </section>
116</chapter>
diff --git a/documentation/toaster-manual/toaster-manual-style.css b/documentation/toaster-manual/toaster-manual-style.css
deleted file mode 100644
index a7f430df05..0000000000
--- a/documentation/toaster-manual/toaster-manual-style.css
+++ /dev/null
@@ -1,987 +0,0 @@
1/*
2
3 SPDX-License-Identifier: CC-BY-2.0-UK
4
5 Generic XHTML / DocBook XHTML CSS Stylesheet.
6
7 Browser wrangling and typographic design by
8 Oyvind Kolas / pippin@gimp.org
9
10 Customised for Poky by
11 Matthew Allum / mallum@o-hand.com
12
13 Thanks to:
14 Liam R. E. Quin
15 William Skaggs
16 Jakub Steiner
17
18 Structure
19 ---------
20
21 The stylesheet is divided into the following sections:
22
23 Positioning
24 Margins, paddings, width, font-size, clearing.
25 Decorations
26 Borders, style
27 Colors
28 Colors
29 Graphics
30 Graphical backgrounds
31 Nasty IE tweaks
32 Workarounds needed to make it work in internet explorer,
33 currently makes the stylesheet non validating, but up until
34 this point it is validating.
35 Mozilla extensions
36 Transparency for footer
37 Rounded corners on boxes
38
39*/
40
41
42 /*************** /
43 / Positioning /
44/ ***************/
45
46body {
47 font-family: Verdana, Sans, sans-serif;
48
49 min-width: 640px;
50 width: 80%;
51 margin: 0em auto;
52 padding: 2em 5em 5em 5em;
53 color: #333;
54}
55
56h1,h2,h3,h4,h5,h6,h7 {
57 font-family: Arial, Sans;
58 color: #00557D;
59 clear: both;
60}
61
62h1 {
63 font-size: 2em;
64 text-align: left;
65 padding: 0em 0em 0em 0em;
66 margin: 2em 0em 0em 0em;
67}
68
69h2.subtitle {
70 margin: 0.10em 0em 3.0em 0em;
71 padding: 0em 0em 0em 0em;
72 font-size: 1.8em;
73 padding-left: 20%;
74 font-weight: normal;
75 font-style: italic;
76}
77
78h2 {
79 margin: 2em 0em 0.66em 0em;
80 padding: 0.5em 0em 0em 0em;
81 font-size: 1.5em;
82 font-weight: bold;
83}
84
85h3.subtitle {
86 margin: 0em 0em 1em 0em;
87 padding: 0em 0em 0em 0em;
88 font-size: 142.14%;
89 text-align: right;
90}
91
92h3 {
93 margin: 1em 0em 0.5em 0em;
94 padding: 1em 0em 0em 0em;
95 font-size: 140%;
96 font-weight: bold;
97}
98
99h4 {
100 margin: 1em 0em 0.5em 0em;
101 padding: 1em 0em 0em 0em;
102 font-size: 120%;
103 font-weight: bold;
104}
105
106h5 {
107 margin: 1em 0em 0.5em 0em;
108 padding: 1em 0em 0em 0em;
109 font-size: 110%;
110 font-weight: bold;
111}
112
113h6 {
114 margin: 1em 0em 0em 0em;
115 padding: 1em 0em 0em 0em;
116 font-size: 110%;
117 font-weight: bold;
118}
119
120.authorgroup {
121 background-color: transparent;
122 background-repeat: no-repeat;
123 padding-top: 256px;
124 background-image: url("figures/toaster-title.png");
125 background-position: left top;
126 margin-top: -256px;
127 padding-right: 50px;
128 margin-left: 0px;
129 text-align: right;
130 width: 740px;
131}
132
133h3.author {
134 margin: 0em 0me 0em 0em;
135 padding: 0em 0em 0em 0em;
136 font-weight: normal;
137 font-size: 100%;
138 color: #333;
139 clear: both;
140}
141
142.author tt.email {
143 font-size: 66%;
144}
145
146.titlepage hr {
147 width: 0em;
148 clear: both;
149}
150
151.revhistory {
152 padding-top: 2em;
153 clear: both;
154}
155
156.toc,
157.list-of-tables,
158.list-of-examples,
159.list-of-figures {
160 padding: 1.33em 0em 2.5em 0em;
161 color: #00557D;
162}
163
164.toc p,
165.list-of-tables p,
166.list-of-figures p,
167.list-of-examples p {
168 padding: 0em 0em 0em 0em;
169 padding: 0em 0em 0.3em;
170 margin: 1.5em 0em 0em 0em;
171}
172
173.toc p b,
174.list-of-tables p b,
175.list-of-figures p b,
176.list-of-examples p b{
177 font-size: 100.0%;
178 font-weight: bold;
179}
180
181.toc dl,
182.list-of-tables dl,
183.list-of-figures dl,
184.list-of-examples dl {
185 margin: 0em 0em 0.5em 0em;
186 padding: 0em 0em 0em 0em;
187}
188
189.toc dt {
190 margin: 0em 0em 0em 0em;
191 padding: 0em 0em 0em 0em;
192}
193
194.toc dd {
195 margin: 0em 0em 0em 2.6em;
196 padding: 0em 0em 0em 0em;
197}
198
199div.glossary dl,
200div.variablelist dl {
201}
202
203.glossary dl dt,
204.variablelist dl dt,
205.variablelist dl dt span.term {
206 font-weight: normal;
207 width: 20em;
208 text-align: right;
209}
210
211.variablelist dl dt {
212 margin-top: 0.5em;
213}
214
215.glossary dl dd,
216.variablelist dl dd {
217 margin-top: -1em;
218 margin-left: 25.5em;
219}
220
221.glossary dd p,
222.variablelist dd p {
223 margin-top: 0em;
224 margin-bottom: 1em;
225}
226
227
228div.calloutlist table td {
229 padding: 0em 0em 0em 0em;
230 margin: 0em 0em 0em 0em;
231}
232
233div.calloutlist table td p {
234 margin-top: 0em;
235 margin-bottom: 1em;
236}
237
238div p.copyright {
239 text-align: left;
240}
241
242div.legalnotice p.legalnotice-title {
243 margin-bottom: 0em;
244}
245
246p {
247 line-height: 1.5em;
248 margin-top: 0em;
249
250}
251
252dl {
253 padding-top: 0em;
254}
255
256hr {
257 border: solid 1px;
258}
259
260
261.mediaobject,
262.mediaobjectco {
263 text-align: center;
264}
265
266img {
267 border: none;
268}
269
270ul {
271 padding: 0em 0em 0em 1.5em;
272}
273
274ul li {
275 padding: 0em 0em 0em 0em;
276}
277
278ul li p {
279 text-align: left;
280}
281
282table {
283 width :100%;
284}
285
286th {
287 padding: 0.25em;
288 text-align: left;
289 font-weight: normal;
290 vertical-align: top;
291}
292
293td {
294 padding: 0.25em;
295 vertical-align: top;
296}
297
298p a[id] {
299 margin: 0px;
300 padding: 0px;
301 display: inline;
302 background-image: none;
303}
304
305a {
306 text-decoration: underline;
307 color: #444;
308}
309
310pre {
311 overflow: auto;
312}
313
314a:hover {
315 text-decoration: underline;
316 /*font-weight: bold;*/
317}
318
319/* This style defines how the permalink character
320 appears by itself and when hovered over with
321 the mouse. */
322
323[alt='Permalink'] { color: #eee; }
324[alt='Permalink']:hover { color: black; }
325
326
327div.informalfigure,
328div.informalexample,
329div.informaltable,
330div.figure,
331div.table,
332div.example {
333 margin: 1em 0em;
334 padding: 1em;
335 page-break-inside: avoid;
336}
337
338
339div.informalfigure p.title b,
340div.informalexample p.title b,
341div.informaltable p.title b,
342div.figure p.title b,
343div.example p.title b,
344div.table p.title b{
345 padding-top: 0em;
346 margin-top: 0em;
347 font-size: 100%;
348 font-weight: normal;
349}
350
351.mediaobject .caption,
352.mediaobject .caption p {
353 text-align: center;
354 font-size: 80%;
355 padding-top: 0.5em;
356 padding-bottom: 0.5em;
357}
358
359.epigraph {
360 padding-left: 55%;
361 margin-bottom: 1em;
362}
363
364.epigraph p {
365 text-align: left;
366}
367
368.epigraph .quote {
369 font-style: italic;
370}
371.epigraph .attribution {
372 font-style: normal;
373 text-align: right;
374}
375
376span.application {
377 font-style: italic;
378}
379
380.programlisting {
381 font-family: monospace;
382 font-size: 80%;
383 white-space: pre;
384 margin: 1.33em 0em;
385 padding: 1.33em;
386}
387
388.tip,
389.warning,
390.caution,
391.note {
392 margin-top: 1em;
393 margin-bottom: 1em;
394
395}
396
397/* force full width of table within div */
398.tip table,
399.warning table,
400.caution table,
401.note table {
402 border: none;
403 width: 100%;
404}
405
406
407.tip table th,
408.warning table th,
409.caution table th,
410.note table th {
411 padding: 0.8em 0.0em 0.0em 0.0em;
412 margin : 0em 0em 0em 0em;
413}
414
415.tip p,
416.warning p,
417.caution p,
418.note p {
419 margin-top: 0.5em;
420 margin-bottom: 0.5em;
421 padding-right: 1em;
422 text-align: left;
423}
424
425.acronym {
426 text-transform: uppercase;
427}
428
429b.keycap,
430.keycap {
431 padding: 0.09em 0.3em;
432 margin: 0em;
433}
434
435.itemizedlist li {
436 clear: none;
437}
438
439.filename {
440 font-size: medium;
441 font-family: Courier, monospace;
442}
443
444
445div.navheader, div.heading{
446 position: absolute;
447 left: 0em;
448 top: 0em;
449 width: 100%;
450 background-color: #cdf;
451 width: 100%;
452}
453
454div.navfooter, div.footing{
455 position: fixed;
456 left: 0em;
457 bottom: 0em;
458 background-color: #eee;
459 width: 100%;
460}
461
462
463div.navheader td,
464div.navfooter td {
465 font-size: 66%;
466}
467
468div.navheader table th {
469 /*font-family: Georgia, Times, serif;*/
470 /*font-size: x-large;*/
471 font-size: 80%;
472}
473
474div.navheader table {
475 border-left: 0em;
476 border-right: 0em;
477 border-top: 0em;
478 width: 100%;
479}
480
481div.navfooter table {
482 border-left: 0em;
483 border-right: 0em;
484 border-bottom: 0em;
485 width: 100%;
486}
487
488div.navheader table td a,
489div.navfooter table td a {
490 color: #777;
491 text-decoration: none;
492}
493
494/* normal text in the footer */
495div.navfooter table td {
496 color: black;
497}
498
499div.navheader table td a:visited,
500div.navfooter table td a:visited {
501 color: #444;
502}
503
504
505/* links in header and footer */
506div.navheader table td a:hover,
507div.navfooter table td a:hover {
508 text-decoration: underline;
509 background-color: transparent;
510 color: #33a;
511}
512
513div.navheader hr,
514div.navfooter hr {
515 display: none;
516}
517
518
519.qandaset tr.question td p {
520 margin: 0em 0em 1em 0em;
521 padding: 0em 0em 0em 0em;
522}
523
524.qandaset tr.answer td p {
525 margin: 0em 0em 1em 0em;
526 padding: 0em 0em 0em 0em;
527}
528.answer td {
529 padding-bottom: 1.5em;
530}
531
532.emphasis {
533 font-weight: bold;
534}
535
536
537 /************* /
538 / decorations /
539/ *************/
540
541.titlepage {
542}
543
544.part .title {
545}
546
547.subtitle {
548 border: none;
549}
550
551/*
552h1 {
553 border: none;
554}
555
556h2 {
557 border-top: solid 0.2em;
558 border-bottom: solid 0.06em;
559}
560
561h3 {
562 border-top: 0em;
563 border-bottom: solid 0.06em;
564}
565
566h4 {
567 border: 0em;
568 border-bottom: solid 0.06em;
569}
570
571h5 {
572 border: 0em;
573}
574*/
575
576.programlisting {
577 border: solid 1px;
578}
579
580div.figure,
581div.table,
582div.informalfigure,
583div.informaltable,
584div.informalexample,
585div.example {
586 border: 1px solid;
587}
588
589
590
591.tip,
592.warning,
593.caution,
594.note {
595 border: 1px solid;
596}
597
598.tip table th,
599.warning table th,
600.caution table th,
601.note table th {
602 border-bottom: 1px solid;
603}
604
605.question td {
606 border-top: 1px solid black;
607}
608
609.answer {
610}
611
612
613b.keycap,
614.keycap {
615 border: 1px solid;
616}
617
618
619div.navheader, div.heading{
620 border-bottom: 1px solid;
621}
622
623
624div.navfooter, div.footing{
625 border-top: 1px solid;
626}
627
628 /********* /
629 / colors /
630/ *********/
631
632body {
633 color: #333;
634 background: white;
635}
636
637a {
638 background: transparent;
639}
640
641a:hover {
642 background-color: #dedede;
643}
644
645
646h1,
647h2,
648h3,
649h4,
650h5,
651h6,
652h7,
653h8 {
654 background-color: transparent;
655}
656
657hr {
658 border-color: #aaa;
659}
660
661
662.tip, .warning, .caution, .note {
663 border-color: #fff;
664}
665
666
667.tip table th,
668.warning table th,
669.caution table th,
670.note table th {
671 border-bottom-color: #fff;
672}
673
674
675.warning {
676 background-color: #f0f0f2;
677}
678
679.caution {
680 background-color: #f0f0f2;
681}
682
683.tip {
684 background-color: #f0f0f2;
685}
686
687.note {
688 background-color: #f0f0f2;
689}
690
691.glossary dl dt,
692.variablelist dl dt,
693.variablelist dl dt span.term {
694 color: #044;
695}
696
697div.figure,
698div.table,
699div.example,
700div.informalfigure,
701div.informaltable,
702div.informalexample {
703 border-color: #aaa;
704}
705
706pre.programlisting {
707 color: black;
708 background-color: #fff;
709 border-color: #aaa;
710 border-width: 2px;
711}
712
713.guimenu,
714.guilabel,
715.guimenuitem {
716 background-color: #eee;
717}
718
719
720b.keycap,
721.keycap {
722 background-color: #eee;
723 border-color: #999;
724}
725
726
727div.navheader {
728 border-color: black;
729}
730
731
732div.navfooter {
733 border-color: black;
734}
735
736
737 /*********** /
738 / graphics /
739/ ***********/
740
741/*
742body {
743 background-image: url("images/body_bg.jpg");
744 background-attachment: fixed;
745}
746
747.navheader,
748.note,
749.tip {
750 background-image: url("images/note_bg.jpg");
751 background-attachment: fixed;
752}
753
754.warning,
755.caution {
756 background-image: url("images/warning_bg.jpg");
757 background-attachment: fixed;
758}
759
760.figure,
761.informalfigure,
762.example,
763.informalexample,
764.table,
765.informaltable {
766 background-image: url("images/figure_bg.jpg");
767 background-attachment: fixed;
768}
769
770*/
771h1,
772h2,
773h3,
774h4,
775h5,
776h6,
777h7{
778}
779
780/*
781Example of how to stick an image as part of the title.
782
783div.article .titlepage .title
784{
785 background-image: url("figures/white-on-black.png");
786 background-position: center;
787 background-repeat: repeat-x;
788}
789*/
790
791div.preface .titlepage .title,
792div.colophon .title,
793div.chapter .titlepage .title,
794div.article .titlepage .title
795{
796}
797
798div.section div.section .titlepage .title,
799div.sect2 .titlepage .title {
800 background: none;
801}
802
803
804h1.title {
805 background-color: transparent;
806 background-repeat: no-repeat;
807 height: 256px;
808 text-indent: -9000px;
809 overflow:hidden;
810}
811
812h2.subtitle {
813 background-color: transparent;
814 text-indent: -9000px;
815 overflow:hidden;
816 width: 0px;
817 display: none;
818}
819
820 /*************************************** /
821 / pippin.gimp.org specific alterations /
822/ ***************************************/
823
824/*
825div.heading, div.navheader {
826 color: #777;
827 font-size: 80%;
828 padding: 0;
829 margin: 0;
830 text-align: left;
831 position: absolute;
832 top: 0px;
833 left: 0px;
834 width: 100%;
835 height: 50px;
836 background: url('/gfx/heading_bg.png') transparent;
837 background-repeat: repeat-x;
838 background-attachment: fixed;
839 border: none;
840}
841
842div.heading a {
843 color: #444;
844}
845
846div.footing, div.navfooter {
847 border: none;
848 color: #ddd;
849 font-size: 80%;
850 text-align:right;
851
852 width: 100%;
853 padding-top: 10px;
854 position: absolute;
855 bottom: 0px;
856 left: 0px;
857
858 background: url('/gfx/footing_bg.png') transparent;
859}
860*/
861
862
863
864 /****************** /
865 / nasty ie tweaks /
866/ ******************/
867
868/*
869div.heading, div.navheader {
870 width:expression(document.body.clientWidth + "px");
871}
872
873div.footing, div.navfooter {
874 width:expression(document.body.clientWidth + "px");
875 margin-left:expression("-5em");
876}
877body {
878 padding:expression("4em 5em 0em 5em");
879}
880*/
881
882 /**************************************** /
883 / mozilla vendor specific css extensions /
884/ ****************************************/
885/*
886div.navfooter, div.footing{
887 -moz-opacity: 0.8em;
888}
889
890div.figure,
891div.table,
892div.informalfigure,
893div.informaltable,
894div.informalexample,
895div.example,
896.tip,
897.warning,
898.caution,
899.note {
900 -moz-border-radius: 0.5em;
901}
902
903b.keycap,
904.keycap {
905 -moz-border-radius: 0.3em;
906}
907*/
908
909table tr td table tr td {
910 display: none;
911}
912
913
914hr {
915 display: none;
916}
917
918table {
919 border: 0em;
920}
921
922 .photo {
923 float: right;
924 margin-left: 1.5em;
925 margin-bottom: 1.5em;
926 margin-top: 0em;
927 max-width: 17em;
928 border: 1px solid gray;
929 padding: 3px;
930 background: white;
931}
932 .seperator {
933 padding-top: 2em;
934 clear: both;
935 }
936
937 #validators {
938 margin-top: 5em;
939 text-align: right;
940 color: #777;
941 }
942 @media print {
943 body {
944 font-size: 8pt;
945 }
946 .noprint {
947 display: none;
948 }
949 }
950
951
952.tip,
953.note {
954 background: #f0f0f2;
955 color: #333;
956 padding: 20px;
957 margin: 20px;
958}
959
960.tip h3,
961.note h3 {
962 padding: 0em;
963 margin: 0em;
964 font-size: 2em;
965 font-weight: bold;
966 color: #333;
967}
968
969.tip a,
970.note a {
971 color: #333;
972 text-decoration: underline;
973}
974
975.footnote {
976 font-size: small;
977 color: #333;
978}
979
980/* Changes the announcement text */
981.tip h3,
982.warning h3,
983.caution h3,
984.note h3 {
985 font-size:large;
986 color: #00557D;
987}
diff --git a/documentation/toaster-manual/toaster-manual.xml b/documentation/toaster-manual/toaster-manual.xml
deleted file mode 100755
index 136b4df964..0000000000
--- a/documentation/toaster-manual/toaster-manual.xml
+++ /dev/null
@@ -1,159 +0,0 @@
1<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4<!--SPDX-License-Identifier: CC-BY-2.0-UK-->
5
6<book id='toaster-manual' lang='en'
7 xmlns:xi="http://www.w3.org/2003/XInclude"
8 xmlns="http://docbook.org/ns/docbook"
9 >
10 <bookinfo>
11
12 <mediaobject>
13 <imageobject>
14 <imagedata fileref='figures/toaster-title.png'
15 format='SVG'
16 align='left' scalefit='1' width='100%'/>
17 </imageobject>
18 </mediaobject>
19
20 <title>
21 Toaster User Manual
22 </title>
23
24 <authorgroup>
25 <author>
26 <affiliation>
27 <orgname>&ORGNAME;</orgname>
28 </affiliation>
29 <email>&ORGEMAIL;</email>
30 </author>
31 </authorgroup>
32
33 <revhistory>
34 <revision>
35 <revnumber>1.8</revnumber>
36 <date>April 2015</date>
37 <revremark>The initial document released with the Yocto Project 1.8 Release.</revremark>
38 </revision>
39 <revision>
40 <revnumber>2.0</revnumber>
41 <date>October 2015</date>
42 <revremark>Released with the Yocto Project 2.0 Release.</revremark>
43 </revision>
44 <revision>
45 <revnumber>2.1</revnumber>
46 <date>April 2016</date>
47 <revremark>Released with the Yocto Project 2.1 Release.</revremark>
48 </revision>
49 <revision>
50 <revnumber>2.2</revnumber>
51 <date>October 2016</date>
52 <revremark>Released with the Yocto Project 2.2 Release.</revremark>
53 </revision>
54 <revision>
55 <revnumber>2.3</revnumber>
56 <date>May 2017</date>
57 <revremark>Released with the Yocto Project 2.3 Release.</revremark>
58 </revision>
59 <revision>
60 <revnumber>2.4</revnumber>
61 <date>October 2017</date>
62 <revremark>Released with the Yocto Project 2.4 Release.</revremark>
63 </revision>
64 <revision>
65 <revnumber>2.5</revnumber>
66 <date>May 2018</date>
67 <revremark>Released with the Yocto Project 2.5 Release.</revremark>
68 </revision>
69 <revision>
70 <revnumber>2.6</revnumber>
71 <date>November 2018</date>
72 <revremark>Released with the Yocto Project 2.6 Release.</revremark>
73 </revision>
74 <revision>
75 <revnumber>2.7</revnumber>
76 <date>May 2019</date>
77 <revremark>Released with the Yocto Project 2.7 Release.</revremark>
78 </revision>
79 <revision>
80 <revnumber>3.0</revnumber>
81 <date>October 2019</date>
82 <revremark>Released with the Yocto Project 3.0 Release.</revremark>
83 </revision>
84 <revision>
85 <revnumber>3.1</revnumber>
86 <date>&REL_MONTH_YEAR;</date>
87 <revremark>Released with the Yocto Project 3.1 Release.</revremark>
88 </revision>
89 </revhistory>
90
91 <copyright>
92 <year>&COPYRIGHT_YEAR;</year>
93 <holder>Linux Foundation</holder>
94 </copyright>
95
96 <legalnotice>
97 <para>
98 Permission is granted to copy, distribute and/or modify this document under
99 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 &amp; Wales</ulink> as published by Creative Commons.
100 </para>
101 <note><title>Manual Notes</title>
102 <itemizedlist>
103 <listitem><para>
104 This version of the
105 <emphasis>Toaster User Manual</emphasis>
106 is for the &YOCTO_DOC_VERSION; release of the
107 Yocto Project.
108 To be sure you have the latest version of the manual
109 for this release, go to the
110 <ulink url='&YOCTO_DOCS_URL;'>Yocto Project documentation page</ulink>
111 and select the manual from that site.
112 Manuals from the site are more up-to-date than manuals
113 derived from the Yocto Project released TAR files.
114 </para></listitem>
115 <listitem><para>
116 If you located this manual through a web search, the
117 version of the manual might not be the one you want
118 (e.g. the search might have returned a manual much
119 older than the Yocto Project version with which you
120 are working).
121 You can see all Yocto Project major releases by
122 visiting the
123 <ulink url='&YOCTO_WIKI_URL;/wiki/Releases'>Releases</ulink>
124 page.
125 If you need a version of this manual for a different
126 Yocto Project release, visit the
127 <ulink url='&YOCTO_DOCS_URL;'>Yocto Project documentation page</ulink>
128 and select the manual set by using the
129 "ACTIVE RELEASES DOCUMENTATION" or "DOCUMENTS ARCHIVE"
130 pull-down menus.
131 </para></listitem>
132 <listitem>
133 <para>
134 To report any inaccuracies or problems with this
135 (or any other Yocto Project) manual, send an email to
136 the Yocto Project documentation mailing list at
137 <filename>docs@lists.yoctoproject.org</filename> or
138 log into the freenode <filename>#yocto</filename> channel.
139 </para>
140 </listitem>
141 </itemizedlist>
142 </note>
143
144 </legalnotice>
145
146 </bookinfo>
147
148 <xi:include href="toaster-manual-intro.xml"/>
149
150 <xi:include href="toaster-manual-start.xml"/>
151
152 <xi:include href="toaster-manual-setup-and-use.xml"/>
153
154 <xi:include href="toaster-manual-reference.xml"/>
155
156</book>
157<!--
158vim: expandtab tw=80 ts=4
159-->
diff --git a/documentation/tools/eclipse-help.sed b/documentation/tools/eclipse-help.sed
deleted file mode 100644
index 9716ea42bc..0000000000
--- a/documentation/tools/eclipse-help.sed
+++ /dev/null
@@ -1,21 +0,0 @@
1#
2# SPDX-License-Identifier: CC-BY-2.0-UK
3#
4# Process poky-ref-manual and yocto-project-qs manual (<word>-<word>-<word> style)
5# For example:
6# "ulink" href="http://www.yoctoproject.org/docs/1.3/poky-ref-manual/poky-ref-manual.html#faq"
7# -> "link" href="../poky-ref-manual/faq.html"
8s@"ulink" href="http://www.yoctoproject.org/docs/[^/]*/([a-z]*-[a-z]*-[a-z]*)/[a-z]*-[a-z]*-[a-z]*.html#([^"]*)"/@"link" href="../1/2.html"@g
9
10# Processes all other manuals (<word>-<word> style)
11# For example:
12# "ulink" href="http://www.yoctoproject.org/docs/1.3/kernel-manual/kernel-manual.html#faq"
13# -> "link" href="../kernel-manual/faq.html"
14s@"ulink" href="http://www.yoctoproject.org/docs/[^/]*/([a-z]*-[a-z]*)/[a-z]*-[a-z]*.html#([^"]*)"@"link" href="../1/2.html"@g
15
16# Process cases where just an external manual is referenced without an id anchor
17# For example:
18# "ulink" href="http://www.yoctoproject.org/docs/1.3/kernel-manual/kernel-manual.html
19# -> "link" href="../kernel-manual/index.html"
20s@"ulink" href="http://www.yoctoproject.org/docs/[^/]*/([a-z]*-[a-z]*-[a-z]*)/[a-z]*-[a-z]*-[a-z]*.html"@"link" href="../1/index.html"@g
21s@"ulink" href="http://www.yoctoproject.org/docs/[^/]*/([a-z]*-[a-z]*)/[a-z]*-[a-z]*.html"@"link" href="../1/index.html"@g
diff --git a/documentation/tools/mega-manual.sed b/documentation/tools/mega-manual.sed
deleted file mode 100644
index c525ab46a4..0000000000
--- a/documentation/tools/mega-manual.sed
+++ /dev/null
@@ -1,39 +0,0 @@
1#
2# SPDX-License-Identifier: CC-BY-2.0-UK
3#
4# Processes bitbake-user-manual (<word>-<word>-<word> style).
5# This style is for manual three-word folders, which currently is only the BitBake User Manual.
6# We used to have the "yocto-project-qs" and "poky-ref-manual" folders but no longer do.
7# s@"ulink" href="http://www.yoctoproject.org/docs/3.1/[a-z]*-[a-z]*-[a-z]*/[a-z]*-[a-z]*-[a-z]*.html#@"link" href="#@g
8s@"ulink" href="http://www.yoctoproject.org/docs/3.1/bitbake-user-manual/bitbake-user-manual.html#@"link" href="#@g
9
10# Processes all other manuals (<word>-<word> style).
11# This style is for manual folders that use two word, which is the standard now (e.g. "ref-manual").
12# Here is the one-liner:
13# s@"ulink" href="http://www.yoctoproject.org/docs/3.1/[a-z]*-[a-z]*/[a-z]*-[a-z]*.html#@"link" href="#@g
14
15s@"ulink" href="http://www.yoctoproject.org/docs/3.1/sdk-manual/sdk-manual.html#@"link" href="#@g
16s@"ulink" href="http://www.yoctoproject.org/docs/3.1/bsp-guide/bsp-guide.html#@"link" href="#@g
17s@"ulink" href="http://www.yoctoproject.org/docs/3.1/dev-manual/dev-manual.html#@"link" href="#@g
18s@"ulink" href="http://www.yoctoproject.org/docs/3.1/overview-manual/overview-manual.html#@"link" href="#@g
19s@"ulink" href="http://www.yoctoproject.org/docs/3.1/brief-yoctoprojectqs/brief-yoctoprojectqs.html#@"link" href="#@g
20s@"ulink" href="http://www.yoctoproject.org/docs/3.1/kernel-dev/kernel-dev.html#@"link" href="#@g
21s@"ulink" href="http://www.yoctoproject.org/docs/3.1/profile-manual/profile-manual.html#@"link" href="#@g
22s@"ulink" href="http://www.yoctoproject.org/docs/3.1/ref-manual/ref-manual.html#@"link" href="#@g
23s@"ulink" href="http://www.yoctoproject.org/docs/3.1/toaster-manual/toaster-manual.html#@"link" href="#@g
24
25# Process cases where just an external manual is referenced without an id anchor
26s@<a class="ulink" href="http://www.yoctoproject.org/docs/3.1/brief-yoctoprojectqs/brief-yoctoprojectqs.html" target="_top">Yocto Project Quick Build</a>@Yocto Project Quick Build@g
27s@<a class="ulink" href="http://www.yoctoproject.org/docs/3.1/bitbake-user-manual/bitbake-user-manual.html" target="_top">BitBake User Manual</a>@BitBake User Manual@g
28s@<a class="ulink" href="http://www.yoctoproject.org/docs/3.1/dev-manual/dev-manual.html" target="_top">Yocto Project Development Tasks Manual</a>@Yocto Project Development Tasks Manual@g
29s@<a class="ulink" href="http://www.yoctoproject.org/docs/3.1/overview-manual/overview-manual.html" target="_top">Yocto Project Overview and Concepts Manual</a>@Yocto project Overview and Concepts Manual@g
30s@<a class="ulink" href="http://www.yoctoproject.org/docs/3.1/sdk-manual/sdk-manual.html" target="_top">Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</a>@Yocto Project Application Development and the Extensible Software Development Kit (eSDK)@g
31s@<a class="ulink" href="http://www.yoctoproject.org/docs/3.1/bsp-guide/bsp-guide.html" target="_top">Yocto Project Board Support Package (BSP) Developer's Guide</a>@Yocto Project Board Support Package (BSP) Developer's Guide@g
32s@<a class="ulink" href="http://www.yoctoproject.org/docs/3.1/profile-manual/profile-manual.html" target="_top">Yocto Project Profiling and Tracing Manual</a>@Yocto Project Profiling and Tracing Manual@g
33s@<a class="ulink" href="http://www.yoctoproject.org/docs/3.1/kernel-dev/kernel-dev.html" target="_top">Yocto Project Linux Kernel Development Manual</a>@Yocto Project Linux Kernel Development Manual@g
34s@<a class="ulink" href="http://www.yoctoproject.org/docs/3.1/ref-manual/ref-manual.html" target="_top">Yocto Project Reference Manual</a>@Yocto Project Reference Manual@g
35s@<a class="ulink" href="http://www.yoctoproject.org/docs/3.1/toaster-manual/toaster-manual.html" target="_top">Toaster User Manual</a>@Toaster User Manual@g
36
37# Process a single, rouge occurrence of a linked reference to the Mega-Manual.
38s@<a class="ulink" href="http://www.yoctoproject.org/docs/3.1/mega-manual/mega-manual.html" target="_top">Yocto Project Mega-Manual</a>@Yocto Project Mega-Manual@g
39
diff --git a/documentation/tools/poky-docbook-to-pdf b/documentation/tools/poky-docbook-to-pdf
deleted file mode 100755
index b36e74b6be..0000000000
--- a/documentation/tools/poky-docbook-to-pdf
+++ /dev/null
@@ -1,54 +0,0 @@
1#!/bin/sh
2#
3# SPDX-License-Identifier: CC-BY-2.0-UK
4#
5
6if [ -z "$1" -o -z "$2" ]; then
7 echo "usage: [-v] $0 <docbook file> <templatedir>"
8 echo
9 echo "*NOTE* you need xsltproc, fop and nwalsh docbook stylesheets"
10 echo " installed for this to work!"
11 echo
12 exit 0
13fi
14
15FO=`echo $1 | sed s/.xml/.fo/` || exit 1
16PDF=`echo $1 | sed s/.xml/.pdf/` || exit 1
17TEMPLATEDIR=$2
18
19##
20# These URI should be rewritten by your distribution's xml catalog to
21# match your localy installed XSL stylesheets.
22XSL_BASE_URI="http://docbook.sourceforge.net/release/xsl/current"
23
24# Creates a temporary XSL stylesheet based on titlepage.xsl
25xsltproc -o /tmp/titlepage.xsl \
26 --xinclude \
27 $XSL_BASE_URI/template/titlepage.xsl \
28 $TEMPLATEDIR/titlepage.templates.xml || exit 1
29
30# Creates the file needed for FOP
31xsltproc --xinclude \
32 --stringparam hyphenate false \
33 --stringparam formal.title.placement "figure after" \
34 --stringparam ulink.show 1 \
35 --stringparam body.font.master 9 \
36 --stringparam title.font.master 11 \
37 --stringparam draft.watermark.image "$TEMPLATEDIR/draft.png" \
38 --stringparam chapter.autolabel 1 \
39 --stringparam appendix.autolabel A \
40 --stringparam section.autolabel 1 \
41 --stringparam section.label.includes.component.label 1 \
42 --output $FO \
43 $TEMPLATEDIR/poky-db-pdf.xsl \
44 $1 || exit 1
45
46# Invokes the Java version of FOP. Uses the additional configuration file common/fop-config.xml
47fop -c $TEMPLATEDIR/fop-config.xml -fo $FO -pdf $PDF || exit 1
48
49rm -f $FO
50rm -f /tmp/titlepage.xsl
51
52echo
53echo " #### Success! $PDF ready. ####"
54echo